[Xen-devel] [PATCH v15 01/10] x86: add "w" flag to .init.data section definition

2017-02-14 Thread Daniel Kiper
init.data section is clearly writable, so, add "w" flag to its definition in xen/arch/x86/boot/x86_64.S. Signed-off-by: Daniel Kiper --- xen/arch/x86/boot/x86_64.S |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/boot/x86_64.S b/xen/arch/x86/boo

[Xen-devel] [PATCH v15 08/10] x86: make Xen early boot code relocatable

2017-02-14 Thread Daniel Kiper
se for Xen data relative addressing in 32-bit code if it is possible; %esi is used for that thing during error printing because it is not always possible to properly and efficiently initialize %fs. Signed-off-by: Daniel Kiper --- v13 - suggestions/fixes: - move gdt_boot_descr to

[Xen-devel] [PATCH v15 05/10] x86: add multiboot2 protocol support for EFI platforms

2017-02-14 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 --- v15 - suggestions/fixes: - rearrange inline assembly arguments in xen/arch/x86/efi/stub.c:efi_multiboot2() (suggested by Jan Beulich

[Xen-devel] [PATCH v15 09/10] x86/boot: rename sym_phys() to sym_offs()

2017-02-14 Thread Daniel Kiper
: Jan Beulich Signed-off-by: Daniel Kiper Acked-by: Jan Beulich Reviewed-by: Doug Goldstein --- v8 - suggestions/fixes: - improve commit message (suggested by Jan Beulich). --- xen/arch/x86/boot/head.S | 38 +++--- xen/arch/x86/boot/trampoline.S

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

2017-02-14 Thread Daniel Kiper
..calculating its value during runtime. Signed-off-by: Daniel Kiper Acked-by: Jan Beulich Reviewed-by: Doug Goldstein --- 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 525ce7a..a5ce926 100644

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

2017-02-14 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: Daniel Ki

Re: [Xen-devel] [PATCH v15 05/10] x86: add multiboot2 protocol support for EFI platforms

2017-02-14 Thread Daniel Kiper
On Tue, Feb 14, 2017 at 07:33:24PM +0100, Daniel Kiper wrote: > This way Xen can be loaded on EFI platforms using GRUB2 and > other boot loaders which support multiboot2 protocol. > > Signed-off-by: Daniel Kiper I am posting diff between v14 and v15 for your convenience. diff --gi

Re: [Xen-devel] [PATCH v15 05/10] x86: add multiboot2 protocol support for EFI platforms

2017-02-15 Thread Daniel Kiper
On Wed, Feb 15, 2017 at 03:22:02AM -0700, Jan Beulich wrote: > >>> On 14.02.17 at 19:38, wrote: > > --- a/xen/arch/x86/boot/head.S > > +++ b/xen/arch/x86/boot/head.S > > @@ -394,10 +394,18 @@ __start: > > > > /* EFI IA-32 platforms are not supported. */ > > cmpl$MULTIBOOT2_TA

Re: [Xen-devel] [PATCH v15 05/10] x86: add multiboot2 protocol support for EFI platforms

2017-02-16 Thread Daniel Kiper
On Thu, Feb 16, 2017 at 02:29:45AM -0700, Jan Beulich wrote: > >>> On 15.02.17 at 22:53, wrote: > > On Wed, Feb 15, 2017 at 03:22:02AM -0700, Jan Beulich wrote: > >> >>> On 14.02.17 at 19:38, wrote: > >> > --- a/xen/arch/x86/boot/head.S > >> > +++ b/xen/arch/x86/boot/head.S > >> > @@ -394,10 +394

Re: [Xen-devel] [PATCH v15 05/10] x86: add multiboot2 protocol support for EFI platforms

2017-02-16 Thread Daniel Kiper
On Thu, Feb 16, 2017 at 03:56:21PM -0600, Doug Goldstein wrote: > On 2/16/17 3:49 PM, Daniel Kiper wrote: > > On Thu, Feb 16, 2017 at 02:29:45AM -0700, Jan Beulich wrote: > >>>>> On 15.02.17 at 22:53, wrote: > >>> On Wed, Feb 15, 2017 at 03:22:02AM -0700, J

[Xen-devel] [PATCH v16 2/9] efi: build xen.gz with EFI code

2017-02-21 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 Acked-by: Jan Beulich Reviewed-by: Doug Goldstein --- v14 - suggestions/fixes: - at least GNU Make 4.1 does not build efi/buildid.o

[Xen-devel] [PATCH v16 0/9] x86: multiboot2 protocol support

2017-02-21 Thread Daniel Kiper
/config.h |1 + xen/include/xen/multiboot2.h | 182 ++ 20 files changed, 1108 insertions(+), 123 deletions(-) Daniel Kiper (9): x86: add multiboot2 protocol support efi: build xen.gz with EFI code efi: create new early memory allocator

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

2017-02-21 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: Daniel Ki

[Xen-devel] [PATCH v16 3/9] efi: create new early memory allocator

2017-02-21 Thread Daniel Kiper
ented 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: D

[Xen-devel] [PATCH v16 6/9] x86/setup: use XEN_IMG_OFFSET instead of...

2017-02-21 Thread Daniel Kiper
..calculating its value during runtime. Signed-off-by: Daniel Kiper Acked-by: Jan Beulich Reviewed-by: Doug Goldstein --- 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 e2a5f76..8feed35 100644

[Xen-devel] [PATCH v16 4/9] x86: add multiboot2 protocol support for EFI platforms

2017-02-21 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 --- v16 - suggestions/fixes: - improve comments in error handling (suggested by Jan Beulich). v15 - suggestions/fixes: - rearrange inline

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

2017-02-21 Thread Daniel Kiper
fault 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 Reviewed-by: Jan Be

[Xen-devel] [PATCH v16 8/9] x86/boot: rename sym_phys() to sym_offs()

2017-02-21 Thread Daniel Kiper
: Jan Beulich Signed-off-by: Daniel Kiper Acked-by: Jan Beulich Reviewed-by: Doug Goldstein --- v8 - suggestions/fixes: - improve commit message (suggested by Jan Beulich). --- xen/arch/x86/boot/head.S | 38 +++--- xen/arch/x86/boot/trampoline.S

[Xen-devel] [PATCH v16 1/9] x86: add multiboot2 protocol support

2017-02-21 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 Reviewed-by: Jan Beulich Reviewed-by: Doug Goldstein

[Xen-devel] [PATCH v16 7/9] x86: make Xen early boot code relocatable

2017-02-21 Thread Daniel Kiper
se for Xen data relative addressing in 32-bit code if it is possible; %esi is used for that thing during error printing because it is not always possible to properly and efficiently initialize %fs. Signed-off-by: Daniel Kiper --- v13 - suggestions/fixes: - move gdt_boot_descr to

Re: [Xen-devel] [PATCH v16 4/9] x86: add multiboot2 protocol support for EFI platforms

2017-02-21 Thread Daniel Kiper
On Tue, Feb 21, 2017 at 08:19:53PM +0100, Daniel Kiper wrote: > This way Xen can be loaded on EFI platforms using GRUB2 and > other boot loaders which support multiboot2 protocol. > > Signed-off-by: Daniel Kiper > --- > v16 - suggestions/fixes: > - improve comme

Re: [Xen-devel] [PATCH v16 4/9] x86: add multiboot2 protocol support for EFI platforms

2017-02-22 Thread Daniel Kiper
On Wed, Feb 22, 2017 at 06:42:40AM -0700, Jan Beulich wrote: > >>> On 21.02.17 at 20:24, wrote: > > On Tue, Feb 21, 2017 at 08:19:53PM +0100, Daniel Kiper wrote: > >> This way Xen can be loaded on EFI platforms using GRUB2 and > >> other boot loade

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 problematic. It > > is > >>> not accounted for in xen_in_

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(), causing errors when construc

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] [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: > >> > On 28.02.17 at 16:20, wrote: > >> >>> Fre

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, wrote:

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 07:09:14PM +, Andrew Cooper wrote: > On 28/02/17 19:01, Daniel Kiper wrote: > > 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 +, And

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 -0700, Jan Beulich wrote: > >> >> >>> On 28.02.17 at 17:

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, 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. > > Well, one better solution was already su

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 > > must > > allocate me

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 lines of Linux'es .brk _aft

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 such page tables must have

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 relocatable early boot code play with > >> > page tables usi

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

2016-11-10 Thread Daniel Kiper
On Thu, Nov 03, 2016 at 02:48:26PM +0100, Daniel Kiper wrote: > On Mon, Oct 24, 2016 at 03:57:22AM -0600, Jan Beulich wrote: > > >>> On 24.10.16 at 11:03, wrote: > > [...] > > > > It looks that it is last thing which blocks whole patch series. > > >

Re: [Xen-devel] Xen, EFI and kexec

2016-11-10 Thread Daniel Kiper
mode properly. > > IIUC Linux also maps the various EFI ranges at deterministic addresses > > because the seting up EFI virtual address mode is only allowed once > > per boot and so both the old and new kernel have to use the same > > mappings. > > > > I have seen th

Re: [Xen-devel] [PATCH v1 1/2] xen/kexec: Find out whether an kexec type is loaded.

2016-11-15 Thread Daniel Kiper
M as it has one size fits all > check and does not check for subcommands. > > Signed-off-by: Konrad Rzeszutek Wilk > --- > v0: Internal version. > v1: Dropped Reviewed-by, posting on xen-devel. > > CC: Elena Ufimtseva > CC: Daniel Kiper > --- > tools/libx

[Xen-devel] [MULTIBOOT2 DOC PATCH v2 10/11] multiboot2: Add me to authors

2016-11-24 Thread Daniel Kiper
.. and properly format author list. Signed-off-by: Daniel Kiper --- doc/multiboot.texi |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/multiboot.texi b/doc/multiboot.texi index fe134bc..5a3cd5d 100644 --- a/doc/multiboot.texi +++ b/doc/multiboot.texi @@ -53,7 +53,9

[Xen-devel] [MULTIBOOT2 DOC PATCH v2 02/11] multiboot2: Replace redundant if with the

2016-11-24 Thread Daniel Kiper
Signed-off-by: Daniel Kiper --- v2 - suggestions/fixes: - replace redundant if with the (suggested by Andrew Cooper). --- doc/multiboot.texi |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/multiboot.texi b/doc/multiboot.texi index d2b940f..c438b38 100644 --- a

[Xen-devel] [MULTIBOOT2 DOC PATCH v2 04/11] multiboot2: Fix description of EFI boot services tag

2016-11-24 Thread Daniel Kiper
Without this fix multiboot2 doc build fails. Additionally, add missing full stop at the end of sentence. Signed-off-by: Daniel Kiper --- doc/multiboot.texi |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/multiboot.texi b/doc/multiboot.texi index 771aeab

[Xen-devel] [MULTIBOOT2 DOC PATCH v2 08/11] multiboot2: Say that memory maps may not be available on EFI platforms

2016-11-24 Thread Daniel Kiper
Signed-off-by: Daniel Kiper --- v2 - suggestions/fixes: - add missing the articles (suggested by Andrew Cooper). --- doc/multiboot.texi | 11 +++ 1 file changed, 11 insertions(+) diff --git a/doc/multiboot.texi b/doc/multiboot.texi index 973be9f..9461890 100644 --- a/doc

[Xen-devel] [MULTIBOOT2 DOC PATCH v2 01/11] multiboot2: Rename Multiboot to Multiboot2

2016-11-24 Thread Daniel Kiper
Multiboot2 is proper name of the boot protocol. Multiboot is name of older boot protocol. So, rename Multiboot to Multiboot2 to not confuse the reader. Signed-off-by: Daniel Kiper --- doc/multiboot.texi | 112 ++-- 1 file changed, 56 insertions

[Xen-devel] [MULTIBOOT2 DOC PATCH v2 07/11] multiboot2: Add description of support for relocatable images

2016-11-24 Thread Daniel Kiper
Signed-off-by: Daniel Kiper --- v2 - suggestions/fixes: - add missing the articles (suggested by Andrew Cooper), - various minor cleanups and fixes (suggested by Andrew Cooper). --- doc/multiboot.texi | 56 doc/multiboot2.h

[Xen-devel] [MULTIBOOT2 DOC PATCH v2 09/11] multiboot2: Add C structure members alignment and padding consideration section

2016-11-24 Thread Daniel Kiper
Signed-off-by: Daniel Kiper --- v2 - suggestions/fixes: - rephrase whole section (suggested by Andrew Cooper). --- doc/multiboot.texi | 11 +++ 1 file changed, 11 insertions(+) diff --git a/doc/multiboot.texi b/doc/multiboot.texi index 9461890..fe134bc 100644 --- a/doc

[Xen-devel] [MULTIBOOT2 DOC PATCH v2 05/11] multiboot2: Add description of support for EFI boot services

2016-11-24 Thread Daniel Kiper
Signed-off-by: Daniel Kiper --- v2 - suggestions/fixes: - clarify physical address meaning for EFI amd64 mode with boot services enabled (suggested by Andrew Cooper). --- doc/multiboot.texi | 115 +++- doc/multiboot2.h |2 + 2

[Xen-devel] [MULTIBOOT2 DOC PATCH v2 03/11] multiboot2: Clarify meaning of information request header tag

2016-11-24 Thread Daniel Kiper
Signed-off-by: Daniel Kiper --- v2 - suggestions/fixes: - rephrase some sentences (suggested by Andrew Cooper), - add missing the articles (suggested by Andrew Cooper). --- doc/multiboot.texi | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff

[Xen-devel] [MULTIBOOT2 DOC PATCH v2 11/11] multiboot2: Bump version to 2.0

2016-11-24 Thread Daniel Kiper
.. and add 2016 to copyright. Signed-off-by: Daniel Kiper --- configure.ac |2 +- doc/multiboot.texi |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index b11961d..585b37a 100644 --- a/configure.ac +++ b/configure.ac @@ -13,7 +13,7

[Xen-devel] [MULTIBOOT2 DOC PATCH v2 00/10] multiboot2: Update documentation

2016-11-24 Thread Daniel Kiper
++--- doc/multiboot2.h | 42 3 files changed, 338 insertions(+), 72 deletions(-) Daniel Kiper (11): multiboot2: Rename Multiboot to Multiboot2 multiboot2: Replace redundant if with the multiboot2: Clarify meaning of

[Xen-devel] [MULTIBOOT2 DOC PATCH v2 06/11] multiboot2: Add description of EFI image handle tags

2016-11-24 Thread Daniel Kiper
Signed-off-by: Daniel Kiper --- doc/multiboot.texi | 28 doc/multiboot2.h | 16 2 files changed, 44 insertions(+) diff --git a/doc/multiboot.texi b/doc/multiboot.texi index cc1edab..dca3e62 100644 --- a/doc/multiboot.texi +++ b/doc

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

2016-11-24 Thread Daniel Kiper
On Wed, Nov 23, 2016 at 06:52:27PM +, Andrew Cooper wrote: > On 29/09/16 22:42, Daniel Kiper wrote: [...] > > +vga_text_buffer: > > +.long 0xb8000 > > Why is this turned into a variable? We must disable VGA accesses during runtime on platforms which does not h

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

2016-11-24 Thread Daniel Kiper
On Thu, Nov 24, 2016 at 04:08:12AM -0700, Jan Beulich wrote: > >>> On 23.11.16 at 19:52, wrote: > > On 29/09/16 22:42, Daniel Kiper wrote: [...] > >> +.Lefi_mb2_tsize: > >> +/* Check Multiboot2 information total size. */ > >> +mov

Re: [Xen-devel] [MULTIBOOT2 DOC PATCH v2 05/11] multiboot2: Add description of support for EFI boot services

2016-11-28 Thread Daniel Kiper
Hi Toomas, Thank you for comments. On Thu, Nov 24, 2016 at 11:47:48PM +0200, Toomas Soome wrote: > There is still the same confusion as with entry address tag 7; the diagram has I suppose that you thought about tag type 3. > u_virt, yet the text does claim it is physical address. Sure, it is as

Re: [Xen-devel] [MULTIBOOT2 DOC PATCH v2 01/11] multiboot2: Rename Multiboot to Multiboot2

2016-11-29 Thread Daniel Kiper
On Mon, Nov 28, 2016 at 09:06:32PM +0300, Andrei Borzenkov wrote: > 24.11.2016 23:40, Daniel Kiper ?: > > Multiboot2 is proper name of the boot protocol. Multiboot is name of older > > boot > > protocol. So, rename Multiboot to Multiboot2 to not confuse the reader.

Re: [Xen-devel] [MULTIBOOT2 DOC PATCH v2 05/11] multiboot2: Add description of support for EFI boot services

2016-11-29 Thread Daniel Kiper
On Mon, Nov 28, 2016 at 08:53:51PM +0300, Andrei Borzenkov wrote: > 24.11.2016 23:40, Daniel Kiper ?: > > Signed-off-by: Daniel Kiper > > --- > > v2 - suggestions/fixes: > >- clarify physical address meaning for EFI amd64 > > mode with boot servic

Re: [Xen-devel] [MULTIBOOT2 DOC PATCH v2 06/11] multiboot2: Add description of EFI image handle tags

2016-11-29 Thread Daniel Kiper
On Mon, Nov 28, 2016 at 08:59:38PM +0300, Andrei Borzenkov wrote: > 24.11.2016 23:40, Daniel Kiper ?: > > Signed-off-by: Daniel Kiper > > --- > > doc/multiboot.texi | 28 > > doc/multiboot2.h | 16 > >

Re: [Xen-devel] [MULTIBOOT2 DOC PATCH v2 05/11] multiboot2: Add description of support for EFI boot services

2016-11-29 Thread Daniel Kiper
On Tue, Nov 29, 2016 at 11:39:39AM +0200, Toomas Soome wrote: > > On 29. nov 2016, at 11:08, Daniel Kiper wrote: > > On Mon, Nov 28, 2016 at 08:53:51PM +0300, Andrei Borzenkov wrote: > >> 24.11.2016 23:40, Daniel Kiper ?: > >>> Signed-off-by: Daniel Kiper

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

2016-11-30 Thread Daniel Kiper
and 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 Acked-by: Jan Beulich --- v9 - suggestions/fixes: - use __2M_rwdata_end symbol instead of _end symbol

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

2016-11-30 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 Signed-off-by: Daniel Kiper Reviewed-by: Jan Beulich --- v7

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

2016-11-30 Thread Daniel Kiper
|2 +- xen/drivers/acpi/osl.c|2 +- xen/include/asm-x86/page.h|2 +- xen/include/xen/efi.h |8 +- xen/include/xen/multiboot2.h | 182 33 files changed, 1526 insertions(+), 539 deletions(-) Daniel Kiper (13

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

2016-11-30 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 Reviewed-by: Jan Beulich --- v9 - suggestions/fixes

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

2016-11-30 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 Acked-by: Jan Beulich --- v6 - suggestions/fixes: - improve efi_enabled() checks in efi_runtime_call() (suggested by Jan Beu

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

2016-11-30 Thread Daniel Kiper
ented 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: D

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

2016-11-30 Thread Daniel Kiper
..calculating its value during runtime. Signed-off-by: Daniel Kiper Acked-by: Jan Beulich --- 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 fa808ef..5d0830e 100644 --- a/xen/arch/x86/setup.c

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

2016-11-30 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: Daniel Ki

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

2016-11-30 Thread Daniel Kiper
..nor EFI platforms with runtime services enabled. Suggested-by: Jan Beulich Signed-off-by: Daniel Kiper Acked-by: Jan Beulich --- v6 - suggestions/fixes: - move this commit behind "efi: create efi_enabled()" commit (suggested by Jan Beulich). v5 - suggestions/fixes: -

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

2016-11-30 Thread Daniel Kiper
not always possible to properly and efficiently initialize %fs. Signed-off-by: Daniel Kiper --- v8 - suggestions/fixes: - use shld instead of mov and shr in BOOT_FS segment descriptor base address initialization (suggested by Jan Beulich), - simplify code updating frame address

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

2016-11-30 Thread Daniel Kiper
: Andrew Cooper Signed-off-by: Daniel Kiper Acked-by: Jan Beulich --- 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), - simplify defs.h dependencies (suggested by

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

2016-11-30 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 --- v10 - suggestions/fixes: - replace ljmpl with lretq (suggested by Andrew Cooper), - introduce efi_platform to increase code readability

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

2016-11-30 Thread Daniel Kiper
fault 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 Reviewed-by: Jan Beulich -

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

2016-11-30 Thread Daniel Kiper
: Jan Beulich Signed-off-by: Daniel Kiper Acked-by: Jan Beulich --- v8 - suggestions/fixes: - improve commit message (suggested by Jan Beulich). --- xen/arch/x86/boot/head.S | 38 +++--- xen/arch/x86/boot/trampoline.S |2 +- xen/arch/x86/boot

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

2016-11-30 Thread Daniel Kiper
On Fri, Nov 25, 2016 at 12:50:55AM -0700, Jan Beulich wrote: > >>> On 24.11.16 at 22:44, wrote: > > On Thu, Nov 24, 2016 at 04:08:12AM -0700, Jan Beulich wrote: > >> >>> On 23.11.16 at 19:52, wrote: > >> > On 29/09/16 22:42, Daniel Kiper w

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

2016-11-30 Thread Daniel Kiper
On Wed, Nov 30, 2016 at 06:59:57AM -0700, Jan Beulich wrote: > >>> On 30.11.16 at 14:45, wrote: > > On Fri, Nov 25, 2016 at 12:50:55AM -0700, Jan Beulich wrote: > >> >>> On 24.11.16 at 22:44, wrote: > >> > On Thu, Nov 24, 2016 at 04:08:12AM -0700, Jan Beulich wrote: > >> >> >>> On 23.11.16 at 19:

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

2016-12-01 Thread Daniel Kiper
On Thu, Dec 01, 2016 at 06:13:34AM -0700, Jan Beulich wrote: > >>> On 30.11.16 at 14:04, wrote: > > --- a/xen/common/efi/boot.c > > +++ b/xen/common/efi/boot.c > > @@ -98,6 +98,52 @@ static CHAR16 __initdata newline[] = L"\r\n"; > > #define PrintStr(s) StdOut->OutputString(StdOut, s) > > #define

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

2016-12-01 Thread Daniel Kiper
On Thu, Dec 01, 2016 at 09:08:45AM -0700, Jan Beulich wrote: > >>> On 01.12.16 at 16:41, wrote: > > On Thu, Dec 01, 2016 at 06:13:34AM -0700, Jan Beulich wrote: > >> >>> On 30.11.16 at 14:04, wrote: > >> > --- a/xen/common/efi/boot.c > >> > +++ b/xen/common/efi/boot.c > >> > @@ -98,6 +98,52 @@ st

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

2016-12-05 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 Acked-by: Jan Beulich --- v6 - suggestions/fixes: - improve efi_enabled() checks in efi_runtime_call() (suggested by Jan Beu

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

2016-12-05 Thread Daniel Kiper
(+), 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 with EFI code efi: create new early

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

2016-12-05 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 --- v10 - suggestions/fixes: - replace ljmpl with lretq (suggested by Andrew Cooper), - introduce efi_platform to increase code readability

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

2016-12-05 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 Signed-off-by: Daniel Kiper Reviewed-by: Jan Beulich --- v7

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

2016-12-05 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 Reviewed-by: Jan Beulich --- v9 - suggestions/fixes

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

2016-12-05 Thread Daniel Kiper
and 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 Acked-by: Jan Beulich --- v9 - suggestions/fixes: - use __2M_rwdata_end symbol instead of _end symbol

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

2016-12-05 Thread Daniel Kiper
..nor EFI platforms with runtime services enabled. Suggested-by: Jan Beulich Signed-off-by: Daniel Kiper Acked-by: Jan Beulich --- v6 - suggestions/fixes: - move this commit behind "efi: create efi_enabled()" commit (suggested by Jan Beulich). v5 - suggestions/fixes: -

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

2016-12-05 Thread Daniel Kiper
fault 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 Reviewed-by: Jan Beulich -

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

2016-12-05 Thread Daniel Kiper
: Jan Beulich Signed-off-by: Daniel Kiper Acked-by: Jan Beulich --- v8 - suggestions/fixes: - improve commit message (suggested by Jan Beulich). --- xen/arch/x86/boot/head.S | 38 +++--- xen/arch/x86/boot/trampoline.S |2 +- xen/arch/x86/boot

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

2016-12-05 Thread Daniel Kiper
: Andrew Cooper Signed-off-by: Daniel Kiper Acked-by: Jan Beulich --- 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), - simplify defs.h dependencies (suggested by

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

2016-12-05 Thread Daniel Kiper
..calculating its value during runtime. Signed-off-by: Daniel Kiper Acked-by: Jan Beulich --- 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 fa808ef..5d0830e 100644 --- a/xen/arch/x86/setup.c

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

2016-12-05 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: Daniel Ki

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

2016-12-05 Thread Daniel Kiper
not always possible to properly and efficiently initialize %fs. Signed-off-by: Daniel Kiper --- v8 - suggestions/fixes: - use shld instead of mov and shr in BOOT_FS segment descriptor base address initialization (suggested by Jan Beulich), - simplify code updating frame address

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

2016-12-05 Thread Daniel Kiper
ented 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: D

[Xen-devel] [MULTIBOOT2 DOC PATCH v3 06/13] multiboot2: Fix description of EFI boot services tag

2016-12-06 Thread Daniel Kiper
Without this fix multiboot2 doc build fails. Additionally, add missing full stop at the end of sentence. Signed-off-by: Daniel Kiper --- doc/multiboot.texi |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/multiboot.texi b/doc/multiboot.texi index 4f838f0

[Xen-devel] [MULTIBOOT2 DOC PATCH v3 03/13] multiboot2: Rename Multiboot to Multiboot2

2016-12-06 Thread Daniel Kiper
Multiboot2 is proper name of the boot protocol. Multiboot is name of older boot protocol. So, rename Multiboot to Multiboot2 to not confuse the reader. Signed-off-by: Daniel Kiper --- doc/multiboot.texi | 112 ++-- 1 file changed, 56 insertions

[Xen-devel] [MULTIBOOT2 DOC PATCH v3 09/13] multiboot2: Add description of support for relocatable images

2016-12-06 Thread Daniel Kiper
Signed-off-by: Daniel Kiper --- v2 - suggestions/fixes: - add missing the articles (suggested by Andrew Cooper), - various minor cleanups and fixes (suggested by Andrew Cooper). --- doc/multiboot.texi | 56 doc/multiboot2.h

[Xen-devel] [MULTIBOOT2 DOC PATCH v3 05/13] multiboot2: Clarify meaning of information request header tag

2016-12-06 Thread Daniel Kiper
Signed-off-by: Daniel Kiper --- v2 - suggestions/fixes: - rephrase some sentences (suggested by Andrew Cooper), - add missing the articles (suggested by Andrew Cooper). --- doc/multiboot.texi | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff

[Xen-devel] [MULTIBOOT2 DOC PATCH v3 04/13] multiboot2: Replace redundant if with the

2016-12-06 Thread Daniel Kiper
Signed-off-by: Daniel Kiper --- v2 - suggestions/fixes: - replace redundant if with the (suggested by Andrew Cooper). --- doc/multiboot.texi |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/multiboot.texi b/doc/multiboot.texi index 904c082..a9cba9b 100644 --- a

[Xen-devel] [MULTIBOOT2 DOC PATCH v3 01/13] multiboot2: Replace u_phys with u32

2016-12-06 Thread Daniel Kiper
u_phys is used just in two places and sometimes it may confuse reader. Additionally, GRUB multiboot2 implementation does not use u_phys anywhere. So, replace it with basic well defined and used in implementation u32 type. Signed-off-by: Daniel Kiper --- doc/multiboot.texi | 11 --- 1

[Xen-devel] [MULTIBOOT2 DOC PATCH v3 08/13] multiboot2: Add description of EFI image handle tags

2016-12-06 Thread Daniel Kiper
Signed-off-by: Daniel Kiper --- doc/multiboot.texi | 28 doc/multiboot2.h | 16 2 files changed, 44 insertions(+) diff --git a/doc/multiboot.texi b/doc/multiboot.texi index 9f13e74..1581220 100644 --- a/doc/multiboot.texi +++ b/doc

[Xen-devel] [MULTIBOOT2 DOC PATCH v3 07/13] multiboot2: Add description of support for EFI boot services

2016-12-06 Thread Daniel Kiper
Signed-off-by: Daniel Kiper --- v3 - suggestions/fixes: - replace u_virt with u32 (suggested by Andrei Borzenkov and Toomas Soome), - change RAX/RBX to EAX/EBX in "EFI amd64 machine state with boot services enabled" section, - describe the kernel, the modules,

[Xen-devel] [MULTIBOOT2 DOC PATCH v3 10/13] multiboot2: Say that memory maps may not be available on EFI platforms

2016-12-06 Thread Daniel Kiper
Signed-off-by: Daniel Kiper --- v2 - suggestions/fixes: - add missing the articles (suggested by Andrew Cooper). --- doc/multiboot.texi | 11 +++ 1 file changed, 11 insertions(+) diff --git a/doc/multiboot.texi b/doc/multiboot.texi index 13e4e80..35f2bed 100644 --- a/doc

[Xen-devel] [MULTIBOOT2 DOC PATCH v3 00/13] multiboot2: Update documentation

2016-12-06 Thread Daniel Kiper
|2 +- doc/multiboot.texi | 403 - doc/multiboot2.h | 42 +++ 3 files changed, 360 insertions(+), 87 deletions(-) Daniel Kiper (13): multiboot2: Replace u_phys with u32

[Xen-devel] [MULTIBOOT2 DOC PATCH v3 02/13] multiboot2: Replace u_virt with u32

2016-12-06 Thread Daniel Kiper
u_virt may sometimes confuse reader especially if description says something completely different. Additionally, GRUB multiboot2 implementation does not use u_virt anywhere. So, replace it with basic well defined and used in implementation u32 type. Signed-off-by: Daniel Kiper --- doc

[Xen-devel] [MULTIBOOT2 DOC PATCH v3 11/13] multiboot2: Add C structure members alignment and padding consideration section

2016-12-06 Thread Daniel Kiper
Signed-off-by: Daniel Kiper --- v2 - suggestions/fixes: - rephrase whole section (suggested by Andrew Cooper). --- doc/multiboot.texi | 11 +++ 1 file changed, 11 insertions(+) diff --git a/doc/multiboot.texi b/doc/multiboot.texi index 35f2bed..f566114 100644 --- a/doc

<    1   2   3   4   5   6   7   8   9   >