Re: [Qemu-devel] [PATCH for-4.0 v4 4/4] i386: allow to load initrd below 4G for recent linux

2019-01-08 Thread Li Zhijian
On 1/7/19 20:11, Stefano Garzarella wrote: Hi, On Thu, Dec 27, 2018 at 9:32 PM Eduardo Habkost wrote: On Fri, Dec 21, 2018 at 11:10:30AM -0500, Michael S. Tsirkin wrote: On Thu, Dec 06, 2018 at 10:32:13AM +0800, Li Zhijian wrote: a new field xloadflags was added to recent x86 linux, and BIT

Re: [Qemu-devel] [PATCH for-4.0 v4 4/4] i386: allow to load initrd below 4G for recent linux

2019-01-07 Thread Paolo Bonzini
On 27/12/18 21:31, Eduardo Habkost wrote: > All that said, I miss one piece of information here: is > XLF_CAN_BE_LOADED_ABOVE_4G really supposed to override > header+0x22c? linux/Documentation/x86/boot.txt isn't clear about > that. Is there any reference that can help us confirm this? Linux has

Re: [Qemu-devel] [PATCH for-4.0 v4 4/4] i386: allow to load initrd below 4G for recent linux

2019-01-07 Thread Stefano Garzarella
Hi, On Thu, Dec 27, 2018 at 9:32 PM Eduardo Habkost wrote: > > On Fri, Dec 21, 2018 at 11:10:30AM -0500, Michael S. Tsirkin wrote: > > On Thu, Dec 06, 2018 at 10:32:13AM +0800, Li Zhijian wrote: > > > a new field xloadflags was added to recent x86 linux, and BIT 1: > > > XLF_CAN_BE_LOADED_ABOVE_4

Re: [Qemu-devel] [PATCH for-4.0 v4 4/4] i386: allow to load initrd below 4G for recent linux

2018-12-27 Thread Li Zhijian
On 12/28/2018 4:31 AM, Eduardo Habkost wrote: On Fri, Dec 21, 2018 at 11:10:30AM -0500, Michael S. Tsirkin wrote: On Thu, Dec 06, 2018 at 10:32:13AM +0800, Li Zhijian wrote: /* highest address for loading the initrd */ -if (protocol >= 0x203) { +if (protocol >= 0x20c && +

Re: [Qemu-devel] [PATCH for-4.0 v4 4/4] i386: allow to load initrd below 4G for recent linux

2018-12-27 Thread Eduardo Habkost
On Fri, Dec 21, 2018 at 11:10:30AM -0500, Michael S. Tsirkin wrote: > On Thu, Dec 06, 2018 at 10:32:13AM +0800, Li Zhijian wrote: > > a new field xloadflags was added to recent x86 linux, and BIT 1: > > XLF_CAN_BE_LOADED_ABOVE_4G is used to tell bootload that where initrd can be > > loaded safely.

Re: [Qemu-devel] [PATCH for-4.0 v4 4/4] i386: allow to load initrd below 4G for recent linux

2018-12-21 Thread Michael S. Tsirkin
On Thu, Dec 06, 2018 at 10:32:13AM +0800, Li Zhijian wrote: > a new field xloadflags was added to recent x86 linux, and BIT 1: > XLF_CAN_BE_LOADED_ABOVE_4G is used to tell bootload that where initrd can be > loaded safely. > > Current QEMU/BIOS always loads initrd below below_4g_mem_size which is

[Qemu-devel] [PATCH for-4.0 v4 4/4] i386: allow to load initrd below 4G for recent linux

2018-12-05 Thread Li Zhijian
a new field xloadflags was added to recent x86 linux, and BIT 1: XLF_CAN_BE_LOADED_ABOVE_4G is used to tell bootload that where initrd can be loaded safely. Current QEMU/BIOS always loads initrd below below_4g_mem_size which is always less than 4G, so here limiting initrd_max to 4G - 1 simply is e