From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:42286) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T6OgE-0007uT-TL for qemu-devel@nongnu.org; Tue, 28 Aug 2012 12:30:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T6Og9-0007gP-14 for qemu-devel@nongnu.org; Tue, 28 Aug 2012 12:30:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33327) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T6Og8-0007fm-On for qemu-devel@nongnu.org; Tue, 28 Aug 2012 12:30:12 -0400 Date: Tue, 28 Aug 2012 19:31:24 +0300 From: "Michael S. Tsirkin" Message-ID: <20120828163124.GB3245@redhat.com> References: <20120828162317.GA30308@amt.cnet> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120828162317.GA30308@amt.cnet> Subject: Re: [Qemu-devel] [PATCHv2 2/4] pc: refactor compat code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marcelo Tosatti Cc: gleb@redhat.com, kvm@vger.kernel.org, qemu-devel@nongnu.org, Jan Kiszka , avi@redhat.com, Anthony Liguori On Tue, Aug 28, 2012 at 01:23:18PM -0300, Marcelo Tosatti wrote: > On Mon, Aug 27, 2012 at 03:20:13PM +0300, Michael S. Tsirkin wrote: > > In preparation to adding PV EOI migration for 1.2, > > trivially refactor some some compat code > > to make it easier to add version specific > > cpuid tweaks. > > > > Signed-off-by: Michael S. Tsirkin > > --- > > hw/pc_piix.c | 44 ++++++++++++++++++++++++++++++++++++-------- > > 1 file changed, 36 insertions(+), 8 deletions(-) > > Why can't you clear the cpuid bit in kvm paravirt leaf at hw/pc_piix.c, > leaving compat code isolated there? This is not how we handle it for compat properties: there we set flag in pc_piix and make devices look at that flag. And it makes sense because what you suggest does not scale: we can not teach pc_piix about quirks of all hardware. It will also scale better if we ever get interested about compatibility and migration for non pc machines. -- MST