* [Qemu-devel] [PATCH 1/3]: vmware backdoor interface fix
@ 2008-07-28 13:25 Chris Lalancette
2008-07-28 18:58 ` [Qemu-devel] " Anthony Liguori
0 siblings, 1 reply; 5+ messages in thread
From: Chris Lalancette @ 2008-07-28 13:25 UTC (permalink / raw)
To: qemu-devel; +Cc: gleb
[-- 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);
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Qemu-devel] Re: [PATCH 1/3]: vmware backdoor interface fix
2008-07-28 13:25 [Qemu-devel] [PATCH 1/3]: vmware backdoor interface fix Chris Lalancette
@ 2008-07-28 18:58 ` Anthony Liguori
2008-07-28 19:18 ` Gleb Natapov
0 siblings, 1 reply; 5+ messages in thread
From: Anthony Liguori @ 2008-07-28 18:58 UTC (permalink / raw)
To: Chris Lalancette; +Cc: gleb, qemu-devel
Chris Lalancette wrote:
> 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>
>
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Qemu-devel] Re: [PATCH 1/3]: vmware backdoor interface fix
2008-07-28 18:58 ` [Qemu-devel] " Anthony Liguori
@ 2008-07-28 19:18 ` Gleb Natapov
2008-07-28 19:51 ` Anthony Liguori
0 siblings, 1 reply; 5+ messages in thread
From: Gleb Natapov @ 2008-07-28 19:18 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Chris Lalancette, qemu-devel
On Mon, Jul 28, 2008 at 01:58:16PM -0500, Anthony Liguori wrote:
> Chris Lalancette wrote:
>> 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>
>>
>
> 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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Qemu-devel] Re: [PATCH 1/3]: vmware backdoor interface fix
2008-07-28 19:18 ` Gleb Natapov
@ 2008-07-28 19:51 ` Anthony Liguori
2008-07-29 5:31 ` Gleb Natapov
0 siblings, 1 reply; 5+ messages in thread
From: Anthony Liguori @ 2008-07-28 19:51 UTC (permalink / raw)
To: Gleb Natapov; +Cc: Chris Lalancette, qemu-devel
Gleb Natapov wrote:
> On Mon, Jul 28, 2008 at 01:58:16PM -0500, Anthony Liguori wrote:
>
>> Chris Lalancette wrote:
>>
>>> 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>
>>>
>>>
>> 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
> Why
> fix something you are not going to use?
>
> --
> Gleb.
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Qemu-devel] Re: [PATCH 1/3]: vmware backdoor interface fix
2008-07-28 19:51 ` Anthony Liguori
@ 2008-07-29 5:31 ` Gleb Natapov
0 siblings, 0 replies; 5+ messages in thread
From: Gleb Natapov @ 2008-07-29 5:31 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Chris Lalancette, qemu-devel
On Mon, Jul 28, 2008 at 02:51:36PM -0500, Anthony Liguori wrote:
> 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.
> 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.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-07-29 5:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-28 13:25 [Qemu-devel] [PATCH 1/3]: vmware backdoor interface fix Chris Lalancette
2008-07-28 18:58 ` [Qemu-devel] " Anthony Liguori
2008-07-28 19:18 ` Gleb Natapov
2008-07-28 19:51 ` Anthony Liguori
2008-07-29 5:31 ` Gleb Natapov
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).