KVM: SVM: Use KVM's snapshot of the host's XCR0 for SEV-ES host state
authorSean Christopherson <seanjc@google.com>
Tue, 23 Apr 2024 22:15:19 +0000 (15:15 -0700)
committerSean Christopherson <seanjc@google.com>
Mon, 3 Jun 2024 15:58:54 +0000 (08:58 -0700)
commit52c47f5897b69cdde0d23e5102b44eb161fa70a8
tree9e22ac3388d6527ea5c0d9cd078f6859e13c2e8d
parent7974c0643ee3b493d5a3f2a1ee25e9ddb53283c3
KVM: SVM: Use KVM's snapshot of the host's XCR0 for SEV-ES host state

Use KVM's snapshot of the host's XCR0 when stuffing SEV-ES host state
instead of reading XCR0 from hardware.  XCR0 is only written during
boot, i.e. won't change while KVM is running (and KVM at large is hosed
if that doesn't hold true).

Link: https://lore.kernel.org/r/20240423221521.2923759-3-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/svm/sev.c