提交 9a2ae9f6 编写于 作者: N Nitesh Narayan Lal 提交者: Paolo Bonzini

KVM: x86: Zero the IOAPIC scan request dest vCPUs bitmap

Not zeroing the bitmap used for identifying the destination vCPUs for an
IOAPIC scan request in fixed delivery mode could lead to waking up unwanted
vCPUs. This patch zeroes the vCPU bitmap before passing it to
kvm_bitmap_or_dest_vcpus(), which is responsible for setting the bitmap
with the bits corresponding to the destination vCPUs.

Fixes: 7ee30bc1("KVM: x86: deliver KVM IOAPIC scan request to target vCPUs")
Signed-off-by: NNitesh Narayan Lal <nitesh@redhat.com>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 fe289ebb
...@@ -332,6 +332,7 @@ static void ioapic_write_indirect(struct kvm_ioapic *ioapic, u32 val) ...@@ -332,6 +332,7 @@ static void ioapic_write_indirect(struct kvm_ioapic *ioapic, u32 val)
irq.delivery_mode = e->fields.delivery_mode << 8; irq.delivery_mode = e->fields.delivery_mode << 8;
irq.dest_id = e->fields.dest_id; irq.dest_id = e->fields.dest_id;
irq.dest_mode = e->fields.dest_mode; irq.dest_mode = e->fields.dest_mode;
bitmap_zero(&vcpu_bitmap, 16);
kvm_bitmap_or_dest_vcpus(ioapic->kvm, &irq, kvm_bitmap_or_dest_vcpus(ioapic->kvm, &irq,
&vcpu_bitmap); &vcpu_bitmap);
if (old_dest_mode != e->fields.dest_mode || if (old_dest_mode != e->fields.dest_mode ||
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册