Received: from eggs.gnu.org ([208.118.235.92]:33166) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVkcF-000609-Fe for qemu-devel@nongnu.org; Fri, 26 Apr 2013 11:31:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UVkcA-0005VK-T1 for qemu-devel@nongnu.org; Fri, 26 Apr 2013 11:31:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47302) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVkcA-0005VF-ME for qemu-devel@nongnu.org; Fri, 26 Apr 2013 11:31:10 -0400 Date: Fri, 26 Apr 2013 12:31:08 -0300 From: Eduardo Habkost Message-ID: <20130426153108.GX2900@otherpad.lan.raisama.net> References: <1366915386-14728-1-git-send-email-ehabkost@redhat.com> <1366915386-14728-8-git-send-email-ehabkost@redhat.com> <20130426171029.3e159116@thinkpad> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130426171029.3e159116@thinkpad> Subject: Re: [Qemu-devel] [RFC 7/7] target-i386: Disable direct passthrough of PMU CPUID leaf by default List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: qemu-devel@nongnu.org, Gleb Natapov , Andreas =?iso-8859-1?Q?F=E4rber?= On Fri, Apr 26, 2013 at 05:10:29PM +0200, Igor Mammedov wrote: > On Thu, 25 Apr 2013 15:43:06 -0300 > Eduardo Habkost wrote: > > > The current code handling the CPUID 0xA leaf simply forwards all data > > from GET_SUPPORTED_CPUID directly to the guest, breaking migration > > between hosts with different number of PMU counters. > > > > This patch disables this behavior, except on older machine-types (for > > compatibility) and on the "host" CPU model. > Please, make it static property and use compat properties. > Result will be simpler and much less will have to be redone/discarded after > converting to the rest to properties and sub-classes. I was going to say that static properties were too much work to be done in time for 1.5, but you are right: in this specific case adding a static property for the cpuid_pmu_passthrough field looks very easy. I will give it a try. I will probably try to make the "model" field a static property as well. Then only x86_cpu_compat_set_features() would be kept, as converting feature flags to static properties will probably require more work. Thanks, -- Eduardo