Commit e9396bded98ae7e83129e9c1e9caa98afea7eaf5
1 parent
279e694b
vmware backdoor interface fix (Chris Lalancette)
VMWare backdoor interface should work with IN/OUT port ops, but currently only IN is supported. BOCHS bios uses OUT to query UUID. The patch adds OUT support. Signed-off-by: Chris Lalancette <clalance@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4957 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
8 additions
and
0 deletions
hw/vmport.c
... | ... | @@ -72,6 +72,13 @@ static uint32_t vmport_ioport_read(void *opaque, uint32_t addr) |
72 | 72 | return s->func[command](s->opaque[command], addr); |
73 | 73 | } |
74 | 74 | |
75 | +static void vmport_ioport_write(void *opaque, uint32_t addr, uint32_t val) | |
76 | +{ | |
77 | + CPUState *env = cpu_single_env; | |
78 | + | |
79 | + env->regs[R_EAX] = vmport_ioport_read(opaque, addr); | |
80 | +} | |
81 | + | |
75 | 82 | static uint32_t vmport_cmd_get_version(void *opaque, uint32_t addr) |
76 | 83 | { |
77 | 84 | CPUState *env = cpu_single_env; |
... | ... | @@ -89,6 +96,7 @@ static uint32_t vmport_cmd_ram_size(void *opaque, uint32_t addr) |
89 | 96 | void vmport_init(void) |
90 | 97 | { |
91 | 98 | register_ioport_read(0x5658, 1, 4, vmport_ioport_read, &port_state); |
99 | + register_ioport_write(0x5658, 1, 4, vmport_ioport_write, &port_state); | |
92 | 100 | |
93 | 101 | /* Register some generic port commands */ |
94 | 102 | vmport_register(VMPORT_CMD_GETVERSION, vmport_cmd_get_version, NULL); | ... | ... |