diff options
author | David Woodhouse <dwmw@amazon.co.uk> | 2023-10-14 16:53:23 +0100 |
---|---|---|
committer | David Woodhouse <dwmw@amazon.co.uk> | 2023-11-07 08:54:20 +0000 |
commit | 523b6b3abac928ff3574d8a45df58d29bd8ae454 (patch) | |
tree | f119ff0ac6ee7a048affe33500daf5c435c78653 /include/hw/xen | |
parent | d3256f88d988809ae006aa28d6df88b37b253bc1 (diff) |
hw/xen: add get_frontend_path() method to XenDeviceClass
The primary Xen console is special. The guest's side is set up for it by
the toolstack automatically and not by the standard PV init sequence.
Accordingly, its *frontend* doesn't appear in …/device/console/0 either;
instead it appears under …/console in the guest's XenStore node.
To allow the Xen console driver to override the frontend path for the
primary console, add a method to the XenDeviceClass which can be used
instead of the standard xen_device_get_frontend_path()
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Paul Durrant <paul@xen.org>
Diffstat (limited to 'include/hw/xen')
-rw-r--r-- | include/hw/xen/xen-bus.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/hw/xen/xen-bus.h b/include/hw/xen/xen-bus.h index f435898164..eb440880b5 100644 --- a/include/hw/xen/xen-bus.h +++ b/include/hw/xen/xen-bus.h @@ -33,6 +33,7 @@ struct XenDevice { }; typedef struct XenDevice XenDevice; +typedef char *(*XenDeviceGetFrontendPath)(XenDevice *xendev, Error **errp); typedef char *(*XenDeviceGetName)(XenDevice *xendev, Error **errp); typedef void (*XenDeviceRealize)(XenDevice *xendev, Error **errp); typedef void (*XenDeviceFrontendChanged)(XenDevice *xendev, @@ -46,6 +47,7 @@ struct XenDeviceClass { /*< public >*/ const char *backend; const char *device; + XenDeviceGetFrontendPath get_frontend_path; XenDeviceGetName get_name; XenDeviceRealize realize; XenDeviceFrontendChanged frontend_changed; |