[Xen-devel] [PATCH] x86/pv: Fix construction of 32bit dom0's

2019-02-06 Thread Andrew Cooper
dom0_construct_pv() has logic to transition dom0 into a compat domain when booting an ELF32 image. One aspect which is missing is the CPUID policy recalculation, meaning that a 32bit dom0 sees a 64bit policy, which differ by the Long Mode feature flag in particular. Another missing item is the x8

Re: [Xen-devel] [PATCH] x86/pv: Fix construction of 32bit dom0's

2019-02-07 Thread Jan Beulich
>>> On 06.02.19 at 21:41, wrote: > Slightly RFC: > > 1) I've not worked out exactly what the > > v->vcpu_info = (void *)&d->shared_info->compat.vcpu_info[0]; > >line is supposed to be doing and whether it is needed, but it doesn't >appear to matter. It is perhaps another redundant

Re: [Xen-devel] [PATCH] x86/pv: Fix construction of 32bit dom0's

2019-02-07 Thread Andrew Cooper
On 07/02/2019 12:58, Jan Beulich wrote: On 06.02.19 at 21:41, wrote: >> Slightly RFC: >> >> 1) I've not worked out exactly what the >> >> v->vcpu_info = (void *)&d->shared_info->compat.vcpu_info[0]; >> >>line is supposed to be doing and whether it is needed, but it doesn't >>appe

Re: [Xen-devel] [PATCH] x86/pv: Fix construction of 32bit dom0's

2019-02-07 Thread Juergen Gross
On 07/02/2019 14:29, Andrew Cooper wrote: > On 07/02/2019 12:58, Jan Beulich wrote: > On 06.02.19 at 21:41, wrote: >>> Slightly RFC: >>> >>> 1) I've not worked out exactly what the >>> >>> v->vcpu_info = (void *)&d->shared_info->compat.vcpu_info[0]; >>> >>>line is supposed to be doing

Re: [Xen-devel] [PATCH] x86/pv: Fix construction of 32bit dom0's

2019-02-07 Thread Jan Beulich
>>> On 07.02.19 at 14:29, wrote: > On 07/02/2019 12:58, Jan Beulich wrote: > On 06.02.19 at 21:41, wrote: >>> 2) The reported >>> >>> Dom0 alloc.: 3e80->3ec0 (240470 pages to be >>> allocated) >>> >>>line changes by 1 page because of the alloc_domheap_page(

Re: [Xen-devel] [PATCH] x86/pv: Fix construction of 32bit dom0's

2019-02-07 Thread Juergen Gross
On 07/02/2019 14:45, Jan Beulich wrote: On 07.02.19 at 14:29, wrote: >> On 07/02/2019 12:58, Jan Beulich wrote: >> On 06.02.19 at 21:41, wrote: 2) The reported Dom0 alloc.: 3e80->3ec0 (240470 pages to be allocated) line cha

Re: [Xen-devel] [PATCH] x86/pv: Fix construction of 32bit dom0's

2019-02-07 Thread Andrew Cooper
On 07/02/2019 13:56, Juergen Gross wrote: > On 07/02/2019 14:45, Jan Beulich wrote: >> > @@ -606,23 +598,14 @@ int __init dom0_construct_pv(struct domain *d, > { > maddr_to_page(mpt_alloc)->u.inuse.type_info = PGT_l4_page_table; > l4start = l4tab = __va(mpt_al

Re: [Xen-devel] [PATCH] x86/pv: Fix construction of 32bit dom0's

2019-02-13 Thread Wei Liu
On Thu, Feb 07, 2019 at 05:58:56AM -0700, Jan Beulich wrote: > >>> On 06.02.19 at 21:41, wrote: > > Slightly RFC: > > > > 1) I've not worked out exactly what the > > > > v->vcpu_info = (void *)&d->shared_info->compat.vcpu_info[0]; > > > >line is supposed to be doing and whether it is n

Re: [Xen-devel] [PATCH] x86/pv: Fix construction of 32bit dom0's

2019-02-14 Thread Jan Beulich
>>> On 13.02.19 at 19:07, wrote: > On Thu, Feb 07, 2019 at 05:58:56AM -0700, Jan Beulich wrote: >> >>> On 06.02.19 at 21:41, wrote: >> > Slightly RFC: >> > >> > 1) I've not worked out exactly what the >> > >> > v->vcpu_info = (void *)&d->shared_info->compat.vcpu_info[0]; >> > >> >line

Re: [Xen-devel] [PATCH] x86/pv: Fix construction of 32bit dom0's

2019-02-14 Thread Wei Liu
On Thu, Feb 14, 2019 at 01:11:49AM -0700, Jan Beulich wrote: > >>> On 13.02.19 at 19:07, wrote: > > On Thu, Feb 07, 2019 at 05:58:56AM -0700, Jan Beulich wrote: > >> >>> On 06.02.19 at 21:41, wrote: > >> > Slightly RFC: > >> > > >> > 1) I've not worked out exactly what the > >> > > >> > v-

Re: [Xen-devel] [PATCH] x86/pv: Fix construction of 32bit dom0's

2019-02-14 Thread Jan Beulich
>>> On 14.02.19 at 11:30, wrote: > On Thu, Feb 14, 2019 at 01:11:49AM -0700, Jan Beulich wrote: >> >>> On 13.02.19 at 19:07, wrote: >> > On Thu, Feb 07, 2019 at 05:58:56AM -0700, Jan Beulich wrote: >> >> >>> On 06.02.19 at 21:41, wrote: >> >> > Slightly RFC: >> >> > >> >> > 1) I've not worked o