From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51250) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFSvr-0005A7-1B for qemu-devel@nongnu.org; Tue, 21 Jun 2016 17:10:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFSvn-0001t5-1g for qemu-devel@nongnu.org; Tue, 21 Jun 2016 17:10:02 -0400 Received: from smtp.vivo.cz ([85.132.139.10]:39116) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFSvm-0001so-Mm for qemu-devel@nongnu.org; Tue, 21 Jun 2016 17:09:58 -0400 Date: Tue, 21 Jun 2016 23:09:49 +0200 From: Jiri Denemark Message-ID: <20160621210949.GH4783@orkuz.home> References: <1466514153-85777-1-git-send-email-dahi@linux.vnet.ibm.com> <20160621164431.GI2048@thinpad.lan.raisama.net> <20160621190144.174c93cd@thinkpad-w530> <20160621203309.GK2048@thinpad.lan.raisama.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160621203309.GK2048@thinpad.lan.raisama.net> Subject: Re: [Qemu-devel] [RFC 00/28] s390x CPU models: exposing features List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: David Hildenbrand , qemu-devel@nongnu.org, imammedo@redhat.com, cornelia.huck@de.ibm.com, borntraeger@de.ibm.com, fiuczy@linux.vnet.ibm.com, mimu@linux.vnet.ibm.com, libvir-list@redhat.com On Tue, Jun 21, 2016 at 17:33:09 -0300, Eduardo Habkost wrote: > On Tue, Jun 21, 2016 at 07:01:44PM +0200, David Hildenbrand wrote: > > > (CCing libvirt people) > > > > > > On Tue, Jun 21, 2016 at 03:02:05PM +0200, David Hildenbrand wrote: > > > > This is our second attempt to implement CPU models for s390x. We realized > > > > that we also want to have features exposed via the CPU model. While doing > > > > that we realized that we want to have a better interface for libvirt. > > > > > > Before getting into the details, I would like to clarify how the > > > following could be accomplished using the new commands: > > > > > > Example: > > > > > > 1) User configures libvirt with: > > > > > > Westmere > > > > > > > > > 2) libvirt will translate that to: > > > "-cpu Westmere,+aes" or "-cpu Westmere,aes=on" > > > 3) libvirt wants to know if "-cpu Westmere,aes=on" is usable in > > > the current host, before trying to start the VM. > > > > > > How exactly would this be done using the new commands? > > > > Hi Eduardo, > > > > thanks for having a look - highly appreciated that you actually map this > > to libvirt requirements! > > > > That would map to a compare operation between "host" and "Westmere,aes=on". > > > > Host could at that point already be expanded by libvirt. Doesn't matter at that > > point. > > > > If the result is "identica"l or "superset", it is runnable. If the result is > > "subset" or "incompatible", details about the responsible properties is > > indicated. (I actually took that idea from your patch for indicating > > runnability). > > So, I have two worries about the proposal: > > > 1) "query-cpu-model-expansion model=host" vs "query-host-cpu": > > I still don't think we want to set in stone that "the result the > guest sees when using -cpu host" is always the same as "what the > host supports running". > > For example: let's assume a given architecture have two features > (A and B) that are both supported by the host but can never be > enabled together. For actual "-cpu host" usage, QEMU would have > to choose between enabling A and B. For querying host > capabilities, we still want to let management software know that > either A or B are supported. What libvirt is really interested in is the guest CPU which would be used with -cpu host. This is actually what I thought query-host-cpu was all about. Perhaps because there's no difference for x86. > 2) Requiring a running QEMU instance to run > query-cpu-model-comparison > > With my previous query-host-cpu proposal, the task of comparing > the configuration requested by the user with host capabilities > can be done directly by libvirt. This way, no extra QEMU instance > needs to be run before starting a VM. I think we can just easily get around this by not comparing a guest CPU to host (except for the explicit virConnectCompareCPU, which is not very useful in its current form anyway). Jirka