Commit b154537a authored by Dr. David Alan Gilbert's avatar Dr. David Alan Gilbert Committed by Paolo Bonzini
Browse files

-machine vmport=off: Allow disabling of VMWare ioport emulation

This is a pc & q35 only machine opt.

VMWare apparently doesn't like running under QEMU due to our
incomplete emulation of it's special IO Port.  This adds a
pc & q35 property to allow it to be turned off.
Signed-off-by: default avatarDr. David Alan Gilbert <>
Signed-off-by: default avatarDon Slutz <>
Signed-off-by: default avatarPaolo Bonzini <>
parent 7957ee71
......@@ -1688,6 +1688,20 @@ static void pc_machine_set_max_ram_below_4g(Object *obj, Visitor *v,
pcms->max_ram_below_4g = value;
static bool pc_machine_get_vmport(Object *obj, Error **errp)
PCMachineState *pcms = PC_MACHINE(obj);
return pcms->vmport;
static void pc_machine_set_vmport(Object *obj, bool value, Error **errp)
PCMachineState *pcms = PC_MACHINE(obj);
pcms->vmport = value;
static void pc_machine_initfn(Object *obj)
PCMachineState *pcms = PC_MACHINE(obj);
......@@ -1700,6 +1714,11 @@ static void pc_machine_initfn(Object *obj)
pcms->vmport = !xen_enabled();
object_property_add_bool(obj, PC_MACHINE_VMPORT,
static void pc_machine_class_init(ObjectClass *oc, void *data)
......@@ -234,8 +234,8 @@ static void pc_init1(MachineState *machine,
pc_vga_init(isa_bus, pci_enabled ? pci_bus : NULL);
/* init basic PC hardware */
pc_basic_device_init(isa_bus, gsi, &rtc_state, &floppy, xen_enabled(),
pc_basic_device_init(isa_bus, gsi, &rtc_state, &floppy,
!pc_machine->vmport, 0x4);
pc_nic_init(isa_bus, pci_bus);
......@@ -242,7 +242,8 @@ static void pc_q35_init(MachineState *machine)
/* init basic PC hardware */
pc_basic_device_init(isa_bus, gsi, &rtc_state, &floppy, false, 0xff0104);
pc_basic_device_init(isa_bus, gsi, &rtc_state, &floppy,
!pc_machine->vmport, 0xff0104);
/* connect pm stuff to lpc */
......@@ -35,11 +35,13 @@ struct PCMachineState {
HotplugHandler *acpi_dev;
uint64_t max_ram_below_4g;
bool vmport;
#define PC_MACHINE_ACPI_DEVICE_PROP "acpi-device"
#define PC_MACHINE_MEMHP_REGION_SIZE "hotplug-memory-region-size"
#define PC_MACHINE_MAX_RAM_BELOW_4G "max-ram-below-4g"
#define PC_MACHINE_VMPORT "vmport"
* PCMachineClass:
......@@ -33,6 +33,7 @@ DEF("machine", HAS_ARG, QEMU_OPTION_machine, \
" property accel=accel1[:accel2[:...]] selects accelerator\n"
" supported accelerators are kvm, xen, tcg (default: tcg)\n"
" kernel_irqchip=on|off controls accelerated irqchip support\n"
" vmport=on|off controls emulation of vmport (default: on)\n"
" kvm_shadow_mem=size of KVM shadow MMU\n"
" dump-guest-core=on|off include guest memory in a core dump (default=on)\n"
" mem-merge=on|off controls memory merge support (default: on)\n"
......@@ -51,6 +52,8 @@ than one accelerator specified, the next one is used if the previous one fails
to initialize.
@item kernel_irqchip=on|off
Enables in-kernel irqchip support for the chosen accelerator when available.
@item vmport=on|off
Enables emulation of VMWare IO port, for vmmouse etc. (enabled by default)
@item kvm_shadow_mem=size
Defines the size of the KVM shadow MMU.
@item dump-guest-core=on|off
......@@ -376,6 +376,10 @@ static QemuOptsList qemu_machine_opts = {
.type = QEMU_OPT_SIZE,
.help = "maximum ram below the 4G boundary (32bit boundary)",
}, {
.type = QEMU_OPT_BOOL,
.help = "Enable vmport (pc & q35)",
.name = "iommu",
.type = QEMU_OPT_BOOL,
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment