[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH for-4.17 v2 1/3] hvm/msr: load VIRT_SPEC_CTRL
- To: xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
- Date: Fri, 28 Oct 2022 13:49:11 +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=aYDw1ju4VK98mCmtSho12wDHfRMXymvoyrYvMdxnUp0=; b=ErNn+qzqxZ+eLWN4gSJ9UOLqbLM6I4IfB1H5x9IBG8Gk0VM2pieBGmaWS+WU+lMgUqcqhZ1HlXZIbg8I8/x0OUgUdUC7j4+nyNa1muegGQX42BF+6t4z3AE8vHrTtIsX3O28ScBlWJ1GQilU3bUkxCN1RITWR+3EYgjta7CjjhJnavWJTYcUcOS5lnWJ2REzoLa7s2kAgC+5AjhUXZV/gOqpledi/MvqJb5lcR2z0UzxQNOZUaFuj9BHqGg2jBW4VB+E2ufZqeqfngyMWIM9zbBFaf9jAgefEz7kzF3RK0GDIm7SMVVzifHaWJEHFjaqFz9GCCQIQJlIwqS4OT5QIQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LfsaWNSW8+Hxdm+T8f8OFRQYTjziH34LsIDURS5z+nzN5FabxO0obtmm73P3zbYaDa4WpHfwcbV3uK90/VLHffcXUKgct8ypOy3bXdPjXdYZk+NasJJyNo6Hb3meGcfXEvBf5q8KdFOvfFcXTNyMLAISH8GK2Gn0CbLG4LSz0o8vMCWovrb8vkZkXlTEBRmD9v4uSCA817Id+5nXKqK8mrTbd3oOJYvEafcnW3mMmfxHAAXLdDd1n/lV7mzjGvSQZEYeRFv4R3BVH0e4asS7bsrO42DDoMs1J87+iKiC7Bb4IHJjWitjxOAKYay6HSTVmPDH4qIbVAO5j+uh58kFbA==
- 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>
- Delivery-date: Fri, 28 Oct 2022 11:49:44 +0000
- Ironport-data: A9a23:R7VaFK7wnexZUBMAGe2HBwxRtAvGchMFZxGqfqrLsTDasY5as4F+v jNKXjyOPfiNNjP9c9onboy+p08FvMCBmNZgTgNorC1jHi5G8cbLO4+Ufxz6V8+wwm8vb2o8t plDNYOQRCwQZiWBzvt4GuG59RGQ7YnRGvynTraBYnoqLeNdYH9JoQp5nOIkiZJfj9G8Agec0 fv/uMSaM1K+s9JOGjt8B5mr9VU+4ZwehBtC5gZkPKgR7AeE/5UoJMl3yZ+ZfiOQrrZ8RoZWd 86bpJml82XQ+QsaC9/Nut4XpWVTH9Y+lSDX4pZnc/DKbipq/0Te4Y5iXBYoUm9Fii3hojxE4 I4lWapc6+seFvakdOw1C3G0GszlVEFM0OevzXOX6aR/w6BaGpdFLjoH4EweZOUlFuhL7W5m6 NYUOmkjaxC4v/Pnkb2lEuRmqf4gFZy+VG8fkikIITDxK98DGMmGaYOaoNhS0XE3m9xEGuvYa 4wBcz1zYR/cYhpJfFAKFJY5m+TujX76G9FagAvN+exrvC6OnEoojumF3Nn9I7RmQe1PmUmVv CTe9nnRCRAGLt2PjzGC9xpAg8efx3yqCdNPSNVU8NZA3AzJx3IXFCc5akS8ur63jkKcVPxAf hl8Fi0G6PJaGFaQZsnwWVi0rWCJujYYWsFMCKsq5QeV0K3W7g2FQG8eQVZpSNEgrt5wejUs2 XeAhdavDjtq2JWXQ3+A8rafrRupJDMYa2QFYEcsUg8t89Tl5oYpgXryos1LFae0ipj/H2H2y jXT9Swm3exN3IgMyrmx+k3Bj3S0vJ/VQwUp5wLRGGW48gd+Y43jbIutgbTG0ct9wE+iZgHpl BA5dwK2toji0bnlePSxfdgw
- Ironport-hdrordr: A9a23:3l3id6kwo8yuOWt3+DB5Uy6o5ynpDfIG3DAbv31ZSRFFG/Fwz/ re+Mjy1XfP5Ar5K0tQ/uxoWZPwOU80mqQU3WB8B92ftUzdyQ6VxeJZnPDfKl/bak7DH4dmvM 9dmupFeb/N5DNB4voSlTPYLz9W+re6Gc6T6Ns2yU0HceggUdAH0+4wMHfjLnFL
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Add MSR_VIRT_SPEC_CTRL to the list of MSRs handled by
hvm_load_cpu_msrs(), or else it would be lost.
Fixes: 8ffd5496f4 ('amd/msr: implement VIRT_SPEC_CTRL for HVM guests on top of
SPEC_CTRL')
Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
I'm confused as to why we have two different list of MSR to send and
load, one in msrs_to_send[] and the other open-coded in
hvm_load_cpu_msrs(), but given the release status it's no time to
clean that up.
---
Changes since v1:
- New in this version.
---
xen/arch/x86/hvm/hvm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 44b432ec5a..15a9b34c59 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -1498,6 +1498,7 @@ static int cf_check hvm_load_cpu_msrs(struct domain *d,
hvm_domain_context_t *h)
case MSR_INTEL_MISC_FEATURES_ENABLES:
case MSR_IA32_BNDCFGS:
case MSR_IA32_XSS:
+ case MSR_VIRT_SPEC_CTRL:
case MSR_AMD64_DR0_ADDRESS_MASK:
case MSR_AMD64_DR1_ADDRESS_MASK ... MSR_AMD64_DR3_ADDRESS_MASK:
rc = guest_wrmsr(v, ctxt->msr[i].index, ctxt->msr[i].val);
--
2.37.3
|