[Xen-devel] [PATCH v2 01/23] x86/boot: remove unneeded instruction

2015-07-20 Thread Daniel Kiper
Signed-off-by: Daniel Kiper --- xen/arch/x86/boot/head.S |1 - 1 file changed, 1 deletion(-) diff --git a/xen/arch/x86/boot/head.S b/xen/arch/x86/boot/head.S index cfd59dc..f63b349 100644 --- a/xen/arch/x86/boot/head.S +++ b/xen/arch/x86/boot/head.S @@ -169,7 +169,6 @@ __start

[Xen-devel] [PATCH v2 00/23] x86: multiboot2 protocol support

2015-07-20 Thread Daniel Kiper
34 files changed, 1709 insertions(+), 763 deletions(-) Daniel Kiper (23): x86/boot: remove unneeded instruction x86/boot: copy only text section from *.lnk file to *.bin file x86: zero BSS using stosl instead of stosb x86/boot: call reloc() using cdecl

[Xen-devel] [PATCH v2 04/23] x86/boot: call reloc() using cdecl calling convention

2015-07-20 Thread Daniel Kiper
Suggested-by: Jan Beulich Signed-off-by: Daniel Kiper --- xen/arch/x86/boot/head.S |4 +++- xen/arch/x86/boot/reloc.c | 20 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/xen/arch/x86/boot/head.S b/xen/arch/x86/boot/head.S index ed42782..3cbb2e6

[Xen-devel] [PATCH v2 03/23] x86: zero BSS using stosl instead of stosb

2015-07-20 Thread Daniel Kiper
Additionally, align relevant comment to coding style. Suggested-by: Andrew Cooper Signed-off-by: Daniel Kiper --- xen/arch/x86/boot/head.S |5 +++-- xen/arch/x86/xen.lds.S |2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/boot/head.S b/xen/arch/x86

[Xen-devel] [PATCH v2 08/23] x86: add multiboot2 protocol support

2015-07-20 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: Andrew Cooper --- v2 - suggestions/fixes

[Xen-devel] [PATCH v2 06/23] x86/boot: use %ecx instead of %eax

2015-07-20 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 Reviewed-by: Andrew Cooper --- xen/arch/x86/boot

[Xen-devel] [PATCH v2 05/23] x86/boot/reloc: create generic alloc and copy functions

2015-07-20 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 Reviewed-by: Andrew Cooper --- v2 - suggestions/fixes: - generalize new functions names (suggested by Jan Beulich

[Xen-devel] [PATCH v2 02/23] x86/boot: copy only text section from *.lnk file to *.bin file

2015-07-20 Thread Daniel Kiper
Signed-off-by: Daniel Kiper --- xen/arch/x86/boot/build32.mk |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/boot/build32.mk b/xen/arch/x86/boot/build32.mk index c208249..c83effe 100644 --- a/xen/arch/x86/boot/build32.mk +++ b/xen/arch/x86/boot/build32.mk

[Xen-devel] [PATCH v2 13/23] efi: split out efi_get_gop()

2015-07-20 Thread Daniel Kiper
..which gets pointer to GOP device. We want to re-use this code to support multiboot2 protocol on EFI platforms. Signed-off-by: Daniel Kiper --- v2 - suggestions/fixes: - improve commit message (suggested by Jan Beulich). --- xen/common/efi/boot.c | 59

[Xen-devel] [PATCH v2 16/23] efi: split out efi_variables()

2015-07-20 Thread Daniel Kiper
..which collects variable store parameters. We want to re-use this code to support multiboot2 protocol on EFI platforms. Signed-off-by: Daniel Kiper --- v2 - suggestions/fixes: - improve commit message (suggested by Jan Beulich). --- xen/common/efi/boot.c | 41

[Xen-devel] [PATCH v2 07/23] x86/boot/reloc: Rename some variables and rearrange code a bit

2015-07-20 Thread Daniel Kiper
Rename mbi and mbi_old variables 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 --- v2 - suggestions/fixes

[Xen-devel] [PATCH v2 11/23] efi: split out efi_init()

2015-07-20 Thread Daniel Kiper
..which initializes basic EFI variables. We want to re-use this code to support multiboot2 protocol on EFI platforms. Signed-off-by: Daniel Kiper --- v2 - suggestions/fixes: - improve commit message (suggested by Jan Beulich). --- xen/common/efi/boot.c | 28

[Xen-devel] [PATCH v2 12/23] efi: split out efi_console_set_mode()

2015-07-20 Thread Daniel Kiper
..which sets console mode. We want to re-use this code to support multiboot2 protocol on EFI platforms. Signed-off-by: Daniel Kiper --- v2 - suggestions/fixes: - improve commit message (suggested by Jan Beulich). --- xen/common/efi/boot.c | 37 - 1

[Xen-devel] [PATCH v2 19/23] x86/efi: create new early memory allocator

2015-07-20 Thread Daniel Kiper
e day. Signed-off-by: Daniel Kiper --- xen/arch/x86/efi/efi-boot.h | 38 ++ xen/arch/x86/setup.c|3 +-- 2 files changed, 31 insertions(+), 10 deletions(-) diff --git a/xen/arch/x86/efi/efi-boot.h b/xen/arch/x86/efi/efi-boot.h index 2dd69f6..3d25c48 1

[Xen-devel] [PATCH v2 20/23] x86: add multiboot2 protocol support for EFI platforms

2015-07-20 Thread Daniel Kiper
Signed-off-by: Daniel Kiper --- v2 - suggestions/fixes: - generate multiboot2 header using macros (suggested by Jan Beulich), - switch CPU to x86_32 mode before jumping to 32-bit code (suggested by Andrew Cooper), - reduce code changes to increase patch readability

[Xen-devel] [PATCH v2 15/23] efi: split out efi_tables()

2015-07-20 Thread Daniel Kiper
..which collects system tables data. We want to re-use this code to support multiboot2 protocol on EFI platforms. Signed-off-by: Daniel Kiper --- v2 - suggestions/fixes: - improve commit message (suggested by Jan Beulich). --- xen/common/efi/boot.c | 61

[Xen-devel] [PATCH v2 09/23] efi: create efi_enabled()

2015-07-20 Thread Daniel Kiper
, create efi_enabled() which checks available features in efi.flags. This patch only defines EFI_PLATFORM feature which is equal to old efi_enabled == 1. Following patch will define EFI_LOADER feature accordingly. Suggested-by: Jan Beulich Signed-off-by: Daniel Kiper --- xen/arch/x86/dmi_scan.c

[Xen-devel] [PATCH v2 10/23] efi: build xen.gz with EFI code

2015-07-20 Thread Daniel Kiper
xen.efi directly from xen ELF using just simple objcopy. Signed-off-by: Daniel Kiper --- v2 - suggestions/fixes: - build EFI code only if it is supported in a given build environment (suggested by Jan Beulich). --- xen/arch/x86/Makefile | 13 + xen/arch/x86/efi/Makefile |

[Xen-devel] [PATCH v2 18/23] efi: split out efi_exit_boot()

2015-07-20 Thread Daniel Kiper
..which gets memory map and calls ExitBootServices(). We want to re-use this code to support multiboot2 protocol on EFI platforms. Signed-off-by: Daniel Kiper --- v2 - suggestions/fixes: - improve commit message (suggested by Jan Beulich). --- xen/common/efi/boot.c | 92

[Xen-devel] [PATCH v2 14/23] efi: split out efi_find_gop_mode()

2015-07-20 Thread Daniel Kiper
..which finds suitable GOP mode. We want to re-use this code to support multiboot2 protocol on EFI platforms. Signed-off-by: Daniel Kiper --- v2 - suggestions/fixes: - improve commit message (suggested by Jan Beulich). --- xen/common/efi/boot.c | 94

[Xen-devel] [PATCH v2 21/23] x86/boot: implement early command line parser in C

2015-07-20 Thread Daniel Kiper
easier to maintain. Suggested-by: Andrew Cooper Signed-off-by: Daniel Kiper --- .gitignore |5 +- xen/arch/x86/Makefile |2 +- xen/arch/x86/boot/Makefile |7 +- xen/arch/x86/boot/build32.mk |2 + xen/arch/x86/boot/cmdline.S| 367

[Xen-devel] [PATCH v2 17/23] efi: split out efi_set_gop_mode()

2015-07-20 Thread Daniel Kiper
..which sets chosen GOP mode. We want to re-use this code to support multiboot2 protocol on EFI platforms. Signed-off-by: Daniel Kiper --- v2 - suggestions/fixes: - improve commit message (suggested by Jan Beulich). --- xen/common/efi/boot.c | 33 - 1

[Xen-devel] [PATCH v2 22/23] x86: make Xen early boot code relocatable

2015-07-20 Thread Daniel Kiper
current solution looks quite optimal. Signed-off-by: Daniel Kiper --- xen/arch/x86/Makefile |6 +- xen/arch/x86/Rules.mk |4 + xen/arch/x86/boot/head.S | 165 ++-- xen/arch/x86/boot/trampoline.S | 11 ++- xen/arch/x86/boot

[Xen-devel] [PATCH v2 1/6] gitignore: Ignore *.orig, *.rej and *.swp files

2015-07-20 Thread Daniel Kiper
Signed-off-by: Daniel Kiper --- .gitignore |3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 18ab8e8..6d25d39 100644 --- a/.gitignore +++ b/.gitignore @@ -147,6 +147,7 @@ mod-*.c missing netboot_test *.o +*.orig *.a ohci_test partmap_test @@ -160,9

[Xen-devel] [PATCH v2 2/6] relocator: Do not use memory region if its starta is smaller than size

2015-07-20 Thread Daniel Kiper
aligned 0x1 size 0x3f80 lib/relocator.c:1188: allocated: 0xc07f+0x3f80 lib/relocator.c:1277: allocated 0xc07f/0x80 Signed-off-by: Daniel Kiper --- grub-core/lib/relocator.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/lib

[Xen-devel] [PATCH v2 5/6] multiboot2: Add support for relocatable images

2015-07-20 Thread Daniel Kiper
Signed-off-by: Daniel Kiper --- grub-core/loader/i386/multiboot_mbi.c |6 ++-- grub-core/loader/multiboot.c | 12 +-- grub-core/loader/multiboot_elfxx.c| 28 +++ grub-core/loader/multiboot_mbi2.c | 63 + include/grub

[Xen-devel] [PATCH v2 3/6] i386/relocator: Add grub_relocator64_efi relocator

2015-07-20 Thread Daniel Kiper
relocator too. Signed-off-by: Daniel Kiper --- grub-core/Makefile.core.def |1 + grub-core/lib/i386/relocator.c | 53 +++ grub-core/lib/i386/relocator64_efi.S | 77 ++ grub-core/loader/multiboot.c | 29

[Xen-devel] [PATCH v2 4/6] multiboot2: Add tags used to pass ImageHandle to loaded image

2015-07-20 Thread Daniel Kiper
Add tags used to pass ImageHandle to loaded image. It is used by at least ExitBootServices() function. Signed-off-by: Daniel Kiper --- grub-core/loader/multiboot_mbi2.c | 46 + include/multiboot2.h | 16 + 2 files changed, 53

[Xen-devel] [PATCH v2 0/6] multiboot2: Add two extensions and fix some issues

2015-07-20 Thread Daniel Kiper
| 21 + include/grub/multiboot.h |4 +- include/multiboot2.h | 49 +++ 13 files changed, 423 insertions(+), 72 deletions(-) Daniel Kiper (6): gitignore: Ignore *.orig, *.rej and *.swp files relocator: Do not use memory region

[Xen-devel] [PATCH v2 6/6] multiboot2: Do not pass memory maps to image if EFI boot services are enabled

2015-07-20 Thread Daniel Kiper
Do not pass memory maps to image if it asked for EFI boot services. Maps are usually invalid in that case and they can confuse potential user. Image should get memory map itself just before ExitBootServices() call. Signed-off-by: Daniel Kiper --- grub-core/loader/multiboot_mbi2.c | 71

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

2015-07-20 Thread Daniel Kiper
Add multiboot2 protocol support for relocatable images. Only GRUB2 with relevant patches understands that feature. Older multiboot protocol (regardless of version) compatible loaders ignore it and everything works as usual. Signed-off-by: Daniel Kiper --- xen/arch/x86/boot/head.S

Re: [Xen-devel] [PATCH v2 02/23] x86/boot: copy only text section from *.lnk file to *.bin file

2015-07-21 Thread Daniel Kiper
On Tue, Jul 21, 2015 at 03:35:07AM -0600, Jan Beulich wrote: > >>> On 20.07.15 at 16:28, wrote: > > Without any explanation (description) I'm inclined to say this makes > things more fragile instead of improving the situation. As it looks > like we indeed pointlessly copy .eh_frame, but I think th

Re: [Xen-devel] [PATCH v2 03/23] x86: zero BSS using stosl instead of stosb

2015-07-21 Thread Daniel Kiper
On Tue, Jul 21, 2015 at 03:37:48AM -0600, Jan Beulich wrote: > >>> On 20.07.15 at 16:28, wrote: > > ... because of ??? Nowadays - with X86_FEATURE_ERMS - rep stosb > is expected to be faster than rep stosl. OK, I did not know about that. However, as I know this feature was introduced in 2012 with

Re: [Xen-devel] [PATCH v2 02/23] x86/boot: copy only text section from *.lnk file to *.bin file

2015-07-22 Thread Daniel Kiper
On Wed, Jul 22, 2015 at 02:02:11AM -0600, Jan Beulich wrote: > >>> On 21.07.15 at 19:23, wrote: > > First of all ld generates .got.plt section and objcopy copy it to binary > > file. > > It is not needed because we do not link our stuff here with shared > > libraries. > > So, we can use -R objcopy

Re: [Xen-devel] [PATCHv2 00/10] mm, xen/balloon: memory hotplug improvements

2015-07-27 Thread Daniel Kiper
On Fri, Jul 24, 2015 at 12:47:38PM +0100, David Vrabel wrote: > The series improves the use of hotplug memory in the Xen balloon > driver. > > - Reliably find a non-conflicting location for the hotplugged memory > (this fixes memory hotplug in a number of cases, particularly in > dom0). > > - U

Re: [Xen-devel] [PATCH v2 01/23] x86/boot: remove unneeded instruction

2015-07-27 Thread Daniel Kiper
On Fri, Jul 24, 2015 at 12:22:57PM -0400, Konrad Rzeszutek Wilk wrote: > On Mon, Jul 20, 2015 at 04:28:56PM +0200, Daniel Kiper wrote: > > Signed-off-by: Daniel Kiper > > Don't you use it in: > > /* Switch to low-memory stack. */ > 193 mov sym_phy

Re: [Xen-devel] [PATCHv2 01/10] mm: memory hotplug with an existing resource

2015-07-28 Thread Daniel Kiper
sts will make use of this in their balloon driver to hotplug > arbitrary amounts of memory in response to toolstack requests. > > Signed-off-by: David Vrabel > Cc: Andrew Morton Reviewed-by: Daniel Kiper Daniel ___ Xen-devel mail

Re: [Xen-devel] [PATCHv2 05/10] xen/balloon: rationalize memory hotplug stats

2015-07-28 Thread Daniel Kiper
; hotplugged regions (note that this includes not yet onlined pages). > > This will be used in the following commit when deciding whether > additional memory needs to be hotplugged. > > Signed-off-by: David Vrabel Reviewed-by: Daniel Kiper Daniel __

Re: [Xen-devel] [PATCHv2 06/10] xen/balloon: only hotplug additional memory if required

2015-07-29 Thread Daniel Kiper
On Fri, Jul 24, 2015 at 12:47:44PM +0100, David Vrabel wrote: > Now that we track the total number of pages (included hotplugged > regions), it is easy to determine if more memory needs to be > hotplugged. > > Add a new BP_WAIT state to signal that the balloon process needs to > wait until kicked b

Re: [Xen-devel] [PATCHv2 09/10] x86/xen: export xen_alloc_p2m_entry()

2015-07-29 Thread Daniel Kiper
will require no further allocations. > > Signed-off-by: David Vrabel Reviewed-by: Daniel Kiper ... but please add line in commit message saying that stuff from this patch will be used by next one. Daniel ___ Xen-devel mailing list Xen-dev

Re: [Xen-devel] [PATCHv3 01/10] mm: memory hotplug with an existing resource

2015-07-31 Thread Daniel Kiper
On Thu, Jul 30, 2015 at 06:03:03PM +0100, David Vrabel wrote: > Add add_memory_resource() to add memory using an existing "System RAM" > resource. This is useful if the memory region is being located by > finding a free resource slot with allocate_resource(). > > Xen guests will make use of this i

Re: [Xen-devel] [PATCHv3 06/10] xen/balloon: only hotplug additional memory if required

2015-07-31 Thread Daniel Kiper
wait until kicked by the memory add notifier (when the new section is > onlined by userspace). > > Signed-off-by: David Vrabel Reviewed-by: Daniel Kiper Daniel ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCHv3 08/10] xen/balloon: use hotplugged pages for foreign mappings etc.

2015-07-31 Thread Daniel Kiper
o the guest and reduces > fragmentation in the p2m. > > This is only enabled if the xen.balloon.hotplug_unpopulated sysctl is > set to 1. This sysctl defaults to 0 in case the udev rules to > automatically online hotplugged memory do not exist. > > Signed-off-by: David Vrabel

Re: [Xen-devel] [PATCHv3 09/10] x86/xen: export xen_alloc_p2m_entry()

2015-07-31 Thread Daniel Kiper
will require no further allocations. > > Signed-off-by: David Vrabel Reviewed-by: Daniel Kiper Daniel ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCHv3 10/10] xen/balloon: pre-allocate p2m entries for ballooned pages

2015-07-31 Thread Daniel Kiper
ing the (shared) missing tables and a subsequent > set_phys_to_machine() will need to allocate new tables. > > Since the grant mapping may be done from a context that cannot sleep, > the p2m entries must already be allocated. > > Signed-off-by: David Vrabel Reviewed-by: Daniel Kiper

Re: [Xen-devel] EFI GetNextVariableName crashes when running under Xen, but not under Linux. efi-rs=0 works. No memmap issues

2015-01-27 Thread Daniel Kiper
On Tue, Jan 27, 2015 at 07:54:30AM +, Jan Beulich wrote: > (re-adding xen-devel) > > >>> On 27.01.15 at 01:32, wrote: > > On 27/01/2015 00:02, Daniel Kiper wrote: > >> On Mon, Jan 26, 2015 at 05:00:41PM +, Jan Beulich wrote: > >>>>>>

Re: [Xen-devel] EFI GetNextVariableName crashes when running under Xen, but not under Linux. efi-rs=0 works. No memmap issues

2015-01-28 Thread Daniel Kiper
On Wed, Jan 28, 2015 at 08:43:19AM +, Jan Beulich wrote: > >>> On 27.01.15 at 21:18, wrote: > > On Tue, Jan 27, 2015 at 07:54:30AM +, Jan Beulich wrote: > >> Plus the issue here is not just a matter of mapping BS memory, but > >> also not making it available to the allocator. That in turn

Re: [Xen-devel] EFI GetNextVariableName crashes when running under Xen, but not under Linux. efi-rs=0 works. No memmap issues

2015-01-28 Thread Daniel Kiper
On Wed, Jan 28, 2015 at 11:03:19AM -0500, Konrad Rzeszutek Wilk wrote: > On Wed, Jan 28, 2015 at 08:40:44AM +, Jan Beulich wrote: > > >>> On 27.01.15 at 19:20, wrote: > > > On Tue, Jan 27, 2015 at 04:17:05PM +, Jan Beulich wrote: > > >> Again - apart from mapping the range, did you also ma

Re: [Xen-devel] [PATCH] xen/balloon: cancel ballooning if adding new memory failed

2015-01-29 Thread Daniel Kiper
On Thu, Jan 29, 2015 at 06:01:36PM +, David Vrabel wrote: > On 29/01/15 13:36, Ian Campbell wrote: > > On Mon, 2014-09-01 at 18:52 +0100, David Vrabel wrote: > >> If the balloon driver is adding additional memory regions to the > >> balloon and add_memory() fails it will likely continuously fai

Re: [Xen-devel] Is: kexec & EFI Was: Re: EFI GetNextVariableName crashes when running under Xen, but not under Linux. efi-rs=0 works. No memmap issues

2015-01-30 Thread Daniel Kiper
On Fri, Jan 30, 2015 at 02:57:32PM +, David Vrabel wrote: > On 30/01/15 14:52, Konrad Rzeszutek Wilk wrote: > > On Fri, Jan 30, 2015 at 02:40:46PM +, David Vrabel wrote: > >> On 30/01/15 14:17, Konrad Rzeszutek Wilk wrote: > >>> > >>> kexec is OS agnostic? > >> > >> Yes. > >> > >> Extra in

Re: [Xen-devel] Is: kexec & EFI Was: Re: EFI GetNextVariableName crashes when running under Xen, but not under Linux. efi-rs=0 works. No memmap issues

2015-01-30 Thread Daniel Kiper
On Fri, Jan 30, 2015 at 03:34:19PM +, Jan Beulich wrote: > >>> On 30.01.15 at 16:09, wrote: > > I suppose that we should provide additional kexec hypercall > > function which will return info about RS. kexec-tools should > > load new kernel as usual and add relevant argument to its > > command

[Xen-devel] [PATCH 01/18] x86/boot/reloc: mask out MBI_BOOTDEV from mbi flags

2015-01-30 Thread Daniel Kiper
..because it is ignored by Xen. Signed-off-by: Daniel Kiper --- xen/arch/x86/boot/reloc.c |1 - 1 file changed, 1 deletion(-) diff --git a/xen/arch/x86/boot/reloc.c b/xen/arch/x86/boot/reloc.c index f971920..63045c0 100644 --- a/xen/arch/x86/boot/reloc.c +++ b/xen/arch/x86/boot/reloc.c

[Xen-devel] [PATCH 08/18] efi: build xen.gz with EFI code

2015-01-30 Thread Daniel Kiper
fi directly from xen ELF using just simple objcopy. Signed-off-by: Daniel Kiper --- xen/arch/x86/Makefile | 17 +++-- xen/arch/x86/efi/Makefile | 12 ++-- xen/arch/x86/efi/stub.c | 42 -- xen/arch/x86/xen.lds.S|2 --

[Xen-devel] [PATCH 05/18] efi: split efi_enabled to efi_platform and efi_loader

2015-01-30 Thread Daniel Kiper
, split efi_enabled to efi_platform and efi_loader. Signed-off-by: Daniel Kiper --- xen/arch/x86/dmi_scan.c|4 ++-- xen/arch/x86/domain_page.c |2 +- xen/arch/x86/efi/stub.c|5 +++-- xen/arch/x86/mpparse.c |4 ++-- xen/arch/x86/setup.c |8 xen/arch/x86

[Xen-devel] [PATCH 03/18] x86/boot: use %ecx instead of %eax

2015-01-30 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 Reviewed-by: Andrew Cooper --- xen/arch/x86/boot

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

2015-01-30 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 --- xen/arch/x86/boot/reloc.c | 52 - 1 file changed, 33 insertions(+), 19 deletions

[Xen-devel] [PATCH 07/18] efi: run EFI specific code on EFI platform only

2015-01-30 Thread Daniel Kiper
Signed-off-by: Daniel Kiper --- xen/arch/x86/shutdown.c |3 ++- xen/common/efi/boot.c|5 + xen/common/efi/runtime.c |6 ++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/shutdown.c b/xen/arch/x86/shutdown.c index 21f6cf5..1c8336f 100644 --- a

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

2015-01-30 Thread Daniel Kiper
++- xen/drivers/acpi/osl.c|2 +- xen/include/xen/efi.h |6 +- xen/include/xen/multiboot2.h | 169 21 files changed, 1018 insertions(+), 344 deletions(-) Daniel Kiper (18): x86/boot/reloc: mask out MBI_BOOTDEV from mbi flags

[Xen-devel] [PATCH 13/18] efi: create efi_tables()

2015-01-30 Thread Daniel Kiper
..which collects system tables data. We need this to support multiboot2 protocol on EFI platforms. Signed-off-by: Daniel Kiper --- xen/common/efi/boot.c | 51 - 1 file changed, 29 insertions(+), 22 deletions(-) diff --git a/xen/common/efi

[Xen-devel] [PATCH 14/18] efi: create efi_variables()

2015-01-30 Thread Daniel Kiper
..which collects variable store parameters. We need this to support multiboot2 protocol on EFI platforms. Signed-off-by: Daniel Kiper --- xen/common/efi/boot.c | 41 - 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/xen/common/efi/boot.c

[Xen-devel] [PATCH 12/18] efi: create efi_find_gop_mode()

2015-01-30 Thread Daniel Kiper
..which finds suitable GOP mode. We need this to support multiboot2 protocol on EFI platforms. Signed-off-by: Daniel Kiper --- xen/common/efi/boot.c | 94 - 1 file changed, 54 insertions(+), 40 deletions(-) diff --git a/xen/common/efi/boot.c b

[Xen-devel] [PATCH 06/18] x86: remove commented out stale references to efi_enabled

2015-01-30 Thread Daniel Kiper
Signed-off-by: Daniel Kiper --- xen/arch/x86/e820.c | 29 ++--- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/xen/arch/x86/e820.c b/xen/arch/x86/e820.c index bf84bae..47920a3 100644 --- a/xen/arch/x86/e820.c +++ b/xen/arch/x86/e820.c @@ -74,20 +74,18

[Xen-devel] [PATCH 17/18] x86/efi: create new early memory allocator

2015-01-30 Thread Daniel Kiper
__start_xen(). Now solution #2 is implemented but maybe we should consider #1 too. Signed-off-by: Daniel Kiper --- xen/arch/x86/efi/efi-boot.h | 37 + xen/arch/x86/setup.c|3 +-- 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/xen/arch

[Xen-devel] [PATCH 16/18] efi: create efi_exit_boot()

2015-01-30 Thread Daniel Kiper
..which gets memory map and calls ExitBootServices(). We need this to support multiboot2 protocol on EFI platforms. Signed-off-by: Daniel Kiper --- xen/common/efi/boot.c | 79 +++-- 1 file changed, 44 insertions(+), 35 deletions(-) diff --git a/xen

[Xen-devel] [PATCH 09/18] efi: create efi_init()

2015-01-30 Thread Daniel Kiper
..which initializes basic EFI variables. We need this to support multiboot2 protocol on EFI platforms. Signed-off-by: Daniel Kiper --- xen/common/efi/boot.c | 26 -- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/xen/common/efi/boot.c b/xen/common/efi

[Xen-devel] [PATCH 11/18] efi: create efi_get_gop()

2015-01-30 Thread Daniel Kiper
..which gets pointer to GOP device. We need this to support multiboot2 protocol on EFI platforms. Signed-off-by: Daniel Kiper --- xen/common/efi/boot.c | 59 ++--- 1 file changed, 36 insertions(+), 23 deletions(-) diff --git a/xen/common/efi/boot.c

[Xen-devel] [PATCH 15/18] efi: create efi_set_gop_mode()

2015-01-30 Thread Daniel Kiper
..which sets chosen GOP mode. We need this to support multiboot2 protocol on EFI platforms. Signed-off-by: Daniel Kiper --- xen/common/efi/boot.c | 35 +-- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/xen/common/efi/boot.c b/xen/common/efi

[Xen-devel] [PATCH 04/18] xen/x86: add multiboot2 protocol support

2015-01-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 --- xen/arch/x86/boot/Makefile|3 +- xen/arch

[Xen-devel] [PATCH 10/18] efi: create efi_console_set_mode()

2015-01-30 Thread Daniel Kiper
..which sets console mode. We need this to support multiboot2 protocol on EFI platforms. Signed-off-by: Daniel Kiper --- xen/common/efi/boot.c | 37 - 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/xen/common/efi/boot.c b/xen/common/efi

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

2015-01-30 Thread Daniel Kiper
Signed-off-by: Daniel Kiper --- xen/arch/x86/boot/head.S | 174 +++-- xen/arch/x86/efi/efi-boot.h | 29 +++ xen/arch/x86/setup.c | 23 ++--- xen/arch/x86/x86_64/asm-offsets.c |2 + xen/common/efi/boot.c | 11

[Xen-devel] [PATCH 1/5] multiboot2: Fix information request tag size calculation

2015-01-30 Thread Daniel Kiper
Signed-off-by: Daniel Kiper --- grub-core/loader/multiboot_mbi2.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/loader/multiboot_mbi2.c b/grub-core/loader/multiboot_mbi2.c index 6f74aee..d7c19bc 100644 --- a/grub-core/loader/multiboot_mbi2.c +++ b/grub-core

[Xen-devel] [PATCH 2/5] i386/relocator: Remove unused extern grub_relocator64_rip_addr

2015-01-30 Thread Daniel Kiper
Signed-off-by: Daniel Kiper --- grub-core/lib/i386/relocator.c |1 - 1 file changed, 1 deletion(-) diff --git a/grub-core/lib/i386/relocator.c b/grub-core/lib/i386/relocator.c index ffaf25f..71dd4f0 100644 --- a/grub-core/lib/i386/relocator.c +++ b/grub-core/lib/i386/relocator.c @@ -64,7

[Xen-devel] [PATCH 5/5] multiboot2: Add tags used to pass ImageHandle to loaded image

2015-01-30 Thread Daniel Kiper
Add tags used to pass ImageHandle to loaded image. It is used by at least ExitBootServices() function. Signed-off-by: Daniel Kiper --- grub-core/loader/multiboot_mbi2.c | 36 +++- include/multiboot2.h | 16 2 files changed, 47

[Xen-devel] [PATCH 3/5] i386/relocator: Remove unused avoid_efi_bootservices argument

2015-01-30 Thread Daniel Kiper
Signed-off-by: Daniel Kiper --- grub-core/lib/i386/relocator.c |5 ++--- grub-core/loader/i386/bsd.c |6 +++--- grub-core/loader/i386/coreboot/chainloader.c |2 +- grub-core/loader/i386/linux.c|2 +- grub-core/loader/i386/pc/plan9.c

[Xen-devel] [PATCH 0/5] multiboot2: Enable EFI boot services usage in loaded images

2015-01-30 Thread Daniel Kiper
| 11 +++ include/grub/i386/relocator.h| 24 -- include/multiboot2.h | 25 +++ 13 files changed, 270 insertions(+), 29 deletions(-) Daniel Kiper (5): multiboot2: Fix information

[Xen-devel] [PATCH 4/5] i386/relocator: Add grub_relocator64_efi relocator

2015-01-30 Thread Daniel Kiper
relocator too. Signed-off-by: Daniel Kiper --- grub-core/Makefile.core.def |1 + grub-core/lib/i386/relocator.c | 53 +++ grub-core/lib/i386/relocator64_efi.S | 77 ++ grub-core/loader/multiboot.c | 29

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

2015-01-30 Thread Daniel Kiper
On Fri, Jan 30, 2015 at 06:54:04PM +0100, Daniel Kiper wrote: > Hi, > > I am sending, long awaited, first version of multiboot2 protocol > support for legacy BIOS and EFI platforms. By mistake I forgot to thank you Andrew and Konrad for support during development of this series

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

2015-01-30 Thread Daniel Kiper
On Fri, Jan 30, 2015 at 07:06:53PM +, Andrew Cooper wrote: > On 30/01/15 17:54, Daniel Kiper wrote: > > Signed-off-by: Daniel Kiper > > --- > > xen/arch/x86/boot/head.S | 174 > > +++-- > > xen/arch/x86/efi/efi-boo

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

2015-02-03 Thread Daniel Kiper
On Mon, Feb 02, 2015 at 09:28:49AM +, Jan Beulich wrote: > >>> On 30.01.15 at 18:54, wrote: > > - xen.efi build will not so strongly depend > > on a given GCC and binutils version. > > While I can see the possibility of making the binutils version > dependency go away (by manually creati

Re: [Xen-devel] [PATCH 03/18] x86/boot: use %ecx instead of %eax

2015-02-03 Thread Daniel Kiper
On Tue, Feb 03, 2015 at 10:02:09AM +, Jan Beulich wrote: > >>> On 30.01.15 at 18:54, wrote: > > /* Save the Multiboot info struct (after relocation) for later > > use. */ > > mov $sym_phys(cpu0_stack)+1024,%esp > > -push%ebx > > -callreloc > > +

Re: [Xen-devel] [PATCH 0/5] multiboot2: Enable EFI boot services usage in loaded images

2015-02-09 Thread Daniel Kiper
Hi all, On Fri, Jan 30, 2015 at 06:59:23PM +0100, Daniel Kiper wrote: > Hi, > > This patch series enable EFI boot services usage > in loaded images by multiboot2 protocol. Guys, do you have any comments on this patch series? Should I fix something? Could you apply them to GRUB2 tree?

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

2015-02-09 Thread Daniel Kiper
Hi all, On Fri, Jan 30, 2015 at 06:54:04PM +0100, Daniel Kiper wrote: > Hi, > > I am sending, long awaited, first version of multiboot2 protocol > support for legacy BIOS and EFI platforms. > > The final goal is xen.efi binary file which could be loaded by EFI > loader, mu

Re: [Xen-devel] [PATCH] kexec-tools: Read always one vmcoreinfo file

2014-11-13 Thread Daniel Kiper
Hi Petr, On Thu, Nov 13, 2014 at 04:51:48PM +0100, Petr Tesarik wrote: > Hi all, > > this thread got somehow forgotten because of vacations... > Anyway, read below. > > On Tue, 24 Jul 2012 15:54:10 +0200 > Daniel Kiper wrote: > > > On Tue, Jul 24, 2012 at 10:18:

Re: [Xen-devel] delaying 4.4.2 and 4.3.4

2014-11-18 Thread Daniel Kiper
On Thu, Nov 13, 2014 at 09:05:47AM +, Jan Beulich wrote: > All, > > while the 3 month period since the previous stable releases would > expire at the beginning of December, looking at the number of > changes in the stable trees I don't think starting preparations right > now would make much sen

Re: [Xen-devel] Backport request for "tools/hotplug: set mtu from bridge for tap interface"

2014-11-19 Thread Daniel Kiper
On Tue, Nov 18, 2014 at 06:24:31PM +, Ian Jackson wrote: > Daniel Kiper writes ("Re: [Xen-devel] delaying 4.4.2 and 4.3.4"): > > By the way, what I should do to have commit > > f3f5f1927f0d3aef9e3d2ce554dbfa0de73487d5 > > (tools/hotplug: set mtu from bridge for

Re: [Xen-devel] kdump with xen-unstable on efi machine

2014-11-26 Thread Daniel Kiper
On Wed, Nov 26, 2014 at 03:49:54PM +0100, Juergen Gross wrote: > On 11/26/2014 03:30 PM, Konrad Rzeszutek Wilk wrote: > >On Wed, Nov 26, 2014 at 03:01:51PM +0100, Juergen Gross wrote: > >>On 11/26/2014 01:41 PM, Andrew Cooper wrote: > >>>On 26/11/14 12:15, Juergen Gross wrote: > Hi, > > >>

[Xen-devel] [PATCH for-xen-4.5] console: increase initial conring size

2014-12-02 Thread Daniel Kiper
. Hence, this patch increases initial conring size to 64 KiB. Signed-off-by: Daniel Kiper --- xen/drivers/char/console.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c index 2f03259..429d296 100644 --- a/xen/drivers/char

[Xen-devel] [PATCH for-xen-4.5 2/3] gitignore: ignore some files generated by configure

2014-12-02 Thread Daniel Kiper
Signed-off-by: Daniel Kiper --- .gitignore |3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index b24e905..2b51d5f 100644 --- a/.gitignore +++ b/.gitignore @@ -141,12 +141,15 @@ tools/flask/utils/flask-set-bool tools/flask/utils/flask-label-pci tools/hotplug

[Xen-devel] [PATCH for-xen-4.5 1/3] tools/hotplug: distclean target should remove files generated by configure

2014-12-02 Thread Daniel Kiper
Signed-off-by: Daniel Kiper --- tools/Makefile |3 +++ tools/hotplug/Makefile |5 - 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/Makefile b/tools/Makefile index af9798a..19b24f3 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -261,6 +261,9 @@ subdir

[Xen-devel] [PATCH for-xen-4.5 3/3] gitignore: group tools/hotplug files in one place

2014-12-02 Thread Daniel Kiper
Signed-off-by: Daniel Kiper --- .gitignore |9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 2b51d5f..8c8c06f 100644 --- a/.gitignore +++ b/.gitignore @@ -145,6 +145,10 @@ tools/hotplug/Linux/init.d/sysconfig.xencommons tools/hotplug

[Xen-devel] [PATCH for-xen-4.5 0/3] tools: build system fixes and cleanups

2014-12-02 Thread Daniel Kiper
nice to have but not required at this stage of 4.5 development. Daniel .gitignore | 12 +++- tools/Makefile |3 +++ tools/hotplug/Makefile |5 - 3 files changed, 14 insertions(+), 6 deletions(-) Daniel Kiper (3): tools/hotplug: distclean target

Re: [Xen-devel] [PATCH for-xen-4.5] console: increase initial conring size

2014-12-03 Thread Daniel Kiper
On Tue, Dec 02, 2014 at 03:58:53PM +, Jan Beulich wrote: > >>> Daniel Kiper 12/02/14 3:58 PM >>> > >In general initial conring size is sufficient. However, if log > >level is increased on platforms which have e.g. huge number > >of memory regions (I hav

Re: [Xen-devel] [PATCH for-xen-4.5 1/3] tools/hotplug: distclean target should remove files generated by configure

2014-12-03 Thread Daniel Kiper
On Tue, Dec 02, 2014 at 01:36:20PM -0500, Konrad Rzeszutek Wilk wrote: > On Tue, Dec 02, 2014 at 04:16:28PM +0100, Daniel Kiper wrote: > > Signed-off-by: Daniel Kiper > > This usage scenario which I can see this being useful (and > I've tripped over this) is when you rebui

<    4   5   6   7   8   9