xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Andrii Anisov <andrii.anisov@globallogic.com>
Cc: Iurii Konovalenko <iurii.konovalenko@globallogic.com>,
	Wei Liu <wei.liu2@citrix.com>,
	Oleksandr Tyshchenko <oleksandr.tyshchenko@globallogic.com>,
	Iurii Mykhalskyi <iurii.mykhalskyi@globallogic.com>,
	xen-devel@lists.xen.org, embedded-pv-devel@lists.xenproject.org
Subject: Re: [PATCH RFC 04/18] libxl: add ability to set rambase_pfn via cfg file
Date: Thu, 19 May 2016 12:34:32 +0100	[thread overview]
Message-ID: <20160519113432.GL27241@citrix.com> (raw)
In-Reply-To: <1463589161-4153-5-git-send-email-andrii.anisov@globallogic.com>

On Wed, May 18, 2016 at 07:32:27PM +0300, Andrii Anisov wrote:
> From: Oleksandr Tyshchenko <oleksandr.tyshchenko@globallogic.com>
> 
> In case of missing required property in cfg file
> the default value (0x40000) should be used.

Assuming this is absolutely needed (whether it is the case I don't
know, I will leave that to ARM maintainers)...

> 
> Signed-off-by: Oleksandr Tyshchenko <oleksandr.tyshchenko@globallogic.com>
> Signed-off-by: Iurii Konovalenko <iurii.konovalenko@globallogic.com>
> Signed-off-by: Iurii Mykhalskyi <iurii.mykhalskyi@globallogic.com>
[...]
> diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
> index 1699f32..5b0b50a 100644
> --- a/tools/libxl/libxl_internal.h
> +++ b/tools/libxl/libxl_internal.h
> @@ -100,6 +100,7 @@
>  #define LIBXL_HVM_EXTRA_MEMORY 2048
>  #define LIBXL_MIN_DOM0_MEM (128*1024)
>  #define LIBXL_INVALID_GFN (~(uint64_t)0)
> +#define LIBXL_INVALID_RAM_BASE (~(uint64_t)0)
>  /* use 0 as the domid of the toolstack domain for now */
>  #define LIBXL_TOOLSTACK_DOMID 0
>  #define QEMU_SIGNATURE "DeviceModelRecord0002"
> diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
> index 502a148..b6cc8d2 100644
> --- a/tools/libxl/libxl_types.idl
> +++ b/tools/libxl/libxl_types.idl
> @@ -416,6 +416,7 @@ libxl_domain_build_info = Struct("domain_build_info",[
>      ("target_memkb",    MemKB),
>      ("video_memkb",     MemKB),
>      ("shadow_memkb",    MemKB),
> +    ("rambase",         uint64, {'init_val': 'LIBXL_INVALID_RAM_BASE'}),

Please make this ARM specific.

You would also need to provide a LIBXL_HAVE macro in libxl.h. See
various examples there.


>      ("rtc_timeoffset",  uint32),
>      ("exec_ssidref",    uint32),
>      ("exec_ssid_label", string),
> diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
> index 9a2870e..28d57c3 100644
> --- a/tools/libxl/xl_cmdimpl.c
> +++ b/tools/libxl/xl_cmdimpl.c
> @@ -31,6 +31,7 @@
>  #include <sys/select.h>
>  #include <sys/utsname.h> /* for utsname in xl info */
>  #include <xentoollog.h>
> +#include <xenctrl.h>

I don't think you need this. In fact, please don't do this. :-)

>  #include <ctype.h>
>  #include <inttypes.h>
>  #include <limits.h>
> @@ -1352,6 +1353,18 @@ static void parse_config_data(const char *config_source,
>      if (!xlu_cfg_get_long (config, "maxmem", &l, 0))
>          b_info->max_memkb = l * 1024;
>  
> +#ifdef GUEST_RAM_BASE
> +    if (!xlu_cfg_get_long (config, "rambase_pfn", &l, 0)) {
> +        /* TODO add more detailed check for valid value */
> +        uint64_t rambase = (uint64_t)l << XC_PAGE_SHIFT;
> +        if (rambase > (GUEST_RAM0_BASE + GUEST_RAM0_SIZE)) {
> +            fprintf(stderr, "ERROR: invalid value 0x%lx for \"rambase_pfn\"\n", l);
> +            exit (1);
> +        }
> +        b_info->rambase = rambase;
> +    }
> +#endif
> +
>      if (!xlu_cfg_get_long (config, "vcpus", &l, 0)) {
>          vcpus = l;
>          if (libxl_cpu_bitmap_alloc(ctx, &b_info->avail_vcpus, l)) {
> -- 
> 2.8.2
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

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

  reply	other threads:[~2016-05-19 11:34 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-18 16:32 [PATCH RFC 00/18] System adjustment to customer needs Andrii Anisov
2016-05-18 16:32 ` [PATCH RFC 01/18] xen/tools: Fix virtual disks helper scripts Andrii Anisov
2016-05-19 11:34   ` Wei Liu
2016-05-19 20:54     ` Andrii Anisov
2016-05-19 22:58       ` Wei Liu
2016-05-20  8:30         ` Andrii Anisov
2016-05-18 16:32 ` [PATCH RFC 02/18] kbdif: add raw events passing Andrii Anisov
2016-05-19  9:28   ` Jan Beulich
2016-05-18 16:32 ` [PATCH RFC 03/18] xen/arm: allow to allocate 1/128/256/512 Mb memory chunks Andrii Anisov
2016-05-19 11:10   ` Julien Grall
2016-05-18 16:32 ` [PATCH RFC 04/18] libxl: add ability to set rambase_pfn via cfg file Andrii Anisov
2016-05-19 11:34   ` Wei Liu [this message]
2016-05-19 11:36   ` Julien Grall
2016-05-18 16:32 ` [PATCH RFC 05/18] xen/arm: allow reassigning of hw interrupts to guest domain Andrii Anisov
2016-05-19 12:19   ` Julien Grall
2016-05-18 16:32 ` [PATCH RFC 06/18] libxl: parse config data during domain reboot Andrii Anisov
2016-05-19 11:35   ` Wei Liu
2016-05-18 16:32 ` [PATCH RFC 07/18] tools/misc: Modify Xen watchdog daemon Andrii Anisov
2016-05-19 11:35   ` Wei Liu
2016-05-18 16:32 ` [PATCH RFC 08/18] tools/misc: Set timeout value from " Andrii Anisov
2016-05-19 11:35   ` Wei Liu
2016-05-18 16:32 ` [PATCH RFC 09/18] tools: Allow to cross-compile xentop Andrii Anisov
2016-05-19 11:35   ` Wei Liu
2016-05-18 16:32 ` [PATCH RFC 10/18] xen: arm: add batch support to the XENMEM_p2m_lookup operation Andrii Anisov
2016-05-19  9:36   ` Jan Beulich
2016-05-18 16:32 ` [PATCH RFC 11/18] arm: Fix 1-to-1 Dom0 memory allocation of any size Andrii Anisov
2016-05-18 16:32 ` [PATCH RFC 12/18] libxl: Fix unneeded domain reboot during destroy routine Andrii Anisov
2016-05-19 11:35   ` Wei Liu
2016-05-18 16:32 ` [PATCH RFC 13/18] xen: introduce and use 'dom0_rambase_pfn' setting for kernel Dom0 Andrii Anisov
2016-05-19  9:41   ` Jan Beulich
2016-05-19 12:26     ` Julien Grall
2016-05-19 12:50       ` Jan Beulich
2016-05-19 13:39   ` Julien Grall
2016-05-19 13:58     ` Oleksandr Dmytryshyn
2016-05-19 14:34       ` Julien Grall
2016-05-20  8:39         ` Oleksandr Dmytryshyn
2016-05-19 14:36       ` Jan Beulich
2016-05-20  8:45         ` Oleksandr Dmytryshyn
2016-05-20  9:59           ` Jan Beulich
2016-05-20 14:19             ` Oleksandr Dmytryshyn
2016-05-20 15:04               ` Julien Grall
2016-05-20 16:05                 ` Edgar E. Iglesias
2016-05-23  9:52                   ` Oleksandr Dmytryshyn
2016-05-30 11:07                   ` Stefano Stabellini
2016-05-31 14:04                   ` Oleksandr Dmytryshyn
2016-06-01 14:01                     ` Edgar E. Iglesias
2016-05-18 16:32 ` [PATCH RFC 14/18] xen: flask: Add possiblity to forward irqs into domU domains Andrii Anisov
2016-05-18 16:32 ` [PATCH RFC 15/18] arm: Add ability to relocate Xen in over 4GB space Andrii Anisov
2016-05-19  9:42   ` Jan Beulich
2016-05-19 13:53   ` Julien Grall
2016-05-24 17:18   ` Julien Grall
2016-05-18 16:32 ` [PATCH RFC 16/18] xen: Add dom0_mem_high option & over 4GB memory allocation for Dom0 Andrii Anisov
2016-05-18 16:32 ` [PATCH RFC 17/18] tools: Introduce ARM32_SEPAR_MEM_SPLIT option Andrii Anisov
2016-05-19 11:35   ` Wei Liu
2016-05-18 16:32 ` [PATCH RFC 18/18] arm: Add ability to allocate Xen heap in lowmem Andrii Anisov
2016-05-18 17:26 ` [PATCH RFC 00/18] System adjustment to customer needs Julien Grall
2016-05-19 19:45   ` Andrii Anisov
2016-05-18 19:17 ` [Embedded-pv-devel] " Meng Xu
2016-05-19 11:00   ` Julien Grall
2016-05-19 21:28     ` Andrii Anisov
2016-05-20 10:33       ` Julien Grall
2016-05-20 16:24         ` Andrii Anisov
2016-05-23  9:19           ` Julien Grall
2016-05-20 17:09         ` Andrii Anisov
2016-05-23  9:13           ` Julien Grall
2016-05-19 22:08     ` Andrii Anisov
2016-05-19 21:53   ` Andrii Anisov
2016-05-20 15:21     ` Meng Xu
2016-05-20 17:23       ` Andrii Anisov
2016-05-20 17:28         ` Meng Xu
2016-05-21 14:32       ` Julien Grall
2016-05-21 14:52         ` Meng Xu

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=20160519113432.GL27241@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=andrii.anisov@globallogic.com \
    --cc=embedded-pv-devel@lists.xenproject.org \
    --cc=iurii.konovalenko@globallogic.com \
    --cc=iurii.mykhalskyi@globallogic.com \
    --cc=oleksandr.tyshchenko@globallogic.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).