summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-07-28Merge remote-tracking branch 'remotes/yongbok/tags/mips-20170728' into stagingPeter Maydell5-17/+24
MIPS patches 2017-07-28 Changes: * Improve ths MIPS board kernel load error reporting * Revert unnecessary warning messages # gpg: Signature made Fri 28 Jul 2017 13:47:52 BST # gpg: using RSA key 0x2238EB86D5F797C2 # gpg: Good signature from "Yongbok Kim <yongbok.kim@imgtec.com>" # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 8600 4CF5 3415 A5D9 4CFA 2B5C 2238 EB86 D5F7 97C2 * remotes/yongbok/tags/mips-20170728: Revert "elf-loader: warn about invalid endianness" hw/mips: load_elf_strerror to report kernel loading failure Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-07-28Merge remote-tracking branch 'remotes/kraxel/tags/ui-20170728-pull-request' ↵Peter Maydell4-31/+23
into staging ui: more keymap fixes for 2.10 # gpg: Signature made Fri 28 Jul 2017 13:59:01 BST # gpg: using RSA key 0x4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/ui-20170728-pull-request: ui: add pause key to linux_to_qcode ui: drop ac_search and ac_stop ui: correctly detect spice PAUSE scancode sequence Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-07-28Revert "elf-loader: warn about invalid endianness"Alexey Kardashevskiy1-1/+0
This reverts c8e1158cf611 "elf-loader: warn about invalid endianness" as it produces a useless message every time an LE kernel image is passed via -kernel on a ppc64-pseries machine. The pseries machine already checks for ELF_LOAD_WRONG_ENDIAN and tries with big_endian=0. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Yongbok Kim <yongbok.kim@imgtec.com>
2017-07-28hw/mips: load_elf_strerror to report kernel loading failureAurelien Jarno4-16/+24
Emulated MIPS boards bail out with a simple "could not load kernel" when a kernel could not be load, without specifying the underlying reason. Fix that by calling load_elf_strerror. At the same time use error_report to report the error instead of fprintf. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Yongbok Kim <yongbok.kim@imgtec.com>
2017-07-28ui: add pause key to linux_to_qcodeGerd Hoffmann1-0/+1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 20170728063432.27578-1-kraxel@redhat.com
2017-07-28ui: drop ac_search and ac_stopGerd Hoffmann3-12/+9
Both keys exist already: "ac_search" is "find" and "ac_stop" is "stop". Fixes: 37810e80553c19f0dac3644924895a9bf5c70785 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 20170728063415.27480-1-kraxel@redhat.com
2017-07-28ui: correctly detect spice PAUSE scancode sequenceDaniel P. Berrange1-19/+13
The SPICE input code is currently detcting 0xe1 0x1d 0x45 as the PAUSE key make sequence and 0xe1 0x9d 0xc5 as the break sequence. This is incorrect, because all 6 scancodes together are the make sequence, and there is no break sequence. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 20170727174640.30359-1-berrange@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-07-28Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20170728' into stagingPeter Maydell3-3/+8
More s390x fixes: Correct ilen, and ccw checking. # gpg: Signature made Fri 28 Jul 2017 10:13:42 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>" # Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0 18CE DECF 6B93 C6F0 2FAF * remotes/cohuck/tags/s390x-20170728: s390x/css: fix bits must be zero check for TIC s390x/css: check ccw address validity target/s390x: fix pgm irq ilen in translate_pages() target/s390x: fix pgm irq ilen for stsi Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-07-28s390x/css: fix bits must be zero check for TICHalil Pasic1-1/+2
According to the PoP bit positions 0-3 and 8-32 of the format-1 CCW must contain zeros. Bits 0-3 are already covered by cmd_code validity checking, and bit 32 is covered by the CCW address checking. Bits 8-31 correspond to CCW1.flags and CCW1.count. Currently we only check for the absence of certain flags. Let's fix this. Signed-off-by: Halil Pasic <pasic@linux.vnet.ibm.com> Message-Id: <20170725224442.13383-3-pasic@linux.vnet.ibm.com> Reviewed-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com> [CH: tweaked comment] Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2017-07-28s390x/css: check ccw address validityHalil Pasic1-0/+4
According to the PoP channel command words (CCW) must be doubleword aligned and 31 bit addressable for format 1 and 24 bit addressable for format 0 CCWs. If the channel subsystem encounters a ccw address which does not satisfy this alignment requirement a program-check condition is recognised. The situation with 31 bit addressable is a bit more complicated: both the ORB and a format 1 CCW TIC hold the address of (the rest of) the channel program, that is the address of the next CCW in a word, and the PoP mandates that bit 0 of that word shall be zero -- or a program-check condition is to be recognized -- and does not belong to the field holding the ccw address. Since in code the corresponding fields span across the whole word (unlike in PoP where these are defined as 31 bit wide) we can check this by applying a mask. The 24 addressable case isn't affecting TIC because the address is composed of a halfword and a byte portion (no additional zero bit requirements) and just slightly complicates the ORB case where also bits 1-7 need to be zero. The same requirements (especially n-bit addressability) apply to the ccw addresses generated while chaining. Let's make our CSS implementation follow the AR more closely. Signed-off-by: Halil Pasic <pasic@linux.vnet.ibm.com> Message-Id: <20170727154842.23427-1-pasic@linux.vnet.ibm.com> Reviewed-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2017-07-28target/s390x: fix pgm irq ilen in translate_pages()David Hildenbrand1-1/+1
0 is certainly wrong. Let's use ILEN_AUTO. Signed-off-by: David Hildenbrand <david@redhat.com> Message-Id: <20170721125609.11117-3-david@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2017-07-28target/s390x: fix pgm irq ilen for stsiDavid Hildenbrand1-1/+1
The instruction is 4 bytes long. Signed-off-by: David Hildenbrand <david@redhat.com> Message-Id: <20170721125609.11117-2-david@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2017-07-27Merge remote-tracking branch 'remotes/kraxel/tags/ui-20170727-pull-request' ↵Peter Maydell11-125/+222
into staging ui: keymap fixes for 2.10 # gpg: Signature made Thu 27 Jul 2017 15:00:06 BST # gpg: using RSA key 0x4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/ui-20170727-pull-request: ps2: fix sending of PAUSE/BREAK scancodes ui: drop altgr and altgr_r QKeyCodes ps2: enable multimedia keys ui: add multimedia keys ui: update keymaps ui: move qemu_input_linux_to_qcode() ui: add next and prior keysyms Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-07-27ps2: fix sending of PAUSE/BREAK scancodesDaniel P. Berrange3-0/+22
The processing of the scancodes for PAUSE/BREAK has been broken since the conversion to qcodes in: commit 8c10e0baf0260b59a4e984744462a18016662e3e Author: Hervé Poussineau <hpoussin@reactos.org> Date: Thu Sep 15 22:06:26 2016 +0200 ps2: use QEMU qcodes instead of scancodes When using a VNC client, with the raw scancode extension, the client will send a scancode of 0xc6 for both PAUSE and BREAK. There is mistakenly no entry in the qcode_to_number table for this scancode, so ps2_keyboard_event() just generates a log message and discards the scancode When using a SPICE client, it will also send 0xc6 for BREAK, but will send 0xe1 0x1d 0x45 0xe1 0x9d 0xc5 for PAUSE. There is no entry in the qcode_to_number table for the scancode 0xe1 because it is a special XT keyboard prefix not mapping to any QKeyCode. Again ps2_keyboard_event() just generates a log message and discards the scancode. The following 0x1d, 0x45, 0x9d, 0xc5 scancodes get handled correctly. Rather than trying to handle 3 byte sequences of scancodes in the PS/2 driver, special case the SPICE input code so that it captures the 3 byte pause sequence and turns it into a Pause QKeyCode. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 20170727113243.23991-1-berrange@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-07-27ui: drop altgr and altgr_r QKeyCodesGerd Hoffmann5-7/+2
The right alt key (alt_r aka KEY_RIGHTALT) is used for AltGr. The altgr and altgr_r keys simply don't exist. Drop them. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20170727104720.30061-1-kraxel@redhat.com
2017-07-27ps2: enable multimedia keysGerd Hoffmann1-4/+0
Fixes: 8c10e0baf0260b59a4e984744462a18016662e3e Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20170726152918.11995-6-kraxel@redhat.com
2017-07-27ui: add multimedia keysGerd Hoffmann2-1/+71
Add multimedia keys to QKeyCodes and to the keymaps. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20170726152918.11995-5-kraxel@redhat.com
2017-07-27ui: update keymapsGerd Hoffmann1-0/+7
Add recently added QKeyCodes to the keymaps. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20170726152918.11995-4-kraxel@redhat.com
2017-07-27ui: move qemu_input_linux_to_qcode()Gerd Hoffmann3-113/+116
Move from input-linux.c to input-keymap.c and export it, so the function is available elsewhere too. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20170726152918.11995-3-kraxel@redhat.com
2017-07-27ui: add next and prior keysymsGerd Hoffmann2-0/+4
Page-up and Page-down were renamed. Add the names to the keysym list so we can parse both old and new names. The keypad versions are already present in the vnc map. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20170726152918.11995-2-kraxel@redhat.com
2017-07-27Merge remote-tracking branch 'remotes/awilliam/tags/vfio-fixes-20170726.0' ↵Peter Maydell2-5/+8
into staging VFIO fixes 2017-07-26 - Error path use after free bug fixes (Philippe Mathieu-Daudé) # gpg: Signature made Wed 26 Jul 2017 18:49:00 BST # gpg: using RSA key 0x239B9B6E3BB08B22 # gpg: Good signature from "Alex Williamson <alex.williamson@redhat.com>" # gpg: aka "Alex Williamson <alex@shazbot.org>" # gpg: aka "Alex Williamson <alwillia@redhat.com>" # gpg: aka "Alex Williamson <alex.l.williamson@gmail.com>" # Primary key fingerprint: 42F6 C04E 540B D1A9 9E7B 8A90 239B 9B6E 3BB0 8B22 * remotes/awilliam/tags/vfio-fixes-20170726.0: vfio/pci: fix use of freed memory vfio/platform: fix use of freed memory Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-07-27Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into ↵Peter Maydell1-11/+23
staging x86 bug fix for -rc1 Fix for a bug in "-cpu max" that breaks libvirt usage of query-cpu-model-expansion. # gpg: Signature made Wed 26 Jul 2017 19:35:28 BST # gpg: using RSA key 0x2807936F984DC5A6 # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" # Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF D1AA 2807 936F 984D C5A6 * remotes/ehabkost/tags/x86-pull-request: target/i386: Don't use x86_cpu_load_def() on "max" CPU model target/i386: Define CPUID_MODEL_ID_SZ macro target/i386: Use host_vendor_fms() in max_x86_cpu_initfn() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-07-26target/i386: Don't use x86_cpu_load_def() on "max" CPU modelEduardo Habkost1-6/+12
When commit 0bacd8b3046f ('i386: Don't set CPUClass::cpu_def on "max" model') removed the CPUClass::cpu_def field, we kept using the x86_cpu_load_def() helper directly in max_x86_cpu_initfn(), emulating the previous behavior when CPUClass::cpu_def was set. However, x86_cpu_load_def() is intended to help initialization of CPU models from the builtin_x86_defs table, and does lots of other steps that are not necessary for "max". One of the things x86_cpu_load_def() do is to set the properties listed at tcg_default_props/kvm_default_props. We must not do that on the "max" CPU model, otherwise under KVM we will incorrectly report all KVM features as always available, and the "svm" feature as always unavailable. The latter caused the bug reported at: https://bugzilla.redhat.com/show_bug.cgi?id=1467599 ("Unable to start domain: the CPU is incompatible with host CPU: Host CPU does not provide required features: svm") Replace x86_cpu_load_def() with simple object_property_set*() calls. In addition to fixing the above bug, this makes the KVM branch in max_x86_cpu_initfn() very similar to the existing TCG branch. For reference, the full list of steps performed by x86_cpu_load_def() is: * Setting min-level and min-xlevel. Already done by max_x86_cpu_initfn(). * Setting family/model/stepping/model-id. Done by the code added to max_x86_cpu_initfn() in this patch. * Copying def->features. Wrong because "-cpu max" features need to be calculated at realize time. This was not a problem in the current code because host_cpudef.features was all zeroes. * x86_cpu_apply_props() calls. This causes the bug above, and shouldn't be done. * Setting CPUID_EXT_HYPERVISOR. Not needed because it is already reported by x86_cpu_get_supported_feature_word(), and because "-cpu max" features need to be calculated at realize time. * Setting CPU vendor to host CPU vendor if on KVM mode. Redundant, because max_x86_cpu_initfn() already sets it to the host CPU vendor. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20170712162058.10538-5-ehabkost@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2017-07-26target/i386: Define CPUID_MODEL_ID_SZ macroEduardo Habkost1-0/+11
Document cpu_x86_fill_model_id() and define CPUID_MODEL_ID_SZ to help callers use the right buffer size. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20170712162058.10538-4-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2017-07-26target/i386: Use host_vendor_fms() in max_x86_cpu_initfn()Eduardo Habkost1-7/+2
The existing code duplicated the logic in host_vendor_fms(), so reuse the helper function instead. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20170712162058.10538-3-ehabkost@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2017-07-26vfio/pci: fix use of freed memoryPhilippe Mathieu-Daudé1-4/+7
hw/vfio/pci.c:308:29: warning: Use of memory after it is freed qemu_set_fd_handler(*pfd, NULL, NULL, vdev); ^~~~ Reported-by: Clang Static Analyzer Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2017-07-26vfio/platform: fix use of freed memoryPhilippe Mathieu-Daudé1-1/+1
free the data _after_ using it. hw/vfio/platform.c:126:29: warning: Use of memory after it is freed qemu_set_fd_handler(*pfd, NULL, NULL, NULL); ^~~~ Reported-by: Clang Static Analyzer Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2017-07-25Update version for v2.10.0-rc0 releasev2.10.0-rc0Peter Maydell1-1/+1
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-07-25Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2017-07-25' ↵Peter Maydell4-8/+14
into staging Block patches for 2.10-rc0 # gpg: Signature made Tue 25 Jul 2017 15:35:12 BST # gpg: using RSA key 0xF407DB0061D5CF40 # gpg: Good signature from "Max Reitz <mreitz@redhat.com>" # Primary key fingerprint: 91BE B60A 30DB 3E88 57D1 1829 F407 DB00 61D5 CF40 * remotes/maxreitz/tags/pull-block-2017-07-25: qemu-iotests: Fix reference output for 186 qcow2-bitmap: fix bitmap_free qcow: fix memory leaks related to encryption Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-07-25qemu-iotests: Fix reference output for 186Kevin Wolf1-3/+3
Commits 70f17a1 ('error: Revert unwanted change of warning messages') and e1824e5 ('qemu-iotests: Test 'info block'') had a semantic merge conflict, which results in failure for qemu-iotests case 186. Fix the reference output to consider the changes of 70f17a1. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-id: 1500973176-29235-1-git-send-email-kwolf@redhat.com Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2017-07-25qcow2-bitmap: fix bitmap_freeVladimir Sementsov-Ogievskiy1-0/+4
Fix possible crash on error path in qcow2_remove_persistent_dirty_bitmap. Although bitmap_free was added in 88ddffae8fc the bug was introduced later in commit 469c71edc72 (when qcow2_remove_persistent_dirty_bitmap was added). Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20170714123341.373857-1-vsementsov@virtuozzo.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2017-07-25qcow: fix memory leaks related to encryptionDaniel P. Berrange2-5/+7
Fix leak of the 'encryptopts' string, which was mistakenly declared const. Fix leak of QemuOpts entry which should not have been deleted from the opts array. Reported by: coverity Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 20170714103105.5781-1-berrange@redhat.com Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2017-07-25hw/display/sm501: Don't use vmstate_register_ram_global()Peter Maydell1-2/+1
The sm501 device uses vmstate_register_ram_global() to register its memory region for migration. This means it gets a name that is assumed to be global to the whole system, which in turn means that if you create two of the device we assert because of the duplication: qemu-system-ppc -device sm501 -device sm501 RAMBlock "sm501.local" already registered, abort! Aborted (core dumped) Changing this to just use memory_region_init_ram()'s automatic registration of the memory region with a device-local name fixes this. The downside is that it breaks migration compatibility, but luckily we only added migration support to this device in the 2.10 release cycle so we haven't released a QEMU version with the broken implementation. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-id: 1500309462-12792-1-git-send-email-peter.maydell@linaro.org
2017-07-25Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20170725' into stagingPeter Maydell16-796/+914
Various changes for the s390x code: - updates for cpu model handling - fix compilation with --disable-tcg - fixes in vfio-ccw and I/O instruction handling # gpg: Signature made Tue 25 Jul 2017 10:15:37 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>" # Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0 18CE DECF 6B93 C6F0 2FAF * remotes/cohuck/tags/s390x-20170725: s390x/css: fix ilen in IO instruction handlers target/s390x: Add remaining switches to compile with --disable-tcg target/s390x: Move exception-related functions to a new excp_helper.c file target/s390x: Rework program_interrupt() and related functions target/s390x: Move diag helpers to a separate file target/s390x: Move s390_cpu_dump_state() to helper.c target/s390x: improve baselining if certain base features are missing s390x/kvm: better comment regarding zPCI feature availability target/s390x: introduce (test|set)_be_bit target/s390x: indicate query subfunction in s390_fill_feat_block target/s390x: drop BE_BIT() s390/cpumodel: remove KSS from the default model of z14 vfio/ccw: fix initialization of the Object DeviceState pointer in the common base-device vfio/ccw: allocate irq info with the right size Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-07-25Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.10-20170725' ↵Peter Maydell5-21/+25
into staging ppc patch queue 2017-07-25 Last pull request for the 2.10 hard freeze, and correspondingly small. There are a handful of bugfixes here plus an update for the "pseries" guest firmware (SLOF). This is later than ideal for a guest firmware update. However, this does include a number of fixes in that guest firmware, so I think it's worth the risk of squeezing this in just before the hard freeze. # gpg: Signature made Tue 25 Jul 2017 06:43:14 BST # gpg: using RSA key 0x6C38CACA20D9B392 # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>" # gpg: aka "David Gibson (Red Hat) <dgibson@redhat.com>" # gpg: aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>" # gpg: aka "David Gibson (kernel.org) <dwg@kernel.org>" # Primary key fingerprint: 75F4 6586 AE61 A66C C44E 87DC 6C38 CACA 20D9 B392 * remotes/dgibson/tags/ppc-for-2.10-20170725: pseries: Update SLOF firmware image spapr: Fix QEMU abort during memory unplug spapr/htab: fix savevm spapr_pci: Fix obsolete comment about MSIX encoding in addr/data Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-07-25s390x/css: fix ilen in IO instruction handlersHalil Pasic1-21/+21
When initiating a program check interruption by calling program_interrupt the instruction length (ilen) of the current instruction is supplied as the third parameter. On s390x all the IO instructions are of instruction format S and their ilen is 4. The calls to program_interrupt (introduced by commits 7b18aad543 ("s390: Add channel I/O instructions.", 2013-01-24) and 61bf0dcb2e ("s390x/ioinst: Add missing alignment checks for IO instructions", 2013-06-21)) however use ilen == 2. This is probably due to a confusion between ilen which specifies the instruction length in bytes and ILC which does the same but in halfwords. If kvm_enabled() this does not actually matter, because the ilen parameter of program_interrupt is effectively unused. Let's provide the correct ilen to program_interrupt. Signed-off-by: Halil Pasic <pasic@linux.vnet.ibm.com> Fixes: 7b18aad543 ("s390: Add channel I/O instructions.") Fixes: 61bf0dcb2e ("s390x/ioinst: Add missing alignment checks for IO instructions") Reviewed-by: David Hildenbrand <david@redhat.com> Message-Id: <20170724143452.55534-1-pasic@linux.vnet.ibm.com> Reviewed-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2017-07-25target/s390x: Add remaining switches to compile with --disable-tcgThomas Huth2-3/+7
Adding some CONFIG_TCG tests to be finally able to compile QEMU on s390x also without TCG. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1500886370-14572-6-git-send-email-thuth@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2017-07-25target/s390x: Move exception-related functions to a new excp_helper.c fileThomas Huth4-469/+528
These functions can not be compiled with --disable-tcg. But since we need the other functions from helper.c in the non-tcg build, we can also not simply remove helper.c from the non-tcg builds. Thus the problematic functions have to be moved into a separate new file instead that we can later omit in the non-tcg builds. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1500886370-14572-5-git-send-email-thuth@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2017-07-25target/s390x: Rework program_interrupt() and related functionsThomas Huth5-48/+52
misc_helper.c won't be compiled with --disable-tcg anymore, but we still need the program_interrupt() function in that case. Move it to interrupt.c instead, and refactor it to re-use the code from trigger_pgm_exception() (for TCG) and enter_pgmcheck() (for KVM, which now got renamed to kvm_s390_program_interrupt() for clarity). Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1500886370-14572-4-git-send-email-thuth@redhat.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2017-07-25target/s390x: Move diag helpers to a separate fileThomas Huth3-168/+180
misc_helper.c won't be compiled with --disable-tcg anymore, but we still need the diag helpers in KVM builds, too, so move the helper functions to a separate file. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1500886370-14572-3-git-send-email-thuth@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2017-07-25target/s390x: Move s390_cpu_dump_state() to helper.cThomas Huth2-60/+60
translate.c can not be compiled with --disable-tcg, but we need the s390_cpu_dump_state() in KVM-only builds, too. So let's move that function to helper.c instead, which will also be compiled when --disable-tcg has been specified. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1500886370-14572-2-git-send-email-thuth@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2017-07-25target/s390x: improve baselining if certain base features are missingDavid Hildenbrand1-0/+33
There are certain features that we put into base models, but that are not relevant for the actual search. The most famous example are MSA subfunctions that might be disabled on certain real hardware out there. While the kvm host model detection will usually detect the correct model on such machines (as it will in the common case not pass features to check for into s390_find_cpu_def()), baselining will fall back to a quite old model just because some MSA subfunctions are missing. Let's improve that by ignoring lack of these features while performing the search for a base model. Signed-off-by: David Hildenbrand <david@redhat.com> Message-Id: <20170720123721.12366-6-david@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2017-07-25s390x/kvm: better comment regarding zPCI feature availabilityDavid Hildenbrand1-1/+1
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: David Hildenbrand <david@redhat.com> Message-Id: <20170720123721.12366-5-david@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2017-07-25target/s390x: introduce (test|set)_be_bitDavid Hildenbrand3-16/+14
Using ordinary bitmap operations to set/test bits does not work properly on architectures !s390x. Let's drop (test|set)_bit_inv and introduce (test|set)_be_bit instead. These functions work on uint8_t array, not on unsigned longs arrays and are for now only used in the context of CPU features. Signed-off-by: David Hildenbrand <david@redhat.com> Message-Id: <20170720123721.12366-4-david@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2017-07-25target/s390x: indicate query subfunction in s390_fill_feat_blockDavid Hildenbrand2-18/+26
We'll have to do the same for TCG, so let's just move it in there. Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: David Hildenbrand <david@redhat.com> Message-Id: <20170720123721.12366-3-david@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2017-07-25target/s390x: drop BE_BIT()David Hildenbrand1-1/+0
Unused and broken, let's just get rid of it. Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: David Hildenbrand <david@redhat.com> Message-Id: <20170720123721.12366-2-david@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2017-07-25s390/cpumodel: remove KSS from the default model of z14Christian Borntraeger2-1/+1
The SIE_KSS feature will allow a guest to use KSS for a nested guest. To create a nested guest the SIE_F2 facility is still necessary. Since SIE_F2 is not part of the default model it does not make a lot of sense to provide the SIE_KSS feature in the default model. Let's also create a dependency check. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Reviewed-by: Jason J. Herne <jjherne@linux.vnet.ibm.com> Reviewed-by: Janosch Frank <frankja@linux.vnet.ibm.com> Message-Id: <1500550051-7821-2-git-send-email-borntraeger@de.ibm.com> Acked-by: David Hildenbrand <david@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2017-07-25vfio/ccw: fix initialization of the Object DeviceState pointer in the common ↵Dong Jia Shi1-0/+1
base-device Commit 7da624e2 ("vfio: Test realized when using VFIOGroup.device_list iterator") introduced a pointer to the Object DeviceState in the VFIO common base-device and skipped non-realized devices as we iterate VFIOGroup.device_list. While it missed to initialize the pointer for the vfio-ccw case. Let's fix it. Fixes: 7da624e2 ("vfio: Test realized when using VFIOGroup.device_list iterator") Cc: Alex Williamson <alex.williamson@redhat.com> Reviewed-by: Halil Pasic <pasic@linux.vnet.ibm.com> Signed-off-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com> Reviewed-by: Alex Williamson <alex.williamson@redhat.com> Message-Id: <20170718014926.44781-3-bjsdjshi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2017-07-25vfio/ccw: allocate irq info with the right sizeJing Zhang1-1/+1
When allocating memory for the vfio_irq_info parameter of the VFIO_DEVICE_GET_IRQ_INFO ioctl, we used the wrong size. Let's fix it by using the right size. Reviewed-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com> Signed-off-by: Jing Zhang <bjzhjing@linux.vnet.ibm.com> Signed-off-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com> Message-Id: <20170718014926.44781-2-bjsdjshi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2017-07-25pseries: Update SLOF firmware imageAlexey Kardashevskiy3-1/+1
The main changes are: - fixes in PCI bridges code; - LUN>255 are allowed not in virtio-scsi. The full list is: > pci-scan: Fix pci-bridge-set-mem-base and pci-bridge-set-mem-limit > pci: Avoid 32-bit prefetchable memory area if possible > Remove unused functions ishexdigit and $cat-comma > pci: Translate PCI addresses to host addresses at the end of map-in > Define 'open' and 'close' words of the /aliases nodes right from the start > virtio-scsi: Allow LUNs bigger than 255 > paflof: Silence gcc's -Warray-bounds warning for stack pointers > board_qemu: move code out of fdt-fix-node-phandle > board_qemu: drop unused values early in fdt-fix-node-phandle > pci: Improve the pci-var-out debug function > libhvcall: drop unused KVMPPC_H_REPORT_MC_ERR and KVMPPC_H_NMI_MCE defines Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>