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

Re: [PATCH 6/6] x86/boot: Expose MSR_ARCH_CAPS data in guest max policies


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Mon, 22 May 2023 15:02:03 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=NMkvZl1QB6H1Mk8oacbZNLa9GQY57EkbQ9CLZAexc3M=; b=Omr0IMetnoDlz068Nt66eOocEjBDKYHv0eQwL7rHCMFpQcHdF9eTZOQ4Tdo9uO6nAR5iGPXG8838s7QjIFvHT5DXhiFGxUn5dGraYT51xjUlMMpNGlDITJUoztsnfTSi/5tPHZavESW2eIvRHFGnoM3ozkLZJR3ywzzuoWOXpxpSDQlLrnJL4Zn2eX33FR0EkztC7aabCuEhjNd3mGWlXQYlYzL48IKyyO7p0YMuihyVnPr8PCl8RrCDkMRKNiCJkB933jxd6U+n/2fyR8mbxb4om1nnQBxm1XgAssG/+BwZKUJNSIlrxvdPHINeYEJCHUjJ48WWI4BK+uyJh7yWCw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jwiqFEZlweyk4wTZloS39R8PnptRKPdxmVgrlcu1WCDNwQY8tB8fz8lDfFUPghtTerYU1JfEEJ3k2ucmkKdKErlCkWhOOfSl5pfrBX6gl7uvRxaHKJlHKKW5uvCbipS3ourn5NQYuj7cS6Bfyf0V2UMvH6DSakonSZYajMyJKDPcih0vm3anFCIss2KKLAxOYvrKHVnYG760d1NGYegh3n2OpK892Kyzqo0Byx+ylaIP3suH8BmKkz0WylV5XIWpqSPyH4ZF039X2NeNIYcZNy0Gdzf18HH4tfPhCqU9Sj6vRXYBpJlaWV8DDBCBk8t/dAbLNWKnPE597pOyLsJbSw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 22 May 2023 14:02:44 +0000
  • Ironport-data: A9a23:Rr2WtarQULXBPhn+XmjYCKm7V01eBmI1ZBIvgKrLsJaIsI4StFCzt garIBnUPfiNZ2f8KYwiYYm08k1XupOGnNFhSlY5+HtmEi8S9puZCYyVIHmrMnLJJKUvbq7FA +Y2MYCccZ9uHhcwgj/3b9ANeFEljfngqoLUUbKCYWYpA1c/Ek/NsDo788YhmIlknNOlNA2Ev NL2sqX3NUSsnjV5KQr40YrawP9UlKq04GtwUmAWP6gR5weDzSNNVfrzGInqR5fGatgMdgKFb 76rIIGRpgvx4xorA9W5pbf3GmVirmn6ZFXmZtJ+AsBOszAazsAA+v9T2Mk0MC+7vw6hjdFpo OihgLTrIesf0g8gr8xGO/VQO3kW0aSrY9YrK1Dn2SCY5xWun3cBX5yCpaz5VGEV0r8fPI1Ay RAXADwnZE3Z19O6+qyARqort5Q7HcnJLYxK7xmMzRmBZRonabbqZvyToPV+jHI3jM0IGuvCb c0EbzYpdA7HfxBEJlYQDtQ5gfusgX78NTZfrTp5p4JuuzSVkFM3jeiraYSFEjCJbZw9ckKwj 2TK5WnmRDodM8SS02Gt+XOwnO7f2yj8Xer+EZXhrq400QXCnTF75Bs+ZHK9/+WQ0W+HW5FxD 3Ampggr/KIR3Rn+JjX6d1jiyJKehTYeUddNF+wx6CmW17HZpQ2eAwAsUTppeNEg8sgsSlQCx lKP2t/kGzFrmLmUUm6GsKeZqyuoPioYJnNEYjULJTbp+PHmqYA3yxjJHtBqFffsisWvQG+gh TeXsCI5mrMfy9YR0Lm29kzGhDTqoYXVSgky5UPcWWfNAh5FWbNJrreAsTDzhcus5q7CJrVdl BDoQ/Sj0d0=
  • Ironport-hdrordr: A9a23:zZFGZKlTAtUQRKPKE7OWjSBLOkLpDfK03DAbv31ZSRFFG/Fwz/ re+cjzpiWE7Ar5OUtQ6exoV5PgfZqxz/RICMwqTNWftWrdyRiVxeNZjbcKqgeIc0bDH6xmpM RdmsNFZOEYeGIVsS+M2maF+rgbreVvu5rY4ts2h00dKz2CRZsQljuQUGugYzVLrCoqP+tDKH Ldi/A32gZJNxksH7iG7jduZZmzmzV4+aiWGyIuFlo77AGVgXey5KTnFgXw5GZgbxpfhaon+X LI1xP0/b+itfbT8G6j61Pu
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 22/05/2023 8:31 am, Jan Beulich wrote:
> On 19.05.2023 17:52, Andrew Cooper wrote:
>> On 17/05/2023 10:20 am, Jan Beulich wrote:
>>> On 16.05.2023 21:31, Andrew Cooper wrote:
>>>> On 16/05/2023 3:53 pm, Jan Beulich wrote:
>>>>> I guess that's no
>>>>> different from other max-only features with dependents, but I wonder
>>>>> whether that's good behavior.
>>>> It's not really something you get a choice over.
>>>>
>>>> Default is always less than max, so however you choose to express these
>>>> concepts, when you're opting-in you're always having to put information
>>>> back in which was previously stripped out.
>>> But my point is towards the amount of data you need to specify manually.
>>> I would find it quite helpful if default-on sub-features became available
>>> automatically once the top-level feature was turned on. I guess so far
>>> we don't have many such cases, but here you add a whole bunch.
>> I'm not suggesting specifying it manually.  That would be a dumb UX move.
>>
>> But you absolutely cannot have "user turns on EIBRS" meaning "turn on
>> ARCH_CAPS too", because a) that requires creating the reverse feature
>> map which is massively larger than the forward feature map, and b) it
>> creates a vulnerability in the guest, and c) it's ambiguous - e.g. what
>> does turning on a sub-mode of AVX-512 mean for sibling sub-modes?
> Feels like a misunderstanding at this point, because what you're describing
> above is not what I was referring to. Instead I was specifically referring
> to "cpuid=...,arch-caps" not having any effect beyond the turning on of the
> MSR itself (with all-zero content). This is even worse with libxl not even
> having a way right now to express something like "arch-caps=..." to enable
> some of the sub-features for guests.

We discussed this on the x86 call.  In summary:

Right now, arch-caps is off-by-default because it doesn't work safely or
nicely.  I'm working on safely first, and nicely will come second.

The end result of my work is going to have arch-caps active by default
and supported.  End users aren't going to in a position of needing to
specify cpuid="...,arch-caps" in their config files.

Fixing libxl's ability to specify the contents is something needing to
be done before we can say arch-caps is fully supported, because right
now it's the only way users of xl/libxl have for levelling a VM for migrate.

> To explicitly answer the AVX512 part of your reply: Turning on a sub-mode
> alone could be useful as well (with the effect of also turning on the
> main feature, and with or without [policy question] also turning on other
> default-on subfeatures of AVX512). But again - that direction of possible
> "implications" isn't what my earlier reply was about. As you say, reverse
> maps would then also be needed, whereas for what I'm suggesting only the
> deep-deps we already have are necessary: We'd grab the main feature's
> dependencies and AND that with the default mask before ORing into the
> domain's policy.

Having discussed this, I agree and specifically have an idea for how to
use it for AVX512.  But it is also going to take a fair amount of
rearranging in libxl/libxc to make work.

I.e., yes, but not immediately right now.

~Andrew



 


Rackspace

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