[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d71378091e7a410ce56947b72d6e59deccaa65bd.camel@redhat.com>
Date: Sun, 27 Mar 2022 18:14:49 +0300
From: Maxim Levitsky <mlevitsk@...hat.com>
To: Paolo Bonzini <pbonzini@...hat.com>, kvm@...r.kernel.org
Cc: Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Sean Christopherson <seanjc@...gle.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>, Joerg Roedel <joro@...tes.org>,
linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
Jim Mattson <jmattson@...gle.com>, x86@...nel.org,
Dave Hansen <dave.hansen@...ux.intel.com>,
Wanpeng Li <wanpengli@...cent.com>
Subject: Re: [PATCH v4 3/6] KVM: x86: nSVM: support PAUSE filtering when L0
doesn't intercept PAUSE
On Thu, 2022-03-24 at 19:24 +0100, Paolo Bonzini wrote:
> On 3/22/22 18:40, Maxim Levitsky wrote:
> > Allow L1 to use PAUSE filtering if L0 doesn't use it.
> >
> > Signed-off-by: Maxim Levitsky<mlevitsk@...hat.com>
>
> Can you enlarge the commit message to explain the logic in
> nested_vmcb02_prepare_control?
No problem, I will do in the next version.
How about this:
KVM: x86: nSVM: support nested PAUSE filtering when possible
Expose the pause filtering and threshold in the guest CPUID
and support PAUSE filtering when possible:
- If the L0 doesn't intercept PAUSE
(cpu_pm=on, or pause_filter_count kvm_amd's parameter is 0),
then allow L1 to have full control over PAUSE filtering.
- Otherwise if the L1 doesn't intercept PAUSE,
use KVM's PAUSE thresholds, and update them even
when running nested.
- Otherwise ignore both host and guest PAUSE thresholds,
because it is not really possible to merge them correctly.
It is expected that in this case, userspace hypervisor (e.g qemu)
will not enable this feature in the guest CPUID, to avoid
having the guest to update both thresholds pointlessly.
Best regards,
Maxim Levitsky
>
> Thanks,
>
> Paolo
>
Powered by blists - more mailing lists