[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH for-4.17 0/4] amd/virt_ssbd: refactoring and cleanup
- To: xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
- Date: Tue, 11 Oct 2022 18:02:41 +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=5IqmkX7BY352iyEmyV2PPJJVDTi/prr1MFNe89Y2774=; b=fyu/6EunJlRqX2jr8Ns4PPt58AtsjPiAsb98g1BURbyUXPqsD6XsPnsg7STUz3T2VKKrx/P5MJZq78Do5B3DYFF5uRmz1xJuSB4bnRk9/l/vUrfkJmqtNQJNAHACroVQFmrhyXX886ycEkE33AsQ0bm5a/sxEKzraZYWW9EcTwMevCjUEMrzgQEOmYu0wTaIXq6gLabgm9LTH4R/SGiH+jPhJYU9FQlOCqWV1cd1Sv4t/ZCHhz92felD4SAay/zZhuhzNa0JOCZyEEFJysbcA2QHqOjRCVYEuToz6j9Z8s/dU0QC1QYmgmgQoF90O0Dx/mMabtM6z5jry5NB9j5y5g==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eqB1WussvAi6ULayzvbRO8KGcJcT1LX4QiSrYw/yQFn9U0R11JYQ7mnejfu4iWnHuQfBFwnrml+ZPvVhKNnvIN5IMTvrbA08omIiCgH0phHVulsKDRL61OshagTWXtB+7LAAVXKzhf3S1tGSUIjOCQnTm+s5K85BkxND6UdJC8eEzFRFoDMwRDUf4u/7grSX0Lspm0SeidgRmnHkyj26rKUwPoX3gkxy5mk/jjPn36p1yJQQG/jtatl122WZ3MMD3N+oBqdWFf/H0i9mjTEhKfnawC/0sc551pqZ5BpAwfZrWbRQLu41KXGlR0GUrGKU8J2g2LySrbx2BLHx6gzy2g==
- 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: Tue, 11 Oct 2022 16:04:30 +0000
- Ironport-data: A9a23:eR+x7qrVdlOvqYZZ9Np1c5uGDD9eBmLEZBIvgKrLsJaIsI4StFCzt garIBmBaKqPajTxLtl1b9m28xgF75LXn9diSQo+pC1nFisX+ZuZCYyVIHmrMnLJJKUvbq7FA +Y2MYCccZ9uHhcwgj/3b9ANeFEljfngqoLUUbKCYGYpLeNdYH9JoQp5nOIkiZJfj9G8Agec0 fv/uMSaM1K+s9JOGjt8B5mr9VU+4ZwehBtC5gZkPKgS5QeE/5UoJMl3yZ+ZfiOQrrZ8RoZWd 86bpJml82XQ+QsaC9/Nut4XpWVTH9Y+lSDX4pZnc/DKbipq/0Te4Y5iXBYoUm9Fii3hojxE4 I4lWapc6+seFvakdOw1C3G0GszlVEFM0OevzXOX6aR/w6BaGpdFLjoH4EweZOUlFuhL7W5m7 MY4D2gxbRa6i6GxwuiSaMxjuOAcBZy+VG8fkikIITDxK98DGMqGZpqQoNhS0XE3m9xEGuvYa 4wBcz1zYR/cYhpJfFAKFJY5m+TujX76G9FagAvN+exrvC6Nkkotj9ABM/KMEjCObd9SkUuC4 HrP4kzyAw0ANczZwj2Amp6prr+VwXynA9pKfFG+3vlnhU28m0MYMwIbf0Ch/KKogHOYXOsKf iT4/QJr98De7neDXtT7GhG1vnOAlhodQMZLVf037hmXzajZ6BrfAXILJhZhZdo8pYkJTDol/ laTmpXiAjkHmL+fRG+Z97yUhSivIiVTJmgHDQcbSSMV7t+lp5s85jrNU9JiHaidntDzXzbqz FiitzMijr8eicoK0aST/l3dhT+o4J/TQWYICh7/W2uk6kZ8e9Sjbonxs1zDt64cc8CeU0WLu 2UCl46G9ucSAJqRlSuLBuIQALWu4PXDOzrZ6bJyI6QcG/2W0ybLVehtDPtWfi+F7u5slefVX XLu
- Ironport-hdrordr: A9a23:5152Nq5pvUj5sZmCJwPXwSeBI+orL9Y04lQ7vn2ZFiY5TiXIra qTdaogviMc6Ax/ZJjvo6HjBEDmewKlyXcV2/hpAV7GZmXbUQSTXeVfBOfZowEIeBeOi9K1q5 0QFJSWYeeYZTYasS+T2njDLz9K+qjjzEnHv5a88587JjsaEJ2Ioj0JfjqzIwlTfk1rFJA5HJ 2T6o5uoCehQ20eaoCeCmMeV+bOitXXnNa+CCR2cSIP2U2rt3eF+bT6Gx+X0lM3VC5O+64r9S zgnxbi7quunvmnwlv31nPV7b5RhNz9o+Ezc/Cku4wwEHHBmwyobINuV/mruy00mvim7BIQnN zFs34bTrdOwkKUWlvwjQrm2gHm3jprwWTl00WkjXzqptG8bC4mCuJa7LgpOCfx2g4FhpVRwa hL12WWu958FhXbhhnw4NDOSlVDile0m3w/iuQe5kYvGrf2UIUh4bD3wXklX6vpREnBmc4a+a hVfYnhDc9tAB6nhyuzhBgv/DSuNk5DbituDHJy+vB96AIm4kyR/3FouPD3oU1wi67VM6M0gd gsEp4Y5o2mHfVmGJ5VNaMmffadLFDrbFblDF+ySG6XZZ3vfUi94qLK3A==
- 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 the one strictly needed, but patches 2 and 3 are also
desirable as cleanups and fixes to the documentation.
Patch 4 is untested, as there's no hardware with SSB_NO.
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 (4):
amd/virt_ssbd: set SSBD at vCPU context switch
amd: remove VIRT_SC_MSR_HVM synthetic feature
amd/ssbd: remove hypervisor SSBD selection
amd/virt_ssbd: add to max HVM policy when SSB_NO is available
docs/misc/xen-command-line.pandoc | 8 +---
xen/arch/x86/cpu/amd.c | 54 +++++++++++++-------------
xen/arch/x86/cpuid.c | 16 +++++---
xen/arch/x86/hvm/svm/entry.S | 6 +--
xen/arch/x86/hvm/svm/svm.c | 45 ++++++++-------------
xen/arch/x86/include/asm/amd.h | 3 +-
xen/arch/x86/include/asm/cpufeatures.h | 2 +-
xen/arch/x86/include/asm/spec_ctrl.h | 1 -
xen/arch/x86/msr.c | 7 ++++
xen/arch/x86/spec_ctrl.c | 27 +++----------
10 files changed, 73 insertions(+), 96 deletions(-)
--
2.37.3
|