mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +01:00
Curiously absent from the stable API/ABIs is an ability to query the number of vcpus which a domain has. Emulators need to know this information in particular to know how many stuct ioreq's live in the ioreq server mappings. In practice, this forces all userspace to link against libxenctrl to use xc_domain_getinfo(), which rather defeats the purpose of the stable libraries. Introduce a DMOP to retrieve this information and surface it in libxendevicemodel to help emulators shed their use of unstable interfaces. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Ian Jackson <iwj@xenproject.org> Reviewed-by: Jan Beulich <jbeulich@suse.com> Release-Acked-by: Ian Jackson <iwj@xenproject.org> --- CC: Jan Beulich <JBeulich@suse.com> CC: Roger Pau Monné <roger.pau@citrix.com> CC: Wei Liu <wl@xen.org> CC: Paul Durrant <paul@xen.org> CC: Stefano Stabellini <sstabellini@kernel.org> CC: Julien Grall <julien@xen.org> CC: Volodymyr Babchuk <Volodymyr_Babchuk@epam.com> CC: Ian Jackson <iwj@xenproject.org> For 4.15. This was a surprise discovery in the massive ABI untangling effort I'm currently doing for XenServer's new build system. This is one new read-only op to obtain information which isn't otherwise available under a stable API/ABI. As such, its risk for 4.15 is very low, with a very real quality-of-life improvement for downstreams. I realise this is technically a new feature and we're long past feature freeze, but I'm hoping that "really lets some emulators move off the unstable libraries" is sufficiently convincing argument. It's not sufficient to let Qemu move off unstable libraries yet - at a minimum, the add_to_phymap hypercalls need stabilising to support PCI Passthrough and BAR remapping. I'd prefer not to duplicate the op handling between ARM and x86, and if this weren't a release window, I'd submit a prereq patch to dedup the common dmop handling. That can wait to 4.16 at this point. Also, this op ought to work against x86 PV guests, but fixing that up will also need this rearrangement into common code, so needs to wait.
47 lines
1.1 KiB
Plaintext
47 lines
1.1 KiB
Plaintext
VERS_1.0 {
|
|
global:
|
|
xendevicemodel_open;
|
|
xendevicemodel_create_ioreq_server;
|
|
xendevicemodel_get_ioreq_server_info;
|
|
xendevicemodel_map_io_range_to_ioreq_server;
|
|
xendevicemodel_unmap_io_range_from_ioreq_server;
|
|
xendevicemodel_map_mem_type_to_ioreq_server;
|
|
xendevicemodel_map_pcidev_to_ioreq_server;
|
|
xendevicemodel_unmap_pcidev_from_ioreq_server;
|
|
xendevicemodel_destroy_ioreq_server;
|
|
xendevicemodel_set_ioreq_server_state;
|
|
xendevicemodel_set_pci_intx_level;
|
|
xendevicemodel_set_isa_irq_level;
|
|
xendevicemodel_set_pci_link_route;
|
|
xendevicemodel_inject_msi;
|
|
xendevicemodel_track_dirty_vram;
|
|
xendevicemodel_modified_memory;
|
|
xendevicemodel_set_mem_type;
|
|
xendevicemodel_inject_event;
|
|
xendevicemodel_restrict;
|
|
xendevicemodel_close;
|
|
local: *; /* Do not expose anything by default */
|
|
};
|
|
|
|
VERS_1.1 {
|
|
global:
|
|
xendevicemodel_shutdown;
|
|
} VERS_1.0;
|
|
|
|
VERS_1.2 {
|
|
global:
|
|
xendevicemodel_relocate_memory;
|
|
xendevicemodel_pin_memory_cacheattr;
|
|
} VERS_1.1;
|
|
|
|
VERS_1.3 {
|
|
global:
|
|
xendevicemodel_modified_memory_bulk;
|
|
} VERS_1.2;
|
|
|
|
VERS_1.4 {
|
|
global:
|
|
xendevicemodel_set_irq_level;
|
|
xendevicemodel_nr_vcpus;
|
|
} VERS_1.3;
|