[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH for-4.17 v2 0/3] amd/virt_ssbd: refactoring and fixes
- To: xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
- Date: Fri, 28 Oct 2022 13:49:10 +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=zKECUDVl1zscucUPv/GjI0191rht6maSxmk0rYH8+MM=; b=h63r+u2tmoD0E2ZY1Nsz6PM+AXc925MFJEGRaM1TQBHMymj7nZJxPFPEqMcKWgMELcnCh7ifdgV3616OqhCGqtDb68WDO05QUwyf8gLbjKUS6LOqnnUvGi5fHSd28qFNS5/lvxAAv30sNfWF+t1MSOj2Os/3RMaZn0Vx6K76bhLER4iA7zBc0i1MZXAwte1qdIiWe1N1R3yzb1qjj1i6Mbh3fZqnHrfC+N9DBh5Z8jGKmohRwRWWhUZQ6pOaMibOyOrwoGsRgqKkigI2wSasKeBwKZ2noimc3WGnyl4GMfYSgTHIE7JqPOinfCzmaN+LlkNPMGJwaLJ8LBULMgFxsw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=E9AJazwRmBH+JyCTTPqbO57tQiiQdRz3EE0omOorqQBWGDJPZn4jkIJMFEbMKb8rH6LtbxmAKzZkzlYwa9Bpt/LlIC5nGR1+gS9cET2Lf9iXExACwHcR6SaLifyaVSkiGh2Dy0x4nN/vTY9F6/R92vAus1qllxjD1qZCnBoDyaxNBfTT4Q4VoDAQfK5H21KLL5OFSHwnuaeJ9agfJ1RdTdtgUJVzBYof9XwZjydV4KB42Qdjl/J7Ab5ESl/rfPWeYRv0sb5sGX0ioaKRRzNgzVfNfq4LIjGyptG5tkpHza92d/9zmoSpBKRFiuhDP99+et8oi6ewpUpHuA03syCivQ==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Henry.Wang@xxxxxxx, Roger Pau Monne <roger.pau@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
- Delivery-date: Fri, 28 Oct 2022 11:49:40 +0000
- Ironport-data: A9a23:jVzIQqmFAX9XoxxK95gvEkbo5gxaJ0RdPkR7XQ2eYbSJt1+Wr1Gzt xJNDz+DbKzfZGf9Kd13PY2/8E9X75fdnNdgS1ZkrnxjQiMWpZLJC+rCIxarNUt+DCFhoGFPt JxCN4aafKjYaleG+39B55C49SEUOZmgH+a6U6icf3grHmeIcQ954Tp7gek1n4V0ttawBgKJq LvartbWfVSowFaYCEpNg064gE4p7amaVA8w5ARkP6kT5g+GzRH5MbpETU2PByqgKmVrNrbSq 9brlNmR4m7f9hExPdKp+p6TnpoiG+O60aCm0xK6aoD66vRwjnVaPpUTbZLwXXx/mTSR9+2d/ f0W3XCGpaXFCYWX8AgVe0Ew/yiTpsSq8pefSZS0mZT7I0Er7xIAahihZa07FdRwxwp5PY1B3 b81Di8iKU65vtqnh6P4cNlSl80xNta+aevzulk4pd3YJdAPZMmaBo/stZpf1jp2gd1SF/HDY cZfcSBocBnLfxxIPBEQFY46m+CrwHL4dlW0qnrM/fZxvzeVkVw3iea9WDbWUoXiqcF9hEGXq 3iA523kKhobKMae2XyO9XfEaurnzX+iAtNPTeDQGvhC3V+CljVILAEvcHiqud6XhmGHBdxHN BlBksYphe1onKCxdfHtUhv9rHOasxo0X9tLD/Z8+AyL0rDT4QuSGi4DVDEpQPwrstUnAwMj0 FChlsnsQzdotdW9S3iQ67OVpjOaIjUOICkJYipsZRQBy8nupsc0lB2nZtR+FK+4iPXlFDe2x CqFxAAlnKkah8MP06S9/HjEjiiqq5yPSRQ6jjg7RUqg5wJ9IYSjN4qh7AGC6e4addjJCF6co HIDhs6SqvgUCo2AnzCMR+NLG6y14/GCM3vXhlsH84QdyglBMkWLJeh4iAyS7m8wWirYUVcFu HPuhD4=
- Ironport-hdrordr: A9a23:cN7rZKhDu9/FEX+vqZtH4arzFHBQXzV13DAbv31ZSRFFG/FwyP rCoB1L73XJYWgqM03I+eruBEBPewK/yXcT2/hoAV7CZniehILMFu1fBOTZslnd8kHFltK1tp 0QDpSWdueAamSS5PySiGfYLz9J+qj8zEnCv5a6854Cd3AIV0k2hD0JcTpzX3cGMDVuNN4cLt 6x98BHrz2vdTA+adm6PGAMW6zmq8fQnJzrTBYaD1p/gTP++w+A2frfKVy1zx0eWzRAzfML9n XEqRXw4uGGv+ugwhHR+mfP59B9mcfnyPFEGMuQ4/JlXQnEu0KNXsBMSreCtDc6rKWG70srqs DFp1MaM8F6+xrqDxKIiCqo/zOl/Ccl6nfkx1Pdq2Dku9bFSDUzDNcErZ5FczPCgnBQ9u1U4e Zu5Sa0ppBXBRTPkGDW/N7TTSxnkUKyvD4LjfMTtXpCSoETAYUh5rD3xHklXKvoIRiKp7zOSI JVfY/hDbdtABunhknizyRSKIfGZAVzIv+EKnJyyvB9nQIm3EyR9HFouvD3rk1wiK7VdKM0mN gsSp4Y8o2mbvVmH56VV91xNPefOyjqfS/mFl60DBDOKJwnUki92qIfpo9Frd2XRA==
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Hello,
The following series aims to remove running C code with GIF=0 on the AMD
vm{entry,exit} paths. As a result, the context switching of SSBD is
done when context switching vCPUs, and hence Xen code is run with the
guest selection of SSBD.
First patch is a bugfix for missing VIRT_SPEC_CTRL MSR loading, while
second takes care of removing the loading of VIRT_SPEC_CTRL on
guest/hypervisor context switch. Last patch is a cleanup, that's
already reviewed.
I tested on Naples and Milan CPUs (and migrating from Naples to Milan
correctly carrying the VIRT_SSBD bit), but I haven't tested on a
platform that exposes VIRT_SSBD itself. I think the path is
sufficiently similar to the legacy one.
Currently running a gitlab CI loop in order to check everything is OK.
Roger Pau Monne (3):
hvm/msr: load VIRT_SPEC_CTRL
amd/virt_ssbd: set SSBD at vCPU context switch
amd: remove VIRT_SC_MSR_HVM synthetic feature
docs/misc/xen-command-line.pandoc | 10 +++--
xen/arch/x86/cpu/amd.c | 56 ++++++++++++++------------
xen/arch/x86/cpuid.c | 9 +++--
xen/arch/x86/hvm/hvm.c | 1 +
xen/arch/x86/hvm/svm/entry.S | 6 ---
xen/arch/x86/hvm/svm/svm.c | 49 ++++++++++------------
xen/arch/x86/include/asm/amd.h | 3 +-
xen/arch/x86/include/asm/cpufeatures.h | 2 +-
xen/arch/x86/msr.c | 7 ++++
xen/arch/x86/spec_ctrl.c | 8 ++--
10 files changed, 78 insertions(+), 73 deletions(-)
--
2.37.3
|