aboutsummaryrefslogtreecommitdiff
path: root/hw
AgeCommit message (Collapse)Author
2020-06-03hw/riscv: spike: Remove deprecated ISA specific machinesAlistair Francis
The ISA specific Spike machines have been deprecated in QEMU since 4.1, let's finally remove them. Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Bin Meng <bin.meng@windriver.com> Reviewed-by: Thomas Huth <thuth@redhat.com>
2020-06-03hw/riscv: virt: Remove the riscv_ prefix of the machine* functionsBin Meng
Remove the riscv_ prefix of the machine* functions. Signed-off-by: Bin Meng <bin.meng@windriver.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-id: 1590072147-13035-2-git-send-email-bmeng.cn@gmail.com Message-Id: <1590072147-13035-2-git-send-email-bmeng.cn@gmail.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2020-06-03hw/riscv: sifive_u: Remove the riscv_ prefix of the soc* functionsBin Meng
To keep consistency with the machine* functions, remove the riscv_ prefix of the soc* functions. Signed-off-by: Bin Meng <bin.meng@windriver.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-id: 1590072147-13035-1-git-send-email-bmeng.cn@gmail.com Message-Id: <1590072147-13035-1-git-send-email-bmeng.cn@gmail.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2020-06-03riscv: Change the default behavior if no -bios option is specifiedBin Meng
Per QEMU deprecated doc, QEMU 4.1 introduced support for the -bios option in QEMU for RISC-V for the virt machine and sifive_u machine. The default behavior has been that QEMU does not automatically load any firmware if no -bios option is included. Now 2 releases passed, it's time to change the default behavior to load the default OpenSBI firmware automatically. The firmware is included with the QEMU release and no user interaction is required. All a user needs to do is specify the kernel they want to boot with the -kernel option. Signed-off-by: Bin Meng <bin.meng@windriver.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-id: 1588335545-649-1-git-send-email-bmeng.cn@gmail.com Message-Id: <1588335545-649-1-git-send-email-bmeng.cn@gmail.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2020-06-03riscv: Suppress the error report for QEMU testing with riscv_find_firmware()Bin Meng
We only ship plain binary bios images in the QEMU source. With Spike machine that uses ELF images as the default bios, running QEMU test will complain hence let's suppress the error report for QEMU testing. Signed-off-by: Bin Meng <bin.meng@windriver.com> Reviewed-by: Anup Patel <anup@brainfault.org> Message-Id: <1588348254-7241-6-git-send-email-bmeng.cn@gmail.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2020-06-01hw/mips: fuloong2e: Set preferred page size to 16KBHuacai Chen
Loongson processor prefers 16KB page size in system emulator, so let's define mc->minimum_page_bits to 14. Cc: Jiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: Huacai Chen <chenhc@lemote.com> Reviewed-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com> Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com> Message-Id: <1586337380-25217-2-git-send-email-chenhc@lemote.com>
2020-06-01hw/mips: Add CPU IRQ3 delivery for KVMHuacai Chen
Currently, KVM/MIPS only deliver I/O interrupt via IP2, this patch add IP3 delivery as well, because Loongson-3 based machine use both IRQ2 (CPU's IP2) and IRQ3 (CPU's IP3). Signed-off-by: Huacai Chen <chenhc@lemote.com> Co-developed-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Reviewed-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com> Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com> Message-Id: <1588501221-1205-4-git-send-email-chenhc@lemote.com>
2020-05-30hw/m68k/mcf52xx: Replace hw_error() by qemu_log_mask()Philippe Mathieu-Daudé
hw_error() calls exit(). This a bit overkill when we can log the accesses as unimplemented or guest error. When fuzzing the devices, we don't want the whole process to exit. Replace some hw_error() calls by qemu_log_mask(). Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20200526094052.1723-3-f4bug@amsat.org> Reviewed-by: Thomas Huth <huth@tuxfamily.org> Signed-off-by: Thomas Huth <huth@tuxfamily.org>
2020-05-30hw/m68k/mcf5206: Reduce m5206_mbar_read/write() offset arg to 16-bitPhilippe Mathieu-Daudé
All calls to m5206_mbar_read/m5206_mbar_write are used with 'offset = hwaddr & 0x3ff', so we are sure the offset fits in 16-bit. Suggested-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20200526094052.1723-2-f4bug@amsat.org> Signed-off-by: Thomas Huth <huth@tuxfamily.org>
2020-05-28Merge remote-tracking branch 'remotes/kraxel/tags/vga-20200528-pull-request' ↵Peter Maydell
into staging hw/dispaly/sm501: bugfixes, add sanity checks. hw/display: use tracepoints, misc cleanups. # gpg: Signature made Thu 28 May 2020 13:35:32 BST # gpg: using RSA key 4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full] # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" [full] # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full] # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/vga-20200528-pull-request: (21 commits) sm501: Remove obsolete changelog and todo comment sm501: Optimize small overlapping blits sm501: Replace hand written implementation with pixman where possible sm501: Clean up local variables in sm501_2d_operation sm501: Use BIT(x) macro to shorten constant sm501: Shorten long variable names in sm501_2d_operation sm501: Convert printf + abort to qemu_log_mask hw/display/pxa2xx_lcd: Replace printf() call by qemu_log_mask() hw/display/omap_dss: Replace fprintf() call by qemu_log_mask(LOG_UNIMP) hw/display/exynos4210_fimd: Use qemu_log_mask(GUEST_ERROR) hw/display/vmware_vga: Let the PCI device own its I/O MemoryRegion hw/display/vmware_vga: Replace printf() calls by qemu_log_mask(ERROR) hw/display/xlnx_dp: Replace disabled DPRINTF() by error_report() hw/display/dpcd: Convert debug printf()s to trace events hw/display/dpcd: Fix memory region size hw/display/cirrus_vga: Convert debug printf() to trace event hw/display/cirrus_vga: Use qemu_log_mask(ERROR) instead of debug printf hw/display/cirrus_vga: Use qemu_log_mask(UNIMP) instead of debug printf hw/display/cirrus_vga: Convert debug printf() to trace event hw/display/cg3: Convert debug printf()s to trace events ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-05-28Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2020-05-27' ↵Peter Maydell
into staging Error reporting patches for 2020-05-27 # gpg: Signature made Wed 27 May 2020 06:48:02 BST # gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653 # gpg: issuer "armbru@redhat.com" # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full] # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * remotes/armbru/tags/pull-error-2020-05-27: i386: Fix x86_cpu_load_model() error API violation arm/sabrelite: Consistently use &error_fatal in sabrelite_init() mips/boston: Plug memory leak in boston_mach_init() mips/boston: Fix boston_mach_init() error handling mips/malta: Fix create_cps() error handling error: Use error_reportf_err() where appropriate tests/migration: Tighten error checking s390x/cpumodel: Fix harmless misuse of visit_check_struct() xen: Fix and improve handling of device_add usb-host errors nvdimm: Plug memory leak in uuid property setter Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-05-28sm501: Remove obsolete changelog and todo commentBALATON Zoltan
Also update copyright year for latest changes Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 1392cad2ad1315a5a50409970e0af061821462e6.1590089984.git.balaton@eik.bme.hu Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-28sm501: Optimize small overlapping blitsBALATON Zoltan
AmigaOS tends to do a lot of small blits (even 1 pixel). Avoid malloc overhead by keeping around a buffer for this and only alloc when blitting larger areas. Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Message-id: 7946852258d528497e85f465327fc90b5c3b59fb.1590089984.git.balaton@eik.bme.hu Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-28sm501: Replace hand written implementation with pixman where possibleBALATON Zoltan
Besides being faster this should also prevent malicious guests to abuse 2D engine to overwrite data or cause a crash. Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Message-id: 58666389b6cae256e4e972a32c05cf8aa51bffc0.1590089984.git.balaton@eik.bme.hu Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-28sm501: Clean up local variables in sm501_2d_operationBALATON Zoltan
Make variables local to the block they are used in to make it clearer which operation they are needed for. Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: ae59f8138afe7f6a5a4a82539d0f61496a906b06.1590089984.git.balaton@eik.bme.hu Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-28sm501: Use BIT(x) macro to shorten constantBALATON Zoltan
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 124bf5de8d7cf503b32b377d0445029a76bfbd49.1590089984.git.balaton@eik.bme.hu Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-28sm501: Shorten long variable names in sm501_2d_operationBALATON Zoltan
This increases readability and cleans up some confusing naming. Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Message-id: b9b67b94c46e945252a73c77dfd117132c63c4fb.1590089984.git.balaton@eik.bme.hu Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-28sm501: Convert printf + abort to qemu_log_maskBALATON Zoltan
Some places already use qemu_log_mask() to log unimplemented features or errors but some others have printf() then abort(). Convert these to qemu_log_mask() and avoid aborting to prevent guests to easily cause denial of service. Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 305af87f59d81e92f2aaff09eb8a3603b8baa322.1590089984.git.balaton@eik.bme.hu Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-28hw/display/pxa2xx_lcd: Replace printf() call by qemu_log_mask()Philippe Mathieu-Daudé
Replace printf() calls by qemu_log_mask(UNIMP), which is disabled by default. This avoid flooding the terminal when fuzzing the device. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-id: 20200526062252.19852-15-f4bug@amsat.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-28hw/display/omap_dss: Replace fprintf() call by qemu_log_mask(LOG_UNIMP)Philippe Mathieu-Daudé
Replace fprintf() call by qemu_log_mask(LOG_UNIMP), which is disabled by default. This avoid flooding the terminal when fuzzing the device. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-id: 20200526062252.19852-14-f4bug@amsat.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-28hw/display/exynos4210_fimd: Use qemu_log_mask(GUEST_ERROR)Philippe Mathieu-Daudé
Replace DPRINT_ERROR() by qemu_log_mask(GUEST_ERROR). Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-id: 20200526062252.19852-13-f4bug@amsat.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-28hw/display/vmware_vga: Let the PCI device own its I/O MemoryRegionPhilippe Mathieu-Daudé
To avoid the orphan I/O memory region being added in the /unattached QOM container, register the PCI device as its owner. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 20200526062252.19852-12-f4bug@amsat.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-28hw/display/vmware_vga: Replace printf() calls by qemu_log_mask(ERROR)Philippe Mathieu-Daudé
Avoid flooding stdio by converting printf() calls to qemu_log_mask(GUEST_ERROR), which are disabled by default. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-id: 20200526062252.19852-11-f4bug@amsat.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-28hw/display/xlnx_dp: Replace disabled DPRINTF() by error_report()Philippe Mathieu-Daudé
DPRINTF() calls are disabled by default, so when unexpected data is used, the whole process abort without information. Display a bit of information with error_report() before crashing. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-id: 20200526062252.19852-10-f4bug@amsat.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-28hw/display/dpcd: Convert debug printf()s to trace eventsPhilippe Mathieu-Daudé
Convert DPRINTF() to trace events and remove ifdef'ry. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-id: 20200526062252.19852-9-f4bug@amsat.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-28hw/display/dpcd: Fix memory region sizePhilippe Mathieu-Daudé
The memory region size is 512K. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-id: 20200526062252.19852-8-f4bug@amsat.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-28hw/display/cirrus_vga: Convert debug printf() to trace eventPhilippe Mathieu-Daudé
Convert the final bit of DEBUG_BITBLT to a tracepoint. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-id: 20200526062252.19852-7-f4bug@amsat.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-28hw/display/cirrus_vga: Use qemu_log_mask(ERROR) instead of debug printfPhilippe Mathieu-Daudé
Replace some debug printf() calls by qemu_log_mask(LOG_GUEST_ERROR). Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-id: 20200526062252.19852-6-f4bug@amsat.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-28hw/display/cirrus_vga: Use qemu_log_mask(UNIMP) instead of debug printfPhilippe Mathieu-Daudé
Replace some debug printf() calls by qemu_log_mask(LOG_UNIMP), and add a new one in cirrus_linear_bitblt_read(). Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-id: 20200526062252.19852-5-f4bug@amsat.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-28hw/display/cirrus_vga: Convert debug printf() to trace eventPhilippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-id: 20200526062252.19852-4-f4bug@amsat.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-28hw/display/cg3: Convert debug printf()s to trace eventsPhilippe Mathieu-Daudé
Convert DPRINTF() to trace events and remove ifdef'ry. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-id: 20200526062252.19852-3-f4bug@amsat.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-27Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-5.1-20200527' ↵Peter Maydell
into staging ppc patch queue 2020-05-27 Here's the next pull request for qemu-5.1. It includes: * Support for the scv and rfscv POWER9 instructions in TCG * Support for the new SPAPR_LMB_FLAGS_HOTREMOVABLE flag, which provides a way for guests to know memory which should be removable (so the guest can avoid putting immovable allocations there). * Some fixes for the recently added partition scope radix translation in softmmu * Assorted minor fixes and cleanups It includes one patch to avoid a clash with SELinux when using NVLink VFIO devices. That's not technically within the files under my maintainership, but it is in a section of the VFIO quirks code that's specific to the POWER-only NVLink devices, and has an ack from Alex Williamson. # gpg: Signature made Wed 27 May 2020 06:36:59 BST # gpg: using RSA key 75F46586AE61A66CC44E87DC6C38CACA20D9B392 # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>" [full] # gpg: aka "David Gibson (Red Hat) <dgibson@redhat.com>" [full] # gpg: aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>" [full] # gpg: aka "David Gibson (kernel.org) <dwg@kernel.org>" [unknown] # Primary key fingerprint: 75F4 6586 AE61 A66C C44E 87DC 6C38 CACA 20D9 B392 * remotes/dgibson/tags/ppc-for-5.1-20200527: vfio/nvlink: Remove exec permission to avoid SELinux AVCs target/ppc: Fix argument to ppc_radix64_partition_scoped_xlate() again hw/nvram/mac_nvram: Convert debug printf()s to trace events hw/pci-bridge/dec: Remove dead debug code target/ppc: Don't update radix PTE R/C bits with gdbstub target/ppc: Fix arguments to ppc_radix64_partition_scoped_xlate() target/ppc: Add missing braces in ppc_radix64_partition_scoped_xlate() target/ppc: Don't initialize some local variables in ppc_radix64_xlate() target/ppc: Pass const pointer to ppc_radix64_get_fully_qualified_addr() target/ppc: Pass const pointer to ppc_radix64_get_prot_amr() ppc/spapr: Add hotremovable flag on DIMM LMBs on drmem_v2 target/ppc: Add support for scv and rfscv instructions target/ppc: Untabify excp_helper.c ppc/spapr: add a POWER10 CPU model ppc/pnv: Fix NMI system reset SRR1 value Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-05-27arm/sabrelite: Consistently use &error_fatal in sabrelite_init()Markus Armbruster
Cc: Peter Maydell <peter.maydell@linaro.org> Cc: Jean-Christophe Dubois <jcd@tribudubois.net> Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20200505101908.6207-10-armbru@redhat.com> [Straightforward conflict with resolved d2623129a7 "qom: Drop parameter @errp of object_property_add() & friends"]
2020-05-27mips/boston: Plug memory leak in boston_mach_init()Markus Armbruster
Fixes: df1d8a1f29f567567b9d20be685a4241282e7005 Cc: Paul Burton <pburton@wavecomp.com> Cc: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20200505101908.6207-9-armbru@redhat.com> Reviewed-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>
2020-05-27mips/boston: Fix boston_mach_init() error handlingMarkus Armbruster
The Error ** argument must be NULL, &error_abort, &error_fatal, or a pointer to a variable containing NULL. Passing an argument of the latter kind twice without clearing it in between is wrong: if the first call sets an error, it no longer points to NULL for the second call. boston_mach_init() is wrong that way. The last calls treats an error as fatal. Do that for the prior ones, too. Fixes: df1d8a1f29f567567b9d20be685a4241282e7005 Cc: Paul Burton <pburton@wavecomp.com> Cc: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20200505101908.6207-8-armbru@redhat.com> Reviewed-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>
2020-05-27mips/malta: Fix create_cps() error handlingMarkus Armbruster
The Error ** argument must be NULL, &error_abort, &error_fatal, or a pointer to a variable containing NULL. Passing an argument of the latter kind twice without clearing it in between is wrong: if the first call sets an error, it no longer points to NULL for the second create_cps() is wrong that way. The last calls treats an error as fatal. Do that for the prior ones, too. Fixes: bff384a4fbd5d0e86939092e74e766ef0f5f592c Cc: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com> Cc: "Philippe Mathieu-Daudé" <philmd@redhat.com> Cc: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20200505101908.6207-7-armbru@redhat.com> Reviewed-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>
2020-05-27error: Use error_reportf_err() where appropriateMarkus Armbruster
Replace error_report("...: %s", ..., error_get_pretty(err)); by error_reportf_err(err, "...: ", ...); One of the replaced messages lacked a colon. Add it. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200505101908.6207-6-armbru@redhat.com>
2020-05-27xen: Fix and improve handling of device_add usb-host errorsMarkus Armbruster
usbback_portid_add() leaks the error when qdev_device_add() fails. Fix that. While there, use the error to improve the error message. The qemu_opts_from_qdict() similarly leaks on failure. But any failure there is a programming error. Pass &error_abort. Fixes: 816ac92ef769f9ffc534e49a1bb6177bddce7aa2 Cc: Stefano Stabellini <sstabellini@kernel.org> Cc: Anthony Perard <anthony.perard@citrix.com> Cc: Paul Durrant <paul@xen.org> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: xen-devel@lists.xenproject.org Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20200505101908.6207-3-armbru@redhat.com> Acked-by: Paul Durrant <paul@xen.org>
2020-05-27nvdimm: Plug memory leak in uuid property setterMarkus Armbruster
nvdimm_set_uuid() leaks memory on qemu_uuid_parse() failure. Fix that. Fixes: 6c5627bb24dcd68c997857a8b671617333b1289f Cc: Xiao Guangrong <xiaoguangrong.eric@gmail.com> Cc: Shivaprasad G Bhat <sbhat@linux.ibm.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20200505101908.6207-2-armbru@redhat.com> Tested-by: Shivaprasad G Bhat <sbhat@linux.ibm.com> Reviewed-by: Shivaprasad G Bhat <sbhat@linux.ibm.com>
2020-05-27vfio/nvlink: Remove exec permission to avoid SELinux AVCsLeonardo Bras
If SELinux is setup without 'execmem' permission for qemu, all mmap with (PROT_WRITE | PROT_EXEC) will fail and print a warning in SELinux log. If "nvlink2-mr" memory allocation fails (fist diff), it will cause guest NUMA nodes to not be correctly configured (V100 memory will not be visible for guest, nor its NUMA nodes). Not having 'execmem' permission is intesting for virtual machines to avoid buffer-overflow based attacks, and it's adopted in distros like RHEL. So, removing the PROT_EXEC flag seems the right thing to do. Browsing some other code that mmaps memory for usage with memory_region_init_ram_device_ptr, I could notice it's usual to not have PROT_EXEC (only PROT_READ | PROT_WRITE), so it should be no problem around this. Signed-off-by: Leonardo Bras <leobras.c@gmail.com> Message-Id: <20200501055448.286518-1-leobras.c@gmail.com> Acked-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2020-05-27hw/nvram/mac_nvram: Convert debug printf()s to trace eventsPhilippe Mathieu-Daudé
Convert NVR_DPRINTF() to trace events and remove ifdef'ry. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20200524165126.13920-1-f4bug@amsat.org> Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2020-05-27hw/pci-bridge/dec: Remove dead debug codePhilippe Mathieu-Daudé
Remove debug code never used since added in commit e1c6bbabee30. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20200525033910.26166-1-f4bug@amsat.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2020-05-27ppc/spapr: Add hotremovable flag on DIMM LMBs on drmem_v2Leonardo Bras
On reboot, all memory that was previously added using object_add and device_add is placed in this DIMM area. The new SPAPR_LMB_FLAGS_HOTREMOVABLE flag helps Linux to put this memory in the correct memory zone, so no unmovable allocations are made there, allowing the object to be easily hot-removed by device_del and object_del. This new flag was accepted in Power Architecture documentation. Signed-off-by: Leonardo Bras <leobras.c@gmail.com> Reviewed-by: Bharata B Rao <bharata@linux.ibm.com> Message-Id: <20200511200201.58537-1-leobras.c@gmail.com> [dwg: Fixed syntax error spotted by Cédric Le Goater] Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2020-05-27ppc/spapr: add a POWER10 CPU modelCédric Le Goater
Signed-off-by: Cédric Le Goater <clg@kaod.org> Message-Id: <20200507073855.2485680-1-clg@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2020-05-27ppc/pnv: Fix NMI system reset SRR1 valueNicholas Piggin
Commit a77fed5bd926 ("ppc/pnv: Add support for NMI interface") got the SRR1 setting wrong for sresets that hit outside of power-save states. Fix this, better documenting the source for the bit definitions. Fixes: 01b552b05b0f ("ppc/pnv: Add support for NMI interface") Cc: Cédric Le Goater <clg@kaod.org> Cc: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Message-Id: <20200507114824.788942-1-npiggin@gmail.com> Reviewed-by: Cédric Le Goater <clg@kaod.org> [dwg: Fixed up some tab indentation] Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2020-05-26Merge remote-tracking branch ↵Peter Maydell
'remotes/philmd-gitlab/tags/mips-hw-next-20200526' into staging MIPS hardware updates - MAINTAINERS updated to welcome Huacai Chen and Jiaxun Yang, and update Aleksandar Rikalo's email address, - Trivial improvements in the Bonito64 North Bridge and the Fuloong 2e machine, - MIPS Machines names unified without 'mips_' prefix. CI: https://travis-ci.org/github/philmd/qemu/builds/691247975 # gpg: Signature made Tue 26 May 2020 14:32:08 BST # gpg: using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE # gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [full] # Primary key fingerprint: FAAB E75E 1291 7221 DCFD 6BB2 E3E3 2C2C DEAD C0DE * remotes/philmd-gitlab/tags/mips-hw-next-20200526: MAINTAINERS: Change Aleksandar Rikalo's email address hw/mips/mips_int: De-duplicate KVM interrupt delivery hw/mips/malta: Add some logging for bad register offset cases hw/mips: Rename malta/mipssim/r4k/jazz files hw/mips/fuloong2e: Fix typo in Fuloong machine name hw/mips/fuloong2e: Move code and update a comment hw/pci-host/bonito: Set the Config register reset value with FIELD_DP32 hw/pci-host/bonito: Better describe the I/O CS regions hw/pci-host/bonito: Map the different PCI ranges more detailed hw/pci-host/bonito: Map all the Bonito64 I/O range hw/pci-host/bonito: Map peripheral using physical address hw/pci-host/bonito: Fix DPRINTF() format strings hw/pci-host: Use CONFIG_PCI_BONITO to select the Bonito North Bridge MAINTAINERS: Add Huacai Chen as fuloong2e co-maintainer Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-05-26Merge remote-tracking branch 'remotes/gkurz/tags/9p-next-2020-05-26' into ↵Peter Maydell
staging - fix build with musl libc - fix potential deadlock of QEMU main event loop (cannot be hit with linux client) - revert 9pfs reply truncation (LP 1877688) - xen backend waits for client to free space on the reply ring instead of truncating or disconnecting # gpg: Signature made Tue 26 May 2020 10:36:23 BST # gpg: using RSA key B4828BAF943140CEF2A3491071D4D5E5822F73D6 # gpg: Good signature from "Greg Kurz <groug@kaod.org>" [full] # gpg: aka "Gregory Kurz <gregory.kurz@free.fr>" [full] # gpg: aka "[jpeg image of size 3330]" [full] # Primary key fingerprint: B482 8BAF 9431 40CE F2A3 4910 71D4 D5E5 822F 73D6 * remotes/gkurz/tags/9p-next-2020-05-26: xen/9pfs: increase max ring order to 9 xen/9pfs: yield when there isn't enough room on the ring Revert "9p: init_in_iov_from_pdu can truncate the size" 9p: Lock directory streams with a CoMutex 9pfs: include linux/limits.h for XATTR_SIZE_MAX Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-05-26hw/mips/mips_int: De-duplicate KVM interrupt deliveryPhilippe Mathieu-Daudé
Refactor duplicated code in a single place. Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20200429082916.10669-2-f4bug@amsat.org> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2020-05-26hw/mips/malta: Add some logging for bad register offset casesAleksandar Markovic
Log the cases where a guest attempts read or write using bad register offset. Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com> Message-id: <20200518200920.17344-21-aleksandar.qemu.devel@gmail.com> [PMD: Replaced TARGET_FMT_lx by HWADDR_PRIX] Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2020-05-26hw/mips: Rename malta/mipssim/r4k/jazz filesAleksandar Markovic
Machine file names should not have prefix "mips_". Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com> Message-id: <20200518200920.17344-22-aleksandar.qemu.devel@gmail.com> [PMD: Fixed Fuloong line conflict due to rebase] Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>