From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v4 07/17] xen/arm: ITS: Add virtual ITS commands support Date: Mon, 13 Jul 2015 10:22:02 +0100 Message-ID: <1436779322.7019.42.camel@citrix.com> References: <1436514172-3263-1-git-send-email-vijay.kilari@gmail.com> <1436514172-3263-8-git-send-email-vijay.kilari@gmail.com> <1436538916.10074.58.camel@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: Stefano Stabellini , Prasun Kapoor , Vijaya Kumar K , Tim Deegan , "xen-devel@lists.xen.org" , Julien Grall , Stefano Stabellini , manish.jaggi@caviumnetworks.com List-Id: xen-devel@lists.xenproject.org On Sat, 2015-07-11 at 20:19 +0530, Vijay Kilari wrote: > >> +int vgic_its_process_cmd(struct vcpu *v, struct vgic_its *vits) > >> +{ > >> + its_cmd_block virt_cmd; > >> + > >> + ASSERT(spin_is_locked(&vits->lock)); > >> + > >> + do { > >> + if ( vgic_its_read_virt_cmd(v, vits, &virt_cmd) ) > >> + goto err; > >> + if ( vgic_its_parse_its_command(v, vits, &virt_cmd) ) > >> + goto err; > >> + vgic_its_update_read_ptr(v, vits); > >> + } while ( vits->cmd_write != vits->cmd_write_save ); > > > > I can't find anywhere other than here where vits->cmd_write is touched. > > What am I missing? > > It is written by guest by GITS_CWRITER emulation in patch #9 Ah, then please reverse the order so that the variable comes first and the target comes second. Also I think you need to find a better name that "cmd_write_save". Something which indicates the progress made perhaps? But why isn't this just cmd_read? Why the separate progress pointer? Ian.