mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 17:58:30 +00:00
hv: simplify get_primary_vcpu
and vcpu_from_vid
This patch simplifies `get_primary_vcpu` and `vcpu_from_vid`. The target_vcpu could be get from the index directly. Tracked-On: #1842 Signed-off-by: Shiqing Gao <shiqing.gao@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -192,7 +192,7 @@ static int32_t vcpu_do_pending_extint(const struct acrn_vcpu *vcpu)
|
||||
|
||||
/* check if there is valid interrupt from vPIC, if yes just inject it */
|
||||
/* PIC only connect with primary CPU */
|
||||
primary = get_primary_vcpu(vm);
|
||||
primary = vcpu_from_vid(vm, BOOT_CPU_ID);
|
||||
if (vcpu == primary) {
|
||||
|
||||
vpic_pending_intr(vcpu->vm, &vector);
|
||||
|
Reference in New Issue
Block a user