Re: [Qemu-devel] [PATCH v4 3/7] monitor: flush qmp responses when CLOSED

2018-06-18 Thread Peter Xu
On Tue, Jun 19, 2018 at 01:34:22PM +0800, Peter Xu wrote: [...] > Fixes: 6d2d563f8c ("qmp: cleanup qmp queues properly", 2018-03-27) > Suggested-by: Markus Armbruster > Signed-off-by: Peter Xu > > Signed-off-by: Peter Xu I am pretty sure this time that this 2nd line is not there in my local

Re: [Qemu-devel] [PATCH v4 0/7] monitor: enable OOB by default

2018-06-18 Thread Thomas Huth
On 19.06.2018 07:34, Peter Xu wrote: > v4: > - collect some r-bs > - remove one extra s-o-b of mine in one patch [Thomas, Markus] FYI: You've still got a duplicated s-o-b line in patch 3 and 4. Thomas

Re: [Qemu-devel] [PATCH 1/2] spapr_cpu_core: migrate per-CPU data

2018-06-18 Thread Greg Kurz
On Tue, 19 Jun 2018 10:09:05 +1000 David Gibson wrote: > On Mon, Jun 18, 2018 at 02:26:35PM +0200, Greg Kurz wrote: > > A per-CPU machine data pointer was recently added to PowerPCCPU. The > > motivation is to to hide platform specific details from the core CPU > > code. This per-CPU data can

[Qemu-devel] [PATCH v4 7/7] Revert "tests: Add parameter to qtest_init_without_qmp_handshake"

2018-06-18 Thread Peter Xu
This reverts commit ddee57e0176f6ab53b13c6c97605b62737a8fd7a. Meanwhile, revert one line from fa198ad9bdef to make sure qtest_init_without_qmp_handshake() will only pass in one parameter. Signed-off-by: Peter Xu --- tests/libqtest.h | 4 +--- tests/libqtest.c | 10 -- tests/qmp-test.c

[Qemu-devel] [PATCH v4 6/7] monitor: remove "x-oob", turn oob on by default

2018-06-18 Thread Peter Xu
There was a regression reported by Eric Auger before with OOB: http://lists.gnu.org/archive/html/qemu-devel/2018-03/msg06231.html It is fixed in 951702f39c ("monitor: bind dispatch bh to iohandler context", 2018-04-10). For the bug, we turned Out-Of-Band feature of monitors off for 2.12

[Qemu-devel] [PATCH v4 3/7] monitor: flush qmp responses when CLOSED

2018-06-18 Thread Peter Xu
Previously we clean up the queues when we got CLOSED event. It was used to make sure we won't send leftover replies/events of a old client to a new client which makes perfect sense. However this will also drop the replies/events even if the output port of the previous chardev backend is still

[Qemu-devel] [PATCH v4 5/7] docs: mention shared state protect for OOB

2018-06-18 Thread Peter Xu
Out-Of-Band handlers need to protect shared state if there is any. Mention it in the document. Meanwhile, touch up some other places too, either with better English, or reordering of bullets. Suggested-by: Markus Armbruster Signed-off-by: Peter Xu --- docs/devel/qapi-code-gen.txt | 17

[Qemu-devel] [PATCH v4 4/7] tests: iotests: drop some stderr line

2018-06-18 Thread Peter Xu
In my Out-Of-Band test, "check -qcow2 060" fail with this (the output is manually changed due to line width requirement): 060 5s ... - output mismatch (see 060.out.bad) --- /home/peterx/git/qemu/tests/qemu-iotests/060.out +++ /home/peterx/git/qemu/bin/tests/qemu-iotests/060.out.bad @@ -427,8

[Qemu-devel] [PATCH v4 2/7] monitor: rename *_pop_one to *_pop_any

2018-06-18 Thread Peter Xu
The old names are confusing since both of the old functions are poping an item from multiple queues rather than a single queue. In that sense, *_pop_any() suites better than *_pop_one(). Since at it, touch up the function monitor_qmp_response_pop_any() a bit to let the callers pass in a

[Qemu-devel] [PATCH v4 1/7] chardev: comment details for CLOSED event

2018-06-18 Thread Peter Xu
It was unclear before on what does the CLOSED event mean. Meanwhile we add a TODO to fix up the CLOSED event in the future when the in/out ports are different for a chardev. CC: Paolo Bonzini CC: "Marc-André Lureau" CC: Stefan Hajnoczi CC: Markus Armbruster Reviewed-by: Stefan Hajnoczi

[Qemu-devel] [PATCH v4 0/7] monitor: enable OOB by default

2018-06-18 Thread Peter Xu
v4: - collect some r-bs - remove one extra s-o-b of mine in one patch [Thomas, Markus] - split the qmp response flush patch into two; apply changes to commit message [Markus] - fix up the doc update patch [Markus] v3: - drop patch "tests: iotests: don't compare SHUTDOWN event", replace it

Re: [Qemu-devel] [PATCH] sm501: Fix hardware cursor color conversion

2018-06-18 Thread David Gibson
On Mon, Jun 18, 2018 at 11:38:16PM +0200, Sebastian Bauer wrote: > According to the sm501 specs the hardware cursor colors are to be given in > the rgb565 format, but the code currently interprets them as bgr565. > > Therefore, the colors of the hardware cursors are wrong in the QEMU > display,

Re: [Qemu-devel] [PATCH v2 3/4] ppc/pnv: introduce Pnv8Chip and Pnv9Chip models

2018-06-18 Thread Cédric Le Goater
>>> typedef struct PnvChipClass { >>> /*< private >*/ >>> @@ -75,6 +95,7 @@ typedef struct PnvChipClass { >>> >>> hwaddr xscom_base; >>> >>> +void (*realize)(PnvChip *chip, Error **errp); >> >> This looks the wrong way round from how things are usually done. >> Rather

Re: [Qemu-devel] [PATCH] ppc: Include vga cirrus card into the compiling process

2018-06-18 Thread Thomas Huth
On 19.06.2018 01:55, David Gibson wrote: > On Mon, Jun 18, 2018 at 11:56:01PM +0200, Sebastian Bauer wrote: >> Drivers for this card exists on PPC-based AmigaOS guests so it is useful to >> allow users to emulate the graphics card for PPC machines. >> >> Signed-off-by: Sebastian Bauer > > Have

Re: [Qemu-devel] [PATCH] ui/cocoa.m: prevent stuck command key when going into full screen mode

2018-06-18 Thread no-reply
Hi, This series failed build test on s390x host. Please find the details below. N/A. Internal error while reading log file --- Email generated automatically by Patchew [http://patchew.org/]. Please send your feedback to patchew-de...@redhat.com

Re: [Qemu-devel] [PATCH v3 2/2] ppc/pnv: consolidate the creation of the ISA bus device tree

2018-06-18 Thread Cédric Le Goater
On 06/19/2018 02:28 AM, David Gibson wrote: > On Mon, Jun 18, 2018 at 07:05:40PM +0200, Cédric Le Goater wrote: >> The device tree node of the ISA bus was being partially done in >> different places. Move all the nodes creation under the same routine. >> >> Signed-off-by: Cédric Le Goater >> ---

Re: [Qemu-devel] [PATCH v2 3/3] spapr: introduce a fixed IRQ number space

2018-06-18 Thread Cédric Le Goater
On 06/19/2018 03:02 AM, David Gibson wrote: > On Mon, Jun 18, 2018 at 07:34:02PM +0200, Cédric Le Goater wrote: >> This proposal introduces a new IRQ number space layout using static >> numbers for all devices and a bitmap allocator for the MSI numbers >> which are negotiated by the guest at

Re: [Qemu-devel] [PATCH] hmp-commands: use long for begin and length in dump-guest-memory

2018-06-18 Thread Suraj Jitindar Singh
On Tue, 2018-06-19 at 14:48 +1000, Suraj Jitindar Singh wrote: > The dump-guest-memory command is used to dump an area of guest memory > to a file, the piece of memory is specified by a begin address and > a length. These parameters are specified as ints and thus have a > maximum > value of 4GB.

Re: [Qemu-devel] [PATCH v3 4/6] docs: mention shared state protect for OOB

2018-06-18 Thread Peter Xu
On Fri, Jun 15, 2018 at 02:37:49PM +0200, Markus Armbruster wrote: > Peter Xu writes: > > > Out-Of-Band handlers need to protect shared state if there is any. > > Mention it in the document. > > > > Suggested-by: Markus Armbruster > > Signed-off-by: Peter Xu > > --- > >

[Qemu-devel] [PATCH] hmp-commands: use long for begin and length in dump-guest-memory

2018-06-18 Thread Suraj Jitindar Singh
The dump-guest-memory command is used to dump an area of guest memory to a file, the piece of memory is specified by a begin address and a length. These parameters are specified as ints and thus have a maximum value of 4GB. This means you can't dump the guest memory past the first 4GB and instead

Re: [Qemu-devel] [PATCH v3 3/6] tests: iotests: drop some stderr line

2018-06-18 Thread Peter Xu
On Fri, Jun 15, 2018 at 10:13:07AM +0200, Markus Armbruster wrote: > Peter Xu writes: > > > In my Out-Of-Band test, "check -qcow2 060" fail with this: > > > > 060 5s ... - output mismatch (see 060.out.bad) > > --- /home/peterx/git/qemu/tests/qemu-iotests/060.out2018-06-15 > >

Re: [Qemu-devel] [PATCH] ppc: Include vga cirrus card into the compiling process

2018-06-18 Thread David Gibson
On Tue, Jun 19, 2018 at 06:32:55AM +0200, Sebastian Bauer wrote: > Am 2018-06-19 01:55, schrieb David Gibson: > > Have you checked the Cirrus VGA actually works on a ppc machine? > > Yes, it works for AmigaOS guests. Better than the sm501 for > instance. Ok. However, your patch doesn't apply

Re: [Qemu-devel] [PATCH v3 2/6] monitor: flush qmp responses when CLOSED

2018-06-18 Thread Peter Xu
On Fri, Jun 15, 2018 at 10:11:34AM +0200, Markus Armbruster wrote: > Peter Xu writes: > > > Previously we clean up the queues when we got CLOSED event. It was used > > to make sure we won't send leftover replies/events of a old client to a > > new client. Now this patch does an extra operation

Re: [Qemu-devel] [PATCH] ppc: Include vga cirrus card into the compiling process

2018-06-18 Thread Sebastian Bauer
Am 2018-06-19 01:55, schrieb David Gibson: Have you checked the Cirrus VGA actually works on a ppc machine? Yes, it works for AmigaOS guests. Better than the sm501 for instance. Bye Sebastian

Re: [Qemu-devel] [RFC 1/1] ide: bug #1777315: io_buffer_size and sg.size can represent partial sector sizes

2018-06-18 Thread Amol Surati
On Mon, Jun 18, 2018 at 08:14:10PM -0400, John Snow wrote: > > > On 06/18/2018 02:02 PM, Amol Surati wrote: > > On Mon, Jun 18, 2018 at 12:05:15AM +0530, Amol Surati wrote: > >> This patch fixes the assumption that io_buffer_size is always a perfect > >> multiple of the sector size. The

Re: [Qemu-devel] [PATCH V8 11/17] qapi: Add new command to query colo status

2018-06-18 Thread Zhang Chen
On Thu, Jun 14, 2018 at 5:25 PM, Dr. David Alan Gilbert wrote: > * Markus Armbruster (arm...@redhat.com) wrote: > > "Dr. David Alan Gilbert" writes: > > > > > * Zhang Chen (zhangc...@gmail.com) wrote: > > >> On Mon, Jun 11, 2018 at 2:48 PM, Markus Armbruster > > > >> wrote: > > >> > > >> >

Re: [Qemu-devel] [PATCH 3/7 V7] hostmem-file: add the 'pmem' option

2018-06-18 Thread He, Junyan
Have already resent this, make qemu exit when meet this, please help to check, thanks -Original Message- From: Igor Mammedov [mailto:imamm...@redhat.com] Sent: Friday, June 15, 2018 5:04 PM To: junyan...@gmx.com Cc: qemu-devel@nongnu.org; Haozhong Zhang ; xiaoguangrong.e...@gmail.com;

Re: [Qemu-devel] [PATCH for-2.11.2] spapr: make pseries-2.11 the default machine type

2018-06-18 Thread David Gibson
On Mon, Jun 18, 2018 at 09:04:38PM -0500, Michael Roth wrote: > Quoting Greg Kurz (2018-05-22 12:17:28) > > The spapr capability framework was introduced in QEMU 2.12. It allows > > to have an explicit control on how host features are exposed to the > > guest. This is especially needed to handle

[Qemu-devel] [PATCH 098/113] Fix libusb-1.0.22 deprecated libusb_set_debug with libusb_set_option

2018-06-18 Thread Michael Roth
From: John Thomson libusb-1.0.22 marked libusb_set_debug deprecated it is replaced with libusb_set_option(libusb_context, LIBUSB_OPTION_LOG_LEVEL, libusb_log_level); details here: https://github.com/libusb/libusb/commit/539f22e2fd916558d11ab9a66f10f461c5593168 Warning here: CC

[Qemu-devel] [PATCH 097/113] arm_gicv3_kvm: increase clroffset accordingly

2018-06-18 Thread Michael Roth
From: Shannon Zhao It forgot to increase clroffset during the loop. So it only clear the first 4 bytes. Fixes: 367b9f527becdd20ddf116e17a3c0c2bbc486920 Cc: qemu-sta...@nongnu.org Signed-off-by: Shannon Zhao Reviewed-by: Eric Auger Message-id:

[Qemu-devel] Ping? Re: [PATCH v2] util/async: avoid NULL pointer dereference

2018-06-18 Thread WangJie (Pluto)
Ping... On 2018/6/12 7:26, Jie Wang wrote: > if laio_init create linux_aio failed and return NULL, NULL pointer > dereference will occur when laio_attach_aio_context dereference > linux_aio in aio_get_linux_aio. Let's avoid it and report error. > > Signed-off-by: Jie Wang > --- >

[Qemu-devel] [PATCH 094/113] intel-iommu: trace domain id during page walk

2018-06-18 Thread Michael Roth
From: Peter Xu This patch only modifies the trace points. Previously we were tracing page walk levels. They are redundant since we have page mask (size) already. Now we trace something much more useful which is the domain ID of the page walking. That can be very useful when we trace more

[Qemu-devel] [PATCH] hw/char/cmsdk-apb-timer: Correctly identify and set one-shot mode

2018-06-18 Thread Guenter Roeck
The CMSDK APB timer is currently always configured as periodic timer. This results in the following messages when trying to boot Linux. Timer with delta zero, disabling If the timer limit set with the RELOAD command is 0, the timer needs to be enabled as one-shot timer. Signed-off-by: Guenter

[Qemu-devel] [PATCH 3/7 V7 RESEND] hostmem-file: add the 'pmem' option

2018-06-18 Thread junyan . he
From: Junyan He When QEMU emulates vNVDIMM labels and migrates vNVDIMM devices, it needs to know whether the backend storage is a real persistent memory, in order to decide whether special operations should be performed to ensure the data persistence. This boolean option 'pmem' allows users to

[Qemu-devel] [PATCH 008/113] spapr: set vsmt to MAX(8, smp_threads)

2018-06-18 Thread Michael Roth
From: Laurent Vivier We ignore silently the value of smp_threads when we set the default VSMT value, and if smp_threads is greater than VSMT kernel is going into trouble later. Fixes: 8904e5a750 ("spapr: Adjust default VSMT value for better migration compatibility") Signed-off-by: Laurent

[Qemu-devel] [PATCH 089/113] intel-iommu: remove IntelIOMMUNotifierNode

2018-06-18 Thread Michael Roth
From: Peter Xu That is not really necessary. Removing that node struct and put the list entry directly into VTDAddressSpace. It simplfies the code a lot. Since at it, rename the old notifiers_list into vtd_as_with_notifiers. CC: QEMU Stable Signed-off-by: Peter Xu Reviewed-by: Michael S.

[Qemu-devel] [PATCH 090/113] intel-iommu: add iommu lock

2018-06-18 Thread Michael Roth
From: Peter Xu SECURITY IMPLICATION: this patch fixes a potential race when multiple threads access the IOMMU IOTLB cache. Add a per-iommu big lock to protect IOMMU status. Currently the only thing to be protected is the IOTLB/context cache, since that can be accessed even without BQL, e.g.,

[Qemu-devel] [PATCH 084/113] console: Avoid segfault in screendump

2018-06-18 Thread Michael Roth
From: Michal Privoznik After f771c5440e04626f1 it is possible to select device and head which to take screendump from. And even though we check if provided head number falls within range, it may still happen that the console has no surface yet leading to SIGSEGV: qemu.git $

Re: [Qemu-devel] [PATCH v2] fpu_helper.c: fix helper_fpscr_clrbit() function

2018-06-18 Thread David Gibson
On Mon, Jun 18, 2018 at 11:50:24AM -0400, John Arbuckle wrote: > Fix the helper_fpscr_clrbit() function so it correctly > sets the FEX and VX bits. > > Determining the value for the Floating Point Status and Control > Register's (FPSCR) FEX bit is suppose to be done like this: > > FEX = (VX &

Re: [Qemu-devel] [PATCH for-2.11.2] spapr: make pseries-2.11 the default machine type

2018-06-18 Thread Michael Roth
Quoting Greg Kurz (2018-05-22 12:17:28) > The spapr capability framework was introduced in QEMU 2.12. It allows > to have an explicit control on how host features are exposed to the > guest. This is especially needed to handle migration between hetero- > geneous hosts (eg, POWER8 to POWER9). It is

[Qemu-devel] [PATCH 088/113] intel-iommu: send PSI always even if across PDEs

2018-06-18 Thread Michael Roth
From: Peter Xu SECURITY IMPLICATION: without this patch, any guest with both assigned device and a vIOMMU might encounter stale IO page mappings even if guest has already unmapped the page, which may lead to guest memory corruption. The stale mappings will only be limited to the guest's own

[Qemu-devel] [PATCH 083/113] s390x/ccw: make sure all ccw devices are properly reset

2018-06-18 Thread Michael Roth
From: Cornelia Huck Thomas reported that the subchannel for a 3270 device that ended up in a broken state (status pending even though not enabled) did not get out of that state even after a reboot (which involves a subsytem reset). The reason for this is that the 3270 device did not define a

[Qemu-devel] [PATCH 081/113] s390x/virtio: Convert virtio-ccw from *_exit to *_unrealize

2018-06-18 Thread Michael Roth
From: Nia Alarie Signed-off-by: Nia Alarie Message-Id: <20180307162958.11232-1-nia.ala...@gmail.com> Reviewed-by: Stefan Hajnoczi Signed-off-by: Cornelia Huck (cherry picked from commit 24118af846868bb22e573be206c63e684ba9846a) *prereq for 0c53057adb Signed-off-by: Michael Roth ---

[Qemu-devel] [PATCH 082/113] virtio-ccw: common reset handler

2018-06-18 Thread Michael Roth
From: Cornelia Huck All the different virtio ccw devices use the same reset handler, so let's move setting it into the base virtio ccw device class. CC: qemu-sta...@nongnu.org Reviewed-by: Thomas Huth Reviewed-by: David Hildenbrand Reviewed-by: Halil Pasic Signed-off-by: Cornelia Huck

[Qemu-devel] [PATCH 076/113] raw: Check byte range uniformly

2018-06-18 Thread Michael Roth
From: Fam Zheng We don't verify the request range against s->size in the I/O callbacks except for raw_co_pwritev. This is inconsistent (especially for raw_co_pwrite_zeroes and raw_co_pdiscard), so fix them, in the meanwhile make the helper reusable by the coming new callbacks. Note that in most

[Qemu-devel] [PATCH 096/113] intel-iommu: rework the page walk logic

2018-06-18 Thread Michael Roth
From: Peter Xu This patch fixes a potential small window that the DMA page table might be incomplete or invalid when the guest sends domain/context invalidations to a device. This can cause random DMA errors for assigned devices. This is a major change to the VT-d shadow page walking logic. It

[Qemu-devel] [PATCH 078/113] pc-bios/s390-ccw: struct tpi_info must be declared as aligned(4)

2018-06-18 Thread Michael Roth
From: Thomas Huth I've run into a compilation error today with the current version of GCC 8: In file included from s390-ccw.h:49, from main.c:12: cio.h:128:1: error: alignment 1 of 'struct tpi_info' is less than 4 [-Werror=packed-not-aligned] } __attribute__ ((packed)); ^

[Qemu-devel] [PATCH 077/113] s390x/css: disabled subchannels cannot be status pending

2018-06-18 Thread Michael Roth
From: Cornelia Huck The 3270 code will try to post an attention interrupt when the 3270 emulator (e.g. x3270) attaches. If the guest has not yet enabled the subchannel for the 3270 device, we will present a spurious cc 1 (status pending) when it uses msch on it later on, e.g. when trying to

[Qemu-devel] [PATCH 086/113] intel-iommu: Redefine macros to enable supporting 48 bit address width

2018-06-18 Thread Michael Roth
From: Prasad Singamsetty The current implementation of Intel IOMMU code only supports 39 bits host/iova address width so number of macros use hard coded values based on that. This patch is to redefine them so they can be used with variable address widths. This patch doesn't add any new

[Qemu-devel] [PATCH 074/113] iotests: Add test for -U/force-share conflicts

2018-06-18 Thread Michael Roth
From: Max Reitz Signed-off-by: Max Reitz Message-id: 20180502202051.15493-4-mre...@redhat.com Reviewed-by: Eric Blake Signed-off-by: Max Reitz (cherry picked from commit 4e7d73c5fbd97e55ffe5af02f24d1f7dbe3bbf20) Signed-off-by: Michael Roth --- tests/qemu-iotests/153 | 17

[Qemu-devel] [PATCH 006/113] spapr: Allow some cases where we can't set VSMT mode in the kernel

2018-06-18 Thread Michael Roth
From: David Gibson At present if we require a vsmt mode that's not equal to the kernel's default, and the kernel doesn't let us change it (e.g. because it's an old kernel without support) then we always fail. But in fact we can cope with the kernel having a different vsmt as long as a) it's

[Qemu-devel] [PATCH 087/113] intel-iommu: Extend address width to 48 bits

2018-06-18 Thread Michael Roth
From: Prasad Singamsetty The current implementation of Intel IOMMU code only supports 39 bits iova address width. This patch provides a new parameter (x-aw-bits) for intel-iommu to extend its address width to 48 bits but keeping the default the same (39 bits). The reason for not changing the

[Qemu-devel] [PATCH 073/113] qemu-img: Use only string options in img_open_opts

2018-06-18 Thread Michael Roth
From: Max Reitz img_open_opts() takes a QemuOpts and converts them to a QDict, so all values therein are strings. Then it may try to call qdict_get_bool(), however, which will fail with a segmentation fault every time: $ ./qemu-img info -U --image-opts \

[Qemu-devel] [PATCH 071/113] iotests: Add test for rebasing with relative paths

2018-06-18 Thread Michael Roth
From: Max Reitz Signed-off-by: Max Reitz Reviewed-by: Eric Blake Message-id: 20180509182002.8044-3-mre...@redhat.com Signed-off-by: Max Reitz (cherry picked from commit 28036a7f7044fddb79819e3c8fcb4ae5605c60e0) Signed-off-by: Michael Roth --- tests/qemu-iotests/024 | 82

[Qemu-devel] [PATCH 085/113] hw/intc/arm_gicv3: Fix APxR register dispatching

2018-06-18 Thread Michael Roth
From: Jan Kiszka There was a nasty flip in identifying which register group an access is targeting. The issue caused spuriously raised priorities of the guest when handing CPUs over in the Jailhouse hypervisor. Cc: qemu-sta...@nongnu.org Signed-off-by: Jan Kiszka Message-id:

[Qemu-devel] [PATCH 070/113] qemu-img: Resolve relative backing paths in rebase

2018-06-18 Thread Michael Roth
From: Max Reitz Currently, rebase interprets a relative path for the new backing image as follows: (1) Open the new backing image with the given relative path (thus relative to qemu-img's working directory). (2) Write it directly into the overlay's backing path field (thus relative to

[Qemu-devel] [PATCH 065/113] target/arm: Implement v8M VLLDM and VLSTM

2018-06-18 Thread Michael Roth
From: Peter Maydell For v8M the instructions VLLDM and VLSTM support lazy saving and restoring of the secure floating-point registers. Even if the floating point extension is not implemented, these instructions must act as NOPs in Secure state, so they can be used as part of the

[Qemu-devel] [PATCH 007/113] spapr: Adjust default VSMT value for better migration compatibility

2018-06-18 Thread Michael Roth
From: David Gibson fa98fbfc "PC: KVM: Support machine option to set VSMT mode" introduced the "vsmt" parameter for the pseries machine type, which controls the spacing of the vcpu ids of thread 0 for each virtual core. This was done to bring some consistency and stability to how that was done,

[Qemu-devel] [PATCH 064/113] tcg/arm: Fix memory barrier encoding

2018-06-18 Thread Michael Roth
From: Henry Wertz I found with qemu 2.11.x or newer that I would get an illegal instruction error running some Intel binaries on my ARM chromebook. On investigation, I found it was quitting on memory barriers. qemu instruction: mb $0x31 was translating as: 0x604050cc: 5bf07ff5 blpl

[Qemu-devel] [PATCH 068/113] qxl: fix local renderer crash

2018-06-18 Thread Michael Roth
From: Gerd Hoffmann Make sure we only ask the spice local renderer for display updates in case we have a valid primary surface. Without that spice is confused and throws errors in case a display update request (triggered by screendump for example) happens in parallel to a mode switch and hits

[Qemu-devel] [PATCH 066/113] target/ppc: always set PPC_MEM_TLBIE in pre 2.8 migration hack

2018-06-18 Thread Michael Roth
From: Greg Kurz The pseries-2.7 and older machine types require CPUPPCState::insns_flags to be strictly equal between source and destination. This checking is abusive and breaks migration of KVM guests when the host CPU models are different, even if they are compatible enough to allow the guest

[Qemu-devel] [PATCH 079/113] qdev: rename typedef qdev_resetfn() -> DeviceReset()

2018-06-18 Thread Michael Roth
From: Philippe Mathieu-Daudé following the DeviceRealize and DeviceUnrealize typedefs, this unify a bit the new QOM API. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20180114020412.26160-2-f4...@amsat.org> Reviewed-by: Laurent Vivier Signed-off-by: Paolo Bonzini (cherry picked from

[Qemu-devel] [PATCH 062/113] s390: Do not pass inofficial IPL type to the guest

2018-06-18 Thread Michael Roth
From: Viktor Mihajlovski IPL over a virtio-scsi device requires special handling not available in the real architecture. For this purpose the IPL type 0xFF has been chosen as means of communication between QEMU and the pc-bios. However, a guest OS could be confused by seeing an unknown IPL type.

[Qemu-devel] [PATCH 063/113] s390-ccw: force diag 308 subcode to unsigned long

2018-06-18 Thread Michael Roth
From: Cornelia Huck We currently pass an integer as the subcode parameter. However, the upper bits of the register containing the subcode need to be 0, which is not guaranteed unless we explicitly specify the subcode to be an unsigned long value. Fixes: d046c51dad3 ("pc-bios/s390-ccw: Get

[Qemu-devel] [PATCH 069/113] configure: recognize more rpmbuild macros

2018-06-18 Thread Michael Roth
From: Olaf Hering Extend the list of recognized, but ignored options from rpms %configure macro. This fixes build on hosts running SUSE Linux. Cc: qemu-sta...@nongnu.org Signed-off-by: Olaf Hering Message-Id: <20180418075045.27393-1-o...@aepfle.de> Signed-off-by: Paolo Bonzini (cherry picked

[Qemu-devel] [PATCH 005/113] sdl: workaround bug in sdl 2.0.8 headers

2018-06-18 Thread Michael Roth
From: Gerd Hoffmann https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=892087 Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel P. Berrangé Message-id: 20180307154258.9313-1-kra...@redhat.com (cherry picked from commit 2ca5c43091324a68772dc348cdf157c63888c168) Signed-off-by: Greg Kurz ---

[Qemu-devel] [PATCH 060/113] ccid: Fix dwProtocols advertisement of T=0

2018-06-18 Thread Michael Roth
From: Jason Andryuk Commit d7d218ef02d87c637d20d64da8f575d434ff6f78 attempted to change dwProtocols to only advertise support for T=0 and not T=1. The change was incorrect as it changed 0x0003 to 0x0001. lsusb -v in a linux guest shows: "dwProtocols 65536 (Invalid values

[Qemu-devel] [PATCH 067/113] spapr: don't advertise radix GTSE if max-compat-cpu < power9

2018-06-18 Thread Michael Roth
From: Greg Kurz On a POWER9 host, if a guest runs in pre POWER9 compat mode, it necessarily uses the hash MMU mode. In this case, we shouldn't advertise radix GTSE in the ibm,arch-vec-5-platform-support DT property as the current code does. The first reason is that it doesn't make sense, and the

[Qemu-devel] [PATCH] ui/cocoa.m: prevent stuck command key when going into full screen mode

2018-06-18 Thread John Arbuckle
When the user pushes Command-F in QEMU while the mouse is ungrabbed, QEMU goes into full screen mode. When the user finally releases the command key, it is sent to the guest as an event. The makes the guest operating system think the command key is down when it is really up. To prevent this

[Qemu-devel] [PATCH 058/113] hw/char/cmsdk-apb-uart.c: Correctly clear INTSTATUS bits on writes

2018-06-18 Thread Michael Roth
From: Peter Maydell The CMSDK APB UART INTSTATUS register bits are all write-one-to-clear. We were getting this correct for the TXO and RXO bits (which need special casing because their state lives in the STATE register), but had forgotten to handle the normal bits for RX and TX which we do

[Qemu-devel] [PATCH 059/113] device_tree: Increase FDT_MAX_SIZE to 1 MiB

2018-06-18 Thread Michael Roth
From: Geert Uytterhoeven It is not uncommon for a contemporary FDT to be larger than 64 KiB, leading to failures loading the device tree from sysfs: qemu-system-aarch64: qemu_fdt_setprop: Couldn't set ...: FDT_ERR_NOSPACE Hence increase the limit to 1 MiB, like on PPC. For reference, the

[Qemu-devel] [PATCH 095/113] util: implement simple iova tree

2018-06-18 Thread Michael Roth
From: Peter Xu Introduce a simplest iova tree implementation based on GTree. CC: QEMU Stable Signed-off-by: Peter Xu Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin (cherry picked from commit eecf5eedbdc0fc04f39abcf3afeedfbf21b25ca4) Conflicts: util/Makefile.objs

[Qemu-devel] [PATCH 055/113] vfio-ccw: fix memory leaks in vfio_ccw_realize()

2018-06-18 Thread Michael Roth
From: Greg Kurz If the subchannel is already attached or if vfio_get_device() fails, the code jumps to the 'out_device_err' label and doesn't free the string it has just allocated. The code should be reworked so that vcdev->vdev.name only gets set when the device has been attached, and freed

[Qemu-devel] [PATCH 052/113] exec: fix memory leak in find_max_supported_pagesize()

2018-06-18 Thread Michael Roth
From: Greg Kurz The string returned by object_property_get_str() is dynamically allocated. Signed-off-by: Greg Kurz Message-Id: <152231458624.69730.1752893648612848392.st...@bahia.lan> Reviewed-by: Cornelia Huck Reviewed-by: Thomas Huth Signed-off-by: Eduardo Habkost (cherry picked from

[Qemu-devel] [PATCH 057/113] tcg: Introduce tcg_set_insn_start_param

2018-06-18 Thread Michael Roth
From: Richard Henderson The parameters for tcg_gen_insn_start are target_ulong, which may be split into two TCGArg parameters for storage in the opcode on 32-bit hosts. Fixes the ARM target and its direct use of tcg_set_insn_param, which would set the wrong argument in the 64-on-32 case. Cc:

[Qemu-devel] [PATCH 092/113] intel-iommu: introduce vtd_page_walk_info

2018-06-18 Thread Michael Roth
From: Peter Xu During the recursive page walking of IOVA page tables, some stack variables are constant variables and never changed during the whole page walking procedure. Isolate them into a struct so that we don't need to pass those contants down the stack every time and multiple times. CC:

[Qemu-devel] [PATCH 056/113] hw/block/pflash_cfi: fix off-by-one error

2018-06-18 Thread Michael Roth
From: Philippe Mathieu-Daudé ASAN reported: hw/block/pflash_cfi02.c:245:33: runtime error: index 82 out of bounds for type 'uint8_t [82]' Since the 'cfi_len' member is not used, remove it to keep the code safer. Cc: qemu-sta...@nongnu.org Reported-by: AddressSanitizer Signed-off-by:

[Qemu-devel] [PATCH 050/113] tcg: Mark muluh_i64 and mulsh_i64 as 64-bit ops

2018-06-18 Thread Michael Roth
From: Richard Henderson Failure to do so results in the tcg optimizer sign-extending any constant fold from 32-bits. This turns out to be visible in the RISC-V testsuite using a host that emits these opcodes (e.g. any non-x86_64). Reported-by: Michael Clark Reviewed-by: Emilio G. Cota

[Qemu-devel] [PATCH 054/113] cpus.c: ensure running CPU recalculates icount deadlines on timer expiry

2018-06-18 Thread Michael Roth
From: Peter Maydell When we run in TCG icount mode, we calculate the number of instructions to execute using tcg_get_icount_limit(), which ensures that we stop execution at the next timer deadline. However there is a bug where currently we do not recalculate that limit if the guest reprograms a

[Qemu-devel] [PATCH 053/113] gluster: Fix blockdev-add with server.N.type=unix

2018-06-18 Thread Michael Roth
From: Kevin Wolf The legacy command line interface gets the socket path from an option called 'socket'. QAPI in contract uses SocketAddress, where the corresponding option is called 'path'. Fix the gluster block driver to accept both 'socket' and 'path', with 'path' being the preferred syntax.

[Qemu-devel] [PATCH 093/113] intel-iommu: pass in address space when page walk

2018-06-18 Thread Michael Roth
From: Peter Xu We pass in the VTDAddressSpace too. It'll be used in the follow up patches. CC: QEMU Stable Signed-off-by: Peter Xu Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin (cherry picked from commit 2f764fa87d2a81812b313dd6d998e10126292653) Signed-off-by: Michael

[Qemu-devel] [PATCH 049/113] iotests: Test preallocated truncate of 2G image

2018-06-18 Thread Michael Roth
From: Max Reitz Signed-off-by: Max Reitz Message-id: 20180228131315.30194-3-mre...@redhat.com Reviewed-by: Daniel P. Berrangé Reviewed-by: Eric Blake Signed-off-by: Max Reitz (cherry picked from commit 733d1dce0f3c8ab7b79a173f6482781d3718f844) Signed-off-by: Michael Roth ---

[Qemu-devel] [PATCH 051/113] target/i386: Fix andn instruction

2018-06-18 Thread Michael Roth
From: Alexandro Sanchez Bach In commit 7073fbada733c8d10992f00772c9b9299d740e9b, the `andn` instruction was implemented via `tcg_gen_andc` but passes the operands in the wrong order: - X86 defines `andn dest,src1,src2` as: dest = ~src1 & src2 - TCG defines `andc dest,src1,src2` as: dest = src1 &

[Qemu-devel] [PATCH 091/113] intel-iommu: only do page walk for MAP notifiers

2018-06-18 Thread Michael Roth
From: Peter Xu For UNMAP-only IOMMU notifiers, we don't need to walk the page tables. Fasten that procedure by skipping the page table walk. That should boost performance for UNMAP-only notifiers like vhost. CC: QEMU Stable Signed-off-by: Peter Xu Reviewed-by: Michael S. Tsirkin

[Qemu-devel] [PATCH 044/113] tests/multiboot: Add .gitignore

2018-06-18 Thread Michael Roth
From: Kevin Wolf Signed-off-by: Kevin Wolf Reviewed-by: Jack Schwartz Reviewed-by: Eric Blake (cherry picked from commit e2679395d598bd40770c22a793c0152576ac211f) Signed-off-by: Michael Roth --- tests/multiboot/.gitignore | 3 +++ 1 file changed, 3 insertions(+) create mode 100644

[Qemu-devel] [PATCH 046/113] virtio_net: flush uncompleted TX on reset

2018-06-18 Thread Michael Roth
From: Greg Kurz If the backend could not transmit a packet right away for some reason, the packet is queued for asynchronous sending. The corresponding vq element is tracked in the async_tx.elem field of the VirtIONetQueue, for later freeing when the transmission is complete. If a reset happens

[Qemu-devel] [PATCH 004/113] memfd: fix configure test

2018-06-18 Thread Michael Roth
From: Paolo Bonzini Recent glibc added memfd_create in sys/mman.h. This conflicts with the definition in util/memfd.c: /builddir/build/BUILD/qemu-2.11.0-rc1/util/memfd.c:40:12: error: static declaration of memfd_create follows non-static declaration Fix the configure test, and remove the

[Qemu-devel] [PATCH 041/113] multiboot: Check validity of mh_header_addr

2018-06-18 Thread Michael Roth
From: Kevin Wolf I couldn't find a case where this prevents something bad from happening that isn't already caught by other checks, but let's err on the safe side and check that mh_header_addr is as expected. Signed-off-by: Kevin Wolf Reviewed-by: Jack Schwartz (cherry picked from commit

[Qemu-devel] [PATCH 048/113] block/file-posix: Fix fully preallocated truncate

2018-06-18 Thread Michael Roth
From: Max Reitz Storing the lseek() result in an int results in it overflowing when the file is at least 2 GB big. Then, we have a 50 % chance of the result being "negative" and thus thinking an error occurred when actually everything went just fine. So we should use the correct type for

[Qemu-devel] [PATCH 045/113] arm/translate-a64: treat DISAS_UPDATE as variant of DISAS_EXIT

2018-06-18 Thread Michael Roth
From: Victor Kamensky In OE project 4.15 linux kernel boot hang was observed under single cpu aarch64 qemu. Kernel code was in a loop waiting for vtimer arrival, spinning in TC generated blocks, while interrupt was pending unprocessed. This happened because when qemu tried to handle vtimer

[Qemu-devel] [PATCH 080/113] qdev: add helpers to be more explicit when using abstract QOM parent functions

2018-06-18 Thread Michael Roth
From: Philippe Mathieu-Daudé QOM API learning curve is quite hard, in particular when devices inherit from abstract parent. To be more explicit about when a device class change the parent hooks, add few helpers hoping a device class_init() will be easier to understand. Signed-off-by: Philippe

[Qemu-devel] [PATCH 037/113] multiboot: Remove unused variables from multiboot.c

2018-06-18 Thread Michael Roth
From: Jack Schwartz Remove unused variables: mh_mode_type, mh_width, mh_height, mh_depth Signed-off-by: Jack Schwartz Reviewed-by: Daniel Kiper Reviewed-by: Prasad J Pandit Signed-off-by: Kevin Wolf (cherry picked from commit 7a2e43cc96fd017883973caf9ee076ae23a3bebd) Signed-off-by: Michael

[Qemu-devel] [PATCH 075/113] lm32: take BQL before writing IP/IM register

2018-06-18 Thread Michael Roth
From: Michael Walle Writing to these registers may raise an interrupt request. Actually, this prevents the milkymist board from starting. Cc: qemu-sta...@nongnu.org Signed-off-by: Michael Walle Tested-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée (cherry picked from commit

[Qemu-devel] [PATCH 036/113] multiboot: bss_end_addr can be zero

2018-06-18 Thread Michael Roth
From: Jack Schwartz The multiboot spec (https://www.gnu.org/software/grub/manual/multiboot/), section 3.1.3, allows for bss_end_addr to be zero. A zero bss_end_addr signifies there is no .bss section. Suggested-by: Daniel Kiper Signed-off-by: Jack Schwartz Reviewed-by: Daniel Kiper

[Qemu-devel] [PATCH 040/113] multiboot: Reject kernels exceeding the address space

2018-06-18 Thread Michael Roth
From: Kevin Wolf The code path where mh_load_end_addr is non-zero in the Multiboot header checks that mh_load_end_addr >= mh_load_addr and so mb_load_size is checked. However, mb_load_size is not checked when calculated from the file size, when mh_load_end_addr is 0. If the kernel binary size

[Qemu-devel] [PATCH 033/113] address_space_rw: address_space_to_flatview needs RCU lock

2018-06-18 Thread Michael Roth
From: Paolo Bonzini address_space_rw is calling address_space_to_flatview but it can be called outside the RCU lock. To fix it, transform flatview_rw into address_space_rw, since flatview_rw is otherwise unused. Reviewed-by: Alexey Kardashevskiy Signed-off-by: Paolo Bonzini (cherry picked

[Qemu-devel] [PATCH 034/113] memory: fix flatview_access_valid RCU read lock/unlock imbalance

2018-06-18 Thread Michael Roth
From: Paolo Bonzini Fixes: 11e732a5ed46903f997985bed4c3767ca28a7eb6 Reported-by: Cornelia Huck Reported-by: luigi burdo Signed-off-by: Paolo Bonzini Tested-by: Cornelia Huck Tested-by: Thomas Huth Message-id: 20180307130238.19358-1-pbonz...@redhat.com Signed-off-by: Peter Maydell (cherry

[Qemu-devel] [PATCH 003/113] virtio-balloon: unref the memory region before continuing

2018-06-18 Thread Michael Roth
From: Tiwei Bie Signed-off-by: Tiwei Bie Cc: qemu-sta...@nongnu.org Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin (cherry picked from commit b86107ab43b804e899a226fe287e34ab8acef596) Signed-off-by: Michael Roth --- hw/virtio/virtio-balloon.c | 1 + 1 file changed, 1

[Qemu-devel] [PATCH 072/113] qemu-io: Use purely string blockdev options

2018-06-18 Thread Michael Roth
From: Max Reitz Currently, qemu-io only uses string-valued blockdev options (as all are converted directly from QemuOpts) -- with one exception: -U adds the force-share option as a boolean. This in itself is already a bit questionable, but a real issue is that it also assumes the value already

[Qemu-devel] [PATCH 035/113] migration/block: reset dirty bitmap before read in bulk phase

2018-06-18 Thread Michael Roth
From: Peter Lieven Reset the dirty bitmap before reading to make sure we don't miss any new data. Cc: qemu-sta...@nongnu.org Signed-off-by: Peter Lieven Message-Id: <1520507908-16743-3-git-send-email...@kamp.de> Reviewed-by: Juan Quintela Signed-off-by: Dr. David Alan Gilbert (cherry picked

  1   2   3   4   5   >