[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v2 3/6] Nested VMX: Add interface to update vPPR
From: Yang Zhang <yang.z.zhang@xxxxxxxxx> Add vlapic_set_ppr() to allow update vPPR which in virtual apic page. vPPR updating is required when trying to emulate the APIC-v behavior of delivery virtual interrupt to guest. Signed-off-by: Yang Zhang <yang.z.zhang@xxxxxxxxx> --- xen/arch/x86/hvm/vlapic.c | 8 ++++++++ xen/include/asm-x86/hvm/vlapic.h | 1 + 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/xen/arch/x86/hvm/vlapic.c b/xen/arch/x86/hvm/vlapic.c index f1530fd..99c5700 100644 --- a/xen/arch/x86/hvm/vlapic.c +++ b/xen/arch/x86/hvm/vlapic.c @@ -168,6 +168,14 @@ static uint32_t vlapic_get_ppr(struct vlapic *vlapic) return ppr; } +uint32_t vlapic_set_ppr(struct vlapic *vlapic) +{ + uint32_t ppr = vlapic_get_ppr(vlapic); + + vlapic_set_reg(vlapic, APIC_PROCPRI, ppr); + return ppr; +} + static int vlapic_match_logical_addr(struct vlapic *vlapic, uint8_t mda) { int result = 0; diff --git a/xen/include/asm-x86/hvm/vlapic.h b/xen/include/asm-x86/hvm/vlapic.h index 021a5f2..29ba7d9 100644 --- a/xen/include/asm-x86/hvm/vlapic.h +++ b/xen/include/asm-x86/hvm/vlapic.h @@ -108,6 +108,7 @@ void vlapic_tdt_msr_set(struct vlapic *vlapic, uint64_t value); uint64_t vlapic_tdt_msr_get(struct vlapic *vlapic); int vlapic_accept_pic_intr(struct vcpu *v); +uint32_t vlapic_set_ppr(struct vlapic *vlapic); void vlapic_adjust_i8259_target(struct domain *d); -- 1.7.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |