Otherwise it's not possible to call functions described in hvm/vlapic.h from the
inline functions of hvm/hvm.h.
This is because a static inline in vlapic.h depends on hvm.h, and pulls it
transitively through vpt.h. The ultimate cause is having hvm.h included in any
of the "v*.h" headers, so break the cycle moving the guilty inline into hvm.h.
No functional change.
Signed-off-by: Alejandro Vallejo <alejandro.vallejo@cloud.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
int vector;
/*
- * Always call vlapic_sync_pir_to_irr so that PIR is synced into IRR when
- * using posted interrupts. Note this is also done by
+ * Always call hvm_sync_pir_to_irr() so that PIR is synced into IRR
+ * when using posted interrupts. Note this is also done by
* vlapic_has_pending_irq but depending on which interrupts are pending
* hvm_vcpu_has_pending_irq will return early without calling
* vlapic_has_pending_irq.
*/
- vlapic_sync_pir_to_irr(v);
+ hvm_sync_pir_to_irr(v);
if ( unlikely(v->arch.nmi_pending) )
return hvm_intack_nmi;
static int vlapic_find_highest_irr(struct vlapic *vlapic)
{
- vlapic_sync_pir_to_irr(vlapic_vcpu(vlapic));
+ hvm_sync_pir_to_irr(vlapic_vcpu(vlapic));
return vlapic_find_highest_vector(&vlapic->regs->data[APIC_IRR]);
}
if ( !has_vlapic(v->domain) )
return 0;
- vlapic_sync_pir_to_irr(v);
+ hvm_sync_pir_to_irr(v);
return hvm_save_entry(LAPIC_REGS, v->vcpu_id, h, vcpu_vlapic(v)->regs);
}
alternative_vcall(hvm_funcs.update_vlapic_mode, v);
}
+static inline void hvm_sync_pir_to_irr(struct vcpu *v)
+{
+ if ( hvm_funcs.sync_pir_to_irr )
+ alternative_vcall(hvm_funcs.sync_pir_to_irr, v);
+}
+
#else /* CONFIG_HVM */
#define hvm_enabled false
const struct vlapic *target, const struct vlapic *source,
int short_hand, uint32_t dest, bool dest_mode);
-static inline void vlapic_sync_pir_to_irr(struct vcpu *v)
-{
- if ( hvm_funcs.sync_pir_to_irr )
- alternative_vcall(hvm_funcs.sync_pir_to_irr, v);
-}
-
#endif /* __ASM_X86_HVM_VLAPIC_H__ */
#include <xen/timer.h>
#include <xen/list.h>
#include <xen/rwlock.h>
-#include <asm/hvm/hvm.h>
/*
* Abstract layer of periodic time, one short time.