From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [RFC v3 2/6] xen/arm: Add save/restore support for ARM GIC V2 Date: Sun, 11 May 2014 17:15:26 +0100 Message-ID: <536FA21E.3020404@linaro.org> References: <1399583908-21755-1-git-send-email-w1.huang@samsung.com> <1399583908-21755-3-git-send-email-w1.huang@samsung.com> <536C099C.1090606@citrix.com> <536CE23F.4030608@samsung.com> <1399645482.561.34.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1399645482.561.34.camel@kazak.uk.xensource.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: Ian Campbell , Wei Huang Cc: keir@xen.org, stefano.stabellini@eu.citrix.com, Andrew Cooper , tim@xen.org, jaeyong.yoo@samsung.com, xen-devel@lists.xen.org, jbeulich@suse.com, ian.jackson@eu.citrix.com, yjhyun.yoo@samsung.com List-Id: xen-devel@lists.xenproject.org Hi, On 09/05/14 15:24, Ian Campbell wrote: > On Fri, 2014-05-09 at 09:12 -0500, Wei Huang wrote: >> On 05/08/2014 05:47 PM, Andrew Cooper wrote: >>>> +DECLARE_HVM_SAVE_TYPE(GICH_V2, 3, struct hvm_arm_gich_v2); >>>> + >>>> /* >>>> * Largest type-code in use >>>> */ >>>> -#define HVM_SAVE_CODE_MAX 1 >>>> +#define HVM_SAVE_CODE_MAX 3 >>>> >>>> #endif >>>> >>> >>> On x86, we require that HVM save records only contain architectural >>> state. Not knowing arm myself, it is not clear from your comments >>> whether this is the case or not. Can you confirm whether it is or not? >> Most states are guest architecture states which include core registers, >> arch timer, memory. GIC states are arguable, given that Xen uses data >> structures (e.g. struct vgic_irq_rank) to represent GIC states internally. > > (note: I've not looked at this series for ages, I plan to look at this > new version next week) > > The contents of vgic_irq_rank is still a set of architectural register, > I think (the rank thing is just to account for the fact that some > registers use 1 bit to describe 32-registers, some use 2 bits to > describe 16, etc). Correct, the vgic_irq_rank should be saved entirely. It represents the guest view of the GIC state (such as the priorities, the routing... of an IRQ). Regards, -- Julien Grall