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? > --- 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. Jan