All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Ian Campbell <ian.campbell@citrix.com>,
	xen-devel@lists.xen.org, ian.jackson@eu.citrix.com,
	stefano.stabellini@eu.citrix.com, wei.liu2@citrix.com
Subject: Re: [PATCH v2 1/5] libxc: remove allocate member from struct xc_dom_image
Date: Fri, 2 Oct 2015 17:00:57 +0200	[thread overview]
Message-ID: <560E9C29.7020700@suse.com> (raw)
In-Reply-To: <1443797242.11707.130.camel@citrix.com>

On 10/02/2015 04:47 PM, Ian Campbell wrote:
> On Fri, 2015-10-02 at 16:25 +0200, Juergen Gross wrote:
>> On 10/02/2015 03:01 PM, Ian Campbell wrote:
>>> On Fri, 2015-10-02 at 07:49 +0200, Juergen Gross wrote:
>>>> The allocate() callback in struct xc_dom_image is never set. Remove
>>>> it.
>>>>
>>>> Signed-off-by: Juergen Gross <jgross@suse.com>
>>>> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
>>>
>>> This breaks the stubdom build:
>>>
>>> kexec.c: In function ‘kexec’:
>>> kexec.c:221:78: warning: taking address of expression of type ‘void’
>>>        xen_pfn_t boot_page_mfn = virt_to_mfn(&_boot_page);
>>>
>>>          ^
>>> kexec.c:230:8: error: ‘struct xc_dom_image’ has no member named
>>> ‘allocate’
>>>        dom->allocate = kexec_allocate;
>>>           ^
>>> kexec.c:318:60: warning: taking address of expression of type ‘void’
>>>                virt_to_mfn(&_boot_page));
>>>                                                               ^
>>> Makefile:79: recipe for target '/local/scratch/ianc/devel/committer
>>> -amd64.git/stubdom/grub-x86_64/kexec.o' failed
>>>
>>> On i386 too.
>>>
>>> And in fact that hook looks useful in that context, so either it needs
>>> to
>>> stay of stubdom kexec needs changing to work some other way.
>>
>> Too bad.
>>
>> I wanted to remove the allocate callback as it will conflict with the
>> allocations of memory outside the initial default mapping.
>>
>> Just to make sure I understand this correctly:
>>
>> stubdom is used in this context to support grub running as a pv domain
>> capable to start another pv domain.
>
> Correct.
>
>> So as long as stubdom doesn't support mapping the p2m list outside the
>> default mapping it makes no sense to support this feature for any domain
>> started via stubdom/grub (the main reason to use this feature is the
>> support of huge memory causing the p2m list to exceed the available
>> virtual address space of the default mapping).
>
> By "default mapping" you mean the mapping established by the domain builder
> which made the domain, as distinct from any mapping which the guest kernel
> might establish by itself later, right?

Yes.

> I'm not sure that there is any link between the stubdomain's own p2m and
> the default mapping of that and the p2m which it is building for use of the
> domain it is going to kexec and the default mappings of that p2m-to-be from
> the PoV of the to-be-kexec'd guest kernel.

I just checked it again. Initially I thought stubdom would have the same
limitations as Linux regarding the p2m size. But this is not true, as
stubdom's virt_base is 0, while Linux is using ffffffff80000000.

> I'm not sure how kexec operates in this regard.
>
>> So the easy solution would be to not support initrd and p2m outside the
>> default mapping when the allocate callback is set. Do you think this
>> solution is okay?
>
> Irrespective of the above just not supporting this mode would be one way to
> avoid the issue. It would make domains using pvgrub1 have different
> limitations than domains built directly. IOW users will have to trade off
> the security benefits of pvgrub vs the size of the domain they wish to
> build, which is a shame.

Hmm, maybe it's possible to add the support to stubdom. With the limit
of the p2m size not hitting stubdom it might be rather easy. I'll try
it.

> On the other hand pvgrub2 now exists as a separate (out of tree, it's in
> grub.git) thing anyway which doesn't use this domain builder at all AFAIK
> and that's the one I expect people are using going forward anyway.

Hmm, another place where huge domain support is to be added, I guess.


Juergen


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

  reply	other threads:[~2015-10-02 15:00 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-02  5:49 [PATCH v2 0/5] libxc: support building large pv-domains Juergen Gross
2015-10-02  5:49 ` [PATCH v2 1/5] libxc: remove allocate member from struct xc_dom_image Juergen Gross
2015-10-02 13:01   ` Ian Campbell
2015-10-02 14:25     ` Juergen Gross
2015-10-02 14:47       ` Ian Campbell
2015-10-02 15:00         ` Juergen Gross [this message]
2015-10-02  5:49 ` [PATCH v2 2/5] xen: add generic flag to elf_dom_parms indicating support of unmapped initrd Juergen Gross
2015-10-02  9:37   ` Andrew Cooper
2015-10-02  9:41     ` Jan Beulich
2015-10-02  9:44     ` Juergen Gross
2015-10-02  9:53       ` Andrew Cooper
2015-10-02 10:01         ` Juergen Gross
2015-10-02 10:22           ` Ian Campbell
2015-10-02  5:49 ` [PATCH v2 3/5] libxc: create unmapped initrd in domain builder if supported Juergen Gross
2015-10-02 12:59   ` Ian Campbell
2015-10-02 14:46     ` Juergen Gross
2015-10-02 14:56       ` Ian Campbell
2015-10-02 15:13         ` Juergen Gross
2015-10-02 15:21           ` Ian Campbell
2015-10-02 16:28             ` Juergen Gross
2015-10-02  5:49 ` [PATCH v2 4/5] libxc: split p2m allocation in domain builder from other magic pages Juergen Gross
2015-10-02  9:29   ` Ian Campbell
2015-10-02  5:49 ` [PATCH v2 5/5] libxc: create p2m list outside of kernel mapping if supported Juergen Gross
2015-10-02 13:16   ` Ian Campbell
2015-10-02 14:37     ` Juergen Gross

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=560E9C29.7020700@suse.com \
    --to=jgross@suse.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wei.liu2@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.