mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 09:47:44 +00:00
hv: ptdev: add source_id for ptdev to identify source
Then use the source id to lookup the ptdev remapping entry. For msi interrupt ptdev: use bdf and vector_index to identify the id; For intx interrupt ptdev: use pin and pin source to identify the id. Signed-off-by: Li, Fei1 <fei1.li@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
@@ -14,11 +14,6 @@ static struct list_head softirq_dev_entry_list;
|
||||
struct list_head ptdev_list;
|
||||
spinlock_t ptdev_lock;
|
||||
|
||||
/* invalid_entry for error return */
|
||||
struct ptdev_remapping_info invalid_entry = {
|
||||
.type = PTDEV_INTR_INV,
|
||||
};
|
||||
|
||||
/*
|
||||
* entry could both be in ptdev_list and softirq_dev_entry_list.
|
||||
* When release entry, we need make sure entry deleted from both
|
||||
@@ -64,14 +59,14 @@ ptdev_dequeue_softirq(void)
|
||||
|
||||
/* require ptdev_lock protect */
|
||||
struct ptdev_remapping_info *
|
||||
alloc_entry(struct vm *vm, enum ptdev_intr_type type)
|
||||
alloc_entry(struct vm *vm, uint32_t intr_type)
|
||||
{
|
||||
struct ptdev_remapping_info *entry;
|
||||
|
||||
/* allocate */
|
||||
entry = calloc(1U, sizeof(*entry));
|
||||
ASSERT(entry != NULL, "alloc memory failed");
|
||||
entry->type = type;
|
||||
entry->intr_type = intr_type;
|
||||
entry->vm = vm;
|
||||
|
||||
INIT_LIST_HEAD(&entry->softirq_node);
|
||||
|
Reference in New Issue
Block a user