Commit 1415e8ea authored by Peter Maydell's avatar Peter Maydell
Browse files

Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20170830' into staging



First batch of s390x patches:
- 2.11 compat machine
- support the new --s390-pgste linker option, making it possible to
  avoid enabling the global vm.allocate_pgste systl if all pieces
  are in place
- correctly identify some devices as not hotpluggable
- clean up some tests and enable them for s390x
- wire up the diag288 watchdog in tcg
- clean up dependencies on CONFIG_PCI, making it possible to disable
  it by hand
- lots of cleanup in target/s390x/
- fix alignment of the ccw1 structure in the s390-ccw bios
- and some more bugfixes

# gpg: Signature made Wed 30 Aug 2017 17:40:34 BST
# gpg:                using RSA key 0xDECF6B93C6F02FAF
# gpg: Good signature from "Cornelia Huck <conny@cornelia-huck.de>"
# gpg:                 aka "Cornelia Huck <huckc@linux.vnet.ibm.com>"
# gpg:                 aka "Cornelia Huck <cornelia.huck@de.ibm.com>"
# gpg:                 aka "Cornelia Huck <cohuck@kernel.org>"
# gpg:                 aka "Cornelia Huck <cohuck@redhat.com>"
# Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0  18CE DECF 6B93 C6F0 2FAF

* remotes/cohuck/tags/s390x-20170830: (44 commits)
  s390x/pci: fixup trap_msix()
  pc-bios/s390-ccw.img: update image
  s390-ccw: Fix alignment for CCW1
  s390x/s390-stattrib: Mark the storage attribute as not user_creatable
  target/s390x: cleanup cpu.h
  s390x/kvm: move KVM declarations and stubs to separate files
  s390x: avoid calling kvm_ functions outside of target/s390x/
  target/s390x: move a couple of functions to cpu.c
  target/s390x: introduce internal.h
  target/s390x: move get_per_in_range() to misc_helper.c
  target/s390x: move s390_do_cpu_reset() to diag.c
  target/s390x: move psw_key_valid() to mem_helper.c
  target/s390x: move cpu_mmu_idx_to_asc() to excp_helper.c
  target/s390x: move cc_name() to helper.c
  target/s390x: move gtod_*() declarations to s390-virtio.h
  s390x: drop inclusion of sysemu/kvm.h from some files
  s390x/cpumodel: factor out determination of default model name
  target/s390x: no need to pass kvm_state to savevm_gtod handlers
  target/s390x: simplify gs_allowed()
  target/s390x: simplify ri_allowed()
  ...

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parents 1201d308 2f21b8d4
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1248,7 +1248,7 @@ int kvm_irqchip_add_msi_route(KVMState *s, int vector, PCIDevice *dev)
    int virq;
    MSIMessage msg = {0, 0};

    if (dev) {
    if (pci_available && dev) {
        msg = pci_get_msi_message(dev, vector);
    }

@@ -1271,7 +1271,7 @@ int kvm_irqchip_add_msi_route(KVMState *s, int vector, PCIDevice *dev)
    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_msi_devid_required()) {
    if (pci_available && kvm_msi_devid_required()) {
        kroute.flags = KVM_MSI_VALID_DEVID;
        kroute.u.msi.devid = pci_requester_id(dev);
    }
@@ -1309,7 +1309,7 @@ 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_msi_devid_required()) {
    if (pci_available && kvm_msi_devid_required()) {
        kroute.flags = KVM_MSI_VALID_DEVID;
        kroute.u.msi.devid = pci_requester_id(dev);
    }
+20 −1
Original line number Diff line number Diff line
@@ -240,6 +240,11 @@ supported_target() {
    return 1
}


ld_has() {
    $ld --help 2>/dev/null | grep ".$1" >/dev/null 2>&1
}

# default parameters
source_path=$(dirname "$0")
cpu=""
@@ -5043,7 +5048,7 @@ fi
# Use ASLR, no-SEH and DEP if available
if test "$mingw32" = "yes" ; then
    for flag in --dynamicbase --no-seh --nxcompat; do
        if $ld --help 2>/dev/null | grep ".$flag" >/dev/null 2>/dev/null ; then
        if ld_has $flag ; then
            LDFLAGS="-Wl,$flag $LDFLAGS"
        fi
    done
@@ -6522,6 +6527,20 @@ if test "$target_linux_user" = "yes" -o "$target_bsd_user" = "yes" ; then
  ldflags="$ldflags $textseg_ldflags"
fi

# Newer kernels on s390 check for an S390_PGSTE program header and
# enable the pgste page table extensions in that case. This makes
# the vm.allocate_pgste sysctl unnecessary. We enable this program
# header if
#  - we build on s390x
#  - we build the system emulation for s390x (qemu-system-s390x)
#  - KVM is enabled
#  - the linker supports --s390-pgste
if test "$TARGET_ARCH" = "s390x" -a "$target_softmmu" = "yes"  -a "$ARCH" = "s390x" -a "$kvm" = "yes"; then
    if ld_has --s390-pgste ; then
        ldflags="-Wl,--s390-pgste $ldflags"
    fi
fi

echo "LDFLAGS+=$ldflags" >> $config_target_mak
echo "QEMU_CFLAGS+=$cflags" >> $config_target_mak

+1 −1
Original line number Diff line number Diff line
CONFIG_PCI=y
CONFIG_VIRTIO_PCI=y
CONFIG_VIRTIO_PCI=$(CONFIG_PCI)
CONFIG_VHOST_USER_SCSI=$(and $(CONFIG_VHOST_USER),$(CONFIG_LINUX))
CONFIG_VIRTIO=y
CONFIG_SCLPCONSOLE=y
+3 −6
Original line number Diff line number Diff line
ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS)$(CONFIG_PCI),yyy)
# Lots of the fsdev/9pcode is pulled in by vl.c via qemu_fsdev_add.
# only pull in the actual virtio-9p device if we also enabled virtio.
common-obj-y = qemu-fsdev.o 9p-marshal.o 9p-iov-marshal.o
else
common-obj-y = qemu-fsdev-dummy.o
endif
# only pull in the actual 9p backend if we also enabled virtio or xen.
common-obj-$(call land,$(CONFIG_VIRTFS),$(call lor,$(CONFIG_VIRTIO),$(CONFIG_XEN))) = qemu-fsdev.o 9p-marshal.o 9p-iov-marshal.o
common-obj-$(call lnot,$(call land,$(CONFIG_VIRTFS),$(call lor,$(CONFIG_VIRTIO),$(CONFIG_XEN)))) = qemu-fsdev-dummy.o
common-obj-y += qemu-fsdev-opts.o qemu-fsdev-throttle.o

# Toplevel always builds this; targets without virtio will put it in
+1 −1
Original line number Diff line number Diff line
@@ -7,4 +7,4 @@ common-obj-$(CONFIG_OPEN_BY_HANDLE) += 9p-handle.o
common-obj-y += 9p-proxy.o
common-obj-$(CONFIG_XEN) += xen-9p-backend.o

obj-y += virtio-9p-device.o
obj-$(CONFIG_VIRTIO) += virtio-9p-device.o
Loading