On Mon, Jun 10, 2013 at 08:03:46PM -0500, Anthony Liguori wrote:
It is not "supported" by QEMU.
No, but I've always thought that QEMU was happy to have alternative firmware projects.
We are and we're happy to accept patches to enable things even if its proprietary. But that's all assuming we're improving hardware emulation.
What we're talking about here is doing something that's very un-hardware like.
Two points 1. You never explained what you mean by un-hardware like.
Currently bios is in a ROM device, and it has a template for ACPI tables together with it. This simply moves the tables to a separate ROM device (FW CFG), and generalizes the template using the linker interface. One ROM is hardware-like but two is un-hardware like?
ACPI tables are static so it's likely lots of hardware has at least some of them pre-formatted in flash, then tweak some things like SRAT a bit.
2. There's no hardware-like alternative.
A current alternative is exposing lots of PV interfaces to bios, bios builds up ACPI tables based on them. All of this code is in practice PC only, if we ever attempt to generalize we'll see how the interfaces are not a good match. They are still PV, poorly documented and it's very hard for bios not to make any assumptions about them. When it does, result is a very obscure breakage.
Yes, building tables in bios means QEMU code is simpler but we double the amount of interfaces that we need to get right: QEMU-BIOS + BIOS-OS
Yes it's "not QEMU code" but it's seen as a single package by users and it does not really matter - excellent hardware with lousy firmware is useless.
Il 11/06/2013 03:35, Michael S. Tsirkin ha scritto:
Two points
You never explained what you mean by un-hardware like.
Currently bios is in a ROM device, and it has a template for ACPI tables together with it. This simply moves the tables to a separate ROM device (FW CFG), and generalizes the template using the linker interface. One ROM is hardware-like but two is un-hardware like?
ACPI tables are static so it's likely lots of hardware has at least some of them pre-formatted in flash, then tweak some things like SRAT a bit.
Also having a "bootstrap processor" was certainly not unheard of some decades ago. Right now we get all sort of SMM hacks instead of adding more processors, but it's certainly not un-hardware like.
Maybe we should just have a bytecode interpreter and write the ACPI generator in that language. :)
Paolo
Paolo Bonzini pbonzini@redhat.com writes:
Il 11/06/2013 03:35, Michael S. Tsirkin ha scritto:
Two points
You never explained what you mean by un-hardware like.
Currently bios is in a ROM device, and it has a template for ACPI tables together with it. This simply moves the tables to a separate ROM device (FW CFG), and generalizes the template using the linker interface. One ROM is hardware-like but two is un-hardware like?
ACPI tables are static so it's likely lots of hardware has at least some of them pre-formatted in flash, then tweak some things like SRAT a bit.
Also having a "bootstrap processor" was certainly not unheard of some decades ago. Right now we get all sort of SMM hacks instead of adding more processors, but it's certainly not un-hardware like.
It's still not unheard of. This is how power systems work still.
However, with PCs, the ACPI tables are generated by/included in the firmware. There's no question about that.
Maybe we should just have a bytecode interpreter and write the ACPI generator in that language. :)
Indeed, we can even using an existing bytecode like the x86 instruction set and use this VM called KVM to execute it. I hear there are even C compilers for this bytecode ;-)
Regards,
Anthony Liguori
Paolo
Anthony Liguori wrote:
However, with PCs, the ACPI tables are generated by/included in the firmware. There's no question about that.
I think the key point is that the firmware is developed and delivered by the hardware vendor, and not by an independent source.
The firmware is intimately tied to the hardware, and is very much an integral part of all hardware, to the point where the firmware is one of the most prominent downloads made available by all hardware vendors.
Don't make the mistake of thinking that firmware for a virtual machine has less to do with the machine just because it's virtual.
//Peter