* [Qemu-devel] [PATCH] -machine vmport=off: Allow disabling of VMWare ioport emulation
@ 2014-05-19 17:00 Dr. David Alan Gilbert (git)
2014-05-19 17:03 ` Richard W.M. Jones
2014-05-20 7:40 ` Gerd Hoffmann
0 siblings, 2 replies; 10+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2014-05-19 17:00 UTC (permalink / raw)
To: qemu-devel; +Cc: rjones, armbru, aliguori, mst
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
VMWare apparently doesn't like running under QEMU due to our
incomplete emulation of it's special IO Port. This adds a
-machine suboption to allow it to be turned off.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
hw/i386/pc_piix.c | 5 +++--
hw/i386/pc_q35.c | 5 ++++-
qemu-options.hx | 3 +++
vl.c | 4 ++++
4 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index eaf3e61..418f95a 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -204,8 +204,9 @@ static void pc_init1(QEMUMachineInitArgs *args,
pc_vga_init(isa_bus, pci_enabled ? pci_bus : NULL);
/* init basic PC hardware */
- pc_basic_device_init(isa_bus, gsi, &rtc_state, &floppy, xen_enabled(),
- 0x4);
+ pc_basic_device_init(isa_bus, gsi, &rtc_state, &floppy,
+ !qemu_opt_get_bool(qemu_get_machine_opts(), "vmport",
+ true) || xen_enabled(), 0x4);
pc_nic_init(isa_bus, pci_bus);
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index 9517ec6..c868af1 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -206,7 +206,10 @@ static void pc_q35_init(QEMUMachineInitArgs *args)
pc_register_ferr_irq(gsi[13]);
/* init basic PC hardware */
- pc_basic_device_init(isa_bus, gsi, &rtc_state, &floppy, false, 0xff0104);
+ pc_basic_device_init(isa_bus, gsi, &rtc_state, &floppy,
+ !qemu_opt_get_bool(qemu_get_machine_opts(), "vmport",
+ true),
+ 0xff0104);
/* connect pm stuff to lpc */
ich9_lpc_pm_init(lpc);
diff --git a/qemu-options.hx b/qemu-options.hx
index 781af14..54e8f94 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -33,6 +33,7 @@ DEF("machine", HAS_ARG, QEMU_OPTION_machine, \
" property accel=accel1[:accel2[:...]] selects accelerator\n"
" supported accelerators are kvm, xen, tcg (default: tcg)\n"
" kernel_irqchip=on|off controls accelerated irqchip support\n"
+ " vmport=on|off controls emulation of vmport (default: on)\n"
" kvm_shadow_mem=size of KVM shadow MMU\n"
" dump-guest-core=on|off include guest memory in a core dump (default=on)\n"
" mem-merge=on|off controls memory merge support (default: on)\n",
@@ -50,6 +51,8 @@ than one accelerator specified, the next one is used if the previous one fails
to initialize.
@item kernel_irqchip=on|off
Enables in-kernel irqchip support for the chosen accelerator when available.
+@item vmport=on|off
+Enables emulation of VMWare IO port, for vmmouse etc. (enabled by default)
@item kvm_shadow_mem=size
Defines the size of the KVM shadow MMU.
@item dump-guest-core=on|off
diff --git a/vl.c b/vl.c
index 99b6fc0..eb26c77 100644
--- a/vl.c
+++ b/vl.c
@@ -331,6 +331,10 @@ static QemuOptsList qemu_machine_opts = {
.type = QEMU_OPT_BOOL,
.help = "use KVM in-kernel irqchip",
}, {
+ .name = "vmport",
+ .type = QEMU_OPT_BOOL,
+ .help = "Enable vmport",
+ }, {
.name = "kvm_shadow_mem",
.type = QEMU_OPT_SIZE,
.help = "KVM shadow MMU size",
--
1.9.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH] -machine vmport=off: Allow disabling of VMWare ioport emulation
2014-05-19 17:00 [Qemu-devel] [PATCH] -machine vmport=off: Allow disabling of VMWare ioport emulation Dr. David Alan Gilbert (git)
@ 2014-05-19 17:03 ` Richard W.M. Jones
2014-05-20 7:40 ` Gerd Hoffmann
1 sibling, 0 replies; 10+ messages in thread
From: Richard W.M. Jones @ 2014-05-19 17:03 UTC (permalink / raw)
To: Dr. David Alan Gilbert (git); +Cc: mst, qemu-devel, aliguori, armbru
On Mon, May 19, 2014 at 06:00:26PM +0100, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
>
> VMWare apparently doesn't like running under QEMU due to our
> incomplete emulation of it's special IO Port. This adds a
> -machine suboption to allow it to be turned off.
>
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Tested-by: Richard W.M. Jones <rjones@redhat.com>
I was able to use this option in order to install VMware ESXi as a
guest under KVM. Here are my notes on how to do this:
https://rwmj.wordpress.com/2014/05/19/notes-on-getting-vmware-esxi-to-run-under-kvm/#content
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH] -machine vmport=off: Allow disabling of VMWare ioport emulation
2014-05-19 17:00 [Qemu-devel] [PATCH] -machine vmport=off: Allow disabling of VMWare ioport emulation Dr. David Alan Gilbert (git)
2014-05-19 17:03 ` Richard W.M. Jones
@ 2014-05-20 7:40 ` Gerd Hoffmann
2014-05-20 8:47 ` Dr. David Alan Gilbert
1 sibling, 1 reply; 10+ messages in thread
From: Gerd Hoffmann @ 2014-05-20 7:40 UTC (permalink / raw)
To: Dr. David Alan Gilbert (git); +Cc: armbru, mst, qemu-devel, aliguori, rjones
> /* init basic PC hardware */
> - pc_basic_device_init(isa_bus, gsi, &rtc_state, &floppy, xen_enabled(),
> - 0x4);
> + pc_basic_device_init(isa_bus, gsi, &rtc_state, &floppy,
> + !qemu_opt_get_bool(qemu_get_machine_opts(), "vmport",
> + true) || xen_enabled(), 0x4);
pc_basic_device_init
(isa_bus, gsi, &rtc_state, &floppy,
!qemu_opt_get_bool(qemu_get_machine_opts(),"vmport",!xen_enabled()),
0x4);
?
This makes vmport switchable on xen too, with traditional behavior being
the default (off on xen, on otherwise).
cheers,
Gerd
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH] -machine vmport=off: Allow disabling of VMWare ioport emulation
2014-05-20 7:40 ` Gerd Hoffmann
@ 2014-05-20 8:47 ` Dr. David Alan Gilbert
2014-05-20 9:18 ` Richard W.M. Jones
0 siblings, 1 reply; 10+ messages in thread
From: Dr. David Alan Gilbert @ 2014-05-20 8:47 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: armbru, mst, qemu-devel, aliguori, rjones
* Gerd Hoffmann (kraxel@redhat.com) wrote:
> > /* init basic PC hardware */
> > - pc_basic_device_init(isa_bus, gsi, &rtc_state, &floppy, xen_enabled(),
> > - 0x4);
> > + pc_basic_device_init(isa_bus, gsi, &rtc_state, &floppy,
> > + !qemu_opt_get_bool(qemu_get_machine_opts(), "vmport",
> > + true) || xen_enabled(), 0x4);
>
> pc_basic_device_init
> (isa_bus, gsi, &rtc_state, &floppy,
> !qemu_opt_get_bool(qemu_get_machine_opts(),"vmport",!xen_enabled()),
> 0x4);
>
> ?
>
> This makes vmport switchable on xen too, with traditional behavior being
> the default (off on xen, on otherwise).
Yes I guess that would work (although documenting it would be a little hairy);
however, does anyone understand the reasons it's disabled in the Xen world?
Dave
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH] -machine vmport=off: Allow disabling of VMWare ioport emulation
2014-05-20 8:47 ` Dr. David Alan Gilbert
@ 2014-05-20 9:18 ` Richard W.M. Jones
2014-05-20 10:10 ` Gerd Hoffmann
0 siblings, 1 reply; 10+ messages in thread
From: Richard W.M. Jones @ 2014-05-20 9:18 UTC (permalink / raw)
To: Dr. David Alan Gilbert
Cc: mst, armbru, qemu-devel, Gerd Hoffmann, aliguori, Anthony PERARD
On Tue, May 20, 2014 at 09:47:26AM +0100, Dr. David Alan Gilbert wrote:
> * Gerd Hoffmann (kraxel@redhat.com) wrote:
> > > /* init basic PC hardware */
> > > - pc_basic_device_init(isa_bus, gsi, &rtc_state, &floppy, xen_enabled(),
> > > - 0x4);
> > > + pc_basic_device_init(isa_bus, gsi, &rtc_state, &floppy,
> > > + !qemu_opt_get_bool(qemu_get_machine_opts(), "vmport",
> > > + true) || xen_enabled(), 0x4);
> >
> > pc_basic_device_init
> > (isa_bus, gsi, &rtc_state, &floppy,
> > !qemu_opt_get_bool(qemu_get_machine_opts(),"vmport",!xen_enabled()),
> > 0x4);
> >
> > ?
> >
> > This makes vmport switchable on xen too, with traditional behavior being
> > the default (off on xen, on otherwise).
>
> Yes I guess that would work (although documenting it would be a little hairy);
> however, does anyone understand the reasons it's disabled in the Xen world?
It was disabled in this patch. The commit message is saying that
vmport cannot work in Xen, but I'm not exactly clear why.
commit 1611977c3d8fdbdac6090cbd1f5555cee4aed6d9
Author: Anthony PERARD <anthony.perard@citrix.com>
Date: Tue May 3 17:06:54 2011 +0100
pc, Disable vmport initialisation with Xen.
This is because there is not synchronisation of the vcpu register
between Xen and QEMU, so vmport can't work properly.
This patch introduces no_vmport parameter to pc_basic_device_init.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH] -machine vmport=off: Allow disabling of VMWare ioport emulation
2014-05-20 9:18 ` Richard W.M. Jones
@ 2014-05-20 10:10 ` Gerd Hoffmann
2014-09-25 13:40 ` Slutz, Donald Christopher
0 siblings, 1 reply; 10+ messages in thread
From: Gerd Hoffmann @ 2014-05-20 10:10 UTC (permalink / raw)
To: Richard W.M. Jones
Cc: mst, qemu-devel, armbru, Dr. David Alan Gilbert, aliguori,
Anthony PERARD
Hi,
> It was disabled in this patch. The commit message is saying that
> vmport cannot work in Xen, but I'm not exactly clear why.
>
> commit 1611977c3d8fdbdac6090cbd1f5555cee4aed6d9
> Author: Anthony PERARD <anthony.perard@citrix.com>
> Date: Tue May 3 17:06:54 2011 +0100
>
> pc, Disable vmport initialisation with Xen.
>
> This is because there is not synchronisation of the vcpu register
> between Xen and QEMU, so vmport can't work properly.
Ah, ok. The backdoor has side effects (writing the port does modify
vcpu registers). That is the bit which is problematic for xen. Scratch
the idea then.
Original patch is fine.
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
cheers,
Gerd
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH] -machine vmport=off: Allow disabling of VMWare ioport emulation
2014-05-20 10:10 ` Gerd Hoffmann
@ 2014-09-25 13:40 ` Slutz, Donald Christopher
2014-09-25 15:07 ` Dr. David Alan Gilbert
0 siblings, 1 reply; 10+ messages in thread
From: Slutz, Donald Christopher @ 2014-09-25 13:40 UTC (permalink / raw)
To: Gerd Hoffmann, Richard W.M. Jones
Cc: mst@redhat.com, armbru@redhat.com, qemu-devel@nongnu.org,
aliguori@amazon.com, Anthony PERARD, Dr. David Alan Gilbert
What is happening with this patch? I would like to use this code.
-Don Slutz
________________________________________
From: qemu-devel-bounces+don=cloudswitch.com@nongnu.org [qemu-devel-bounces+don=cloudswitch.com@nongnu.org] on behalf of Gerd Hoffmann [kraxel@redhat.com]
Sent: Tuesday, May 20, 2014 6:10 AM
To: Richard W.M. Jones
Cc: mst@redhat.com; qemu-devel@nongnu.org; armbru@redhat.com; Dr. David Alan Gilbert; aliguori@amazon.com; Anthony PERARD
Subject: Re: [Qemu-devel] [PATCH] -machine vmport=off: Allow disabling of VMWare ioport emulation
Hi,
> It was disabled in this patch. The commit message is saying that
> vmport cannot work in Xen, but I'm not exactly clear why.
>
> commit 1611977c3d8fdbdac6090cbd1f5555cee4aed6d9
> Author: Anthony PERARD <anthony.perard@citrix.com>
> Date: Tue May 3 17:06:54 2011 +0100
>
> pc, Disable vmport initialisation with Xen.
>
> This is because there is not synchronisation of the vcpu register
> between Xen and QEMU, so vmport can't work properly.
Ah, ok. The backdoor has side effects (writing the port does modify
vcpu registers). That is the bit which is problematic for xen. Scratch
the idea then.
Original patch is fine.
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
cheers,
Gerd
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH] -machine vmport=off: Allow disabling of VMWare ioport emulation
2014-09-25 13:40 ` Slutz, Donald Christopher
@ 2014-09-25 15:07 ` Dr. David Alan Gilbert
2014-09-25 17:47 ` Slutz, Donald Christopher
0 siblings, 1 reply; 10+ messages in thread
From: Dr. David Alan Gilbert @ 2014-09-25 15:07 UTC (permalink / raw)
To: Slutz, Donald Christopher
Cc: mst@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com,
Richard W.M. Jones, Gerd Hoffmann, aliguori@amazon.com,
Anthony PERARD
* Slutz, Donald Christopher (dslutz@verizon.com) wrote:
> What is happening with this patch? I would like to use this code.
I need to rework it for the new machine types code; but it was pretty
low down my list of priorities; but I can try and get a minute for it
again.
Dave
>
> -Don Slutz
>
> ________________________________________
> From: qemu-devel-bounces+don=cloudswitch.com@nongnu.org [qemu-devel-bounces+don=cloudswitch.com@nongnu.org] on behalf of Gerd Hoffmann [kraxel@redhat.com]
> Sent: Tuesday, May 20, 2014 6:10 AM
> To: Richard W.M. Jones
> Cc: mst@redhat.com; qemu-devel@nongnu.org; armbru@redhat.com; Dr. David Alan Gilbert; aliguori@amazon.com; Anthony PERARD
> Subject: Re: [Qemu-devel] [PATCH] -machine vmport=off: Allow disabling of VMWare ioport emulation
>
> Hi,
>
> > It was disabled in this patch. The commit message is saying that
> > vmport cannot work in Xen, but I'm not exactly clear why.
> >
> > commit 1611977c3d8fdbdac6090cbd1f5555cee4aed6d9
> > Author: Anthony PERARD <anthony.perard@citrix.com>
> > Date: Tue May 3 17:06:54 2011 +0100
> >
> > pc, Disable vmport initialisation with Xen.
> >
> > This is because there is not synchronisation of the vcpu register
> > between Xen and QEMU, so vmport can't work properly.
>
> Ah, ok. The backdoor has side effects (writing the port does modify
> vcpu registers). That is the bit which is problematic for xen. Scratch
> the idea then.
>
> Original patch is fine.
>
> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
>
> cheers,
> Gerd
>
>
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH] -machine vmport=off: Allow disabling of VMWare ioport emulation
2014-09-25 15:07 ` Dr. David Alan Gilbert
@ 2014-09-25 17:47 ` Slutz, Donald Christopher
2014-09-25 18:00 ` Dr. David Alan Gilbert
0 siblings, 1 reply; 10+ messages in thread
From: Slutz, Donald Christopher @ 2014-09-25 17:47 UTC (permalink / raw)
To: Dr. David Alan Gilbert
Cc: mst@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com,
Richard W.M. Jones, Gerd Hoffmann, aliguori@amazon.com,
Anthony PERARD
On 09/25/14 11:07, Dr. David Alan Gilbert wrote:
> * Slutz, Donald Christopher (dslutz@verizon.com) wrote:
>> What is happening with this patch? I would like to use this code.
> I need to rework it for the new machine types code; but it was pretty
> low down my list of priorities; but I can try and get a minute for it
> again.
Ok, I did not see any mail about this. If I am reading this right you mean
like I did in
commit c87b1520726f7ae1e698a41f07043d1b539ac88c
Do you want me to attempt to "port" this patch this way?
-Don Slutz
> Dave
>
>> -Don Slutz
>>
>> ________________________________________
>> From: qemu-devel-bounces+don=cloudswitch.com@nongnu.org [qemu-devel-bounces+don=cloudswitch.com@nongnu.org] on behalf of Gerd Hoffmann [kraxel@redhat.com]
>> Sent: Tuesday, May 20, 2014 6:10 AM
>> To: Richard W.M. Jones
>> Cc: mst@redhat.com; qemu-devel@nongnu.org; armbru@redhat.com; Dr. David Alan Gilbert; aliguori@amazon.com; Anthony PERARD
>> Subject: Re: [Qemu-devel] [PATCH] -machine vmport=off: Allow disabling of VMWare ioport emulation
>>
>> Hi,
>>
>>> It was disabled in this patch. The commit message is saying that
>>> vmport cannot work in Xen, but I'm not exactly clear why.
>>>
>>> commit 1611977c3d8fdbdac6090cbd1f5555cee4aed6d9
>>> Author: Anthony PERARD <anthony.perard@citrix.com>
>>> Date: Tue May 3 17:06:54 2011 +0100
>>>
>>> pc, Disable vmport initialisation with Xen.
>>>
>>> This is because there is not synchronisation of the vcpu register
>>> between Xen and QEMU, so vmport can't work properly.
>> Ah, ok. The backdoor has side effects (writing the port does modify
>> vcpu registers). That is the bit which is problematic for xen. Scratch
>> the idea then.
>>
>> Original patch is fine.
>>
>> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
>>
>> cheers,
>> Gerd
>>
>>
>>
> --
> Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH] -machine vmport=off: Allow disabling of VMWare ioport emulation
2014-09-25 17:47 ` Slutz, Donald Christopher
@ 2014-09-25 18:00 ` Dr. David Alan Gilbert
0 siblings, 0 replies; 10+ messages in thread
From: Dr. David Alan Gilbert @ 2014-09-25 18:00 UTC (permalink / raw)
To: Slutz, Donald Christopher
Cc: mst@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com,
Richard W.M. Jones, Gerd Hoffmann, aliguori@amazon.com,
Anthony PERARD
* Slutz, Donald Christopher (dslutz@verizon.com) wrote:
> On 09/25/14 11:07, Dr. David Alan Gilbert wrote:
> > * Slutz, Donald Christopher (dslutz@verizon.com) wrote:
> >> What is happening with this patch? I would like to use this code.
> > I need to rework it for the new machine types code; but it was pretty
> > low down my list of priorities; but I can try and get a minute for it
> > again.
>
> Ok, I did not see any mail about this. If I am reading this right you mean
> like I did in
>
> commit c87b1520726f7ae1e698a41f07043d1b539ac88c
>
> Do you want me to attempt to "port" this patch this way?
To be honest I hadn't got that far in figuring the new stuff out,
but yes I think so please check with mst@redhat.com (cc'd); he was
pointing me in the direction of those changes I think.
But if you want to do the update, please feel free.
Dave
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2014-09-25 18:00 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-19 17:00 [Qemu-devel] [PATCH] -machine vmport=off: Allow disabling of VMWare ioport emulation Dr. David Alan Gilbert (git)
2014-05-19 17:03 ` Richard W.M. Jones
2014-05-20 7:40 ` Gerd Hoffmann
2014-05-20 8:47 ` Dr. David Alan Gilbert
2014-05-20 9:18 ` Richard W.M. Jones
2014-05-20 10:10 ` Gerd Hoffmann
2014-09-25 13:40 ` Slutz, Donald Christopher
2014-09-25 15:07 ` Dr. David Alan Gilbert
2014-09-25 17:47 ` Slutz, Donald Christopher
2014-09-25 18:00 ` Dr. David Alan Gilbert
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).