qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>, kvm-devel <kvm@vger.kernel.org>
Subject: Re: [Qemu-devel] [uq/master PATCH] kvmvapic: add ioport read accessor
Date: Mon, 06 May 2013 08:29:33 +0200	[thread overview]
Message-ID: <51874DCD.5020309@siemens.com> (raw)
In-Reply-To: <20130505205149.GA2032@amt.cnet>

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

  reply	other threads:[~2013-05-06  6:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-05 20:51 [Qemu-devel] [uq/master PATCH] kvmvapic: add ioport read accessor Marcelo Tosatti
2013-05-06  6:29 ` Jan Kiszka [this message]
2013-05-06 11:52 ` Gleb Natapov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51874DCD.5020309@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).