From: Wei Liu Date: Sun, 26 Aug 2018 12:19:40 +0000 (+0100) Subject: x86/vpmu: put HVM only code under CONFIG_HVM X-Git-Tag: archive/raspbian/4.14.0+80-gd101b417b7-1+rpi1^2~63^2~3391 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=6c851a9e5a535d38a15c0b1c4acf07dc7e1284e0;p=xen.git 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 --- 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)