Received: from eggs.gnu.org ([208.118.235.92]:58348) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TrF6F-0006NS-Qd for qemu-devel@nongnu.org; Fri, 04 Jan 2013 16:46:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TrF6E-0001Ab-UW for qemu-devel@nongnu.org; Fri, 04 Jan 2013 16:46:47 -0500 Received: from mx1.redhat.com ([209.132.183.28]:12505) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TrF6E-0001AL-LG for qemu-devel@nongnu.org; Fri, 04 Jan 2013 16:46:46 -0500 Date: Fri, 4 Jan 2013 19:48:18 -0200 From: Eduardo Habkost Message-ID: <20130104214818.GB26746@otherpad.lan.raisama.net> References: <1357311145-16410-1-git-send-email-ehabkost@redhat.com> <1357311145-16410-3-git-send-email-ehabkost@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH 2/2] target-i386: Disable kvm_mmu_op by default on pc-1.4 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: kvm@vger.kernel.org, Gleb Natapov , "Michael S. Tsirkin" , libvir-list@redhat.com, Marcelo Tosatti , qemu-devel@nongnu.org, Igor Mammedov , Jiri Denemark , Andreas =?iso-8859-1?Q?F=E4rber?= On Fri, Jan 04, 2013 at 08:48:42PM +0000, Blue Swirl wrote: [...] > > +/* machine init function for pc-0.14 - pc-1.2 */ > > static void pc_init_pci(QEMUMachineInitArgs *args) > > { > > ram_addr_t ram_size = args->ram_size; > > @@ -232,12 +233,20 @@ static void pc_init_pci(QEMUMachineInitArgs *args) > > initrd_filename, cpu_model, 1, 1); > > } > > > > +/* machine init function for pc-1.3 */ > > The comment does give much information compared to the function name. You can't be sure from the function name if it's just for 1.3 or for 1.3 and higher/lower. e.g. before this patch, the pc_init_pci_1_3() function was used by both pc-1.3 and pc-1.4. But I will change this, anyway: I will document only the non-trivial cases (that don't apply to only one machine-type version), it should be better than redundant comments. [...] > > +void disable_kvm_mmu_op(void) > > +{ > > +#ifdef CONFIG_KVM > > + if (kvm_enabled()) > > Braces. Will be fixed in the next version. -- Eduardo