Skip to content

Commit 987ddaf

Browse files
lifeixwenlingz
authored andcommitted
hv: vlapic: refine apicv_post_intr to internal function
Rename vlapic_post_intr to apicv_post_intr and move it to internal function since it's only used in vlaic.c. Tracked-On: #1842 Signed-off-by: Li, Fei1 <fei1.li@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
1 parent 5dd6e79 commit 987ddaf

File tree

3 files changed

+4
-19
lines changed

3 files changed

+4
-19
lines changed

doc/developer-guides/hld/hv-virt-interrupt.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,6 @@ These APIs will finish by making a request for *ACRN_REQUEST_EVENT.*
106106
.. doxygenfunction:: vlapic_intr_msi
107107
:project: Project ACRN
108108

109-
.. doxygenfunction:: vlapic_post_intr
110-
:project: Project ACRN
111-
112109
.. doxygenfunction:: apicv_get_pir_desc_paddr
113110
:project: Project ACRN
114111

hypervisor/arch/x86/guest/vlapic.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ static inline void vlapic_dump_isr(__unused const struct acrn_vlapic *vlapic, __
9090
static int32_t
9191
apicv_set_intr_ready(struct acrn_vlapic *vlapic, uint32_t vector);
9292

93+
static void apicv_post_intr(uint16_t dest_pcpu_id);
94+
9395
/*
9496
* Post an interrupt to the vcpu running on 'hostcpu'. This will use a
9597
* hardware assist if available (e.g. Posted Interrupt) or fall back to
@@ -522,7 +524,7 @@ vlapic_accept_intr(struct acrn_vlapic *vlapic, uint32_t vector, bool level)
522524
* it to vCPU in next vmentry.
523525
*/
524526
bitmap_set_lock(ACRN_REQUEST_EVENT, &vlapic->vcpu->arch.pending_req);
525-
vlapic_post_intr(vlapic->vcpu->pcpu_id);
527+
apicv_post_intr(vlapic->vcpu->pcpu_id);
526528
ret = false;
527529
} else {
528530
ret = (pending_intr != 0);
@@ -555,7 +557,7 @@ vlapic_accept_intr(struct acrn_vlapic *vlapic, uint32_t vector, bool level)
555557
*
556558
* @return None
557559
*/
558-
void vlapic_post_intr(uint16_t dest_pcpu_id)
560+
static void apicv_post_intr(uint16_t dest_pcpu_id)
559561
{
560562
send_single_ipi(dest_pcpu_id, VECTOR_POSTED_INTR);
561563
}

hypervisor/include/arch/x86/guest/vlapic.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -155,20 +155,6 @@ bool vlapic_find_deliverable_intr(const struct acrn_vlapic *vlapic, uint32_t *ve
155155
*/
156156
void vlapic_get_deliverable_intr(struct acrn_vlapic *vlapic, uint32_t vector);
157157

158-
/**
159-
* @brief Send notification vector to target pCPU.
160-
*
161-
* If APICv Posted-Interrupt is enabled and target pCPU is in non-root mode,
162-
* pCPU will sync pending virtual interrupts from PIR to vIRR automatically,
163-
* without VM exit.
164-
* If pCPU in root-mode, virtual interrupt will be injected in next VM entry.
165-
*
166-
* @param[in] dest_pcpu_id Target CPU ID.
167-
*
168-
* @return None
169-
*/
170-
void vlapic_post_intr(uint16_t dest_pcpu_id);
171-
172158
/**
173159
* @brief Get physical address to PIR description.
174160
*

0 commit comments

Comments
 (0)