mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shivansh Dhiman <shivansh.dhiman@amd.com>
To: Sean Christopherson <seanjc@google.com>
Cc: Ravi Bangoria <ravi.bangoria@amd.com>, <tglx@linutronix.de>,
	<mingo@redhat.com>, <bp@alien8.de>, <dave.hansen@linux.intel.com>,
	<pbonzini@redhat.com>, <thomas.lendacky@amd.com>,
	<jmattson@google.com>, <hpa@zytor.com>,
	<rmk+kernel@armlinux.org.uk>, <peterz@infradead.org>,
	<james.morse@arm.com>, <lukas.bulwahn@gmail.com>,
	<arjan@linux.intel.com>, <j.granados@samsung.com>,
	<sibs@chinatelecom.cn>, <nik.borisov@suse.com>,
	<michael.roth@amd.com>, <nikunj.dadhania@amd.com>,
	<babu.moger@amd.com>, <x86@kernel.org>, <kvm@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <santosh.shukla@amd.com>,
	<ananth.narayan@amd.com>, <sandipan.das@amd.com>,
	<manali.shukla@amd.com>, <yosry.ahmed@linux.dev>
Subject: Re: [PATCH v4 4/4] KVM: SVM: Add Bus Lock Detect support
Date: Fri, 14 Nov 2025 14:20:14 +0530	[thread overview]
Message-ID: <5fbd65ae-40a2-4434-af44-84c749e5fdd2@amd.com> (raw)
In-Reply-To: <aRNTADUbIGze6Vyt@google.com>

On 11-11-2025 20:45, Sean Christopherson wrote:
> On Tue, Nov 11, 2025, Shivansh Dhiman wrote:
>> On 17-08-2024 05:43, Sean Christopherson wrote:
>>> On Thu, Aug 08, 2024, Ravi Bangoria wrote:

...

> 
>> ===========================================================
>> Issue 1: Interception still enabled after enabling LBRV
>> ===========================================================
>> Using the 6.16 upstream kernel (unpatched) I ran the KUT tests and they passed
>> when run from both the bare metal and from inside a L1 guest. However for L2
>> guest, when looking at the logs I found that RDMSR interception of LBR MSRs is
>> still enabled despite the LBRV is enabled for the L2 guest. Effectively, the
>> reads are emulated instead of being virtualized, which is not the intended
>> behaviour. KUT cannot distinguish between emulated and virtualized RDMSR, and
>> hence the test passes regardless.
> 
> I haven't looked closely at your patch or at Yosry's patches, but I suspect this
> was _just_ fixed:
> 
> https://lore.kernel.org/all/20251108004524.1600006-1-yosry.ahmed@linux.dev

Thanks Sean. I tested Yosry's patches and they indeed have solved this issue.

> 
>> ===========================================================
>> Issue 2: Basic LBR KUT fails with Sean's implementation
>> ===========================================================
>> After using your implementation, all KUTs passed on the bare metal. With LBRV
>> enabled for L2, RDMSR interception of LBR MSRs is disabled as intended.
>> However, when running KUT tests inside an L1 guest, the tests fail.
> 
> Same story here: I haven't had cycles to actually look at code, but Yosry also
> posted a pile of changes for KUT:
> 
> https://lore.kernel.org/all/20251110232642.633672-1-yosry.ahmed@linux.dev

This issue was also related to buggy LBRV in the kernel. Yosry's patches have
fixed this issue as well and I've verified it. There was a slight flakiness in
the KUT which was later fixed by another patch by Yosry's. [1]

Thanks,
Shivansh

1. https://lore.kernel.org/all/20251113224639.2916783-1-yosry.ahmed@linux.dev/





  reply	other threads:[~2025-11-14  8:50 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-08  6:29 [PATCH v4 0/4] x86/cpu: Add Bus Lock Detect support for AMD Ravi Bangoria
2024-08-08  6:29 ` [PATCH v4 1/4] x86/split_lock: Move Split and Bus lock code to a dedicated file Ravi Bangoria
2024-08-08 16:07   ` [tip: x86/splitlock] " tip-bot2 for Ravi Bangoria
2024-08-08  6:29 ` [PATCH v4 2/4] x86/bus_lock: Add support for AMD Ravi Bangoria
2024-08-08 16:07   ` [tip: x86/splitlock] " tip-bot2 for Ravi Bangoria
2024-08-08  6:29 ` [PATCH v4 3/4] KVM: SVM: Don't advertise Bus Lock Detect to guest if SVM support is missing Ravi Bangoria
2024-08-08  6:29 ` [PATCH v4 4/4] KVM: SVM: Add Bus Lock Detect support Ravi Bangoria
2024-08-17  0:13   ` Sean Christopherson
2024-08-20 16:38     ` Ravi Bangoria
2024-09-05 11:40       ` Ravi Bangoria
2024-08-21  5:36     ` Ravi Bangoria
2024-08-21 10:40       ` Ravi Bangoria
2024-08-26 18:31         ` Sean Christopherson
2025-11-11 10:03     ` Shivansh Dhiman
2025-11-11 15:15       ` Sean Christopherson
2025-11-14  8:50         ` Shivansh Dhiman [this message]
2024-08-23 23:47 ` [PATCH v4 0/4] x86/cpu: Add Bus Lock Detect support for AMD Sean Christopherson

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=5fbd65ae-40a2-4434-af44-84c749e5fdd2@amd.com \
    --to=shivansh.dhiman@amd.com \
    --cc=ananth.narayan@amd.com \
    --cc=arjan@linux.intel.com \
    --cc=babu.moger@amd.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=j.granados@samsung.com \
    --cc=james.morse@arm.com \
    --cc=jmattson@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas.bulwahn@gmail.com \
    --cc=manali.shukla@amd.com \
    --cc=michael.roth@amd.com \
    --cc=mingo@redhat.com \
    --cc=nik.borisov@suse.com \
    --cc=nikunj.dadhania@amd.com \
    --cc=pbonzini@redhat.com \
    --cc=peterz@infradead.org \
    --cc=ravi.bangoria@amd.com \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=sandipan.das@amd.com \
    --cc=santosh.shukla@amd.com \
    --cc=seanjc@google.com \
    --cc=sibs@chinatelecom.cn \
    --cc=tglx@linutronix.de \
    --cc=thomas.lendacky@amd.com \
    --cc=x86@kernel.org \
    --cc=yosry.ahmed@linux.dev \
    /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®