summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPeter Maydell2020-03-02 10:37:06 +0100
committerPeter Maydell2020-03-02 10:37:06 +0100
commita4c7ed8b89e8919ddb71c78c4f42b8fdc455ac27 (patch)
tree06d62e3a633ee467010a132133c8fbe33305598b /include
parentMerge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20200228'... (diff)
parentvl: Abort if multiple machines are registered as default (diff)
downloadqemu-a4c7ed8b89e8919ddb71c78c4f42b8fdc455ac27.tar.gz
qemu-a4c7ed8b89e8919ddb71c78c4f42b8fdc455ac27.tar.xz
qemu-a4c7ed8b89e8919ddb71c78c4f42b8fdc455ac27.zip
Merge remote-tracking branch 'remotes/ehabkost/tags/machine-next-pull-request' into staging
Machine queue, 2020-02-28 Cleanups: * Fix NMI() macro (Philippe Mathieu-Daudé) * Make MachineClass::is_default boolean, refuse multiple default machines (Philippe Mathieu-Daudé) # gpg: Signature made Fri 28 Feb 2020 21:03:20 GMT # gpg: using RSA key 5A322FD5ABC4D3DBACCFD1AA2807936F984DC5A6 # gpg: issuer "ehabkost@redhat.com" # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" [full] # Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF D1AA 2807 936F 984D C5A6 * remotes/ehabkost/tags/machine-next-pull-request: vl: Abort if multiple machines are registered as default hw: Make MachineClass::is_default a boolean type hw: Do not initialize MachineClass::is_default to 0 hw/nmi: Fix the NMI() macro, based on INTERFACE_CHECK() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/hw/boards.h4
-rw-r--r--include/hw/nmi.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/include/hw/boards.h b/include/hw/boards.h
index 142b86d0ae..9bc42dfb22 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -81,6 +81,8 @@ typedef struct {
* @max_cpus: maximum number of CPUs supported. Default: 1
* @min_cpus: minimum number of CPUs supported. Default: 1
* @default_cpus: number of CPUs instantiated if none are specified. Default: 1
+ * @is_default:
+ * If true QEMU will use this machine by default if no '-M' option is given.
* @get_hotplug_handler: this function is called during bus-less
* device hotplug. If defined it returns pointer to an instance
* of HotplugHandler object, which handles hotplug operation
@@ -181,7 +183,7 @@ struct MachineClass {
no_sdcard:1,
pci_allow_0_address:1,
legacy_fw_cfg_order:1;
- int is_default;
+ bool is_default;
const char *default_machine_opts;
const char *default_boot_order;
const char *default_display;
diff --git a/include/hw/nmi.h b/include/hw/nmi.h
index a1e128724e..fe37ce3ad8 100644
--- a/include/hw/nmi.h
+++ b/include/hw/nmi.h
@@ -31,7 +31,7 @@
#define NMI_GET_CLASS(obj) \
OBJECT_GET_CLASS(NMIClass, (obj), TYPE_NMI)
#define NMI(obj) \
- INTERFACE_CHECK(NMI, (obj), TYPE_NMI)
+ INTERFACE_CHECK(NMIState, (obj), TYPE_NMI)
typedef struct NMIState NMIState;