diff options
author | Liran Alon | 2020-03-12 17:54:19 +0100 |
---|---|---|
committer | Paolo Bonzini | 2020-06-10 18:09:44 +0200 |
commit | 0342ee761ef27a0def476dab3e284f924b3c801e (patch) | |
tree | 3c72df6987377ef170bf9e28c764162188e710d3 /hw/core/machine.c | |
parent | hw/i386/vmport: Propagate IOPort read to vCPU EAX register (diff) | |
download | qemu-0342ee761ef27a0def476dab3e284f924b3c801e.tar.gz qemu-0342ee761ef27a0def476dab3e284f924b3c801e.tar.xz qemu-0342ee761ef27a0def476dab3e284f924b3c801e.zip |
hw/i386/vmport: Set EAX to -1 on failed and unsupported commands
This is used as a signal for VMware Tools to know if a command it
attempted to invoke, failed or is unsupported. As a result, VMware Tools
will either report failure to user or fallback to another backdoor command
in attempt to perform some operation.
A few examples:
* open-vm-tools TimeSyncReadHost() function fallbacks to
CMD_GETTIMEFULL command when CMD_GETTIMEFULL_WITH_LAG
fails/unsupported.
* open-vm-tools Hostinfo_NestingSupported() function verifies
EAX != -1 to check for success.
* open-vm-tools Hostinfo_VCPUInfoBackdoor() functions checks
if reserved-bit is set to indicate command is unimplemented.
Reviewed-by: Nikita Leshenko <nikita.leshchenko@oracle.com>
Signed-off-by: Liran Alon <liran.alon@oracle.com>
Message-Id: <20200312165431.82118-5-liran.alon@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/core/machine.c')
-rw-r--r-- | hw/core/machine.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/core/machine.c b/hw/core/machine.c index 83f0fe5c91..fc209d711b 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -44,6 +44,7 @@ GlobalProperty hw_compat_4_2[] = { { "qxl-vga", "revision", "4" }, { "fw_cfg", "acpi-mr-restore", "false" }, { "vmport", "x-read-set-eax", "off" }, + { "vmport", "x-signal-unsupported-cmd", "off" }, }; const size_t hw_compat_4_2_len = G_N_ELEMENTS(hw_compat_4_2); |