From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32966) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCqX8-00057b-4i for qemu-devel@nongnu.org; Fri, 23 Aug 2013 08:32:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VCqX3-0000Oo-2l for qemu-devel@nongnu.org; Fri, 23 Aug 2013 08:32:06 -0400 From: Markus Armbruster References: <1376651630-9151-1-git-send-email-armbru@redhat.com> <20130821202833.GA15129@redhat.com> Date: Fri, 23 Aug 2013 14:31:49 +0200 In-Reply-To: <20130821202833.GA15129@redhat.com> (Michael S. Tsirkin's message of "Wed, 21 Aug 2013 23:28:33 +0300") Message-ID: <87r4dkpozu.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v4 0/6] Clean up bogus default boot order List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: aliguori@us.ibm.com, mjt@tls.msk.ru, qemu-devel@nongnu.org, agraf@suse.de, blauwirbel@gmail.com, qemu-ppc@nongnu.org, aviksil@linux.vnet.ibm.com "Michael S. Tsirkin" writes: > On Fri, Aug 16, 2013 at 01:13:44PM +0200, armbru@redhat.com wrote: >> From: Markus Armbruster >> >> The first five patches are admittedly related to the stated purpose of >> this series pretty much only by "I can't stand perpetuating this >> stupid crap". Max Filippov and Peter Maydell already cleaned up >> Xtensa and ARM the same way. > > I picked up patches 3,4 and 5 on my tree. > 1 and 2 were rebased by Eduardo, I'm taking them > from his patchset. > 6 needs to be rebased and comments addressed. Applies fine with "git-am -3". Pushed to http://repo.or.cz/w/qemu/armbru.git/shortlog/refs/heads/boot-order for your convenience. We discussed the patch at some length, but it's not 100% clear to me what exactly you'd like me to address and how. So let's recap briefly. I think your main point was that PC machine type declarations are a bit repetitive. They all share two lines: .max_cpus = 255, DEFAULT_MACHINE_OPTIONS, where DEFAULT_MACHINE_OPTIONS is defined as #define DEFAULT_MACHINE_OPTIONS \ .boot_order = "cad" Many of them also share one of these lines: .desc = "Standard PC (Q35 + ICH9, 2009)", .desc = "Standard PC (i440FX + PIIX, 1996)", .desc = "Standard PC", My patch touches only the shared DEFAULT_MACHINE_OPTIONS line. It becomes .boot_order = "cad" Commit message explains why: We set default boot order "cad" in every single machine definition except "pseries" and "moxiesim", even though very few boards actually care for boot order, and "cad" makes sense for even fewer. Machines that care: * pc and its variants Accept up to three letters 'a', 'b' (undocumented alias for 'a'), 'c', 'd' and 'n'. Reject all others (fatal with -boot). [...] Strip characters these machines ignore from their default boot order. For all other machines, remove the unused default boot order alltogether. The change is systematic: if the machine uses .boot_order, strip the characters it ignores from its initial value, else drop the initializer, so .boot_order remains null. I don't want to squash further cleanup into this one, because it's hard enough to review as it is (and it already got competent review). I could be persuaded to do further cleanup on top, but you need to tell me what cleanup you want. Probably faster if you do it yourself :)