aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/vl.c b/vl.c
index cdb91591c5..5f237d0a06 100644
--- a/vl.c
+++ b/vl.c
@@ -3405,6 +3405,7 @@ static void qemu_bh_update_timeout(int *timeout)
/* machine registration */
static QEMUMachine *first_machine = NULL;
+QEMUMachine *current_machine = NULL;
int qemu_register_machine(QEMUMachine *m)
{
@@ -5587,6 +5588,8 @@ int main(int argc, char **argv, char **envp)
machine->init(ram_size, vga_ram_size, boot_devices,
kernel_filename, kernel_cmdline, initrd_filename, cpu_model);
+ current_machine = machine;
+
/* Set KVM's vcpu state to qemu's initial CPUState. */
if (kvm_enabled()) {
int ret;