mbox series

[0/2] improve loading of 32 bit PVH kernels

Message ID 20210302090315.3031492-1-david.edmondson@oracle.com (mailing list archive)
Headers show
Series improve loading of 32 bit PVH kernels | expand

Message

David Edmondson March 2, 2021, 9:03 a.m. UTC
While testing a non-Linux 32 bit PVH "kernel" (it's really just a
bunch of test code), I ran into some problems with the current PVH
loader in QEMU, which seems to work somewhat by accident for 32 bit
kernels today, having been fortunate in the layout of the object files
it typically encounters.

Non-PAE 32 bit Linux kernels still don't appear to work even with this
change, but I think that problem is somewhere else (the kernel is
loaded and starts, but the VM resets when it attempts to enable PG/PE)
and I haven't tracked it down yet.

David Edmondson (2):
  elf_ops: correct loading of 32 bit PVH kernel
  x86/pvh: extract only 4 bytes of start address for 32 bit kernels

 hw/i386/x86.c        | 6 ++++--
 include/hw/elf_ops.h | 4 +---
 2 files changed, 5 insertions(+), 5 deletions(-)

Comments

Philippe Mathieu-Daudé March 2, 2021, 10:30 a.m. UTC | #1
Cc'ing Stefano

On 3/2/21 10:03 AM, David Edmondson wrote:
> While testing a non-Linux 32 bit PVH "kernel" (it's really just a
> bunch of test code), I ran into some problems with the current PVH
> loader in QEMU, which seems to work somewhat by accident for 32 bit
> kernels today, having been fortunate in the layout of the object files
> it typically encounters.
> 
> Non-PAE 32 bit Linux kernels still don't appear to work even with this
> change, but I think that problem is somewhere else (the kernel is
> loaded and starts, but the VM resets when it attempts to enable PG/PE)
> and I haven't tracked it down yet.
> 
> David Edmondson (2):
>   elf_ops: correct loading of 32 bit PVH kernel
>   x86/pvh: extract only 4 bytes of start address for 32 bit kernels
> 
>  hw/i386/x86.c        | 6 ++++--
>  include/hw/elf_ops.h | 4 +---
>  2 files changed, 5 insertions(+), 5 deletions(-)
>
Paolo Bonzini March 2, 2021, 2:11 p.m. UTC | #2
On 02/03/21 10:03, David Edmondson wrote:
> While testing a non-Linux 32 bit PVH "kernel" (it's really just a
> bunch of test code), I ran into some problems with the current PVH
> loader in QEMU, which seems to work somewhat by accident for 32 bit
> kernels today, having been fortunate in the layout of the object files
> it typically encounters.
> 
> Non-PAE 32 bit Linux kernels still don't appear to work even with this
> change, but I think that problem is somewhere else (the kernel is
> loaded and starts, but the VM resets when it attempts to enable PG/PE)
> and I haven't tracked it down yet.
> 
> David Edmondson (2):
>    elf_ops: correct loading of 32 bit PVH kernel
>    x86/pvh: extract only 4 bytes of start address for 32 bit kernels
> 
>   hw/i386/x86.c        | 6 ++++--
>   include/hw/elf_ops.h | 4 +---
>   2 files changed, 5 insertions(+), 5 deletions(-)
> 

Queued, thanks.

Paolo