Re: [PATCH v3 4/6] KVM: X86: Implement PV IPIs send hypercall

2018-07-19 Thread Wanpeng Li
On Fri, 20 Jul 2018 at 00:47, Paolo Bonzini wrote: > > On 03/07/2018 08:21, Wanpeng Li wrote: > > + > > + rcu_read_lock(); > > + map = rcu_dereference(kvm->arch.apic_map); > > + > > + for_each_set_bit(i, &ipi_bitmap_low, BITS_PER_LONG) { > > + vcpu = map->phys_map[i]->vcpu;

Re: [PATCH v3 4/6] KVM: X86: Implement PV IPIs send hypercall

2018-07-19 Thread Paolo Bonzini
On 03/07/2018 08:21, Wanpeng Li wrote: > + > + rcu_read_lock(); > + map = rcu_dereference(kvm->arch.apic_map); > + > + for_each_set_bit(i, &ipi_bitmap_low, BITS_PER_LONG) { > + vcpu = map->phys_map[i]->vcpu; > + if (!kvm_apic_set_irq(vcpu, &irq, NULL)) > +

[PATCH v3 4/6] KVM: X86: Implement PV IPIs send hypercall

2018-07-02 Thread Wanpeng Li
From: Wanpeng Li Using hypercall to send IPIs by one vmexit instead of one by one for xAPIC/x2APIC physical mode and one vmexit per-cluster for x2APIC cluster mode. Intel guest can enter x2apic cluster mode when interrupt remmaping is enabled in qemu, however, latest AMD EPYC still just support