mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-06 08:04:55 +00:00
hv:Rename ptdev to ptirq for some variables and structures
ptdev_remapping_info --> ptirq_remapping_info ptdev_msi_info --> ptirq_msi_info ptdev_vpin_source --> ptirq_vpin_source ptdev_irq_entries --> ptirq_entries ptdev_entry_bitmaps --> ptirq_entry_bitmaps v1-->v2: still use ptdev_lock instead of ptirq_lock Tracked-On: #861 Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
committed by
Xie, Nanlin
parent
10afa9bbbf
commit
5b43aa8a65
@@ -36,7 +36,7 @@
|
||||
* @pre vm != NULL
|
||||
*
|
||||
*/
|
||||
void ptdev_intx_ack(struct acrn_vm *vm, uint8_t virt_pin, enum ptdev_vpin_source vpin_src);
|
||||
void ptdev_intx_ack(struct acrn_vm *vm, uint8_t virt_pin, enum ptirq_vpin_source vpin_src);
|
||||
|
||||
/**
|
||||
* @brief MSI/MSI-x remapping for passthrough device.
|
||||
@@ -59,7 +59,7 @@ void ptdev_intx_ack(struct acrn_vm *vm, uint8_t virt_pin, enum ptdev_vpin_source
|
||||
* @pre info != NULL
|
||||
*
|
||||
*/
|
||||
int ptdev_msix_remap(struct acrn_vm *vm, uint16_t virt_bdf, uint16_t entry_nr, struct ptdev_msi_info *info);
|
||||
int ptdev_msix_remap(struct acrn_vm *vm, uint16_t virt_bdf, uint16_t entry_nr, struct ptirq_msi_info *info);
|
||||
|
||||
|
||||
/**
|
||||
@@ -81,7 +81,7 @@ int ptdev_msix_remap(struct acrn_vm *vm, uint16_t virt_bdf, uint16_t entry_nr, s
|
||||
* @pre vm != NULL
|
||||
*
|
||||
*/
|
||||
int ptdev_intx_pin_remap(struct acrn_vm *vm, uint8_t virt_pin, enum ptdev_vpin_source vpin_src);
|
||||
int ptdev_intx_pin_remap(struct acrn_vm *vm, uint8_t virt_pin, enum ptirq_vpin_source vpin_src);
|
||||
|
||||
/**
|
||||
* @brief Add an interrupt remapping entry for INTx as pre-hold mapping.
|
||||
|
||||
@@ -56,7 +56,7 @@ struct acrn_vioapic {
|
||||
union ioapic_rte rtbl[REDIR_ENTRIES_HW];
|
||||
/* pin_state status bitmap: 1 - high, 0 - low */
|
||||
uint64_t pin_state[STATE_BITMAP_SIZE];
|
||||
struct ptdev_remapping_info *vpin_to_pt_entry[VIOAPIC_MAX_PIN];
|
||||
struct ptirq_remapping_info *vpin_to_pt_entry[VIOAPIC_MAX_PIN];
|
||||
};
|
||||
|
||||
void vioapic_init(struct acrn_vm *vm);
|
||||
|
||||
@@ -128,7 +128,7 @@ struct acrn_vpic {
|
||||
struct acrn_vm *vm;
|
||||
spinlock_t lock;
|
||||
struct i8259_reg_state i8259[2];
|
||||
struct ptdev_remapping_info *vpin_to_pt_entry[NR_VPIC_PINS_TOTAL];
|
||||
struct ptirq_remapping_info *vpin_to_pt_entry[NR_VPIC_PINS_TOTAL];
|
||||
};
|
||||
|
||||
void vpic_init(struct acrn_vm *vm);
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
#define INVALID_PTDEV_ENTRY_ID 0xffffU
|
||||
|
||||
enum ptdev_vpin_source {
|
||||
enum ptirq_vpin_source {
|
||||
PTDEV_VPIN_IOAPIC,
|
||||
PTDEV_VPIN_PIC,
|
||||
};
|
||||
@@ -39,7 +39,7 @@ union source_id {
|
||||
};
|
||||
|
||||
/* entry per guest virt vector */
|
||||
struct ptdev_msi_info {
|
||||
struct ptirq_msi_info {
|
||||
uint64_t vmsi_addr; /* virt msi_addr */
|
||||
uint32_t vmsi_data; /* virt msi_data */
|
||||
uint64_t pmsi_addr; /* phys msi_addr */
|
||||
@@ -52,7 +52,7 @@ struct ptdev_msi_info {
|
||||
* information related with its vm and msi/intx mapping & interaction nodes
|
||||
* with interrupt handler and softirq.
|
||||
*/
|
||||
struct ptdev_remapping_info {
|
||||
struct ptirq_remapping_info {
|
||||
uint16_t ptdev_entry_id;
|
||||
uint32_t intr_type;
|
||||
union source_id phys_sid;
|
||||
@@ -62,25 +62,25 @@ struct ptdev_remapping_info {
|
||||
uint32_t allocated_pirq;
|
||||
uint32_t polarity; /* 0=active high, 1=active low*/
|
||||
struct list_head softirq_node;
|
||||
struct ptdev_msi_info msi;
|
||||
struct ptirq_msi_info msi;
|
||||
|
||||
uint64_t intr_count;
|
||||
struct hv_timer intr_delay_timer; /* used for delay intr injection */
|
||||
};
|
||||
|
||||
extern struct ptdev_remapping_info ptdev_irq_entries[];
|
||||
extern struct ptirq_remapping_info ptirq_entries[];
|
||||
extern spinlock_t ptdev_lock;
|
||||
|
||||
bool is_entry_active(const struct ptdev_remapping_info *entry);
|
||||
bool is_entry_active(const struct ptirq_remapping_info *entry);
|
||||
void ptdev_softirq(uint16_t pcpu_id);
|
||||
void ptdev_init(void);
|
||||
void ptdev_release_all_entries(const struct acrn_vm *vm);
|
||||
|
||||
struct ptdev_remapping_info *ptdev_dequeue_softirq(struct acrn_vm *vm);
|
||||
struct ptdev_remapping_info *alloc_entry(struct acrn_vm *vm, uint32_t intr_type);
|
||||
void release_entry(struct ptdev_remapping_info *entry);
|
||||
int32_t ptdev_activate_entry(struct ptdev_remapping_info *entry, uint32_t phys_irq);
|
||||
void ptdev_deactivate_entry(struct ptdev_remapping_info *entry);
|
||||
struct ptirq_remapping_info *ptdev_dequeue_softirq(struct acrn_vm *vm);
|
||||
struct ptirq_remapping_info *alloc_entry(struct acrn_vm *vm, uint32_t intr_type);
|
||||
void release_entry(struct ptirq_remapping_info *entry);
|
||||
int32_t ptdev_activate_entry(struct ptirq_remapping_info *entry, uint32_t phys_irq);
|
||||
void ptdev_deactivate_entry(struct ptirq_remapping_info *entry);
|
||||
|
||||
uint32_t get_vm_ptdev_intr_data(const struct acrn_vm *target_vm, uint64_t *buffer, uint32_t buffer_cnt);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user