[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: Tue, 24 Dec 2019 13:42:58 +0100
  • Authentication-results: esa2.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, Wei Liu <wl@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
  • Delivery-date: Tue, 24 Dec 2019 12:43:37 +0000
  • Ironport-sdr: uoAjy4xBufJBgIfcSyN+rBVHElZFA3EDb90wq4DUITYJznbUNcyhMaDlLdThsV5QkoGpN9NFBF FjtoSmxi8/AIzTsmwV+wcwLio+HIHhxSMKbDHKMyAceyMgWq6+n9UDToSzHF2lSEmNTIApuSzl nNjJLGmqAVo7M+Jky6D1/in8SGp+ukPEU6+rD6rrgDiUlHwBZsvtOOsg/uBAlihqgRc4mzfFUP LxomRiues1Rt52X55l1fDec8xU4Kh18oGK9zUinZ4xgDwJ7aBJVE5Gm2aJlllfjl8FALgbfy2D xeA=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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.

> It has however always been down to the toolstack to opt in, and Xen
> permits this via recalculate_cpuid_policy(), on the expectation that the
> toolstack knew what it was doing WRT topology (all evidence actually to
> the contrary).

Hm, I can try to force the setting in libxc.

> If we're seeing a recent change in behaviour, then it will be from libxc.

IIRC x2APIC was always exposed to HVM guests regardless of the
underlying hardware support.

Thanks, Roger.

Xen-devel mailing list



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