Changeset View
Changeset View
Standalone View
Standalone View
sys/x86/iommu/intel_dmar.h
Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | iommu_gaddr_t end; /* (c) Highest address + 1 in | ||||
the guest AS */ | the guest AS */ | ||||
u_int ctx_cnt; /* (u) Number of contexts owned */ | u_int ctx_cnt; /* (u) Number of contexts owned */ | ||||
u_int refs; /* (u) Refs, including ctx */ | u_int refs; /* (u) Refs, including ctx */ | ||||
struct dmar_unit *dmar; /* (c) */ | struct dmar_unit *dmar; /* (c) */ | ||||
LIST_ENTRY(dmar_domain) link; /* (u) Member in the dmar list */ | LIST_ENTRY(dmar_domain) link; /* (u) Member in the dmar list */ | ||||
LIST_HEAD(, dmar_ctx) contexts; /* (u) */ | LIST_HEAD(, dmar_ctx) contexts; /* (u) */ | ||||
vm_object_t pgtbl_obj; /* (c) Page table pages */ | vm_object_t pgtbl_obj; /* (c) Page table pages */ | ||||
u_int flags; /* (u) */ | u_int flags; /* (u) */ | ||||
u_int entries_cnt; /* (d) */ | |||||
struct dmar_gas_entries_tree rb_root; /* (d) */ | struct dmar_gas_entries_tree rb_root; /* (d) */ | ||||
kib: So what is the plan WRT intel_gas.c, which is probably the most useful MI part of the dmar… | |||||
brAuthorUnsubmitted Done Inline Actionssplitting-out GAS is my next step. Please look at this first: br: splitting-out GAS is my next step. Please look at this first:
https://reviews.freebsd.org/D25720 | |||||
struct iommu_map_entry *first_place, *last_place; /* (d) */ | struct iommu_map_entry *first_place, *last_place; /* (d) */ | ||||
u_int batch_no; | u_int batch_no; | ||||
}; | }; | ||||
struct dmar_ctx { | struct dmar_ctx { | ||||
struct iommu_ctx context; | struct iommu_ctx context; | ||||
uint16_t rid; /* (c) pci RID */ | uint16_t rid; /* (c) pci RID */ | ||||
uint64_t last_fault_rec[2]; /* Last fault reported */ | uint64_t last_fault_rec[2]; /* Last fault reported */ | ||||
▲ Show 20 Lines • Show All 363 Lines • ▼ Show 20 Lines | #ifdef __i386__ | ||||
volatile uint32_t *p; | volatile uint32_t *p; | ||||
p = (volatile uint32_t *)dst; | p = (volatile uint32_t *)dst; | ||||
*p = 0; | *p = 0; | ||||
*(p + 1) = 0; | *(p + 1) = 0; | ||||
#else | #else | ||||
*dst = 0; | *dst = 0; | ||||
#endif | #endif | ||||
} | |||||
static inline bool | |||||
iommu_test_boundary(iommu_gaddr_t start, iommu_gaddr_t size, | |||||
iommu_gaddr_t boundary) | |||||
{ | |||||
if (boundary == 0) | |||||
return (true); | |||||
return (start + size <= ((start + boundary) & ~(boundary - 1))); | |||||
} | } | ||||
extern struct timespec dmar_hw_timeout; | extern struct timespec dmar_hw_timeout; | ||||
#define DMAR_WAIT_UNTIL(cond) \ | #define DMAR_WAIT_UNTIL(cond) \ | ||||
{ \ | { \ | ||||
struct timespec last, curr; \ | struct timespec last, curr; \ | ||||
bool forever; \ | bool forever; \ | ||||
Show All 37 Lines |
So what is the plan WRT intel_gas.c, which is probably the most useful MI part of the dmar driver ?