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

Re: [PATCH 4/9] x86/spec-ctrl: Improve all SPEC_CTRL_{ENTER,EXIT}_* comments


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 18 Sep 2023 12:59:05 +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=jglYSOER0UZuJiCF0yX64wt8kemfXeBIGJxzN9uRoXc=; b=C0mu4WmkSoTQYGgDpSI5iUFLj7jfywFIbNTSbZt6AjMmiKem9qK3zlI3NePUqQjJMwt5y/TR5AngEEWN7AHmPsVvQHWK98F5iIXJ+UADX7GHHfWi5Ff3RkH85Cqf+1l1bhEwwrf2vU193xZ4prx0Vd6rHt0S2bM7zNxbTFYu6i4ptQWy6LH+AFWJmz3ki6sARGn+6U2SFRCVzYKyMwahT8QY3c0BixhLh8+cssBCdhBrZBDRpbyYhHuWPu8D9dEHJB3sBFf57oKtgSN7q3OdFbnJr8kf7gPHl03D13yIX1lTD3rC4WARuB8TC7kLrQ7RZJvnm4W7NjAAE1fYdHkkRA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VxE1gQo52HRpXSHz7xwDasPoymtN0Qsk/6YGVRTneXacFd7yZR287AK5uOcA3pJD/KVEJKhdsIQUxsUxuAMUw0TcTo4Z49AKDyi1DtsGoK0PLXOS+FkneM3SR9RWOC1t0yxwfMF2pl0L1w0bG7sHaodZhm1oiLrkBytjtkMsQG9QBOgy1DvMHuVRLXVt1esGLJqzpsv+FXx4jBdkmqcDu6I0LTssp79R7/BWGovWjYP6RSWhVUMb/E+UWTy+JdBJgss0dQotdly5YfYnW7XOBHHMAB51L00jc8DaTCE0N4KhQ8uIaGeJPNj7WTzJ6kPbXK/LGyZmKBrRfuKJRcExcA==
  • Authentication-results: dkim=none (message not signed) header.d=none;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: Mon, 18 Sep 2023 10:59:20 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 15.09.2023 17:00, Andrew Cooper wrote:
> ... to better explain how they're used.
> 
> Doing so highlights that SPEC_CTRL_EXIT_TO_XEN is missing a VERW flush for the
> corner case when e.g. an NMI hits late in an exit-to-guest path.
> 
> Leave a TODO, which will be addressed in subsequent patches which arrange for
> DO_COND_VERW to be safe within SPEC_CTRL_EXIT_TO_XEN.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

Two nits though:

> @@ -233,7 +236,11 @@
>          X86_FEATURE_SC_MSR_PV
>  .endm
>  
> -/* Use in interrupt/exception context.  May interrupt Xen or PV context. */
> +/*
> + * Used after an exception or maskable interrupt, hitting Xen or PV context.
> + * There will either be a guest speculation context, or (baring fatal

Isn't this "barring"?

> @@ -260,7 +270,13 @@
>  .endm
>  
>  /*
> - * Use in IST interrupt/exception context.  May interrupt Xen or PV context.
> + * Used after an IST entry hitting Xen or PV context.  Special care is 
> needed,
> + * because when hitting Xen context, there may not a well-formed speculation

Missing "be"?

Jan



 


Rackspace

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