qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Unlike real hardware, vmport needs access to the CPU registers to handle iomem read and writes. So add an explicit cpu_synchronize_state call, otherwise vmmouse can not work with KVM.
@ 2009-09-12 14:11 =?UTF-8?q?Reimar=20D=C3=B6ffinger?=
  2009-09-12 14:46 ` [Qemu-devel] Re: [PATCH] Unlike real hardware, vmport needs access to the CPU [...] Jan Kiszka
  0 siblings, 1 reply; 4+ messages in thread
From: =?UTF-8?q?Reimar=20D=C3=B6ffinger?= @ 2009-09-12 14:11 UTC (permalink / raw)
  To: qemu-devel

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
---
 hw/vmport.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/hw/vmport.c b/hw/vmport.c
index 884af3f..9a942ee 100644
--- a/hw/vmport.c
+++ b/hw/vmport.c
@@ -25,6 +25,7 @@
 #include "isa.h"
 #include "pc.h"
 #include "sysemu.h"
+#include "kvm.h"
 
 //#define VMPORT_DEBUG
 
@@ -58,6 +59,7 @@ static uint32_t vmport_ioport_read(void *opaque, uint32_t addr)
     unsigned char command;
     uint32_t eax;
 
+    cpu_synchronize_state(env);
     eax = env->regs[R_EAX];
     if (eax != VMPORT_MAGIC)
         return eax;
-- 
1.6.4.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Qemu-devel] Re: [PATCH] Unlike real hardware, vmport needs access to the CPU [...]
  2009-09-12 14:11 [Qemu-devel] [PATCH] Unlike real hardware, vmport needs access to the CPU registers to handle iomem read and writes. So add an explicit cpu_synchronize_state call, otherwise vmmouse can not work with KVM =?UTF-8?q?Reimar=20D=C3=B6ffinger?=
@ 2009-09-12 14:46 ` Jan Kiszka
  2009-09-12 15:34   ` Reimar Döffinger
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Kiszka @ 2009-09-12 14:46 UTC (permalink / raw)
  To: qemu-devel

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

=?UTF-8?q?Reimar=20D=C3=B6ffinger?= wrote:
> Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
> ---
>  hw/vmport.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/hw/vmport.c b/hw/vmport.c
> index 884af3f..9a942ee 100644
> --- a/hw/vmport.c
> +++ b/hw/vmport.c
> @@ -25,6 +25,7 @@
>  #include "isa.h"
>  #include "pc.h"
>  #include "sysemu.h"
> +#include "kvm.h"
>  
>  //#define VMPORT_DEBUG
>  
> @@ -58,6 +59,7 @@ static uint32_t vmport_ioport_read(void *opaque, uint32_t addr)
>      unsigned char command;
>      uint32_t eax;
>  
> +    cpu_synchronize_state(env);
>      eax = env->regs[R_EAX];
>      if (eax != VMPORT_MAGIC)
>          return eax;

Ack (qemu-kvm carries a similar patch).

But please grant your patches some proper titles.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] Re: [PATCH] Unlike real hardware, vmport needs access to the CPU [...]
  2009-09-12 14:46 ` [Qemu-devel] Re: [PATCH] Unlike real hardware, vmport needs access to the CPU [...] Jan Kiszka
@ 2009-09-12 15:34   ` Reimar Döffinger
  2009-09-12 15:47     ` Jan Kiszka
  0 siblings, 1 reply; 4+ messages in thread
From: Reimar Döffinger @ 2009-09-12 15:34 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: qemu-devel

On Sat, Sep 12, 2009 at 04:46:04PM +0200, Jan Kiszka wrote:
> =?UTF-8?q?Reimar=20D=C3=B6ffinger?= wrote:
> > Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
> > ---
> >  hw/vmport.c |    2 ++
> >  1 files changed, 2 insertions(+), 0 deletions(-)
> > 
> > diff --git a/hw/vmport.c b/hw/vmport.c
> > index 884af3f..9a942ee 100644
> > --- a/hw/vmport.c
> > +++ b/hw/vmport.c
> > @@ -25,6 +25,7 @@
> >  #include "isa.h"
> >  #include "pc.h"
> >  #include "sysemu.h"
> > +#include "kvm.h"
> >  
> >  //#define VMPORT_DEBUG
> >  
> > @@ -58,6 +59,7 @@ static uint32_t vmport_ioport_read(void *opaque, uint32_t addr)
> >      unsigned char command;
> >      uint32_t eax;
> >  
> > +    cpu_synchronize_state(env);
> >      eax = env->regs[R_EAX];
> >      if (eax != VMPORT_MAGIC)
> >          return eax;
> 
> Ack (qemu-kvm carries a similar patch).

Now that I look at it... yes.
Except that it does not yet have cpu_synchronize_state and thus is broken for
vmport_ioport_write, the return value written to EAX is lost.

> But please grant your patches some proper titles.

Sorry, I am still figuring out how to write commit messages that git format-patch
handles in a good way (as well as the most sane way to use it in
general).

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] Re: [PATCH] Unlike real hardware, vmport needs access to the CPU [...]
  2009-09-12 15:34   ` Reimar Döffinger
@ 2009-09-12 15:47     ` Jan Kiszka
  0 siblings, 0 replies; 4+ messages in thread
From: Jan Kiszka @ 2009-09-12 15:47 UTC (permalink / raw)
  To: qemu-devel

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

Reimar Döffinger wrote:
> On Sat, Sep 12, 2009 at 04:46:04PM +0200, Jan Kiszka wrote:
>> =?UTF-8?q?Reimar=20D=C3=B6ffinger?= wrote:
>>> Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
>>> ---
>>>  hw/vmport.c |    2 ++
>>>  1 files changed, 2 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/hw/vmport.c b/hw/vmport.c
>>> index 884af3f..9a942ee 100644
>>> --- a/hw/vmport.c
>>> +++ b/hw/vmport.c
>>> @@ -25,6 +25,7 @@
>>>  #include "isa.h"
>>>  #include "pc.h"
>>>  #include "sysemu.h"
>>> +#include "kvm.h"
>>>  
>>>  //#define VMPORT_DEBUG
>>>  
>>> @@ -58,6 +59,7 @@ static uint32_t vmport_ioport_read(void *opaque, uint32_t addr)
>>>      unsigned char command;
>>>      uint32_t eax;
>>>  
>>> +    cpu_synchronize_state(env);
>>>      eax = env->regs[R_EAX];
>>>      if (eax != VMPORT_MAGIC)
>>>          return eax;
>> Ack (qemu-kvm carries a similar patch).
> 
> Now that I look at it... yes.
> Except that it does not yet have cpu_synchronize_state and thus is broken for
> vmport_ioport_write, the return value written to EAX is lost.

Normally qemu-kvm catches such things when merging from upstream.

> 
>> But please grant your patches some proper titles.
> 
> Sorry, I am still figuring out how to write commit messages that git format-patch
> handles in a good way (as well as the most sane way to use it in
> general).

This rule is simple, just write your commit messages in the form

Title
<blank line>
Description...


Moreover, your mail client is configured to inject "Mail-Followup-To"
into your postings. This quickly causes troubles. E.g., it suggested my
client to send myself a mail when replying to yours.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-09-12 15:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-12 14:11 [Qemu-devel] [PATCH] Unlike real hardware, vmport needs access to the CPU registers to handle iomem read and writes. So add an explicit cpu_synchronize_state call, otherwise vmmouse can not work with KVM =?UTF-8?q?Reimar=20D=C3=B6ffinger?=
2009-09-12 14:46 ` [Qemu-devel] Re: [PATCH] Unlike real hardware, vmport needs access to the CPU [...] Jan Kiszka
2009-09-12 15:34   ` Reimar Döffinger
2009-09-12 15:47     ` Jan Kiszka

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).