[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 05/23] hyperv: ensure VP index equal to QEMU cpu
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 05/23] hyperv: ensure VP index equal to QEMU cpu_index |
Date: |
Thu, 15 Jun 2017 10:26:58 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 |
On 14/06/2017 20:59, Eduardo Habkost wrote:
> On Wed, Jun 14, 2017 at 09:40:37PM +0300, Roman Kagan wrote:
>> One more data point is that until now there was no use for vp_index in
>> QEMU, so it didn't care how KVM managed it. In KVM the only
>> vp_index-aware path that the guests could trigger was exactly reading of
>> HV_X64_MSR_VP_INDEX.
>>
>> So let me try to sum up (to make sure I understand it right);
>>
>> 1) we add KVM_CAP_HYPERV_SYNIC2 to KVM; when QEMU enables it KVM
>> switches to using vcpu_id as vp_index and stops zeroing synic pages
>
> If we want to keep KVM code simpler, we could make QEMU
> explicitly initialize vp_index using vcpu_id (== arch_id == apic_id)
> if KVM_CAP_HYPERV_SYNIC2 is reported as supported.
>
>> 2) new QEMU refuses to start in non-compat mode when
>> KVM_CAP_HYPERV_SYNIC2 is not supported
>
> It depends on which cases are considered "in non-compat mode".
> Getting a VM not runnable just because the machine-type was
> updated is not desirable, especially considering that on most
> cases we will create the VCPUs on the same order and things would
> keep working. Probably the best we can do on this case is to
> automatically enable compat mode, but print a warning saying
> future QEMU versions might break if the kernel is not upgraded.
Anything that specifies hv_synic can be broken. There was really no
reason to specify it for anything except experimenting.
So QEMU never has to enable KVM_CAP_HYPERV_SYNIC. No compat mode is
necessary. In fact, I don't see any reason to _keep_
KVM_CAP_HYPERV_SYNIC in the kernel, either. This means that KVM can
also switch unconditionally the vp_index to vcpu_id, because old QEMU +
new kernel won't even start.
Paolo
- Re: [Qemu-devel] [PATCH 05/23] hyperv: ensure VP index equal to QEMU cpu_index, (continued)
- Re: [Qemu-devel] [PATCH 05/23] hyperv: ensure VP index equal to QEMU cpu_index, Igor Mammedov, 2017/06/14
- Re: [Qemu-devel] [PATCH 05/23] hyperv: ensure VP index equal to QEMU cpu_index, Eduardo Habkost, 2017/06/14
- Re: [Qemu-devel] [PATCH 05/23] hyperv: ensure VP index equal to QEMU cpu_index, Igor Mammedov, 2017/06/14
- Re: [Qemu-devel] [PATCH 05/23] hyperv: ensure VP index equal to QEMU cpu_index, Paolo Bonzini, 2017/06/14
- Re: [Qemu-devel] [PATCH 05/23] hyperv: ensure VP index equal to QEMU cpu_index, Eduardo Habkost, 2017/06/14
- Re: [Qemu-devel] [PATCH 05/23] hyperv: ensure VP index equal to QEMU cpu_index, Paolo Bonzini, 2017/06/14
- Re: [Qemu-devel] [PATCH 05/23] hyperv: ensure VP index equal to QEMU cpu_index, Igor Mammedov, 2017/06/14
- Re: [Qemu-devel] [PATCH 05/23] hyperv: ensure VP index equal to QEMU cpu_index, Eduardo Habkost, 2017/06/14
- Re: [Qemu-devel] [PATCH 05/23] hyperv: ensure VP index equal to QEMU cpu_index, Roman Kagan, 2017/06/14
- Re: [Qemu-devel] [PATCH 05/23] hyperv: ensure VP index equal to QEMU cpu_index, Eduardo Habkost, 2017/06/14
- Re: [Qemu-devel] [PATCH 05/23] hyperv: ensure VP index equal to QEMU cpu_index,
Paolo Bonzini <=
- Re: [Qemu-devel] [PATCH 05/23] hyperv: ensure VP index equal to QEMU cpu_index, Roman Kagan, 2017/06/15
- Re: [Qemu-devel] [PATCH 05/23] hyperv: ensure VP index equal to QEMU cpu_index, Paolo Bonzini, 2017/06/15
- Re: [Qemu-devel] [PATCH 05/23] hyperv: ensure VP index equal to QEMU cpu_index, Roman Kagan, 2017/06/15
- Re: [Qemu-devel] [PATCH 05/23] hyperv: ensure VP index equal to QEMU cpu_index, Eduardo Habkost, 2017/06/14
- Re: [Qemu-devel] [PATCH 05/23] hyperv: ensure VP index equal to QEMU cpu_index, Eduardo Habkost, 2017/06/14
- Re: [Qemu-devel] [PATCH 05/23] hyperv: ensure VP index equal to QEMU cpu_index, Igor Mammedov, 2017/06/14
- Re: [Qemu-devel] [PATCH 05/23] hyperv: ensure VP index equal to QEMU cpu_index, Eduardo Habkost, 2017/06/14
- Re: [Qemu-devel] [PATCH 05/23] hyperv: ensure VP index equal to QEMU cpu_index, Igor Mammedov, 2017/06/14
[Qemu-devel] [PATCH 07/23] hyperv_testdev: refactor for readability, Roman Kagan, 2017/06/06
[Qemu-devel] [PATCH 08/23] hyperv: cosmetic: g_malloc -> g_new, Roman Kagan, 2017/06/06