From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH 09/14] KVM: PPC: Add generic single register ioctls Date: Mon, 19 Dec 2011 15:29:25 -0200 Message-ID: <20111219172925.GA16980@amt.cnet> References: <1320047596-20577-1-git-send-email-agraf@suse.de> <1320047596-20577-10-git-send-email-agraf@suse.de> <20111110160536.GD7554@amt.cnet> <4EBC00A6.6040803@suse.de> <20111110173505.GA13747@amt.cnet> <35750AAB-B919-4F7B-B60E-C4ADE9124048@suse.de> <20111123124708.GA13448@amt.cnet> <0709DF5F-8C3B-4B40-A91A-D7CD41854AF8@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm-ppc@vger.kernel.org, kvm list , Avi Kivity To: Alexander Graf Return-path: Content-Disposition: inline In-Reply-To: <0709DF5F-8C3B-4B40-A91A-D7CD41854AF8@suse.de> Sender: kvm-ppc-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Mon, Dec 19, 2011 at 01:58:32PM +0100, Alexander Graf wrote: > I still don't fully understand. You pass in a list of register modifications. The same would happen from guest code. You have a code stream of register modifications. They should both end up calling the same functions in the kernel at the end of the day with the same order. If you call XYZ_REGISTER_SET and then GET_ONE_REG, you get the same the guest would get. > > If it's difficult to implement for specific registers then just don't implement those with the ONE_REG interface. You're not forced to implement all registers with either interface - it's mostly a nicely extensible interface for architectures that evolve quite a bit with people implementing things only partially and then later realizing what's missing :). In other words, it should work great for us ppc folks and I'm fairly sure the ARM guys will appreciate it too. X86 is rather stable and well-exploited, so I can see how it doesn't make sense to use it there. > I was picturing a convertion of x86 to use that interface. My bad. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Date: Mon, 19 Dec 2011 17:29:25 +0000 Subject: Re: [PATCH 09/14] KVM: PPC: Add generic single register ioctls Message-Id: <20111219172925.GA16980@amt.cnet> List-Id: References: <1320047596-20577-1-git-send-email-agraf@suse.de> <1320047596-20577-10-git-send-email-agraf@suse.de> <20111110160536.GD7554@amt.cnet> <4EBC00A6.6040803@suse.de> <20111110173505.GA13747@amt.cnet> <35750AAB-B919-4F7B-B60E-C4ADE9124048@suse.de> <20111123124708.GA13448@amt.cnet> <0709DF5F-8C3B-4B40-A91A-D7CD41854AF8@suse.de> In-Reply-To: <0709DF5F-8C3B-4B40-A91A-D7CD41854AF8@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Alexander Graf Cc: kvm-ppc@vger.kernel.org, kvm list , Avi Kivity On Mon, Dec 19, 2011 at 01:58:32PM +0100, Alexander Graf wrote: > I still don't fully understand. You pass in a list of register modifications. The same would happen from guest code. You have a code stream of register modifications. They should both end up calling the same functions in the kernel at the end of the day with the same order. If you call XYZ_REGISTER_SET and then GET_ONE_REG, you get the same the guest would get. > > If it's difficult to implement for specific registers then just don't implement those with the ONE_REG interface. You're not forced to implement all registers with either interface - it's mostly a nicely extensible interface for architectures that evolve quite a bit with people implementing things only partially and then later realizing what's missing :). In other words, it should work great for us ppc folks and I'm fairly sure the ARM guys will appreciate it too. X86 is rather stable and well-exploited, so I can see how it doesn't make sense to use it there. > I was picturing a convertion of x86 to use that interface. My bad.