|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XEN PATCH v4 12/14] x86/ioreq: guard VIO_realmode_completion with CONFIG_VMX
09.07.24 10:28, Jan Beulich: On 09.07.2024 08:09, Sergiy Kibrik wrote:--- a/xen/arch/x86/include/asm/hvm/ioreq.h +++ b/xen/arch/x86/include/asm/hvm/ioreq.h @@ -13,6 +13,11 @@ #define IOREQ_STATUS_UNHANDLED X86EMUL_UNHANDLEABLE #define IOREQ_STATUS_RETRY X86EMUL_RETRY+#ifdef CONFIG_VMX+bool arch_vcpu_ioreq_completion(enum vio_completion completion); +#define arch_vcpu_ioreq_completion +#endifPutting the (or some kind of) #define here is certainly fine, but moving ...--- a/xen/include/xen/ioreq.h +++ b/xen/include/xen/ioreq.h @@ -111,7 +111,6 @@ void ioreq_domain_init(struct domain *d); int ioreq_server_dm_op(struct xen_dm_op *op, struct domain *d, bool *const_op);bool arch_ioreq_complete_mmio(void);-bool arch_vcpu_ioreq_completion(enum vio_completion completion); int arch_ioreq_server_map_pages(struct ioreq_server *s); void arch_ioreq_server_unmap_pages(struct ioreq_server *s); void arch_ioreq_server_enable(struct ioreq_server *s); looking through these changes once again I wonder why can't we just move stub to the header like this: in xen/include/xen/ioreq.h: #ifdef arch_vcpu_ioreq_completion #ifdef CONFIG_VMX bool arch_vcpu_ioreq_completion(enum vio_completion completion); #elsestatic inline bool arch_vcpu_ioreq_completion(enum vio_completion completion)
{
ASSERT_UNREACHABLE();
return true;
}
#endif
and avoid additional pre-processor variables & conditionals, because it
looks like we do need some kind of stub that does ASSERT_UNREACHABLE()
anyway.
-Sergiy
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |