* [Qemu-devel] [PATCH 1/2] vmware backdoor interface fix
@ 2008-06-04 13:20 Gleb Natapov
2008-06-04 14:09 ` Anthony Liguori
0 siblings, 1 reply; 2+ messages in thread
From: Gleb Natapov @ 2008-06-04 13:20 UTC (permalink / raw)
To: qemu-devel
Hello,
VMWare backdoor interface should work with IN/OUT port ops, but
currently only IN is supported. BACHS bios uses OUT to query UUID.
The patch adds OUT support.
Signed-off-by: Gleb Natapov <glen <at> qumranet.com>
Index: qemu/hw/vmport.c
===================================================================
--- qemu.orig/hw/vmport.c 2008-06-04 14:02:04.000000000 +0300
+++ qemu/hw/vmport.c 2008-06-04 14:17:10.000000000 +0300
@@ -72,6 +72,13 @@ static uint32_t vmport_ioport_read(void
return 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(void
void 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);
--
Gleb.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH 1/2] vmware backdoor interface fix
2008-06-04 13:20 [Qemu-devel] [PATCH 1/2] vmware backdoor interface fix Gleb Natapov
@ 2008-06-04 14:09 ` Anthony Liguori
0 siblings, 0 replies; 2+ messages in thread
From: Anthony Liguori @ 2008-06-04 14:09 UTC (permalink / raw)
To: qemu-devel
Gleb Natapov wrote:
> Hello,
>
> VMWare backdoor interface should work with IN/OUT port ops, but
> currently only IN is supported. BACHS bios uses OUT to query UUID.
> The patch adds OUT support.
>
> Signed-off-by: Gleb Natapov <glen <at> qumranet.com>
>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Regards,
Anthony Liguori
> Index: qemu/hw/vmport.c
> ===================================================================
> --- qemu.orig/hw/vmport.c 2008-06-04 14:02:04.000000000 +0300
> +++ qemu/hw/vmport.c 2008-06-04 14:17:10.000000000 +0300
> @@ -72,6 +72,13 @@ static uint32_t vmport_ioport_read(void
> return 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(void
> void 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);
> --
> Gleb.
>
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-06-04 14:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-04 13:20 [Qemu-devel] [PATCH 1/2] vmware backdoor interface fix Gleb Natapov
2008-06-04 14:09 ` Anthony Liguori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).