From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Borntraeger Subject: Re: [patch 0/3] RFC: provide synchronous registers in kvm_run Date: Thu, 22 Dec 2011 13:49:11 +0100 Message-ID: <4EF32747.4050809@de.ibm.com> References: <20111222115646.248800653@de.ibm.com> <4EF32421.8000303@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Marcelo Tossati , Carsten Otte , Alexander Graf , Jens Freimann , Cornelia Huck , Heiko Carstens , Martin Schwidefsky , KVM To: Avi Kivity Return-path: Received: from e06smtp17.uk.ibm.com ([195.75.94.113]:60036 "EHLO e06smtp17.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755179Ab1LVMtq (ORCPT ); Thu, 22 Dec 2011 07:49:46 -0500 Received: from /spool/local by e06smtp17.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 22 Dec 2011 12:49:45 -0000 Received: from d06av12.portsmouth.uk.ibm.com (d06av12.portsmouth.uk.ibm.com [9.149.37.247]) by d06nrmr1307.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pBMCnDVG2695312 for ; Thu, 22 Dec 2011 12:49:13 GMT Received: from d06av12.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av12.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pBMCnD11027085 for ; Thu, 22 Dec 2011 05:49:13 -0700 In-Reply-To: <4EF32421.8000303@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 22/12/11 13:35, Avi Kivity wrote: > On 12/22/2011 01:56 PM, Christian Borntraeger wrote: >> Avi, Marcelo, >> >> currently userspace can access guest registers via several ioctls. Some >> of these registers might be useful very often. Here the system call overhead >> for ioctl can make an exit more expensive than necessary. >> In a discussion with Alex Graf we concluded that it might be beneficial to >> have a subset of registers available in kvm_run. (The ioctls will also be >> available). >> >> This series provides a prototype implementation together with two example >> users for s390. >> >> > > Interesting. Other archs emulate everything to do with registers in the > kernel, so this is not a fast path. > > What workload does this benefit? My main concern was the prefix register (this is a per cpu register that defines the address of two pages that are swapped with the pages at 0 for this cpu). SMP on s390 is done that way (e.g. interrupt things are stored in page 0 for this cpu) The storage that qemu sees is storage without prefix. For architecture compliance we actually must check _every_ memory access if it hits the prefix/swpa area and the add/subtract the prefix value. I just added the ability to share other registers later after some discussions with Alexander Graf because it seems to be doable for almost no cost. Christian