lkml.org 
[lkml]   [2018]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3 4/6] KVM: X86: Implement PV IPIs send hypercall
On Fri, 20 Jul 2018 at 00:47, Paolo Bonzini <pbonzini@redhat.com> 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;
> > + if (!kvm_apic_set_irq(vcpu, &irq, NULL))
> > + return 1;
> > + }
> > +
> > + for_each_set_bit(i, &ipi_bitmap_high, BITS_PER_LONG) {
> > + vcpu = map->phys_map[i + BITS_PER_LONG]->vcpu;
> > + if (!kvm_apic_set_irq(vcpu, &irq, NULL))
> > + return 1;
> > + }
> > +
>
> This should be the guest's BITS_PER_LONG, not the host's (i.e. you need
> to pass op_64_bit from kvm_emulate_hypercall).

Will do in next version.

Regards,
Wanpeng Li

\
 
 \ /
  Last update: 2018-07-20 05:51    [W:0.077 / U:0.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site