Re: [Qemu-devel] [PATCH v4 6/7] Make the kernel image in the fw_cfg DMA interface bootable

2015-10-05 Thread Gerd Hoffmann
On Fr, 2015-10-02 at 09:40 -0400, Kevin O'Connor wrote: > On Fri, Oct 02, 2015 at 10:09:17AM +0200, Gerd Hoffmann wrote: > > > - read four bytes from under the fw_cfg selector QEMU_CFG_KERNEL_SIZE > > > (0x0008), > > > - if it is zero,return -1 --> no kernel boot requested, > > > - if it is

Re: [Qemu-devel] [PATCH v4 6/7] Make the kernel image in the fw_cfg DMA interface bootable

2015-10-05 Thread Gerd Hoffmann
On Fr, 2015-10-02 at 09:38 -0400, Kevin O'Connor wrote: > On Fri, Oct 02, 2015 at 10:16:26AM +0200, Gerd Hoffmann wrote: > > Hi, > > > > > That's fine with me. Marc - I think qemu_vmlinux_setup() in SeaBIOS > > > with the following would work: > > > > > > void qemu_vmlinux_setup(void) > > > {

Re: [Qemu-devel] [PATCH v4 6/7] Make the kernel image in the fw_cfg DMA interface bootable

2015-10-02 Thread Kevin O'Connor
On Fri, Oct 02, 2015 at 10:16:26AM +0200, Gerd Hoffmann wrote: > Hi, > > > That's fine with me. Marc - I think qemu_vmlinux_setup() in SeaBIOS > > with the following would work: > > > > void qemu_vmlinux_setup(void) > > { > > u32 kernel_size; > > qemu_cfg_read_entry(_size,

Re: [Qemu-devel] [PATCH v4 6/7] Make the kernel image in the fw_cfg DMA interface bootable

2015-10-02 Thread Laszlo Ersek
On 10/02/15 15:25, Laszlo Ersek wrote: > In Dec 2014 - Jan 2015, Matt, Paolo, Jordan & myself had a long > discussion about the different ways to boot an EFI kernel (subject "the > different ways to boot an EFI kernel"). Ultimately Matt wrote an article: > >

Re: [Qemu-devel] [PATCH v4 6/7] Make the kernel image in the fw_cfg DMA interface bootable

2015-10-02 Thread Gerd Hoffmann
Hi, > > Any -kernel boot on x86 will use either linuxboot.bin or multiboot.bin. > > (Except when your firmware is OVMF -- OVMF has its own LoadLinuxLib. So, > if you decide to extend linuxboot.bin / multiboot.bin with the DMA > capability, that can't regress OVMF by definition, and you

Re: [Qemu-devel] [PATCH v4 6/7] Make the kernel image in the fw_cfg DMA interface bootable

2015-10-02 Thread Laszlo Ersek
On 10/02/15 14:07, Gerd Hoffmann wrote: > Hi, > >>> Any -kernel boot on x86 will use either linuxboot.bin or multiboot.bin. >> >> (Except when your firmware is OVMF -- OVMF has its own LoadLinuxLib. So, >> if you decide to extend linuxboot.bin / multiboot.bin with the DMA >> capability, that

Re: [Qemu-devel] [PATCH v4 6/7] Make the kernel image in the fw_cfg DMA interface bootable

2015-10-02 Thread Kevin O'Connor
On Fri, Oct 02, 2015 at 10:09:17AM +0200, Gerd Hoffmann wrote: > > - read four bytes from under the fw_cfg selector QEMU_CFG_KERNEL_SIZE > > (0x0008), > > - if it is zero,return -1 --> no kernel boot requested, > > - if it is nonzero, return 0 --> which means "top priority". > > > > In

Re: [Qemu-devel] [PATCH v4 6/7] Make the kernel image in the fw_cfg DMA interface bootable

2015-10-02 Thread Laszlo Ersek
On 10/02/15 11:01, Gerd Hoffmann wrote: > Hi, > >> A solution that I can see is adding DMA boot capabilities to the >> linuxboot.S optionrom. I was trying to avoid this, but it looks like >> not doing so creates lots of problems. It may be better than adding a >> "nice" shortcut somewhere in

Re: [Qemu-devel] [PATCH v4 6/7] Make the kernel image in the fw_cfg DMA interface bootable

2015-10-02 Thread Gerd Hoffmann
> - read four bytes from under the fw_cfg selector QEMU_CFG_KERNEL_SIZE > (0x0008), > - if it is zero,return -1 --> no kernel boot requested, > - if it is nonzero, return 0 --> which means "top priority". > > In other words, I agree with: > > > -option_rom[nb_option_roms].bootindex =

Re: [Qemu-devel] [PATCH v4 6/7] Make the kernel image in the fw_cfg DMA interface bootable

2015-10-02 Thread Gerd Hoffmann
Hi, > That's fine with me. Marc - I think qemu_vmlinux_setup() in SeaBIOS > with the following would work: > > void qemu_vmlinux_setup(void) > { > u32 kernel_size; > qemu_cfg_read_entry(_size, QEMU_CFG_KERNEL_SIZE, > sizeof(kernel_size)); > if (kernel_size) >

Re: [Qemu-devel] [PATCH v4 6/7] Make the kernel image in the fw_cfg DMA interface bootable

2015-10-02 Thread Gerd Hoffmann
Hi, > A solution that I can see is adding DMA boot capabilities to the > linuxboot.S optionrom. I was trying to avoid this, but it looks like > not doing so creates lots of problems. It may be better than adding a > "nice" shortcut somewhere in QEMU or SeaBIOS. > > Who uses this optionrom (and

Re: [Qemu-devel] [PATCH v4 6/7] Make the kernel image in the fw_cfg DMA interface bootable

2015-10-02 Thread Marc Marí
On Fri, 02 Oct 2015 10:16:26 +0200 Gerd Hoffmann wrote: > Hi, > > > That's fine with me. Marc - I think qemu_vmlinux_setup() in SeaBIOS > > with the following would work: > > > > void qemu_vmlinux_setup(void) > > { > > u32 kernel_size; > >

Re: [Qemu-devel] [PATCH v4 6/7] Make the kernel image in the fw_cfg DMA interface bootable

2015-10-02 Thread Laszlo Ersek
On 10/02/15 15:40, Kevin O'Connor wrote: > On Fri, Oct 02, 2015 at 10:09:17AM +0200, Gerd Hoffmann wrote: >>> - read four bytes from under the fw_cfg selector QEMU_CFG_KERNEL_SIZE >>> (0x0008), >>> - if it is zero,return -1 --> no kernel boot requested, >>> - if it is nonzero, return 0 -->

Re: [Qemu-devel] [PATCH v4 6/7] Make the kernel image in the fw_cfg DMA interface bootable

2015-10-02 Thread Daniel P. Berrange
On Fri, Oct 02, 2015 at 09:40:41AM -0400, Kevin O'Connor wrote: > On Fri, Oct 02, 2015 at 10:09:17AM +0200, Gerd Hoffmann wrote: > > > - read four bytes from under the fw_cfg selector QEMU_CFG_KERNEL_SIZE > > > (0x0008), > > > - if it is zero,return -1 --> no kernel boot requested, > > > -

Re: [Qemu-devel] [PATCH v4 6/7] Make the kernel image in the fw_cfg DMA interface bootable

2015-10-02 Thread Jordan Justen
On 2015-10-02 06:25:50, Laszlo Ersek wrote: > On 10/02/15 14:07, Gerd Hoffmann wrote: > > Hi, > > > >>> Any -kernel boot on x86 will use either linuxboot.bin or multiboot.bin. > >> > >> (Except when your firmware is OVMF -- OVMF has its own LoadLinuxLib. So, > >> if you decide to extend

[Qemu-devel] [PATCH v4 6/7] Make the kernel image in the fw_cfg DMA interface bootable

2015-10-01 Thread Marc Marí
Add an entry to the bootorder file with name "vmlinux". Give this entry more priority than the romfile. Signed-off-by: Marc Marí --- hw/i386/pc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 81d93b4..c4c51f7 100644

Re: [Qemu-devel] [PATCH v4 6/7] Make the kernel image in the fw_cfg DMA interface bootable

2015-10-01 Thread Laszlo Ersek
On 10/01/15 14:16, Marc Marí wrote: > Add an entry to the bootorder file with name "vmlinux". > Give this entry more priority than the romfile. > > Signed-off-by: Marc Marí > --- > hw/i386/pc.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git

Re: [Qemu-devel] [PATCH v4 6/7] Make the kernel image in the fw_cfg DMA interface bootable

2015-10-01 Thread Kevin O'Connor
On Thu, Oct 01, 2015 at 05:25:11PM +0200, Laszlo Ersek wrote: > On 10/01/15 14:16, Marc Marí wrote: > > Add an entry to the bootorder file with name "vmlinux". > > Give this entry more priority than the romfile. > > > > Signed-off-by: Marc Marí > > --- > > hw/i386/pc.c | 4

Re: [Qemu-devel] [PATCH v4 6/7] Make the kernel image in the fw_cfg DMA interface bootable

2015-10-01 Thread Laszlo Ersek
On 10/01/15 18:02, Kevin O'Connor wrote: > On Thu, Oct 01, 2015 at 05:25:11PM +0200, Laszlo Ersek wrote: >> On 10/01/15 14:16, Marc Marí wrote: >>> Add an entry to the bootorder file with name "vmlinux". >>> Give this entry more priority than the romfile. >>> >>> Signed-off-by: Marc Marí

Re: [Qemu-devel] [PATCH v4 6/7] Make the kernel image in the fw_cfg DMA interface bootable

2015-10-01 Thread Marc Marí
On Thu, 1 Oct 2015 12:02:42 -0400 "Kevin O'Connor" wrote: > On Thu, Oct 01, 2015 at 05:25:11PM +0200, Laszlo Ersek wrote: > > On 10/01/15 14:16, Marc Marí wrote: > > > Add an entry to the bootorder file with name "vmlinux". > > > Give this entry more priority than the