[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] x86: Add missing forward declaration and include to hvm/svm/vmcb.h
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>
- Date: Mon, 6 Oct 2025 12:46:07 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3IcmOquuMdT2tsa4Dun9crV41S9EzCt6xvNtoPns56s=; b=FJILVGHh7F2yB64rE8Ps7QXxCNkVdRvy+773EEimozDC8/036Ak/wIf10dWL6ZJyLdpDj3xgqVZahFEaBokK/O8thHjr0t+y9urV4W2AH69BdxXCIOWFFtJiAfwSFOKpHp4U+lRApMLchZJGcswMiszM51iskAMc6FYcall7LyHevWtdAbFoYYtONNgpWRGXqr4pIYucSTlZujqXdkMW2b609DYoPfbmgJvfYD55aE+A0vJNFv3MOxQSc/NRrCkcuEhADu+GAyMLlA4Tx4XLPb4WQXBAmwYT6ZVkk1DjExxLBocwBPAtS9/hwP0en1H9XlUUiAxz8/uxcizvaY/8Kw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=rloARH8sU+T7ylqrM1BMw0zJhZdBM55oyAQLUcHThR5bVwWKsY026g+8GcGD5wzGiTuL33y5WArw8UdHx+hd1M64zobc7T0FgZTZ12VVPQJEh4k+Uq1Cra3x2kPpYpTgMvFFWKdPdiqL3dYHPWmxvwqurn4axSBrwDDzCCX6+2zl2/JxE0uMYJ6ZBxGBlSa1GU5yMYjPTtEpDHP5sr61OU9Il/c8jO84FczGAQIyxCjE2pBprHiBZYq1yBLF6zg2srW50YhL37wK+g3pA5qw+r3Aw4Z5njyQMOeQiM5Ni+xnZ7Kj5w9ASbdNim0WKvzZJvtGeNIV1nzGs+nVY1J6aQ==
- Cc: Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Delivery-date: Mon, 06 Oct 2025 10:46:41 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
"struct segment_register" requires a prior inclusion of x86_emulate.h,
and it's missing a forward declaration of "struct vcpu" too.
Sort these out so the header can be included by itself.
Not a functional change.
Signed-off-by: Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>
---
This dependency already exists today. I'm just making it explicit.
"segment_register" is weird. It naturally belongs in vmcb.h, but the
emulator makes use of it and must be compilable outside of Xen.
I don't like having vmcb.h depending on the emulator header, but I see
no way of breaking that dependency without breaking the emulator unit
tests.
---
xen/arch/x86/include/asm/hvm/svm/vmcb.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/xen/arch/x86/include/asm/hvm/svm/vmcb.h
b/xen/arch/x86/include/asm/hvm/svm/vmcb.h
index 28f715e376..7c599a1c39 100644
--- a/xen/arch/x86/include/asm/hvm/svm/vmcb.h
+++ b/xen/arch/x86/include/asm/hvm/svm/vmcb.h
@@ -10,6 +10,10 @@
#include <xen/types.h>
+#include <asm/x86_emulate.h> /* for "struct segment_register" */
+
+struct vcpu;
+
/* general 1 intercepts */
enum GenericIntercept1bits
{
base-commit: b6fc307b0b00314d4e4460fcf8be2cd9e4ff8652
--
2.43.0
|