qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [uq/master PATCH] kvmvapic: add ioport read accessor
@ 2013-05-05 20:51 Marcelo Tosatti
  2013-05-06  6:29 ` Jan Kiszka
  2013-05-06 11:52 ` Gleb Natapov
  0 siblings, 2 replies; 3+ messages in thread
From: Marcelo Tosatti @ 2013-05-05 20:51 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: qemu-devel, kvm-devel


Necessary since memory region accessor assumes read and write
methods are registered. Otherwise reading I/O port 0x7e segfaults.

https://bugzilla.redhat.com/show_bug.cgi?id=954306

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>

diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c
index 5b558aa..655483b 100644
--- a/hw/i386/kvmvapic.c
+++ b/hw/i386/kvmvapic.c
@@ -687,8 +687,14 @@ static void vapic_write(void *opaque, hwaddr addr, uint64_t data,
     }
 }
 
+static uint64_t vapic_read(void *opaque, hwaddr addr, unsigned size)
+{
+    return 0xffffffff;
+}
+
 static const MemoryRegionOps vapic_ops = {
     .write = vapic_write,
+    .read = vapic_read,
     .endianness = DEVICE_NATIVE_ENDIAN,
 };
 

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

* Re: [Qemu-devel] [uq/master PATCH] kvmvapic: add ioport read accessor
  2013-05-05 20:51 [Qemu-devel] [uq/master PATCH] kvmvapic: add ioport read accessor Marcelo Tosatti
@ 2013-05-06  6:29 ` Jan Kiszka
  2013-05-06 11:52 ` Gleb Natapov
  1 sibling, 0 replies; 3+ messages in thread
From: Jan Kiszka @ 2013-05-06  6:29 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: qemu-devel, kvm-devel

On 2013-05-05 22:51, Marcelo Tosatti wrote:
> 
> Necessary since memory region accessor assumes read and write
> methods are registered. Otherwise reading I/O port 0x7e segfaults.
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=954306
> 
> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
> 
> diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c
> index 5b558aa..655483b 100644
> --- a/hw/i386/kvmvapic.c
> +++ b/hw/i386/kvmvapic.c
> @@ -687,8 +687,14 @@ static void vapic_write(void *opaque, hwaddr addr, uint64_t data,
>      }
>  }
>  
> +static uint64_t vapic_read(void *opaque, hwaddr addr, unsigned size)
> +{
> +    return 0xffffffff;
> +}
> +
>  static const MemoryRegionOps vapic_ops = {
>      .write = vapic_write,
> +    .read = vapic_read,
>      .endianness = DEVICE_NATIVE_ENDIAN,
>  };
>  
> 

Right. I'm just wondering why the guest reads from that port.

Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>

-- 
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux

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

* Re: [Qemu-devel] [uq/master PATCH] kvmvapic: add ioport read accessor
  2013-05-05 20:51 [Qemu-devel] [uq/master PATCH] kvmvapic: add ioport read accessor Marcelo Tosatti
  2013-05-06  6:29 ` Jan Kiszka
@ 2013-05-06 11:52 ` Gleb Natapov
  1 sibling, 0 replies; 3+ messages in thread
From: Gleb Natapov @ 2013-05-06 11:52 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: Jan Kiszka, qemu-devel, kvm-devel

On Sun, May 05, 2013 at 05:51:49PM -0300, Marcelo Tosatti wrote:
> 
> Necessary since memory region accessor assumes read and write
> methods are registered. Otherwise reading I/O port 0x7e segfaults.
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=954306
> 
> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
> 
Applied, thanks.

> diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c
> index 5b558aa..655483b 100644
> --- a/hw/i386/kvmvapic.c
> +++ b/hw/i386/kvmvapic.c
> @@ -687,8 +687,14 @@ static void vapic_write(void *opaque, hwaddr addr, uint64_t data,
>      }
>  }
>  
> +static uint64_t vapic_read(void *opaque, hwaddr addr, unsigned size)
> +{
> +    return 0xffffffff;
> +}
> +
>  static const MemoryRegionOps vapic_ops = {
>      .write = vapic_write,
> +    .read = vapic_read,
>      .endianness = DEVICE_NATIVE_ENDIAN,
>  };
>  
> 
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
			Gleb.

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

end of thread, other threads:[~2013-05-06 11:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-05 20:51 [Qemu-devel] [uq/master PATCH] kvmvapic: add ioport read accessor Marcelo Tosatti
2013-05-06  6:29 ` Jan Kiszka
2013-05-06 11:52 ` 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).