[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 03/11] hw/core: Restrict 'query-machines' to those supported b
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v2 03/11] hw/core: Restrict 'query-machines' to those supported by current accel |
Date: |
Fri, 19 Feb 2021 18:38:39 +0100 |
Do not let 'query-machines' return machines not valid with
the current accelerator.
Suggested-by: Daniel Berrangé <berrange@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
hw/core/machine-qmp-cmds.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c
index 44e979e503b..c8630bc2ddc 100644
--- a/hw/core/machine-qmp-cmds.c
+++ b/hw/core/machine-qmp-cmds.c
@@ -204,6 +204,10 @@ MachineInfoList *qmp_query_machines(Error **errp)
MachineClass *mc = el->data;
MachineInfo *info;
+ if (!machine_class_valid_for_current_accelerator(mc)) {
+ continue;
+ }
+
info = g_malloc0(sizeof(*info));
if (mc->is_default) {
info->has_is_default = true;
--
2.26.2
- Re: [PATCH v2 01/11] accel/kvm: Check MachineClass kvm_type() return value, (continued)
- Re: [PATCH v2 01/11] accel/kvm: Check MachineClass kvm_type() return value, Cornelia Huck, 2021/02/22
- Re: [PATCH v2 01/11] accel/kvm: Check MachineClass kvm_type() return value, Philippe Mathieu-Daudé, 2021/02/22
- Re: [PATCH v2 01/11] accel/kvm: Check MachineClass kvm_type() return value, David Gibson, 2021/02/22
- Re: [PATCH v2 01/11] accel/kvm: Check MachineClass kvm_type() return value, David Gibson, 2021/02/22
- Re: [PATCH v2 01/11] accel/kvm: Check MachineClass kvm_type() return value, Cornelia Huck, 2021/02/23
- Re: [PATCH v2 01/11] accel/kvm: Check MachineClass kvm_type() return value, Philippe Mathieu-Daudé, 2021/02/23
[PATCH v2 02/11] hw/boards: Introduce machine_class_valid_for_accelerator(), Philippe Mathieu-Daudé, 2021/02/19
[PATCH v2 03/11] hw/core: Restrict 'query-machines' to those supported by current accel,
Philippe Mathieu-Daudé <=
[PATCH v2 04/11] hw/arm: Restrit KVM to the virt & versal machines, Philippe Mathieu-Daudé, 2021/02/19
[PATCH v2 05/11] hw/mips: Restrict KVM to the malta & virt machines, Philippe Mathieu-Daudé, 2021/02/19
[RFC PATCH v2 06/11] hw/ppc: Restrict KVM to various PPC machines, Philippe Mathieu-Daudé, 2021/02/19
[PATCH v2 07/11] hw/s390x: Explicit the s390-ccw-virtio machines support TCG and KVM, Philippe Mathieu-Daudé, 2021/02/19