qemu/include
David Woodhouse a72ccc7fc4 hw/xen: add support for Xen primary console in emulated mode
The primary console is special because the toolstack maps a page into
the guest for its ring, and also allocates the guest-side event channel.
The guest's grant table is even primed to export that page using a known
grant ref#. Add support for all that in emulated mode, so that we can
have a primary console.

For reasons unclear, the backends running under real Xen don't just use
a mapping of the well-known GNTTAB_RESERVED_CONSOLE grant ref (which
would also be in the ring-ref node in XenStore). Instead, the toolstack
sets the ring-ref node of the primary console to the GFN of the guest
page. The backend is expected to handle that special case and map it
with foreignmem operations instead.

We don't have an implementation of foreignmem ops for emulated Xen mode,
so just make it map GNTTAB_RESERVED_CONSOLE instead. This would probably
work for real Xen too, but we can't work out how to make real Xen create
a primary console of type "ioemu" to make QEMU drive it, so we can't
test that; might as well leave it as it is for now under Xen.

Now at last we can boot the Xen PV shim and run PV kernels in QEMU.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Paul Durrant <paul@xen.org>
2023-11-07 08:54:20 +00:00
..
authz
block blockjob: query driver-specific info via a new 'query' driver method 2023-10-31 18:20:29 +01:00
chardev
crypto
disas
exec util: Add cpuinfo for loongarch64 2023-11-07 11:05:37 +08:00
fpu
gdbstub
hw hw/xen: add support for Xen primary console in emulated mode 2023-11-07 08:54:20 +00:00
io
libdecnumber
migration migration: per-mode blockers 2023-11-01 16:13:59 +01:00
monitor
net
qapi
qemu util/uuid: Define UUID_STR_LEN from UUID_NONE string 2023-11-03 09:20:31 +01:00
qom
scsi
semihosting
standard-headers
sysemu Bugfixes for emulated Xen support 2023-11-07 09:41:24 +08:00
tcg tcg: Remove TCG_TARGET_HAS_neg_{i32,i64} 2023-11-06 08:27:21 -08:00
ui ui/input: Constify QemuInputHandler structure 2023-10-19 23:13:28 +02:00
user
elf.h
glib-compat.h
qemu-io.h
qemu-main.h