qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Chris Lalancette <clalance@redhat.com>
To: qemu-devel@nongnu.org
Cc: gleb@qumranet.com
Subject: [Qemu-devel] [PATCH 1/3]: vmware backdoor interface fix
Date: Mon, 28 Jul 2008 15:25:12 +0200	[thread overview]
Message-ID: <488DC8B8.3060500@redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 297 bytes --]

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>
Cc: Gleb Natapov <gleb@qumranet.com>
Cc: Anthony Liguori <anthony@codemonkey.ws>



[-- Attachment #2: qemu-dmi-uuid-1.patch --]
[-- Type: text/x-patch, Size: 954 bytes --]

diff -urp qemu.orig/hw/vmport.c qemu.patch1/hw/vmport.c
--- qemu.orig/hw/vmport.c	2008-07-28 14:14:32.000000000 +0200
+++ qemu.patch1/hw/vmport.c	2008-07-28 14:16:54.000000000 +0200
@@ -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);


             reply	other threads:[~2008-07-28 13:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-28 13:25 Chris Lalancette [this message]
2008-07-28 18:58 ` [Qemu-devel] Re: [PATCH 1/3]: vmware backdoor interface fix Anthony Liguori
2008-07-28 19:18   ` Gleb Natapov
2008-07-28 19:51     ` Anthony Liguori
2008-07-29  5:31       ` Gleb Natapov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=488DC8B8.3060500@redhat.com \
    --to=clalance@redhat.com \
    --cc=gleb@qumranet.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).