[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Is there any limitation on the firmware size in Xen?



>>> On 10.05.17 at 16:29, <CARNOLD@xxxxxxxx> wrote:
> I was asked the following question which I am posting to the list.
> 
> "
> My name is Gary Lin, and I am the maintainer of the OVMF package, a UEFI
> implementation for the virtual machines.
> 
> Recently, I was testing an upstream patchset[*] and encountered some
> problems in Xen. Maybe you can help me or give me some hints.
> 
> To be short, the edk2/ovmf upstream is going to increase the firmware
> size from 2MB to 4MB to fulfill windows HCK, and we have to test
> different types of VM to make sure the patchset really work. When I was
> using the 2MB build, my Xen HVM worked as expected and showed the boot
> menu. However, if I use the 4MB build, I got something like this from
> "xl dmesg":
> 
> (d32)  - CPU0 ... 39-bit phys ... fixed MTRRs ... var MTRRs [1/8] ... done.
> (d32) Testing HVM environment:
> (d32)  - REP INSB across page boundaries ... passed
> (d32)  - GS base MSRs and SWAPGS ... passed
> (d32) Passed 2 of 2 tests
> (d32) Writing SMBIOS tables ...
> (d32) Loading OVMF ...
> (d32) no BIOS ROM image found
> (d32) *** HVMLoader bug at hvmloader.c:389
> (d32) *** HVMLoader crashed.
> 
> I tried to trace the code and found that in 
> libxl__load_hvm_firmware_module()
> in tools/libxl/libxl_dom.c actully loaded the file and add_module_to_list()
> in tools/libxc/xc_dom_x86.c was loading a firmware "module" with 4194304
> bytes. However, when hvmloader loaded "bios_module" with get_module_entry(),
> modlist is NULL. It seems the firmware data was removed for some reason.
> 
> Here are my questions:
> 
> 1. Is there any limitation on the firmware size in Xen?

I can't recall an explicit limit on the hvmloader side, but there are a
number of other restrictions. I'd suggest adding a few more printf()s
in relevant hvmloader functions (like get_module_entry()) to learn
whether the image doesn't get passed, or whether instead hvmloader
doesn't like where it sits (or whether something else has been
corrupted).

> 2. How is hvm_start_info passed to hvmloader?

A pointer to it is in register EBX. But maybe that's no what you really
meant o ask?

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.