Commit 1c5d9d8f authored by Peter Maydell's avatar Peter Maydell
Browse files

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



s390x updates:
- tcg: implement STCK and friends for CONFIG_USER_ONLY
- add zpci to qemu cpu model, as pci is now always built
- add mepoch to default z14 cpu model
- add cpu model for z14 GA2
- various improvements

# gpg: Signature made Mon 18 Feb 2019 11:06:23 GMT
# gpg:                using RSA key C3D0D66DC3624FF6A8C018CEDECF6B93C6F02FAF
# gpg:                issuer "cohuck@redhat.com"
# gpg: Good signature from "Cornelia Huck <conny@cornelia-huck.de>" [unknown]
# gpg:                 aka "Cornelia Huck <huckc@linux.vnet.ibm.com>" [full]
# gpg:                 aka "Cornelia Huck <cornelia.huck@de.ibm.com>" [full]
# gpg:                 aka "Cornelia Huck <cohuck@kernel.org>" [unknown]
# gpg:                 aka "Cornelia Huck <cohuck@redhat.com>" [unknown]
# Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0  18CE DECF 6B93 C6F0 2FAF

* remotes/cohuck/tags/s390x-20190218:
  s390x: upgrade status of KVM cores to "supported"
  s390x/kvm: add tracepoint to ioeventfd interface
  s390x/cpumodel: add z14 GA2 model
  s390x/cpumodel: default enable mepoch for z14 and later
  s390x/cpumodel: mepochptff: warn when no mepoch and re-align group init
  s390x: add zPCI feature to "qemu" CPU model
  target/s390x: Implement STCK et al for CONFIG_USER_ONLY
  target/s390x: Split out s390-tod.h
  s390x: always provide pci support
  s390x: Fix the confusing contributions-after-2012 license statements

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parents 1e362329 0922e8c0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -375,7 +375,7 @@ S390
M: Halil Pasic <pasic@linux.ibm.com>
M: Cornelia Huck <cohuck@redhat.com>
M: Christian Borntraeger <borntraeger@de.ibm.com>
S: Maintained
S: Supported
F: target/s390x/kvm.c
F: target/s390x/kvm_s390x.h
F: target/s390x/kvm-stub.c
+1 −2
Original line number Diff line number Diff line
@@ -21,8 +21,7 @@ obj-$(call land,$(CONFIG_VIRTIO_9P),$(CONFIG_VIRTFS)) += virtio-ccw-9p.o
obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock-ccw.o
obj-y += css-bridge.o
obj-y += ccw-device.o
obj-$(CONFIG_PCI) += s390-pci-bus.o s390-pci-inst.o
obj-$(call lnot,$(CONFIG_PCI)) += s390-pci-stub.o
obj-y += s390-pci-bus.o s390-pci-inst.o
obj-y += s390-skeys.o
obj-y += s390-stattrib.o
obj-y += tod.o

hw/s390x/s390-pci-stub.c

deleted100644 → 0
+0 −77
Original line number Diff line number Diff line
/* stubs for non-pci builds */

#include "qemu/osdep.h"
#include "qemu-common.h"
#include "cpu.h"
#include "s390-pci-inst.h"
#include "s390-pci-bus.h"

/* target/s390x/ioinst.c */
int pci_chsc_sei_nt2_get_event(void *res)
{
    return 1;
}

int pci_chsc_sei_nt2_have_event(void)
{
    return 0;
}

/* hw/s390x/sclp.c */
void s390_pci_sclp_configure(SCCB *sccb)
{
    sccb->h.response_code = cpu_to_be16(SCLP_RC_ADAPTER_TYPE_NOT_RECOGNIZED);
}

void s390_pci_sclp_deconfigure(SCCB *sccb)
{
    sccb->h.response_code = cpu_to_be16(SCLP_RC_ADAPTER_TYPE_NOT_RECOGNIZED);
}

/* target/s390x/kvm.c */
int clp_service_call(S390CPU *cpu, uint8_t r2)
{
    return -1;
}

int pcilg_service_call(S390CPU *cpu, uint8_t r1, uint8_t r2)
{
    return -1;
}

int pcistg_service_call(S390CPU *cpu, uint8_t r1, uint8_t r2)
{
    return -1;
}

int stpcifc_service_call(S390CPU *cpu, uint8_t r1, uint64_t fiba, uint8_t ar)
{
    return -1;
}

int rpcit_service_call(S390CPU *cpu, uint8_t r1, uint8_t r2)
{
    return -1;
}

int pcistb_service_call(S390CPU *cpu, uint8_t r1, uint8_t r3, uint64_t gaddr,
                        uint8_t ar)
{
    return -1;
}

int mpcifc_service_call(S390CPU *cpu, uint8_t r1, uint64_t fiba, uint8_t ar)
{
    return -1;
}

S390pciState *s390_get_phb(void)
{
    return NULL;
}

S390PCIBusDevice *s390_pci_find_dev_by_target(S390pciState *s,
                                              const char *target)
{
    return NULL;
}
+4 −4
Original line number Diff line number Diff line
@@ -272,10 +272,6 @@ static void ccw_init(MachineState *machine)
                      machine->initrd_filename, "s390-ccw.img",
                      "s390-netboot.img", true);

    /*
     * We cannot easily make the pci host bridge conditional as older QEMUs
     * always created it. Doing so would break migration across QEMU versions.
     */
    dev = qdev_create(NULL, TYPE_S390_PCI_HOST_BRIDGE);
    object_property_add_child(qdev_get_machine(), TYPE_S390_PCI_HOST_BRIDGE,
                              OBJECT(dev), NULL);
@@ -661,7 +657,11 @@ DEFINE_CCW_MACHINE(4_0, "4.0", true);

static void ccw_machine_3_1_instance_options(MachineState *machine)
{
    static const S390FeatInit qemu_cpu_feat = { S390_FEAT_LIST_QEMU_V3_1 };
    ccw_machine_4_0_instance_options(machine);
    s390_cpudef_featoff_greater(14, 1, S390_FEAT_MULTIPLE_EPOCH);
    s390_cpudef_group_featoff_greater(14, 1, S390_FEAT_GROUP_MULTIPLE_EPOCH_PTFF);
    s390_set_qemu_cpu_model(0x2827, 12, 2, qemu_cpu_feat);
}

static void ccw_machine_3_1_class_options(MachineClass *mc)
+1 −15
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@
#define HW_S390_TOD_H

#include "hw/qdev.h"
#include "s390-tod.h"

typedef struct S390TOD {
    uint8_t high;
@@ -50,21 +51,6 @@ typedef struct S390TODClass {
    void (*set)(S390TODState *td, const S390TOD *tod, Error **errp);
} S390TODClass;

/* The value of the TOD clock for 1.1.1970. */
#define TOD_UNIX_EPOCH 0x7d91048bca000000ULL

/* Converts ns to s390's clock format */
static inline uint64_t time2tod(uint64_t ns)
{
    return (ns << 9) / 125 + (((ns & 0xff80000000000000ull) / 125) << 9);
}

/* Converts s390's clock format to ns */
static inline uint64_t tod2time(uint64_t t)
{
    return ((t >> 9) * 125) + (((t & 0x1ff) * 125) >> 9);
}

void s390_init_tod(void);
S390TODState *s390_get_todstate(void);

Loading