From: Jiri Denemark Subject: Re: [PATCH RESEND v1 1/2] i386: Add Intel Processor Trace feature support Date: Mon, 15 Jan 2018 15:25:18 +0100 Message-ID: <20180115142518.GN1602429@orkuz.home> References: <1515443797-10837-1-git-send-email-luwei.kang@intel.com> <20180112142252.GG6646@localhost.localdomain> <82D7661F83C1A047AF7DC287873BF1E167E7630B@SHSMSX101.ccr.corp.intel.com> <97bf8d29-4009-6f61-f4bb-d128da5a4c9f@redhat.com> <20180115140455.GN6646@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Paolo Bonzini , "Kang, Luwei" , "qemu-devel@nongnu.org" , "kvm@vger.kernel.org" , "rth@twiddle.net" , "mtosatti@redhat.com" , Chao Peng , libvir-list@redhat.com To: Eduardo Habkost Return-path: Received: from mx1.redhat.com ([209.132.183.28]:56376 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933627AbeAOOZf (ORCPT ); Mon, 15 Jan 2018 09:25:35 -0500 Content-Disposition: inline In-Reply-To: <20180115140455.GN6646@localhost.localdomain> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Jan 15, 2018 at 12:04:55 -0200, Eduardo Habkost wrote: > CCing libvirt developers. ... > This case is slightly more problematic, however: the new feature > is actually migratable (under very controlled circumstances) > because of patch 2/2, but it is not migration-safe[1]. This > means libvirt shouldn't include it in "host-model" expansion > (which uses the query-cpu-model-expansion QMP command) until we > make the feature migration-safe. > > For QEMU, this means the feature shouldn't be returned by > "query-cpu-model-expansion type=static model=max" (but it can be > returned by "query-cpu-model-expansion type=full model=max"). > > Jiri, it looks like libvirt uses type=full on > query-cpu-model-expansion on x86. It needs to use > type=static[2], or it will have no way to find out if a feature > is migration-safe or not. ... > [2] It looks like libvirt uses type=full because it wants to get > all QOM property aliases returned. In this case, one > solution for libvirt is to use: > > static_expansion = query_cpu_model_expansion(type=static, model) > all_props = query_cpu_model_expansion(type=full, static_expansion) This is exactly what libvirt is doing (with model = "host") ever since query-cpu-model-expansion support was implemented for x86. Jirka