From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Subject: Re: RFC: New API for PPC for vcpu mmu access Date: Mon, 14 Feb 2011 15:16:57 -0600 Message-ID: <20110214151657.0ce8c4a4@schlenkerla.am.freescale.net> References: <9F6FE96B71CF29479FF1CDC8046E15030BCD40@039-SN1MPN1-002.039d.mgd.msft.net> <20110202160821.5a223366@udp111988uds> <20110204163338.54690220@udp111988uds> <30BEE027-929B-43E5-A638-A58389F90B6F@suse.de> <20110207141547.58e49caa@udp111988uds> <220F22AA-31E5-4ACB-B0D5-557010096B91@suse.de> <20110209170928.6c629514@udp111988uds> <4D53CFE2.6080008@suse.de> <20110210125112.6d1f0380@udp111988uds> <8ACEDFEA-AA7F-400F-88F1-5F99864E8AAF@suse.de> <63E8AA2B-685F-4360-9BC8-E760A2CAD570@suse.de> <49812881-9E7C-4295-B708-CFA986EE9500@suse.de> <20110211145340.70c5812b@udp111988uds> <113B6114-C44E-4DD4-B318-4CAC826179DE@suse.de> <20110211185734.42f7f73f@udp111988uds> <4DC23D10-A9C9-4C11-A344-A9779C370296@suse.de> <20110214111153.07f884b6@udp111988uds> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Cc: Yoder Stuart-B08248 , "" , "kvm@vger.kernel.org list" , "qemu-devel@nongnu.org List" To: Alexander Graf Return-path: Received: from ch1outboundpool.messaging.microsoft.com ([216.32.181.183]:54908 "EHLO ch1outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751506Ab1BNVRS (ORCPT ); Mon, 14 Feb 2011 16:17:18 -0500 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Mon, 14 Feb 2011 21:19:19 +0100 Alexander Graf wrote: > There's no nack here :). The only thing that needs to change is the anonymous part, as that's a gnu extension. Just name the structs and unions and all is well. Ah, I thought it was an aesthetic objection -- didn't realize it was a GNUism. Oh well. > The reason I was asking is that I assumed the code would end up being easier, not more complex without the u32s. In fact, it probably would. I'll leave the final decision if you want to access things by entry->u81.split.mas8 or entry->mas8_1 & MAS8_1_MAS8_MASK. After sending that, I was thinking that mas7_3 is more naturally used as a pair, so I'd stick with the u64 there. I think mas8_1 benefits less from the pairing, though -- it's only really useful if you're going to put the value directly in hardware, which we won't. > >> The struct name should also have > >> a version indicator - it's the data descriptor only a single specific > >> mmu_type, right? > > > > It handles both KVM_MMU_PPC_BOOK3E_NOHV and KVM_MMU_PPC_BOOK3E_HV. > > Even fictional future changes to the tlb layout? No, those need a new MMU type ID. > >> Please state the size explicitly then. It's 1k, right? > > > > It's 4K on Freescale chips. We should probably implement sregs first, in > > which case qemu can read the MMU config registers to find out the minimum > > supported page size. > > > > If we specify 4K here, we should probably just go ahead and stick FSL in > > the MMU type name. Specifying the hash itself already makes me nervous > > about claiming the more generic name. > > Yup, sounds good :). Which one, "read the MMU config registers" or "specify 4K and stick FSL in the name"? -Scott From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=43662 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pp5nL-0008KV-5L for qemu-devel@nongnu.org; Mon, 14 Feb 2011 16:17:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pp5nJ-0004VD-Tu for qemu-devel@nongnu.org; Mon, 14 Feb 2011 16:17:18 -0500 Received: from ch1outboundpool.messaging.microsoft.com ([216.32.181.182]:54904) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pp5nJ-0004V2-P4 for qemu-devel@nongnu.org; Mon, 14 Feb 2011 16:17:17 -0500 Date: Mon, 14 Feb 2011 15:16:57 -0600 From: Scott Wood Message-ID: <20110214151657.0ce8c4a4@schlenkerla.am.freescale.net> In-Reply-To: References: <9F6FE96B71CF29479FF1CDC8046E15030BCD40@039-SN1MPN1-002.039d.mgd.msft.net> <20110202160821.5a223366@udp111988uds> <20110204163338.54690220@udp111988uds> <30BEE027-929B-43E5-A638-A58389F90B6F@suse.de> <20110207141547.58e49caa@udp111988uds> <220F22AA-31E5-4ACB-B0D5-557010096B91@suse.de> <20110209170928.6c629514@udp111988uds> <4D53CFE2.6080008@suse.de> <20110210125112.6d1f0380@udp111988uds> <8ACEDFEA-AA7F-400F-88F1-5F99864E8AAF@suse.de> <63E8AA2B-685F-4360-9BC8-E760A2CAD570@suse.de> <49812881-9E7C-4295-B708-CFA986EE9500@suse.de> <20110211145340.70c5812b@udp111988uds> <113B6114-C44E-4DD4-B318-4CAC826179DE@suse.de> <20110211185734.42f7f73f@udp111988uds> <4DC23D10-A9C9-4C11-A344-A9779C370296@suse.de> <20110214111153.07f884b6@udp111988uds> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: RFC: New API for PPC for vcpu mmu access List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Yoder Stuart-B08248 , "kvm@vger.kernel.org list" , "" , "qemu-devel@nongnu.org List" On Mon, 14 Feb 2011 21:19:19 +0100 Alexander Graf wrote: > There's no nack here :). The only thing that needs to change is the anonymous part, as that's a gnu extension. Just name the structs and unions and all is well. Ah, I thought it was an aesthetic objection -- didn't realize it was a GNUism. Oh well. > The reason I was asking is that I assumed the code would end up being easier, not more complex without the u32s. In fact, it probably would. I'll leave the final decision if you want to access things by entry->u81.split.mas8 or entry->mas8_1 & MAS8_1_MAS8_MASK. After sending that, I was thinking that mas7_3 is more naturally used as a pair, so I'd stick with the u64 there. I think mas8_1 benefits less from the pairing, though -- it's only really useful if you're going to put the value directly in hardware, which we won't. > >> The struct name should also have > >> a version indicator - it's the data descriptor only a single specific > >> mmu_type, right? > > > > It handles both KVM_MMU_PPC_BOOK3E_NOHV and KVM_MMU_PPC_BOOK3E_HV. > > Even fictional future changes to the tlb layout? No, those need a new MMU type ID. > >> Please state the size explicitly then. It's 1k, right? > > > > It's 4K on Freescale chips. We should probably implement sregs first, in > > which case qemu can read the MMU config registers to find out the minimum > > supported page size. > > > > If we specify 4K here, we should probably just go ahead and stick FSL in > > the MMU type name. Specifying the hash itself already makes me nervous > > about claiming the more generic name. > > Yup, sounds good :). Which one, "read the MMU config registers" or "specify 4K and stick FSL in the name"? -Scott From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Mon, 14 Feb 2011 21:16:57 +0000 Subject: Re: RFC: New API for PPC for vcpu mmu access Message-Id: <20110214151657.0ce8c4a4@schlenkerla.am.freescale.net> List-Id: References: <9F6FE96B71CF29479FF1CDC8046E15030BCD40@039-SN1MPN1-002.039d.mgd.msft.net> <20110202160821.5a223366@udp111988uds> <20110204163338.54690220@udp111988uds> <30BEE027-929B-43E5-A638-A58389F90B6F@suse.de> <20110207141547.58e49caa@udp111988uds> <220F22AA-31E5-4ACB-B0D5-557010096B91@suse.de> <20110209170928.6c629514@udp111988uds> <4D53CFE2.6080008@suse.de> <20110210125112.6d1f0380@udp111988uds> <8ACEDFEA-AA7F-400F-88F1-5F99864E8AAF@suse.de> <63E8AA2B-685F-4360-9BC8-E760A2CAD570@suse.de> <49812881-9E7C-4295-B708-CFA986EE9500@suse.de> <20110211145340.70c5812b@udp111988uds> <113B6114-C44E-4DD4-B318-4CAC826179DE@suse.de> <20110211185734.42f7f73f@udp111988uds> <4DC23D10-A9C9-4C11-A344-A9779C370296@suse.de> <20110214111153.07f884b6@udp111988uds> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Alexander Graf Cc: Yoder Stuart-B08248 , "" , "kvm@vger.kernel.org list" , "qemu-devel@nongnu.org List" On Mon, 14 Feb 2011 21:19:19 +0100 Alexander Graf wrote: > There's no nack here :). The only thing that needs to change is the anonymous part, as that's a gnu extension. Just name the structs and unions and all is well. Ah, I thought it was an aesthetic objection -- didn't realize it was a GNUism. Oh well. > The reason I was asking is that I assumed the code would end up being easier, not more complex without the u32s. In fact, it probably would. I'll leave the final decision if you want to access things by entry->u81.split.mas8 or entry->mas8_1 & MAS8_1_MAS8_MASK. After sending that, I was thinking that mas7_3 is more naturally used as a pair, so I'd stick with the u64 there. I think mas8_1 benefits less from the pairing, though -- it's only really useful if you're going to put the value directly in hardware, which we won't. > >> The struct name should also have > >> a version indicator - it's the data descriptor only a single specific > >> mmu_type, right? > > > > It handles both KVM_MMU_PPC_BOOK3E_NOHV and KVM_MMU_PPC_BOOK3E_HV. > > Even fictional future changes to the tlb layout? No, those need a new MMU type ID. > >> Please state the size explicitly then. It's 1k, right? > > > > It's 4K on Freescale chips. We should probably implement sregs first, in > > which case qemu can read the MMU config registers to find out the minimum > > supported page size. > > > > If we specify 4K here, we should probably just go ahead and stick FSL in > > the MMU type name. Specifying the hash itself already makes me nervous > > about claiming the more generic name. > > Yup, sounds good :). Which one, "read the MMU config registers" or "specify 4K and stick FSL in the name"? -Scott