From: Anthony Liguori Subject: Re: [PATCHv4 01/13] qemu: make default_write_config use mask table Date: Tue, 16 Jun 2009 15:40:13 -0500 Message-ID: <4A38032D.5060506@us.ibm.com> References: <20090610122804.GB27174@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Paul Brook , Avi Kivity , qemu-devel@nongnu.org, Carsten Otte , kvm@vger.kernel.org, Rusty Russell , virtualization@lists.linux-foundation.org, Christian Borntraeger , Blue Swirl , Anthony Liguori , Glauber Costa To: "Michael S. Tsirkin" Return-path: Received: from e34.co.us.ibm.com ([32.97.110.152]:37661 "EHLO e34.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1763006AbZFPUkf (ORCPT ); Tue, 16 Jun 2009 16:40:35 -0400 Received: from d03relay03.boulder.ibm.com (d03relay03.boulder.ibm.com [9.17.195.228]) by e34.co.us.ibm.com (8.13.1/8.13.1) with ESMTP id n5GKbUfV031236 for ; Tue, 16 Jun 2009 14:37:30 -0600 Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d03relay03.boulder.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n5GKePch183014 for ; Tue, 16 Jun 2009 14:40:29 -0600 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n5GKeFnu006101 for ; Tue, 16 Jun 2009 14:40:16 -0600 In-Reply-To: <20090610122804.GB27174@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Michael S. Tsirkin wrote: > Change much of hw/pci to use symbolic constants and a table-driven > design: add a mask table with writable bits set and readonly bits unset. > Detect change by comparing original and new registers. > > This makes it easy to support capabilities where read-only/writeable > bit layout differs between devices, depending on capabilities present. > > As a result, writing a single byte in BAR registers now works as > it should. Writing to upper limit registers in the bridge > also works as it should. Code is also shorter. > > Signed-off-by: Michael S. Tsirkin This series introduces warning (virtio_load decl/def does not match). -- Regards, Anthony Liguori