From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v5 09/22] xen/arm: ITS: Export ITS info to Virtual ITS Date: Mon, 3 Aug 2015 16:58:10 +0100 Message-ID: <55BF8F92.5040907@citrix.com> References: <1437995524-19772-1-git-send-email-vijay.kilari@gmail.com> <1437995524-19772-10-git-send-email-vijay.kilari@gmail.com> <55B7C693.3080805@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 Hi Vijay, On 31/07/15 08:01, Vijay Kilari wrote: >> The vITS will only expose 1 ITS to dom0. So there is no need to try to >> allocate memory in order to expose all the ITS. >> >> We can extend vits_setup_hw if we ever want to support more ITS in the >> future. >> >> Furthermore I'd like to see all the ITS data pass one by one rather than >> in a structure. This would help to catch error if we ever extend the >> structure. >> >> Something like: >> >> void vits_hw_setup(paddr_t its0_base, unsigned long its0_size, >> uint32_t eventID_bits, uint32_t devID_bits); >> > > Passing every value as argument makes this function take too many arguments. > Validation can be done member variable to catch errors. Can you explain why you think that 4 arguments (based on my suggestion) is too many? IHMO it's more readable to have the argument passed explicitly rather than pack in a structure that would make the extension more error-prone. FYI, we use 4 arguments for vgic_v3_hw_setup too. Furthermore, you can't validate properly the field unless even if you assume that the guest will zeroed the structure before passing it. Regards, -- Julien Grall