From: Eugene Fedotov <e.fedotov@samsung.com>
To: xen-devel@lists.xen.org
Subject: Re: [PATCH v4 3/9] xen/arm: Implement set_memory_map hypercall for arm
Date: Thu, 31 Oct 2013 12:56:44 +0400 [thread overview]
Message-ID: <52721B4C.5090601@samsung.com> (raw)
In-Reply-To: <1381486149.24708.6.camel@kazak.uk.xensource.com>
11.10.2013 14:09, Ian Campbell:
> On Fri, 2013-10-11 at 14:06 +0400, Eugene Fedotov wrote:
>> 10.10.2013 14:56, Ian Campbell:
>>> On Fri, 2013-10-04 at 13:43 +0900, Jaeyong Yoo wrote:
>>>> From: Evgeny Fedotov <e.fedotov@samsung.com>
>>>>
>>>> When creating domU in toolstack, pass the guest memory
>>>> map info to the hypervisor, and the hypervisor stores those info in
>>>> arch_domain for later use.
>>>>
>>>> Singed-off-by: Evgeny Fedotov <e.fedotov@samsung.com>
>>>> ---
>>>> tools/libxc/xc_dom_arm.c | 12 +++++++-
>>>> tools/libxc/xc_domain.c | 44 ++++++++++++++++++++++++++++
>>>> tools/libxc/xenctrl.h | 23 +++++++++++++++
>>>> xen/arch/arm/domain.c | 3 ++
>>>> xen/arch/arm/mm.c | 68 ++++++++++++++++++++++++++++++++++++++++++++
>>>> xen/include/asm-arm/domain.h | 2 ++
>>>> xen/include/asm-arm/mm.h | 1 +
>>>> xen/include/public/memory.h | 15 ++++++++--
>>>> xen/include/xsm/dummy.h | 5 ++++
>>>> xen/include/xsm/xsm.h | 5 ++++
>>>> 10 files changed, 175 insertions(+), 3 deletions(-)
>>>>
>>>> diff --git a/tools/libxc/xc_dom_arm.c b/tools/libxc/xc_dom_arm.c
>>>> index df59ffb..20c9095 100644
>>>> --- a/tools/libxc/xc_dom_arm.c
>>>> +++ b/tools/libxc/xc_dom_arm.c
>>>> @@ -166,6 +166,7 @@ int arch_setup_meminit(struct xc_dom_image *dom)
>>>> {
>>>> int rc;
>>>> xen_pfn_t pfn, allocsz, i;
>>>> + struct dt_mem_info memmap;
>>>>
>>>> dom->shadow_enabled = 1;
>>>>
>>>> @@ -191,7 +192,16 @@ int arch_setup_meminit(struct xc_dom_image *dom)
>>>> 0, 0, &dom->p2m_host[i]);
>>>> }
>>>>
>>>> - return 0;
>>>> + /* setup guest memory map */
>>>> + memmap.nr_banks = 2;
>>>> + memmap.bank[0].start = (dom->rambase_pfn << PAGE_SHIFT_ARM);
>>>> + memmap.bank[0].size = (dom->total_pages << PAGE_SHIFT_ARM);
>>>> + /*The end of main memory: magic pages */
>>>> + memmap.bank[1].start = memmap.bank[0].start + memmap.bank[0].size;
>>>> + memmap.bank[1].size = NR_MAGIC_PAGES << PAGE_SHIFT_ARM;
>>> Are the 0 and 1 here hardcoded magic numbers?
>> Well, we hardcoded here two memory regions: the first one for RAM, the
>> second one for "magic pages".
>>>> + return xc_domain_set_memory_map(dom->xch, dom->guest_domid, &memmap);
>>> I think this is using set_memory_map in a different way to it is used
>>> for x86 (where it gives the PV e820 map, a PV version of a BIOS provided
>>> datastructure).
>> Do you mean that using e820 structure for ARM implementation is better
>> than dt_mem_info structure (that has been taken from libdt) and should
>> be used in ARM implementation of get/set memory map?
> I mean on x86 it is used as a way of communicating a memory map (in a
> structure vaguely like an actual defined architecture specific layout,
> the e820), whereas on ARM it is only used by the tools and should not be
> exposed to the guest, since the guest gets its info from the DTB.
>
>>> The guest should get its memory map via DTB not via a PV hypercall. I
>>> know the guest isn't using get_memory_map but I don't think we should
>>> even make it available.
>> OK, this hypercall will be available from dom0 only.
> It'll have to move away from the XENMEM space then.
Can we create new DOMCTL hypercall for get/set memory map?
next prev parent reply other threads:[~2013-10-31 8:56 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-04 4:43 [PATCH v4 0/9] xen/arm: live migration support in arndale board Jaeyong Yoo
2013-10-04 4:43 ` [PATCH v4 1/9] xen/arm: Implement hvm save and restore Jaeyong Yoo
2013-10-07 12:49 ` Julien Grall
2013-10-04 4:43 ` [PATCH v4 2/9] xen/arm: Add more registers for saving and restoring vcpu registers Jaeyong Yoo
2013-10-10 10:40 ` Ian Campbell
2013-10-11 8:30 ` Jaeyong Yoo
2013-10-11 8:43 ` Ian Campbell
2013-10-11 10:22 ` Tim Deegan
2013-10-11 10:25 ` Ian Campbell
2013-10-14 4:39 ` Jaeyong Yoo
2013-10-17 2:14 ` Jaeyong Yoo
2013-10-17 10:01 ` Ian Campbell
2013-10-04 4:43 ` [PATCH v4 3/9] xen/arm: Implement set_memory_map hypercall for arm Jaeyong Yoo
2013-10-10 10:56 ` Ian Campbell
2013-10-11 10:06 ` Eugene Fedotov
2013-10-11 10:09 ` Ian Campbell
2013-10-11 10:18 ` Tim Deegan
2013-10-31 8:56 ` Eugene Fedotov [this message]
2013-11-01 9:04 ` Ian Campbell
2013-11-01 9:14 ` Ian Campbell
2013-11-01 9:51 ` Eugene Fedotov
2013-11-01 9:48 ` Ian Campbell
2013-11-01 10:08 ` Eugene Fedotov
2013-11-01 10:30 ` Ian Campbell
2013-10-04 4:44 ` [PATCH v4 4/9] xen/arm: Implement get_maximum_gpfn " Jaeyong Yoo
2013-10-04 4:44 ` [PATCH v4 5/9] xen/arm: Implement modify_returncode Jaeyong Yoo
2013-10-04 4:44 ` [PATCH v4 6/9] xen/arm: Fixing clear_guest_offset macro Jaeyong Yoo
2013-10-07 12:53 ` Julien Grall
2013-10-10 12:00 ` Ian Campbell
2013-10-04 4:44 ` [PATCH v4 7/9] xen/arm: Implement virtual-linear page table for guest p2m mapping in live migration Jaeyong Yoo
2013-10-16 12:50 ` Ian Campbell
2013-10-17 8:58 ` Jaeyong Yoo
2013-10-17 10:06 ` Ian Campbell
2013-10-17 10:25 ` Jaeyong Yoo
2013-10-04 4:44 ` [PATCH v4 8/9] xen/arm: Implement hypercall for dirty page tracing Jaeyong Yoo
2013-10-07 13:02 ` Julien Grall
2013-10-07 15:51 ` Eugene Fedotov
2013-10-10 14:10 ` Julien Grall
2013-10-16 13:44 ` Ian Campbell
2013-10-17 10:12 ` Jaeyong Yoo
2013-10-17 10:30 ` Ian Campbell
2013-10-17 11:05 ` Jaeyong Yoo
2013-10-17 11:47 ` Ian Campbell
2013-10-18 4:17 ` Jaeyong Yoo
2013-10-18 9:11 ` Ian Campbell
2013-10-04 4:44 ` [PATCH v4 9/9] xen/arm: Implement toolstack for xl restore/save and migrate Jaeyong Yoo
2013-10-16 13:55 ` Ian Campbell
2013-10-17 10:14 ` Jaeyong Yoo
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=52721B4C.5090601@samsung.com \
--to=e.fedotov@samsung.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.