libxl/PCI: establish per-device reserved memory policy earlier
authorJan Beulich <jbeulich@suse.com>
Thu, 27 Feb 2020 14:44:17 +0000 (15:44 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 27 Feb 2020 14:44:17 +0000 (15:44 +0100)
commit6fdb8eef873b82bf771eb7c74c5d9236c3fa28c4
tree90f2f2f0c2d52e30cf85c0d877f7fe0683e13adf
parent3bdb0736438cbbbc6c3da983dafd08384c434984
libxl/PCI: establish per-device reserved memory policy earlier

Reserved device memory region processing as well as E820 table creation
happen earlier than the adding of (PCI) devices, yet they consume the
policy (e.g. to decide whether to add entries to the E820 table). But so
far it was only at the stage of PCI device addition that the final
policy was established (i.e. if not explicitly specified by the guest
config file).

Note that I couldn't find the domain ID to be available in
libxl__domain_device_construct_rdm(), but observing that
libxl__device_pci_setdefault() also doesn't use it, for the time being
DOMID_INVALID gets passed. An obvious alternative would be to drop the
unused parameter/argument, yet at that time the question would be
whether to also drop other unused ones.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Wei Liu <wl@xen.org>
tools/libxl/libxl_dm.c
tools/libxl/libxl_internal.h
tools/libxl/libxl_pci.c