mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-07-31 15:30:56 +00:00
hv:move down the structure intr_source
Now the structures(union source & struct intr_source) are defined in ptdev.h,they are used in vtd.c and assign.c, vtd is the hardware layer and ptdev is the upper-layer module from the modularization perspective, this patch move down these structures to avoid reversed dependency. Tracked-On: #1842 Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com> Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
2ea2716cd9
commit
4f98cb03a7
@ -21,6 +21,7 @@
|
||||
#include <version.h>
|
||||
#include <vmx.h>
|
||||
#include <msr.h>
|
||||
#include <ptdev.h>
|
||||
#include <ld_sym.h>
|
||||
#include <logmsg.h>
|
||||
#include <cat.h>
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include <bits.h>
|
||||
#include <vm.h>
|
||||
#include <vtd.h>
|
||||
#include <ptdev.h>
|
||||
#include <per_cpu.h>
|
||||
#include <ioapic.h>
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include <mmu.h>
|
||||
#include <lapic.h>
|
||||
#include <vtd.h>
|
||||
#include <timer.h>
|
||||
#include <logmsg.h>
|
||||
#include <vm_configurations.h>
|
||||
|
||||
|
@ -6,7 +6,8 @@
|
||||
|
||||
#ifndef VTD_H
|
||||
#define VTD_H
|
||||
#include <ptdev.h>
|
||||
#include <types.h>
|
||||
#include <pci.h>
|
||||
/*
|
||||
* Intel IOMMU register specification per version 1.0 public spec.
|
||||
*/
|
||||
@ -56,6 +57,16 @@ struct iommu_domain {
|
||||
bool iommu_snoop;
|
||||
};
|
||||
|
||||
union source {
|
||||
uint16_t ioapic_id;
|
||||
union pci_bdf msi;
|
||||
};
|
||||
|
||||
struct intr_source {
|
||||
bool is_msi;
|
||||
union source src;
|
||||
};
|
||||
|
||||
static inline uint8_t dmar_ver_major(uint64_t version)
|
||||
{
|
||||
return (((uint8_t)version & 0xf0U) >> 4U);
|
||||
|
@ -8,7 +8,6 @@
|
||||
#define PTDEV_H
|
||||
#include <list.h>
|
||||
#include <spinlock.h>
|
||||
#include <pci.h>
|
||||
#include <timer.h>
|
||||
|
||||
#define PTDEV_INTR_MSI (1U << 0U)
|
||||
@ -25,16 +24,6 @@ union source_id (name) = {.msi_id = {.bdf = (a), .entry_nr = (b)} }
|
||||
#define DEFINE_IOAPIC_SID(name, a, b) \
|
||||
union source_id (name) = {.intx_id = {.pin = (a), .src = (b)} }
|
||||
|
||||
union source {
|
||||
uint16_t ioapic_id;
|
||||
union pci_bdf msi;
|
||||
};
|
||||
|
||||
struct intr_source {
|
||||
bool is_msi;
|
||||
union source src;
|
||||
};
|
||||
|
||||
union irte_index {
|
||||
uint16_t index;
|
||||
struct {
|
||||
|
Loading…
Reference in New Issue
Block a user