[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2] x86/hvm: Extend HVM cpuid leaf with vcpu id
> -----Original Message----- > From: Matt Wilson [mailto:mswilson@xxxxxxxxx] On Behalf Of Matt Wilson > Sent: 11 December 2014 23:17 > To: Paul Durrant > Cc: xen-devel@xxxxxxxxxxxxx; Keir (Xen.org); Jan Beulich > Subject: Re: [Xen-devel] [PATCH v2] x86/hvm: Extend HVM cpuid leaf with > vcpu id > > On Thu, Nov 06, 2014 at 03:26:24PM +0000, Paul Durrant wrote: > > To perform certain hypercalls HVM guests need to use Xen's idea of > > vcpu id, which may well not match the guest OS idea of CPU id. > > This patch adds vcpu id to the HVM cpuid leaf allowing the guest > > to build a mapping. > > One more tangent on this, since this is partially considered in a > Windows context. Why not use the existing Viridian virtual processor > index MSR for this, since that would work on Xen today. > > xen/arch/x86/hvm/viridian.c: > > #define VIRIDIAN_MSR_VP_INDEX 0x40000002 > > ... > > case VIRIDIAN_MSR_VP_INDEX: > > perfc_incr(mshv_rdmsr_vp_index); > > *val = v->vcpu_id; > > break; > Yes, that would work for VMs where viridian is enabled, but there's no requirement that viridian is enabled to install PV drivers even in Windows. I guess ACPI is the only robust way to get vcpu id in an HVM guest in the absence of the new cpuid leaf. Paul > --msw _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |