Re: [PATCH 1/4] xen: Introduce non-broken hypercalls for the p2m pool size

2022-11-16 Thread Jan Beulich
On 16.11.2022 02:19, Stefano Stabellini wrote: > On Fri, 28 Oct 2022, George Dunlap wrote: >> On Thu, Oct 27, 2022 at 8:12 AM Jan Beulich wrote: >> On 26.10.2022 21:22, Andrew Cooper wrote: >> > On 26/10/2022 14:42, Jan Beulich wrote: >> >>   >> > paging isn't a great name. 

Re: [PATCH 1/4] xen: Introduce non-broken hypercalls for the p2m pool size

2022-11-15 Thread Stefano Stabellini
On Fri, 28 Oct 2022, George Dunlap wrote: > On Thu, Oct 27, 2022 at 8:12 AM Jan Beulich wrote: > On 26.10.2022 21:22, Andrew Cooper wrote: > > On 26/10/2022 14:42, Jan Beulich wrote: > >   > > paging isn't a great name.  While it's what we call the infrastructure > > in

Re: [PATCH 1/4] xen: Introduce non-broken hypercalls for the p2m pool size

2022-10-31 Thread George Dunlap
> On 31 Oct 2022, at 09:26, Jan Beulich wrote: > > On 28.10.2022 17:27, George Dunlap wrote: >> On Thu, Oct 27, 2022 at 8:12 AM Jan Beulich wrote: >> >>> On 26.10.2022 21:22, Andrew Cooper wrote: On 26/10/2022 14:42, Jan Beulich wrote: >>> >> >> paging isn't a great name. While

Re: [PATCH 1/4] xen: Introduce non-broken hypercalls for the p2m pool size

2022-10-31 Thread Jan Beulich
On 28.10.2022 17:27, George Dunlap wrote: > On Thu, Oct 27, 2022 at 8:12 AM Jan Beulich wrote: > >> On 26.10.2022 21:22, Andrew Cooper wrote: >>> On 26/10/2022 14:42, Jan Beulich wrote: >> > > >>> paging isn't a great name. While it's what we call the infrastructure >>> in x86, it has nothing

Re: [PATCH 1/4] xen: Introduce non-broken hypercalls for the p2m pool size

2022-10-28 Thread George Dunlap
On Thu, Oct 27, 2022 at 8:12 AM Jan Beulich wrote: > On 26.10.2022 21:22, Andrew Cooper wrote: > > On 26/10/2022 14:42, Jan Beulich wrote: > > > paging isn't a great name. While it's what we call the infrastructure > > in x86, it has nothing to do with paging things out to disk (the thing > >

Re: [PATCH 1/4] xen: Introduce non-broken hypercalls for the p2m pool size

2022-10-27 Thread Julien Grall
Hi Jan, On 27/10/2022 07:56, Jan Beulich wrote: On 26.10.2022 23:24, Julien Grall wrote: On 26/10/2022 20:22, Andrew Cooper wrote: --- a/xen/arch/x86/mm/hap/hap.c +++ b/xen/arch/x86/mm/hap/hap.c @@ -345,6 +345,16 @@ unsigned int hap_get_allocation(struct domain *d) + ((pg & ((1

Re: [PATCH 1/4] xen: Introduce non-broken hypercalls for the p2m pool size

2022-10-27 Thread Jan Beulich
On 26.10.2022 12:20, Andrew Cooper wrote: > +int arch_set_p2m_mempool_size(struct domain *d, uint64_t size) > +{ > +unsigned long pages = size >> PAGE_SHIFT; > +bool preempted = false; > +int rc; > + > +if ( is_pv_domain(d) ) > +return -EOPNOTSUPP; > + > +if ( size &

Re: [PATCH 1/4] xen: Introduce non-broken hypercalls for the p2m pool size

2022-10-27 Thread Jan Beulich
On 26.10.2022 21:22, Andrew Cooper wrote: > On 26/10/2022 14:42, Jan Beulich wrote: >> On 26.10.2022 12:20, Andrew Cooper wrote: >>> The existing XEN_DOMCTL_SHADOW_OP_{GET,SET}_ALLOCATION have problems: >>> >>> * All set_allocation() flavours have an overflow-before-widen bug when >>>

Re: [PATCH 1/4] xen: Introduce non-broken hypercalls for the p2m pool size

2022-10-27 Thread Jan Beulich
On 26.10.2022 23:24, Julien Grall wrote: > On 26/10/2022 20:22, Andrew Cooper wrote: --- a/xen/arch/x86/mm/hap/hap.c +++ b/xen/arch/x86/mm/hap/hap.c @@ -345,6 +345,16 @@ unsigned int hap_get_allocation(struct domain *d) + ((pg & ((1 << (20 - PAGE_SHIFT)) - 1)) ? 1

Re: [PATCH 1/4] xen: Introduce non-broken hypercalls for the p2m pool size

2022-10-26 Thread Julien Grall
Hi Andrew, On 26/10/2022 20:22, Andrew Cooper wrote: --- a/xen/arch/x86/mm/hap/hap.c +++ b/xen/arch/x86/mm/hap/hap.c @@ -345,6 +345,16 @@ unsigned int hap_get_allocation(struct domain *d) + ((pg & ((1 << (20 - PAGE_SHIFT)) - 1)) ? 1 : 0)); } +int

Re: [PATCH 1/4] xen: Introduce non-broken hypercalls for the p2m pool size

2022-10-26 Thread Andrew Cooper
On 26/10/2022 14:42, Jan Beulich wrote: > On 26.10.2022 12:20, Andrew Cooper wrote: >> The existing XEN_DOMCTL_SHADOW_OP_{GET,SET}_ALLOCATION have problems: >> >> * All set_allocation() flavours have an overflow-before-widen bug when >>calculating "sc->mb << (20 - PAGE_SHIFT)". >> * All

Re: [PATCH 1/4] xen: Introduce non-broken hypercalls for the p2m pool size

2022-10-26 Thread Jan Beulich
On 26.10.2022 12:20, Andrew Cooper wrote: > The existing XEN_DOMCTL_SHADOW_OP_{GET,SET}_ALLOCATION have problems: > > * All set_allocation() flavours have an overflow-before-widen bug when >calculating "sc->mb << (20 - PAGE_SHIFT)". > * All flavours have a granularity of of 1M. This was

[PATCH 1/4] xen: Introduce non-broken hypercalls for the p2m pool size

2022-10-26 Thread Andrew Cooper
The existing XEN_DOMCTL_SHADOW_OP_{GET,SET}_ALLOCATION have problems: * All set_allocation() flavours have an overflow-before-widen bug when calculating "sc->mb << (20 - PAGE_SHIFT)". * All flavours have a granularity of of 1M. This was tolerable when the size of the pool could only be