[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cf1b338c-68bc-6e7e-1a10-98bc653d34ce@redhat.com>
Date: Thu, 18 Feb 2021 19:00:40 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: Sean Christopherson <seanjc@...gle.com>
Cc: linux-kernel@...r.kernel.org, kvm@...r.kernel.org, jroedel@...e.de,
mlevitsk@...hat.com
Subject: Re: [PATCH] KVM: nSVM: prepare guest save area while is_guest_mode is
true
On 18/02/21 18:42, Sean Christopherson wrote:
>> The bug is present since commit 06fc7772690d ("KVM: SVM: Activate nested
>> state only when guest state is complete", 2010-04-25). Unfortunately,
>> it is not clear from the commit message what issue exactly led to the
>> change back then. It was probably related to svm_set_cr0 however because
>> the patch series cover letter[1] mentioned lazy FPU switching.
>
> Aha! It was indeed related to svm_set_cr0(). Specifically, the next patch,
> commit 66a562f7e257 ("KVM: SVM: Make lazy FPU switching work with nested svm"),
> added is_nested() checks in update_cr0_intercept() to merge L1's intercepts with
> L0's intercepts.
Yeah, the problem is I don't understand why 06fc7772690d fixed things in
11 year old KVM instead of breaking them, because effectively this patch
is reverting it.
I don't care _that_ much because so much has changed since then; the
world switch logic is abstracted better nowadays, and it is easier to
review the change. But it is weird, nevertheless.
Paolo
Powered by blists - more mailing lists