From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K3tgt-0001FA-CT for qemu-devel@nongnu.org; Wed, 04 Jun 2008 10:10:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K3tgq-0001Ee-TN for qemu-devel@nongnu.org; Wed, 04 Jun 2008 10:10:15 -0400 Received: from [199.232.76.173] (port=34065 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K3tgq-0001Eb-Px for qemu-devel@nongnu.org; Wed, 04 Jun 2008 10:10:12 -0400 Received: from hs-out-0708.google.com ([64.233.178.249]:28924) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K3tgq-0004Xs-Ml for qemu-devel@nongnu.org; Wed, 04 Jun 2008 10:10:12 -0400 Received: by hs-out-0708.google.com with SMTP id k27so73968hsc.2 for ; Wed, 04 Jun 2008 07:10:12 -0700 (PDT) Message-ID: <4846A236.8010001@codemonkey.ws> Date: Wed, 04 Jun 2008 09:09:58 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 1/2] vmware backdoor interface fix References: <20080604132033.GB31694@minantech.com> In-Reply-To: <20080604132033.GB31694@minantech.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 qumranet.com> > Reviewed-by: Anthony Liguori 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. > > >