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

Re: [PATCH] x86/svm: Intercept and terminate RDPRU with #UD

  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 9 Sep 2021 11:57:50 +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; bh=A86rnhXZOE1JDW4J3/2PB7wdjmEoc211vRmY04sxYjc=; b=NVV2na+bWcRJRmjkvgyi9jqTzbjfd73HII6tbJXF3zmrziHCqcV3ENVCAGJ31aXwKQIHqbOGngHRY5woyDAJrec6NKeHmh4xrkSoxmvI+/H1YwL7u5Usgr1s0FnfMaqxixOhJUdgdm/5znMkQk+6lwn3xB0ZIYfegwmzIQ4EzY6IgTZjlRNFYfxcfE9mV39kDCINZ8OAUXF07IOyUiuf1V4caW+ibxNg2QL8IQeGafzVtDyB99oJngTliWAClxxJpjW4nPb+asHLOMBuQCoUe2QRWpH37EruZFA/4VkDMR6aeIeLHr0DnvZm4zxfHXQzaQfq3C9bWv9mNzXBO1nSWg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f9vzmnOWx4dfdCVunZ2TH7Ts+ORsAs533phdQ8czWF/gVnnbCEIAP6JN1X83G9OwpSRu3ERQOfvyn5K0scYZbYQAHACyj8ybrOR1fo43d3Is98iGsQrm/IA0LpK4iOLX9MnKNa6+7pIWUagUcXGW0P9rxYKUnTxrOc46DMfq5PoexiS9vcJ+GpeO60eOs6/AdTtbRfo3fMobFYWfhPpe2REObkSB4QRwH5gt1J/isPK4TCRrywaSWjqli8PHGliJTcsR/QS6og0dvnwhzvYjwi8ZTcL4MUrcSuw75MRUs7rXEArHeZni8hkotAfFI5+l/L/u6Rg+hFILlSLl5RJFsg==
  • Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 09 Sep 2021 09:58:04 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 08.09.2021 18:19, Andrew Cooper wrote:
> The RDPRU instruction isn't supported at all (and it is unclear how this can
> ever be offered safely to guests).

An implicit hint to me to consider "x86emul: support RDPRU" rejected? That's
still in my queue waiting for ...

>  However, a guest which ignores CPUID and
> blindly executes RDPRU will find that it functions.
> Use the intercept and terminate with #UD.  While at it, fold SKINIT into the
> same "unconditionally disabled" path.
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> ---
> CC: Jan Beulich <JBeulich@xxxxxxxx>
> CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> CC: Wei Liu <wl@xxxxxxx>
> I could have sworn that I'd posted this before, but I can't locate any
> evidence of it.  I've got a separate patch adding the CPUID infrastructure for
> rdpru, but that is better left until we've got more libx86 levelling logic in
> place.

... this. Which - if exposure to guests makes no sense - would seem pretty
pointless then as well?

> --- a/xen/arch/x86/hvm/svm/vmcb.c
> +++ b/xen/arch/x86/hvm/svm/vmcb.c
> @@ -70,7 +70,8 @@ static int construct_vmcb(struct vcpu *v)

Some of the other intercepts here suggest it is okay to enable ones
in the absence of support in the underlying hardware, but I thought
I'd double check. I couldn't find any statement either way in the PM.
Assuming this is fine
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>




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