On Wed, Jun 14, 2017 at 03:17:54PM +0200, Paolo Bonzini wrote: > > > On 14/06/2017 15:11, Igor Mammedov wrote: > >> No, KVM really uses the VCPU _index_ for HV_X64_MSR_VP_INDEX: > > > > and as you pointed out that works just by luck, > > as soon as we there would be out of order created CPUs > > returned value won't match cpu_index. > > > > So instead of spreading this nonsense out to QEMU, is it possible > > to fix kernel(kvm+guest) to use apic_id instead? > > Yes, definitely. At this point let's add a new "KVM_CAP_HYPERV_SYNIC2" > capability and declare the old one broken, that will make things easier.
What do we need a capability for? Can't we just call KVM_SET_MSRS using arch_id (== apic_id) and warn the user if it doesn't work? -- Eduardo