From: Jan Kiszka Date: Sun, 2 Jun 2019 11:42:13 +0000 (+0200) Subject: ioapic: kvm: Skip route updates for masked pins X-Git-Tag: v4.0.1~61 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d25b37247d9fe5671059556699d5d8be643f6cf9;p=thirdparty%2Fqemu.git ioapic: kvm: Skip route updates for masked pins Masked entries will not generate interrupt messages, thus do no need to be routed by KVM. This is a cosmetic cleanup, just avoiding warnings of the kind qemu-system-x86_64: vtd_irte_get: detected non-present IRTE (index=0, high=0xff00, low=0x100) if the masked entry happens to reference a non-present IRTE. Cc: qemu-stable@nongnu.org Signed-off-by: Jan Kiszka Message-Id: Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Peter Xu (cherry picked from commit be1927c97e564346cbd409cb17fe611df74b84e5) Signed-off-by: Michael Roth --- diff --git a/hw/intc/ioapic.c b/hw/intc/ioapic.c index 9d75f84d3b5..194ccb6a3e8 100644 --- a/hw/intc/ioapic.c +++ b/hw/intc/ioapic.c @@ -188,9 +188,11 @@ static void ioapic_update_kvm_routes(IOAPICCommonState *s) MSIMessage msg; struct ioapic_entry_info info; ioapic_entry_parse(s->ioredtbl[i], &info); - msg.address = info.addr; - msg.data = info.data; - kvm_irqchip_update_msi_route(kvm_state, i, msg, NULL); + if (!info.masked) { + msg.address = info.addr; + msg.data = info.data; + kvm_irqchip_update_msi_route(kvm_state, i, msg, NULL); + } } kvm_irqchip_commit_routes(kvm_state); }