mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-22 17:27:53 +00:00
hv: Introduce check_vm_vlapic_state API
This patch introduces check_vm_vlapic_state API instead of is_lapic_pt_enabled to check if all the vCPUs of a VM are using x2APIC mode and LAPIC pass-through is enabled on all of them. When the VM is in VM_VLAPIC_TRANSITION or VM_VLAPIC_DISABLED state, following conditions apply. 1) For pass-thru MSI interrupts, interrupt source is not programmed. 2) For DM emulated device MSI interrupts, interrupt is not delivered. 3) For IPIs, it will work only if the sender and destination are both in x2APIC mode. Tracked-On: #3253 Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
committed by
wenlingz
parent
f3627d4839
commit
7d44cd5c28
@@ -747,7 +747,7 @@ int32_t prepare_vcpu(struct acrn_vm *vm, uint16_t pcpu_id);
|
||||
* @return The physical destination CPU mask
|
||||
*/
|
||||
uint64_t vcpumask2pcpumask(struct acrn_vm *vm, uint64_t vdmask);
|
||||
|
||||
bool is_lapic_pt_enabled(struct acrn_vcpu *vcpu);
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@@ -210,7 +210,6 @@ void vlapic_calc_dest(struct acrn_vm *vm, uint64_t *dmask, 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_lapic_pt_enabled(struct acrn_vm *vm);
|
||||
bool is_x2apic_enabled(const struct acrn_vlapic *vlapic);
|
||||
bool is_xapic_enabled(const struct acrn_vlapic *vlapic);
|
||||
/**
|
||||
|
@@ -227,7 +227,7 @@ bool is_rt_vm(const struct acrn_vm *vm);
|
||||
bool is_highest_severity_vm(const struct acrn_vm *vm);
|
||||
bool vm_hide_mtrr(const struct acrn_vm *vm);
|
||||
void update_vm_vlapic_state(struct acrn_vm *vm);
|
||||
|
||||
enum vm_vlapic_state check_vm_vlapic_state(const struct acrn_vm *vm);
|
||||
#endif /* !ASSEMBLER */
|
||||
|
||||
#endif /* VM_H_ */
|
||||
|
Reference in New Issue
Block a user