From: Manali Shukla <manali.shukla@amd.com>
To: Sean Christopherson <seanjc@google.com>
Cc: kvm@vger.kernel.org, linux-kselftest@vger.kernel.org,
pbonzini@redhat.com, shuah@kernel.org, nikunj@amd.com,
thomas.lendacky@amd.com, vkuznets@redhat.com, bp@alien8.de,
babu.moger@amd.com, Manali Shukla <manali.shukla@amd.com>
Subject: Re: [RFC PATCH v1 3/4] KVM: x86: nSVM: Implement support for nested Bus Lock Threshold
Date: Wed, 28 Aug 2024 21:22:43 +0530 [thread overview]
Message-ID: <017bed8d-c4cd-46a1-89ea-25dcbb20c7b4@amd.com> (raw)
In-Reply-To: <Zr-xGHQJXc-S_jTP@google.com>
On 8/17/2024 1:35 AM, Sean Christopherson wrote:
> On Tue, Jul 09, 2024, Manali Shukla wrote:
>> Expose the Bus Lock Threshold in the guest CPUID and support its
>> functionality in nested guest.
>
> Why? This is a rather messy feature to support in a nested setup, and I'd much
> prefer to not open that can of worms unless there's a very good reason to do so.
Agreed.
>
>> Ensure proper restoration and saving of the bus_lock_counter at VM
>> Entry and VM Exit respectively in nested guest scenarios.
>>
>> Case 1:
>> L0 supports buslock exit and L1 does not: use buslock counter from L0
>> and exits happen to L0 VMM.
>>
>> Case 2:
>> Both L0 and L1 supports buslock exit: use L1 buslock counter value and
>> exits happen to L1 VMM.
>
> Yeah, no. L1 wants to attack the host, so it runs L2 with buslock detection
> enabled, but the highest possible threshold. Game over.
>
> If we take the min between the two, then we have to track the delta and shove
> _that_ into the VMCB. E.g. L1 wants every 4, L0 wants every 5. After 4 locks,
> KVM synthesizes a nested VM-Exit. Then on nested VMRUN, KVM needs to remember
> it should run L2 with a threshold of 1.
>
> If we really want to support virtualizing bus lock detection for L1, the easiest
> approach would be to do so if and only if it's NOT in use by L0. But IMO that's
> not worth doing.
I will drop the nested implementation in V2.
-Manali
next prev parent reply other threads:[~2024-08-28 15:52 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-09 17:51 [RFC PATCH v1 0/4] Add support for the Bus Lock Threshold Manali Shukla
2024-07-09 17:51 ` [RFC PATCH v1 1/4] x86/cpufeatures: Add CPUID feature bit " Manali Shukla
2024-08-16 19:37 ` Sean Christopherson
2024-08-22 9:43 ` Manali Shukla
2024-08-29 6:48 ` Borislav Petkov
2024-08-30 4:42 ` Sean Christopherson
2024-08-30 8:21 ` Borislav Petkov
2024-09-20 5:53 ` Manali Shukla
2024-07-09 17:51 ` [RFC PATCH v1 2/4] KVM: SVM: Enable Bus lock threshold exit Manali Shukla
2024-08-16 19:54 ` Sean Christopherson
2024-08-24 5:35 ` Manali Shukla
2024-08-26 16:15 ` Sean Christopherson
2024-08-29 6:37 ` Manali Shukla
2024-08-28 16:44 ` Manali Shukla
2024-07-09 17:51 ` [RFC PATCH v1 3/4] KVM: x86: nSVM: Implement support for nested Bus Lock Threshold Manali Shukla
2024-08-16 20:05 ` Sean Christopherson
2024-08-28 15:52 ` Manali Shukla [this message]
2024-08-16 20:14 ` Sean Christopherson
2024-08-29 14:32 ` Manali Shukla
2024-07-09 17:51 ` [RFC PATCH v1 4/4] KVM: selftests: Add bus lock exit test Manali Shukla
2024-08-16 20:21 ` Sean Christopherson
2024-08-26 10:29 ` Manali Shukla
2024-08-26 16:06 ` Sean Christopherson
2024-08-29 9:41 ` Manali Shukla
2024-07-30 4:52 ` [RFC PATCH v1 0/4] Add support for the Bus Lock Threshold Manali Shukla
2024-08-07 3:55 ` Manali Shukla
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=017bed8d-c4cd-46a1-89ea-25dcbb20c7b4@amd.com \
--to=manali.shukla@amd.com \
--cc=babu.moger@amd.com \
--cc=bp@alien8.de \
--cc=kvm@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=nikunj@amd.com \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=shuah@kernel.org \
--cc=thomas.lendacky@amd.com \
--cc=vkuznets@redhat.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