On 8/17/22 10:19, Lin Ma wrote: > Besides the -cpu host, The host-phys-bits=on applies to custom or max > cpu model, So the host-passthrough validation check is unnecessary for > maxphysaddr with mode='passthrough'. > > Signed-off-by: Lin Ma <l...@suse.com> > --- > src/qemu/qemu_validate.c | 7 ------- > 1 file changed, 7 deletions(-) > > diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c > index 6e457f3814..e60575d8a0 100644 > --- a/src/qemu/qemu_validate.c > +++ b/src/qemu/qemu_validate.c > @@ -344,13 +344,6 @@ qemuValidateDomainDefCpu(virQEMUDriver *driver, > > switch (addr->mode) { > case VIR_CPU_MAX_PHYS_ADDR_MODE_PASSTHROUGH: > - if (def->cpu->mode != VIR_CPU_MODE_HOST_PASSTHROUGH) { > - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, > - _("CPU maximum physical address bits mode > '%s' can only be used with '%s' CPUs"), > - virCPUMaxPhysAddrModeTypeToString(addr->mode), > - > virCPUModeTypeToString(VIR_CPU_MODE_HOST_PASSTHROUGH)); > - return -1; > - } > if (addr->bits != -1) { > virReportError(VIR_ERR_CONFIG_UNSUPPORTED, > _("CPU maximum physical address bits number > specification cannot be used with mode='%s'"),
Hmm what was the reason for this, maybe Dario knows? In my view we definitely do not want to restrict this to VIR_CPU_MODE_HOST_PASSTHROUGH only, but this should be restricted in my view to QEMU hw accelerators that use host cpuid (as per accel_uses_host_cpuid() -> true), which are KVM and HVF. Not sure how to properly check that? Ciao, CLaudio