All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] tools/libxl: mark special pages as reserved in e820 map for PVH
@ 2017-11-21 11:06 Juergen Gross
  2017-11-21 11:27 ` Jan Beulich
                   ` (4 more replies)
  0 siblings, 5 replies; 17+ messages in thread
From: Juergen Gross @ 2017-11-21 11:06 UTC (permalink / raw)
  To: xen-devel; +Cc: Juergen Gross, wei.liu2, julien.grall, ian.jackson

The "special pages" for PVH guests include the frames for console and
Xenstore ring buffers. Those have to be marked as "Reserved" in the
guest's E820 map, as otherwise conflicts might arise later e.g. when
hotplugging memory into the guest.

Signed-off-by: Juergen Gross <jgross@suse.com>
---
This is a bugfix for PVH guests. Please consider for 4.10.
---
 tools/libxl/libxl_x86.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/tools/libxl/libxl_x86.c b/tools/libxl/libxl_x86.c
index 5f91fe4f92..d82013f6ed 100644
--- a/tools/libxl/libxl_x86.c
+++ b/tools/libxl/libxl_x86.c
@@ -530,6 +530,9 @@ int libxl__arch_domain_construct_memmap(libxl__gc *gc,
         if (d_config->rdms[i].policy != LIBXL_RDM_RESERVE_POLICY_INVALID)
             e820_entries++;
 
+    /* Add mmio entry for PVH. */
+    if (dom->mmio_size && d_config->b_info.type == LIBXL_DOMAIN_TYPE_PVH)
+        e820_entries++;
 
     /* If we should have a highmem range. */
     if (highmem_size)
@@ -564,6 +567,14 @@ int libxl__arch_domain_construct_memmap(libxl__gc *gc,
         nr++;
     }
 
+    /* mmio area */
+    if (dom->mmio_size && d_config->b_info.type == LIBXL_DOMAIN_TYPE_PVH) {
+        e820[nr].addr = dom->mmio_start;
+        e820[nr].size = dom->mmio_size;
+        e820[nr].type = E820_RESERVED;
+        nr++;
+    }
+
     for (i = 0; i < MAX_ACPI_MODULES; i++) {
         if (dom->acpi_modules[i].length) {
             e820[nr].addr = dom->acpi_modules[i].guest_addr_out & ~(page_size - 1);
-- 
2.12.3


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

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH v2] tools/libxl: mark special pages as reserved in e820 map for PVH
  2017-11-21 11:06 [PATCH v2] tools/libxl: mark special pages as reserved in e820 map for PVH Juergen Gross
@ 2017-11-21 11:27 ` Jan Beulich
       [not found] ` <5A141B9E0200007800190754@suse.com>
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 17+ messages in thread
From: Jan Beulich @ 2017-11-21 11:27 UTC (permalink / raw)
  To: Juergen Gross; +Cc: ian.jackson, julien.grall, wei.liu2, xen-devel

>>> On 21.11.17 at 12:06, <jgross@suse.com> wrote:
> The "special pages" for PVH guests include the frames for console and
> Xenstore ring buffers. Those have to be marked as "Reserved" in the
> guest's E820 map, as otherwise conflicts might arise later e.g. when
> hotplugging memory into the guest.

Afaict this differs from v1 only in no longer adding the extra entry
for HVM. How does this address the concerns raised on v1 wrt spec
compliance? v1 having caused problems with hvmloader should not
have resulted in simply excluding HVM here. That's even more so
because we mean HVM and PVH to converge in the long run - I'd
expect that to mean that no clear type distinction would exist
anymore on libxl.

If you want to reserve Xenstore ring buffer and console page,
why don't you reserve just the two (provided of course they
live outside of any [fake] PCI device BAR), which then ought to
also be compatible with plain HVM?

Jan


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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2] tools/libxl: mark special pages as reserved in e820 map for PVH
       [not found] ` <5A141B9E0200007800190754@suse.com>
@ 2017-11-21 11:48   ` Juergen Gross
  2017-11-21 12:56     ` Jan Beulich
  0 siblings, 1 reply; 17+ messages in thread
From: Juergen Gross @ 2017-11-21 11:48 UTC (permalink / raw)
  To: Jan Beulich; +Cc: ian.jackson, julien.grall, wei.liu2, xen-devel

On 21/11/17 12:27, Jan Beulich wrote:
>>>> On 21.11.17 at 12:06, <jgross@suse.com> wrote:
>> The "special pages" for PVH guests include the frames for console and
>> Xenstore ring buffers. Those have to be marked as "Reserved" in the
>> guest's E820 map, as otherwise conflicts might arise later e.g. when
>> hotplugging memory into the guest.
> 
> Afaict this differs from v1 only in no longer adding the extra entry
> for HVM. How does this address the concerns raised on v1 wrt spec
> compliance? v1 having caused problems with hvmloader should not
> have resulted in simply excluding HVM here. That's even more so
> because we mean HVM and PVH to converge in the long run - I'd
> expect that to mean that no clear type distinction would exist
> anymore on libxl.

The difference is for HVM the HVMloader is creating the additional
"Reserved" entry.

> If you want to reserve Xenstore ring buffer and console page,
> why don't you reserve just the two (provided of course they
> live outside of any [fake] PCI device BAR), which then ought to
> also be compatible with plain HVM?

For PVH the "mmio" area is starting with the LAPIC and extends up
to 4GB. And all of this area conflicts with the HVMloader:

(d11) HVM Loader
(d11) Detected Xen v4.10-unstable
(d11) Fail to setup memory map due to conflict on dynamic reserved
memory range.
(d11) *** HVMLoader bug at e820.c:52
(d11) *** HVMLoader crashed.

I guess this should be fixed, but I wanted the patch to be as small
as possible to minimze the risk for 4.10.


Juergen

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2] tools/libxl: mark special pages as reserved in e820 map for PVH
  2017-11-21 11:48   ` Juergen Gross
@ 2017-11-21 12:56     ` Jan Beulich
  0 siblings, 0 replies; 17+ messages in thread
From: Jan Beulich @ 2017-11-21 12:56 UTC (permalink / raw)
  To: Juergen Gross; +Cc: ian.jackson, julien.grall, wei.liu2, xen-devel

>>> On 21.11.17 at 12:48, <jgross@suse.com> wrote:
> On 21/11/17 12:27, Jan Beulich wrote:
>>>>> On 21.11.17 at 12:06, <jgross@suse.com> wrote:
>>> The "special pages" for PVH guests include the frames for console and
>>> Xenstore ring buffers. Those have to be marked as "Reserved" in the
>>> guest's E820 map, as otherwise conflicts might arise later e.g. when
>>> hotplugging memory into the guest.
>> 
>> Afaict this differs from v1 only in no longer adding the extra entry
>> for HVM. How does this address the concerns raised on v1 wrt spec
>> compliance? v1 having caused problems with hvmloader should not
>> have resulted in simply excluding HVM here. That's even more so
>> because we mean HVM and PVH to converge in the long run - I'd
>> expect that to mean that no clear type distinction would exist
>> anymore on libxl.
> 
> The difference is for HVM the HVMloader is creating the additional
> "Reserved" entry.
> 
>> If you want to reserve Xenstore ring buffer and console page,
>> why don't you reserve just the two (provided of course they
>> live outside of any [fake] PCI device BAR), which then ought to
>> also be compatible with plain HVM?
> 
> For PVH the "mmio" area is starting with the LAPIC and extends up
> to 4GB.

Oh, I see - that's probably okay then (or at least as okay as
libxl having knowledge of the LAPIC base address in the first
place).

Jan


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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2] tools/libxl: mark special pages as reserved in e820 map for PVH
  2017-11-21 11:06 [PATCH v2] tools/libxl: mark special pages as reserved in e820 map for PVH Juergen Gross
  2017-11-21 11:27 ` Jan Beulich
       [not found] ` <5A141B9E0200007800190754@suse.com>
@ 2017-12-04 15:49 ` Juergen Gross
  2017-12-05 15:23   ` [for-4.10] " Julien Grall
  2017-12-04 16:44 ` Roger Pau Monné
  2018-02-13 11:55 ` Wei Liu
  4 siblings, 1 reply; 17+ messages in thread
From: Juergen Gross @ 2017-12-04 15:49 UTC (permalink / raw)
  To: xen-devel; +Cc: ian.jackson, julien.grall, wei.liu2

On 21/11/17 12:06, Juergen Gross wrote:
> The "special pages" for PVH guests include the frames for console and
> Xenstore ring buffers. Those have to be marked as "Reserved" in the
> guest's E820 map, as otherwise conflicts might arise later e.g. when
> hotplugging memory into the guest.
> 
> Signed-off-by: Juergen Gross <jgross@suse.com>
> ---
> This is a bugfix for PVH guests. Please consider for 4.10.

Ping?

> ---
>  tools/libxl/libxl_x86.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/tools/libxl/libxl_x86.c b/tools/libxl/libxl_x86.c
> index 5f91fe4f92..d82013f6ed 100644
> --- a/tools/libxl/libxl_x86.c
> +++ b/tools/libxl/libxl_x86.c
> @@ -530,6 +530,9 @@ int libxl__arch_domain_construct_memmap(libxl__gc *gc,
>          if (d_config->rdms[i].policy != LIBXL_RDM_RESERVE_POLICY_INVALID)
>              e820_entries++;
>  
> +    /* Add mmio entry for PVH. */
> +    if (dom->mmio_size && d_config->b_info.type == LIBXL_DOMAIN_TYPE_PVH)
> +        e820_entries++;
>  
>      /* If we should have a highmem range. */
>      if (highmem_size)
> @@ -564,6 +567,14 @@ int libxl__arch_domain_construct_memmap(libxl__gc *gc,
>          nr++;
>      }
>  
> +    /* mmio area */
> +    if (dom->mmio_size && d_config->b_info.type == LIBXL_DOMAIN_TYPE_PVH) {
> +        e820[nr].addr = dom->mmio_start;
> +        e820[nr].size = dom->mmio_size;
> +        e820[nr].type = E820_RESERVED;
> +        nr++;
> +    }
> +
>      for (i = 0; i < MAX_ACPI_MODULES; i++) {
>          if (dom->acpi_modules[i].length) {
>              e820[nr].addr = dom->acpi_modules[i].guest_addr_out & ~(page_size - 1);
> 


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2] tools/libxl: mark special pages as reserved in e820 map for PVH
  2017-11-21 11:06 [PATCH v2] tools/libxl: mark special pages as reserved in e820 map for PVH Juergen Gross
                   ` (2 preceding siblings ...)
  2017-12-04 15:49 ` Juergen Gross
@ 2017-12-04 16:44 ` Roger Pau Monné
  2018-02-13 11:55 ` Wei Liu
  4 siblings, 0 replies; 17+ messages in thread
From: Roger Pau Monné @ 2017-12-04 16:44 UTC (permalink / raw)
  To: Juergen Gross; +Cc: xen-devel, julien.grall, wei.liu2, ian.jackson

On Tue, Nov 21, 2017 at 12:06:06PM +0100, Juergen Gross wrote:
> The "special pages" for PVH guests include the frames for console and
> Xenstore ring buffers. Those have to be marked as "Reserved" in the
> guest's E820 map, as otherwise conflicts might arise later e.g. when
> hotplugging memory into the guest.
> 
> Signed-off-by: Juergen Gross <jgross@suse.com>

Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>

Albeit I would also prefer this to not be PVH specific. Ideally I
would like both PVH and HVM to share the logic to mark the reserved
regions in the memory map. I guess this can be fixed afterwards by
moving away this logic from hvmloader and handling the creation of
the memory map for both HVM and PVH in libxl.

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [for-4.10] Re: [PATCH v2] tools/libxl: mark special pages as reserved in e820 map for PVH
  2017-12-04 15:49 ` Juergen Gross
@ 2017-12-05 15:23   ` Julien Grall
  2017-12-05 15:36     ` Ian Jackson
  2017-12-05 16:19     ` Juergen Gross
  0 siblings, 2 replies; 17+ messages in thread
From: Julien Grall @ 2017-12-05 15:23 UTC (permalink / raw)
  To: Juergen Gross, xen-devel; +Cc: wei.liu2, julien.grall, ian.jackson

Hi Juergen,

On 04/12/17 15:49, Juergen Gross wrote:
> On 21/11/17 12:06, Juergen Gross wrote:
>> The "special pages" for PVH guests include the frames for console and
>> Xenstore ring buffers. Those have to be marked as "Reserved" in the
>> guest's E820 map, as otherwise conflicts might arise later e.g. when
>> hotplugging memory into the guest.
>>
>> Signed-off-by: Juergen Gross <jgross@suse.com>
>> ---
>> This is a bugfix for PVH guests. Please consider for 4.10.
> 
> Ping?

I was waiting an ack from tools maintainers before looking for a release
perspective.

I would recommend to tag your patch is 4.10 to help reviewers prioritize 
review on your patch. I have done it now.

I am looking at releasing Xen 4.10 in the next few days. Can you explain 
the pros/cons of this patch?

Cheers,

> 
>> ---
>>   tools/libxl/libxl_x86.c | 11 +++++++++++
>>   1 file changed, 11 insertions(+)
>>
>> diff --git a/tools/libxl/libxl_x86.c b/tools/libxl/libxl_x86.c
>> index 5f91fe4f92..d82013f6ed 100644
>> --- a/tools/libxl/libxl_x86.c
>> +++ b/tools/libxl/libxl_x86.c
>> @@ -530,6 +530,9 @@ int libxl__arch_domain_construct_memmap(libxl__gc *gc,
>>           if (d_config->rdms[i].policy != LIBXL_RDM_RESERVE_POLICY_INVALID)
>>               e820_entries++;
>>   
>> +    /* Add mmio entry for PVH. */
>> +    if (dom->mmio_size && d_config->b_info.type == LIBXL_DOMAIN_TYPE_PVH)
>> +        e820_entries++;
>>   
>>       /* If we should have a highmem range. */
>>       if (highmem_size)
>> @@ -564,6 +567,14 @@ int libxl__arch_domain_construct_memmap(libxl__gc *gc,
>>           nr++;
>>       }
>>   
>> +    /* mmio area */
>> +    if (dom->mmio_size && d_config->b_info.type == LIBXL_DOMAIN_TYPE_PVH) {
>> +        e820[nr].addr = dom->mmio_start;
>> +        e820[nr].size = dom->mmio_size;
>> +        e820[nr].type = E820_RESERVED;
>> +        nr++;
>> +    }
>> +
>>       for (i = 0; i < MAX_ACPI_MODULES; i++) {
>>           if (dom->acpi_modules[i].length) {
>>               e820[nr].addr = dom->acpi_modules[i].guest_addr_out & ~(page_size - 1);
>>
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xenproject.org
> https://lists.xenproject.org/mailman/listinfo/xen-devel
> 

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [for-4.10] Re: [PATCH v2] tools/libxl: mark special pages as reserved in e820 map for PVH
  2017-12-05 15:23   ` [for-4.10] " Julien Grall
@ 2017-12-05 15:36     ` Ian Jackson
  2017-12-05 16:19     ` Juergen Gross
  1 sibling, 0 replies; 17+ messages in thread
From: Ian Jackson @ 2017-12-05 15:36 UTC (permalink / raw)
  To: Julien Grall; +Cc: Juergen Gross, xen-devel, julien.grall, wei.liu2

Julien Grall writes ("[for-4.10] Re: [Xen-devel] [PATCH v2] tools/libxl: mark special pages as reserved in e820 map for PVH"):
> I would recommend to tag your patch is 4.10 to help reviewers prioritize 
> review on your patch. I have done it now.

Thanks.  Looking at the thread, I would have liked to see an answer to
this comment by Roger:

| Albeit I would also prefer this to not be PVH specific. Ideally I
| would like both PVH and HVM to share the logic to mark the reserved
| regions in the memory map. I guess this can be fixed afterwards by
| moving away this logic from hvmloader and handling the creation of
| the memory map for both HVM and PVH in libxl.

But it seems to be a bugfix and has had review from the x86
perspective, so:

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>


If anyone is feeling up to doing some improvement, I would like to see
a rework of the algorithm to avoid this error-prone duplicated-
information construction:

  +    /* Add mmio entry for PVH. */
  +    if (dom->mmio_size && d_config->b_info.type == LIBXL_DOMAIN_TYPE_PVH)
  +        e820_entries++;

  @@ -564,6 +567,14 @@ int libxl__arch_domain_construct_memmap(libxl__gc *gc,

  +    /* mmio area */
  +    if (dom->mmio_size && d_config->b_info.type == LIBXL_DOMAIN_TYPE_PVH) {
  +        e820[nr].addr = dom->mmio_start;
  +        e820[nr].size = dom->mmio_size;
  +        e820[nr].type = E820_RESERVED;
  +        nr++;
  +    }
  +

That is, there should be no separate pre-calculation of the number of
entries.  There would have to be an expanding array instead.

Regards,
Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [for-4.10] Re: [PATCH v2] tools/libxl: mark special pages as reserved in e820 map for PVH
  2017-12-05 15:23   ` [for-4.10] " Julien Grall
  2017-12-05 15:36     ` Ian Jackson
@ 2017-12-05 16:19     ` Juergen Gross
  2017-12-06  9:53       ` Julien Grall
  1 sibling, 1 reply; 17+ messages in thread
From: Juergen Gross @ 2017-12-05 16:19 UTC (permalink / raw)
  To: Julien Grall, xen-devel; +Cc: wei.liu2, julien.grall, ian.jackson

On 05/12/17 16:23, Julien Grall wrote:
> Hi Juergen,
> 
> On 04/12/17 15:49, Juergen Gross wrote:
>> On 21/11/17 12:06, Juergen Gross wrote:
>>> The "special pages" for PVH guests include the frames for console and
>>> Xenstore ring buffers. Those have to be marked as "Reserved" in the
>>> guest's E820 map, as otherwise conflicts might arise later e.g. when
>>> hotplugging memory into the guest.
>>>
>>> Signed-off-by: Juergen Gross <jgross@suse.com>
>>> ---
>>> This is a bugfix for PVH guests. Please consider for 4.10.
>>
>> Ping?
> 
> I was waiting an ack from tools maintainers before looking for a release
> perspective.
> 
> I would recommend to tag your patch is 4.10 to help reviewers prioritize
> review on your patch. I have done it now.
> 
> I am looking at releasing Xen 4.10 in the next few days. Can you explain
> the pros/cons of this patch?

Pros: PVH guests with 4GB of memory or more will work. :-)
Cons: There is a more general solution (as Roger pointed out), but
      this would require much more work.


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [for-4.10] Re: [PATCH v2] tools/libxl: mark special pages as reserved in e820 map for PVH
  2017-12-05 16:19     ` Juergen Gross
@ 2017-12-06  9:53       ` Julien Grall
  2017-12-06 11:22         ` Juergen Gross
  0 siblings, 1 reply; 17+ messages in thread
From: Julien Grall @ 2017-12-06  9:53 UTC (permalink / raw)
  To: Juergen Gross, xen-devel; +Cc: wei.liu2, julien.grall, ian.jackson

Hi Juergen,

On 12/05/2017 04:19 PM, Juergen Gross wrote:
> On 05/12/17 16:23, Julien Grall wrote:
>> Hi Juergen,
>>
>> On 04/12/17 15:49, Juergen Gross wrote:
>>> On 21/11/17 12:06, Juergen Gross wrote:
>>>> The "special pages" for PVH guests include the frames for console and
>>>> Xenstore ring buffers. Those have to be marked as "Reserved" in the
>>>> guest's E820 map, as otherwise conflicts might arise later e.g. when
>>>> hotplugging memory into the guest.
>>>>
>>>> Signed-off-by: Juergen Gross <jgross@suse.com>
>>>> ---
>>>> This is a bugfix for PVH guests. Please consider for 4.10.
>>>
>>> Ping?
>>
>> I was waiting an ack from tools maintainers before looking for a release
>> perspective.
>>
>> I would recommend to tag your patch is 4.10 to help reviewers prioritize
>> review on your patch. I have done it now.
>>
>> I am looking at releasing Xen 4.10 in the next few days. Can you explain
>> the pros/cons of this patch?
> 
> Pros: PVH guests with 4GB of memory or more will work. :-)

They never worked before? Or is it a regression? If it is a regression 
when did it appear?

> Cons: There is a more general solution (as Roger pointed out), but
>        this would require much more work.

Cheers,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [for-4.10] Re: [PATCH v2] tools/libxl: mark special pages as reserved in e820 map for PVH
  2017-12-06  9:53       ` Julien Grall
@ 2017-12-06 11:22         ` Juergen Gross
  2017-12-06 11:47           ` Roger Pau Monné
  0 siblings, 1 reply; 17+ messages in thread
From: Juergen Gross @ 2017-12-06 11:22 UTC (permalink / raw)
  To: Julien Grall, xen-devel; +Cc: wei.liu2, julien.grall, ian.jackson

On 06/12/17 10:53, Julien Grall wrote:
> Hi Juergen,
> 
> On 12/05/2017 04:19 PM, Juergen Gross wrote:
>> On 05/12/17 16:23, Julien Grall wrote:
>>> Hi Juergen,
>>>
>>> On 04/12/17 15:49, Juergen Gross wrote:
>>>> On 21/11/17 12:06, Juergen Gross wrote:
>>>>> The "special pages" for PVH guests include the frames for console and
>>>>> Xenstore ring buffers. Those have to be marked as "Reserved" in the
>>>>> guest's E820 map, as otherwise conflicts might arise later e.g. when
>>>>> hotplugging memory into the guest.
>>>>>
>>>>> Signed-off-by: Juergen Gross <jgross@suse.com>
>>>>> ---
>>>>> This is a bugfix for PVH guests. Please consider for 4.10.
>>>>
>>>> Ping?
>>>
>>> I was waiting an ack from tools maintainers before looking for a release
>>> perspective.
>>>
>>> I would recommend to tag your patch is 4.10 to help reviewers prioritize
>>> review on your patch. I have done it now.
>>>
>>> I am looking at releasing Xen 4.10 in the next few days. Can you explain
>>> the pros/cons of this patch?
>>
>> Pros: PVH guests with 4GB of memory or more will work. :-)
> 
> They never worked before? Or is it a regression? If it is a regression
> when did it appear?

Hmm, seems we are lucky: Linux kernel will not try to map any memory
there (I just tested it). So we don't need that patch in 4.10 for Linux
running as PVH guest. Not sure about BSD, though.


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [for-4.10] Re: [PATCH v2] tools/libxl: mark special pages as reserved in e820 map for PVH
  2017-12-06 11:22         ` Juergen Gross
@ 2017-12-06 11:47           ` Roger Pau Monné
  2017-12-06 11:50             ` Julien Grall
  0 siblings, 1 reply; 17+ messages in thread
From: Roger Pau Monné @ 2017-12-06 11:47 UTC (permalink / raw)
  To: Juergen Gross
  Cc: xen-devel, julien.grall, Julien Grall, wei.liu2, ian.jackson

On Wed, Dec 06, 2017 at 12:22:00PM +0100, Juergen Gross wrote:
> On 06/12/17 10:53, Julien Grall wrote:
> > Hi Juergen,
> > 
> > On 12/05/2017 04:19 PM, Juergen Gross wrote:
> >> On 05/12/17 16:23, Julien Grall wrote:
> >>> Hi Juergen,
> >>>
> >>> On 04/12/17 15:49, Juergen Gross wrote:
> >>>> On 21/11/17 12:06, Juergen Gross wrote:
> >>>>> The "special pages" for PVH guests include the frames for console and
> >>>>> Xenstore ring buffers. Those have to be marked as "Reserved" in the
> >>>>> guest's E820 map, as otherwise conflicts might arise later e.g. when
> >>>>> hotplugging memory into the guest.
> >>>>>
> >>>>> Signed-off-by: Juergen Gross <jgross@suse.com>
> >>>>> ---
> >>>>> This is a bugfix for PVH guests. Please consider for 4.10.
> >>>>
> >>>> Ping?
> >>>
> >>> I was waiting an ack from tools maintainers before looking for a release
> >>> perspective.
> >>>
> >>> I would recommend to tag your patch is 4.10 to help reviewers prioritize
> >>> review on your patch. I have done it now.
> >>>
> >>> I am looking at releasing Xen 4.10 in the next few days. Can you explain
> >>> the pros/cons of this patch?
> >>
> >> Pros: PVH guests with 4GB of memory or more will work. :-)
> > 
> > They never worked before? Or is it a regression? If it is a regression
> > when did it appear?
> 
> Hmm, seems we are lucky: Linux kernel will not try to map any memory
> there (I just tested it). So we don't need that patch in 4.10 for Linux
> running as PVH guest. Not sure about BSD, though.

I haven't yet committed any PVHv2 support to FreeBSD, but in any case
I always avoid using memory below 4GB just in case...

Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [for-4.10] Re: [PATCH v2] tools/libxl: mark special pages as reserved in e820 map for PVH
  2017-12-06 11:47           ` Roger Pau Monné
@ 2017-12-06 11:50             ` Julien Grall
  2017-12-06 11:57               ` Juergen Gross
  0 siblings, 1 reply; 17+ messages in thread
From: Julien Grall @ 2017-12-06 11:50 UTC (permalink / raw)
  To: Roger Pau Monné, Juergen Gross
  Cc: xen-devel, julien.grall, wei.liu2, ian.jackson

Hi,

On 12/06/2017 11:47 AM, Roger Pau Monné wrote:
> On Wed, Dec 06, 2017 at 12:22:00PM +0100, Juergen Gross wrote:
>> On 06/12/17 10:53, Julien Grall wrote:
>>> Hi Juergen,
>>>
>>> On 12/05/2017 04:19 PM, Juergen Gross wrote:
>>>> On 05/12/17 16:23, Julien Grall wrote:
>>>>> Hi Juergen,
>>>>>
>>>>> On 04/12/17 15:49, Juergen Gross wrote:
>>>>>> On 21/11/17 12:06, Juergen Gross wrote:
>>>>>>> The "special pages" for PVH guests include the frames for console and
>>>>>>> Xenstore ring buffers. Those have to be marked as "Reserved" in the
>>>>>>> guest's E820 map, as otherwise conflicts might arise later e.g. when
>>>>>>> hotplugging memory into the guest.
>>>>>>>
>>>>>>> Signed-off-by: Juergen Gross <jgross@suse.com>
>>>>>>> ---
>>>>>>> This is a bugfix for PVH guests. Please consider for 4.10.
>>>>>>
>>>>>> Ping?
>>>>>
>>>>> I was waiting an ack from tools maintainers before looking for a release
>>>>> perspective.
>>>>>
>>>>> I would recommend to tag your patch is 4.10 to help reviewers prioritize
>>>>> review on your patch. I have done it now.
>>>>>
>>>>> I am looking at releasing Xen 4.10 in the next few days. Can you explain
>>>>> the pros/cons of this patch?
>>>>
>>>> Pros: PVH guests with 4GB of memory or more will work. :-)
>>>
>>> They never worked before? Or is it a regression? If it is a regression
>>> when did it appear?
>>
>> Hmm, seems we are lucky: Linux kernel will not try to map any memory
>> there (I just tested it). So we don't need that patch in 4.10 for Linux
>> running as PVH guest. Not sure about BSD, though.
> 
> I haven't yet committed any PVHv2 support to FreeBSD, but in any case
> I always avoid using memory below 4GB just in case...

I will defer this patch post 4.10. We can add a release note if you 
think it is worth it.

Cheers,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [for-4.10] Re: [PATCH v2] tools/libxl: mark special pages as reserved in e820 map for PVH
  2017-12-06 11:50             ` Julien Grall
@ 2017-12-06 11:57               ` Juergen Gross
  0 siblings, 0 replies; 17+ messages in thread
From: Juergen Gross @ 2017-12-06 11:57 UTC (permalink / raw)
  To: Julien Grall, Roger Pau Monné
  Cc: xen-devel, julien.grall, wei.liu2, ian.jackson

On 06/12/17 12:50, Julien Grall wrote:
> Hi,
> 
> On 12/06/2017 11:47 AM, Roger Pau Monné wrote:
>> On Wed, Dec 06, 2017 at 12:22:00PM +0100, Juergen Gross wrote:
>>> On 06/12/17 10:53, Julien Grall wrote:
>>>> Hi Juergen,
>>>>
>>>> On 12/05/2017 04:19 PM, Juergen Gross wrote:
>>>>> On 05/12/17 16:23, Julien Grall wrote:
>>>>>> Hi Juergen,
>>>>>>
>>>>>> On 04/12/17 15:49, Juergen Gross wrote:
>>>>>>> On 21/11/17 12:06, Juergen Gross wrote:
>>>>>>>> The "special pages" for PVH guests include the frames for
>>>>>>>> console and
>>>>>>>> Xenstore ring buffers. Those have to be marked as "Reserved" in the
>>>>>>>> guest's E820 map, as otherwise conflicts might arise later e.g.
>>>>>>>> when
>>>>>>>> hotplugging memory into the guest.
>>>>>>>>
>>>>>>>> Signed-off-by: Juergen Gross <jgross@suse.com>
>>>>>>>> ---
>>>>>>>> This is a bugfix for PVH guests. Please consider for 4.10.
>>>>>>>
>>>>>>> Ping?
>>>>>>
>>>>>> I was waiting an ack from tools maintainers before looking for a
>>>>>> release
>>>>>> perspective.
>>>>>>
>>>>>> I would recommend to tag your patch is 4.10 to help reviewers
>>>>>> prioritize
>>>>>> review on your patch. I have done it now.
>>>>>>
>>>>>> I am looking at releasing Xen 4.10 in the next few days. Can you
>>>>>> explain
>>>>>> the pros/cons of this patch?
>>>>>
>>>>> Pros: PVH guests with 4GB of memory or more will work. :-)
>>>>
>>>> They never worked before? Or is it a regression? If it is a regression
>>>> when did it appear?
>>>
>>> Hmm, seems we are lucky: Linux kernel will not try to map any memory
>>> there (I just tested it). So we don't need that patch in 4.10 for Linux
>>> running as PVH guest. Not sure about BSD, though.
>>
>> I haven't yet committed any PVHv2 support to FreeBSD, but in any case
>> I always avoid using memory below 4GB just in case...
> 
> I will defer this patch post 4.10. We can add a release note if you
> think it is worth it.

I don't think that is needed.

And in case someone hits this problem we can easily apply the patch to
a 4.10 update release later.


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2] tools/libxl: mark special pages as reserved in e820 map for PVH
  2017-11-21 11:06 [PATCH v2] tools/libxl: mark special pages as reserved in e820 map for PVH Juergen Gross
                   ` (3 preceding siblings ...)
  2017-12-04 16:44 ` Roger Pau Monné
@ 2018-02-13 11:55 ` Wei Liu
  2018-02-13 11:57   ` Juergen Gross
  4 siblings, 1 reply; 17+ messages in thread
From: Wei Liu @ 2018-02-13 11:55 UTC (permalink / raw)
  To: Juergen Gross; +Cc: xen-devel, julien.grall, ian.jackson, wei.liu2

On Tue, Nov 21, 2017 at 12:06:06PM +0100, Juergen Gross wrote:
> The "special pages" for PVH guests include the frames for console and
> Xenstore ring buffers. Those have to be marked as "Reserved" in the
> guest's E820 map, as otherwise conflicts might arise later e.g. when
> hotplugging memory into the guest.
> 
> Signed-off-by: Juergen Gross <jgross@suse.com>

Is this patch still relevant? The reasoning looks sensible to me fwiw.

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2] tools/libxl: mark special pages as reserved in e820 map for PVH
  2018-02-13 11:55 ` Wei Liu
@ 2018-02-13 11:57   ` Juergen Gross
  2018-02-13 12:37     ` Wei Liu
  0 siblings, 1 reply; 17+ messages in thread
From: Juergen Gross @ 2018-02-13 11:57 UTC (permalink / raw)
  To: Wei Liu; +Cc: xen-devel, julien.grall, ian.jackson

On 13/02/18 12:55, Wei Liu wrote:
> On Tue, Nov 21, 2017 at 12:06:06PM +0100, Juergen Gross wrote:
>> The "special pages" for PVH guests include the frames for console and
>> Xenstore ring buffers. Those have to be marked as "Reserved" in the
>> guest's E820 map, as otherwise conflicts might arise later e.g. when
>> hotplugging memory into the guest.
>>
>> Signed-off-by: Juergen Gross <jgross@suse.com>
> 
> Is this patch still relevant? The reasoning looks sensible to me fwiw.

I still think it should be applied, yes.


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2] tools/libxl: mark special pages as reserved in e820 map for PVH
  2018-02-13 11:57   ` Juergen Gross
@ 2018-02-13 12:37     ` Wei Liu
  0 siblings, 0 replies; 17+ messages in thread
From: Wei Liu @ 2018-02-13 12:37 UTC (permalink / raw)
  To: Juergen Gross; +Cc: xen-devel, julien.grall, Wei Liu, ian.jackson

On Tue, Feb 13, 2018 at 12:57:31PM +0100, Juergen Gross wrote:
> On 13/02/18 12:55, Wei Liu wrote:
> > On Tue, Nov 21, 2017 at 12:06:06PM +0100, Juergen Gross wrote:
> >> The "special pages" for PVH guests include the frames for console and
> >> Xenstore ring buffers. Those have to be marked as "Reserved" in the
> >> guest's E820 map, as otherwise conflicts might arise later e.g. when
> >> hotplugging memory into the guest.
> >>
> >> Signed-off-by: Juergen Gross <jgross@suse.com>
> > 
> > Is this patch still relevant? The reasoning looks sensible to me fwiw.
> 
> I still think it should be applied, yes.

Acked + applied.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2018-02-13 12:37 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-21 11:06 [PATCH v2] tools/libxl: mark special pages as reserved in e820 map for PVH Juergen Gross
2017-11-21 11:27 ` Jan Beulich
     [not found] ` <5A141B9E0200007800190754@suse.com>
2017-11-21 11:48   ` Juergen Gross
2017-11-21 12:56     ` Jan Beulich
2017-12-04 15:49 ` Juergen Gross
2017-12-05 15:23   ` [for-4.10] " Julien Grall
2017-12-05 15:36     ` Ian Jackson
2017-12-05 16:19     ` Juergen Gross
2017-12-06  9:53       ` Julien Grall
2017-12-06 11:22         ` Juergen Gross
2017-12-06 11:47           ` Roger Pau Monné
2017-12-06 11:50             ` Julien Grall
2017-12-06 11:57               ` Juergen Gross
2017-12-04 16:44 ` Roger Pau Monné
2018-02-13 11:55 ` Wei Liu
2018-02-13 11:57   ` Juergen Gross
2018-02-13 12:37     ` Wei Liu

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.