diff options
author | Peter Maydell | 2021-03-05 20:04:46 +0100 |
---|---|---|
committer | Peter Maydell | 2021-03-05 20:04:47 +0100 |
commit | 91e92cad67caca3bc4b8e920ddb5c8ca64aac9e1 (patch) | |
tree | e625cb660d678c8ffd12cefc965449fba76d70c3 /target | |
parent | Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2021-03-05' into ... (diff) | |
parent | target/s390x/kvm: Simplify debug code (diff) | |
download | qemu-91e92cad67caca3bc4b8e920ddb5c8ca64aac9e1.tar.gz qemu-91e92cad67caca3bc4b8e920ddb5c8ca64aac9e1.tar.xz qemu-91e92cad67caca3bc4b8e920ddb5c8ca64aac9e1.zip |
Merge remote-tracking branch 'remotes/cohuck-gitlab/tags/s390x-20210305' into staging
some accumulated s390x fixes
# gpg: Signature made Fri 05 Mar 2021 15:50:00 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-gitlab/tags/s390x-20210305:
target/s390x/kvm: Simplify debug code
vfio-ccw: Do not read region ret_code after write
css: SCHIB measurement block origin must be aligned
virtio-ccw: commands on revision-less devices
s390x/pci: restore missing Query PCI Function CLP data
hw/s390x: fix build for virtio-9p-ccw
target/s390x/arch_dump: Fix warning for the name field in the PT_NOTE section
s390x/cpu_model: disallow unpack for --only-migratable
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target')
-rw-r--r-- | target/s390x/arch_dump.c | 4 | ||||
-rw-r--r-- | target/s390x/cpu_models.c | 10 | ||||
-rw-r--r-- | target/s390x/ioinst.c | 6 | ||||
-rw-r--r-- | target/s390x/kvm.c | 3 |
4 files changed, 20 insertions, 3 deletions
diff --git a/target/s390x/arch_dump.c b/target/s390x/arch_dump.c index 50fa0ae4b6..cc1330876b 100644 --- a/target/s390x/arch_dump.c +++ b/target/s390x/arch_dump.c @@ -212,11 +212,13 @@ static int s390x_write_elf64_notes(const char *note_name, int note_size; int ret = -1; + assert(strlen(note_name) < sizeof(note.name)); + for (nf = funcs; nf->note_contents_func; nf++) { memset(¬e, 0, sizeof(note)); note.hdr.n_namesz = cpu_to_be32(strlen(note_name) + 1); note.hdr.n_descsz = cpu_to_be32(nf->contents_size); - strncpy(note.name, note_name, sizeof(note.name)); + g_strlcpy(note.name, note_name, sizeof(note.name)); (*nf->note_contents_func)(¬e, cpu, id); note_size = sizeof(note) - sizeof(note.contents) + nf->contents_size; diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c index 35179f9dc7..dd474c5e9a 100644 --- a/target/s390x/cpu_models.c +++ b/target/s390x/cpu_models.c @@ -26,6 +26,7 @@ #include "qapi/qmp/qdict.h" #ifndef CONFIG_USER_ONLY #include "sysemu/arch_init.h" +#include "sysemu/sysemu.h" #include "hw/pci/pci.h" #endif #include "qapi/qapi-commands-machine-target.h" @@ -878,6 +879,15 @@ static void check_compatibility(const S390CPUModel *max_model, return; } +#ifndef CONFIG_USER_ONLY + if (only_migratable && test_bit(S390_FEAT_UNPACK, model->features)) { + error_setg(errp, "The unpack facility is not compatible with " + "the --only-migratable option. You must remove either " + "the 'unpack' facility or the --only-migratable option"); + return; + } +#endif + /* detect the missing features to properly report them */ bitmap_andnot(missing, model->features, max_model->features, S390_FEAT_MAX); if (bitmap_empty(missing, S390_FEAT_MAX)) { diff --git a/target/s390x/ioinst.c b/target/s390x/ioinst.c index a412926d27..1ee11522e1 100644 --- a/target/s390x/ioinst.c +++ b/target/s390x/ioinst.c @@ -121,6 +121,12 @@ static int ioinst_schib_valid(SCHIB *schib) if (be32_to_cpu(schib->pmcw.chars) & PMCW_CHARS_MASK_XMWME) { return 0; } + /* for MB format 1 bits 26-31 of word 11 must be 0 */ + /* MBA uses words 10 and 11, it means align on 2**6 */ + if ((be16_to_cpu(schib->pmcw.chars) & PMCW_CHARS_MASK_MBFC) && + (be64_to_cpu(schib->mba) & 0x03fUL)) { + return 0; + } return 1; } diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c index 7a892d663d..73f816a722 100644 --- a/target/s390x/kvm.c +++ b/target/s390x/kvm.c @@ -1785,8 +1785,7 @@ static int handle_intercept(S390CPU *cpu) int icpt_code = run->s390_sieic.icptcode; int r = 0; - DPRINTF("intercept: 0x%x (at 0x%lx)\n", icpt_code, - (long)cs->kvm_run->psw_addr); + DPRINTF("intercept: 0x%x (at 0x%lx)\n", icpt_code, (long)run->psw_addr); switch (icpt_code) { case ICPT_INSTRUCTION: case ICPT_PV_INSTR: |