16.05.24 15:11, Jan Beulich:
On 15.05.2024 11:24, Sergiy Kibrik wrote:
--- a/xen/arch/x86/hvm/emulate.c
+++ b/xen/arch/x86/hvm/emulate.c
@@ -2667,7 +2667,9 @@ static int _hvm_emulate_one(struct hvm_emulate_ctxt
*hvmemul_ctxt,
break;
case VIO_mmio_completion:
+#ifdef CONFIG_VMX
case VIO_realmode_completion:
+#endif
BUILD_BUG_ON(sizeof(hvio->mmio_insn) <
sizeof(hvmemul_ctxt->insn_buf));
hvio->mmio_insn_bytes = hvmemul_ctxt->insn_buf_bytes;
memcpy(hvio->mmio_insn, hvmemul_ctxt->insn_buf,
hvio->mmio_insn_bytes);
This change doesn't buy us anything, does it?
why not? Code won't compile w/o it.
Or do you mean hiding the whole VIO_realmode_completion enum under
CONFIG_VMX wasn't really useful?
--- a/xen/arch/x86/hvm/ioreq.c
+++ b/xen/arch/x86/hvm/ioreq.c
@@ -33,6 +33,7 @@ bool arch_vcpu_ioreq_completion(enum vio_completion
completion)
{
switch ( completion )
{
+#ifdef CONFIG_VMX
case VIO_realmode_completion:
{
struct hvm_emulate_ctxt ctxt;
@@ -43,6 +44,7 @@ bool arch_vcpu_ioreq_completion(enum vio_completion
completion)
break;
}
+#endif
default:
ASSERT_UNREACHABLE();
And while this change is needed for the goal of the series, I wonder whether
it wouldn't better be arch_vcpu_ioreq_completion() as whole that then gets
stubbed out.
I'll post a patch to this thread to confirm whether I got your point
correctly.
-Sergiy