From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v5 10/22] xen/arm: ITS: Add GITS registers emulation Date: Mon, 3 Aug 2015 12:19:16 +0100 Message-ID: <55BF4E34.3050806@citrix.com> References: <1437995524-19772-1-git-send-email-vijay.kilari@gmail.com> <1437995524-19772-11-git-send-email-vijay.kilari@gmail.com> <55B7D172.4020704@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Vijay Kilari Cc: Ian Campbell , Stefano Stabellini , Prasun Kapoor , manish.jaggi@caviumnetworks.com, Tim Deegan , "xen-devel@lists.xen.org" , Stefano Stabellini , Vijaya Kumar K List-Id: xen-devel@lists.xenproject.org On 01/08/15 09:50, Vijay Kilari wrote: > On Wed, Jul 29, 2015 at 12:31 AM, Julien Grall wrote: >> Hi Vijay, >> >> On 27/07/15 12:11, vijay.kilari@gmail.com wrote: >>> From: Vijaya Kumar K >>> >>> Emulate GITS* registers >>> >>> Signed-off-by: Vijaya Kumar K >>> --- >>> v4: - Removed GICR register emulation >>> --- > [...] >>> + case GITS_PIDR4: >>> + if ( dabt.size != DABT_WORD ) >>> + goto bad_width; >>> + *r = GITS_PIDR4_VAL; >>> + return 1; >>> + case GITS_PIDR5 ... GITS_PIDR7: >>> + goto read_as_zero_32; >>> + default: >>> + dprintk(XENLOG_G_ERR, >>> + "%pv: vITS: unhandled read r%"PRId32" offset 0x%#08"PRIx32"\n", >> >> Reg is definitely not a PRId32. > > dabt.reg is unsigned long : 5. In vgic-v3.c it is printed using %d. > [...] >>> +/* >>> + * GITS_BASER.Type[58:56], GITS_BASER.Entry_size[55:48] >>> + * and GITS_BASER.Shareability[11:10] are read-only. >> >> As said on v4, implemented Shareability as fixed (i.e read-only) is >> deprecated. I'd like to see a TODO here. > > What are you expecting to get fixed for shareability with TODO? To be more explicit, you are implementing a behavior which is deprecated. It means that we should avoid to use it knowingly in the virtual ITS. In this specific case, I would be ok with a TODO explaining that we need to fix it or why we need to do read-only. Regards, -- Julien Grall