qemu-devel
[Top][All Lists]
Advanced

[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: Eduardo Habkost
Subject: Re: [Qemu-devel] [PATCH 05/23] hyperv: ensure VP index equal to QEMU cpu_index
Date: Wed, 14 Jun 2017 10:45:23 -0300
User-agent: Mutt/1.8.0 (2017-02-23)

On Wed, Jun 14, 2017 at 03:38:59PM +0200, Igor Mammedov wrote:
> On Wed, 14 Jun 2017 10:22:16 -0300
> Eduardo Habkost <address@hidden> wrote:
> 
> > 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?
> warn won't solve issue, and it's called rather late in vcpu creation
> chain without any error propagation so it's not possible (hard) to
> gracefully fail cpu hotplug.

The issue is unsolvable on old kernels (and I don't think we want
to prevent the VM from starting), hence the warning.  But the
ability to report errors gracefully on CPU hotplug is a very good
reason.  Good point.

> 
> with KVM_CAP_HYPERV_SYNIC2 we could easily turn on compat property for
> SYNC device (needs QOMification) that would turn on broken compat
> logic if capability is not present/old machine type.

I was going to propose enabling the compat logic if KVM_SET_MSRS
failed, but you have a good point about KVM_SET_MSRS being called
very late.

-- 
Eduardo



reply via email to

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