All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Manali Shukla <manali.shukla@amd.com>
Cc: kvm@vger.kernel.org, linux-kselftest@vger.kernel.org,
	pbonzini@redhat.com,  shuah@kernel.org, nikunj@amd.com,
	thomas.lendacky@amd.com,  ajones@ventanamicro.com
Subject: Re: [PATCH v2 2/3] KVM: selftests: Extend @shape to allow creation of VM without in-kernel APIC
Date: Mon, 1 Apr 2024 10:15:34 -0700	[thread overview]
Message-ID: <ZgrrtnZCllrt-3TD@google.com> (raw)
In-Reply-To: <20240401152032.4284-3-manali.shukla@amd.com>

On Mon, Apr 01, 2024, Manali Shukla wrote:
> Currently, all the VMs are created with in-kernel APIC support in KVM
> selftests because KVM_CREATE_IRQCHIP ioctl is called by default from
> kvm_arch_vm_post_create().
> 
> Carve out space in the @shape passed to the various VM creation helpers to
> allow using the shape to control creation of a VM without in-kernel APIC
> support or with in-kernel APIC support.
> 
> This is a preparatory patch to create a vm without in-kernel APIC support for
> the KVM_X86_DISABLE_EXITS_HLT test.

Ugh, when I suggested creating a VM without an in-kernel APIC as away to easily
test that HLT doesn't exit, I wasn't thinking about the side effects of creating
a runnable VM without an in-kernel APIC.  The other downside is that practically
no one uses a userspace local APIC these days, i.e. the selftest isn't a great
representation of real world setups.

Given that KVM already provides vcpu->stat.halt_exits, using a stats FD for
verifying exiting behavior is probably a better option.  The other check that
could be added would be to verify that mp_state is always RUNNABLE (which is a
bug/gap in KVM as migrating a vCPU that was halted in the guest won't resume in
a halted state on the target).

  reply	other threads:[~2024-04-01 17:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-01 15:20 [PATCH v2 0/3] Add a test case for KVM_X86_DISABLE_EXIT Manali Shukla
2024-04-01 15:20 ` [PATCH v2 1/3] KVM: selftests: Add safe_halt() and cli() helpers to common code Manali Shukla
2024-04-01 15:20 ` [PATCH v2 2/3] KVM: selftests: Extend @shape to allow creation of VM without in-kernel APIC Manali Shukla
2024-04-01 17:15   ` Sean Christopherson [this message]
2024-04-04 10:38     ` Manali Shukla
2024-04-01 15:20 ` [PATCH v2 3/3] KVM: selftests: Add a test case for KVM_X86_DISABLE_EXITS_HLT Manali Shukla
2024-04-01 16:59   ` Dongli Zhang
2024-04-15  9:49     ` 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=ZgrrtnZCllrt-3TD@google.com \
    --to=seanjc@google.com \
    --cc=ajones@ventanamicro.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=manali.shukla@amd.com \
    --cc=nikunj@amd.com \
    --cc=pbonzini@redhat.com \
    --cc=shuah@kernel.org \
    --cc=thomas.lendacky@amd.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.