From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [Qemu-devel] [PATCH for-1.7] target-i386: Fix build by providing stub kvm_arch_get_supported_cpuid() Date: Tue, 12 Nov 2013 23:53:47 +0100 Message-ID: <5282B17B.7020602@redhat.com> References: <5281580D.7060305@redhat.com> <52816422.8060002@redhat.com> <52821A62.2050001@redhat.com> <52822958.8060508@redhat.com> <20131112132337.GB2008@redhat.com> <528233DD.6020306@redhat.com> <20131112140935.GD2008@redhat.com> <528241E0.5060503@redhat.com> <52824766.2000507@redhat.com> <52825009.10506@redhat.com> <5282794D.20108@twiddle.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Anthony Liguori , Peter Maydell , kvm-devel , Gleb Natapov , Patch Tracking , QEMU Developers , Andreas Tobler , Anthony Liguori To: Richard Henderson Return-path: Received: from mail-ee0-f51.google.com ([74.125.83.51]:45739 "EHLO mail-ee0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753735Ab3KLWxz (ORCPT ); Tue, 12 Nov 2013 17:53:55 -0500 Received: by mail-ee0-f51.google.com with SMTP id t10so3406978eei.24 for ; Tue, 12 Nov 2013 14:53:53 -0800 (PST) In-Reply-To: <5282794D.20108@twiddle.net> Sender: kvm-owner@vger.kernel.org List-ID: Il 12/11/2013 19:54, Richard Henderson ha scritto: > For what it's worth, I think BOTH of the patches that have been posted > should be applied. That is, the patch that does (X || 1) -> (1 || X), > and the patch that adds the stub. > > Frankly I'd have thought this was obvious It's not that obvious to me. If you add the stub, the patch that reorders operands is not necessary. If you reorder operands, the stub is not necessary. The patch that does (X || 1) -> (1 || X) is unnecessary as a microoptimization, since this code basically runs once at startup. The code is also a little bit less clear with the reordered operands, but perhaps that's just me because I wrote the code that way. (Splitting the if in two would also make sense, and would not affect clarity). Why should both be applied? Paolo