|
@@ -5595,27 +5595,14 @@ int kvm_hv_hypercall(struct kvm_vcpu *vcpu)
|
|
|
*/
|
|
|
static void kvm_pv_kick_cpu_op(struct kvm *kvm, unsigned long flags, int apicid)
|
|
|
{
|
|
|
- struct kvm_vcpu *vcpu = NULL;
|
|
|
- int i;
|
|
|
+ struct kvm_lapic_irq lapic_irq;
|
|
|
|
|
|
- kvm_for_each_vcpu(i, vcpu, kvm) {
|
|
|
- if (!kvm_apic_present(vcpu))
|
|
|
- continue;
|
|
|
+ lapic_irq.shorthand = 0;
|
|
|
+ lapic_irq.dest_mode = 0;
|
|
|
+ lapic_irq.dest_id = apicid;
|
|
|
|
|
|
- if (kvm_apic_match_dest(vcpu, 0, 0, apicid, 0))
|
|
|
- break;
|
|
|
- }
|
|
|
- if (vcpu) {
|
|
|
- /*
|
|
|
- * Setting unhalt flag here can result in spurious runnable
|
|
|
- * state when unhalt reset does not happen in vcpu_block.
|
|
|
- * But that is harmless since that should soon result in halt.
|
|
|
- */
|
|
|
- vcpu->arch.pv.pv_unhalted = true;
|
|
|
- /* We need everybody see unhalt before vcpu unblocks */
|
|
|
- smp_wmb();
|
|
|
- kvm_vcpu_kick(vcpu);
|
|
|
- }
|
|
|
+ lapic_irq.delivery_mode = APIC_DM_REMRD;
|
|
|
+ kvm_irq_delivery_to_apic(kvm, 0, &lapic_irq, NULL);
|
|
|
}
|
|
|
|
|
|
int kvm_emulate_hypercall(struct kvm_vcpu *vcpu)
|