Commit 69ac8c4c authored by Peter Maydell's avatar Peter Maydell
Browse files

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



More s390x updates:
- introduce support for vfio-ap (s390 crypto devices), including a
  Linux headers update to get the new interfaces
- the usual fixing + cleanup

# gpg: Signature made Fri 12 Oct 2018 10:54:38 BST
# gpg:                using RSA key DECF6B93C6F02FAF
# 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-20181012:
  hw/s390x: Include the tod-qemu also for builds with --disable-tcg
  s390: doc: detailed specifications for AP virtualization
  s390x/vfio: ap: Introduce VFIO AP device
  s390x/ap: base Adjunct Processor (AP) object model
  s390x/kvm: enable AP instruction interpretation for guest
  s390x/cpumodel: Set up CPU model for AP device support
  linux-headers: update
  target/s390x/excp_helper: Remove DPRINTF() macro

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parents c7f79d67 0161215d
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -88,6 +88,7 @@ F: hw/char/terminal3270.c
F: hw/intc/s390_flic.c
F: hw/intc/s390_flic_kvm.c
F: hw/s390x/
F: hw/vfio/ap.c
F: hw/vfio/ccw.c
F: hw/watchdog/wdt_diag288.c
F: include/hw/s390x/
@@ -95,6 +96,7 @@ F: include/hw/watchdog/wdt_diag288.h
F: pc-bios/s390-ccw/
F: pc-bios/s390-ccw.img
F: target/s390x/
F: docs/vfio-ap.txt
K: ^Subject:.*(?i)s390x?
T: git git://github.com/cohuck/qemu.git s390-next
L: qemu-s390x@nongnu.org
@@ -1207,6 +1209,20 @@ F: include/hw/s390x/s390-ccw.h
T: git git://github.com/cohuck/qemu.git s390-next
L: qemu-s390x@nongnu.org

vfio-ap
M: Christian Borntraeger <borntraeger@de.ibm.com>
M: Tony Krowiak <akrowiak@linux.ibm.com>
M: Halil Pasic <pasic@linux.ibm.com>
M: Pierre Morel <pmorel@linux.ibm.com>
S: Supported
F: hw/s390x/ap-device.c
F: hw/s390x/ap-bridge.c
F: include/hw/s390x/ap-device.h
F: include/hw/s390x/ap-bridge.h
F: hw/vfio/ap.c
F: docs/vfio-ap.txt
L: qemu-s390x@nongnu.org

vhost
M: Michael S. Tsirkin <mst@redhat.com>
S: Supported
+1 −0
Original line number Diff line number Diff line
@@ -7,3 +7,4 @@ CONFIG_S390_FLIC=y
CONFIG_S390_FLIC_KVM=$(CONFIG_KVM)
CONFIG_VFIO_CCW=$(CONFIG_LINUX)
CONFIG_WDT_DIAG288=y
CONFIG_VFIO_AP=$(CONFIG_LINUX)

docs/vfio-ap.txt

0 → 100644
+825 −0

File added.

Preview size limit exceeded, changes collapsed.

+3 −1
Original line number Diff line number Diff line
@@ -26,8 +26,10 @@ obj-$(call lnot,$(CONFIG_PCI)) += s390-pci-stub.o
obj-y += s390-skeys.o
obj-y += s390-stattrib.o
obj-y += tod.o
obj-y += tod-qemu.o
obj-$(CONFIG_KVM) += tod-kvm.o
obj-$(CONFIG_TCG) += tod-qemu.o
obj-$(CONFIG_KVM) += s390-skeys-kvm.o
obj-$(CONFIG_KVM) += s390-stattrib-kvm.o
obj-y += s390-ccw.o
obj-y += ap-device.o
obj-y += ap-bridge.o

hw/s390x/ap-bridge.c

0 → 100644
+78 −0
Original line number Diff line number Diff line
/*
 * ap bridge
 *
 * Copyright 2018 IBM Corp.
 *
 * This work is licensed under the terms of the GNU GPL, version 2 or (at
 * your option) any later version. See the COPYING file in the top-level
 * directory.
 */
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "hw/sysbus.h"
#include "qemu/bitops.h"
#include "hw/s390x/ap-bridge.h"
#include "cpu.h"

static char *ap_bus_get_dev_path(DeviceState *dev)
{
    /* at most one */
    return g_strdup_printf("/1");
}

static void ap_bus_class_init(ObjectClass *oc, void *data)
{
    BusClass *k = BUS_CLASS(oc);

    k->get_dev_path = ap_bus_get_dev_path;
    /* More than one ap device does not make sense */
    k->max_dev = 1;
}

static const TypeInfo ap_bus_info = {
    .name = TYPE_AP_BUS,
    .parent = TYPE_BUS,
    .instance_size = 0,
    .class_init = ap_bus_class_init,
};

void s390_init_ap(void)
{
    DeviceState *dev;

    /* If no AP instructions then no need for AP bridge */
    if (!s390_has_feat(S390_FEAT_AP)) {
        return;
    }

    /* Create bridge device */
    dev = qdev_create(NULL, TYPE_AP_BRIDGE);
    object_property_add_child(qdev_get_machine(), TYPE_AP_BRIDGE,
                              OBJECT(dev), NULL);
    qdev_init_nofail(dev);

    /* Create bus on bridge device */
    qbus_create(TYPE_AP_BUS, dev, TYPE_AP_BUS);
 }

static void ap_bridge_class_init(ObjectClass *oc, void *data)
{
    DeviceClass *dc = DEVICE_CLASS(oc);

    set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
}

static const TypeInfo ap_bridge_info = {
    .name          = TYPE_AP_BRIDGE,
    .parent        = TYPE_SYS_BUS_DEVICE,
    .instance_size = 0,
    .class_init    = ap_bridge_class_init,
};

static void ap_register(void)
{
    type_register_static(&ap_bridge_info);
    type_register_static(&ap_bus_info);
}

type_init(ap_register)
Loading