From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH 09/14] KVM: PPC: Add generic single register ioctls Date: Mon, 31 Oct 2011 18:26:10 +0100 Message-ID: <4EAEDA32.6030404@siemens.com> References: <1320047596-20577-1-git-send-email-agraf@suse.de> <1320047596-20577-10-git-send-email-agraf@suse.de> <4EAEA447.5050804@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Alexander Graf , "kvm-ppc@vger.kernel.org" , kvm list , Marcelo Tosatti To: Avi Kivity Return-path: Received: from david.siemens.de ([192.35.17.14]:16177 "EHLO david.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932861Ab1JaR0R (ORCPT ); Mon, 31 Oct 2011 13:26:17 -0400 In-Reply-To: <4EAEA447.5050804@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 2011-10-31 14:36, Avi Kivity wrote: > On 10/31/2011 09:53 AM, Alexander Graf wrote: >> Right now we transfer a static struct every time we want to get or set >> registers. Unfortunately, over time we realize that there are more of >> these than we thought of before and the extensibility and flexibility of >> transferring a full struct every time is limited. >> >> So this is a new approach to the problem. With these new ioctls, we can >> get and set a single register that is identified by an ID. This allows for >> very precise and limited transmittal of data. When we later realize that >> it's a better idea to shove over multiple registers at once, we can reuse >> most of the infrastructure and simply implement a GET_MANY_REGS / SET_MANY_REGS >> interface. >> >> The only downpoint I see to this one is that it needs to pad to 1024 bits >> (hardware is already on 512 bit registers, so I wanted to leave some room) >> which is slightly too much for transmitting only 64 bits. But if that's all >> the tradeoff we have to do for getting an extensible interface, I'd say go >> for it nevertheless. > > Do we want this for x86 too? How often do we want just one register? On x86, a single register is probably only interesting for debugging purposes. Things that matter (performance wise) are in kvm.run, anything else does not worry that much about speed. At least for now. I'm still waiting for Kemari to propose some get/set optimizations, but there is obviously not that much to gain or still bigger fish to fry. Also, x86 is less regular than PPC. And where it is fairly regular, we already have a GET/SET_MANY interface: MSRs. Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Date: Mon, 31 Oct 2011 17:26:10 +0000 Subject: Re: [PATCH 09/14] KVM: PPC: Add generic single register ioctls Message-Id: <4EAEDA32.6030404@siemens.com> List-Id: References: <1320047596-20577-1-git-send-email-agraf@suse.de> <1320047596-20577-10-git-send-email-agraf@suse.de> <4EAEA447.5050804@redhat.com> In-Reply-To: <4EAEA447.5050804@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Avi Kivity Cc: Alexander Graf , "kvm-ppc@vger.kernel.org" , kvm list , Marcelo Tosatti On 2011-10-31 14:36, Avi Kivity wrote: > On 10/31/2011 09:53 AM, Alexander Graf wrote: >> Right now we transfer a static struct every time we want to get or set >> registers. Unfortunately, over time we realize that there are more of >> these than we thought of before and the extensibility and flexibility of >> transferring a full struct every time is limited. >> >> So this is a new approach to the problem. With these new ioctls, we can >> get and set a single register that is identified by an ID. This allows for >> very precise and limited transmittal of data. When we later realize that >> it's a better idea to shove over multiple registers at once, we can reuse >> most of the infrastructure and simply implement a GET_MANY_REGS / SET_MANY_REGS >> interface. >> >> The only downpoint I see to this one is that it needs to pad to 1024 bits >> (hardware is already on 512 bit registers, so I wanted to leave some room) >> which is slightly too much for transmitting only 64 bits. But if that's all >> the tradeoff we have to do for getting an extensible interface, I'd say go >> for it nevertheless. > > Do we want this for x86 too? How often do we want just one register? On x86, a single register is probably only interesting for debugging purposes. Things that matter (performance wise) are in kvm.run, anything else does not worry that much about speed. At least for now. I'm still waiting for Kemari to propose some get/set optimizations, but there is obviously not that much to gain or still bigger fish to fry. Also, x86 is less regular than PPC. And where it is fairly regular, we already have a GET/SET_MANY interface: MSRs. Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux