Re: [PATCH 0/2] templates/linux_xen: Properly handle multiple initrd files

2022-08-11 Thread Juergen Gross via Grub-devel
tiple initrd files templates/linux_xen: Properly order the multiple initrd files util/grub.d/20_linux_xen.in | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) For both patches: Acked-by: Juergen Gross Juergen OpenPGP_0xB0DE9DD628BF132F.asc Description: OpenPGP public key O

Re: grub2 + xen + lz4 kernels

2021-12-01 Thread Juergen Gross via Grub-devel
On 01.12.21 20:24, Shaun Reitan wrote: Hi Daniel thanks for your reply!  You mentioned finding a new LZ4 library but grub2 already looks to support lz4 compressed kernels. The issue is that they don't look to be supported under the Xen platform with a target of x86_64. Grub does "support" lz4

Re: grub2 + xen + lz4 kernels

2021-11-29 Thread Juergen Gross via Grub-devel
On 30.11.21 00:25, Shaun Reitan wrote: I currently use XEN to boot PV (paravirt) virtual server instances for our customers. Grub2 introduced support for booting a xen kernel directly from a guests disk image which has worked great for years. We use the following command to build our image gr

Re: GRUB Xen PVH chainloading

2019-01-07 Thread Juergen Gross
On 07/01/2019 12:41, Colin Watson wrote: > Hi, > > I'm working on integrating the recently-merged PVH support for GRUB into > the Debian packages. As a result I find myself thinking about how to > handle the two-stage boot loader scheme that our packages currently > implement for PV. I think tha

[PATCH v7 15/20] xen_pvh: add build runes for grub-core

2018-12-07 Thread Juergen Gross
Add the modifications to the build system needed to build a xen_pvh grub. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V3: sorted some filenames (Daniel Kiper) V4: add bus/pci.c to xen_pvh --- gentpl.py | 4 ++-- grub-core/Makefile.am | 12

[PATCH v7 14/20] xen: init memory regions for PVH

2018-12-07 Thread Juergen Gross
Add all usable memory regions to grub memory management and add the needed mmap iterate code, which will be used by grub core (e.g. grub-core/lib/relocator.c or grub-core/mmap/mmap.c). As we are running in 32-bit mode don't add memory above 4GB. Signed-off-by: Juergen Gross Reviewed-by: D

Re: [PATCH v6.1 09/20] xen: add basic hooks for PVH in current code

2018-12-07 Thread Juergen Gross
On 07/12/2018 12:50, Daniel Kiper wrote: > On Fri, Dec 07, 2018 at 08:35:26AM +0100, Juergen Gross wrote: >> Add the hooks to current code needed for Xen PVH. They will be filled >> with code later when the related functionality is being added. >> >> loader/i386/linux

[PATCH v7 17/20] xen: use elfnote defines instead of plain numbers

2018-12-07 Thread Juergen Gross
In order to avoid using plain integers for the ELF notes use the available Xen include instead. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V5: new patch (Daniel Kiper) --- util/grub-mkimagexx.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a

[PATCH v7 12/20] xen: get memory map from hypervisor for PVH

2018-12-07 Thread Juergen Gross
Retrieve the memory map from the hypervisor and normalize it to contain no overlapping entries and to be sorted by address. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V3: use grub_e820_mmap_entry instead of own struct (Daniel Kiper) --- grub-core/kern/i386/xen/pvh.c | 94

[PATCH v7 18/20] xen_pvh: support building a standalone image

2018-12-07 Thread Juergen Gross
Support mkimage for xen_pvh. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V2: some style adjustments (Daniel Kiper) use defines for elf-notes (Daniel Kiper) V5: move elf-note define usage into new patch (Daniel Kiper) I didn't replace the 4096 by a PAGE_SIZE mac

[PATCH v7 13/20] xen: setup Xen specific data for PVH

2018-12-07 Thread Juergen Gross
again. Set the RSDP address for the guest from the start_info page passed as boot parameter. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper Reviewed-by: Roger Pau Monné --- V4: write back memory map to Xen (Roger Pau Monné) V5: add comment (Daniel Kiper) --- grub-core/kern/i386/xen/pvh.c

[PATCH v7 19/20] xen_pvh: support grub-install for xen_pvh

2018-12-07 Thread Juergen Gross
Add xen_pvh support to grub-install. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- include/grub/util/install.h | 1 + util/grub-install-common.c | 1 + util/grub-install.c | 7 +++ 3 files changed, 9 insertions(+) diff --git a/include/grub/util/install.h b/include

[PATCH v7 16/20] grub-module-verifier: Ignore all_video for xenpvh

2018-12-07 Thread Juergen Gross
Signed-off-by: Juergen Gross --- util/grub-module-verifier.c | 1 + 1 file changed, 1 insertion(+) diff --git a/util/grub-module-verifier.c b/util/grub-module-verifier.c index 03ba1ab43..97cb9 100644 --- a/util/grub-module-verifier.c +++ b/util/grub-module-verifier.c @@ -129,6 +129,7

[PATCH v7 11/20] xen: setup hypercall page for PVH

2018-12-07 Thread Juergen Gross
Add the needed code to setup the hypercall page for calling into the Xen hypervisor. Import the XEN_HVM_DEBUGCONS_IOPORT define from Xen unstable into include/xen/arch-x86/xen.h Signed-off-by: Juergen Gross Reviewed-by: Roger Pau Monné --- V3: grub_xen_early_halt->grub_xen_panic (Roger

[PATCH v7 09/20] xen: add basic hooks for PVH in current code

2018-12-07 Thread Juergen Gross
header for some i386 platforms (efi, coreboot, ieee1275, xen) and for x86_64 efi. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V3: xenpvh->xen_pvh (Daniel Kiper) adjust copyright date (Roger Pau Monné) V5: update commit message (Daniel Kiper) move including xen/

[PATCH v7 07/20] xen: modify grub_xen_ptr2mfn() for xen-pvh

2018-12-07 Thread Juergen Gross
grub_xen_ptr2mfn() returns the machine frame number for a given pointer value. For Xen-PVH guests this is just the PFN. Add the PVH specific variant. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V5: new patch (Daniel Kiper) --- grub-core/kern/xen/init.c | 2 ++ 1 file changed, 2

[PATCH v7 06/20] xen: rearrange xen/init.c to prepare it for Xen PVH mode

2018-12-07 Thread Juergen Gross
Rearrange grub-core/kern/xen/init.c to prepare adding PVH mode support to it. This includes putting some code under #ifdef GRUB_MACHINE_XEN as it will not be used when running as PVH. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- grub-core/kern/xen/init.c | 60

[PATCH v7 10/20] xen: add PVH boot entry code

2018-12-07 Thread Juergen Gross
Add the code for the Xen PVH mode boot entry. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V3: clear %fs and %gs, too (Daniel Kiper) use GRUB_MEMORY_MACHINE_PROT_STACK_SIZE for stack size (Daniel Kiper) V5: reorder clearing segment regs (Daniel Kiper) --- grub-core/kern/i386

[PATCH v7 01/20] xen: add some xen headers

2018-12-07 Thread Juergen Gross
. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V2: update commit message (Daniel Kiper) --- include/xen/hvm/hvm_op.h | 296 +++ include/xen/hvm/params.h | 284 ++ include/xen/hvm/start_info.h | 98 +++ include/xen/memory.h | 665

[PATCH v7 04/20] xen: prepare common code for Xen PVH support

2018-12-07 Thread Juergen Gross
of struct grub_e820_mmap_entry from grub-core/mmap/i386/pc/mmap.c to include/grub/i386/memory.h in order to make it usable from xen_pvh code. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V3: GRUB_MACHINE_XENPVH -> GRUB_MACHINE_XEN_PVH (Daniel Kiper) split include/grub/i386

[PATCH v7 20/20] xen_pvh: add support to configure

2018-12-07 Thread Juergen Gross
Support platform i386/xen_pvh in configure. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- configure.ac | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure.ac b/configure.ac index 5e63c4af3..81a19afd5 100644 --- a/configure.ac +++ b/configure.ac @@ -151,6 +151,7

[PATCH v7 05/20] xen: add some dummy headers for PVH mode

2018-12-07 Thread Juergen Gross
order to avoid the definition of grub_bios_interrupt(). xen_pvh/memory.h needs to include coreboot/memory.h (like some other /memory.h do as well) as this contains just the needed stubs. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V3: updated commit message (Daniel Kiper) xenpvh

[PATCH v7 03/20] xen: carve out grant tab initialization into dedicated function

2018-12-07 Thread Juergen Gross
Initialize the grant tab in a dedicated function. This will enable using it for PVH guests, too. Call the new function from grub_machine_init() as this will later be common between Xen PV and Xen PVH mode. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V2: update commit message

[PATCH v7 02/20] loader/linux: support passing rsdp address via boot params

2018-12-07 Thread Juergen Gross
Xen PVH guests will have the RSDP at an arbitrary address. Support that by passing the RSDP address via the boot parameters to Linux. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V2: add oring 0x8000 to version field V3: move including machine/kernel.h to patch 8 (Daniel Kiper) V5

[PATCH v7 00/20] xen: add pvh guest support

2018-12-07 Thread Juergen Gross
comments (see individual patches) Hans van Kranenburg (1): grub-module-verifier: Ignore all_video for xenpvh Juergen Gross (19): xen: add some xen headers loader/linux: support passing rsdp address via boot params xen: carve out grant tab initialization into dedicated function xen: prepar

[PATCH v7 08/20] xen: add PVH specific defines to offset.h

2018-12-07 Thread Juergen Gross
include/grub/offsets.h needs some defines for Xen PVH mode. Add them. While at it line up the values in the surrounding lines to start at the same column. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V3: XENPVH->XEN_PVH (Daniel Kiper) --- include/grub/offsets.h |

[PATCH v6.1 09/20] xen: add basic hooks for PVH in current code

2018-12-06 Thread Juergen Gross
header for some i386 platforms (efi, coreboot, ieee1275, xen). Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V3: xenpvh->xen_pvh (Daniel Kiper) adjust copyright date (Roger Pau Monné) V5: update commit message (Daniel Kiper) move including xen/hvm/start_info.h to the sour

[PATCH v6 16/20] grub-module-verifier: Ignore all_video for xenpvh

2018-11-28 Thread Juergen Gross
Signed-off-by: Juergen Gross --- util/grub-module-verifier.c | 1 + 1 file changed, 1 insertion(+) diff --git a/util/grub-module-verifier.c b/util/grub-module-verifier.c index 03ba1ab43..97cb9 100644 --- a/util/grub-module-verifier.c +++ b/util/grub-module-verifier.c @@ -129,6 +129,7

[PATCH v6 18/20] xen_pvh: support building a standalone image

2018-11-28 Thread Juergen Gross
Support mkimage for xen_pvh. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V2: some style adjustments (Daniel Kiper) use defines for elf-notes (Daniel Kiper) V5: move elf-note define usage into new patch (Daniel Kiper) I didn't replace the 4096 by a PAGE_SIZE mac

[PATCH v6 19/20] xen_pvh: support grub-install for xen_pvh

2018-11-28 Thread Juergen Gross
Add xen_pvh support to grub-install. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- include/grub/util/install.h | 1 + util/grub-install-common.c | 1 + util/grub-install.c | 7 +++ 3 files changed, 9 insertions(+) diff --git a/include/grub/util/install.h b/include

[PATCH v6 15/20] xen_pvh: add build runes for grub-core

2018-11-28 Thread Juergen Gross
Add the modifications to the build system needed to build a xen_pvh grub. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V3: sorted some filenames (Daniel Kiper) V4: add bus/pci.c to xen_pvh --- gentpl.py | 4 ++-- grub-core/Makefile.am | 12

[PATCH v6 17/20] xen: use elfnote defines instead of plain numbers

2018-11-28 Thread Juergen Gross
In order to avoid using plain integers for the ELF notes use the available Xen include instead. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V5: new patch (Daniel Kiper) --- util/grub-mkimagexx.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a

[PATCH v6 01/20] xen: add some xen headers

2018-11-28 Thread Juergen Gross
. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V2: update commit message (Daniel Kiper) --- include/xen/hvm/hvm_op.h | 296 +++ include/xen/hvm/params.h | 284 ++ include/xen/hvm/start_info.h | 98 +++ include/xen/memory.h | 665

[PATCH v6 20/20] xen_pvh: add support to configure

2018-11-28 Thread Juergen Gross
Support platform i386/xen_pvh in configure. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- configure.ac | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure.ac b/configure.ac index 5e63c4af3..81a19afd5 100644 --- a/configure.ac +++ b/configure.ac @@ -151,6 +151,7

[PATCH v6 06/20] xen: rearrange xen/init.c to prepare it for Xen PVH mode

2018-11-28 Thread Juergen Gross
Rearrange grub-core/kern/xen/init.c to prepare adding PVH mode support to it. This includes putting some code under #ifdef GRUB_MACHINE_XEN as it will not be used when running as PVH. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- grub-core/kern/xen/init.c | 60

[PATCH v6 12/20] xen: get memory map from hypervisor for PVH

2018-11-28 Thread Juergen Gross
Retrieve the memory map from the hypervisor and normalize it to contain no overlapping entries and to be sorted by address. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V3: use grub_e820_mmap_entry instead of own struct (Daniel Kiper) --- grub-core/kern/i386/xen/pvh.c | 94

[PATCH v6 09/20] xen: add basic hooks for PVH in current code

2018-11-28 Thread Juergen Gross
Add the hooks to current code needed for Xen PVH. They will be filled with code later when the related functionality is being added. loader/i386/linux.c needs to include machine/kernel.h now as it needs to get GRUB_KERNEL_USE_RSDP_ADDR from there. Signed-off-by: Juergen Gross Reviewed-by

[PATCH v6 07/20] xen: modify grub_xen_ptr2mfn() for xen-pvh

2018-11-28 Thread Juergen Gross
grub_xen_ptr2mfn() returns the machine frame number for a given pointer value. For Xen-PVH guests this is just the PFN. Add the PVH specific variant. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V5: new patch (Daniel Kiper) --- grub-core/kern/xen/init.c | 2 ++ 1 file changed, 2

[PATCH v6 13/20] xen: setup Xen specific data for PVH

2018-11-28 Thread Juergen Gross
again. Set the RSDP address for the guest from the start_info page passed as boot parameter. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper Reviewed-by: Roger Pau Monné --- V4: write back memory map to Xen (Roger Pau Monné) V5: add comment (Daniel Kiper) --- grub-core/kern/i386/xen/pvh.c

[PATCH v6 05/20] xen: add some dummy headers for PVH mode

2018-11-28 Thread Juergen Gross
order to avoid the definition of grub_bios_interrupt(). xen_pvh/memory.h needs to include coreboot/memory.h (like some other /memory.h do as well) as this contains just the needed stubs. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V3: updated commit message (Daniel Kiper) xenpvh

[PATCH v6 00/20] xen: add pvh guest support

2018-11-28 Thread Juergen Gross
b-module-verifier: Ignore all_video for xenpvh Juergen Gross (19): xen: add some xen headers loader/linux: support passing rsdp address via boot params xen: carve out grant tab initialization into dedicated function xen: prepare common code for Xen PVH support xen: add some dummy headers for

[PATCH v6 08/20] xen: add PVH specific defines to offset.h

2018-11-28 Thread Juergen Gross
include/grub/offsets.h needs some defines for Xen PVH mode. Add them. While at it line up the values in the surrounding lines to start at the same column. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V3: XENPVH->XEN_PVH (Daniel Kiper) --- include/grub/offsets.h |

[PATCH v6 14/20] xen: init memory regions for PVH

2018-11-28 Thread Juergen Gross
Add all usable memory regions to grub memory management and add the needed mmap iterate code, which will be used by grub core (e.g. grub-core/lib/relocator.c or grub-core/mmap/mmap.c). As we are running in 32-bit mode don't add memory above 4GB. Signed-off-by: Juergen Gross Reviewed-by: D

[PATCH v6 10/20] xen: add PVH boot entry code

2018-11-28 Thread Juergen Gross
Add the code for the Xen PVH mode boot entry. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V3: clear %fs and %gs, too (Daniel Kiper) use GRUB_MEMORY_MACHINE_PROT_STACK_SIZE for stack size (Daniel Kiper) V5: reorder clearing segment regs (Daniel Kiper) --- grub-core/kern/i386

[PATCH v6 11/20] xen: setup hypercall page for PVH

2018-11-28 Thread Juergen Gross
Add the needed code to setup the hypercall page for calling into the Xen hypervisor. Import the XEN_HVM_DEBUGCONS_IOPORT define from Xen unstable into include/xen/arch-x86/xen.h Signed-off-by: Juergen Gross Reviewed-by: Roger Pau Monné --- V3: grub_xen_early_halt->grub_xen_panic (Roger

[PATCH v6 04/20] xen: prepare common code for Xen PVH support

2018-11-28 Thread Juergen Gross
of struct grub_e820_mmap_entry from grub-core/mmap/i386/pc/mmap.c to include/grub/i386/memory.h in order to make it usable from xen_pvh code. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V3: GRUB_MACHINE_XENPVH -> GRUB_MACHINE_XEN_PVH (Daniel Kiper) split include/grub/i386

[PATCH v6 03/20] xen: carve out grant tab initialization into dedicated function

2018-11-28 Thread Juergen Gross
Initialize the grant tab in a dedicated function. This will enable using it for PVH guests, too. Call the new function from grub_machine_init() as this will later be common between Xen PV and Xen PVH mode. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V2: update commit message

[PATCH v6 02/20] loader/linux: support passing rsdp address via boot params

2018-11-28 Thread Juergen Gross
Xen PVH guests will have the RSDP at an arbitrary address. Support that by passing the RSDP address via the boot parameters to Linux. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V2: add oring 0x8000 to version field V3: move including machine/kernel.h to patch 8 (Daniel Kiper) V5

Re: [PATCH v5 15/20] xen_pvh: add build runes for grub-core

2018-11-28 Thread Juergen Gross
On 27/11/2018 22:17, Daniel Kiper wrote: > On Wed, Nov 21, 2018 at 03:28:50PM +0100, Juergen Gross wrote: >> Add the modifications to the build system needed to build a xen_pvh >> grub. >> >> Signed-off-by: Juergen Gross >> Reviewed-by: Daniel Kiper >> -

Re: [PATCH v5 01/20] xen: add some xen headers

2018-11-28 Thread Juergen Gross
On 28/11/2018 12:31, Daniel Kiper wrote: > On Wed, Nov 21, 2018 at 03:28:36PM +0100, Juergen Gross wrote: >> In order to support grub2 in Xen PVH environment some additional Xen >> headers are needed as grub2 will be started in PVH mode requiring to >> use several HVM hype

Re: [PATCH v5 11/20] xen: setup hypercall page for PVH

2018-11-28 Thread Juergen Gross
On 28/11/2018 12:28, Daniel Kiper wrote: > On Tue, Nov 27, 2018 at 09:31:10PM +0100, Daniel Kiper wrote: >> On Wed, Nov 21, 2018 at 03:28:46PM +0100, Juergen Gross wrote: >>> Add the needed code to setup the hypercall page for calling into the >>> Xen hyp

[PATCH v5 15/20] xen_pvh: add build runes for grub-core

2018-11-21 Thread Juergen Gross
Add the modifications to the build system needed to build a xen_pvh grub. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V3: sorted some filenames (Daniel Kiper) V4: add bus/pci.c to xen_pvh --- gentpl.py | 4 ++-- grub-core/Makefile.am | 12

[PATCH v5 11/20] xen: setup hypercall page for PVH

2018-11-21 Thread Juergen Gross
Add the needed code to setup the hypercall page for calling into the Xen hypervisor. Import the XEN_HVM_DEBUGCONS_IOPORT define from Xen unstable into include/xen/arch-x86/xen.h Signed-off-by: Juergen Gross --- V3: grub_xen_early_halt->grub_xen_panic (Roger Pau Monné) issue panic mess

[PATCH v5 14/20] xen: init memory regions for PVH

2018-11-21 Thread Juergen Gross
Add all usable memory regions to grub memory management and add the needed mmap iterate code, which will be used by grub core (e.g. grub-core/lib/relocator.c or grub-core/mmap/mmap.c). As we are running in 32-bit mode don't add memory above 4GB. Signed-off-by: Juergen Gross Reviewed-by: D

[PATCH v5 19/20] xen_pvh: support grub-install for xen_pvh

2018-11-21 Thread Juergen Gross
Add xen_pvh support to grub-install. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- include/grub/util/install.h | 1 + util/grub-install-common.c | 1 + util/grub-install.c | 7 +++ 3 files changed, 9 insertions(+) diff --git a/include/grub/util/install.h b/include

[PATCH v5 20/20] xen_pvh: add support to configure

2018-11-21 Thread Juergen Gross
Support platform i386/xen_pvh in configure. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- configure.ac | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure.ac b/configure.ac index 5e63c4af3..81a19afd5 100644 --- a/configure.ac +++ b/configure.ac @@ -151,6 +151,7

[PATCH v5 18/20] xen_pvh: support building a standalone image

2018-11-21 Thread Juergen Gross
Support mkimage for xen_pvh. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V2: some style adjustments (Daniel Kiper) use defines for elf-notes (Daniel Kiper) V5: move elf-note define usage into new patch (Daniel Kiper) I didn't replace the 4096 by a PAGE_SIZE mac

[PATCH v5 01/20] xen: add some xen headers

2018-11-21 Thread Juergen Gross
. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V2: update commit message (Daniel Kiper) --- include/xen/hvm/hvm_op.h | 296 +++ include/xen/hvm/params.h | 284 ++ include/xen/hvm/start_info.h | 98 +++ include/xen/memory.h | 665

[PATCH v5 17/20] xen: use elfnote defines instead of plain numbers

2018-11-21 Thread Juergen Gross
In order to avoid using plain integers for the ELF notes use the available Xen include instead. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V5: new patch (Daniel Kiper) --- util/grub-mkimagexx.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a

[PATCH v5 13/20] xen: setup Xen specific data for PVH

2018-11-21 Thread Juergen Gross
again. Set the RSDP address for the guest from the start_info page passed as boot parameter. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V4: write back memory map to Xen (Roger Pau Monné) V5: add comment (Daniel Kiper) --- grub-core/kern/i386/xen/pvh.c | 120

[PATCH v5 12/20] xen: get memory map from hypervisor for PVH

2018-11-21 Thread Juergen Gross
Retrieve the memory map from the hypervisor and normalize it to contain no overlapping entries and to be sorted by address. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V3: use grub_e820_mmap_entry instead of own struct (Daniel Kiper) --- grub-core/kern/i386/xen/pvh.c | 94

[PATCH v5 08/20] xen: add PVH specific defines to offset.h

2018-11-21 Thread Juergen Gross
include/grub/offsets.h needs some defines for Xen PVH mode. Add them. While at it line up the values in the surrounding lines to start at the same column. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V3: XENPVH->XEN_PVH (Daniel Kiper) --- include/grub/offsets.h |

[PATCH v5 16/20] grub-module-verifier: Ignore all_video for xenpvh

2018-11-21 Thread Juergen Gross
Signed-off-by: Juergen Gross --- util/grub-module-verifier.c | 1 + 1 file changed, 1 insertion(+) diff --git a/util/grub-module-verifier.c b/util/grub-module-verifier.c index 03ba1ab43..97cb9 100644 --- a/util/grub-module-verifier.c +++ b/util/grub-module-verifier.c @@ -129,6 +129,7

[PATCH v5 05/20] xen: add some dummy headers for PVH mode

2018-11-21 Thread Juergen Gross
order to avoid the definition of grub_bios_interrupt(). xen_pvh/memory.h needs to include coreboot/memory.h (like some other /memory.h do as well) as this contains just the needed stubs. Signed-off-by: Juergen Gross --- V3: updated commit message (Daniel Kiper) xenpvh->xen_pvh (Daniel Kiper)

[PATCH v5 04/20] xen: prepare common code for Xen PVH support

2018-11-21 Thread Juergen Gross
of struct grub_e820_mmap_entry from grub-core/mmap/i386/pc/mmap.c to include/grub/i386/memory.h in order to make it usable from xen_pvh code. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V3: GRUB_MACHINE_XENPVH -> GRUB_MACHINE_XEN_PVH (Daniel Kiper) split include/grub/i386

[PATCH v5 00/20] xen: add pvh guest support

2018-11-21 Thread Juergen Gross
into 10 patches - fix memmap handling for >4GB of memory - added new patch from Hans (thanks for that one) - addressed most of Daniel's comments (see individual patches) Hans van Kranenburg (1): grub-module-verifier: Ignore all_video for xenpvh Juergen Gross (19): xen: add some xen

[PATCH v5 10/20] xen: add PVH boot entry code

2018-11-21 Thread Juergen Gross
Add the code for the Xen PVH mode boot entry. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V3: clear %fs and %gs, too (Daniel Kiper) use GRUB_MEMORY_MACHINE_PROT_STACK_SIZE for stack size (Daniel Kiper) V5: reorder clearing segment regs (Daniel Kiper) --- grub-core/kern/i386

[PATCH v5 09/20] xen: add basic hooks for PVH in current code

2018-11-21 Thread Juergen Gross
Add the hooks to current code needed for Xen PVH. They will be filled with code later when the related functionality is being added. loader/i386/linux.c needs to include machine/kernel.h now as it needs to get GRUB_KERNEL_USE_RSDP_ADDR from there. Signed-off-by: Juergen Gross --- V3: xenpvh

[PATCH v5 02/20] loader/linux: support passing rsdp address via boot params

2018-11-21 Thread Juergen Gross
Xen PVH guests will have the RSDP at an arbitrary address. Support that by passing the RSDP address via the boot parameters to Linux. Signed-off-by: Juergen Gross --- V2: add oring 0x8000 to version field V3: move including machine/kernel.h to patch 8 (Daniel Kiper) V5: move acpi_rsdp_addr to

[PATCH v5 06/20] xen: rearrange xen/init.c to prepare it for Xen PVH mode

2018-11-21 Thread Juergen Gross
Rearrange grub-core/kern/xen/init.c to prepare adding PVH mode support to it. This includes putting some code under #ifdef GRUB_MACHINE_XEN as it will not be used when running as PVH. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- grub-core/kern/xen/init.c | 60

[PATCH v5 07/20] xen: modify grub_xen_ptr2mfn() for xen-pvh

2018-11-21 Thread Juergen Gross
grub_xen_ptr2mfn() returns the machine frame number for a given pointer value. For Xen-PVH guests this is just the PFN. Add the PVH specific variant. Signed-off-by: Juergen Gross --- V5: new patch (Daniel Kiper) --- grub-core/kern/xen/init.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a

[PATCH v5 03/20] xen: carve out grant tab initialization into dedicated function

2018-11-21 Thread Juergen Gross
Initialize the grant tab in a dedicated function. This will enable using it for PVH guests, too. Call the new function from grub_machine_init() as this will later be common between Xen PV and Xen PVH mode. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V2: update commit message

Re: [Xen-devel] [PATCH v4 10/19] xen: setup hypercall page for PVH

2018-11-21 Thread Juergen Gross
On 20/11/2018 10:27, Juergen Gross wrote: > On 09/11/2018 19:12, Daniel Kiper wrote: >> On Fri, Nov 02, 2018 at 01:37:29PM +0100, Juergen Gross wrote:>>> + >>> + asm volatile ("wrmsr" : : "c" (msr), "a" (pfn), "d" (0) : &quo

Re: [Xen-devel] [PATCH v4 13/19] xen: setup Xen specific data for PVH

2018-11-21 Thread Juergen Gross
On 15/11/2018 11:03, Roger Pau Monné wrote: > On Fri, Nov 02, 2018 at 01:37:32PM +0100, Juergen Gross wrote: >> Initialize the needed Xen specific data. This is: >> >> - the Xen start of day page containing the console and Xenstore ring >> page PFN and event channel &g

Re: [Xen-devel] [PATCH v4 12/19] xen: add PCI MMIO areas to memory map

2018-11-21 Thread Juergen Gross
On 14/11/2018 13:48, Roger Pau Monné wrote: > On Fri, Nov 02, 2018 at 01:37:31PM +0100, Juergen Gross wrote: >> Add possible PCI space MMIO areas as "Reserved" to the memory map in >> order to avoid using those areas for special Xen pages later. > > TBH, I'm no

Re: [Xen-devel] [PATCH v4 11/19] xen: get memory map from hypervisor for PVH

2018-11-21 Thread Juergen Gross
On 15/11/2018 10:36, Roger Pau Monné wrote: > On Fri, Nov 02, 2018 at 01:37:30PM +0100, Juergen Gross wrote: >> Retrieve the memory map from the hypervisor and normalize it to contain >> no overlapping entries and to be sorted by address. >> >> Signed-off-by: Juerg

Re: [PATCH v4 10/19] xen: setup hypercall page for PVH

2018-11-20 Thread Juergen Gross
On 09/11/2018 19:12, Daniel Kiper wrote: > On Fri, Nov 02, 2018 at 01:37:29PM +0100, Juergen Gross wrote: >> Add the needed code to setup the hypercall page for calling into the >> Xen hypervisor. >> >> Signed-off-by: Juergen Gross >> --- >> V3: grub_xe

Re: [Xen-devel] [PATCH v4 10/19] xen: setup hypercall page for PVH

2018-11-20 Thread Juergen Gross
On 15/11/2018 09:33, Roger Pau Monné wrote: > On Fri, Nov 02, 2018 at 01:37:29PM +0100, Juergen Gross wrote: >> Add the needed code to setup the hypercall page for calling into the >> Xen hypervisor. >> >> Signed-off-by: Juergen Gross > > Thanks, LGTM, jus

Re: [Xen-devel] [PATCH v4 08/19] xen: add basic hooks for PVH in current code

2018-11-08 Thread Juergen Gross
On 08/11/2018 16:45, Daniel Kiper wrote: > On Fri, Nov 02, 2018 at 01:37:27PM +0100, Juergen Gross wrote: >> Add the hooks to current code needed for Xen PVH. They will be filled >> with code later when the related functionality is being added. >> >> Signed-off-by:

Re: [PATCH v4 05/19] xen: add some dummy headers for PVH mode

2018-11-08 Thread Juergen Gross
On 08/11/2018 16:36, Daniel Kiper wrote: > On Wed, Nov 07, 2018 at 03:49:51PM +0100, Juergen Gross wrote: >> On 07/11/2018 13:21, Daniel Kiper wrote: >>> On Fri, Nov 02, 2018 at 01:37:24PM +0100, Juergen Gross wrote: >>>> With Xen PVH mode adding a new machine ty

Re: [PATCH v4 05/19] xen: add some dummy headers for PVH mode

2018-11-07 Thread Juergen Gross
On 07/11/2018 13:21, Daniel Kiper wrote: > On Fri, Nov 02, 2018 at 01:37:24PM +0100, Juergen Gross wrote: >> With Xen PVH mode adding a new machine type the machine related headers >> need to be present for the build to succeed. Most of the headers just >> need to include th

[PATCH v4 04/19] xen: prepare common code for Xen PVH support

2018-11-02 Thread Juergen Gross
of struct grub_e820_mmap_entry from grub-core/mmap/i386/pc/mmap.c to include/grub/i386/memory.h in order to make it usable from xen_pvh code. Signed-off-by: Juergen Gross --- V3: GRUB_MACHINE_XENPVH -> GRUB_MACHINE_XEN_PVH (Daniel Kiper) split include/grub/i386/pc/int.h (Daniel Kiper) m

[PATCH v4 07/19] xen: add PVH specific defines to offset.h

2018-11-02 Thread Juergen Gross
include/grub/offsets.h needs some defines for Xen PVH mode. Add them. While at it line up the values in the surrounding lines to start at the same column. Signed-off-by: Juergen Gross --- V3: XENPVH->XEN_PVH (Daniel Kiper) --- include/grub/offsets.h | 21 - 1 file chan

[PATCH v4 06/19] xen: rearrange xen/init.c to prepare it for Xen PVH mode

2018-11-02 Thread Juergen Gross
Rearrange grub-core/kern/xen/init.c to prepare adding PVH mode support to it. This includes putting some code under #ifdef GRUB_MACHINE_XEN as it will not be used when running as PVH. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- grub-core/kern/xen/init.c | 60

[PATCH v4 09/19] xen: add PVH boot entry code

2018-11-02 Thread Juergen Gross
Add the code for the Xen PVH mode boot entry. Signed-off-by: Juergen Gross --- V3: clear %fs and %gs, too (Daniel Kiper) use GRUB_MEMORY_MACHINE_PROT_STACK_SIZE for stack size (Daniel Kiper) --- grub-core/kern/i386/xen/startup_pvh.S | 52 +++ 1 file changed

[PATCH v4 05/19] xen: add some dummy headers for PVH mode

2018-11-02 Thread Juergen Gross
With Xen PVH mode adding a new machine type the machine related headers need to be present for the build to succeed. Most of the headers just need to include the related common i386 headers. Add those to the tree. Signed-off-by: Juergen Gross --- V3: updated commit message (Daniel Kiper

[PATCH v4 08/19] xen: add basic hooks for PVH in current code

2018-11-02 Thread Juergen Gross
Add the hooks to current code needed for Xen PVH. They will be filled with code later when the related functionality is being added. Signed-off-by: Juergen Gross --- V3: xenpvh->xen_pvh (Daniel Kiper) adjust copyright date (Roger Pau Monné) --- grub-core/kern/i386/xen/pvh.c |

[PATCH v4 13/19] xen: setup Xen specific data for PVH

2018-11-02 Thread Juergen Gross
again. Set the RSDP address for the guest from the start_info page passed as boot parameter. Signed-off-by: Juergen Gross --- V4: write back memory map to Xen (Roger Pau Monné) --- grub-core/kern/i386/xen/pvh.c | 119 ++ 1 file changed, 119 insertions

[PATCH v4 16/19] grub-module-verifier: Ignore all_video for xenpvh

2018-11-02 Thread Juergen Gross
Signed-off-by: Juergen Gross --- util/grub-module-verifier.c | 1 + 1 file changed, 1 insertion(+) diff --git a/util/grub-module-verifier.c b/util/grub-module-verifier.c index 03ba1ab43..97cb9 100644 --- a/util/grub-module-verifier.c +++ b/util/grub-module-verifier.c @@ -129,6 +129,7

[PATCH v4 10/19] xen: setup hypercall page for PVH

2018-11-02 Thread Juergen Gross
Add the needed code to setup the hypercall page for calling into the Xen hypervisor. Signed-off-by: Juergen Gross --- V3: grub_xen_early_halt->grub_xen_panic (Roger Pau Monné) issue panic message (Roger Pau Monné) rewrite grub_xen_hypercall to avoid register variables (Daniel Ki

[PATCH v4 02/19] loader/linux: support passing rsdp address via boot params

2018-11-02 Thread Juergen Gross
and the grub2 supported protocol version) if 2.14 or higher are in effect. Signed-off-by: Juergen Gross --- V2: add oring 0x8000 to version field V3: move including machine/kernel.h to patch 8 (Daniel Kiper) --- grub-core/loader/i386/linux.c | 8 include/grub/i386/linux.h | 5 - 2

[PATCH v4 00/19] xen: add pvh guest support

2018-11-02 Thread Juergen Gross
dividual patches) Hans van Kranenburg (1): grub-module-verifier: Ignore all_video for xenpvh Juergen Gross (18): xen: add some xen headers loader/linux: support passing rsdp address via boot params xen: carve out grant tab initialization into dedicated function xen: prepare common code

[PATCH v4 14/19] xen: init memory regions for PVH

2018-11-02 Thread Juergen Gross
Add all usable memory regions to grub memory management and add the needed mmap iterate code, which will be used by grub core (e.g. grub-core/lib/relocator.c or grub-core/mmap/mmap.c). As we are running in 32-bit mode don't add memory above 4GB. Signed-off-by: Juergen Gross --- grub-core

[PATCH v4 18/19] xen_pvh: support grub-install for xen_pvh

2018-11-02 Thread Juergen Gross
Add xen_pvh support to grub-install. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- include/grub/util/install.h | 1 + util/grub-install-common.c | 1 + util/grub-install.c | 7 +++ 3 files changed, 9 insertions(+) diff --git a/include/grub/util/install.h b/include

[PATCH v4 01/19] xen: add some xen headers

2018-11-02 Thread Juergen Gross
. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V2: update commit message (Daniel Kiper) --- include/xen/hvm/hvm_op.h | 296 +++ include/xen/hvm/params.h | 284 ++ include/xen/hvm/start_info.h | 98 +++ include/xen/memory.h | 665

[PATCH v4 15/19] xen_pvh: add build runes for grub-core

2018-11-02 Thread Juergen Gross
Add the modifications to the build system needed to build a xen_pvh grub. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V3: sorted some filenames (Daniel Kiper) V4: add bus/pci.c to xen_pvh --- gentpl.py | 4 ++-- grub-core/Makefile.am | 12

[PATCH v4 17/19] xen_pvh: support building a standalone image

2018-11-02 Thread Juergen Gross
Support mkimage for xen_pvh. In order to avoid using plain integers for the ELF notes use the available Xen include instead. While at it replace the plain numbers for Xen PV mode, too. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V2: some style adjustments (Daniel Kiper) use

[PATCH v4 03/19] xen: carve out grant tab initialization into dedicated function

2018-11-02 Thread Juergen Gross
Initialize the grant tab in a dedicated function. This will enable using it for PVH guests, too. Call the new function from grub_machine_init() as this will later be common between Xen PV and Xen PVH mode. Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper --- V2: update commit message

[PATCH v4 11/19] xen: get memory map from hypervisor for PVH

2018-11-02 Thread Juergen Gross
Retrieve the memory map from the hypervisor and normalize it to contain no overlapping entries and to be sorted by address. Signed-off-by: Juergen Gross --- V3: use grub_e820_mmap_entry instead of own struct (Daniel Kiper) --- grub-core/kern/i386/xen/pvh.c | 96

[PATCH v4 12/19] xen: add PCI MMIO areas to memory map

2018-11-02 Thread Juergen Gross
Add possible PCI space MMIO areas as "Reserved" to the memory map in order to avoid using those areas for special Xen pages later. Signed-off-by: Juergen Gross --- V4: new patch (Roger Pau Monné) --- grub-core/kern/i386/xen/pvh.c | 70 +++ 1 fi

  1   2   3   4   >