qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 16/23] hyperv: map overlay pages after updating


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 16/23] hyperv: map overlay pages after updating msrs
Date: Wed, 14 Jun 2017 14:46:57 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0


On 14/06/2017 14:41, Roman Kagan wrote:
> On Wed, Jun 14, 2017 at 02:11:56PM +0200, Paolo Bonzini wrote:
>> On 14/06/2017 13:54, Roman Kagan wrote:
>>>> Why not disable the zeroing for host-initiated MSR writes?  This is
>>>> pretty clearly a KVM bug, we can push it to stable kernels too.
>>>
>>> The only problem with this is that QEMU will have no reliable way to
>>> know if the KVM it runs with has this bug fixed or not.  Machines
>>> without vmbus work and even migrate fine with the current KVM despite
>>> this bug (the only user of those pages currently is synic timers which
>>> re-arm themselves and post messages regardless of zeroing).  Now
>>> updating QEMU to a vmbus-enabled version without updating the kernel
>>> will make the migrations cause guest hangs.
>>
>> Return 2 from KVM_CHECK_EXTENSION(KVM_CAP_HYPERV_SYNIC)?  Then you can
>> make new QEMU refuse to enable synic if a new kernel is not available.
> 
> Indeed, that's a possibility.
> 
> I'll probably make it in both directions then: on
> KVM_ENABLE_CAP(KVM_CAP_HYPERV_SYNIC, 2) disable zeroing completely,
> including on guest writes, to better match Hyper-V.  Or does it deserve
> a separate cap number?

Unfortunately kvm_vcpu_ioctl_enable_cap is not checking arguments and
refusing nonzero values, so I'm a bit wary of doing that
unconditionally---and I'm not sure it deserves a separate capability number.

Maybe a flag KVM_ENABLE_CAP_STRICT_ARG_CHECK in cap->flags, but I don't
want you to do too much unrelated work.  Keeping the zeroing on guest
writes doesn't seem too bad.

Or the nuclear option, introduce KVM_CAP_HYPERV_SYNIC2 and drop the
broken KVM_CAP_HYPERV_SYNIC altogether.  Has its charm...

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]