From 6c851a9e5a535d38a15c0b1c4acf07dc7e1284e0 Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Sun, 26 Aug 2018 13:19:40 +0100 Subject: [PATCH] x86/vpmu: put HVM only code under CONFIG_HVM Change u32 to uint32_t while at it. Signed-off-by: Wei Liu Acked-by: Jan Beulich --- xen/arch/x86/cpu/vpmu.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/cpu/vpmu.c b/xen/arch/x86/cpu/vpmu.c index b978e05613..fa6762fa86 100644 --- a/xen/arch/x86/cpu/vpmu.c +++ b/xen/arch/x86/cpu/vpmu.c @@ -196,8 +196,10 @@ void vpmu_do_interrupt(struct cpu_user_regs *regs) { struct vcpu *sampled = current, *sampling; struct vpmu_struct *vpmu; +#ifdef CONFIG_HVM struct vlapic *vlapic; - u32 vlapic_lvtpc; + uint32_t vlapic_lvtpc; +#endif /* * dom0 will handle interrupt for special domains (e.g. idle domain) or, @@ -324,6 +326,7 @@ void vpmu_do_interrupt(struct cpu_user_regs *regs) return; } +#ifdef CONFIG_HVM /* HVM guests */ vlapic = vcpu_vlapic(sampling); @@ -345,6 +348,7 @@ void vpmu_do_interrupt(struct cpu_user_regs *regs) sampling->nmi_pending = 1; break; } +#endif } static void vpmu_save_force(void *arg) -- 2.30.2