Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1522582

Re: [RFC PATCH] xen/x86: Increase xen_e820_map to E820_X_MAX possible entries

From Juergen Gross <jgross@suse.com>
Newsgroups linux.kernel
Subject Re: [RFC PATCH] xen/x86: Increase xen_e820_map to E820_X_MAX possible entries
Date 2016-11-15 12:10 +0100
Message-ID <sDJMK-49e-13@gated-at.bofh.it> (permalink)
References (4 earlier) <sDHBf-2C3-21@gated-at.bofh.it> <sDHBf-2C3-19@gated-at.bofh.it> <sDIH0-3dJ-5@gated-at.bofh.it> <sDIH0-3dJ-3@gated-at.bofh.it> <sDJMK-49e-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 15/11/16 11:44, Jan Beulich wrote:
>>>> On 15.11.16 at 10:55, <JGross@suse.com> wrote:
>> On 15/11/16 10:45, Jan Beulich wrote:
>>>>>> On 15.11.16 at 09:42, <JGross@suse.com> wrote:
>>>> For a fully dynamical solution we'd need a way to get a partial
>>>> E820 map from the hypervisor (e.g. first 128 entries) in order to
>>>> be able to setup at least some memory and later get the rest of
>>>> the memory map using some dynamically allocated memory.
>>>
>>> And we could of course also make the hypercall allow for that (e.g.
>>> by defining the semantics of a specific error code, so far not used
>>> by it, to avoid mis-interpretation of output on older hypervisors),
>>> or introduce a new clone of the existing one(s).
>>
>> I'd go with the new error code. What about E2BIG or ENOSPC?
> 
> Either seems fine.
> 
>> I think the hypervisor should fill in the number of entries required
>> in this case.
> 
> And you'd then mean the caller to imply that the passed in (and now
> overwritten) count to describe how many entries got filled? That's
> not that nice an interface. I'd rather return the number of entries
> filled, and require the sizing variant (NULL handle) to be used to
> obtain the number of entries. After all if a caller _wants_ to handle
> a partial map, it doesn't really care how many further entries there
> are.

I just wanted to avoid two interface changes. IMO the caller knows the
buffer size he supplied and it is rather clear that e.g. E2BIG means
it has been filled completely.

And the assumption the caller doesn't care for the further entries is
not necessarily true: he might not care at the moment of the call, but
he will eventually care for them later when he is able to allocate an
appropriate sized buffer.

OTOH I'm not feeling strong in this case and you are the hypervisor
maintainer. Either solution is fine for me.


Juergen

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC PATCH] xen/x86: Increase xen_e820_map to E820_X_MAX possible entries Alex Thorlton <athorlton@sgi.com> - 2016-11-15 01:20 +0100
  Re: [RFC PATCH] xen/x86: Increase xen_e820_map to E820_X_MAX possible  entries Juergen Gross <jgross@suse.com> - 2016-11-15 07:40 +0100
    Re: [RFC PATCH] xen/x86: Increase xen_e820_map to E820_X_MAX  possible entries "Jan Beulich" <JBeulich@suse.com> - 2016-11-15 08:20 +0100
    Re: [RFC PATCH] xen/x86: Increase xen_e820_map to E820_X_MAX possible  entries Juergen Gross <jgross@suse.com> - 2016-11-15 08:40 +0100
      Re: [RFC PATCH] xen/x86: Increase xen_e820_map to E820_X_MAX  possible entries "Jan Beulich" <JBeulich@suse.com> - 2016-11-15 09:10 +0100
      Re: [RFC PATCH] xen/x86: Increase xen_e820_map to E820_X_MAX possible  entries Juergen Gross <jgross@suse.com> - 2016-11-15 09:50 +0100
        Re: [RFC PATCH] xen/x86: Increase xen_e820_map to E820_X_MAX  possible entries "Jan Beulich" <JBeulich@suse.com> - 2016-11-15 10:50 +0100
        Re: [RFC PATCH] xen/x86: Increase xen_e820_map to E820_X_MAX possible  entries Juergen Gross <jgross@suse.com> - 2016-11-15 11:00 +0100
          Re: [RFC PATCH] xen/x86: Increase xen_e820_map to E820_X_MAX  possible entries "Jan Beulich" <JBeulich@suse.com> - 2016-11-15 11:50 +0100
          Re: [RFC PATCH] xen/x86: Increase xen_e820_map to E820_X_MAX possible  entries Juergen Gross <jgross@suse.com> - 2016-11-15 12:10 +0100
            Re: [RFC PATCH] xen/x86: Increase xen_e820_map to E820_X_MAX  possible entries "Jan Beulich" <JBeulich@suse.com> - 2016-11-15 12:20 +0100
          Re: [RFC PATCH] xen/x86: Increase xen_e820_map to E820_X_MAX  possible entries Alex Thorlton <athorlton@sgi.com> - 2016-11-15 16:30 +0100
            Re: [RFC PATCH] xen/x86: Increase xen_e820_map to E820_X_MAX possible  entries Juergen Gross <jgross@suse.com> - 2016-11-16 07:10 +0100

csiph-web