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

Re: [PATCH v2 1/3] amd/msr: implement VIRT_SPEC_CTRL for HVM guests on top of SPEC_CTRL


  • To: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 28 Mar 2022 15:40:13 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=J3/ZpJ/iDKVM8tHOMiCL0WIxTRWCqDLtBHzE+281zFU=; b=gXBDv3wEoKxnCXMOKN/YWhHVGZgGnMB7/B0/w6w+kfXiXCOfmPI3iaYKz3jp1oMYEgTvI55kDAwHGB4lsRuvkFiYxRIsuR/nN40PKKNOyPVpVnyp4VBKcKCasRcPLb3HtsEgQyqzo7YZeI5ekc9fFmXIPGIrqdM3VaRiI0QQ4U7iqBfbexQ6dpk+JkRY07JHlCHsyZMs5Fj1ohAPwyOWBwEXtB1VErGZ4pvQl8RNWjf1P7n/bu21oX7sAfjYa9hFNpXRheHaOaSmhkXBUxtkXGj3ead9FsBZ+xSt38DfxOD/dVrHzDyEgYkjo7CPSiRK/j96g+HAjKRTJWYMlGIOYQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NQNiUZ9xEnf0Wb8za0BqnlVFHcrw9TsCx8XUwfO8WTlQRQX+rVKI+LgFryLERV5b+7u8jvtQRnX5MG3B7Sxwx+7DuLntctwAPx0B+lBBb3Ntt2esMx5yZTTobuh8JJXfj5BEnb0nZ3lf/1eDBo0tlK7BjDr1aecP7AtKV5E9ACeZK8Wo4Gxx2CzJuiWVgHgJlIO7QCynu8CMefGkBrmcSrDpA/7YBu0O09Wz/ttQnUpR5deL0XNKi5ZpSoerdbibb3PzFBSIlXZ35BUSqK6Yl7NG0yJlKvkelsAVyfryj+yJlJVTsrxXZ7hCakns1nvk70Mfz0Gcco+2wRd4HuRUTg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 28 Mar 2022 13:40:17 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 15.03.2022 15:18, Roger Pau Monne wrote:
> Use the logic to set shadow SPEC_CTRL values in order to implement
> support for VIRT_SPEC_CTRL (signaled by VIRT_SSBD CPUID flag) for HVM
> guests. This includes using the spec_ctrl vCPU MSR variable to store
> the guest set value of VIRT_SPEC_CTRL.SSBD, which will be OR'ed with
> any SPEC_CTRL values being set by the guest.
> 
> On hardware having SPEC_CTRL VIRT_SPEC_CTRL will not be offered by
> default to guests. VIRT_SPEC_CTRL will only be part of the max CPUID
> policy so it can be enabled for compatibility purposes.
> 
> Note that '!' is used in order to tag the VIRT_SSBD feature as
> specially handled. It's possible for the feature to be available to
> guests on hardware that doesn't support it natively, for example when
> implemented as done by this patch on top of SPEC_CTRL.SSBD (AMD_SSBD).

Except for this ! aspect the change looks good to me, but in order to
give my R-b this aspect needs sorting. Andrew - what are your thoughts
here? The reason cited by Roger doesn't look to be one that I so far
understood would require use of !, but your intentions may well have
been different from what my current understanding is.

Jan




 


Rackspace

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