[Xen-devel] [PATCH v5 09/16] x86: add multiboot2 protocol support

2016-08-19 Thread Daniel Kiper
Add multiboot2 protocol support. Alter min memory limit handling as we now may not find it from either multiboot (v1) or multiboot2. This way we are laying the foundation for EFI + GRUB2 + Xen development. Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> --- v5 - suggestions

[Xen-devel] [PATCH v5 10/16] efi: create efi_enabled()

2016-08-19 Thread Daniel Kiper
EFI_BOOT, EFI_LOADER and EFI_RS features. EFI_BOOT is equal to old efi_enabled == 1. EFI_RS ease control on runtime services usage. EFI_LOADER tells that Xen was loaded directly from EFI as PE executable. Suggested-by: Jan Beulich <jbeul...@suse.com> Signed-off-by: Daniel Kiper <daniel.ki...@o

[Xen-devel] [PATCH v5 12/16] x86/efi: create new early memory allocator

2016-08-19 Thread Daniel Kiper
because it is quite simple and requires limited number of changes, especially in __start_xen(). Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> --- v4 - suggestions/fixes: - move from #2 solution to #2a solution, - improve commit message. --- xen/arch/x86/efi/efi-boot.h

[Xen-devel] [PATCH v5 11/16] efi: build xen.gz with EFI code

2016-08-19 Thread Daniel Kiper
This way we will have one Xen binary which can be loaded by three boot protocols: EFI native loader, multiboot (v1) and multiboot2. Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> Acked-by: Jan Beulich <jbeul...@suse.com> --- v5 - suggestions/fixes: - properly calculate efi sym

[Xen-devel] [PATCH v5 07/16] x86/boot: use %ecx instead of %eax

2016-08-19 Thread Daniel Kiper
Use %ecx instead of %eax to store low memory upper limit from EBDA. This way we do not wipe multiboot protocol identifier. It is needed in reloc() to differentiate between multiboot (v1) and multiboot2 protocol. Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> Reviewed-by: Andrew

Re: [Xen-devel] [PATCH 2/2] efi/boot: Don't free ebmalloc area at all

2017-02-28 Thread Daniel Kiper
On Tue, Feb 28, 2017 at 09:14:24AM -0700, Jan Beulich wrote: > >>> On 28.02.17 at 17:08, wrote: > > On 28/02/17 16:03, Jan Beulich wrote: > > On 28.02.17 at 16:20, wrote: > >>> Freeing part of the BSS back for general use proves to be

Re: [Xen-devel] [PATCH 2/2] efi/boot: Don't free ebmalloc area at all

2017-02-28 Thread Daniel Kiper
On Tue, Feb 28, 2017 at 04:08:35PM +, Andrew Cooper wrote: > On 28/02/17 16:03, Jan Beulich wrote: > On 28.02.17 at 16:20, wrote: > >> Freeing part of the BSS back for general use proves to be problematic. It > >> is > >> not accounted for in xen_in_range(),

Re: [Xen-devel] [xen-unstable bisection] complete test-amd64-i386-freebsd10-amd64

2017-02-28 Thread Daniel Kiper
Hi Roger, On Tue, Feb 28, 2017 at 09:20:05AM +, Roger Pau Monné wrote: > Hello, > > It seems that your changes are causing issues when booting a 32bit Dom0, it > seems there are several IOMMU faults that prevent Dom0 from booting at all. > AFAICT this only happens when using a 32bit Dom0. The

Re: [Xen-devel] [xen-unstable bisection] complete test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64-xsm

2017-03-02 Thread Daniel Kiper
xenbits.xen.org/xen.git > Bug introduced: c5b9805bc1f79319ae342c65fcc201a15a47 > Bug not present: b199c44afa3a0d18d0e968e78a590eb9e69e20ad > Last fail repro: http://logs.test-lab.xenproject.org/osstest/logs/106324/ > > > commit c5b9805bc1f79319ae342c65fcc201a15a47

Re: [Xen-devel] [PATCH 2/2] efi/boot: Don't free ebmalloc area at all

2017-02-28 Thread Daniel Kiper
On Tue, Feb 28, 2017 at 05:58:26PM +, Andrew Cooper wrote: > On 28/02/17 17:41, Daniel Kiper wrote: > > On Tue, Feb 28, 2017 at 04:08:35PM +, Andrew Cooper wrote: > >> On 28/02/17 16:03, Jan Beulich wrote: > >>>>>> On 28.02.17 at 16:20, <andrew

Re: [Xen-devel] [PATCH 2/2] efi/boot: Don't free ebmalloc area at all

2017-02-28 Thread Daniel Kiper
On Tue, Feb 28, 2017 at 10:24:36AM -0700, Jan Beulich wrote: > >>> On 28.02.17 at 18:09, wrote: > > On Tue, Feb 28, 2017 at 09:14:24AM -0700, Jan Beulich wrote: > >> >>> On 28.02.17 at 17:08, wrote: > >> > On 28/02/17 16:03, Jan Beulich wrote:

Re: [Xen-devel] [PATCH 2/2] efi/boot: Don't free ebmalloc area at all

2017-03-01 Thread Daniel Kiper
On Wed, Mar 01, 2017 at 12:48:26AM -0700, Jan Beulich wrote: > >>> On 28.02.17 at 19:45, wrote: > > On Tue, Feb 28, 2017 at 10:24:36AM -0700, Jan Beulich wrote: > >> >>> On 28.02.17 at 18:09, wrote: > >> > On Tue, Feb 28, 2017 at 09:14:24AM

Re: [Xen-devel] [PATCH 2/2] efi/boot: Don't free ebmalloc area at all

2017-03-01 Thread Daniel Kiper
On Wed, Mar 01, 2017 at 01:02:55AM -0700, Jan Beulich wrote: > >>> On 28.02.17 at 20:09, <andrew.coop...@citrix.com> wrote: > > On 28/02/17 19:01, Daniel Kiper wrote: > >> Looking at this I do not have a better idea for fix off the top of my head. > >

Re: [Xen-devel] [PATCH 2/2] efi/boot: Don't free ebmalloc area at all

2017-03-01 Thread Daniel Kiper
On Wed, Mar 01, 2017 at 01:47:21AM -0700, Jan Beulich wrote: > >>> On 01.03.17 at 09:20, wrote: [...] > > UEFI ver. 2.6, p. 154: In general, UEFI OS loaders and UEFI applications > > should > > allocate memory (and pool) of type EfiLoaderData. UEFI boot service drivers

Re: [Xen-devel] [PATCH 2/2] efi/boot: Don't free ebmalloc area at all

2017-03-01 Thread Daniel Kiper
On Wed, Mar 01, 2017 at 02:08:17AM -0700, Jan Beulich wrote: > >>> On 01.03.17 at 10:00, wrote: > > On Wed, Mar 01, 2017 at 01:02:55AM -0700, Jan Beulich wrote: [...] > >> suppress the freeing of the used part of it. The other option is to put > >> a section along the

Re: [Xen-devel] [PATCH v16 5/9] x86: change default load address from 1 MiB to 2 MiB

2017-03-01 Thread Daniel Kiper
On Wed, Mar 01, 2017 at 02:05:39AM -0700, Jan Beulich wrote: > >>> On 21.02.17 at 20:19, wrote: > > Subsequent patches introducing relocatable early boot code play with > > page tables using 2 MiB huge pages. If load address is not aligned at > > 2 MiB then code touching

Re: [Xen-devel] [PATCH v16 5/9] x86: change default load address from 1 MiB to 2 MiB

2017-03-01 Thread Daniel Kiper
On Wed, Mar 01, 2017 at 03:34:47AM -0700, Jan Beulich wrote: > >>> On 01.03.17 at 11:13, wrote: > > On Wed, Mar 01, 2017 at 02:05:39AM -0700, Jan Beulich wrote: > >> >>> On 21.02.17 at 20:19, wrote: > >> > Subsequent patches introducing

Re: [Xen-devel] [PATCH v5 15/16] x86: make Xen early boot code relocatable

2016-08-31 Thread Daniel Kiper
On Wed, Aug 31, 2016 at 09:46:31AM -0600, Jan Beulich wrote: > >>> On 31.08.16 at 16:59, wrote: > > On Thu, Aug 25, 2016 at 08:41:39AM -0600, Jan Beulich wrote: > >> >>> On 20.08.16 at 00:43, wrote: [...] > >> > --- a/xen/arch/x86/boot/head.S >

Re: [Xen-devel] [PATCH v5 09/16] x86: add multiboot2 protocol support

2016-08-31 Thread Daniel Kiper
On Wed, Aug 31, 2016 at 09:18:39PM +0100, Andrew Cooper wrote: > On 19/08/2016 23:43, Daniel Kiper wrote: > > @@ -106,3 +121,122 @@ multiboot_info_t __stdcall *reloc(u32 mbi_in, u32 > > trampoline) > > > > return mbi_out; > > } > > + > >

Re: [Xen-devel] [PATCH v5 06/16] x86/boot/reloc: create generic alloc and copy functions

2016-08-31 Thread Daniel Kiper
> >> > On Thu, Aug 25, 2016 at 05:34:31AM -0600, Jan Beulich wrote: > >> >> >>> On 20.08.16 at 00:43, <daniel.ki...@oracle.com> wrote: > >> >> > Create generic alloc and copy functions. We need > >> >> > separate tools fo

Re: [Xen-devel] [PATCH v5 14/16] x86/boot: implement early command line parser in C

2016-08-31 Thread Daniel Kiper
On Wed, Aug 31, 2016 at 07:01:10AM -0600, Jan Beulich wrote: > >>> On 30.08.16 at 21:58, wrote: > > On Thu, Aug 25, 2016 at 07:27:21AM -0600, Jan Beulich wrote: > >> >>> On 20.08.16 at 00:43, wrote: [...] > >> > +static unsigned int

Re: [Xen-devel] [PATCH v5 13/16] x86: add multiboot2 protocol support for EFI platforms

2016-09-01 Thread Daniel Kiper
On Thu, Sep 01, 2016 at 01:40:11AM -0600, Jan Beulich wrote: > >>> On 31.08.16 at 19:07, wrote: > > On Wed, Aug 31, 2016 at 06:49:51AM -0600, Jan Beulich wrote: > >> >>> On 30.08.16 at 21:32, wrote: > >> > On Thu, Aug 25, 2016 at 06:59:54AM

Re: [Xen-devel] [PATCH v6 0/4] arm64, xen: add xen_boot support into grup-mkconfig

2016-09-01 Thread Daniel Kiper
Hey Julien, On Thu, Sep 01, 2016 at 01:47:05PM +0100, Julien Grall wrote: > Hi Daniel, > > I have heard you became co-maintainer of GRUB. Congratulations for that :). Thanks a lot! > We have a couple series (this series and [1]) to allow grub booting > Xen on ARM that have been waiting on the

Re: [Xen-devel] [PATCH v5 15/16] x86: make Xen early boot code relocatable

2016-09-01 Thread Daniel Kiper
On Thu, Sep 01, 2016 at 01:46:24AM -0600, Jan Beulich wrote: > >>> On 31.08.16 at 22:50, wrote: > > On Wed, Aug 31, 2016 at 09:46:31AM -0600, Jan Beulich wrote: > >> >>> On 31.08.16 at 16:59, wrote: > >> > On Thu, Aug 25, 2016 at 08:41:39AM

Re: [Xen-devel] [PATCH v5 14/16] x86/boot: implement early command line parser in C

2016-09-01 Thread Daniel Kiper
On Thu, Sep 01, 2016 at 01:41:26AM -0600, Jan Beulich wrote: > >>> On 31.08.16 at 21:31, wrote: > > On Wed, Aug 31, 2016 at 07:01:10AM -0600, Jan Beulich wrote: > >> >>> On 30.08.16 at 21:58, wrote: > >> > On Thu, Aug 25, 2016 at 07:27:21AM

Re: [Xen-devel] [PATCH v5 13/16] x86: add multiboot2 protocol support for EFI platforms

2016-08-30 Thread Daniel Kiper
On Thu, Aug 25, 2016 at 06:59:54AM -0600, Jan Beulich wrote: > >>> On 20.08.16 at 00:43, wrote: > > @@ -100,19 +107,45 @@ multiboot2_header_start: > > gdt_boot_descr: > > .word 6*8-1 > > .long sym_phys(trampoline_gdt) > > +.long 0 /*

Re: [Xen-devel] [PATCH v5 14/16] x86/boot: implement early command line parser in C

2016-08-30 Thread Daniel Kiper
On Thu, Aug 25, 2016 at 07:27:21AM -0600, Jan Beulich wrote: > >>> On 20.08.16 at 00:43, wrote: > > +#define NULL ((void *)0) > > + > > +#define __packed __attribute__((__packed__)) > > +#define __stdcall __attribute__((__stdcall__)) > > + > > +#define max(x,y)

Re: [Xen-devel] [PATCH v5 15/16] x86: make Xen early boot code relocatable

2016-09-02 Thread Daniel Kiper
On Fri, Sep 02, 2016 at 12:58:14AM -0600, Jan Beulich wrote: > >>> On 01.09.16 at 23:19, wrote: > > On Thu, Sep 01, 2016 at 01:46:24AM -0600, Jan Beulich wrote: > >> >>> On 31.08.16 at 22:50, wrote: > >> > On Wed, Aug 31, 2016 at 09:46:31AM

Re: [Xen-devel] [PATCH v5 12/16] x86/efi: create new early memory allocator

2016-09-07 Thread Daniel Kiper
On Mon, Sep 05, 2016 at 06:33:57AM -0600, Jan Beulich wrote: > >>> On 20.08.16 at 00:43, wrote: [...] > > +static char __initdata *ebmalloc_free = NULL; > > + > > +/* EFI boot allocator. */ > > +static void __init *ebmalloc(size_t size) > > +{ > > +void *ptr; > > +

Re: [Xen-devel] [PATCH v5 12/16] x86/efi: create new early memory allocator

2016-09-08 Thread Daniel Kiper
On Wed, Sep 07, 2016 at 08:01:31AM -0600, Jan Beulich wrote: > >>> On 07.09.16 at 14:05, wrote: > > On Mon, Sep 05, 2016 at 06:33:57AM -0600, Jan Beulich wrote: > >> >>> On 20.08.16 at 00:43, wrote: > >> > +static char __initdata *ebmalloc_free =

Re: [Xen-devel] [PATCH v5 06/16] x86/boot/reloc: create generic alloc and copy functions

2016-08-30 Thread Daniel Kiper
On Thu, Aug 25, 2016 at 05:34:31AM -0600, Jan Beulich wrote: > >>> On 20.08.16 at 00:43, <daniel.ki...@oracle.com> wrote: > > Create generic alloc and copy functions. We need > > separate tools for memory allocation and copy to > > provide multiboot2 protocol su

Re: [Xen-devel] [PATCH v5 00/16] x86: multiboot2 protocol support

2016-08-30 Thread Daniel Kiper
On Mon, Aug 22, 2016 at 04:10:04AM -0600, Jan Beulich wrote: > >>> On 20.08.16 at 00:43, wrote: > > The final goal is xen.efi binary file which could be loaded by EFI > > loader, multiboot (v1) protocol (only on legacy BIOS platforms) and > > multiboot2 protocol. This way

Re: [Xen-devel] [PATCH v5 09/16] x86: add multiboot2 protocol support

2016-08-30 Thread Daniel Kiper
On Thu, Aug 25, 2016 at 05:50:04AM -0600, Jan Beulich wrote: > >>> On 20.08.16 at 00:43, wrote: > > +case MULTIBOOT2_TAG_TYPE_MMAP: > > +if ( get_mb2_data(tag, mmap, entry_size) < sizeof(*mmap_src) ) > > +break; > > + > > +

Re: [Xen-devel] [PATCH v5 02/16] x86/boot: remove multiboot1_header_end from symbol table

2016-08-30 Thread Daniel Kiper
On Thu, Aug 25, 2016 at 05:21:24AM -0600, Jan Beulich wrote: > >>> On 20.08.16 at 00:43, <daniel.ki...@oracle.com> wrote: > > Its visibility is not needed and just pollute symbol table. > > > > Suggested-by: Jan Beulich <jbeul...@suse.com> > > Sign

Re: [Xen-devel] [PATCH v5 10/16] efi: create efi_enabled()

2016-08-30 Thread Daniel Kiper
On Thu, Aug 25, 2016 at 06:16:35AM -0600, Jan Beulich wrote: > >>> On 20.08.16 at 00:43, wrote: > > --- a/xen/arch/x86/efi/stub.c > > +++ b/xen/arch/x86/efi/stub.c > > @@ -4,9 +4,10 @@ > > #include > > #include > > > > -#ifndef efi_enabled > > -const bool_t

Re: [Xen-devel] [PATCH v5 15/16] x86: make Xen early boot code relocatable

2016-08-31 Thread Daniel Kiper
On Thu, Aug 25, 2016 at 08:41:39AM -0600, Jan Beulich wrote: > >>> On 20.08.16 at 00:43, wrote: > > Every multiboot protocol (regardless of version) compatible image must > > specify its load address (in ELF or multiboot header). Multiboot protocol > > compatible loader

Re: [Xen-devel] [PATCH v5 00/16] x86: multiboot2 protocol support

2016-08-31 Thread Daniel Kiper
On Tue, Aug 30, 2016 at 09:09:50AM -0600, Jan Beulich wrote: > >>> On 30.08.16 at 16:15, wrote: > > On Mon, Aug 22, 2016 at 04:10:04AM -0600, Jan Beulich wrote: > >> >>> On 20.08.16 at 00:43, wrote: > >> > The final goal is xen.efi binary file

Re: [Xen-devel] [PATCH v5 06/16] x86/boot/reloc: create generic alloc and copy functions

2016-08-31 Thread Daniel Kiper
: > >> > Create generic alloc and copy functions. We need > >> > separate tools for memory allocation and copy to > >> > provide multiboot2 protocol support. > >> > > >> > Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> >

Re: [Xen-devel] [PATCH v5 09/16] x86: add multiboot2 protocol support

2016-08-31 Thread Daniel Kiper
On Tue, Aug 30, 2016 at 09:14:28AM -0600, Jan Beulich wrote: > >>> On 30.08.16 at 16:41, wrote: > > On Thu, Aug 25, 2016 at 05:50:04AM -0600, Jan Beulich wrote: > >> >>> On 20.08.16 at 00:43, wrote: > >> > +case MULTIBOOT2_TAG_TYPE_MMAP:

Re: [Xen-devel] [PATCH v5 13/16] x86: add multiboot2 protocol support for EFI platforms

2016-08-31 Thread Daniel Kiper
On Wed, Aug 31, 2016 at 06:49:51AM -0600, Jan Beulich wrote: > >>> On 30.08.16 at 21:32, wrote: > > On Thu, Aug 25, 2016 at 06:59:54AM -0600, Jan Beulich wrote: > >> >>> On 20.08.16 at 00:43, wrote: [...] > >> > +paddr_t __init

[Xen-devel] Fixes for low memory allocation machinery in early boot code

2016-09-14 Thread Daniel Kiper
Hey, So, as I promised in other thread I am sending more info about my investigation related to low memory allocation for trampoline and other early boot data. Starting from the beginning it looks that there are "soft" limits enforced in BIOS early boot code looking for usable low memory region.

[Xen-devel] [PATCH v6 04/15] x86: add multiboot2 protocol support

2016-09-12 Thread Daniel Kiper
Add multiboot2 protocol support. Alter min memory limit handling as we now may not find it from either multiboot (v1) or multiboot2. This way we are laying the foundation for EFI + GRUB2 + Xen development. Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> --- v6 - suggestions

[Xen-devel] [PATCH v6 10/15] x86/boot: implement early command line parser in C

2016-09-12 Thread Daniel Kiper
-by: Andrew Cooper <andrew.coop...@citrix.com> Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> --- v6 - suggestions/fixes: - put common cmdline.c and reloc.c definitions into defs.h header (suggested by Jan Beulich), - use xen/include/xen/stdbool.h and bo

[Xen-devel] [PATCH v6 01/15] x86: properly calculate ELF end of image address

2016-09-12 Thread Daniel Kiper
e, it have to be changed to something more reliable. So, let's take ELF end of image address by reading _end symbol address from nm output. Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> --- xen/arch/x86/Makefile |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --gi

[Xen-devel] [PATCH v6 00/15] x86: multiboot2 protocol support

2016-09-12 Thread Daniel Kiper
insertions(+), 568 deletions(-) Daniel Kiper (15): x86: properly calculate ELF end of image address x86/boot/reloc: create generic alloc and copy functions x86/boot/reloc: rename some variables and rearrange code a bit x86: add multiboot2 protocol support efi: create

[Xen-devel] [PATCH v6 05/15] efi: create efi_enabled()

2016-09-12 Thread Daniel Kiper
EFI_BOOT, EFI_LOADER and EFI_RS features. EFI_BOOT is equal to old efi_enabled == 1. EFI_RS ease control on runtime services usage. EFI_LOADER tells that Xen was loaded directly from EFI as PE executable. Suggested-by: Jan Beulich <jbeul...@suse.com> Signed-off-by: Daniel Kiper <daniel.ki...@o

[Xen-devel] [PATCH v6 02/15] x86/boot/reloc: create generic alloc and copy functions

2016-09-12 Thread Daniel Kiper
Create generic alloc and copy functions. We need separate tools for memory allocation and copy to provide multiboot2 protocol support. Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> --- v6 - suggestions/fixes: - reduce number of casts (suggested by Andrew Cooper and Jan B

[Xen-devel] [PATCH v6 03/15] x86/boot/reloc: rename some variables and rearrange code a bit

2016-09-12 Thread Daniel Kiper
Replace mbi with mbi_out and mbi_old with mbi_in and rearrange code a bit to make it more readable. Additionally, this way multiboot (v1) protocol implementation and future multiboot2 protocol implementation will use the same variable naming convention. Signed-off-by: Daniel Kiper <daniel

[Xen-devel] [PATCH v6 07/15] efi: build xen.gz with EFI code

2016-09-12 Thread Daniel Kiper
This way we will have one Xen binary which can be loaded by three boot protocols: EFI native loader, multiboot (v1) and multiboot2. Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> Acked-by: Jan Beulich <jbeul...@suse.com> --- v6 - suggestions/fixes: - improve efi_enabled() ch

[Xen-devel] [PATCH v6 06/15] x86: allow EFI reboot method neither on EFI platforms...

2016-09-12 Thread Daniel Kiper
..nor EFI platforms with runtime services enabled. Suggested-by: Jan Beulich <jbeul...@suse.com> Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> --- v6 - suggestions/fixes: - move this commit behind "efi: create efi_enabled()" commit (suggested by Jan Beuli

[Xen-devel] [PATCH v6 09/15] x86: add multiboot2 protocol support for EFI platforms

2016-09-12 Thread Daniel Kiper
This way Xen can be loaded on EFI platforms using GRUB2 and other boot loaders which support multiboot2 protocol. Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> --- v6 - suggestions/fixes: - improve label names in assembly error printing code (suggested by Jan B

[Xen-devel] [PATCH v6 15/15] x86: add multiboot2 protocol support for relocatable images

2016-09-12 Thread Daniel Kiper
Add multiboot2 protocol support for relocatable images. Only GRUB2 with "multiboot2: Add support for relocatable images" patch understands that feature. Older multiboot protocol (regardless of version) compatible loaders ignore it and everything works as usual. Signed-off-by: Da

[Xen-devel] [PATCH v6 13/15] x86: make Xen early boot code relocatable

2016-09-12 Thread Daniel Kiper
not always possible to properly and efficiently initialize %fs. Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> --- v6 - suggestions/fixes: - leave static mapping of first 16 MiB in l2_identmap as is (suggested by Jan Beulich), - use xen_phys_start instead of xen_im

[Xen-devel] [PATCH v6 14/15] x86/boot: rename sym_phys() to sym_offs()

2016-09-12 Thread Daniel Kiper
This way macro name better describes its function. There is no functional change. Suggested-by: Jan Beulich <jbeul...@suse.com> Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> --- xen/arch/x86/boot/head.S | 40 xen/a

[Xen-devel] [PATCH v6 08/15] x86/efi: create new early memory allocator

2016-09-12 Thread Daniel Kiper
because it is quite simple and requires limited number of changes, especially in __start_xen(). Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> --- v6 - suggestions/fixes: - optimize ebmalloc allocator, - move ebmalloc machinery to xen/common/efi/boot.c (suggested by Jan B

[Xen-devel] [PATCH v6 12/15] x86/setup: use XEN_IMG_OFFSET instead of...

2016-09-12 Thread Daniel Kiper
..calculating its value during runtime. Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> --- xen/arch/x86/setup.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index f19af6e..ca1a97a 100644 --- a/xen/arch/x86/s

Re: [Xen-devel] Xen 4.8 Development Update

2016-09-12 Thread Daniel Kiper
On Wed, Aug 31, 2016 at 09:30:46AM +0100, Wei Liu wrote: [...] > * Boot Xen on EFI platforms using GRUB2 (multiboot2 protocol) > - Daniel Kiper I have just sent v6. Daniel ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.x

[Xen-devel] [PATCH v7 11/14] x86/setup: use XEN_IMG_OFFSET instead of...

2016-09-23 Thread Daniel Kiper
..calculating its value during runtime. Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> Acked-by: Jan Beulich <jbeul...@suse.com> --- xen/arch/x86/setup.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c i

[Xen-devel] [PATCH RFC v7 07/14] efi: create new early memory allocator

2016-09-23 Thread Daniel Kiper
because it is quite simple and requires limited number of changes, especially in __start_xen(). New allocator is quite generic and can be used on ARM platforms too. So, let's enable most of its machinery on them. Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> --- v7 - suggestions

[Xen-devel] [PATCH v7 06/14] efi: build xen.gz with EFI code

2016-09-23 Thread Daniel Kiper
This way we will have one Xen binary which can be loaded by three boot protocols: EFI native loader, multiboot (v1) and multiboot2. Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> Acked-by: Jan Beulich <jbeul...@suse.com> --- v6 - suggestions/fixes: - improve efi_enabled() ch

[Xen-devel] [PATCH v7 12/14] x86: make Xen early boot code relocatable

2016-09-23 Thread Daniel Kiper
not always possible to properly and efficiently initialize %fs. Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> --- v6 - suggestions/fixes: - leave static mapping of first 16 MiB in l2_identmap as is (suggested by Jan Beulich), - use xen_phys_start instead of xen_im

[Xen-devel] [PATCH v7 09/14] x86/boot: implement early command line parser in C

2016-09-23 Thread Daniel Kiper
-by: Andrew Cooper <andrew.coop...@citrix.com> Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> --- v7 - suggestions/fixes: - add min() macro (suggested by Jan Beulich), - add padding to early_boot_opts_t in more standard way (suggested by Jan Beulich), - sim

[Xen-devel] [PATCH v7 00/14] x86: multiboot2 protocol support

2016-09-23 Thread Daniel Kiper
|2 +- xen/include/xen/efi.h |9 +- xen/include/xen/multiboot2.h | 182 34 files changed, 1522 insertions(+), 540 deletions(-) Daniel Kiper (14): x86: move xen ELF end of image to 16 MiB x86: properly calculate xen ELF end

[Xen-devel] [PATCH v7 03/14] x86: add multiboot2 protocol support

2016-09-23 Thread Daniel Kiper
Add multiboot2 protocol support. Alter min memory limit handling as we now may not find it from either multiboot (v1) or multiboot2. This way we are laying the foundation for EFI + GRUB2 + Xen development. Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> --- v7 - suggestions

[Xen-devel] [PATCH v7 13/14] x86/boot: rename sym_phys() to sym_offs()

2016-09-23 Thread Daniel Kiper
This way macro name better describes its function. There is no functional change. Suggested-by: Jan Beulich <jbeul...@suse.com> Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> --- xen/arch/x86/boot/head.S | 40 xen/a

[Xen-devel] [PATCH v7 02/14] x86: properly calculate xen ELF end of image address

2016-09-23 Thread Daniel Kiper
ecause there is no check which symbol address is used to calculate end of image address. So, let's fix it and take ELF end of image address by reading __end_of_image__ symbol address from nm output. This way xen ELF image build process is not prone to changes in order of nm output. Signed-off-by: Daniel

[Xen-devel] [PATCH v7 10/14] x86: change default load address from 1 MiB to 2 MiB

2016-09-23 Thread Daniel Kiper
load address from 1 MiB to 2 MiB. This way page table code will be nice and easy. Hence, there is a chance that it will be less error prone too... :-))) Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> Acked-by: Jan Beulich <jbeul...@suse.com> --- v7 - suggestions/fixes: - mi

[Xen-devel] [PATCH v7 01/14] x86: move xen ELF end of image to 16 MiB

2016-09-23 Thread Daniel Kiper
. Then it (bootloader) would not be able to put in this place anything else because from its POV simply this memory region will be allocated and used. This patch does not change xen ELF file size. It changes memory size which should be allocated for the image during load. Signed-off-by: Daniel Kiper

[Xen-devel] [PATCH v7 08/14] x86: add multiboot2 protocol support for EFI platforms

2016-09-23 Thread Daniel Kiper
This way Xen can be loaded on EFI platforms using GRUB2 and other boot loaders which support multiboot2 protocol. Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> Acked-by: Jan Beulich <jbeul...@suse.com> --- v7 - suggestions/fixes: - do not allocate twice memory for trampolin

[Xen-devel] [PATCH v7 04/14] efi: create efi_enabled()

2016-09-23 Thread Daniel Kiper
EFI_BOOT, EFI_LOADER and EFI_RS features. EFI_BOOT is equal to old efi_enabled == 1. EFI_RS ease control on runtime services usage. EFI_LOADER tells that Xen was loaded directly from EFI as PE executable. Suggested-by: Jan Beulich <jbeul...@suse.com> Signed-off-by: Daniel Kiper <daniel.ki...@o

[Xen-devel] [PATCH v7 14/14] x86: add multiboot2 protocol support for relocatable images

2016-09-23 Thread Daniel Kiper
Add multiboot2 protocol support for relocatable images. Only GRUB2 with "multiboot2: Add support for relocatable images" patch understands that feature. Older multiboot protocol (regardless of version) compatible loaders ignore it and everything works as usual. Signed-off-by: Da

[Xen-devel] [PATCH v7 05/14] x86: allow EFI reboot method neither on EFI platforms...

2016-09-23 Thread Daniel Kiper
..nor EFI platforms with runtime services enabled. Suggested-by: Jan Beulich <jbeul...@suse.com> Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> Acked-by: Jan Beulich <jbeul...@suse.com> --- v6 - suggestions/fixes: - move this commit behind "efi: creat

Re: [Xen-devel] [PATCH v9 06/13] efi: create new early memory allocator

2016-09-30 Thread Daniel Kiper
On Fri, Sep 30, 2016 at 03:46:54AM -0600, Jan Beulich wrote: > >>> On 29.09.16 at 23:42, wrote: > > +#else > > +static void __init free_ebmalloc_unused_mem(void) > > +{ > > +} > > +#endif > > Did you build test this for ARM? The function ought to be unused, > as ...

[Xen-devel] [PATCH v9 06/13] efi: create new early memory allocator

2016-09-29 Thread Daniel Kiper
because it is quite simple and requires limited number of changes, especially in __start_xen(). New allocator is quite generic and can be used on ARM platforms too. Though it is not enabled on ARM yet due to lack of some prereq. List of them is placed before ebmalloc code. Signed-off-by: Daniel

[Xen-devel] [PATCH v9 01/13] x86: add multiboot2 protocol support

2016-09-29 Thread Daniel Kiper
Add multiboot2 protocol support. Alter min memory limit handling as we now may not find it from either multiboot (v1) or multiboot2. This way we are laying the foundation for EFI + GRUB2 + Xen development. Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> Reviewed-by: Jan Beulich

[Xen-devel] [PATCH v9 07/13] x86: add multiboot2 protocol support for EFI platforms

2016-09-29 Thread Daniel Kiper
This way Xen can be loaded on EFI platforms using GRUB2 and other boot loaders which support multiboot2 protocol. Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> --- v9 - suggestions/fixes: - use .L labels instead of numeric ones in multiboot2 data scanning loops (suggested

[Xen-devel] [PATCH v9 08/13] x86/boot: implement early command line parser in C

2016-09-29 Thread Daniel Kiper
-by: Andrew Cooper <andrew.coop...@citrix.com> Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> Acked-by: Jan Beulich <jbeul...@suse.com> --- v7 - suggestions/fixes: - add min() macro (suggested by Jan Beulich), - add padding to early_boot_opts_t in

[Xen-devel] [PATCH v9 13/13] x86: add multiboot2 protocol support for relocatable images

2016-09-29 Thread Daniel Kiper
Add multiboot2 protocol support for relocatable images. Only GRUB2 with "multiboot2: Add support for relocatable images" patch understands that feature. Older multiboot protocol (regardless of version) compatible loaders ignore it and everything works as usual. Signed-off-by: Da

[Xen-devel] [PATCH v9 12/13] x86/boot: rename sym_phys() to sym_offs()

2016-09-29 Thread Daniel Kiper
-by: Jan Beulich <jbeul...@suse.com> Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> Acked-by: Jan Beulich <jbeul...@suse.com> --- v8 - suggestions/fixes: - improve commit message (suggested by Jan Beulich). --- xen/arch/x86/boot/h

[Xen-devel] [PATCH v9 09/13] x86: change default load address from 1 MiB to 2 MiB

2016-09-29 Thread Daniel Kiper
load address from 1 MiB to 2 MiB. This way page table code will be nice and easy. Hence, there is a chance that it will be less error prone too... :-))) Additionally, drop first 2 MiB mapping from Xen image mapping. It is no longer needed. Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com>

[Xen-devel] [PATCH v9 11/13] x86: make Xen early boot code relocatable

2016-09-29 Thread Daniel Kiper
not always possible to properly and efficiently initialize %fs. Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> --- v8 - suggestions/fixes: - use shld instead of mov and shr in BOOT_FS segment descriptor base address initialization (suggested by Jan Beulich), - simpli

[Xen-devel] [PATCH v9 03/13] x86: allow EFI reboot method neither on EFI platforms...

2016-09-29 Thread Daniel Kiper
..nor EFI platforms with runtime services enabled. Suggested-by: Jan Beulich <jbeul...@suse.com> Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> Acked-by: Jan Beulich <jbeul...@suse.com> --- v6 - suggestions/fixes: - move this commit behind "efi: creat

[Xen-devel] [PATCH v9 02/13] efi: create efi_enabled()

2016-09-29 Thread Daniel Kiper
EFI_BOOT, EFI_LOADER and EFI_RS features. EFI_BOOT is equal to old efi_enabled == 1. EFI_RS ease control on runtime services usage. EFI_LOADER tells that Xen was loaded directly from EFI as PE executable. Suggested-by: Jan Beulich <jbeul...@suse.com> Signed-off-by: Daniel Kiper <daniel.ki...@o

[Xen-devel] [PATCH v9 00/13] x86: multiboot2 protocol support

2016-09-29 Thread Daniel Kiper
33 files changed, 1528 insertions(+), 539 deletions(-) Daniel Kiper (13): x86: add multiboot2 protocol support efi: create efi_enabled() x86: allow EFI reboot method neither on EFI platforms... x86: properly calculate xen ELF end of image address efi: build xen.gz

[Xen-devel] [PATCH v9 04/13] x86: properly calculate xen ELF end of image address

2016-09-29 Thread Daniel Kiper
take ELF end of image address by reading __2M_rwdata_end symbol address from nm output. This way xen ELF image build process is not prone to changes in order of nm output. Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> --- v9 - suggestions/fixes: - use __2M_rwdata_end symbol instead

[Xen-devel] [PATCH v9 05/13] efi: build xen.gz with EFI code

2016-09-29 Thread Daniel Kiper
This way we will have one Xen binary which can be loaded by three boot protocols: EFI native loader, multiboot (v1) and multiboot2. Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> Acked-by: Jan Beulich <jbeul...@suse.com> --- v6 - suggestions/fixes: - improve efi_enabled() ch

[Xen-devel] [PATCH v9 10/13] x86/setup: use XEN_IMG_OFFSET instead of...

2016-09-29 Thread Daniel Kiper
..calculating its value during runtime. Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> Acked-by: Jan Beulich <jbeul...@suse.com> --- xen/arch/x86/setup.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c i

Re: [Xen-devel] [PATCH v9 06/13] efi: create new early memory allocator

2016-10-05 Thread Daniel Kiper
On Fri, Sep 30, 2016 at 03:46:54AM -0600, Jan Beulich wrote: > >>> On 29.09.16 at 23:42, wrote: > > +#else > > +static void __init free_ebmalloc_unused_mem(void) > > +{ > > +} > > +#endif > > Did you build test this for ARM? The function ought to be unused, > as ... > > >

Re: [Xen-devel] [Xen-users] xl info displays less ram than the total available

2016-10-06 Thread Daniel Kiper
On Thu, Oct 06, 2016 at 02:58:57PM +0200, bla...@riseup.net wrote: [...] > multiboot /xen.gz > echo'Loading Xen with linux-grsec...' > module /vmlinuz-linux root=/dev/mapper/leonovo-rootvol rw > cryptdevice=UUID=02bbde36-5fda-478f-a54f-b6f495e24961:leonovo >

Re: [Xen-devel] [PATCH v6 04/15] x86: add multiboot2 protocol support

2016-09-21 Thread Daniel Kiper
On Mon, Sep 19, 2016 at 05:42:36AM -0600, Jan Beulich wrote: > >>> On 12.09.16 at 22:18, wrote: [...] > > +case MULTIBOOT2_TAG_TYPE_MODULE: > > +if ( mod_idx >= mbi_out->mods_count ) > > +break; > > + > > +

Re: [Xen-devel] [PATCH v6 01/15] x86: properly calculate ELF end of image address

2016-09-19 Thread Daniel Kiper
On Fri, Sep 16, 2016 at 04:43:21PM -0400, Konrad Rzeszutek Wilk wrote: > On Mon, Sep 12, 2016 at 10:18:16PM +0200, Daniel Kiper wrote: > > Currently ELF end of image address is calculated using first line from > > "nm -nr xen/xen-syms" output. However, today usually it c

Re: [Xen-devel] [PATCH v6 10/15] x86/boot: implement early command line parser in C

2016-09-19 Thread Daniel Kiper
On Mon, Sep 19, 2016 at 06:47:50AM -0600, Jan Beulich wrote: > >>> On 12.09.16 at 22:18, wrote: [...] > > --- a/xen/arch/x86/boot/trampoline.S > > +++ b/xen/arch/x86/boot/trampoline.S > > @@ -220,8 +220,22 @@ trampoline_boot_cpu_entry: > > /* Jump to the common

Re: [Xen-devel] [PATCH v6 09/15] x86: add multiboot2 protocol support for EFI platforms

2016-09-19 Thread Daniel Kiper
On Mon, Sep 19, 2016 at 06:29:55AM -0600, Jan Beulich wrote: > >>> On 12.09.16 at 22:18, wrote: > > --- a/xen/arch/x86/efi/stub.c > > +++ b/xen/arch/x86/efi/stub.c > > @@ -3,6 +3,43 @@ > > #include > > #include > > #include > > +#include > > +#include > >

Re: [Xen-devel] [PATCH v6 08/15] x86/efi: create new early memory allocator

2016-09-19 Thread Daniel Kiper
On Mon, Sep 19, 2016 at 06:12:35AM -0600, Jan Beulich wrote: > >>> On 12.09.16 at 22:18, wrote: > > --- a/xen/arch/x86/setup.c > > +++ b/xen/arch/x86/setup.c > > @@ -520,6 +520,8 @@ static void noinline init_done(void) > > > > system_state = SYS_STATE_active; > > > >

Re: [Xen-devel] [PATCH v6 05/15] efi: create efi_enabled()

2016-09-19 Thread Daniel Kiper
On Mon, Sep 19, 2016 at 08:57:02AM -0600, Jan Beulich wrote: > >>> On 19.09.16 at 16:27, wrote: > > On Mon, Sep 19, 2016 at 05:58:46AM -0600, Jan Beulich wrote: > >> >>> On 12.09.16 at 22:18, wrote: > >> > --- a/xen/arch/x86/domain_page.c > >> >

Re: [Xen-devel] [PATCH v6 01/15] x86: properly calculate ELF end of image address

2016-09-19 Thread Daniel Kiper
On Mon, Sep 19, 2016 at 05:14:07AM -0600, Jan Beulich wrote: > >>> On 16.09.16 at 22:43, <konrad.w...@oracle.com> wrote: > > On Mon, Sep 12, 2016 at 10:18:16PM +0200, Daniel Kiper wrote: > >> Currently ELF end of image address is calculated using first line from

Re: [Xen-devel] [PATCH v6 05/15] efi: create efi_enabled()

2016-09-19 Thread Daniel Kiper
On Mon, Sep 19, 2016 at 05:58:46AM -0600, Jan Beulich wrote: > >>> On 12.09.16 at 22:18, wrote: > > --- a/xen/arch/x86/domain_page.c > > +++ b/xen/arch/x86/domain_page.c > > @@ -36,7 +36,7 @@ static inline struct vcpu *mapcache_current_vcpu(void) > > * domain's page

Re: [Xen-devel] [PATCH v6 10/15] x86/boot: implement early command line parser in C

2016-09-20 Thread Daniel Kiper
On Mon, Sep 19, 2016 at 10:03:08AM -0600, Jan Beulich wrote: > >>> On 19.09.16 at 17:27, wrote: > > On Mon, Sep 19, 2016 at 06:47:50AM -0600, Jan Beulich wrote: > >> >>> On 12.09.16 at 22:18, wrote: > > > > [...] > > > >> > ---

Re: [Xen-devel] [PATCH v6 08/15] x86/efi: create new early memory allocator

2016-09-20 Thread Daniel Kiper
On Tue, Sep 20, 2016 at 03:57:19AM -0600, Jan Beulich wrote: > >>> On 20.09.16 at 11:45, wrote: > > On Mon, Sep 19, 2016 at 09:17:50AM -0600, Jan Beulich wrote: > >> >>> On 19.09.16 at 17:04, wrote: > >> > On Mon, Sep 19, 2016 at 06:12:35AM

Re: [Xen-devel] [PATCH v6 08/15] x86/efi: create new early memory allocator

2016-09-20 Thread Daniel Kiper
On Mon, Sep 19, 2016 at 09:17:50AM -0600, Jan Beulich wrote: > >>> On 19.09.16 at 17:04, wrote: > > On Mon, Sep 19, 2016 at 06:12:35AM -0600, Jan Beulich wrote: > >> >>> On 12.09.16 at 22:18, wrote: > >> > --- a/xen/arch/x86/setup.c > >> > +++

<    1   2   3   4   5   6   7   8   9   >