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: Wed, 29 Apr 2015 14:35:18 +0100 Message-ID: <5540DE16.4090900@citrix.com> References: <1426775889-29442-1-git-send-email-vijay.kilari@gmail.com> <1426775889-29442-14-git-send-email-vijay.kilari@gmail.com> <55114EFA.9050304@linaro.org> <55197005.7090408@linaro.org> <1427888815.2115.279.camel@citrix.com> <551BDE4C.9030109@citrix.com> <1427966007.4037.14.camel@citrix.com> <551D2298.2060302@citrix.com> <1427973539.4037.52.camel@citrix.com> <551D4888.1020309@gmail.com> <553F6271.4010308@citrix.com> <553FB23F.7090200@citrix.com> <5540C6D5.9020400@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5540C6D5.9020400@citrix.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: Julien Grall , Vijay Kilari Cc: Ian Campbell , Stefano Stabellini , Prasun Kapoor , Vijaya Kumar K , Julien Grall , Tim Deegan , "xen-devel@lists.xen.org" , Stefano Stabellini , manish.jaggi@caviumnetworks.com List-Id: xen-devel@lists.xenproject.org On 29/04/15 12:56, Julien Grall wrote: > As the 2 suggested approach don't seem to fit our usage, we need to find > another approach. I think I have another approach which doesn't require interrupt neither polling in EL2. 1) Trap on CWRITER a) Read command for the vITS CQ b) Transform command c) Inject command - If ITS CQ full => 2) - If vITS CQ empty => 2) - Else => 1) 2) Return to guest 3) Trap on CREADR a) Check completion of the current batch of command - If complete => 3.b) - Else => 4) b) Update CREADR c) Check if more command and inject it (see process in 1)) 4) Return to guest Some other restrictions to add: - If there is already a batch of command in process for the domain, defer the injection of new command - The number of command sent in a batch should be limited. I think thoses restrictions are okay because the ITS is per-domain not per-VCPU. Although, there is a possible problem if the guest is not reading CREADR. Maybe having a timer would be fine to update CREADR and inject new commands. Regards, -- Julien Grall