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

Re: [Xen-devel] [PATCH] x86/hvm: always expose x2APIC feature in max HVM cpuid policy


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Thu, 9 Jan 2020 11:48:50 +0100
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=roger.pau@xxxxxxxxxx; spf=Pass smtp.mailfrom=roger.pau@xxxxxxxxxx; spf=None smtp.helo=postmaster@xxxxxxxxxxxxxxx
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Jan Beulich <jbeulich@xxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Thu, 09 Jan 2020 10:49:12 +0000
  • Ironport-sdr: LYkC9kHOqtEjde9Z+P54sqRLd2v89EHpK5TfnhhRcPxmQauegwcmmuQeV4V3S0csWCLKEMHZby zByWTfpJtKRNvmtUia6ZIDCovgPOfC9ee5QKHISd+d52gFY90Ky/OurtRKXSWIVjAVZEGLjqMF nvGptB3IMUodAsdQQ0xHo98/irKyzK/bymZx87S4jfL30oZwQl1h/ha7rMVnhoRVBopsKrP/xJ Is3+cnYk2FlJ/TrWdg5PSLxfOO3G0S6XjHqm3zeywMyRVbpku1ph66xeauDY613s3++K0nh/nW uag=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Tue, Dec 24, 2019 at 07:17:52PM +0100, Roger Pau Monné wrote:
> On Tue, Dec 24, 2019 at 04:00:27PM +0000, Andrew Cooper wrote:
> > On 24/12/2019 12:42, Roger Pau Monné wrote:
> > > On Tue, Dec 24, 2019 at 12:23:12PM +0000, Andrew Cooper wrote:
> > >> On 24/12/2019 10:18, Roger Pau Monne wrote:
> > >>> On hardware without x2APIC support Xen emulated local APIC will
> > >>> provide such mode, and hence the feature should be set in the maximum
> > >>> HVM cpuid policy.
> > >>>
> > >>> Not exposing it in the maximum policy results in HVM domains not
> > >>> getting such feature exposed unless it's also supported by the
> > >>> underlying hardware.
> > >>>
> > >>> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> > >> x2apic has never been exposed via this mechanism, due to its effects on
> > >> topology calculations.
> > > Well, it's exposed in hvm_max_cpuid_policy if it's present in the
> > > hardware. IMO it's kind of weird that the presence of the x2APIC feature
> > > on the max policy depends on the underlying hardware, when it's always
> > > supported by the emulated vlapic.
> > >
> > > I think x2APIC must either always be part of the max policy, or never,
> > > or else it's very easy to cause regressions because it's not so easy
> > > to find a box without x2APIC.
> > 
> > Hmm - this does highlight the inconsistency in the existing logic.  I'm
> > not overly surprised - this is a remnant of the old model which hasn't
> > been rewritten yet.
> 
> I could do something like:
> 
> diff --git a/tools/libxc/xc_cpuid_x86.c b/tools/libxc/xc_cpuid_x86.c
> index 519d6d8bd0..a7adc41854 100644
> --- a/tools/libxc/xc_cpuid_x86.c
> +++ b/tools/libxc/xc_cpuid_x86.c
> @@ -641,6 +641,7 @@ int xc_cpuid_apply_policy(xc_interface *xch, uint32_t 
> domid,
>          p->extd.itsc = true;
>          p->basic.vmx = true;
>          p->extd.svm = true;
> +        p->basic.x2apic = true;
>      }
>  
>      rc = x86_cpuid_copy_to_buffer(p, leaves, &nr_leaves);
> 
> But it seems kind of bogus to me that such feature is not part of the
> hvm_max_cpuid_policy, at the end of day the toolstack has no knowledge
> of whether the hypervisor provides a x2APIC interface or not (apart
> from us hardcoding it in the tools like the above patch).

Ping?

I don't think we reached a conclusion as to whether x2APIC should be
forced from the toolstack side or part of the HVM max policy.

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.