From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [RFC PATCH v2 13/22] xen/arm: its: Add virtual ITS command support Date: Tue, 24 Mar 2015 11:48:10 +0000 Message-ID: <55114EFA.9050304@linaro.org> References: <1426775889-29442-1-git-send-email-vijay.kilari@gmail.com> <1426775889-29442-14-git-send-email-vijay.kilari@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1426775889-29442-14-git-send-email-vijay.kilari@gmail.com> 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@gmail.com, Ian.Campbell@citrix.com, stefano.stabellini@eu.citrix.com, stefano.stabellini@citrix.com, tim@xen.org, xen-devel@lists.xen.org Cc: Prasun.Kapoor@caviumnetworks.com, vijaya.kumar@caviumnetworks.com, manish.jaggi@caviumnetworks.com List-Id: xen-devel@lists.xenproject.org Hello Vijay, More questions/remarks about command processing. On 19/03/2015 14:38, vijay.kilari@gmail.com wrote: > +int vgic_its_process_cmd(struct vcpu *v, struct vgic_its *vits) > +{ > + struct its_cmd_block virt_cmd; > + > + /* XXX: Currently we are processing one cmd at a time */ > + 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; > + } while ( vits->cmd_write != vits->cmd_write_save ); > + > + vits->cmd_write_save = vits->cmd_write; > + DPRINTK("vITS: write_save 0x%lx write 0x%lx \n", > + vits->cmd_write_save, > + vits->cmd_write); > + /* XXX: Currently we are processing one cmd at a time */ > + vgic_its_update_read_ptr(v, vits); From the spec the GITS_CREADR should be updated at every command processing. That would make cmd_write_save pointless. Also, you are taking the VITS lock for the whole process. This process can be very long. How will it affect the other vCPUs of the domain? Finally, in environment with multiple guests using ITS, the ITS command send to the physical ITS may be interleaved (i.e DOM1 cmd, DOM2 cmd, DOM1 cmd ...). Is there any possible side-effect? Regards, -- Julien Grall