Rather than asserting a capability based on architecture, format the
fallback parameter based on the presence of the newer capability and an
explicit architecture check.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
src/qemu/qemu_command.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 189be55537..8d96f69f3d 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -5936,9 +5936,11 @@ qemuBuildClockCommandLine(virCommand *cmd,
* -no-hpet exists is VIR_TRISTATE_BOOL_YES, and when -no-hpet
* doesn't exist is VIR_TRISTATE_BOOL_NO. "confusing"? "yes"! */
- if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_NO_HPET)) {
- if (def->clock.timers[i]->present == VIR_TRISTATE_BOOL_NO)
- virCommandAddArg(cmd, "-no-hpet");
+ if (def->clock.timers[i]->present == VIR_TRISTATE_BOOL_NO &&
+ !virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_HPET) &&
+ (def->os.arch == VIR_ARCH_I686 ||
+ def->os.arch == VIR_ARCH_X86_64)) {
+ virCommandAddArg(cmd, "-no-hpet");
}
break;
}
--
2.39.2