From: Paolo Bonzini <pbonzini@redhat.com>
To: Jeremi Piotrowski <jpiotrowski@linux.microsoft.com>,
Sean Christopherson <seanjc@google.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
Tianyu Lan <ltykernel@gmail.com>,
"Michael Kelley (LINUX)" <mikelley@microsoft.com>
Subject: Re: "KVM: x86/mmu: Overhaul TDP MMU zapping and flushing" breaks SVM on Hyper-V
Date: Fri, 24 Feb 2023 17:26:16 +0100 [thread overview]
Message-ID: <6016ec96-fe6d-399f-2b9d-cd484ca28a3b@redhat.com> (raw)
In-Reply-To: <113888e0-ba94-deca-57a1-d3549d55a315@linux.microsoft.com>
On 2/24/23 17:17, Jeremi Piotrowski wrote:
>>>>>>> Depending on the performance results of adding the hypercall to
>>>>>>> svm_flush_tlb_current, the fix could indeed be to just disable usage of
>>>>>>> HV_X64_NESTED_ENLIGHTENED_TLB.
>>>>>> Minus making nested SVM (L3) mutually exclusive, I believe this will do the trick:
>>>>>>
>>>>>> + /* blah blah blah */
>>>>>> + hv_flush_tlb_current(vcpu);
>>>>>> +
>>>>> Yes, it's either this or disabling the feature.
>>>>>
>>>>> Paolo
>>>> Combining the two sub-threads: both of the suggestions:
>>>>
>>>> a) adding a hyperv_flush_guest_mapping(__pa(root->spt) after kvm_tdp_mmu_get_vcpu_root_hpa's call to tdp_mmu_alloc_sp()
>>>> b) adding a hyperv_flush_guest_mapping(vcpu->arch.mmu->root.hpa) to svm_flush_tlb_current()
>>>>
>>>> appear to work in my test case (L2 vm startup until panic due to missing rootfs).
>>>>
>>>> But in both these cases (and also when I completely disable HV_X64_NESTED_ENLIGHTENED_TLB)
>>>> the runtime of an iteration of the test is noticeably longer compared to tdp_mmu=0.
>>> Hmm, what is test doing?
>> Booting through OVMF and kernel with no rootfs provided, and panic=-1 specified on the
>> kernel command line. It's a pure startup time test.
>>
> Hi Sean,
>
> Have you been able to reproduce this by any chance?
>
> I would be glad to see either of the two fixes getting merged (b) or a) if it doesn't require
> special L3 nested handling) in order to get this regression resolved.
For now the easiest course of action is to just disable the TDP MMU if
HV_X64_NESTED_ENLIGHTENED_TLB is available.
Paolo
prev parent reply other threads:[~2023-02-24 16:27 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-10 18:17 Jeremi Piotrowski
2023-02-10 18:45 ` Sean Christopherson
2023-02-13 12:44 ` Jeremi Piotrowski
2023-02-13 12:50 ` Paolo Bonzini
2023-02-13 18:05 ` Jeremi Piotrowski
2023-02-13 18:26 ` Paolo Bonzini
2023-02-13 17:38 ` Sean Christopherson
2023-02-13 17:49 ` Jeremi Piotrowski
2023-02-13 18:11 ` Paolo Bonzini
2023-02-13 19:11 ` Sean Christopherson
2023-02-13 19:56 ` Paolo Bonzini
2023-02-14 20:27 ` Jeremi Piotrowski
2023-02-15 22:16 ` Sean Christopherson
2023-02-16 14:40 ` Jeremi Piotrowski
2023-02-24 16:17 ` Jeremi Piotrowski
2023-02-24 16:26 ` Paolo Bonzini [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6016ec96-fe6d-399f-2b9d-cd484ca28a3b@redhat.com \
--to=pbonzini@redhat.com \
--cc=jpiotrowski@linux.microsoft.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ltykernel@gmail.com \
--cc=mikelley@microsoft.com \
--cc=seanjc@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®