From: Sean Christopherson <seanjc@google.com>
To: Yosry Ahmed <yosry@kernel.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: SVM: Add a helper to get LBR field pointer to dedup MSR accesses
Date: Fri, 13 Mar 2026 15:17:07 -0700 [thread overview]
Message-ID: <abSM4_uF2Px7h-iu@google.com> (raw)
In-Reply-To: <CAO9r8zOaUM+TBcQO=6k2Nt5=VauiDifCU2JvhUpts_VGcPSYKw@mail.gmail.com>
On Fri, Mar 13, 2026, Yosry Ahmed wrote:
> > Hrm, I was assuming the compiler would be smart to understand the other cases
> > are unreachable. What clang version, and are you doing anything special with
> > your config?
>
> Debian clang version 18.1.8 (20+build1)
>
> Nothing special with my config AFAICT.
Lame. Given that it's Friday and I'm about to become a pumpkin, and it doesn't
really matter if it's compile-timer assert or not, I'm going to sqaush it to this:
static u64 *svm_vmcb_lbr(struct vcpu_svm *svm, u32 msr)
{
switch (msr) {
case MSR_IA32_LASTBRANCHFROMIP:
return &svm->vmcb->save.br_from;
case MSR_IA32_LASTBRANCHTOIP:
return &svm->vmcb->save.br_to;
case MSR_IA32_LASTINTFROMIP:
return &svm->vmcb->save.last_excp_from;
case MSR_IA32_LASTINTTOIP:
return &svm->vmcb->save.last_excp_to;
default:
break;
}
KVM_BUG_ON(1, svm->vcpu.kvm);
return &svm->vmcb->save.br_from;
}
Can you double check that kvm-x86/nested builds for you? In the process of
rebuilding kvm-x86/next...
next prev parent reply other threads:[~2026-03-13 22:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-10 22:04 [PATCH] KVM: SVM: Add a helper to get LBR field pointer to dedup MSR accesses Sean Christopherson
2026-03-11 1:45 ` Yosry Ahmed
2026-03-13 18:23 ` Yosry Ahmed
2026-03-13 20:15 ` Sean Christopherson
2026-03-13 20:38 ` Yosry Ahmed
2026-03-13 22:17 ` Sean Christopherson [this message]
2026-03-13 22:25 ` Yosry Ahmed
2026-04-03 15:13 ` 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=abSM4_uF2Px7h-iu@google.com \
--to=seanjc@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=yosry@kernel.org \
/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