Linux Documentation
 help / color / mirror / Atom feed
From: Tim Wiederhake <twiederh@redhat.com>
To: Sean Christopherson <seanjc@google.com>,
	Jonathan Corbet <corbet@lwn.net>,
	kvm@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, Paolo Bonzini <pbonzini@redhat.com>,
	Shuah Khan <skhan@linuxfoundation.org>
Cc: Tim Wiederhake <twiederh@redhat.com>
Subject: [PATCH v2 0/2] KVM: x86: Document APIC base memory hole constraint
Date: Wed,  8 Jul 2026 15:38:53 +0200	[thread overview]
Message-ID: <20260708133856.302151-1-twiederh@redhat.com> (raw)

When virtual APIC access acceleration is enabled on x86 (APICv on
Intel, AVIC on AMD), vcpu creation installs a private memory slot at
the default APIC base address (0xfee00000).  If user space maps a
memory region covering that address, vcpu creation fails with -EEXIST.
This is not documented and very puzzling when it happens.

This series documents two undocumented constraints:

  1/2  KVM_CREATE_IRQCHIP must precede vcpu creation
  2/2  APIC base address memory hole when APIC acceleration is enabled

Thanks to Sean Christopherson for the thorough review of v1.

Changes since v1:
  - Dropped enforcement patches (3/4, 4/4) per review feedback.
  - Patch 1/2: Reworded to avoid implying that KVM_CREATE_IRQCHIP is
    mandatory.
  - Patch 2/2: Reworded to reflect that the APIC access page is not
    installed in every case. Added note about KVM_CAP_SPLIT_IRQCHIP
    having the same constraint.

v1: https://lore.kernel.org/kvm/20260706092021.3625908-2-twiederh@redhat.com/

Tim Wiederhake (2):
  KVM: x86: Document that KVM_CREATE_IRQCHIP must precede vcpu creation
  KVM: x86: Document APIC base address constraint for in-kernel irqchip

 Documentation/virt/kvm/api.rst | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

-- 
2.52.0


             reply	other threads:[~2026-07-08 13:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-08 13:38 Tim Wiederhake [this message]
2026-07-08 13:38 ` [PATCH 1/2] KVM: x86: Document that KVM_CREATE_IRQCHIP must precede vcpu creation Tim Wiederhake
2026-07-08 13:38 ` [PATCH 2/2] KVM: x86: Document APIC base address constraint for in-kernel irqchip Tim Wiederhake

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=20260708133856.302151-1-twiederh@redhat.com \
    --to=twiederh@redhat.com \
    --cc=corbet@lwn.net \
    --cc=kvm@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=skhan@linuxfoundation.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