linux-next: manual merge of the kvm-arm tree with the kvm tree

From: Stephen Rothwell
Date: Sun Jul 24 2016 - 02:04:41 EST


Hi all,

Today's linux-next merge of the kvm-arm tree got a conflict in:

virt/kvm/irqchip.c

between commit:

c63cf538eb4b ("KVM: pass struct kvm to kvm_set_routing_entry")

from the kvm tree and commit:

995a0ee9809b ("KVM: arm/arm64: Enable MSI routing")

from the kvm-arm tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

--
Cheers,
Stephen Rothwell

diff --cc virt/kvm/irqchip.c
index df99e9c3b64d,c6202199e505..000000000000
--- a/virt/kvm/irqchip.c
+++ b/virt/kvm/irqchip.c
@@@ -208,15 -208,19 +209,19 @@@ int kvm_set_irq_routing(struct kvm *kvm
goto out;

r = -EINVAL;
- if (ue->flags) {
- kfree(e);
- goto out;
+ switch (ue->type) {
+ case KVM_IRQ_ROUTING_MSI:
+ if (ue->flags & ~KVM_MSI_VALID_DEVID)
+ goto free_entry;
+ break;
+ default:
+ if (ue->flags)
+ goto free_entry;
+ break;
}
- r = setup_routing_entry(new, e, ue);
+ r = setup_routing_entry(kvm, new, e, ue);
- if (r) {
- kfree(e);
- goto out;
- }
+ if (r)
+ goto free_entry;
++ue;
}