mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-16 22:39:29 +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:
@@ -374,7 +374,7 @@ static int vpic_ocw1(struct acrn_vpic *vpic, struct i8259_reg_state *i8259, uint
|
||||
* remap for deactive: when vIOAPIC take it over
|
||||
*/
|
||||
if (((i8259->mask & bit) == 0U) && ((old & bit) != 0U)) {
|
||||
struct ptdev_intx_info intx;
|
||||
uint8_t virt_pin;
|
||||
|
||||
/* master i8259 pin2 connect with slave i8259,
|
||||
* not device, so not need pt remap
|
||||
@@ -383,12 +383,10 @@ static int vpic_ocw1(struct acrn_vpic *vpic, struct i8259_reg_state *i8259, uint
|
||||
continue;
|
||||
}
|
||||
|
||||
intx.virt_pin = pin;
|
||||
intx.vpin_src = PTDEV_VPIN_PIC;
|
||||
if (!master_pic(vpic, i8259)) {
|
||||
intx.virt_pin += 8U;
|
||||
}
|
||||
ptdev_intx_pin_remap(vpic->vm, &intx);
|
||||
virt_pin = (master_pic(vpic, i8259)) ?
|
||||
pin : (pin + 8U);
|
||||
ptdev_intx_pin_remap(vpic->vm,
|
||||
virt_pin, PTDEV_VPIN_PIC);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user