aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-01-11tests/display-vga: Enable virtio-vga testThomas Huth2-5/+10
There are some "#ifdef CONFIG_VIRTIO_VGA" in the code here which do not work as expected: CONFIG_VIRTIO_VGA is a Makefile switch, but not a CPP macro, so the "guarded" code currently simply never gets enabled. So enable this code now unconditionally, with some runtime switches for the architectures that have the VIRTIO_VGA device enabled by default. Looking at the other if-statement in the main function here, it also seems like this test was originally supposed to be running on "mips" and "alpha", too, so enable it now for these architectures in the Makefile, too. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-id: 1543492248-28356-1-git-send-email-thuth@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-01-10Merge remote-tracking branch ↵Peter Maydell1-0/+3
'remotes/kraxel/tags/audio-20190110-pull-request' into staging audio: two fixes. # gpg: Signature made Thu 10 Jan 2019 09:23:24 GMT # gpg: using RSA key 4CB6D8EED3E87138 # 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/audio-20190110-pull-request: usb-audio: ignore usb packages with wrong size hw/audio/marvell: Don't include unnecessary i2c.h header file Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-01-10Merge remote-tracking branch ↵Peter Maydell1-4/+57
'remotes/vivier2/tags/linux-user-for-4.0-pull-request' into staging Minor linux-user update (2019-01-10) Fixes LTP tests pwrite03 and pwrite03_64 # gpg: Signature made Thu 10 Jan 2019 08:37:04 GMT # gpg: using RSA key F30C38BD3F2FBE3C # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" # gpg: aka "Laurent Vivier <laurent@vivier.eu>" # gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C * remotes/vivier2/tags/linux-user-for-4.0-pull-request: linux-user: make pwrite64/pread64(fd, NULL, 0, offset) return 0 Add getsockopt for settable SOL_IPV6 options Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-01-10Merge remote-tracking branch 'remotes/kraxel/tags/ui-20190110-pull-request' ↵Peter Maydell15-256/+367
into staging ui: bugfixes, drop keymap include support, drop dead code. # gpg: Signature made Thu 10 Jan 2019 08:47:10 GMT # gpg: using RSA key 4CB6D8EED3E87138 # 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-20190110-pull-request: spice: Remove unused include keymaps: drop support for include files keymaps: remove common include keymaps: drop nl-be map keymaps: remove modifiers include ui/console: Remove qemu_create_display_surface_guestmem() configure: bump spice-server required version to 0.12.5 egl-headless: add egl_create_context Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-01-10Merge remote-tracking branch ↵Peter Maydell17-20/+14
'remotes/vivier2/tags/trivial-patches-pull-request' into staging Trivial patches for 4.0 (2019-01-09) # gpg: Signature made Wed 09 Jan 2019 13:06:58 GMT # gpg: using RSA key F30C38BD3F2FBE3C # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" # gpg: aka "Laurent Vivier <laurent@vivier.eu>" # gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C * remotes/vivier2/tags/trivial-patches-pull-request: ioapic: use TYPE_FOO MACRO than constant string trivial: Don't include isa.h if it is not really necessary hw/audio/marvell: Don't include unnecessary i2c.h header file qom: Include qemu/fprintf-fn.h in cpu.h hw/core: fix whitespace in a sentence typedefs: (Re-)sort entries alphabetically Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-01-10qom: Don't keep error value between object_property_parse() callsEduardo Habkost1-1/+1
When handling errp==NULL at object_apply_global_props(), we are leaving the old error value in `err` after printing a warning. This makes QEMU crash if two global properties generate warnings: $ echo device_add rtl8139 | qemu-system-x86_64 -monitor stdio -global rtl8139.xxx=yyy -global rtl8139.xxx=zzz warning: can't apply global rtl8139.xxx=yyy: Property '.xxx' not found qemu-system-x86_64: util/error.c:57: error_setv: Assertion `*errp == NULL' failed. Aborted (core dumped) Fix that by making `err` go out of scope immediately after the warn_report_err() call. Fixes: 50545b2cc029 "qdev-props: call object_apply_global_props()" Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20190110020259.8492-2-ehabkost@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2019-01-10Merge remote-tracking branch 'remotes/famz/tags/staging-pull-request' into ↵Peter Maydell2-10/+10
staging Block/testing patches v2: Fix URL. Drop BSD patch. # gpg: Signature made Wed 09 Jan 2019 01:51:47 GMT # gpg: using RSA key CA35624C6A9171C6 # gpg: Good signature from "Fam Zheng <famz@redhat.com>" # Primary key fingerprint: 5003 7CB7 9706 0F76 F021 AD56 CA35 624C 6A91 71C6 * remotes/famz/tags/staging-pull-request: docker: Use a stable snapshot for Debian Sid block/nvme: optimize the performance of nvme driver based on vfio-pci Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-01-10usb-audio: ignore usb packages with wrong sizeGerd Hoffmann1-0/+3
usb packets with no payload (zero length) seem to happen in practice for whatever reason. Add a check and skip the packet then, otherwise we'll trigger an assert. Reported-by: Leonardo Soares Müller <leozinho29_eu@hotmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20181211072649.20700-1-kraxel@redhat.com
2019-01-10hw/audio/marvell: Don't include unnecessary i2c.h header fileThomas Huth1-1/+0
This device does not use I2C, so no need to include the header file here. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1546614146-10525-1-git-send-email-thuth@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-01-10linux-user: make pwrite64/pread64(fd, NULL, 0, offset) return 0Peter Maydell1-4/+18
Linux returns success if pwrite64() or pread64() are called with a zero length NULL buffer, but QEMU was returning -TARGET_EFAULT. This is the same bug that we fixed in commit 58cfa6c2e6eb51b23cc9 for the write syscall, and long before that in 38d840e6790c29f59 for the read syscall. Fixes: https://bugs.launchpad.net/qemu/+bug/1810433 Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190108184900.9654-1-peter.maydell@linaro.org> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2019-01-10Add getsockopt for settable SOL_IPV6 optionsTom Deseyn1-0/+39
Signed-off-by: Tom Deseyn <tom.deseyn@gmail.com> Message-Id: <20181213130611.7496-1-tom.deseyn@gmail.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2019-01-10spice: Remove unused includeFrediano Ziglio1-1/+0
The definitions in the header are not used. Also this fixes porting SPICE to Windows where the header is not available. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20190107184404.31993-1-fziglio@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-01-10keymaps: drop support for include filesGerd Hoffmann1-4/+3
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Li Qiang <liq3ea@gmail.com> Message-id: 20181116104319.10329-5-kraxel@redhat.com
2019-01-10keymaps: remove common includeGerd Hoffmann4-177/+352
Copy the content into the sl and sv files (the only ones left which are not generated by qemu-keymap). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20181116104319.10329-4-kraxel@redhat.com
2019-01-10keymaps: drop nl-be mapGerd Hoffmann2-4/+1
It doesn't define any keys, only includes "common". Which makes it effectively an "en-us" map. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20181116104319.10329-3-kraxel@redhat.com
2019-01-10keymaps: remove modifiers includeGerd Hoffmann3-20/+19
"common" is the only file using it, so we can just include it directly. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20181116104319.10329-2-kraxel@redhat.com
2019-01-10ui/console: Remove qemu_create_display_surface_guestmem()Peter Maydell2-40/+0
The qemu_create_display_surface_guestmem() function was added in commit a77549b3ffcc24c32ee4e but apparently never used. Remove it. (The API of this function is in any case awkward as a generic function: it assumes that a physical address uniquely identifies a piece of memory in the system, which is mostly but not always true.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20181122170309.4856-1-peter.maydell@linaro.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-01-10configure: bump spice-server required version to 0.12.5Marc-André Lureau5-28/+2
Looking at chardev/spice.c code, I realize compilation was broken for a while with spice-server < 0.12.3. Let's bump required version to 0.12.5, released May 19 2014, instead of adding more #ifdef. (this patch combines changes from an early version and some of Frediano "[PATCH 2/2] spice: Bump required spice-server version to 0.12.6") According to repology, all the distros that are build target platforms for QEMU include it: RHEL-7: 0.14.0 Debian (Stretch): 0.12.8 Debian (Jessie): 0.12.5 FreeBSD (ports): 0.14.0 OpenSUSE Leap 15: 0.14.0 Ubuntu (Xenial): 0.12.6 Note that a previous version of this patch was bumping version to 0.12.6. Unfortunately, Debian Jessie (oldstable) is stuck with spice server 0.12.5, and QEMU should keep building until after 2y of current stable (Stretch), which will be around June 17th 2019. Qemu 4.1 should thus be free of bumping to spice-server 0.12.6 during 4.1 development cycle. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-id: 20181128155932.16171-1-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-01-10egl-headless: add egl_create_contextGerd Hoffmann1-1/+9
We must set the correct context (via eglMakeCurrent) before calling qemu_egl_create_context, so we need a thin wrapper and can't hook qemu_egl_create_context directly as ->dpy_gl_ctx_create callback. Reported-by: Frederik Carlier <frederik.carlier@quamotion.mobi> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20181129123502.30129-1-kraxel@redhat.com
2019-01-09default-configs: Enable USB support for RISC-V machinesAlistair Francis2-0/+2
Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
2019-01-09qdev: fix -device scsi-hd,help regressionMarc-André Lureau1-3/+6
Since commit ea9ce8934, device_post_init() applies globals directly from machines and accelerator classes. There are cases, such as -device scsi-hd,help, where the machine is setup but there in no accelerator. Let's skip accelerator globals in this case. Fixes SEGV: #0 0x0000555558ea04ff in object_get_class (obj=0x0) at /home/elmarco/src/qemu/build/../qom/object.c:857 #1 0x000055555854c797 in object_apply_compat_props (obj=0x616000078980) at /home/elmarco/src/qemu/build/../hw/core/qdev.c:978 #2 0x000055555854c797 in object_apply_compat_props (obj=0x616000078980) at /home/elmarco/src/qemu/build/../hw/core/qdev.c:973 #3 0x000055555854c959 in device_post_init (obj=0x616000078980) at /home/elmarco/src/qemu/build/../hw/core/qdev.c:989 #4 0x0000555558e9e250 in object_post_init_with_type (ti=<optimized out>, obj=0x616000078980) at /home/elmarco/src/qemu/build/../qom/object.c:365 #5 0x0000555558e9e250 in object_initialize_with_type (data=0x616000078980, size=616, type=<optimized out>) at /home/elmarco/src/qemu/build/../qom/object.c:425 #6 0x0000555558e9e571 in object_new_with_type (type=0x613000031900) at /home/elmarco/src/qemu/build/../qom/object.c:588 #7 0x000055555830c048 in qmp_device_list_properties (typename=typename@entry=0x60200000c2d0 "scsi-hd", errp=errp@entry=0x7fffffffc540) at /home/elmarco/src/qemu/qmp.c:519 #8 0x00005555582c4027 in qdev_device_help (opts=<optimized out>) at /home/elmarco/src/qemu/qdev-monitor.c:283 #9 0x0000555559378fa2 in qemu_opts_foreach (list=<optimized out>, func=func@entry=0x5555582cfca0 <device_help_func>, opaque=opaque@entry=0x0, errp=errp@entry=0x0) at /home/elmarco/src/qemu/util/qemu-option.c:1171 https://bugzilla.redhat.com/show_bug.cgi?id=1664364 Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20190109102311.7635-1-marcandre.lureau@redhat.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Reviewed-by: Lukáš Doktor <ldoktor@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2019-01-09machine: Use shorter format for GlobalProperty arraysEduardo Habkost7-1168/+265
Instead of verbose arrays with 4 lines for each entry, make each entry take only one line. This makes long arrays that couldn't fit in the screen become short and readable. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20190107193020.21744-4-ehabkost@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2019-01-09machine: Eliminate unnecessary stringify() usageEduardo Habkost4-67/+67
stringify() is useful when we need to use macros in compat_props (like when we set virtio-baloon-pci.class=PCI_CLASS_MEMORY_RAM at pc_i440fx_1_0_machine_options()), but it is pointless when we are already providing a number literal. Replace stringify() with string literals when appropriate. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20190107193020.21744-3-ehabkost@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2019-01-09spapr: Eliminate SPAPR_PCI_2_7_MMIO_WIN_SIZE macroEduardo Habkost2-2/+1
The macro is only used in one place, where the purpose of the value is obvious. Eliminate the macro so we don't need to rely on stringify(). Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20190107193020.21744-2-ehabkost@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2019-01-09memory-device: rewrite address assignment using rangesDavid Hildenbrand1-25/+26
Let's rewrite it properly using ranges. This fixes certain overflows that are right now possible. E.g. qemu-system-x86_64 -m 4G,slots=20,maxmem=40G -M pc \ -object memory-backend-file,id=mem1,share,mem-path=/dev/zero,size=2G -device pc-dimm,memdev=mem1,id=dimm1,addr=-0x40000000 Now properly errors out instead of succeeding. (Note that qapi parsing of huge uint64_t values is broken and fixes are on the way) "can't add memory device [0xffffffffa0000000:0x80000000], usable range for memory devices [0x140000000:0xe00000000]" Signed-off-by: David Hildenbrand <david@redhat.com> Message-Id: <20181214131043.25071-3-david@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2019-01-09range: add some more functionsDavid Hildenbrand1-0/+62
Add some more functions that will be used in memory-device context. range_init(): Init using lower bound and size, check for validity range_init_nofail(): Init using lower bound and size, validity asserted range_size(): Extract the size of a range range_overlaps_range(): Check for overlaps of two ranges range_contains_range(): Check if one range is contained in the other Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: David Hildenbrand <david@redhat.com> Message-Id: <20181214131043.25071-2-david@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2019-01-09Mention that QMP 'cpu-add' will be deprecatedKashyap Chamarthy1-0/+6
Signed-off-by: Kashyap Chamarthy <kchamart@redhat.com> Message-Id: <20181213124224.31585-4-kchamart@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2019-01-09Update that HMP 'cpu-add' is deprecated in 4.0Kashyap Chamarthy1-1/+1
Signed-off-by: Kashyap Chamarthy <kchamart@redhat.com> Message-Id: <20181213124224.31585-3-kchamart@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> [ehabkost: revert back to 'cpu-add' spelling] Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2019-01-09qemu-deprecated.texi: Rename the HMP sectionKashyap Chamarthy1-1/+1
So that it is consistent with the naming of QMP's Signed-off-by: Kashyap Chamarthy <kchamart@redhat.com> Message-Id: <20181213124224.31585-2-kchamart@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2019-01-09RISC-V: Implement existential predicates for CSRsMichael Clark4-79/+105
CSR predicate functions are added to the CSR table. mstatus.FS and counter enable checks are moved to predicate functions and two new predicates are added to check misa.S for s* CSRs and a new PMP CPU feature for pmp* CSRs. Processors that don't implement S-mode will trap on access to s* CSRs and processors that don't implement PMP will trap on accesses to pmp* CSRs. PMP checks are disabled in riscv_cpu_handle_mmu_fault when the PMP CPU feature is not present. Signed-off-by: Michael Clark <mjc@sifive.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
2019-01-09RISC-V: Implement atomic mip/sip CSR updatesMichael Clark1-28/+28
Use the new CSR read/modify/write interface to implement atomic updates to mip/sip. Signed-off-by: Michael Clark <mjc@sifive.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
2019-01-09Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-4.0-20190109' ↵Peter Maydell42-655/+1927
into staging ppc patch queue 2019-01-09 Second main pull request for qemu-4.0. Highlights are: * Final parts of XIVE support for pseries (without KVM) * Preliminary work for PHB hotplug * Starting to use TCG vector operations This includes some changes in the PCI core, which Michael Tsirkin requested come through this tree, since they're primarily of interest for ppc. # gpg: Signature made Tue 08 Jan 2019 22:44:10 GMT # gpg: using RSA key 6C38CACA20D9B392 # 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-4.0-20190109: (29 commits) spapr: enable XIVE MMIOs at reset spapr: introduce a new sPAPR IRQ backend supporting XIVE and XICS ppc/xics: allow ICSState to have an offset 0 spapr: move the qemu_irq array under the machine pnv/psi: move the ICSState qemu_irq array under the PSI device model ppc: export the XICS and XIVE set_irq handlers spapr: return from post_load method when RTC import fails ppc: replace the 'Object *intc' by a 'ICPState *icp' pointer under the CPU ppc/xive: introduce a XiveTCTX pointer under PowerPCCPU spapr: modify the prototype of the cpu_intc_create() method spapr/xive: simplify the sPAPR IRQ qirq method for XIVE spapr_pci: Define SPAPR_MAX_PHBS in hw/pci-host/spapr.h pci: allow cleanup/unregistration of PCI root buses spapr: move spapr_create_phb() to core machine code MAINTAINERS: add qemu_vga.ndrv file entry for Mac machines MAINTAINERS: Add some missing ppc-related files target/ppc: replace AVR* macros with Vsr* macros target/ppc: move FP and VMX registers into aligned vsr register array target/ppc: merge ppc_vsr_t and ppc_avr_t union types target/ppc: switch FPR, VMX and VSX helpers to access data directly from cpu_env ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-01-09ioapic: use TYPE_FOO MACRO than constant stringLi Qiang4-4/+7
Make them more QOMConventional. Cc:qemu-trivial@nongnu.org Signed-off-by: Li Qiang <liq3ea@163.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20190105023831.66910-1-liq3ea@163.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2019-01-09trivial: Don't include isa.h if it is not really necessaryThomas Huth9-9/+0
These files don't seem to do anything related to ISA directly, so there is no need to include isa.h here. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1546615943-16274-1-git-send-email-thuth@redhat.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2019-01-09hw/audio/marvell: Don't include unnecessary i2c.h header fileThomas Huth1-1/+0
This device does not use I2C, so no need to include the header file here. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1546614146-10525-1-git-send-email-thuth@redhat.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2019-01-09qom: Include qemu/fprintf-fn.h in cpu.hPriit Laes1-0/+1
QOM cpu.h uses fprintf_function which requires Qemu's qemu/fprintf-fn.h header. Include it. Signed-off-by: Priit Laes <plaes@plaes.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20181226003722.31257-1-plaes@plaes.org> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2019-01-09hw/core: fix whitespace in a sentenceWainer dos Santos Moschetta1-1/+1
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20181224154922.3338-1-wainersm@redhat.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2019-01-09typedefs: (Re-)sort entries alphabeticallyEric Blake1-5/+5
Since the last time we sorted things (2988cbeaf), we've had a few relapses that were inserted out of order. Also, we had more entries that were sorted case-insensitively than not, so let's document that convention and stick to it. Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20181115211752.1295571-2-eblake@redhat.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2019-01-09docker: Use a stable snapshot for Debian SidPhilippe Mathieu-Daudé1-0/+4
The Debian Sid repository is not garanteed to be stable, as his 'unstable' name suggest :) To allow quick testing, Debian maintainers might push packages various time a day. Sometime package dependencies might break, which is annoying when using this repository for stable development (which is not recommended, but Sid provides edge packages we use for testing). Debian provides repositories snapshots which are suitable for our use. Pick a recent date that works. When required, update to newer releases will be easy. This fixes current issues with this image: $ make docker-image-debian-sid [...] The following packages have unmet dependencies: build-essential : Depends: dpkg-dev (>= 1.17.11) but it is not going to be installed git : Depends: perl but it is not going to be installed Depends: liberror-perl but it is not going to be installed pkg-config : Depends: libdpkg-perl but it is not going to be installed texinfo : Depends: perl (>= 5.26.2-6) but it is not going to be installed Depends: libtext-unidecode-perl but it is not going to be installed Depends: libxml-libxml-perl but it is not going to be installed E: Unable to correct problems, you have held broken packages. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20181101183705.5422-1-philmd@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com>
2019-01-09block/nvme: optimize the performance of nvme driver based on vfio-pciLi Feng1-10/+6
When the IO size is larger than 2 pages, we move the the pointer one by one in the pagelist, this is inefficient. This is a simple benchmark result: Before: $ qemu-io -c 'write 0 1G' nvme://0000:00:04.0/1 wrote 1073741824/1073741824 bytes at offset 0 1 GiB, 1 ops; 0:00:02.41 (424.504 MiB/sec and 0.4146 ops/sec) $ qemu-io -c 'read 0 1G' nvme://0000:00:04.0/1 read 1073741824/1073741824 bytes at offset 0 1 GiB, 1 ops; 0:00:02.03 (503.055 MiB/sec and 0.4913 ops/sec) After: $ qemu-io -c 'write 0 1G' nvme://0000:00:04.0/1 wrote 1073741824/1073741824 bytes at offset 0 1 GiB, 1 ops; 0:00:02.17 (471.517 MiB/sec and 0.4605 ops/sec) $ qemu-io -c 'read 0 1G' nvme://0000:00:04.0/1 read 1073741824/1073741824 bytes at offset 0 1 GiB, 1 ops; 0:00:01.94 (526.770 MiB/sec and 0.5144 ops/sec) Signed-off-by: Li Feng <lifeng1519@gmail.com> Message-Id: <20181101103807.25862-1-lifeng1519@gmail.com> Signed-off-by: Fam Zheng <famz@redhat.com>
2019-01-09spapr: enable XIVE MMIOs at resetCédric Le Goater3-0/+19
Depending on the interrupt mode of the machine, enable or disable the XIVE MMIOs. Signed-off-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-01-09spapr: introduce a new sPAPR IRQ backend supporting XIVE and XICSCédric Le Goater4-3/+198
The 'dual' sPAPR IRQ backend supports both interrupt mode, XIVE exploitation mode and the legacy compatibility mode (XICS). both modes are not supported at the same time. The machine starts with the legacy mode and a new interrupt mode can then be negotiated by the CAS process. In this case, the new mode is activated after a reset to take into account the required changes in the machine. These impact the device tree layout, the interrupt presenter object and the exposed MMIO regions in the case of XIVE. Signed-off-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-01-09ppc/xics: allow ICSState to have an offset 0Cédric Le Goater1-2/+1
commit 15ed653fa49a ("ppc/xics: An ICS with offset 0 is assumed to be uninitialized") introduced an extra check on the ICS offset which is not strictly necessary. Revert the change to be able to map the XICS IRQ number space on the XIVE IRQ number space. Signed-off-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-01-09spapr: move the qemu_irq array under the machineCédric Le Goater8-11/+29
The qemu_irq array is now allocated at the machine level using a sPAPR IRQ set_irq handler depending on the chosen interrupt mode. The use of this handler is slightly inefficient today but it will become necessary when the 'dual' interrupt mode is introduced. Signed-off-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-01-09pnv/psi: move the ICSState qemu_irq array under the PSI device modelCédric Le Goater2-3/+5
Future changes of the ICSState object will remove the qemu_irq array from under the interrupt controller model. Prepare ground for the PSI interrupt sources and introduce a new one directly under the PSI device model. Signed-off-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-01-09ppc: export the XICS and XIVE set_irq handlersCédric Le Goater5-3/+7
To support the 'dual' interrupt mode, XICS and XIVE, we plan to move the qemu_irq array of each interrupt controller under the machine and do the allocation under the sPAPR IRQ init method. Signed-off-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-01-09spapr: return from post_load method when RTC import failsCédric Le Goater1-2/+7
The error value can be squashed by the section handling radix migration. Simply bail out if an error occurs when the RTC offset is imported. This fixes the Coverity issue CID 1398591. Fixes: d39c90f5f3ae ("spapr: Fix migration of Radix guests") Signed-off-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: Greg Kurz <groug@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-01-09ppc: replace the 'Object *intc' by a 'ICPState *icp' pointer under the CPUCédric Le Goater7-16/+17
Now that the 'intc' pointer is only used by the XICS interrupt mode, let's make things clear and use a XICS type and name. Signed-off-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-01-09ppc/xive: introduce a XiveTCTX pointer under PowerPCCPUCédric Le Goater4-8/+15
which will be used by the machine only when the XIVE interrupt mode is in use. Signed-off-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-01-09spapr: modify the prototype of the cpu_intc_create() methodCédric Le Goater6-20/+47
Today, the interrupt presenter is linked to a CPU using the cpu_intc_create() method of the sPAPR IRQ backend. The resulting object is assigned to the PowerPCCPU 'intc' pointer whatever the interrupt mode, XICS or XIVE. To support the 'dual' interrupt mode, we will need to distinguish between the two presenter objects and for that, we plan to introduce a second interrupt presenter object pointer under the PowerPCCPU. The modifications below move the assignment of the presenter object under the cpu_intc_create() method to prepare ground for the future changes. Both sPAPR and PowerNV machines are impacted. Signed-off-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>