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

Re: [PATCH 2/6] x86/vpmu: Expose PEBS and DS area in PV mode


  • To: "Jan Beulich" <jbeulich@xxxxxxxx>
  • From: "Teddy Astie" <teddy.astie@xxxxxxxxxx>
  • Date: Wed, 25 Mar 2026 10:16:28 +0000
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=mte1 header.d=mandrillapp.com header.i="@mandrillapp.com" header.h="From:Subject:Message-Id:To:Cc:References:In-Reply-To:Feedback-ID:Date:MIME-Version:Content-Type:Content-Transfer-Encoding"; dkim=pass header.s=mte1 header.d=vates.tech header.i="teddy.astie@xxxxxxxxxx" header.h="From:Subject:Message-Id:To:Cc:References:In-Reply-To:Feedback-ID:Date:MIME-Version:Content-Type:Content-Transfer-Encoding"
  • Cc: "Andrew Cooper" <andrew.cooper3@xxxxxxxxxx>, "Roger Pau Monné" <roger.pau@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 25 Mar 2026 10:16:33 +0000
  • Feedback-id: 30504962:30504962.20260325:md
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Le 24/03/2026 à 10:14, Jan Beulich a écrit :
> On 10.03.2026 17:44, Teddy Astie wrote:
>> I don't see any reason for them for not be available, especially
>> since core2_vpmu_do_wrmsr has PV specific logic for MSR_IA32_DS_AREA.
>
> This is really dangerous: You allow PV domains to control whether the area
> is actually mapped. It lacking a mapping can, iirc, on at least some CPUs
> result in a complete hang. I do, in fact, have been carrying a patch to
> completely disallow DS area use for PV, eliminating the misleading code
> you refer to.
>

While PV case is particularly quirky (especially with L1TF), the issues
still exists for HVM.
I suppose things may be a bit better with "EPT-Friendly PEBS" though.

Regardless, we already say that the feature is potentially unsafe to
use, and it still needs to be opted-in, so this patch just allows the
guest to use something we advertise (with its eventual quirks).

> Also note that VPMU_CPU_HAS_DS cannot be set for PV vCPU-s anyway.
>

Why is that ?

`vpmu_set(vpmu, VPMU_CPU_HAS_DS);` made in core2_vpmu_initialise is
called in either PV and HVM cases.

>> Fixes: 27c554198666 ("x86/VPMU: add support for PMU register handling on PV 
>> guests")
>
> Not just because of the above, I'm pretty sure a Fixes: tag is inappropriate
> here.
>
> Jan
>

Teddy


--
Teddy Astie | Vates XCP-ng Developer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech





 


Rackspace

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