From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 12/13] pci-assign: Generic config space access management Date: Tue, 28 Jun 2011 11:21:03 +0300 Message-ID: <4E098EEF.8090507@redhat.com> References: <007a0322c5a4af8a621375c4d2951eee01f2aa05.1309198794.git.jan.kiszka@web.de> <1309214919.2535.73.camel@x201> <4E098BDE.6020203@redhat.com> <4E098EA9.5080302@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Alex Williamson , Marcelo Tosatti , kvm@vger.kernel.org, "Michael S. Tsirkin" To: Jan Kiszka Return-path: Received: from mx1.redhat.com ([209.132.183.28]:9921 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756514Ab1F1IVI (ORCPT ); Tue, 28 Jun 2011 04:21:08 -0400 In-Reply-To: <4E098EA9.5080302@web.de> Sender: kvm-owner@vger.kernel.org List-ID: On 06/28/2011 11:19 AM, Jan Kiszka wrote: > On 2011-06-28 10:07, Avi Kivity wrote: > > On 06/28/2011 01:48 AM, Alex Williamson wrote: > >>> + memset(dev->direct_config_read + PCI_COMMAND, 0xff, 12); > >> This is more efficient, but maybe we should memset each field for > >> grep-ability. > > > > Agree. Or even > > > > pci_assign_set_direct_config(dev, register, start_bit, nr_bits); > > Given that pci_regs.h defines masks and not bits, working with |= and&= > is more handy. Ok. But a function is clearer than a memset. -- error compiling committee.c: too many arguments to function