On Tue, Oct 12, 2021 at 12:38:35PM +0200, Michal Orzel wrote:
> Hi Roger,
> 
> On 11.10.2021 11:27, Roger Pau Monné wrote:
> > On Wed, Oct 06, 2021 at 06:40:33PM +0100, Rahul Singh wrote:
> >> Introduce XEN_DOMCTL_CDF_vpci flag to enable VPCI support in XEN.
> >> Reject the use of this new flag for x86 as VPCI is not supported for
> >> DOMU guests for x86.
> > 
> > I don't like this approach, XEN_DOMCTL_CDF_vpci should be set for x86
> > PVH dom0, like we do for any other CDF flags when Xen builds dom0.
> > 
> > Things like PVH vs PV get translated into CDF flags by create_dom0,
> > and processed normally by the sanitise_domain_config logic, vPCI
> > should be handled that way.
> > 
> > Do you think you could see about fixing this?
> > 
> > Thanks, Roger.
> > 
> 
> I have one question about this fix.
> If I set XEN_DOMCTL_CDF_vpci for dom0 pvh in create_dom0, then in
> sanitise_domain_config or arch_sanitise_domain_config I have no
> knowledge on whether I am dom0 or not. I can check if I'm PVH but not if dom0.
> This would be needed to add a warning if this flag is set but we are not dom0 
> pvh.
> 
> Any ideas?

I've just realized this is more wrong that I thought. vPCI is
signaled on x86 in xen_arch_domainconfig.emulation_flags, so
introducing a top level option for it without removing the arch
specific one is wrong, as then on x86 we have a duplicated option.

Then I'm also not sure whether we want to move it from
emulation_flags, it seems like the more natural place for it to live
on x86.

If we really want to make vPCI a CDF option we must deal with the
removal of XEN_X86_EMU_VPCI, or else you could introduce an arch
specific flag for vPCI on Arm.

Thanks, Roger.

Reply via email to