[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ca47fce8-a042-f967-513c-93cabac2122d@linux.intel.com>
Date: Wed, 4 Mar 2020 15:41:58 +0800
From: "Liu, Jing2" <jing2.liu@...ux.intel.com>
To: Sean Christopherson <sean.j.christopherson@...el.com>,
Paolo Bonzini <pbonzini@...hat.com>
Cc: Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Joerg Roedel <joro@...tes.org>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org, Derek Yerger <derek@....llc>,
kernel@...dan.com, Thomas Lambertz <mail@...maslambertz.de>,
Rik van Riel <riel@...riel.com>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Borislav Petkov <bp@...e.de>,
Dave Hansen <dave.hansen@...el.com>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 3/4] KVM: x86: Revert "KVM: X86: Fix fpu state crash in
kvm guest"
On 1/17/2020 2:26 PM, Sean Christopherson wrote:
> @@ -8198,8 +8194,9 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
> trace_kvm_entry(vcpu->vcpu_id);
> guest_enter_irqoff();
>
> - /* The preempt notifier should have taken care of the FPU already. */
> - WARN_ON_ONCE(test_thread_flag(TIF_NEED_FPU_LOAD));
> + fpregs_assert_state_consistent();
> + if (test_thread_flag(TIF_NEED_FPU_LOAD))
> + switch_fpu_return();
>
> if (unlikely(vcpu->arch.switch_db_regs)) {
> set_debugreg(0, 7);
Can kvm be preempt out again after this (before really enter to guest)?
Thanks,
Jing
Powered by blists - more mailing lists