[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PULL 027/115] hw/i386/vmport: Propagate IOPort read to vCPU EAX reg
From: |
Laurent Vivier |
Subject: |
Re: [PULL 027/115] hw/i386/vmport: Propagate IOPort read to vCPU EAX register |
Date: |
Tue, 23 Jun 2020 10:46:42 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 |
On 11/06/2020 21:43, Paolo Bonzini wrote:
> From: Liran Alon <liran.alon@oracle.com>
>
> vmport_ioport_read() returns the value that should propagate to vCPU EAX
> register when guest reads VMPort IOPort (i.e. By x86 IN instruction).
>
> However, because vmport_ioport_read() calls cpu_synchronize_state(), the
> returned value gets overridden by the value in QEMU vCPU EAX register.
> i.e. cpu->env.regs[R_EAX].
>
> To fix this issue, change vmport_ioport_read() to explicitly override
> cpu->env.regs[R_EAX] with the value it wish to propagate to vCPU EAX
> register.
>
> Reviewed-by: Nikita Leshenko <nikita.leshchenko@oracle.com>
> Signed-off-by: Liran Alon <liran.alon@oracle.com>
> Message-Id: <20200312165431.82118-4-liran.alon@oracle.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> hw/core/machine.c | 1 +
> hw/i386/vmport.c | 32 +++++++++++++++++++++++++++++---
> 2 files changed, 30 insertions(+), 3 deletions(-)
>
> diff --git a/hw/core/machine.c b/hw/core/machine.c
> index bb3a7b18b1..83f0fe5c91 100644
> --- a/hw/core/machine.c
> +++ b/hw/core/machine.c
> @@ -43,6 +43,7 @@ GlobalProperty hw_compat_4_2[] = {
> { "qxl", "revision", "4" },
> { "qxl-vga", "revision", "4" },
> { "fw_cfg", "acpi-mr-restore", "false" },
> + { "vmport", "x-read-set-eax", "off" },
This is modifying the hw_compat_4_2 properties while qemu-5.0 has been
already released. I think all the vmport property updates [1] should go
to hw_compat_5_0.
Liran? Paolo?
Thanks,
Laurent
[1]
b889212973da hw/i386/vmport: Propagate IOPort read to vCPU EAX register
0342ee761ef2 hw/i386/vmport: Set EAX to -1 on failed and unsupported
commands
f8bdc550370f hw/i386/vmport: Report vmware-vmx-type in CMD_GETVERSION
aaacf1c15a22 hw/i386/vmport: Add support for CMD_GETBIOSUUID
{ "vmport", "x-read-set-eax", "off" },
{ "vmport", "x-signal-unsupported-cmd", "off" },
{ "vmport", "x-report-vmx-type", "off" },
{ "vmport", "x-cmds-v2", "off" },
- [PULL 016/115] Makefile: Let the 'help' target list the helper targets, (continued)
- [PULL 016/115] Makefile: Let the 'help' target list the helper targets, Paolo Bonzini, 2020/06/11
- [PULL 015/115] io/task: Move 'qom/object.h' header to source, Paolo Bonzini, 2020/06/11
- [PULL 021/115] i386: Hyper-V VMBus ACPI DSDT entry, Paolo Bonzini, 2020/06/11
- [PULL 018/115] vmbus: add vmbus protocol definitions, Paolo Bonzini, 2020/06/11
- [PULL 020/115] i386:pc: whitelist dynamic vmbus-bridge, Paolo Bonzini, 2020/06/11
- [PULL 028/115] hw/i386/vmport: Set EAX to -1 on failed and unsupported commands, Paolo Bonzini, 2020/06/11
- [PULL 023/115] target/i386: Fix the CPUID leaf CPUID_Fn80000008, Paolo Bonzini, 2020/06/11
- [PULL 029/115] hw/i386/vmport: Introduce vmware-vmx-version property, Paolo Bonzini, 2020/06/11
- [PULL 012/115] qom/object: Fix object_child_foreach_recursive() return value, Paolo Bonzini, 2020/06/11
- [PULL 027/115] hw/i386/vmport: Propagate IOPort read to vCPU EAX register, Paolo Bonzini, 2020/06/11
- Re: [PULL 027/115] hw/i386/vmport: Propagate IOPort read to vCPU EAX register,
Laurent Vivier <=
[PULL 005/115] run-coverity-scan: add --no-update-tools option, Paolo Bonzini, 2020/06/11
[PULL 033/115] hw/i386/vmport: Add support for CMD_GETBIOSUUID, Paolo Bonzini, 2020/06/11
[PULL 009/115] vl.c: run preconfig loop before creating default RAM backend, Paolo Bonzini, 2020/06/11
[PULL 032/115] hw/i386/vmport: Define enum for all commands, Paolo Bonzini, 2020/06/11
[PULL 013/115] target/i386: Fix OUTL debug output, Paolo Bonzini, 2020/06/11
[PULL 036/115] i386/cpu: Store LAPIC bus frequency in CPU structure, Paolo Bonzini, 2020/06/11
[PULL 039/115] accel: Move Xen accelerator code under accel/xen/, Paolo Bonzini, 2020/06/11