On 11/14/23 04:11, Jan Beulich wrote: > On 13.11.2023 23:21, Stewart Hildebrand wrote: >> @@ -709,10 +710,17 @@ int arch_sanitise_domain_config(struct >> xen_domctl_createdomain *config) >> return -EINVAL; >> } >> >> + if ( vpci && !hvm ) >> + { >> + dprintk(XENLOG_INFO, "vPCI requested for non-HVM guest\n"); >> + return -EINVAL; >> + } >> + >> return 0; >> } > > As said on the v5 thread, I think my comment was misguided (I'm sorry) > and this wants keeping in common code as you had it.
I'll move it back to xen/common/domain.c. No worries. > >> --- a/xen/include/public/arch-x86/xen.h >> +++ b/xen/include/public/arch-x86/xen.h >> @@ -283,15 +283,16 @@ struct xen_arch_domainconfig { >> #define XEN_X86_EMU_PIT (1U<<_XEN_X86_EMU_PIT) >> #define _XEN_X86_EMU_USE_PIRQ 9 >> #define XEN_X86_EMU_USE_PIRQ (1U<<_XEN_X86_EMU_USE_PIRQ) >> -#define _XEN_X86_EMU_VPCI 10 >> -#define XEN_X86_EMU_VPCI (1U<<_XEN_X86_EMU_VPCI) >> +/* >> + * Note: bit 10 was previously used for a XEN_X86_EMU_VPCI flag. This bit >> should >> + * not be re-used without careful consideration. >> + */ > > I think a multi-line comment is drawing overly much attention to this. > How about "Note: Bit 10 was previously used for XEN_X86_EMU_VPCI. Re-use > with care." which I think fits in a single line comment. Sounds good. > > Jan