From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753375AbbDATFn (ORCPT ); Wed, 1 Apr 2015 15:05:43 -0400 Received: from e06smtp13.uk.ibm.com ([195.75.94.109]:37335 "EHLO e06smtp13.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753006AbbDATFk (ORCPT ); Wed, 1 Apr 2015 15:05:40 -0400 Date: Wed, 1 Apr 2015 21:05:31 +0200 From: Michael Mueller To: Eduardo Habkost Cc: linux-s390@vger.kernel.org, Cornelia Huck , kvm@vger.kernel.org, Gleb Natapov , qemu-devel@nongnu.org, linux-kernel@vger.kernel.org, libvir-list@redhat.com, Christian Borntraeger , Alexander Graf , "Jason J. Herne" , Daniel Hansel , Paolo Bonzini , Jiri Denemark , Andreas Faerber , Richard Henderson Subject: Re: [Qemu-devel] [PATCH v4 11/15] target-s390x: New QMP command query-cpu-model Message-ID: <20150401210531.57d2ea98@bee> In-Reply-To: <20150401165905.GM7031@thinpad.lan.raisama.net> References: <1427725708-52100-1-git-send-email-mimu@linux.vnet.ibm.com> <1427725708-52100-12-git-send-email-mimu@linux.vnet.ibm.com> <20150331183526.GJ7031@thinpad.lan.raisama.net> <20150331220909.4410e8c0@bee> <20150401130113.GL7031@thinpad.lan.raisama.net> <20150401183123.7a1f9d6c@bee> <20150401165905.GM7031@thinpad.lan.raisama.net> Organization: IBM X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.23; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15040119-0013-0000-0000-00000383E08A Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 1 Apr 2015 13:59:05 -0300 Eduardo Habkost wrote: > > Not directly invalid as "-cpu none" will be the same as omitting the -cpu option. > > KVM will setup the vcpu properties withou any QEMU control to whatever the hosting > > machine and the kvm kernel code offers. That will allow to run QEMU against a KVM > > version that is not aware of the s390 cpu model ioctls. > > It looks like we have conflicting expectations about > query-cpu-definitions, it seems: on the one hand, if "-cpu none" is > valid I believe it should appear on the query-cpu-definitions return > value; on the other hand, it is not (always?) migration-safe, so just > comparing the source query-cpus data with the target > query-cpu-definitions data wouldn't be enough to ensure live-migration > safety. There are other cases as well where the value given with -cpu is *not* part of the cpu definition list and that is aliases: [mimu@p57lp59 (master-cpu-model) qemu]$ ./s390x-softmmu/qemu-system-s390x -machine s390-ccw,accel=kvm -cpu ? s390 2064-ga1 IBM zSeries 900 GA1 s390 2064-ga2 IBM zSeries 900 GA2 s390 2064-ga3 IBM zSeries 900 GA3 s390 2064 (alias for 2064-ga3) s390 z900 (alias for 2064-ga3) ... s390 z10 (alias for 2097-ga3) s390 z10-ec (alias for 2097-ga3) s390 2098-ga1 IBM System z10 BC GA1 s390 2098-ga2 IBM System z10 BC GA2 s390 2098 (alias for 2098-ga2) s390 z10-bc (alias for 2098-ga2) s390 2817-ga1 IBM zEnterprise 196 GA1 s390 2817-ga2 IBM zEnterprise 196 GA2 s390 2817 (alias for 2817-ga2) s390 z196 (alias for 2817-ga2) s390 2818-ga1 IBM zEnterprise 114 GA1 s390 2818 (alias for 2818-ga1) s390 z114 (alias for 2818-ga1) s390 2827-ga1 IBM zEnterprise EC12 GA1 s390 2827-ga2 IBM zEnterprise EC12 GA2 s390 2827 (alias for 2827-ga2) s390 zEC12 (alias for 2827-ga2) s390 host (alias for 2827-ga2) s390 2828-ga1 IBM zEnterprise BC12 GA1 s390 2828 (alias for 2828-ga1) s390 zBC12 (alias for 2828-ga1) As you can see "host" is in s390x case always an alias and also all other aliases are normalized to their real cpu models in the cpu-definitions list. > > On x86, we have a similar problem with "-cpu host", that changes > depending on the host hardware and host kernel. We solve this problem by > making libvirt code aware of the set of valid CPU models, and libvirt > has special cases for "-cpu host". "-cpu host" is not a special case for s390, it will return ("2827-ga2", "kvm") as cpu model or whatever model the hosting system implements. > > If you don't want to encode that knowledge in libvirt or other > management software for s390, it looks like you need something like a > "stable-abi-safe" field on CpuDefinitionInfo? Exactly that fulfills the "name" field for s390 already in my view. And cpu model "none" just means that QEMU does not manage the cpu model. That's also the reason why I initially returned an empty "[]" model and not "none". This somewhat convinces me to go back to this approach... Michael From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Mueller Subject: Re: [PATCH v4 11/15] target-s390x: New QMP command query-cpu-model Date: Wed, 1 Apr 2015 21:05:31 +0200 Message-ID: <20150401210531.57d2ea98@bee> References: <1427725708-52100-1-git-send-email-mimu@linux.vnet.ibm.com> <1427725708-52100-12-git-send-email-mimu@linux.vnet.ibm.com> <20150331183526.GJ7031@thinpad.lan.raisama.net> <20150331220909.4410e8c0@bee> <20150401130113.GL7031@thinpad.lan.raisama.net> <20150401183123.7a1f9d6c@bee> <20150401165905.GM7031@thinpad.lan.raisama.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20150401165905.GM7031@thinpad.lan.raisama.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org List-Archive: List-Post: To: Eduardo Habkost Cc: linux-s390@vger.kernel.org, kvm@vger.kernel.org, Christian Borntraeger , Gleb Natapov , qemu-devel@nongnu.org, linux-kernel@vger.kernel.org, libvir-list@redhat.com, Alexander Graf , Daniel Hansel , "Jason J. Herne" , Cornelia Huck , Paolo Bonzini , Jiri Denemark , Andreas Faerber , Richard Henderson List-ID: On Wed, 1 Apr 2015 13:59:05 -0300 Eduardo Habkost wrote: > > Not directly invalid as "-cpu none" will be the same as omitting the -cpu option. > > KVM will setup the vcpu properties withou any QEMU control to whatever the hosting > > machine and the kvm kernel code offers. That will allow to run QEMU against a KVM > > version that is not aware of the s390 cpu model ioctls. > > It looks like we have conflicting expectations about > query-cpu-definitions, it seems: on the one hand, if "-cpu none" is > valid I believe it should appear on the query-cpu-definitions return > value; on the other hand, it is not (always?) migration-safe, so just > comparing the source query-cpus data with the target > query-cpu-definitions data wouldn't be enough to ensure live-migration > safety. There are other cases as well where the value given with -cpu is *not* part of the cpu definition list and that is aliases: [mimu@p57lp59 (master-cpu-model) qemu]$ ./s390x-softmmu/qemu-system-s390x -machine s390-ccw,accel=kvm -cpu ? s390 2064-ga1 IBM zSeries 900 GA1 s390 2064-ga2 IBM zSeries 900 GA2 s390 2064-ga3 IBM zSeries 900 GA3 s390 2064 (alias for 2064-ga3) s390 z900 (alias for 2064-ga3) ... s390 z10 (alias for 2097-ga3) s390 z10-ec (alias for 2097-ga3) s390 2098-ga1 IBM System z10 BC GA1 s390 2098-ga2 IBM System z10 BC GA2 s390 2098 (alias for 2098-ga2) s390 z10-bc (alias for 2098-ga2) s390 2817-ga1 IBM zEnterprise 196 GA1 s390 2817-ga2 IBM zEnterprise 196 GA2 s390 2817 (alias for 2817-ga2) s390 z196 (alias for 2817-ga2) s390 2818-ga1 IBM zEnterprise 114 GA1 s390 2818 (alias for 2818-ga1) s390 z114 (alias for 2818-ga1) s390 2827-ga1 IBM zEnterprise EC12 GA1 s390 2827-ga2 IBM zEnterprise EC12 GA2 s390 2827 (alias for 2827-ga2) s390 zEC12 (alias for 2827-ga2) s390 host (alias for 2827-ga2) s390 2828-ga1 IBM zEnterprise BC12 GA1 s390 2828 (alias for 2828-ga1) s390 zBC12 (alias for 2828-ga1) As you can see "host" is in s390x case always an alias and also all other aliases are normalized to their real cpu models in the cpu-definitions list. > > On x86, we have a similar problem with "-cpu host", that changes > depending on the host hardware and host kernel. We solve this problem by > making libvirt code aware of the set of valid CPU models, and libvirt > has special cases for "-cpu host". "-cpu host" is not a special case for s390, it will return ("2827-ga2", "kvm") as cpu model or whatever model the hosting system implements. > > If you don't want to encode that knowledge in libvirt or other > management software for s390, it looks like you need something like a > "stable-abi-safe" field on CpuDefinitionInfo? Exactly that fulfills the "name" field for s390 already in my view. And cpu model "none" just means that QEMU does not manage the cpu model. That's also the reason why I initially returned an empty "[]" model and not "none". This somewhat convinces me to go back to this approach... Michael From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50719) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdNxR-0007Im-DZ for qemu-devel@nongnu.org; Wed, 01 Apr 2015 15:05:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YdNxM-0007sn-ID for qemu-devel@nongnu.org; Wed, 01 Apr 2015 15:05:45 -0400 Received: from e06smtp17.uk.ibm.com ([195.75.94.113]:51004) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdNxM-0007sF-7F for qemu-devel@nongnu.org; Wed, 01 Apr 2015 15:05:40 -0400 Received: from /spool/local by e06smtp17.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 1 Apr 2015 20:05:37 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id B01F7219004D for ; Wed, 1 Apr 2015 20:05:22 +0100 (BST) Received: from d06av12.portsmouth.uk.ibm.com (d06av12.portsmouth.uk.ibm.com [9.149.37.247]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t31J5ZV48847672 for ; Wed, 1 Apr 2015 19:05:35 GMT Received: from d06av12.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av12.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t31J5Xp5008993 for ; Wed, 1 Apr 2015 13:05:34 -0600 Date: Wed, 1 Apr 2015 21:05:31 +0200 From: Michael Mueller Message-ID: <20150401210531.57d2ea98@bee> In-Reply-To: <20150401165905.GM7031@thinpad.lan.raisama.net> References: <1427725708-52100-1-git-send-email-mimu@linux.vnet.ibm.com> <1427725708-52100-12-git-send-email-mimu@linux.vnet.ibm.com> <20150331183526.GJ7031@thinpad.lan.raisama.net> <20150331220909.4410e8c0@bee> <20150401130113.GL7031@thinpad.lan.raisama.net> <20150401183123.7a1f9d6c@bee> <20150401165905.GM7031@thinpad.lan.raisama.net> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 11/15] target-s390x: New QMP command query-cpu-model List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: linux-s390@vger.kernel.org, kvm@vger.kernel.org, Christian Borntraeger , Gleb Natapov , qemu-devel@nongnu.org, linux-kernel@vger.kernel.org, libvir-list@redhat.com, Alexander Graf , Daniel Hansel , "Jason J. Herne" , Cornelia Huck , Paolo Bonzini , Jiri Denemark , Andreas Faerber , Richard Henderson On Wed, 1 Apr 2015 13:59:05 -0300 Eduardo Habkost wrote: > > Not directly invalid as "-cpu none" will be the same as omitting the -cpu option. > > KVM will setup the vcpu properties withou any QEMU control to whatever the hosting > > machine and the kvm kernel code offers. That will allow to run QEMU against a KVM > > version that is not aware of the s390 cpu model ioctls. > > It looks like we have conflicting expectations about > query-cpu-definitions, it seems: on the one hand, if "-cpu none" is > valid I believe it should appear on the query-cpu-definitions return > value; on the other hand, it is not (always?) migration-safe, so just > comparing the source query-cpus data with the target > query-cpu-definitions data wouldn't be enough to ensure live-migration > safety. There are other cases as well where the value given with -cpu is *not* part of the cpu definition list and that is aliases: [mimu@p57lp59 (master-cpu-model) qemu]$ ./s390x-softmmu/qemu-system-s390x -machine s390-ccw,accel=kvm -cpu ? s390 2064-ga1 IBM zSeries 900 GA1 s390 2064-ga2 IBM zSeries 900 GA2 s390 2064-ga3 IBM zSeries 900 GA3 s390 2064 (alias for 2064-ga3) s390 z900 (alias for 2064-ga3) ... s390 z10 (alias for 2097-ga3) s390 z10-ec (alias for 2097-ga3) s390 2098-ga1 IBM System z10 BC GA1 s390 2098-ga2 IBM System z10 BC GA2 s390 2098 (alias for 2098-ga2) s390 z10-bc (alias for 2098-ga2) s390 2817-ga1 IBM zEnterprise 196 GA1 s390 2817-ga2 IBM zEnterprise 196 GA2 s390 2817 (alias for 2817-ga2) s390 z196 (alias for 2817-ga2) s390 2818-ga1 IBM zEnterprise 114 GA1 s390 2818 (alias for 2818-ga1) s390 z114 (alias for 2818-ga1) s390 2827-ga1 IBM zEnterprise EC12 GA1 s390 2827-ga2 IBM zEnterprise EC12 GA2 s390 2827 (alias for 2827-ga2) s390 zEC12 (alias for 2827-ga2) s390 host (alias for 2827-ga2) s390 2828-ga1 IBM zEnterprise BC12 GA1 s390 2828 (alias for 2828-ga1) s390 zBC12 (alias for 2828-ga1) As you can see "host" is in s390x case always an alias and also all other aliases are normalized to their real cpu models in the cpu-definitions list. > > On x86, we have a similar problem with "-cpu host", that changes > depending on the host hardware and host kernel. We solve this problem by > making libvirt code aware of the set of valid CPU models, and libvirt > has special cases for "-cpu host". "-cpu host" is not a special case for s390, it will return ("2827-ga2", "kvm") as cpu model or whatever model the hosting system implements. > > If you don't want to encode that knowledge in libvirt or other > management software for s390, it looks like you need something like a > "stable-abi-safe" field on CpuDefinitionInfo? Exactly that fulfills the "name" field for s390 already in my view. And cpu model "none" just means that QEMU does not manage the cpu model. That's also the reason why I initially returned an empty "[]" model and not "none". This somewhat convinces me to go back to this approach... Michael