On 8/17/22 02: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'.
I wonder why Dario added the check? He even added a test for it:
cpu-phys-bits-passthrough2 in qemuxml2argvtest. He is off now, so we'll have to
await his return for an answer.
Signed-off-by: Lin Ma <lma@xxxxxxxx>
---
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 the check is removed the above mentioned test needs removed too.
Regards,
Jim
if (addr->bits != -1) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("CPU maximum physical address bits number specification cannot be used with mode='%s'"),