[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1661def3-45d1-9aab-aeb4-5b934179d3ab@redhat.com>
Date: Thu, 21 Oct 2021 18:43:34 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Michael Roth <michael.roth@....com>,
linux-kselftest@...r.kernel.org
Cc: kvm@...r.kernel.org, linux-kernel@...r.kernel.org, x86@...nel.org,
Nathan Tempelman <natet@...gle.com>,
Marc Orr <marcorr@...gle.com>,
Steve Rutherford <srutherford@...gle.com>,
Sean Christopherson <seanjc@...gle.com>,
Mingwei Zhang <mizhang@...gle.com>,
Brijesh Singh <brijesh.singh@....com>,
Tom Lendacky <thomas.lendacky@....com>,
Varad Gautam <varad.gautam@...e.com>,
Shuah Khan <shuah@...nel.org>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
David Woodhouse <dwmw@...zon.co.uk>,
Ricardo Koller <ricarkol@...gle.com>,
Jim Mattson <jmattson@...gle.com>,
Wanpeng Li <wanpengli@...cent.com>,
Joerg Roedel <joro@...tes.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
"H . Peter Anvin" <hpa@...or.com>
Subject: Re: [RFC 08/16] KVM: SVM: include CR3 in initial VMSA state for
SEV-ES guests
On 06/10/21 22:37, Michael Roth wrote:
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index c1a2dd0024b2..d724fa185bef 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -10400,8 +10400,7 @@ static int __set_sregs_common(struct kvm_vcpu *vcpu, struct kvm_sregs *sregs,
>
> vcpu->arch.cr2 = sregs->cr2;
> *mmu_reset_needed |= kvm_read_cr3(vcpu) != sregs->cr3;
> - vcpu->arch.cr3 = sregs->cr3;
> - kvm_register_mark_available(vcpu, VCPU_EXREG_CR3);
> + static_call(kvm_x86_set_cr3)(vcpu, sregs->cr3);
>
> kvm_set_cr8(vcpu, sregs->cr8);
>
>
Can you instead make the hook "post_set_sregs", and keep these two lines
in __set_sregs_common?
Thanks,
Paolo
Powered by blists - more mailing lists