From: Sean Christopherson <seanjc@google.com>
To: Mark Brown <broonie@kernel.org>
Cc: KVM <kvm@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: linux-next: manual merge of the kvm-x86 tree with the kvm-fixes tree
Date: Wed, 30 Sep 2026 08:11:44 -0700 [thread overview]
Message-ID: <ar0msIOhuFY0RpCS@google.com> (raw)
In-Reply-To: <f8d5ab37-7bc5-494f-afec-6bd0cb0c412c@sirena.org.uk>
On Wed, Sep 30, 2026, Mark Brown wrote:
> On Wed, Sep 30, 2026 at 06:40:07AM -0700, Sean Christopherson wrote:
> > On Wed, Sep 30, 2026, Mark Brown wrote:
>
> > > between commits:
>
> > > b630929bcc4c8 ("KVM: selftests: Extend nested x2APIC test to validate disabling x2APIC virt")
> > > b0bc51910f039 ("KVM: selftests: Extend nested x2APIC test to validate using eVMCS for vmcs12")
>
> > > from the kvm-fixes tree and commits:
>
> > > 9b2f8146fcef9 ("KVM: selftests: Extend nested x2APIC test to validate disabling x2APIC virt")
> > > a4bab1c12fd52 ("KVM: selftests: Extend nested x2APIC test to validate using eVMCS for vmcs12")
>
> > kvm-fixes got force-pushed, which is what's causing the weird conflict. In a
> > tree that hasn't refresh from kvm.git, I see:
>
> Ah, I had thought it was an old version of the patch having landed in
> kvm-x86. It looked like different versions of the same patch got into
> each tree so I went with the main fixes branch version as that's what's
> heading for Linus. This sort of cherry pick/duplicate stuff is always
> hard to follow. :(
>
> > a4bab1c12fd528ccaafee00360e07463873404a9 (kvm/master, kvm/HEAD) KVM: selftests: Extend nested x2APIC test to validate using eVMCS for vmcs12
> > 9b2f8146fcef9faa73f9dc1bad9a8d6c585cfec8 KVM: selftests: Extend nested x2APIC test to validate disabling x2APIC virt
>
> > versus the newer version:
>
> > 973ea70393e885e540f714904e51bc6cac80e3d7 (kvm/master, kvm/HEAD) KVM: SEV: Do cache maintenance on the source VM *before* clearing SEV state
> > 8abbc76120a74bfba1851bd97528099d715e45c6 KVM: SEV: Nullify "have run CPUs" mask pointer when freeing it
> > b0bc51910f0391fea09c0a1d32352fec2acb2686 KVM: selftests: Extend nested x2APIC test to validate using eVMCS for vmcs12
> > b630929bcc4c867c9abc8cd5a0ebee3bb5ce5dcd KVM: selftests: Extend nested x2APIC test to validate disabling x2APIC virt
>
> IIRC my conflict resolution gitk only showed me the two commits that got
> duplicated, it is filtered by file though.
>
> > > - prepare_for_vmx_operation(vmx);
> > > + GUEST_ASSERT_EQ(prepare_for_vmx_operation(vmx), true);
>
> > This resolution will probably break the final selftests build? kvm-x86/next
> > moves these asserts into prepare_for_vmx_operation(), load_evmcs(), load_vmcs()
> > etc. I.e. kvm-x86/next should "win".
>
> That's entirely plausible, my kselftest build tests are for arm64 only
> since that's what's native on the build machine. Sorry about the mess
> here.
Ha, no need to apologize, it's our mess.
> If you send me a confirmed resolution on top of today's -next I
> can add the fixup, or I'll try to take look tomorrow?
Here's the fixup. I'll make sure to push to kvm-x86/next today with the new
version of kvm/master, so this should disappear in tomorrow's build.
diff --git a/tools/testing/selftests/kvm/x86/nested_x2apic_test.c b/tools/testing/selftests/kvm/x86/nested_x2apic_test.c
index 52959287500d..2ae698c9aa1c 100644
--- a/tools/testing/selftests/kvm/x86/nested_x2apic_test.c
+++ b/tools/testing/selftests/kvm/x86/nested_x2apic_test.c
@@ -61,57 +61,55 @@ static void l1_vmx_code(struct vmx_pages *vmx, struct hyperv_test_pages *hv_page
evmcs_enable();
}
- GUEST_ASSERT_EQ(prepare_for_vmx_operation(vmx), true);
+ prepare_for_vmx_operation(vmx);
if (hv_pages) {
- GUEST_ASSERT(load_evmcs(hv_pages));
+ load_evmcs(hv_pages);
current_evmcs->hv_enlightenments_control.msr_bitmap = 1;
} else {
- GUEST_ASSERT(load_vmcs(vmx));
+ load_vmcs(vmx);
}
prepare_vmcs(vmx, NULL);
vmwrite(GUEST_RIP, (unsigned long)l2_guest_code);
- control = vmreadz(PIN_BASED_VM_EXEC_CONTROL);
+ control = vmread(PIN_BASED_VM_EXEC_CONTROL);
control |= PIN_BASED_EXT_INTR_MASK;
vmwrite(PIN_BASED_VM_EXEC_CONTROL, control);
- control = vmreadz(CPU_BASED_VM_EXEC_CONTROL);
+ control = vmread(CPU_BASED_VM_EXEC_CONTROL);
control |= CPU_BASED_USE_MSR_BITMAPS | CPU_BASED_TPR_SHADOW;
- GUEST_ASSERT_EQ(vmwrite(CPU_BASED_VM_EXEC_CONTROL, control), 0);
+ vmwrite(CPU_BASED_VM_EXEC_CONTROL, control);
- control = vmreadz(SECONDARY_VM_EXEC_CONTROL);
+ control = vmread(SECONDARY_VM_EXEC_CONTROL);
control |= SECONDARY_EXEC_VIRTUALIZE_X2APIC_MODE |
SECONDARY_EXEC_APIC_REGISTER_VIRT |
SECONDARY_EXEC_VIRTUAL_INTR_DELIVERY;
control &= (rdmsr(MSR_IA32_VMX_PROCBASED_CTLS2) >> 32);
- GUEST_ASSERT_EQ(vmwrite(SECONDARY_VM_EXEC_CONTROL, control), 0);
+ vmwrite(SECONDARY_VM_EXEC_CONTROL, control);
- GUEST_ASSERT(!vmlaunch());
- GUEST_ASSERT_EQ(vmreadz(VM_EXIT_REASON), EXIT_REASON_CPUID);
- GUEST_ASSERT_EQ(vmwrite(GUEST_RIP,
- vmreadz(GUEST_RIP) + vmreadz(VM_EXIT_INSTRUCTION_LEN)), 0);
+ vmlaunch();
+ GUEST_ASSERT_EQ(vmread(VM_EXIT_REASON), EXIT_REASON_CPUID);
+ vmwrite(GUEST_RIP, vmread(GUEST_RIP) + vmread(VM_EXIT_INSTRUCTION_LEN));
}
static void l1_vmx_code_part2(void)
{
u64 control;
- control = vmreadz(CPU_BASED_VM_EXEC_CONTROL);
+ control = vmread(CPU_BASED_VM_EXEC_CONTROL);
control &= ~CPU_BASED_TPR_SHADOW;
- GUEST_ASSERT_EQ(vmwrite(CPU_BASED_VM_EXEC_CONTROL, control), 0);
+ vmwrite(CPU_BASED_VM_EXEC_CONTROL, control);
- control = vmreadz(SECONDARY_VM_EXEC_CONTROL);
+ control = vmread(SECONDARY_VM_EXEC_CONTROL);
control &= ~(SECONDARY_EXEC_VIRTUALIZE_X2APIC_MODE |
SECONDARY_EXEC_APIC_REGISTER_VIRT |
SECONDARY_EXEC_VIRTUAL_INTR_DELIVERY);
- GUEST_ASSERT_EQ(vmwrite(SECONDARY_VM_EXEC_CONTROL, control), 0);
+ vmwrite(SECONDARY_VM_EXEC_CONTROL, control);
- GUEST_ASSERT(!vmresume());
- GUEST_ASSERT_EQ(vmreadz(VM_EXIT_REASON), EXIT_REASON_CPUID);
- GUEST_ASSERT_EQ(vmwrite(GUEST_RIP,
- vmreadz(GUEST_RIP) + vmreadz(VM_EXIT_INSTRUCTION_LEN)), 0);
+ vmresume();
+ GUEST_ASSERT_EQ(vmread(VM_EXIT_REASON), EXIT_REASON_CPUID);
+ vmwrite(GUEST_RIP, vmread(GUEST_RIP) + vmread(VM_EXIT_INSTRUCTION_LEN));
}
static void l1_test_x2apic_intercepts(void)
next prev parent reply other threads:[~2026-09-30 15:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-30 13:09 linux-next: manual merge of the kvm-x86 tree with the kvm-fixes tree Mark Brown
2026-09-30 13:40 ` Sean Christopherson
2026-09-30 14:04 ` Mark Brown
2026-09-30 15:11 ` Sean Christopherson [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-03-12 17:21 Mark Brown
2026-03-12 17:54 ` Paolo Bonzini
2026-03-12 17:58 ` Sean Christopherson
2026-03-12 17:58 ` Mark Brown
2024-04-03 0:53 Stephen Rothwell
2024-04-03 13:30 ` 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=ar0msIOhuFY0RpCS@google.com \
--to=seanjc@google.com \
--cc=broonie@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=pbonzini@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.