Merge tag 'dma-mapping-6.6-2023-08-29' of git://git.infradead.org/users/hch/dma-mapping
[platform/kernel/linux-rpi.git] / arch / x86 / xen / setup.c
index 50c998b..b3e3796 100644 (file)
@@ -44,6 +44,9 @@ struct xen_memory_region xen_extra_mem[XEN_EXTRA_MEM_MAX_REGIONS] __initdata;
 /* Number of pages released from the initial allocation. */
 unsigned long xen_released_pages;
 
+/* Memory map would allow PCI passthrough. */
+bool xen_pv_pci_possible;
+
 /* E820 map used during setting up memory. */
 static struct e820_table xen_e820_table __initdata;
 
@@ -814,6 +817,9 @@ char * __init xen_memory_setup(void)
                chunk_size = size;
                type = xen_e820_table.entries[i].type;
 
+               if (type == E820_TYPE_RESERVED)
+                       xen_pv_pci_possible = true;
+
                if (type == E820_TYPE_RAM) {
                        if (addr < mem_end) {
                                chunk_size = min(size, mem_end - addr);