hv: vlapic: wrap a function to calculate destination vcpu mask by shorthand

1. Rename vlapic_calc_dest to vlapic_calc_dest_noshort
2. Remove vlapic_calc_dest_lapic_pt, use vlapic_calc_dest_noshort instead
3. Wrap vlapic_calc_dest to calculate destination vcpu mask according shorthand

Tracked-On: #5923
Signed-off-by: Zide Chen <zide.chen@intel.com>
Signed-off-by: Li Fei1 <fei1.li@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Li Fei1
2021-05-20 10:31:24 +08:00
committed by wenlingz
parent b068656e71
commit a69e67b58b
4 changed files with 43 additions and 70 deletions

View File

@@ -325,7 +325,7 @@ union ioapic_rte {
#define APIC_RRSTAT_RESV 0x00030000U
#define APIC_DEST_MASK 0x000c0000U
#define APIC_DEST_DESTFLD 0x00000000U
#define APIC_DEST_NOSHORT 0x00000000U
#define APIC_DEST_SELF 0x00040000U
#define APIC_DEST_ALLISELF 0x00080000U
#define APIC_DEST_ALLESELF 0x000c0000U

View File

@@ -188,10 +188,8 @@ int32_t apic_write_vmexit_handler(struct acrn_vcpu *vcpu);
int32_t veoi_vmexit_handler(struct acrn_vcpu *vcpu);
void vlapic_update_tpr_threshold(const struct acrn_vlapic *vlapic);
int32_t tpr_below_threshold_vmexit_handler(struct acrn_vcpu *vcpu);
void vlapic_calc_dest(struct acrn_vm *vm, uint64_t *dmask, bool is_broadcast,
uint64_t vlapic_calc_dest_noshort(struct acrn_vm *vm, bool is_broadcast,
uint32_t dest, bool phys, bool lowprio);
void vlapic_calc_dest_lapic_pt(struct acrn_vm *vm, uint64_t *dmask, bool is_broadcast,
uint32_t dest, bool phys);
bool is_x2apic_enabled(const struct acrn_vlapic *vlapic);
bool is_xapic_enabled(const struct acrn_vlapic *vlapic);
/**