a72ccc7fc4
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>
23 lines
1.4 KiB
Plaintext
23 lines
1.4 KiB
Plaintext
kvm_xen_map_pirq(int pirq, int gsi) "pirq %d gsi %d"
|
|
kvm_xen_unmap_pirq(int pirq, int gsi) "pirq %d gsi %d"
|
|
kvm_xen_get_free_pirq(int pirq, int type) "pirq %d type %d"
|
|
kvm_xen_bind_pirq(int pirq, int port) "pirq %d port %d"
|
|
kvm_xen_unmask_pirq(int pirq, char *dev, int vector) "pirq %d dev %s vector %d"
|
|
xenstore_error(unsigned int id, unsigned int tx_id, const char *err) "req %u tx %u err %s"
|
|
xenstore_read(unsigned int tx_id, const char *path) "tx %u path %s"
|
|
xenstore_write(unsigned int tx_id, const char *path) "tx %u path %s"
|
|
xenstore_mkdir(unsigned int tx_id, const char *path) "tx %u path %s"
|
|
xenstore_directory(unsigned int tx_id, const char *path) "tx %u path %s"
|
|
xenstore_directory_part(unsigned int tx_id, const char *path, unsigned int offset) "tx %u path %s offset %u"
|
|
xenstore_transaction_start(unsigned int new_tx) "new_tx %u"
|
|
xenstore_transaction_end(unsigned int tx_id, bool commit) "tx %u commit %d"
|
|
xenstore_rm(unsigned int tx_id, const char *path) "tx %u path %s"
|
|
xenstore_get_perms(unsigned int tx_id, const char *path) "tx %u path %s"
|
|
xenstore_set_perms(unsigned int tx_id, const char *path) "tx %u path %s"
|
|
xenstore_watch(const char *path, const char *token) "path %s token %s"
|
|
xenstore_unwatch(const char *path, const char *token) "path %s token %s"
|
|
xenstore_reset_watches(void) ""
|
|
xenstore_watch_event(const char *path, const char *token) "path %s token %s"
|
|
xen_primary_console_create(void) ""
|
|
xen_primary_console_reset(int port) "port %u"
|