[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANRm+CypKbrhwFR-jLCuUruXwApq4Tb62U_KP_4H-_=7yX1VQg@mail.gmail.com>
Date: Fri, 28 May 2021 14:12:34 +0800
From: Wanpeng Li <kernellwp@...il.com>
To: Lai Jiangshan <jiangshanlai@...il.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
Lai Jiangshan <laijs@...ux.alibaba.com>,
Oliver Upton <oupton@...gle.com>,
Paolo Bonzini <pbonzini@...hat.com>,
Sean Christopherson <seanjc@...gle.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Joerg Roedel <joro@...tes.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
"the arch/x86 maintainers" <x86@...nel.org>,
"H. Peter Anvin" <hpa@...or.com>, Peter Shier <pshier@...gle.com>,
kvm <kvm@...r.kernel.org>
Subject: Re: [PATCH] KVM: X86: always reset st->preempted in record_steal_time()
On Fri, 28 May 2021 at 14:11, Lai Jiangshan <jiangshanlai@...il.com> wrote:
>
> From: Lai Jiangshan <laijs@...ux.alibaba.com>
>
> st->preempted needs to be reset in record_steal_time() to clear the
> KVM_VCPU_PREEMPTED bit.
>
> But the commit 66570e966dd9 ("kvm: x86: only provide PV features if
> enabled in guest's CPUID") made it cleared conditionally and
> KVM_VCPU_PREEMPTED might not be cleared when entering into the guest.
>
> Also make st->preempted be only read once, so that trace_kvm_pv_tlb_flush()
> and kvm_vcpu_flush_tlb_guest() is consistent with same value of st->preempted.
>
> Cc: Oliver Upton <oupton@...gle.com>
> Fixes: 66570e966dd9 ("kvm: x86: only provide PV features if enabled in guest's CPUID")
It has already been fixed by commit 1eff0ada88b48 (KVM: X86: Fix vCPU
preempted state from guest's point of view) in kvm/master.
Wanpeng
Powered by blists - more mailing lists