summaryrefslogtreecommitdiff
path: root/.gitignore
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw@amazon.co.uk>2023-01-20 11:33:19 +0000
committerKevin O'Connor <kevin@koconnor.net>2023-02-01 20:14:39 -0500
commitea1b7a0733906b8425d948ae94fba63c32b1d425 (patch)
tree22c6a019e54b333a381eecd6e1a3d4739de0f99b /.gitignore
parent645a64b4911d7cadf5749d7375544fc2384e70ba (diff)
downloadqemu-seabios-ea1b7a0733906b8425d948ae94fba63c32b1d425.tar.gz
xen: require Xen info structure at 0x1000 to detect Xenrel-1.16.2
When running under Xen, hvmloader places a table at 0x1000 with the e820 information and BIOS tables. If this isn't present, SeaBIOS will currently panic. We now have support for running Xen guests natively in QEMU/KVM, which boots SeaBIOS directly instead of via hvmloader, and does not provide the same structure. As it happens, this doesn't matter on first boot. because although we set PlatformRunningOn to PF_QEMU|PF_XEN, reading it back again still gives zero. Presumably because in true Xen, this is all already RAM. But in QEMU with a faithfully-emulated PAM config in the host bridge, it's still in ROM mode at this point so we don't see what we've just written. On reboot, however, the region *is* set to RAM mode and we do see the updated value of PlatformRunningOn, do manage to remember that we've detected Xen in CPUID, and hit the panic. It's not trivial to detect QEMU vs. real Xen at the time xen_preinit() runs, because it's so early. We can't even make a XENVER_extraversion hypercall to look for hints, because we haven't set up the hypercall page (and don't have an allocator to give us a page in which to do so). So just make Xen detection contingent on the info structure being present. If it wasn't, we were going to panic anyway. That leaves us taking the standard QEMU init path for Xen guests in native QEMU, which is just fine. Untested on actual Xen but ObviouslyCorrectâ„¢. Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions