: vmware backdoor interface fix
PATCH 1/3 : vmware backdoor interface fix
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.
hw/vmport.c +8 -0
@@ -72,6 +72,13 @@ static uint32_t vmport_ioport_read(voidreturn s->func[command](s->opaque[command], addr); } +static void vmport_ioport_write (void *opaque,uint32_t addr,uint32_t val) +{ +CPUState *env = cpu_single_env; + + env->regs[R_EAX ] =vmport_ioport_read (opaque, addr); +} +static uint32_t vmport_cmd_get_version (void *opaque,uint32_t addr) {CPUState *env = cpu_single_env;
@@ -89,6 +96,7 @@ static uint32_t vmport_cmd_ram_size(voidvoid vmport_init (void ) {register_ioport_read (0x5658 ,1 ,4 , vmport_ioport_read, &port_state); +register_ioport_write (0x5658 ,1 ,4 , vmport_ioport_write, &port_state);/* Register some generic port commands */ vmport_register (VMPORT_CMD_GETVERSION , vmport_cmd_get_version,NULL );
Anthony Liguori
AppliedQuoted 8 lines · 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 <[email protected]>Cc Gleb Natapov <[email protected]>Cc Anthony Liguori <[email protected]>
Applied. Thanks.
I'm going to hold off on the rest of the series until we work out a better way to support -uuid. This is a pretty obvious fix though.
Regards,
Anthony Liguori
Quoted 10 lines · Anthony Liguori
Quoted 8 lines · 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 <[email protected]>Cc Gleb Natapov <[email protected]>Cc Anthony Liguori <[email protected]>
Quoted 5 lines
Applied. Thanks.
I'm going to hold off on the rest of the series until we work out a better way to support -uuid. This is a pretty obvious fix though.
I don't get this logic. Either delete backdoor interface entirely, or use is for something it was intended to be used for (uuid interface is documented and proposed implementation is compatible with VMWare). Why fix something you are not going to use?
--
Gleb.
Quoted 13 lines · Gleb Natapov
Quoted 11 lines · Anthony Liguori
Quoted 9 lines · 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 <[email protected]>Cc Gleb Natapov <[email protected]>Cc Anthony Liguori <[email protected]>
Quoted 8 lines
Quoted 5 lines
Applied. Thanks.
I'm going to hold off on the rest of the series until we work out a better way to support -uuid. This is a pretty obvious fix though.
I don't get this logic. Either delete backdoor interface entirely, or use is for something it was intended to be used for (uuid interface is documented and proposed implementation is compatible with VMWare).
The issue with supporting the uuid interface is not implementing that portion of the backdoor interface. I'm actually quite okay with that.
But if we're going to support a -uuid option, then I don't want it to only work with the backdoor interface. It should be plumbed through to the SMBIOS tables because this is what users are going to expect.
However, we should not be using the backdoor interface as a communications mechanism between QEMU and the Bochs BIOS.
We support the backdoor interface because we could use it to implement vmmouse. We are not going to implement the full backdoor interface because it requires that you break the x86 ISA by allowing the backdoor port to be used when IOPL < CPL.
Regards,
Anthony Liguori
Quoted 6 lines
Why
fix something you are not going to use?--
Gleb.
Quoted 4 lines · Anthony Liguori
But if we're going to support a -uuid option, then I don't want it to only work with the backdoor interface. It should be plumbed through to the SMBIOS tables because this is what users are going to expect.
This is exactly what's happening now. BOCHS BIOS adds UUID to SMBIOS table. You can see UUID that you provide on command line by running "dmidecode | grep UUID" in a Linux guest. If you worry that UUID backdoor is accessible from a guest then we can make it one shot i.e disable it after first query.
Quoted 3 lines
However, we should not be using the backdoor interface as a communications mechanism between QEMU and the Bochs BIOS.
OK. What about applying these patches (I can resend them if needed):
http://lists.gnu.org/archive/html/qemu-devel/2008-06/msg00443.html
http://lists.gnu.org/archive/html/qemu-devel/2008-06/msg00444.html
http://lists.gnu.org/archive/html/qemu-devel/2008-06/msg00446.html
They add -uuid command line option, but don't plumb UUID into the BIOS. We will figure out later how to pass it there.
--
Gleb.