[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <53afbfba-427e-72f5-73a6-faea7606e78e@redhat.com>
Date: Thu, 20 Aug 2020 12:01:15 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Maxim Levitsky <mlevitsk@...hat.com>, kvm@...r.kernel.org
Cc: Jim Mattson <jmattson@...gle.com>, Joerg Roedel <joro@...tes.org>,
Borislav Petkov <bp@...en8.de>,
Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
"open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
<linux-kernel@...r.kernel.org>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
Ingo Molnar <mingo@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Sean Christopherson <sean.j.christopherson@...el.com>
Subject: Re: [PATCH 8/8] KVM: nSVM: read only changed fields of the nested
guest data area
On 20/08/20 11:13, Maxim Levitsky wrote:
> + u32 clean = nested_vmcb->control.clean;
> +
> + if (svm->nested.vmcb_gpa != vmcb_gpa) {
> + svm->nested.vmcb_gpa = vmcb_gpa;
> + clean = 0;
> + }
You probably should set clean to 0 also if the guest doesn't have the
VMCBCLEAN feature (so, you first need an extra patch to add the
VMCBCLEAN feature to cpufeatures.h). It's probably best to cache the
guest vmcbclean in struct vcpu_svm, too.
Paolo
Powered by blists - more mailing lists