hvm_update_guest_cr3(v, noflush);
}
-/*
- * Dummy function to use with on_selected_cpus in order to trigger a vmexit on
- * selected pCPUs. When the VM resumes execution it will get a new ASID/VPID
- * and thus a clean TLB.
- */
-static void dummy_flush(void *data)
-{
-}
-
static bool flush_tlb(bool (*flush_vcpu)(void *ctxt, struct vcpu *v),
void *ctxt)
{
* not currently running will already be flushed when scheduled because of
* the ASID tickle done in the loop above.
*/
- on_selected_cpus(mask, dummy_flush, NULL, 0);
+ on_selected_cpus(mask, NULL, NULL, 0);
return true;
}
ept_sync_domain(p2m);
}
-static void __ept_sync_domain(void *info)
-{
- /*
- * The invalidation will be done before VMENTER (see
- * vmx_vmenter_helper()).
- */
-}
-
static void ept_sync_domain_prepare(struct p2m_domain *p2m)
{
struct domain *d = p2m->domain;
static void ept_sync_domain_mask(struct p2m_domain *p2m, const cpumask_t *mask)
{
- on_selected_cpus(mask, __ept_sync_domain, p2m, 1);
+ /* Invalidation will be done in vmx_vmenter_helper(). */
+ on_selected_cpus(mask, NULL, NULL, 1);
}
void ept_sync_domain(struct p2m_domain *p2m)
irq_enter();
- if ( call_data.wait )
+ if ( unlikely(!func) )
+ {
+ cpumask_clear_cpu(cpu, &call_data.selected);
+ }
+ else if ( call_data.wait )
{
(*func)(info);
smp_mb();