.mmconfig_base = 0xf8000000,
.mmconfig_end_bus = 0x3f,
.pm_timer_address = 0x1808,
- .dmar_unit_base = {
+ .iommu_base = {
0xfed90000,
0xfed91000,
},
.mmconfig_base = 0xb0000000,
.mmconfig_end_bus = 0xff,
.pm_timer_address = 0x608,
- .dmar_unit_base = {
+ .iommu_base = {
0xfed90000,
},
},
static unsigned int dmar_num_did = ~0U;
static unsigned int fault_reporting_cpu_id;
static DEFINE_SPINLOCK(inv_queue_lock);
-static struct vtd_emulation root_cell_units[JAILHOUSE_MAX_DMAR_UNITS];
+static struct vtd_emulation root_cell_units[JAILHOUSE_MAX_IOMMU_UNITS];
static bool dmar_units_initialized;
static unsigned int inv_queue_write(void *inv_queue, unsigned int index,
return 0;
for (n = 0; n < dmar_units; n++) {
- base_addr = system_config->platform_info.x86.dmar_unit_base[n];
+ base_addr = system_config->platform_info.x86.iommu_base[n];
if (addr >= base_addr && addr < base_addr + PAGE_SIZE)
return vtd_unit_access_handler(n, is_write,
addr - base_addr,
int_remap_table_size_log2 = n;
- while (system_config->platform_info.x86.dmar_unit_base[units])
+ while (system_config->platform_info.x86.iommu_base[units])
units++;
if (units == 0)
return -EINVAL;
return -ENOMEM;
for (n = 0; n < units; n++) {
- base_addr = system_config->platform_info.x86.dmar_unit_base[n];
+ base_addr = system_config->platform_info.x86.iommu_base[n];
reg_base = dmar_reg_base + n * PAGE_SIZE;
__u16 flags;
} __attribute__((packed));
-#define JAILHOUSE_MAX_DMAR_UNITS 8
+#define JAILHOUSE_MAX_IOMMU_UNITS 8
struct jailhouse_system {
struct jailhouse_memory hypervisor_memory;
__u8 mmconfig_end_bus;
__u8 padding[5];
__u16 pm_timer_address;
- __u64 dmar_unit_base[JAILHOUSE_MAX_DMAR_UNITS];
+ __u64 iommu_base[JAILHOUSE_MAX_IOMMU_UNITS];
} __attribute__((packed)) x86;
} __attribute__((packed)) platform_info;
__u32 device_limit;
raise RuntimeError('We do not support multiple PCI segments')
if len(units) >= 8:
raise RuntimeError('Too many DMAR units. '
- 'Raise JAILHOUSE_MAX_DMAR_UNITS.')
+ 'Raise JAILHOUSE_MAX_IOMMU_UNITS.')
units.append(base)
if flags & 1:
for d in pcidevices:
ioapics = parse_madt()
if get_cpu_vendor() == 'GenuineIntel':
- (dmar_units, rmrr_regs) = parse_dmar(pcidevices, ioapics)
+ (iommu_units, rmrr_regs) = parse_dmar(pcidevices, ioapics)
else:
- (dmar_units, rmrr_regs) = [], []
+ (iommu_units, rmrr_regs) = [], []
regions += rmrr_regs
for d in pcidevices:
irqchips=ioapics,
pm_timer_base=pm_timer_base,
mmconfig=mmconfig,
- dmar_units=dmar_units))
+ iommu_units=iommu_units))
f.close()
.mmconfig_base = ${hex(mmconfig.base)},
.mmconfig_end_bus = ${hex(mmconfig.end_bus)},
.pm_timer_address = ${hex(pm_timer_base)},
- % if dmar_units:
- .dmar_unit_base = {
- % for d in dmar_units:
+ % if iommu_units:
+ .iommu_base = {
+ % for d in iommu_units:
${hex(d)},
% endfor
},