From: Bjoern Walk <bwalk@linux.ibm.com>
To: qemu-devel@nongnu.org
Cc: Steffen Eiden <seiden@linux.ibm.com>,
Andreas Grapentin <gra@linux.ibm.com>,
Bjoern Walk <bwalk@linux.ibm.com>,
Paolo Bonzini <pbonzini@redhat.com>,
kvm@vger.kernel.org (open list:Overall KVM CPUs)
Subject: [RFC Patch 7/8] kvm: Adjust system/kvm.h for updated KVM kernel headers
Date: Mon, 9 Nov 2026 18:10:33 +0100 [thread overview]
Message-ID: <20261109171036.3806884-8-bwalk@linux.ibm.com> (raw)
In-Reply-To: <20261109171036.3806884-1-bwalk@linux.ibm.com>
For the per-target code path which needs architecture-specific
definitions, include <asm/kvm.h>.
For the common code path, declare structs that <linux/kvm.h> consumes
from <asm/kvm.h> as empty and poison all identifiers that are size
dependent. This should allow common files to consume "system/kvm.h" with
a guarantee that there is no size inconsistency.
Signed-off-by: Andreas Grapentin <gra@linux.ibm.com>
Signed-off-by: Bjoern Walk <bwalk@linux.ibm.com>
---
include/system/kvm.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/include/system/kvm.h b/include/system/kvm.h
index 84c2efe9..51f360cd 100644
--- a/include/system/kvm.h
+++ b/include/system/kvm.h
@@ -24,12 +24,20 @@
#ifdef COMPILING_PER_TARGET
# ifdef CONFIG_KVM
+# include <asm/kvm.h>
# include <linux/kvm.h>
# define CONFIG_KVM_IS_POSSIBLE
# endif
#else
# define CONFIG_KVM_IS_POSSIBLE
+ struct kvm_debug_exit_arch {};
+ struct kvm_sync_regs {};
+ struct kvm_guest_debug_arch {};
# include <linux/kvm.h>
+# pragma GCC poison kvm_debug_exit_arch
+# pragma GCC poison kvm_sync_regs
+# pragma GCC poison kvm_guest_debug_arch
+# pragma GCC poison kvm_guest_debug
#endif
#ifdef CONFIG_KVM_IS_POSSIBLE
--
2.56.0
next prev parent reply other threads:[~2026-11-09 17:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20261109171036.3806884-1-bwalk@linux.ibm.com>
2026-11-09 17:10 ` [RFC Patch 2/8] kvm: Add header dependency in system/kvm.h explicitly Bjoern Walk
2026-11-09 17:10 ` [RFC Patch 3/8] kvm: Prefer including "system/kvm.h" over <linux/kvm.h> Bjoern Walk
2026-11-09 17:10 ` [RFC Patch 6/8] linux-headers: Update to post-processed KVM headers Bjoern Walk
2026-11-09 17:10 ` Bjoern Walk [this message]
2026-11-09 17:10 ` [RFC Patch 8/8] kvm: Explicitly include ARM-specific KVM UAPI headers Bjoern Walk
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=20261109171036.3806884-8-bwalk@linux.ibm.com \
--to=bwalk@linux.ibm.com \
--cc=gra@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=seiden@linux.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox