Re: [Xen-devel] ARM: Adjusting guest memory size through xl mem-{set|max} fails

2017-07-19 Thread Sergej Proskurin
On 07/19/2017 01:57 PM, Wei Liu wrote:
> On Wed, Jul 19, 2017 at 01:52:08PM +0200, Sergej Proskurin wrote:
>> ---
>> root@avocet:~# xl list
>> NameID   Mem VCPUs  State  
>> Time(s)
>> Domain-0 0  1024 6
>> r-  38.9
>> domu11   511 2
>> -b   0.3
>> root@avocet:~# xl mem-max 1 550m
>> root@avocet:~# xl mem-set 1 520m
>> libxl: error: libxl_mem.c:272:libxl_set_memory_target: Domain
>> 1:memory_dynamic_max must be less than or equal to memory_static_max
>>
> This is a bit strange. What is the maxmem= in your domain config?
>
> I'm not too sure if you can just use xl mem-max. It's a bit messy in
> that area.

As far as I remember, it was possible before (at least on Xen 4.7 and
4.8). I have not set the maxmem= option in the domain config at all. I
just specify the amount of memory by means of memory=.

>> cannot set domid 1 dynamic max memory to : 520m
>> ---
>>
>> According to the error messages from above, I assume this patch will not
>> fix the issues on ARMv7 yet, right?
>>
> The error you saw on ARMv7 is different from the one above afaict. Not
> sure if my patch would fix ARMv7. I'm not too familiar with the inner
> working of ARM guests.

Alright. Anyway, I will try your patch also on ARMv7; just to be sure.
But I also don't think that it'll fix the issue.

Thanks,
Sergej


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


Re: [Xen-devel] ARM: Adjusting guest memory size through xl mem-{set|max} fails

2017-07-19 Thread Wei Liu
On Wed, Jul 19, 2017 at 01:52:08PM +0200, Sergej Proskurin wrote:
> 
> ---
> root@avocet:~# xl list
> NameID   Mem VCPUs  State  
> Time(s)
> Domain-0 0  1024 6
> r-  38.9
> domu11   511 2
> -b   0.3
> root@avocet:~# xl mem-max 1 550m
> root@avocet:~# xl mem-set 1 520m
> libxl: error: libxl_mem.c:272:libxl_set_memory_target: Domain
> 1:memory_dynamic_max must be less than or equal to memory_static_max
> 

This is a bit strange. What is the maxmem= in your domain config?

I'm not too sure if you can just use xl mem-max. It's a bit messy in
that area.

> cannot set domid 1 dynamic max memory to : 520m
> ---
> 
> According to the error messages from above, I assume this patch will not
> fix the issues on ARMv7 yet, right?
> 

The error you saw on ARMv7 is different from the one above afaict. Not
sure if my patch would fix ARMv7. I'm not too familiar with the inner
working of ARM guests.

___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


Re: [Xen-devel] ARM: Adjusting guest memory size through xl mem-{set|max} fails

2017-07-19 Thread Sergej Proskurin
Hi Wei,


On 07/19/2017 12:22 PM, Wei Liu wrote:
> On Wed, Jul 19, 2017 at 11:40:19AM +0200, Sergej Proskurin wrote:
>> Hi Wei,
>>
>>
>> On 07/18/2017 01:16 PM, Wei Liu wrote:
>>> On Mon, Jul 17, 2017 at 06:19:09PM +0200, Sergej Proskurin wrote:
 Hi Julien,


 On 07/17/2017 03:53 PM, Julien Grall wrote:
> (+Wei and Ian)
>
> Hi Sergej
>
> On 17/07/17 13:04, Sergej Proskurin wrote:
>> Hi all,
>>
>> My setup comprises an ARMv7 (Arndale, Linux kernel v4.11.6) and an ARMv8
>> (LeMaker HiKey, Linux kernel v4.9.0) development board. On both boards,
>> I have Xen version 4.10-unstable running with the associated tools to
>> manage a domu.
>>
>> Currently, I am trying to get xl mem-{set|max} to work on both
>> architectures. Unfortunately, both command invocations fail with the
>> following message (I remember using xl mem-{set|max} on ARMv7 before
>> with Xen version 4.7 and 4.8):
>>
>> ---
>> xl: libxl.c:339: libxl_defbool_val: Assertion
>> `!libxl_defbool_is_default(db)' failed.
>> Aborted
>> ---
> I haven't myself tried to use xl mem-{set|max}. Looking at the assert,
> you hit because a boolean is not initialized. It would be interesting
> to know which one.
>
> I have CCed the tools maintainers to get more feedback.
>
>>> Can you provide a backtrace?
>>>
>>> $ ulimit -c unlimited
>>> $ xl mem-set
>>>
>>> That should generate a coredump, on which you can use gdb to get a
>>> backtrace.
>> I get the following core dumps on ARMv8:
>>
>> ---
>> (gdb) bt
>> #0  0xacb509e8 in __GI_raise (sig=sig@entry=6)
>> at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
>> #1  0xacb51cf0 in __GI_abort () at abort.c:89
>> #2  0xacb4a3b8 in __assert_fail_base (
>> fmt=0xacc376f0 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
>> assertion=assertion@entry=0xacd76c38
>> "!libxl_defbool_is_default(db)",
>> file=file@entry=0xacd769e0 "libxl.c", line=line@entry=339,
>> function=)
>> at assert.c:92
>> #3  0xacb4a470 in __GI___assert_fail (
>> assertion=0xacd76c38 "!libxl_defbool_is_default(db)",
>> file=0xacd769e0 "libxl.c",
>> line=339, function=) at assert.c:101
>> #4  0xacce13f8 in libxl_defbool_val (db=...) at libxl.c:339
>> #5  0xacd490f8 in libxl__arch_extra_memory (gc=0xc5d47790,
>> info=0xc5d472b0,
>> out=0xc5d47788) at libxl_arm.c:116
>> #6  0xacd39764 in libxl_set_memory_target (ctx=0xaaab014bf050,
>> domid=1,
>> target_memkb=522240, relative=0, enforce=1) at libxl_mem.c:206
>> #7  0xc5f86abc in set_memory_target (domid=1, mem=0xc5d47e64
>> "510m") at xl_mem.c:69
>> #8  0xc5f86bac in main_memset (argc=3, argv=0xc5d47a20) at
>> xl_mem.c:90
>> #9  0xc5f72528 in main (argc=3, argv=0xc5d47a20) at xl.c:369
>> (gdb)
>> ---
>>
>> As far as I understand, the problem seems to be in libxl_arm.c:116,
>> checking for info->acpi.
>>
>> According to docs/man/xl.cfg.pod.5.in, the ACPI option is true for x86
>> while it's false for ARM by default. By setting acpi = 1 in domu.cfg,
>> the previous error disappears, yet I get the following error:
>>
>> ---
>> root@avocet:~# xl mem-set 2 510m
>> libxl: error: libxl_arm_acpi.c:89:libxl__estimate_madt_size: Unknown GIC
>> version
>  
> Can you give this a try?
>
> ---8<---
> From bc3d96fa10e9eae7d9af92be66eb6b89b4c86a53 Mon Sep 17 00:00:00 2001
> From: Wei Liu 
> Date: Wed, 19 Jul 2017 11:19:15 +0100
> Subject: [PATCH] libxl: introduce arch domain configuration save function
>
> It appears that we should save the ARM GIC version and the ACPI config
> in the saved guest config file so that we can reference them later.
>
> Introduce an arch domain configuration save helper and fill that in
> for ARM.
>
> Reported-by: Sergej Proskurin 
> Signed-off-by: Wei Liu 
> ---
> Not even compile tested on ARM...
> ---
>  tools/libxl/libxl_arch.h |  5 +
>  tools/libxl/libxl_arm.c  | 12 
>  tools/libxl/libxl_internal.c |  3 +++
>  tools/libxl/libxl_x86.c  |  6 ++
>  4 files changed, 26 insertions(+)
>
> diff --git a/tools/libxl/libxl_arch.h b/tools/libxl/libxl_arch.h
> index 5e1fc6060e..a300707a23 100644
> --- a/tools/libxl/libxl_arch.h
> +++ b/tools/libxl/libxl_arch.h
> @@ -71,6 +71,11 @@ int libxl__arch_extra_memory(libxl__gc *gc,
>   const libxl_domain_build_info *info,
>   uint64_t *out);
>  
> +_hidden
> +void libxl__arch_update_domain_configuration(libxl__gc *gc,
> + libxl_domain_config *dst,
> + const libxl_domain_config *src);
> +
>  #if defined(__i386__) || defined(__x86_64__)
>  
>  #define LAPIC_BASE_ADDRESS  0xfee0
> diff --git a/tools/libxl/libxl_arm.c b/tools/libxl/libxl_arm.c
> 

Re: [Xen-devel] ARM: Adjusting guest memory size through xl mem-{set|max} fails

2017-07-19 Thread Wei Liu
On Wed, Jul 19, 2017 at 11:40:19AM +0200, Sergej Proskurin wrote:
> Hi Wei,
> 
> 
> On 07/18/2017 01:16 PM, Wei Liu wrote:
> > On Mon, Jul 17, 2017 at 06:19:09PM +0200, Sergej Proskurin wrote:
> >> Hi Julien,
> >>
> >>
> >> On 07/17/2017 03:53 PM, Julien Grall wrote:
> >>> (+Wei and Ian)
> >>>
> >>> Hi Sergej
> >>>
> >>> On 17/07/17 13:04, Sergej Proskurin wrote:
>  Hi all,
> 
>  My setup comprises an ARMv7 (Arndale, Linux kernel v4.11.6) and an ARMv8
>  (LeMaker HiKey, Linux kernel v4.9.0) development board. On both boards,
>  I have Xen version 4.10-unstable running with the associated tools to
>  manage a domu.
> 
>  Currently, I am trying to get xl mem-{set|max} to work on both
>  architectures. Unfortunately, both command invocations fail with the
>  following message (I remember using xl mem-{set|max} on ARMv7 before
>  with Xen version 4.7 and 4.8):
> 
>  ---
>  xl: libxl.c:339: libxl_defbool_val: Assertion
>  `!libxl_defbool_is_default(db)' failed.
>  Aborted
>  ---
> >>> I haven't myself tried to use xl mem-{set|max}. Looking at the assert,
> >>> you hit because a boolean is not initialized. It would be interesting
> >>> to know which one.
> >>>
> >>> I have CCed the tools maintainers to get more feedback.
> >>>
> > Can you provide a backtrace?
> >
> > $ ulimit -c unlimited
> > $ xl mem-set
> >
> > That should generate a coredump, on which you can use gdb to get a
> > backtrace.
> 
> I get the following core dumps on ARMv8:
> 
> ---
> (gdb) bt
> #0  0xacb509e8 in __GI_raise (sig=sig@entry=6)
> at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
> #1  0xacb51cf0 in __GI_abort () at abort.c:89
> #2  0xacb4a3b8 in __assert_fail_base (
> fmt=0xacc376f0 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
> assertion=assertion@entry=0xacd76c38
> "!libxl_defbool_is_default(db)",
> file=file@entry=0xacd769e0 "libxl.c", line=line@entry=339,
> function=)
> at assert.c:92
> #3  0xacb4a470 in __GI___assert_fail (
> assertion=0xacd76c38 "!libxl_defbool_is_default(db)",
> file=0xacd769e0 "libxl.c",
> line=339, function=) at assert.c:101
> #4  0xacce13f8 in libxl_defbool_val (db=...) at libxl.c:339
> #5  0xacd490f8 in libxl__arch_extra_memory (gc=0xc5d47790,
> info=0xc5d472b0,
> out=0xc5d47788) at libxl_arm.c:116
> #6  0xacd39764 in libxl_set_memory_target (ctx=0xaaab014bf050,
> domid=1,
> target_memkb=522240, relative=0, enforce=1) at libxl_mem.c:206
> #7  0xc5f86abc in set_memory_target (domid=1, mem=0xc5d47e64
> "510m") at xl_mem.c:69
> #8  0xc5f86bac in main_memset (argc=3, argv=0xc5d47a20) at
> xl_mem.c:90
> #9  0xc5f72528 in main (argc=3, argv=0xc5d47a20) at xl.c:369
> (gdb)
> ---
> 
> As far as I understand, the problem seems to be in libxl_arm.c:116,
> checking for info->acpi.
> 
> According to docs/man/xl.cfg.pod.5.in, the ACPI option is true for x86
> while it's false for ARM by default. By setting acpi = 1 in domu.cfg,
> the previous error disappears, yet I get the following error:
> 
> ---
> root@avocet:~# xl mem-set 2 510m
> libxl: error: libxl_arm_acpi.c:89:libxl__estimate_madt_size: Unknown GIC
> version

 
Can you give this a try?

---8<---
From bc3d96fa10e9eae7d9af92be66eb6b89b4c86a53 Mon Sep 17 00:00:00 2001
From: Wei Liu 
Date: Wed, 19 Jul 2017 11:19:15 +0100
Subject: [PATCH] libxl: introduce arch domain configuration save function

It appears that we should save the ARM GIC version and the ACPI config
in the saved guest config file so that we can reference them later.

Introduce an arch domain configuration save helper and fill that in
for ARM.

Reported-by: Sergej Proskurin 
Signed-off-by: Wei Liu 
---
Not even compile tested on ARM...
---
 tools/libxl/libxl_arch.h |  5 +
 tools/libxl/libxl_arm.c  | 12 
 tools/libxl/libxl_internal.c |  3 +++
 tools/libxl/libxl_x86.c  |  6 ++
 4 files changed, 26 insertions(+)

diff --git a/tools/libxl/libxl_arch.h b/tools/libxl/libxl_arch.h
index 5e1fc6060e..a300707a23 100644
--- a/tools/libxl/libxl_arch.h
+++ b/tools/libxl/libxl_arch.h
@@ -71,6 +71,11 @@ int libxl__arch_extra_memory(libxl__gc *gc,
  const libxl_domain_build_info *info,
  uint64_t *out);
 
+_hidden
+void libxl__arch_update_domain_configuration(libxl__gc *gc,
+ libxl_domain_config *dst,
+ const libxl_domain_config *src);
+
 #if defined(__i386__) || defined(__x86_64__)
 
 #define LAPIC_BASE_ADDRESS  0xfee0
diff --git a/tools/libxl/libxl_arm.c b/tools/libxl/libxl_arm.c
index 8dd798bfdb..738f95be98 100644
--- a/tools/libxl/libxl_arm.c
+++ b/tools/libxl/libxl_arm.c
@@ -1067,6 +1067,18 @@ void libxl__arch_domain_build_info_acpi_setdefault(

Re: [Xen-devel] ARM: Adjusting guest memory size through xl mem-{set|max} fails

2017-07-19 Thread Sergej Proskurin
Hi Wei,


On 07/18/2017 01:16 PM, Wei Liu wrote:
> On Mon, Jul 17, 2017 at 06:19:09PM +0200, Sergej Proskurin wrote:
>> Hi Julien,
>>
>>
>> On 07/17/2017 03:53 PM, Julien Grall wrote:
>>> (+Wei and Ian)
>>>
>>> Hi Sergej
>>>
>>> On 17/07/17 13:04, Sergej Proskurin wrote:
 Hi all,

 My setup comprises an ARMv7 (Arndale, Linux kernel v4.11.6) and an ARMv8
 (LeMaker HiKey, Linux kernel v4.9.0) development board. On both boards,
 I have Xen version 4.10-unstable running with the associated tools to
 manage a domu.

 Currently, I am trying to get xl mem-{set|max} to work on both
 architectures. Unfortunately, both command invocations fail with the
 following message (I remember using xl mem-{set|max} on ARMv7 before
 with Xen version 4.7 and 4.8):

 ---
 xl: libxl.c:339: libxl_defbool_val: Assertion
 `!libxl_defbool_is_default(db)' failed.
 Aborted
 ---
>>> I haven't myself tried to use xl mem-{set|max}. Looking at the assert,
>>> you hit because a boolean is not initialized. It would be interesting
>>> to know which one.
>>>
>>> I have CCed the tools maintainers to get more feedback.
>>>
> Can you provide a backtrace?
>
> $ ulimit -c unlimited
> $ xl mem-set
>
> That should generate a coredump, on which you can use gdb to get a
> backtrace.

I get the following core dumps on ARMv8:

---
(gdb) bt
#0  0xacb509e8 in __GI_raise (sig=sig@entry=6)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0xacb51cf0 in __GI_abort () at abort.c:89
#2  0xacb4a3b8 in __assert_fail_base (
fmt=0xacc376f0 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
assertion=assertion@entry=0xacd76c38
"!libxl_defbool_is_default(db)",
file=file@entry=0xacd769e0 "libxl.c", line=line@entry=339,
function=)
at assert.c:92
#3  0xacb4a470 in __GI___assert_fail (
assertion=0xacd76c38 "!libxl_defbool_is_default(db)",
file=0xacd769e0 "libxl.c",
line=339, function=) at assert.c:101
#4  0xacce13f8 in libxl_defbool_val (db=...) at libxl.c:339
#5  0xacd490f8 in libxl__arch_extra_memory (gc=0xc5d47790,
info=0xc5d472b0,
out=0xc5d47788) at libxl_arm.c:116
#6  0xacd39764 in libxl_set_memory_target (ctx=0xaaab014bf050,
domid=1,
target_memkb=522240, relative=0, enforce=1) at libxl_mem.c:206
#7  0xc5f86abc in set_memory_target (domid=1, mem=0xc5d47e64
"510m") at xl_mem.c:69
#8  0xc5f86bac in main_memset (argc=3, argv=0xc5d47a20) at
xl_mem.c:90
#9  0xc5f72528 in main (argc=3, argv=0xc5d47a20) at xl.c:369
(gdb)
---

As far as I understand, the problem seems to be in libxl_arm.c:116,
checking for info->acpi.

According to docs/man/xl.cfg.pod.5.in, the ACPI option is true for x86
while it's false for ARM by default. By setting acpi = 1 in domu.cfg,
the previous error disappears, yet I get the following error:

---
root@avocet:~# xl mem-set 2 510m
libxl: error: libxl_arm_acpi.c:89:libxl__estimate_madt_size: Unknown GIC
version
libxl: error: libxl_mem.c:208:libxl_set_memory_target: Couldn't get arch
extra constant memory size
: Function not implemented
cannot set domid 2 dynamic max memory to : 510m
---

When I set acpi = 1 on my ARMv7 board, I get the following error already
during the domain creation process:

---
root@thanatos:~# xl create domu.cfg
Parsing config from domu.cfg
libxl: error: libxl_dom.c:418:libxl__build_pre: Couldn't get arch extra
constant memory size: No su
ch file or directory
libxl: error: libxl_create.c:1217:domcreate_rebuild_done: Domain
3:cannot (re-)build domain: -3
libxl: error: libxl_domain.c:1003:libxl__destroy_domid: Domain
3:Non-existant domain
libxl: error: libxl_domain.c:962:domain_destroy_callback: Domain
3:Unable to destroy guest
libxl: error: libxl_domain.c:889:domain_destroy_cb: Domain 3:Destruction
of domain failed
---

Thanks,
~Sergej


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


Re: [Xen-devel] ARM: Adjusting guest memory size through xl mem-{set|max} fails

2017-07-18 Thread Wei Liu
On Mon, Jul 17, 2017 at 06:19:09PM +0200, Sergej Proskurin wrote:
> Hi Julien,
> 
> 
> On 07/17/2017 03:53 PM, Julien Grall wrote:
> > (+Wei and Ian)
> >
> > Hi Sergej
> >
> > On 17/07/17 13:04, Sergej Proskurin wrote:
> >> Hi all,
> >>
> >> My setup comprises an ARMv7 (Arndale, Linux kernel v4.11.6) and an ARMv8
> >> (LeMaker HiKey, Linux kernel v4.9.0) development board. On both boards,
> >> I have Xen version 4.10-unstable running with the associated tools to
> >> manage a domu.
> >>
> >> Currently, I am trying to get xl mem-{set|max} to work on both
> >> architectures. Unfortunately, both command invocations fail with the
> >> following message (I remember using xl mem-{set|max} on ARMv7 before
> >> with Xen version 4.7 and 4.8):
> >>
> >> ---
> >> xl: libxl.c:339: libxl_defbool_val: Assertion
> >> `!libxl_defbool_is_default(db)' failed.
> >> Aborted
> >> ---
> >
> > I haven't myself tried to use xl mem-{set|max}. Looking at the assert,
> > you hit because a boolean is not initialized. It would be interesting
> > to know which one.
> >
> > I have CCed the tools maintainers to get more feedback.
> >

Can you provide a backtrace?

$ ulimit -c unlimited
$ xl mem-set

That should generate a coredump, on which you can use gdb to get a
backtrace.

___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


Re: [Xen-devel] ARM: Adjusting guest memory size through xl mem-{set|max} fails

2017-07-17 Thread Sergej Proskurin
Hi Julien,


On 07/17/2017 03:53 PM, Julien Grall wrote:
> (+Wei and Ian)
>
> Hi Sergej
>
> On 17/07/17 13:04, Sergej Proskurin wrote:
>> Hi all,
>>
>> My setup comprises an ARMv7 (Arndale, Linux kernel v4.11.6) and an ARMv8
>> (LeMaker HiKey, Linux kernel v4.9.0) development board. On both boards,
>> I have Xen version 4.10-unstable running with the associated tools to
>> manage a domu.
>>
>> Currently, I am trying to get xl mem-{set|max} to work on both
>> architectures. Unfortunately, both command invocations fail with the
>> following message (I remember using xl mem-{set|max} on ARMv7 before
>> with Xen version 4.7 and 4.8):
>>
>> ---
>> xl: libxl.c:339: libxl_defbool_val: Assertion
>> `!libxl_defbool_is_default(db)' failed.
>> Aborted
>> ---
>
> I haven't myself tried to use xl mem-{set|max}. Looking at the assert,
> you hit because a boolean is not initialized. It would be interesting
> to know which one.
>
> I have CCed the tools maintainers to get more feedback.
>
> Cheers,
>

Thank you. That is already a great help!

>>
>> The domu is created with the following parameters:
>>
>> ---
>> kernel= "/boot/zImage"
>> name = "domu"
>> memory = 512
>> vcpus = 2
>> disk=[ 'phy:/dev/vg0/VG0, xvda,w' ]
>> extra = 'console=hvc0 xencons=tty root=/dev/xvda rw'
>> ---
>>
>> My Kernel versions have CONFIG_XEN_BALLOON flag set (see ARMv7 example
>> Linux .config below).
>>
>> ---
>> $ cat .config | grep -i XEN
>> CONFIG_XEN_DOM0=y
>> CONFIG_XEN=y
>> CONFIG_XEN_BLKDEV_FRONTEND=y
>> CONFIG_XEN_BLKDEV_BACKEND=y
>> # CONFIG_XEN_SCSI_FRONTEND is not set
>> CONFIG_XEN_NETDEV_FRONTEND=y
>> CONFIG_XEN_NETDEV_BACKEND=y
>> CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y
>> CONFIG_HVC_XEN=y
>> CONFIG_HVC_XEN_FRONTEND=y
>> # CONFIG_TCG_XEN is not set
>> # CONFIG_XEN_WDT is not set
>> CONFIG_XEN_FBDEV_FRONTEND=y
>> # Xen driver support
>> CONFIG_XEN_BALLOON=y
>> CONFIG_XEN_SCRUB_PAGES=y
>> CONFIG_XEN_DEV_EVTCHN=y
>> CONFIG_XEN_BACKEND=y
>> CONFIG_XENFS=y
>> CONFIG_XEN_COMPAT_XENFS=y
>> CONFIG_XEN_SYS_HYPERVISOR=y
>> CONFIG_XEN_XENBUS_FRONTEND=y
>> CONFIG_XEN_GNTDEV=m
>> CONFIG_XEN_GRANT_DEV_ALLOC=m
>> CONFIG_SWIOTLB_XEN=y
>> CONFIG_XEN_PRIVCMD=y
>> CONFIG_XEN_AUTO_XLATE=y
>> ---
>>
>> Besides, I can see in the dmesg output that the balloon driver gets
>> initialized:
>>
>> ---
>> # dmesg | grep -i balloon
>> [0.180942] xen:balloon: Initialising balloon driver
>> [0.187103] xen_balloon: Initialising balloon driver
>> ---
>>
>> It would be great if someone would help me to resolve this issue as I am
>> obviously missing something. Thank you very much in advance.
>>
>> Best regards,
>> ~Sergej
>>
>>
>> ___
>> Xen-devel mailing list
>> Xen-devel@lists.xen.org
>> https://lists.xen.org/xen-devel
>>
>

Cheers,
~Sergej

___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


Re: [Xen-devel] ARM: Adjusting guest memory size through xl mem-{set|max} fails

2017-07-17 Thread Julien Grall

(+Wei and Ian)

Hi Sergej

On 17/07/17 13:04, Sergej Proskurin wrote:

Hi all,

My setup comprises an ARMv7 (Arndale, Linux kernel v4.11.6) and an ARMv8
(LeMaker HiKey, Linux kernel v4.9.0) development board. On both boards,
I have Xen version 4.10-unstable running with the associated tools to
manage a domu.

Currently, I am trying to get xl mem-{set|max} to work on both
architectures. Unfortunately, both command invocations fail with the
following message (I remember using xl mem-{set|max} on ARMv7 before
with Xen version 4.7 and 4.8):

---
xl: libxl.c:339: libxl_defbool_val: Assertion
`!libxl_defbool_is_default(db)' failed.
Aborted
---


I haven't myself tried to use xl mem-{set|max}. Looking at the assert, 
you hit because a boolean is not initialized. It would be interesting to 
know which one.


I have CCed the tools maintainers to get more feedback.

Cheers,



The domu is created with the following parameters:

---
kernel= "/boot/zImage"
name = "domu"
memory = 512
vcpus = 2
disk=[ 'phy:/dev/vg0/VG0, xvda,w' ]
extra = 'console=hvc0 xencons=tty root=/dev/xvda rw'
---

My Kernel versions have CONFIG_XEN_BALLOON flag set (see ARMv7 example
Linux .config below).

---
$ cat .config | grep -i XEN
CONFIG_XEN_DOM0=y
CONFIG_XEN=y
CONFIG_XEN_BLKDEV_FRONTEND=y
CONFIG_XEN_BLKDEV_BACKEND=y
# CONFIG_XEN_SCSI_FRONTEND is not set
CONFIG_XEN_NETDEV_FRONTEND=y
CONFIG_XEN_NETDEV_BACKEND=y
CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y
CONFIG_HVC_XEN=y
CONFIG_HVC_XEN_FRONTEND=y
# CONFIG_TCG_XEN is not set
# CONFIG_XEN_WDT is not set
CONFIG_XEN_FBDEV_FRONTEND=y
# Xen driver support
CONFIG_XEN_BALLOON=y
CONFIG_XEN_SCRUB_PAGES=y
CONFIG_XEN_DEV_EVTCHN=y
CONFIG_XEN_BACKEND=y
CONFIG_XENFS=y
CONFIG_XEN_COMPAT_XENFS=y
CONFIG_XEN_SYS_HYPERVISOR=y
CONFIG_XEN_XENBUS_FRONTEND=y
CONFIG_XEN_GNTDEV=m
CONFIG_XEN_GRANT_DEV_ALLOC=m
CONFIG_SWIOTLB_XEN=y
CONFIG_XEN_PRIVCMD=y
CONFIG_XEN_AUTO_XLATE=y
---

Besides, I can see in the dmesg output that the balloon driver gets
initialized:

---
# dmesg | grep -i balloon
[0.180942] xen:balloon: Initialising balloon driver
[0.187103] xen_balloon: Initialising balloon driver
---

It would be great if someone would help me to resolve this issue as I am
obviously missing something. Thank you very much in advance.

Best regards,
~Sergej


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel



--
Julien Grall

___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] ARM: Adjusting guest memory size through xl mem-{set|max} fails

2017-07-17 Thread Sergej Proskurin
Hi all,

My setup comprises an ARMv7 (Arndale, Linux kernel v4.11.6) and an ARMv8
(LeMaker HiKey, Linux kernel v4.9.0) development board. On both boards,
I have Xen version 4.10-unstable running with the associated tools to
manage a domu.

Currently, I am trying to get xl mem-{set|max} to work on both
architectures. Unfortunately, both command invocations fail with the
following message (I remember using xl mem-{set|max} on ARMv7 before
with Xen version 4.7 and 4.8):

---
xl: libxl.c:339: libxl_defbool_val: Assertion
`!libxl_defbool_is_default(db)' failed.
Aborted
---

The domu is created with the following parameters:

---
kernel= "/boot/zImage"
name = "domu"
memory = 512
vcpus = 2
disk=[ 'phy:/dev/vg0/VG0, xvda,w' ]
extra = 'console=hvc0 xencons=tty root=/dev/xvda rw'
---

My Kernel versions have CONFIG_XEN_BALLOON flag set (see ARMv7 example
Linux .config below).

---
$ cat .config | grep -i XEN
CONFIG_XEN_DOM0=y
CONFIG_XEN=y
CONFIG_XEN_BLKDEV_FRONTEND=y
CONFIG_XEN_BLKDEV_BACKEND=y
# CONFIG_XEN_SCSI_FRONTEND is not set
CONFIG_XEN_NETDEV_FRONTEND=y
CONFIG_XEN_NETDEV_BACKEND=y
CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y
CONFIG_HVC_XEN=y
CONFIG_HVC_XEN_FRONTEND=y
# CONFIG_TCG_XEN is not set
# CONFIG_XEN_WDT is not set
CONFIG_XEN_FBDEV_FRONTEND=y
# Xen driver support
CONFIG_XEN_BALLOON=y
CONFIG_XEN_SCRUB_PAGES=y
CONFIG_XEN_DEV_EVTCHN=y
CONFIG_XEN_BACKEND=y
CONFIG_XENFS=y
CONFIG_XEN_COMPAT_XENFS=y
CONFIG_XEN_SYS_HYPERVISOR=y
CONFIG_XEN_XENBUS_FRONTEND=y
CONFIG_XEN_GNTDEV=m
CONFIG_XEN_GRANT_DEV_ALLOC=m
CONFIG_SWIOTLB_XEN=y
CONFIG_XEN_PRIVCMD=y
CONFIG_XEN_AUTO_XLATE=y
---

Besides, I can see in the dmesg output that the balloon driver gets
initialized:

---
# dmesg | grep -i balloon
[0.180942] xen:balloon: Initialising balloon driver
[0.187103] xen_balloon: Initialising balloon driver
---

It would be great if someone would help me to resolve this issue as I am
obviously missing something. Thank you very much in advance.

Best regards,
~Sergej


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel