[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH for-4.17 v2 2/3] amd/virt_ssbd: set SSBD at vCPU context switch
- To: Roger Pau Monne <roger.pau@xxxxxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Sat, 29 Oct 2022 11:47:24 +0200
- 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=UsxrMTGoYf/ZB43KrphfKm6g7UnDTQ62oWu/iIPZ0mg=; b=S1j8fsg1d5a41E6VX+XDsHqYpb0Q0uStHO72gqTxTqnNWuE9tILJSjZ3fovmuFLSaO0TEmRLQqv7wIBpW++z6FlH9kI1Gah1E8UIlnZoTX4ZjYWvGsdOTeacBMaRR0MLOmw1dN8aYrWCZ1eIisRG5Qlgbe4iURqBS4swef73rh/bEJhwg8XxX6Xg6weQgpfN+bHW2FcZTFwtUz9sReRKxTE28WZD2C5ioIPY9COE9kppK96K89lWWhwQXQ9jF/uXAsKrSX+rDBpS+BzgnENssF1psZmKuoh/EKaSG5hwrPikUJx4gint8m4awocDvccKiRGCXWYChYMQFbGej5MPrw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Kpido4vGMq8XOPqpkjv0Q8vgcN8zO42aB0eg6SJf9ucFZetTNpFdjHeDmon5QjwoYCVlVH0+8a6kyXKKB7uU3PaRpk1Qb40J5pl77WuqoG5Zv7p3U6UZnwSmT0FlrEaxRsoboGrFVpT/XLXhqhOQLACIE/rsvpJkaVZaAaj8Obbpj6XZtHhO12fXB+KKUxdtQ4IXQ2WBh5Lo9+/YYuU7CETZT+l6tNRSKJTS5lrIVLMizP/9hzrmXcrgJWdeNgOdqW0jxUHBnU3eqRr7Rx/10ZP8FEhMTI4+MJHTQj7YdqHlbVU2cZ/F8tRQihECTek3T6snfiVgjGyfE4PWqjGb9Q==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Henry.Wang@xxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Sat, 29 Oct 2022 09:48:01 +0000
- Ironport-data: A9a23:Hb8u4KCN7EgSoRVW//Liw5YqxClBgxIJ4kV8jS/XYbTApG8ghTdVz moXW2GCPKzZZmbyetx0YIuypBwH75DXmNRnQQY4rX1jcSlH+JHPbTi7wuUcHAvJd5GeExg3h yk6QoOdRCzhZiaE/n9BCpC48T8nk/nNHuCnYAL9EngZbRd+Tys8gg5Ulec8g4p56fC0GArIs t7pyyHlEAbNNwVcbyRFtspvlDs15K6o4WtC7wRnDRx2lAS2e0c9Xcp3yZ6ZdxMUcqEMdsamS uDKyq2O/2+x13/B3fv8z94X2mVTKlLjFVDmZkh+AsBOsTAbzsAG6Y4pNeJ0VKtio27hc+ada jl6ncfYpQ8BZsUgkQmGOvVSO3kW0aZuoNcrLZUj2CA6IoKvn3bEmp1T4E8K0YIw6sdIWEB03 9MiLzUNPkGMuqG136m5Y7w57igjBJGD0II3nFhFlGicJtF/BJfJTuPN+MNS2yo2ioZWB/HCa sEFaD1pKhPdfxlIPVRRA5U79AuqriCnL3sE9xTI++xuvDa7IA9ZidABNPLPfdOHX4NNl1uwr WPa5WXpRBodMbRzzBLVqSny1raXwEsXXqoDG4az/eE3o2TDy04dOE0TCgOqmdym3xvWt9V3b hZ8FjAVhbg/8gmnQ8fwWzW8oWWYpVgMVtxICeo45QqRjK3O7G6xJmUCVC8HV9Ugu+c/Xzls3 ViM9/vrDzFytLyeSVqG66yZ6zi1PEA9L3IGZCICZRsI5Z/kuo5bpgnUUt9pHaqxj9v0MTL92 TaHqG45nbp7pdEP/7W2+xbAmT3Em3TSZgs85wGSVWX86Ap8Pdehf9bxtgad6utcJoGESFXHp GIDh8WV8OEJC9eKiTCJR+IOWrqu4p5pLQHhvLKmJLF5nxzFxpJpVdk4DO1WTKuxDvs5RA==
- Ironport-hdrordr: A9a23:0iJwnKCJDYcbE6nlHehJsceALOsnbusQ8zAXPh9KJCC9I/bzqy nxpp8mPH/P5wr5lktQ/OxoHJPwOU80lKQFmLX5WI3PYOCIgguVxe1ZnOjfKnjbalbDH41mpN tdmspFebrN5DFB5K6VgTVQUexQpuVvmJrY+Ns2pE0dKT2CBZsQjTuQXW2gYzdLrUR9dO0EPa vZwvACiyureHwRYMj+Ln4ZX9Lbr9mOsJ79exYJCzMu9QHL1FqTmffHOind+i1bfyJEwL8k/2 SAuwvl5p+7u/X+7hPHzWfc47lfhdOk4NpeA86njNQTN1zX+3CVTbUkf4fHkCE+oemp5lpvuN 7Qoy04N8A20H/VdnHdm2qe5yDQlBIVr1Pyw16RhnXu5ebjQighNsZHjYVFNjPE9ksJprhHoe 929lPck6ASIQLLnSz76dSNfQptjFCIrX0rlvNWp2BDULEZdKRaoeUkjQlo+a87bW3HAb0cYa dT5Jm23ocWTbraVQGTgoBX+q3hYpxpdS32AnTruaSuoktrdT5CvgglLfck7wY9HaIGOuZ5Dt v/Q9pVfZF1P7orhPFGdZM8aPryLFDxajTxF0/XCWjbNcg8SgLwQtjMkf0I2N0=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Fri, Oct 28, 2022 at 01:49:12PM +0200, Roger Pau Monne wrote:
> diff --git a/xen/arch/x86/msr.c b/xen/arch/x86/msr.c
> index 95416995a5..a4c28879bc 100644
> --- a/xen/arch/x86/msr.c
> +++ b/xen/arch/x86/msr.c
> @@ -697,7 +697,14 @@ int guest_wrmsr(struct vcpu *v, uint32_t msr, uint64_t
> val)
> msrs->spec_ctrl.raw &= ~SPEC_CTRL_SSBD;
> }
> else
> + {
> msrs->virt_spec_ctrl.raw = val & SPEC_CTRL_SSBD;
> + /*
> + * Propagate the value to hardware, as it won't be context
> switched
> + * on vmentry.
> + */
> + goto set_reg;
Doing this when v != curr is wrong, will send an updated patch.
Roger.
|