xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Jaeyong Yoo <jaeyong.yoo@samsung.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH RFC 3/4] Implement save and restore for gic (template impl)
Date: Wed, 05 Jun 2013 10:29:25 +0000 (GMT)	[thread overview]
Message-ID: <26059724.34651370428164476.JavaMail.weblogic@epv6ml01> (raw)

> > +static int gic_save(struct domain *d, hvm_domain_context_t *h)
> > +{
> > +    struct hvm_hw_gic ctxt;
> > +    struct vcpu *v;
> > +
> > +    /* Save the state of GICs */
> > +    for_each_vcpu( d, v )
> > +    {
> > +        ctxt.gic_hcr = v->arch.gic_hcr;
> > +        ctxt.gic_vmcr = v->arch.gic_vmcr;
> > +        ctxt.gic_apr = v->arch.gic_apr;
> > +        memcpy( ctxt.gic_lr, v->arch.gic_lr, sizeof(v->arch.gic_lr) );
> > +        ctxt.event_mask = v->arch.event_mask;
> > +        ctxt.lr_mask = v->arch.lr_mask;
> 
> In general on x86 the policy is that hvm headers should store only
> architectural state. I think this is a good policy to carry over to ARM.
> 
> With that in mind I don't think either event_mask or lr_mask are
> architectural state but are actually internal state of the vgic
> "emulation" which can and should be reconstructed when loading the
> architectural state.

Thanks! That is very helpful :)

Jaeyong

             reply	other threads:[~2013-06-05 10:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-05 10:29 Jaeyong Yoo [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-06-05  5:46 [PATCH RFC 0/4] arm: regarding live migration Jaeyong Yoo
2013-06-05  5:46 ` [PATCH RFC 3/4] Implement save and restore for gic (template impl) Jaeyong Yoo
2013-06-05  9:21   ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=26059724.34651370428164476.JavaMail.weblogic@epv6ml01 \
    --to=jaeyong.yoo@samsung.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).