All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eugene Fedotov <e.fedotov@samsung.com>
To: Ian Campbell <Ian.Campbell@citrix.com>, xen-devel@lists.xen.org
Subject: Re: [PATCH RESEND v5 1/6] xen/arm: Implement hvm save and restore
Date: Wed, 13 Nov 2013 16:31:36 +0400	[thread overview]
Message-ID: <52837128.2080306@samsung.com> (raw)
In-Reply-To: <1384343257.5406.86.camel@kazak.uk.xensource.com>

13.11.2013 15:47, Ian Campbell пишет:
> On Wed, 2013-11-13 at 15:50 +0400, Eugene Fedotov wrote:
>> 13.11.2013 14:56, Ian Campbell пишет:
>>> On Wed, 2013-11-13 at 12:00 +0400, Eugene Fedotov wrote:
>>>
>>>>> [...]
>>>>>> +static int vgic_irq_rank_save(struct vgic_rank *ext,
>>>>>> +                               struct vgic_irq_rank *rank)
>>>>>> +{
>>>>>> +    spin_lock(&rank->lock);
>>>>> This is probably wise, but the domain must be paused at this point,
>>>>> right?
>>>> I think this lock can be removed, thanks.
>>> I'd be happy for it to stay as a belt-and-braces/good practice thing.
>>>
>>>>>> +        return -EINVAL;
>>>>>> +    }
>>>>>> +    memcpy(ext->ipriority, rank->ipriority, sizeof(rank->ipriority));
>>>>>> +    /* ITARGETS */
>>>>>> +    if ( sizeof(rank->itargets) != sizeof (ext->itargets) )
>>>>>> +    {
>>>>>> +        dprintk(XENLOG_G_ERR, "hvm_hw_gic: check itargets dumping space\n");
>>>>>> +        return -EINVAL;
>>>>>> +    }
>>>>>> +    memcpy(ext->itargets, rank->itargets, sizeof(rank->itargets));
>>>>>> +    spin_unlock(&rank->lock);
>>>>>> +    return 0;
>>>>>> +}
>>>>>> +
>>>>>> +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 )
>>>>> Where is the GICD state saved then?
>>>> The only GICD structure we save for guest domain is struct
>>>> vgic_irq_rank, it includes: IENABLE, IACTIVE, IPEND,  PENDSGI, ICFG,
>>>> IPRIORITY, ITARGETS registers. We create the same structure inside hvm :
>>>> vgic_rank (that is no guaranteed to be the same as struct vgic_irq_rank)
>>>> and save it calling vgic_irq_rank_save routine below in gic_save.
>>> I can only see one call to vgic_irq_rank_save which is the one to save
>>> PPI state within the vcpu loop. What about the (per-cpu) SGI and
>>> (global) SPIs? I can't see where either of those are saved.
>> 1) For the guest domain vgic.nr_lines was set to 0 (arch_domain
>> structure, see "domain_vgic_init" function in vgic.c):
>> d->arch.vgic.nr_lines = 0; /* We don't need SPIs for the guest */
>> Should we not rely on this, assuming that SPIs will be enabled for guest?
> Aha! I'd forgotten about that. I think we can safely ignore SPIs until
> device passthrough is added. And even then I don't think we would want
> to migrate with an active passthrough device attached.
>
>> 2) Could you point me where is SGI states are situated in arch_vcpu? I
>> thought they are inside those 32 IRQs (namely 0-15 IRQs) that we have
>> already saved, because vgic_irq_rank in arch_vcpu is the context for
>> those 32 IRQs.
> SGIs are "interrupts" 0..15 which PPIs are "interrupts" 16..31, so if
> you are saving the first rank which contains all 32 of those then I
> think you have probably covered them already. I think you just need to
> update the comment(s) to mention SGI as well as PPI.
OK, thanks.

Best regards,
Evgeny.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  parent reply	other threads:[~2013-11-13 12:31 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-08  7:50 [PATCH RESEND v5 0/6] xen/arm: live migration support in arndale board Jaeyong Yoo
2013-11-08  7:50 ` [PATCH RESEND v5 1/6] xen/arm: Implement hvm save and restore Jaeyong Yoo
2013-11-12 15:15   ` Ian Campbell
2013-11-13  8:00     ` Eugene Fedotov
2013-11-13 10:56       ` Ian Campbell
     [not found]         ` <52836784.8050008@samsung.com>
     [not found]           ` <1384343257.5406.86.camel@kazak.uk.xensource.com>
2013-11-13 12:22             ` Ian Campbell
2013-11-13 12:31             ` Eugene Fedotov [this message]
2013-11-13 12:25           ` Eugene Fedotov
2013-11-08  7:50 ` [PATCH RESEND v5 2/6] xen/arm: Implement get_maximum_gpfn hypercall for arm Jaeyong Yoo
2013-11-12 15:21   ` Ian Campbell
2013-11-13  8:28     ` Eugene Fedotov
2013-11-13 10:58       ` Ian Campbell
2013-11-15  7:04         ` Eugene Fedotov
2013-11-19 12:35           ` Eugene Fedotov
2013-11-19 12:53             ` Ian Campbell
2013-11-19 13:09               ` Eugene Fedotov
2013-11-08  7:50 ` [PATCH RESEND v5 3/6] xen/arm: Implement modify_returncode Jaeyong Yoo
2013-11-12 15:24   ` Ian Campbell
2013-11-13  8:40     ` Eugene Fedotov
2013-11-08  7:50 ` [PATCH RESEND v5 4/6] xen/arm: Implement virtual-linear page table for guest p2m mapping in live migration Jaeyong Yoo
2013-11-12 15:58   ` Ian Campbell
2013-11-14 23:58     ` Jaeyong Yoo
2013-11-18  3:47       ` Jaeyong Yoo
2013-11-19 11:42         ` Ian Campbell
2013-11-19 11:37       ` Ian Campbell
2013-11-08  7:50 ` [PATCH RESEND v5 5/6] xen/arm: Implement hypercall for dirty page tracing Jaeyong Yoo
2013-11-12 16:56   ` Ian Campbell
2013-11-15  2:26     ` Jaeyong Yoo
2013-11-19  1:32       ` Jaeyong Yoo
2013-11-19 11:57         ` Ian Campbell
2013-11-20  9:49           ` Jaeyong Yoo
2013-11-20 10:03             ` Ian Campbell
2013-11-19 11:54       ` Ian Campbell
2013-11-15  4:15     ` Jaeyong Yoo
2013-11-19 11:38       ` Ian Campbell
2013-11-08  7:50 ` [PATCH RESEND v5 6/6] xen/arm: Implement toolstack for xl restore/save and migrate Jaeyong Yoo
2013-11-12 17:22   ` Ian Campbell
2013-11-13  9:57     ` Eugene Fedotov
2013-11-13 11:09       ` Ian Campbell
     [not found]         ` <52836DCA.7080206@samsung.com>
     [not found]           ` <1384345148.5406.94.camel@kazak.uk.xensource.com>
2013-11-13 12:21             ` Ian Campbell
2013-11-13 12:25           ` Fwd: " Eugene Fedotov
2013-11-19 11:06         ` Eugene Fedotov
2013-11-19 12:01           ` Ian Campbell
2014-04-01 19:39 ` [PATCH RESEND v5 0/6] xen/arm: live migration support in arndale board Julien Grall
2014-04-02 15:06   ` Wei Huang
2014-04-02 15:21     ` Stefano Stabellini

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=52837128.2080306@samsung.com \
    --to=e.fedotov@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.