From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NKAxq-0005M1-99 for qemu-devel@nongnu.org; Mon, 14 Dec 2009 08:27:50 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NKAxl-0005IT-Ok for qemu-devel@nongnu.org; Mon, 14 Dec 2009 08:27:49 -0500 Received: from [199.232.76.173] (port=53962 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NKAxl-0005IE-A2 for qemu-devel@nongnu.org; Mon, 14 Dec 2009 08:27:45 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49939) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NKAxl-0003Nz-15 for qemu-devel@nongnu.org; Mon, 14 Dec 2009 08:27:45 -0500 Date: Mon, 14 Dec 2009 15:25:01 +0200 From: "Michael S. Tsirkin" Message-ID: <20091214132501.GC973@redhat.com> References: <1260794906-30168-1-git-send-email-yamahata@valinux.co.jp> <1260794906-30168-12-git-send-email-yamahata@valinux.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1260794906-30168-12-git-send-email-yamahata@valinux.co.jp> Subject: [Qemu-devel] Re: [PATCH 11/11] msix: use range helper function. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Isaku Yamahata Cc: qemu-devel@nongnu.org On Mon, Dec 14, 2009 at 09:48:26PM +0900, Isaku Yamahata wrote: > use range helper function in msix_write_config(). > > Signed-off-by: Isaku Yamahata Acked-by: Michael S. Tsirkin > --- > hw/msix.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/hw/msix.c b/hw/msix.c > index 0baedef..2ca0900 100644 > --- a/hw/msix.c > +++ b/hw/msix.c > @@ -175,7 +175,7 @@ void msix_write_config(PCIDevice *dev, uint32_t addr, > unsigned enable_pos = dev->msix_cap + MSIX_CONTROL_OFFSET; > int vector; > > - if (addr + len <= enable_pos || addr > enable_pos) { > + if (!range_covers_byte(addr, len, enable_pos)) { > return; > } > > -- > 1.6.5.4