All of lore.kernel.org
 help / color / mirror / Atom feed
From: Like Xu <like.xu.linux@gmail.com>
To: kvm@vger.kernel.org
Cc: Jim Mattson <jmattson@google.com>,
	seanjc@google.com, pbonzini@redhat.com
Subject: Re: [kvm-unit-tests PATCH 0/5] nVMX: Simple posted interrupts test
Date: Wed, 9 Oct 2024 14:48:28 +0800	[thread overview]
Message-ID: <7fe8970c-ecb7-4e46-be76-488d7697d8db@gmail.com> (raw)
In-Reply-To: <20231211185552.3856862-1-jmattson@google.com>

On 12/12/23 2:55 AM, Jim Mattson wrote:
> I reported recently that commit 26844fee6ade ("KVM: x86: never write to
> memory from kvm_vcpu_check_block()") broke delivery of a virtualized posted
> interrupt from an L1 vCPU to a halted L2 vCPU (see
> https://lore.kernel.org/all/20231207010302.2240506-1-jmattson@google.com/).
> The test that exposed the regression is the final patch of this series. The
> others are prerequisites.
> 
> It would make sense to add "vmx_posted_interrupts_test" to the set of tests
> to be run under the unit test name, "vmx_apicv_test," but that is
> non-trivial. The vmx_posted_interrupts_test requires "smp = 2," but I find
> that adding that to the vmx_apicv_tests causes virt_x2apic_mode_test to
> fail with:
> 
> FAIL: x2apic - reading 0x310: x86/vmx_tests.c:2151: Assertion failed: (expected) == (actual)
> 	LHS: 0x0000000000000012 - 0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0001'0010 - 18
> 	RHS: 0x0000000000000001 - 0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0001 - 1
> Expected VMX_VMCALL, got VMX_EXTINT.
> 	STACK: 406ef8 40725a 41299f 402036 403f59 4001bd
> 
> I haven't investigated.

This vmx_apicv_test test still fails when 'ept=N' (SPR + v6.12-rc2):

--- Virtualize APIC accesses + Use TPR shadow test ---
FAIL: xapic - reading 0x080: read 0x0, expected 0x70.
FAIL: xapic - writing 0x12345678 to 0x080: exitless write; val is 0x0, 
want 0x70

--- APIC-register virtualization test ---
FAIL: xapic - reading 0x020: read 0x0, expected 0x12345678.
FAIL: xapic - writing 0x12345678 to 0x020: x86/vmx_tests.c:2164: 
Assertion failed: (expected) == (actual)
	LHS: 0x0000000000000038 - 
0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0011'1000 
- 56
	RHS: 0x0000000000000012 - 
0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0001'0010 
- 18
Expected VMX_APIC_WRITE, got VMX_VMCALL.
	STACK: 406f7f 40d178 40202f 403f54 4001bd

> 
> 
> Jim Mattson (1):
>    nVMX: Enable x2APIC mode for virtual-interrupt delivery tests
> 
> Marc Orr (Google) (3):
>    nVMX: test nested "virtual-interrupt delivery"
>    nVMX: test nested EOI virtualization
>    nVMX: add self-IPI tests to vmx_basic_vid_test
> 
> Oliver Upton (1):
>    nVMX: add test for posted interrupts
> 
>   lib/x86/apic.h       |   5 +
>   lib/x86/asm/bitops.h |   8 +
>   x86/unittests.cfg    |  10 +-
>   x86/vmx_tests.c      | 423 +++++++++++++++++++++++++++++++++++++++++++
>   4 files changed, 445 insertions(+), 1 deletion(-)
> 

  parent reply	other threads:[~2024-10-09  6:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-11 18:55 [kvm-unit-tests PATCH 0/5] nVMX: Simple posted interrupts test Jim Mattson
2023-12-11 18:55 ` [kvm-unit-tests PATCH 1/5] nVMX: Enable x2APIC mode for virtual-interrupt delivery tests Jim Mattson
2023-12-11 18:55 ` [kvm-unit-tests PATCH 2/5] nVMX: test nested "virtual-interrupt delivery" Jim Mattson
2023-12-11 18:55 ` [kvm-unit-tests PATCH 3/5] nVMX: test nested EOI virtualization Jim Mattson
2023-12-11 18:55 ` [kvm-unit-tests PATCH 4/5] nVMX: add self-IPI tests to vmx_basic_vid_test Jim Mattson
2023-12-11 18:55 ` [kvm-unit-tests PATCH 5/5] nVMX: add test for posted interrupts Jim Mattson
2024-06-05 23:20 ` [kvm-unit-tests PATCH 0/5] nVMX: Simple posted interrupts test Sean Christopherson
2024-10-09  6:48 ` Like Xu [this message]
2024-10-14  8:56   ` Chao Gao
2024-10-16 15:59     ` 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=7fe8970c-ecb7-4e46-be76-488d7697d8db@gmail.com \
    --to=like.xu.linux@gmail.com \
    --cc=jmattson@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.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.