From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v8a 5/6] xen/arm: split vgic driver into generic and vgic-v2 driver Date: Fri, 04 Jul 2014 11:20:37 +0100 Message-ID: <53B67FF5.2080206@linaro.org> References: <1404376489-25165-1-git-send-email-vijay.kilari@gmail.com> <1404376489-25165-6-git-send-email-vijay.kilari@gmail.com> <53B5534E.5080509@linaro.org> <1404392555.19893.12.camel@kazak.uk.xensource.com> <53B559E6.3010403@linaro.org> <1404396160.19893.30.camel@kazak.uk.xensource.com> <53B566E2.4030403@linaro.org> <1404400738.10477.2.camel@kazak.uk.xensource.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 , Ian Campbell Cc: Stefano Stabellini , Prasun Kapoor , Vijaya Kumar K , Tim Deegan , "xen-devel@lists.xen.org" , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On 07/04/2014 08:01 AM, Vijay Kilari wrote: >>> where vgic_emulate is implemented in vgic-v3.c rather than in vgic.c. >>> The function will decode the register and then call vgic_send_sgi. > > The reason why vgic_emulate is kept in vgic-v3.c is because it is > GICv3 specific > and also the traps are landing in respective drivers. Ex: for GICv2 > write to GICD_SGIR > is trapped in vgic-v2.c and similarly I expect for GICv3 is should be > kept in GICv3. Even though it's vGICv3 specific, vGICv2 will be handled sooner or later on GICv3 platform. Directly implement vgic_emulate in vgic-v3.c won't help to catch coding error from Xen and may bring the hypervisor to segfault. It could be the case if we forgot to disable system register trapping (which I don't think you do) in the GICv3. Regards, -- Julien Grall