From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [uq/master PATCH] kvmvapic: add ioport read accessor Date: Mon, 6 May 2013 14:52:59 +0300 Message-ID: <20130506115259.GA12349@redhat.com> References: <20130505205149.GA2032@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jan Kiszka , qemu-devel , kvm-devel To: Marcelo Tosatti Return-path: Received: from mx1.redhat.com ([209.132.183.28]:35691 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752470Ab3EFLxC (ORCPT ); Mon, 6 May 2013 07:53:02 -0400 Content-Disposition: inline In-Reply-To: <20130505205149.GA2032@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: 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 > 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. From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56021) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZJya-00085a-9R for qemu-devel@nongnu.org; Mon, 06 May 2013 07:53:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UZJyZ-0006HG-16 for qemu-devel@nongnu.org; Mon, 06 May 2013 07:53:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44195) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZJyY-0006G8-PY for qemu-devel@nongnu.org; Mon, 06 May 2013 07:53:02 -0400 Date: Mon, 6 May 2013 14:52:59 +0300 From: Gleb Natapov Message-ID: <20130506115259.GA12349@redhat.com> References: <20130505205149.GA2032@amt.cnet> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130505205149.GA2032@amt.cnet> Subject: Re: [Qemu-devel] [uq/master PATCH] kvmvapic: add ioport read accessor List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 > 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.