summary refs log tree commit diff stats
path: root/kvm-all.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2015-01-12 10:09:41 +0000
committerPeter Maydell <peter.maydell@linaro.org>2015-01-12 10:09:41 +0000
commit5435f1d77eb4e8cf5e4103f64f0ecbe9f2902c71 (patch)
tree154f3bf6d8cb1762fe4c1628553919308a3bc343 /kvm-all.c
parent64ea8038ffbf703dcd438a108d2d5499c8ff95d9 (diff)
parent9e03a0405d56b4af8952b794d0e5dd9206ee7329 (diff)
downloadfocaccia-qemu-5435f1d77eb4e8cf5e4103f64f0ecbe9f2902c71.tar.gz
focaccia-qemu-5435f1d77eb4e8cf5e4103f64f0ecbe9f2902c71.zip
Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20150112-v3' into staging
s390x patches for 2.3.

Highlight is support for PCI devices on s390x. Otherwise, performance
improvements (register sync) and small cleanups.

# gpg: Signature made Mon 12 Jan 2015 09:49:31 GMT using RSA key ID C6F02FAF
# gpg: Good signature from "Cornelia Huck <huckc@linux.vnet.ibm.com>"
# gpg:                 aka "Cornelia Huck <cornelia.huck@de.ibm.com>"

* remotes/cohuck/tags/s390x-20150112-v3:
  kvm: extend kvm_irqchip_add_msi_route to work on s390
  s390: implement pci instructions
  s390: Add PCI bus support
  s390x/kvm: avoid syscalls by syncing registers with kvm_run
  s390x/kvm: sync register support helper function
  s390x/css: Clean up unnecessary CONFIG_USER_ONLY wrappers
  s390x/ccw: fix oddity in machine class init

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'kvm-all.c')
-rw-r--r--kvm-all.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/kvm-all.c b/kvm-all.c
index 18cc6b4d3d..2f21a4e6fe 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -1225,6 +1225,10 @@ int kvm_irqchip_add_msi_route(KVMState *s, MSIMessage msg)
     kroute.u.msi.address_lo = (uint32_t)msg.address;
     kroute.u.msi.address_hi = msg.address >> 32;
     kroute.u.msi.data = le32_to_cpu(msg.data);
+    if (kvm_arch_fixup_msi_route(&kroute, msg.address, msg.data)) {
+        kvm_irqchip_release_virq(s, virq);
+        return -EINVAL;
+    }
 
     kvm_add_routing_entry(s, &kroute);
     kvm_irqchip_commit_routes(s);
@@ -1250,6 +1254,9 @@ int kvm_irqchip_update_msi_route(KVMState *s, int virq, MSIMessage msg)
     kroute.u.msi.address_lo = (uint32_t)msg.address;
     kroute.u.msi.address_hi = msg.address >> 32;
     kroute.u.msi.data = le32_to_cpu(msg.data);
+    if (kvm_arch_fixup_msi_route(&kroute, msg.address, msg.data)) {
+        return -EINVAL;
+    }
 
     return kvm_update_routing_entry(s, &kroute);
 }