From: Maxim Levitsky <mlevitsk@redhat.com>
To: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Cc: pbonzini@redhat.com, seanjc@google.com, joro@8bytes.org,
jon.grimm@amd.com, wei.huang2@amd.com, terry.bowman@amd.com
Subject: Re: [PATCH v2 08/12] KVM: SVM: Update AVIC settings when changing APIC mode
Date: Wed, 04 May 2022 14:49:41 +0300 [thread overview]
Message-ID: <8be586dab3a80d96c88018a1919d01f2163b595d.camel@redhat.com> (raw)
In-Reply-To: <8a0b27436239a97cc486d8460662febb6b155069.camel@redhat.com>
On Wed, 2022-05-04 at 14:46 +0300, Maxim Levitsky wrote:
> On Tue, 2022-05-03 at 20:04 +0700, Suravee Suthikulpanit wrote:
> > Maxim,
> >
> > On 5/3/22 12:13 AM, Maxim Levitsky wrote:
> > > > In the kvm/queue branch, I found a regression on nested SVM guest, where L2 guest cannot
> > > > launch. The bad commit is:
> > > >
> > > > commit a4cfff3f0f8c07f1f7873a82bdeb3995807dac8c (bisect)
> > > > Merge: 42dcbe7d8bac 8d5678a76689
> > > > Author: Paolo Bonzini<pbonzini@redhat.com>
> > > > Date: Fri Apr 8 12:43:40 2022 -0400
> > > >
> > > > Merge branch 'kvm-older-features' into HEAD
> > > >
> > > > Merge branch for features that did not make it into 5.18:
> > > >
> > > > * New ioctls to get/set TSC frequency for a whole VM
> > > >
> > > > * Allow userspace to opt out of hypercall patching
> > > >
> > > > Nested virtualization improvements for AMD:
> > > >
> > > > * Support for "nested nested" optimizations (nested vVMLOAD/VMSAVE,
> > > > nested vGIF)
> > > >
> > > > * Allow AVIC to co-exist with a nested guest running
> > > >
> > > > * Fixes for LBR virtualizations when a nested guest is running,
> > > > and nested LBR virtualization support
> > > >
> > > > * PAUSE filtering for nested hypervisors
> > > >
> > > > Guest support:
> > > >
> > > > * Decoupling of vcpu_is_preempted from PV spinlocks
> > > >
> > > > Signed-off-by: Paolo Bonzini<pbonzini@redhat.com>
> > > >
> > > > I am still working on the bisect into the merge commits.
> > > >
> > > > Regards,
> > > > Suravee
> > > >
> > > What happens when the guest can't launch? It sure works for me for kvm/queue
> > > from yesterday.
> > >
> > > I'll test again tomorrow.
> >
> > I have bisected it to this commit:
> >
> > commit 74fd41ed16fd71725e69e2cb90b755505326c2e6
> > Author: Maxim Levitsky <mlevitsk@redhat.com>
> > Date: Tue Mar 22 19:40:47 2022 +0200
> >
> > KVM: x86: nSVM: support PAUSE filtering when L0 doesn't intercept PAUSE
> >
> > 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), then allow L1 to
> > have full control over PAUSE filtering.
> >
> > - if the L1 doesn't intercept PAUSE, use host values and update
> > the adaptive count/threshold even when running nested.
> >
> > - Otherwise always exit to L1; it is not really possible to merge
> > the fields correctly. It is expected that in this case, userspace
> > will not enable this feature in the guest CPUID, to avoid having the
> > guest update both fields pointlessly.
> >
> > Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
> > Message-Id: <20220322174050.241850-4-mlevitsk@redhat.com>
> > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> >
> > I can revert this one or specify pause_filter_count=0 pause_filter_thresh=0,
> > and then I can boot the L2 guest.
> >
> > Regards,
> > Suravee
> >
>
> This is really wierd.
>
> Could you share the qemu command line for L1 and L2 guest, and as much as possible
> info on what happens when you boot L2? I tested latest kvm/queue and I don't see
> any issues with booting nested guest.
>
> Which hardware you test on? I test on Zen2 (3970X) mostly.
>
> How many vCPUs L2 has? Could you do a kvm trace of the L2, from L1,
> to see what it does prior to hang?
Also assuming that you boot the L2 with -cpu host, could you not expose these two
features to it?
-cpu host,pause-filter=off,pfthreshold=off
Best regards,
Maxim Levitsky
>
>
> Best regards,
> Maxim Levitsky
>
>
next prev parent reply other threads:[~2022-05-04 11:49 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-12 11:58 [PATCH v2 00/12] Introducing AMD x2APIC Virtualization (x2AVIC) support Suravee Suthikulpanit
2022-04-12 11:58 ` [PATCH v2 01/12] x86/cpufeatures: Introduce x2AVIC CPUID bit Suravee Suthikulpanit
2022-04-12 11:58 ` [PATCH v2 02/12] KVM: x86: lapic: Rename [GET/SET]_APIC_DEST_FIELD to [GET/SET]_XAPIC_DEST_FIELD Suravee Suthikulpanit
2022-04-12 11:58 ` [PATCH v2 03/12] KVM: SVM: Detect X2APIC virtualization (x2AVIC) support Suravee Suthikulpanit
2022-04-12 11:58 ` [PATCH v2 04/12] KVM: SVM: Update max number of vCPUs supported for x2AVIC mode Suravee Suthikulpanit
2022-04-12 11:58 ` [PATCH v2 05/12] KVM: SVM: Update avic_kick_target_vcpus to support 32-bit APIC ID Suravee Suthikulpanit
2022-04-12 11:58 ` [PATCH v2 06/12] KVM: SVM: Do not support updating APIC ID when in x2APIC mode Suravee Suthikulpanit
2022-04-18 11:09 ` Maxim Levitsky
2022-04-12 11:58 ` [PATCH v2 07/12] KVM: SVM: Adding support for configuring x2APIC MSRs interception Suravee Suthikulpanit
2022-04-18 11:17 ` Maxim Levitsky
2022-04-12 11:58 ` [PATCH v2 08/12] KVM: SVM: Update AVIC settings when changing APIC mode Suravee Suthikulpanit
2022-04-18 12:55 ` Maxim Levitsky
2022-05-02 14:07 ` Suravee Suthikulpanit
2022-05-02 17:13 ` Maxim Levitsky
2022-05-03 13:04 ` Suravee Suthikulpanit
2022-05-04 11:46 ` Maxim Levitsky
2022-05-04 11:49 ` Maxim Levitsky [this message]
2022-05-04 12:38 ` Maxim Levitsky
2022-04-12 11:58 ` [PATCH v2 09/12] KVM: SVM: Introduce helper functions to (de)activate AVIC and x2AVIC Suravee Suthikulpanit
2022-04-12 11:58 ` [PATCH v2 10/12] KVM: SVM: Do not throw warning when calling avic_vcpu_load on a running vcpu Suravee Suthikulpanit
2022-04-12 11:58 ` [PATCH v2 11/12] KVM: SVM: Do not inhibit APICv when x2APIC is present Suravee Suthikulpanit
2022-04-19 13:29 ` Maxim Levitsky
2022-04-26 2:25 ` Suravee Suthikulpanit
2022-04-26 7:06 ` Maxim Levitsky
2022-04-26 9:56 ` Maxim Levitsky
2022-04-29 17:00 ` Sean Christopherson
2022-05-01 6:49 ` Maxim Levitsky
2022-04-12 11:58 ` [PATCH v2 12/12] kvm/x86: Remove APICV activate mode inconsistency check Suravee Suthikulpanit
2022-04-18 12:55 ` Maxim Levitsky
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=8be586dab3a80d96c88018a1919d01f2163b595d.camel@redhat.com \
--to=mlevitsk@redhat.com \
--cc=jon.grimm@amd.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=terry.bowman@amd.com \
--cc=wei.huang2@amd.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;
as well as URLs for NNTP newsgroup(s).