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

Re: [PATCH 2/3] x86/spec-ctrl: Drop SPEC_CTRL_{ENTRY_FROM,EXIT_TO}_HVM


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 17 Jan 2022 12:22:41 +0100
  • 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=SQ7ESBHdjDXa59A0M0501jtwdXB0Smdsc0zNZ+4Ggy8=; b=NMiTr43WpTfBDqrktoeM1EHrWAhwICNgobjLCZhEjWPMU9r/xDurS3Q9p6L2OWXHKn7ZJLuwoR1d0UTH/y6wxVJfgb9J9NIkL3BL7l0OPomRnBYZ/fMA/wce5yEsoBM2/Kv7EczN/4TTbC6S4h6zXTJ4M548QUZJ5ZrsHEOVqtkwO9W+0GvJVvpHiQsl5GNRgtLHeMa1lF33WtcQsqXtuJNYn2YFBxQ5B3oQQFt5tWrIv3k83Aohxrb3cvfVzOyqa1F1THNpHSC7vp43TObp5utghVzzB6Y5wUCLllAK5UfGIC16ZJUC3Q55pQGxJYa/5JPFyrNgdXxZPbwwaTGnGA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XagqIlPjubytHun8e/EjHBx8Vun0EGqy7D7Fa8zBce+8mEKgUVtKX//WmjLml3EoxFj3pJMQuaYNGLq3dKtfTewGlHmCfJOibG/xzCMgPkBWJCkivlMBu0JW6Z1HfgId0Rl0aW5RvNzL3vjbpgorOqC28wlH6uSOUrfDGmNrdcm3djw6FfSaMMAfa6MVcysvLXBKaBuCKUaI/UnHL0XFkZeGlTfC+VIvaXusaxbMWA2H7RL9rxQG1fCHJAa0g4YRFqYWyTvOQDlGhxOBkflq5VPLioyxDxOAGMBPoym0uQmmaBK9DkCBXZi7MJA/bGHMyJS8HzeIhf+Dz5/5dntV9g==
  • 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>, Jun Nakajima <jun.nakajima@xxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 17 Jan 2022 11:23:03 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 13.01.2022 17:38, Andrew Cooper wrote:
> --- a/xen/arch/x86/hvm/svm/entry.S
> +++ b/xen/arch/x86/hvm/svm/entry.S
> @@ -59,7 +59,7 @@ __UNLIKELY_END(nsvm_hap)
>          mov VCPUMSR_spec_ctrl_raw(%rax), %eax
>  
>          /* WARNING! `ret`, `call *`, `jmp *` not safe beyond this point. */
> -        SPEC_CTRL_EXIT_TO_HVM   /* Req: a=spec_ctrl %rsp=regs/cpuinfo, Clob: 
> cd */
> +        /* SPEC_CTRL_EXIT_TO_SVM   (nothing currently) */
>  
>          pop  %r15
>          pop  %r14
> @@ -86,7 +86,8 @@ __UNLIKELY_END(nsvm_hap)
>  
>          GET_CURRENT(bx)
>  
> -        SPEC_CTRL_ENTRY_FROM_HVM    /* Req: b=curr %rsp=regs/cpuinfo, Clob: 
> acd */
> +        /* SPEC_CTRL_ENTRY_FROM_SVM    Req: b=curr %rsp=regs/cpuinfo, Clob: 
> ac  */
> +        ALTERNATIVE "", DO_OVERWRITE_RSB, X86_FEATURE_SC_RSB_HVM

Just for my own understanding: The comments you add aren't commented
out macro invocations (as I did read it first), but comments naming
would-be-macros which are then expanded "manually"? That is partly
because initially I read the description saying "Expand and drop the
macros" as meaning that the macros grow in what they contain, which
looked contradictory to them getting dropped at the same time.
Perhaps me not sufficiently understanding the difference between all
possible meanings of "expand" vs "extend" ...

Jan




 


Rackspace

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