File kernel-6.16-READ-WRITE.patch of Package virtualbox
From: Jiri Slaby <jslaby@suse.cz>
Subject: hm_vmx: Don't expand READ+WRITE
They are defined as:
#define READ 0
#define WRITE 1
since 6.16:
commit 4ef5211ee68113070bd42142f06347866675055e
Author: Ingo Molnar <mingo@kernel.org>
Date: Mon Mar 24 12:50:24 2025 +0200
kernel.h: move READ/WRITE definitions to <linux/types.h>
That causes build failures indeed:
./include/VBox/vmm/hm_vmx.h:548:29: error: 'VMX_BF_EPT_PT_0_MASK' undeclared here (not in a function); did you mean 'VMX_BF_EPT_PT_READ_MASK'?
That 0_MASK should really be READ_MASK.
---
include/VBox/vmm/hm_vmx.h | 2 ++
1 file changed, 2 insertions(+)
--- a/include/VBox/vmm/hm_vmx.h
+++ b/include/VBox/vmm/hm_vmx.h
@@ -542,6 +542,8 @@
/** Suppress \#VE. */
#define VMX_BF_EPT_PT_SUPPRESS_VE_SHIFT 63
#define VMX_BF_EPT_PT_SUPPRESS_VE_MASK UINT64_C(0x8000000000000000)
+#undef READ
+#undef WRITE
RT_BF_ASSERT_COMPILE_CHECKS(VMX_BF_EPT_PT_, UINT64_C(0), UINT64_MAX,
(READ, WRITE, EXECUTE, MEMTYPE, IGNORE_PAT, IGN_7, ACCESSED, DIRTY, EXECUTE_USER, IGN_59_11,
SUPER_SHW_STACK, IGN_62_61, SUPPRESS_VE));