From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=55993 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PB5V5-0001yy-S7 for qemu-devel@nongnu.org; Wed, 27 Oct 2010 08:53:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PB5Ua-0003QP-Ld for qemu-devel@nongnu.org; Wed, 27 Oct 2010 08:53:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36718) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PB5Ua-0003Q8-FG for qemu-devel@nongnu.org; Wed, 27 Oct 2010 08:52:36 -0400 Date: Wed, 27 Oct 2010 16:52:06 +0200 From: "Michael S. Tsirkin" Message-ID: <20101027145206.GA4074@redhat.com> References: <676a90a3f99920d2d3b9ecec3ac6c83c87cacc12.1288174753.git.yamahata@valinux.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <676a90a3f99920d2d3b9ecec3ac6c83c87cacc12.1288174753.git.yamahata@valinux.co.jp> Subject: [Qemu-devel] Re: [PATCH 6/6] msix: remove range checks. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Isaku Yamahata Cc: skandasa@cisco.com, etmartin@cisco.com, qemu-devel@nongnu.org, wexu2@cisco.com On Wed, Oct 27, 2010 at 07:21:21PM +0900, Isaku Yamahata wrote: > Same as 4b78560503a802eae3663ace9f9cf080319e7265 > > config write handlers should be idempotent. > > So no need for range checks. > > Signed-off-by: Isaku Yamahata Well I changed my mind on 4b78560503a802eae3663ace9f9cf080319e7265 :) As long as the check is simple, it does not hurt. > --- > hw/msix.c | 5 ----- > 1 files changed, 0 insertions(+), 5 deletions(-) > > diff --git a/hw/msix.c b/hw/msix.c > index f66d255..20caa5e 100644 > --- a/hw/msix.c > +++ b/hw/msix.c > @@ -157,14 +157,9 @@ static void msix_handle_mask_update(PCIDevice *dev, int vector) > void msix_write_config(PCIDevice *dev, uint32_t addr, > uint32_t val, int len) > { > - unsigned enable_pos = dev->msix_cap + MSIX_CONTROL_OFFSET; > int vector; > int i; > > - if (!range_covers_byte(addr, len, enable_pos)) { > - return; > - } > - > if (!msix_enabled(dev)) { > return; > } > -- > 1.7.1.1