lkml.org 
[lkml]   [2022]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH v4 3/6] KVM: x86: nSVM: support PAUSE filtering when L0 doesn't intercept PAUSE
    From
    Date
    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@redhat.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
    >


    \
     
     \ /
      Last update: 2022-03-27 17:15    [W:30.195 / U:0.680 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site