Re: [Qemu-devel] Very slow finding extents in QCOW2-backed nbd

2019-01-28 Thread Vladimir Sementsov-Ogievskiy
28.01.2019 14:58, Tim Smith wrote: > Hi all, I have a question about the intent of the last call to > bdrv_co_block_status() in bdrv_co_block_status(), in block/io.c about line > 2195, which looks like this: > > ret2 = bdrv_co_block_status(local_file, want_zero, local_map, >

[Qemu-devel] [PATCH v3 2/3] usb-mtp: breakup MTP write into smaller chunks

2019-01-28 Thread Bandan Das
For every MTP_WRITE_BUF_SZ copied, this patch writes it to file before getting the next block of data. The file is kept opened for the duration of the operation but the sanity checks on the write operation are performed only once when the write operation starts. Additionally, we also update the

[Qemu-devel] [PATCH 1/2] block: add functions to search BlockBackend by root BDS name

2019-01-28 Thread Anton Kuchin
BlockBackend name is empty if it is added with '-blockdev' and '-device' options or hotplugged with QMP but callers still expect backend to be accesible by name for operations like commit or statistics access. Intoduce blk_lookup function to search both by name and BDS-root node_name.

[Qemu-devel] [PATCH 0/2] block: add blk_lookup() for getting device by node_name

2019-01-28 Thread Anton Kuchin
Some HMP and QMP commands are targeting BlockBackend but for hotplugged devices name of BB is deprecated, instead name of root BlockDriverState is set. These patches add functions to search BB by attached root BDS name. This approach isn't perfect, but I couldn't invent a better one and I belive

[Qemu-devel] [PATCH v3 3/3] usb-mtp: replace the homebrew write with qemu_write_full

2019-01-28 Thread Bandan Das
qemu_write_full takes care of partial blocking writes, as in cases of larger file sizes Signed-off-by: Bandan Das --- hw/usb/dev-mtp.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c index b607c7be05..f4d9470493 100644 ---

[Qemu-devel] [PATCH 2/2] block: migrate callers from blk_by_name to blk_lookup

2019-01-28 Thread Anton Kuchin
Signed-off-by: Anton Kuchin --- blockdev-nbd.c | 2 +- blockdev.c | 6 +++--- hmp.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/blockdev-nbd.c b/blockdev-nbd.c index d73ac1b026..f2ea7318cf 100644 --- a/blockdev-nbd.c +++ b/blockdev-nbd.c @@ -162,7 +162,7

[Qemu-devel] [PATCH for-4.0 09/11] qemu_thread: supplement error handling for migration

2019-01-28 Thread Fei Li
From: Fei Li Update qemu_thread_create()'s callers by - setting an error on qemu_thread_create() failure for callers that set an error on failure; - reporting the error and returning failure for callers that return an error code on failure; - reporting the error and setting some state for

[Qemu-devel] [PATCH v3 1/3] usb-mtp: Reallocate buffer in multiples of MTP_WRITE_BUF_SZ

2019-01-28 Thread Bandan Das
This is a "pre-patch" to breaking up the write buffer for MTP writes. Instead of allocating a mtp buffer equal to size sent by the initiator, we start with a small size and reallocate multiples (of that small size) as needed. Signed-off-by: Bandan Das --- hw/usb/dev-mtp.c | 26

[Qemu-devel] [PATCH v3 0/3] Break down the MTP write operation

2019-01-28 Thread Bandan Das
v3: Added patch 3/3 v2: Rebased on top of master and retested For larger files, not only do we keep reallocating to increase the mtp buffer size, the write also happens in one go. This does two things: Write to file upto a certain data size we have received so far and second, reuse the

[Qemu-devel] [PATCH for-4.0 11/11] qemu_thread: supplement error handling for touch_all_pages

2019-01-28 Thread Fei Li
From: Fei Li Supplement the error handling for touch_all_pages: add an Error parameter for it to propagate the error to its caller to do the handling in case it fails. Cc: Markus Armbruster Signed-off-by: Fei Li --- util/oslib-posix.c | 26 -- 1 file changed, 16

[Qemu-devel] [PATCH for-4.0 10/11] qemu_thread: supplement error handling for vnc_start_worker_thread

2019-01-28 Thread Fei Li
From: Fei Li Supplement the error handling for vnc_thread_worker_thread: add an Error parameter for it to propagate the error to its caller to handle in case it fails, and make it return a Boolean to indicate whether it succeeds. Cc: Markus Armbruster Cc: Gerd Hoffmann Signed-off-by: Fei Li

Re: [Qemu-devel] [PATCH RFCv2 0/9] qdev: Hotplug handler chaining + virtio-pmem

2019-01-28 Thread David Hildenbrand
On 28.01.19 15:18, Igor Mammedov wrote: > On Wed, 23 Jan 2019 20:55:18 +0100 > David Hildenbrand wrote: > >> This series implements supprt for hotplug handler chaining (proposed >> by Igor), something that is necessary to turn selected virtio devices into >> memory devices. Planned devices

Re: [Qemu-devel] [PATCH 42/52] i386: express dependencies with Kconfig

2019-01-28 Thread Thomas Huth
On 2019-01-25 11:07, Paolo Bonzini wrote: > This way, the default-configs file only need to specify the boards > and any optional devices. > > Signed-off-by: Paolo Bonzini > Signed-off-by: Yang Zhong > Message-Id: <20190123065618.3520-37-yang.zh...@intel.com> > Signed-off-by: Paolo Bonzini >

[Qemu-devel] [PATCH for-4.0 09/11] qemu_thread: supplement error handling for migration

2019-01-28 Thread Fei Li
From: Fei Li Update qemu_thread_create()'s callers by - setting an error on qemu_thread_create() failure for callers that set an error on failure; - reporting the error and returning failure for callers that return an error code on failure; - reporting the error and setting some state for

[Qemu-devel] [PATCH for-4.0 07/11] qemu_thread: supplement error handling for iothread_complete

2019-01-28 Thread Fei Li
From: Fei Li For iothread_complete: utilize the existed errp to propagate the error and do the corresponding cleanup to replace the temporary _abort. Cc: Markus Armbruster Cc: Stefan Hajnoczi Cc: Eric Blake Signed-off-by: Fei Li --- iothread.c | 19 +-- 1 file changed, 13

[Qemu-devel] [PATCH for-4.0 07/11] qemu_thread: supplement error handling for iothread_complete

2019-01-28 Thread Fei Li
From: Fei Li For iothread_complete: utilize the existed errp to propagate the error and do the corresponding cleanup to replace the temporary _abort. Cc: Markus Armbruster Cc: Stefan Hajnoczi Cc: Eric Blake Signed-off-by: Fei Li --- iothread.c | 19 +-- 1 file changed, 13

Re: [Qemu-devel] [PATCH RFCv2 0/9] qdev: Hotplug handler chaining + virtio-pmem

2019-01-28 Thread Igor Mammedov
On Wed, 23 Jan 2019 20:55:18 +0100 David Hildenbrand wrote: > This series implements supprt for hotplug handler chaining (proposed > by Igor), something that is necessary to turn selected virtio devices into > memory devices. Planned devices inlude virtio-mem and virtio-pmem. The > current

[Qemu-devel] [PATCH for-4.0 08/11] qemu_thread: supplement error handling for qemu_signalfd_compat

2019-01-28 Thread Fei Li
From: Fei Li For qemu_signalfd_compat: set errno, do some cleanup, and return -1 to replace the temporary _abort when failing to create sigwait_compat. Cc: Markus Armbruster Cc: Eric Blake Signed-off-by: Fei Li --- util/compatfd.c | 13 ++--- 1 file changed, 10 insertions(+), 3

[Qemu-devel] [PATCH for-4.0 08/11] qemu_thread: supplement error handling for qemu_signalfd_compat

2019-01-28 Thread Fei Li
From: Fei Li For qemu_signalfd_compat: set errno, do some cleanup, and return -1 to replace the temporary _abort when failing to create sigwait_compat. Cc: Markus Armbruster Cc: Eric Blake Signed-off-by: Fei Li --- util/compatfd.c | 13 ++--- 1 file changed, 10 insertions(+), 3

[Qemu-devel] [PATCH for-4.0 02/11] qemu_thread: supplement error handling for qemu_X_start_vcpu

2019-01-28 Thread Fei Li
From: Fei Li The callers of qemu_init_vcpu() already passed the **errp to handle errors. In view of this, add a new Error parameter to qemu_init_vcpu() and all qemu_X_start_vcpu() functions called by qemu_init_vcpu() to propagate the error and let the further callers check it. Besides, make

[Qemu-devel] [PATCH for-4.0 06/11] qemu_thread: supplement error handling for emulated_realize

2019-01-28 Thread Fei Li
From: Fei Li Utilize the existed errp to propagate the error and do the corresponding cleanup to replace the temporary _abort. Cc: Markus Armbruster Cc: Gerd Hoffmann Signed-off-by: Fei Li --- hw/usb/ccid-card-emulated.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-)

[Qemu-devel] [PATCH for-4.0 05/11] qemu_thread: supplement error handling for h_resize_hpt_prepare

2019-01-28 Thread Fei Li
From: Fei Li Add a local_err to hold the error, and return the corresponding error code to replace the temporary _abort. Cc: Markus Armbruster Cc: David Gibson Signed-off-by: Fei Li Acked-by: David Gibson --- hw/ppc/spapr_hcall.c | 12 1 file changed, 8 insertions(+), 4

[Qemu-devel] [PATCH for-4.0 01/11] qemu_thread: make qemu_thread_create() take Error ** argument

2019-01-28 Thread Fei Li
From: Fei Li qemu_thread_create() abort()s on error. Not nice. Give it a return value and an Error ** argument, so it can return success/failure. Considering qemu_thread_create() is quite widely used in qemu, split this into two steps: this patch passes the _abort to qemu_thread_create()

[Qemu-devel] [PATCH for-4.0 03/11] qemu_thread: supplement error handling for qmp_dump_guest_memory

2019-01-28 Thread Fei Li
From: Fei Li Utilize the existed errp to propagate the error instead of the temporary _abort. Cc: Markus Armbruster Cc: Marc-André Lureau Signed-off-by: Fei Li --- dump.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dump.c b/dump.c index e4886bc9c3..92cc277015

[Qemu-devel] [PATCH for-4.0 04/11] qemu_thread: supplement error handling for pci_edu_realize

2019-01-28 Thread Fei Li
From: Fei Li Utilize the existed errp to propagate the error and do the corresponding cleanup to replace the temporary _abort. Cc: Markus Armbruster Cc: Jiri Slaby Signed-off-by: Fei Li --- hw/misc/edu.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git

[Qemu-devel] [PATCH for-4.0 00/11] qemu_thread_create: propagate the error to callers to handle

2019-01-28 Thread Fei Li
Hi, This idea comes from BiteSizedTasks, and this patch series implement the error checking of qemu_thread_create: make qemu_thread_create return a flag to indicate if it succeeded rather than failing with an error; make all callers check it. The first patch modifies the qemu_thread_create() by

[Qemu-devel] [PATCH for-4.0 07/11] qemu_thread: supplement error handling for iothread_complete

2019-01-28 Thread Fei Li
From: Fei Li For iothread_complete: utilize the existed errp to propagate the error and do the corresponding cleanup to replace the temporary _abort. Cc: Markus Armbruster Cc: Stefan Hajnoczi Cc: Eric Blake Signed-off-by: Fei Li --- iothread.c | 19 +-- 1 file changed, 13

[Qemu-devel] [Bug 1813406] Re: qemu-img convert malfunction on macOS

2019-01-28 Thread Chen Zhang
Preliminary debugging seems to hint that wrong image convert status for some sectors during iteration in convert_do_copy() accumulated a much smaller allocated_sectors than it should. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

Re: [Qemu-devel] [PATCH RFCv2 5/9] virtio-pci: Allow to specify additional interfaces for the base type

2019-01-28 Thread Cornelia Huck
On Wed, 23 Jan 2019 20:55:23 +0100 David Hildenbrand wrote: > Let's allow to specify additional interfaces for the base type (e.g. > later TYPE_MEMORY_DEVICE), something that was possible before the > rework of virtio PCI device instantiation. > > Signed-off-by: David Hildenbrand > --- >

Re: [Qemu-devel] [PATCH RFCv2 1/9] qdev: Let the hotplug_handler_unplug() caller delete the device

2019-01-28 Thread Cornelia Huck
On Wed, 23 Jan 2019 20:55:19 +0100 David Hildenbrand wrote: > When unplugging a device, at one point the device will be destroyed > via object_unparent(). This will, one the one hand, unrealize the > removed device hierarchy, and on the other hand, destroy/free the > device hierarchy. > > When

Re: [Qemu-devel] [PATCH RFCv2 3/9] qdev: Provide qdev_get_bus_hotplug_handler()

2019-01-28 Thread David Hildenbrand
On 28.01.19 15:01, Igor Mammedov wrote: > On Wed, 23 Jan 2019 20:55:21 +0100 > David Hildenbrand wrote: > >> Let's use a wrapper instead of looking it up manually. This function can >> than be reused when we explicitly want to have the bus hotplug handler >> (e.g. when the bus hotplug handler

Re: [Qemu-devel] [PATCH RFCv2 3/9] qdev: Provide qdev_get_bus_hotplug_handler()

2019-01-28 Thread Igor Mammedov
On Wed, 23 Jan 2019 20:55:21 +0100 David Hildenbrand wrote: > Let's use a wrapper instead of looking it up manually. This function can > than be reused when we explicitly want to have the bus hotplug handler > (e.g. when the bus hotplug handler was overwritten by the machine > hotplug handler).

[Qemu-devel] [PATCH] Introduce new "no_guest_reset" parameter for usb-host device

2019-01-28 Thread Gerd Hoffmann
From: Alexander Kappner With certain USB devices passed through via usb-host, a guest attempting to reset a usb-host device can trigger a reset loop that renders the USB device unusable. In my use case, the device was an iPhone XR that was passed through to a Mac OS X Mojave guest. Upon

Re: [Qemu-devel] [PATCH RFC 4/8] i386/kvm: Implement 'hv-all' pass-through mode

2019-01-28 Thread Vitaly Kuznetsov
Roman Kagan writes: > On Fri, Jan 25, 2019 at 02:46:42PM +0100, Vitaly Kuznetsov wrote: >> Roman Kagan writes: >> >> > On Fri, Jan 25, 2019 at 12:41:51PM +0100, Vitaly Kuznetsov wrote: >> >> In many case we just want to give Windows guests all currently supported >> >> Hyper-V enlightenments

Re: [Qemu-devel] [PATCH] hw/block: clean up stake xen_disk trace entries

2019-01-28 Thread Peter Maydell
On Mon, 28 Jan 2019 at 13:41, Philippe Mathieu-Daudé wrote: > > Cc'ing QEMU Trivial. > > On 1/22/19 3:51 PM, Paul Durrant wrote: > > This should have been removed then xen_disk.c was removed but I missed them. > > ... when xen_disk.c was removed (19f87870baa) ... also s/stake/stale/ in the

Re: [Qemu-devel] Building nsis installer - cross compile for Windows

2019-01-28 Thread Peter Maydell
On Mon, 28 Jan 2019 at 13:34, Adam Baxter wrote: > > I'm getting stuck trying to build the NSIS installer for Windows > > > export CFLAGS="-Wno-stringop-truncation" > ./configure --python=$(command -v python3) > --cross-prefix=x86_64-w64-mingw32- --enable-docs > echo 3.99.99 > VERSION > make

Re: [Qemu-devel] [PATCH] hw/block: clean up stake xen_disk trace entries

2019-01-28 Thread Philippe Mathieu-Daudé
Cc'ing QEMU Trivial. On 1/22/19 3:51 PM, Paul Durrant wrote: > This should have been removed then xen_disk.c was removed but I missed them. ... when xen_disk.c was removed (19f87870baa) ... > > Signed-off-by: Paul Durrant Reviewed-by: Philippe Mathieu-Daudé > --- > Cc: Kevin Wolf > Cc:

Re: [Qemu-devel] [PATCH 1/3] hw/i386/pc.c: remove unused function pc_acpi_init()

2019-01-28 Thread Igor Mammedov
On Fri, 25 Jan 2019 14:01:55 +0800 Wei Yang wrote: > Function pc_acpi_init() is now used in no place. s/is now used in no place./in not used anymore,/ fixup the same phrase in other patches. otherwise series looks good, so fix commit messages and resubmit series. Also when sending

[Qemu-devel] Building nsis installer - cross compile for Windows

2019-01-28 Thread Adam Baxter
I'm getting stuck trying to build the NSIS installer for Windows export CFLAGS="-Wno-stringop-truncation" ./configure --python=$(command -v python3) --cross-prefix=x86_64-w64-mingw32- --enable-docs echo 3.99.99 > VERSION make -j`nproc` make -j`nproc` installer results in: make[1]: Leaving

Re: [Qemu-devel] [PATCH v2] bt: use size_t type for length parameters instead of int

2019-01-28 Thread Hugo Lefeuvre
Hi, > The length parameter values are not negative, thus use an unsigned > type 'size_t' for them. Many routines pass 'len' values to memcpy(3) > calls. If it was negative, it could lead to memory corruption issues. > Add check to avoid it. I'm working on a Debian LTS security update for qemu

Re: [Qemu-devel] [PATCH] tests/microbit-test: Add tests for nRF51 NVMC

2019-01-28 Thread Peter Maydell
On Thu, 24 Jan 2019 at 14:11, Stefan Hajnoczi wrote: > > From: Steffen Görtz > > Signed-off-by: Steffen Görtz > Signed-off-by: Stefan Hajnoczi > --- > This resolves the conflict with Julia's UART test series due to > global_qtest removal. > > tests/microbit-test.c | 108

Re: [Qemu-devel] [libvirt] Configuring pflash devices for OVMF firmware

2019-01-28 Thread Peter Maydell
On Mon, 28 Jan 2019 at 12:40, Gerd Hoffmann wrote: > The tricky part is the access control here. On physical hardware you > typically have one flash rom, say 16M below 4G (on x86). > > Our pflash device doesn't allow to define multiple regions, so we use > multiple pflash devices instead, each

Re: [Qemu-devel] [PULL 00/50] Misc patches for 2019-01-21

2019-01-28 Thread Peter Maydell
On Fri, 25 Jan 2019 at 17:19, Paolo Bonzini wrote: > > The following changes since commit 8b7a3e1e5434b55d7710071b00af97c7086cab7a: > > Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' > into staging (2019-01-24 15:04:47 +) > > are available in the git repository at:

Re: [Qemu-devel] [PATCH v2] s390x: remove direct reference to mem_path global form s390x code

2019-01-28 Thread David Hildenbrand
On 28.01.19 13:31, Igor Mammedov wrote: > I plan to deprecate -mem-path option and replace it with memory-backend, > for that it's necessary to get rid of mem_path global variable. > Do it for s390x case, replacing it with alternative way to enable > 1Mb hugepages capability. > > Todo that

[Qemu-devel] [PATCH v2] s390x: remove direct reference to mem_path global form s390x code

2019-01-28 Thread Igor Mammedov
I plan to deprecate -mem-path option and replace it with memory-backend, for that it's necessary to get rid of mem_path global variable. Do it for s390x case, replacing it with alternative way to enable 1Mb hugepages capability. Todo that replace qemu_mempath_getpagesize() with

Re: [Qemu-devel] [libvirt] Configuring pflash devices for OVMF firmware

2019-01-28 Thread Gerd Hoffmann
Hi, > > Issue (1) isn't too hard: we add the device to the dynamic sysbus device > > white-list, move a sysbus_mmio_map() from pflash_cfi01_realize() into > > pflash_cfi01_realize(). The latter requires a new device property to > > configure the base address. I got a working prototype. Since

Re: [Qemu-devel] [PATCH 0/4] aspeed/smc: add fast read support under User command mode.

2019-01-28 Thread Peter Maydell
On Thu, 24 Jan 2019 at 14:08, Cédric Le Goater wrote: > > Hello, > > When in the User command mode, the Aspeed SMC controller driver > performs the dummy cycles of a fast read command using byte transfers, > that is ony byte for eight cycles. But, the QEMU m25p80 models one > dummy cycle with one

Re: [Qemu-devel] Crash when booting KDE Neon using qxl-vga

2019-01-28 Thread Dr. David Alan Gilbert
* Leonardo Soares Müller (leozinho29...@hotmail.com) wrote: > With QEMU version 3.1.50 (v3.1.0-1218-gad7a21e812-dirty) (commit > ad7a21e81231ae64540310384fb0f87ac8758b02) on Xubuntu 18.04 host, a KDE > Neon guest is crashing on boot. The QEMU command line is: > > gdb -q -ex "set pagination off"

[Qemu-devel] Very slow finding extents in QCOW2-backed nbd

2019-01-28 Thread Tim Smith
Hi all, I have a question about the intent of the last call to bdrv_co_block_status() in bdrv_co_block_status(), in block/io.c about line 2195, which looks like this: ret2 = bdrv_co_block_status(local_file, want_zero, local_map, *pnum, _pnum, NULL,

Re: [Qemu-devel] [PATCH] target/arm: Fix validation of 32-bit address spaces for aa32

2019-01-28 Thread Peter Maydell
On Fri, 25 Jan 2019 at 18:49, Richard Henderson wrote: > > When tsz == 0, aarch32 selects the address space via exclusion, > and there are no "top_bits" remaining that require validation. > > Fixes: ba97be9f4a4 > Reported-by: Peter Maydell > Signed-off-by: Richard Henderson > --- >

[Qemu-devel] ping Re: [PATCH v3 0/9] qcow2: encryption threads

2019-01-28 Thread Vladimir Sementsov-Ogievskiy
ping Hi! Mostly reviewed-by Alberto, "/* No sense in releasing the lock */" should be removed from 06, should I resend just for this? I'd prefer to handle some other comments, if any. 08.01.2019 20:06, Vladimir Sementsov-Ogievskiy wrote: > Hi all! > > The series brings threads to qcow2

Re: [Qemu-devel] [PATCH v2] bt: use size_t type for length parameters instead of int

2019-01-28 Thread Philippe Mathieu-Daudé
Hi Hugo, On 1/28/19 10:31 AM, Hugo Lefeuvre wrote: > Hi, > >> The length parameter values are not negative, thus use an unsigned >> type 'size_t' for them. Many routines pass 'len' values to memcpy(3) >> calls. If it was negative, it could lead to memory corruption issues. >> Add check to avoid

Re: [Qemu-devel] [PATCH v1 0/2] s390x/pci: PCI bridge plugging fixes

2019-01-28 Thread Cornelia Huck
On Tue, 22 Jan 2019 13:51:31 +0100 David Hildenbrand wrote: > Hotplugging of PCI bridges is right now pretty much broken. Coldplugging > and hotplugging will assign wrong primary bus numbers in some scenarios. > > I base my knowledge on how this is supposed to work on >

Re: [Qemu-devel] [PATCH] s390x: remove direct reference to mem_path global form s90x code

2019-01-28 Thread David Hildenbrand
On 25.01.19 11:40, Igor Mammedov wrote: > On Fri, 25 Jan 2019 09:03:49 +0100 > David Hildenbrand wrote: > >> On 24.01.19 17:57, Igor Mammedov wrote: >>> I plan to deprecate -mem-path option and replace it with memory-backend, >>> for that it's necessary to get rid of mem_path global variable.

Re: [Qemu-devel] [PATCH] slirp: Replace QEMU_BUILD_BUG_ON with own macro

2019-01-28 Thread Philippe Mathieu-Daudé
On 1/28/19 12:25 PM, Peter Maydell wrote: > On Mon, 28 Jan 2019 at 11:22, Philippe Mathieu-Daudé > wrote: >> On 1/27/19 12:37 PM, Marc-André Lureau wrote: >>> Did you try using G_STATIC_ASSERT* instead? >> [...] >> >> Is there a same plan for QEMU codebase? > > Our version uses _Static_assert

Re: [Qemu-devel] [PATCH v3 1/2] s390x/pci: Introduce unplug requests and split unplug handler

2019-01-28 Thread Cornelia Huck
On Wed, 23 Jan 2019 12:08:37 +0100 David Hildenbrand wrote: > On 23.01.19 12:03, Cornelia Huck wrote: > > On Mon, 21 Jan 2019 14:42:48 +0100 > > David Hildenbrand wrote: > > > >> PCI on s390x is really weird and how it was modeled in QEMU might not have > >> been the right choice. Anyhow,

Re: [Qemu-devel] [PATCH v1] s390x/pci: Warn when adding PCI devices without the 'zpci' feature

2019-01-28 Thread Cornelia Huck
On Tue, 22 Jan 2019 10:41:43 +0100 David Hildenbrand wrote: > We decided to always create the PCI host bridge, even if 'zpci' is not > enabled (due to migration compatibility). This however right now allows > to add zPCI/PCI devices to a VM although the guest will never actually see > them,

Re: [Qemu-devel] [PATCH RFC 4/8] i386/kvm: Implement 'hv-all' pass-through mode

2019-01-28 Thread Roman Kagan
On Fri, Jan 25, 2019 at 02:46:42PM +0100, Vitaly Kuznetsov wrote: > Roman Kagan writes: > > > On Fri, Jan 25, 2019 at 12:41:51PM +0100, Vitaly Kuznetsov wrote: > >> In many case we just want to give Windows guests all currently supported > >> Hyper-V enlightenments and that's where this new mode

Re: [Qemu-devel] [PATCH] slirp: Replace QEMU_BUILD_BUG_ON with own macro

2019-01-28 Thread Peter Maydell
On Mon, 28 Jan 2019 at 11:22, Philippe Mathieu-Daudé wrote: > On 1/27/19 12:37 PM, Marc-André Lureau wrote: > > Did you try using G_STATIC_ASSERT* instead? > [...] > > Is there a same plan for QEMU codebase? Our version uses _Static_assert where possible, which I think will give better error

Re: [Qemu-devel] [PATCH v5 11/11] block/backup: use backup-top instead of write notifiers

2019-01-28 Thread Vladimir Sementsov-Ogievskiy
18.01.2019 17:56, Max Reitz wrote: > On 29.12.18 13:20, Vladimir Sementsov-Ogievskiy wrote: >> Drop write notifiers and use filter node instead. Changes: >> >> 1. copy-before-writes now handled by filter node, so, drop all >> is_write_notifier arguments. >> >> 2. we don't have intersecting

Re: [Qemu-devel] [PATCH v3 2/2] s390x/pci: Unplug remaining devices on pcihost reset

2019-01-28 Thread Cornelia Huck
On Wed, 23 Jan 2019 12:05:39 +0100 Cornelia Huck wrote: > On Mon, 21 Jan 2019 14:42:49 +0100 > David Hildenbrand wrote: > > > When resetting the guest we should unplug and remove all devices that > > are still pending. Otherwise the fresh guest will see devices that will > > suddenly vanish. >

Re: [Qemu-devel] [PATCH 6/7] target/arm/translate-a64: Don't underdecode FP insns

2019-01-28 Thread Laurent Desnogues
On Fri, Jan 25, 2019 at 7:26 PM Peter Maydell wrote: > > In the encoding groups > * floating-point data-processing (1 source) > * floating-point data-processing (2 source) > * floating-point data-processing (3 source) > * floating-point immediate > * floating-point compare > *

Re: [Qemu-devel] [PATCH] target/xtensa: rearrange access to external interrupts

2019-01-28 Thread Philippe Mathieu-Daudé
On 1/27/19 2:45 AM, Max Filippov wrote: > Replace xtensa_get_extint that returns single external IRQ descriptor > with xtensa_get_extints that returns a vector of all external IRQs. > > Signed-off-by: Max Filippov > --- > hw/xtensa/pic_cpu.c | 24 +++- > hw/xtensa/xtfpga.c

Re: [Qemu-devel] [PATCH 5/7] target/arm/translate-a64: Don't underdecode add/sub extended register

2019-01-28 Thread Laurent Desnogues
On Fri, Jan 25, 2019 at 7:26 PM Peter Maydell wrote: > > In the "add/subtract (extended register)" encoding group, the "opt" > field in bits [23:22] must be zero. Correctly UNDEF the unallocated > encodings where this field is not zero. > > Reported-by: Laurent Desnogues > Signed-off-by: Peter

Re: [Qemu-devel] [PATCH 7/7] target/arm/translate-a64: Don't underdecode SDOT and UDOT

2019-01-28 Thread Laurent Desnogues
On Fri, Jan 25, 2019 at 7:26 PM Peter Maydell wrote: > > In the AdvSIMD scalar x indexed element and vector x indexed element > encoding group, the SDOT and UDOT instructions are vector only, > and their opcode is unallocated in the scalar group. Correctly > UNDEF this unallocated encoding. > >

Re: [Qemu-devel] [PATCH 4/7] target/arm/translate-a64: Don't underdecode SIMD ld/st single

2019-01-28 Thread Laurent Desnogues
On Fri, Jan 25, 2019 at 7:26 PM Peter Maydell wrote: > > In the AdvSIMD load/store single structure encodings, the > non-post-indexed case should have zeroes in [20:16] (which is the > Rm field for the post-indexed case). Bit 31 must also be zero > (a check we got right in ldst_multiple but not

Re: [Qemu-devel] [PATCH] slirp: Replace QEMU_BUILD_BUG_ON with own macro

2019-01-28 Thread Philippe Mathieu-Daudé
Hi Marc-André, On 1/27/19 12:37 PM, Marc-André Lureau wrote: > Hi > > On Sun, Jan 27, 2019 at 5:55 AM Samuel Thibault > wrote: >> >> (Which I'll fold as appropriate within Marc-André's patch series) > > Did you try using G_STATIC_ASSERT* instead? [...] Is there a same plan for QEMU codebase?

Re: [Qemu-devel] [PATCH 5/7] target/arm/translate-a64: Don't underdecode add/sub extended register

2019-01-28 Thread Peter Maydell
On Mon, 28 Jan 2019 at 11:16, Laurent Desnogues wrote: > > On Fri, Jan 25, 2019 at 7:26 PM Peter Maydell > wrote: > > > > In the "add/subtract (extended register)" encoding group, the "opt" > > field in bits [23:22] must be zero. Correctly UNDEF the unallocated > > encodings where this field is

[Qemu-devel] [RFC PATCH 4/4] hw/arm/virt: Add nvdimm hotplug support

2019-01-28 Thread Shameer Kolothum
nvdimm hotplug is enabled using GPIO(Pin 4) based ACPI event. Hot removal functionality is not yet supported. Signed-off-by: Shameer Kolothum --- hw/arm/virt-acpi-build.c | 17 + hw/arm/virt.c| 29 ++--- include/hw/arm/virt.h| 1 + 3

Re: [Qemu-devel] [PATCH] target/xtensa: drop function xtensa_timer_irq

2019-01-28 Thread Philippe Mathieu-Daudé
On 1/27/19 2:44 AM, Max Filippov wrote: > It's a one-liner used in a single place, move its implementation there > and remove its declaration. > > Signed-off-by: Max Filippov Reviewed-by: Philippe Mathieu-Daudé > --- > hw/xtensa/pic_cpu.c | 7 +-- > target/xtensa/cpu.h | 1 - > 2 files

Re: [Qemu-devel] [PATCH 2/7] target/arm/translate-a64: Don't underdecode PRFM

2019-01-28 Thread Laurent Desnogues
On Fri, Jan 25, 2019 at 7:26 PM Peter Maydell wrote: > > The PRFM prefetch insn in the load/store with imm9 encodings > requires idx field 0b00; we were underdecoding this by > only checking !is_unpriv (which is equivalent to idx != 2). > Correctly UNDEF the unallocated encodings where idx ==

Re: [Qemu-devel] [PATCH] hw/input/lm832x: set device category of lm832x

2019-01-28 Thread Philippe Mathieu-Daudé
Hi Thomas, On 1/28/19 9:37 AM, Thomas Huth wrote: > Hi, > > On 2019-01-27 11:18, kumar sourav wrote: >> Sets the category of lm832x as DEVICE_CATEGORY_INPUT >> Devices should be assigned to one of DEVICE_CATEGORY_ >> >> Signed-off-by: kumar sourav >> --- >> hw/input/lm832x.c | 1 + >> 1

Re: [Qemu-devel] [PATCH 3/7] target/arm/translate-a64: Don't underdecode SIMD ld/st multiple

2019-01-28 Thread Laurent Desnogues
On Fri, Jan 25, 2019 at 7:26 PM Peter Maydell wrote: > > In the AdvSIMD load/store multiple structures encodings, > the non-post-indexed case should have zeroes in [20:16] > (which is the Rm field for the post-indexed case). > Correctly UNDEF the currently unallocated encodings which > have

Re: [Qemu-devel] [PATCH 1/7] target/arm/translate-a64: Don't underdecode system instructions

2019-01-28 Thread Laurent Desnogues
On Fri, Jan 25, 2019 at 7:26 PM Peter Maydell wrote: > > The "system instructions" and "system register move" subcategories > of "branches, exception generating and system instructions" for A64 > only apply if bits [23:22] are zero; other values are currently > unallocated. Correctly UNDEF these

[Qemu-devel] [RFC PATCH 2/4] hw/arm/virt: Add GPIO based pcdimm hotplug ACPI event support

2019-01-28 Thread Shameer Kolothum
This adds support for using PL061 GPIO controller pin to trigger pcdimm hotplug event to guest. Signed-off-by: Shameer Kolothum --- default-configs/arm-softmmu.mak | 1 + hw/arm/virt-acpi-build.c| 28 hw/arm/virt.c | 37

Re: [Qemu-devel] [PATCH] slirp: replace QEMU_BUILD_BUG_ON with G_STATIC_ASSERT

2019-01-28 Thread Alex Bennée
Samuel Thibault writes: > Alex Bennée, le lun. 28 janv. 2019 10:35:37 +, a ecrit: >> Samuel Thibault writes: >> >> > Signed-off-by: Samuel Thibault >> >> Is there a rationale as to why we should replace QEMU_BUILD_BUG_ON with >> G_STATIC_ASSERT or is it particular to these

[Qemu-devel] [RFC PATCH 3/4] hw/arm/virt: Enable pc-dimm hotplug support

2019-01-28 Thread Shameer Kolothum
pc-dimm memory hotplug is enabled using GPIO(Pin 2) based ACPI event. Hot removal functionality is not yet supported. Signed-off-by: Shameer Kolothum --- hw/arm/virt.c | 57 +++-- 1 file changed, 55 insertions(+), 2 deletions(-) diff --git

Re: [Qemu-devel] [PATCH 6/6] tests/tcg/aarch64: Add pauth smoke tests

2019-01-28 Thread Alex Bennée
Richard Henderson writes: > Signed-off-by: Richard Henderson > --- > tests/tcg/aarch64/pauth-1.c | 23 +++ > tests/tcg/aarch64/Makefile.target | 7 ++- > 2 files changed, 29 insertions(+), 1 deletion(-) > create mode 100644 tests/tcg/aarch64/pauth-1.c > > diff

[Qemu-devel] [RFC PATCH 0/4] ARM virt: ACPI memory hotplug support

2019-01-28 Thread Shameer Kolothum
This series is an attempt to provide hotplug support to both pc-dimm and nvdimm device memory on ARM virt platform. This is based on Eric's recent works to support PCDIMM/NVDIMM device memory[1]. The kernel support for arm64 memory hot add was added only recently by Robin[2] and hence the guest

[Qemu-devel] [RFC PATCH 1/4] hw:acpi: Make ACPI IO address space configurable

2019-01-28 Thread Shameer Kolothum
This is in preparation for adding support for ARM64 platforms where it doesn't use port mapped IO for ACPI IO space. Also add a flag to identify hw reduced ACPI platforms as they might use GPIO hw for signaling ACPI platform events. Signed-off-by: Shameer Kolothum --- hw/acpi/memory_hotplug.c

Re: [Qemu-devel] [PATCH 2/3] XXX oslib-posix: Ignore fcntl("/dev/null", F_SETFL, O_NONBLOCK) failure

2019-01-28 Thread Paolo Bonzini
On 28/01/19 10:47, Alex Bennée wrote: >> >> [1] The fix seems https://github.com/openbsd/src/commit/c2a35b387f9d3c >> "fcntl(F_SETFL) invokes the FIONBIO and FIOASYNC ioctls internally, so >> the memory devices (/dev/null, /dev/zero, etc) need to permit them." > I assume set_nonblock is called

Re: [Qemu-devel] [PATCH 3/3] WIP tests/vm: Run tests on OpenBSD

2019-01-28 Thread Philippe Mathieu-Daudé
On 1/28/19 9:44 AM, Thomas Huth wrote: > On 2019-01-25 20:27, Philippe Mathieu-Daudé wrote: >> Signed-off-by: Philippe Mathieu-Daudé >> --- >> tests/vm/openbsd | 4 +--- >> 1 file changed, 1 insertion(+), 3 deletions(-) >> >> diff --git a/tests/vm/openbsd b/tests/vm/openbsd >> index

Re: [Qemu-devel] [PATCH 2/3] XXX oslib-posix: Ignore fcntl("/dev/null", F_SETFL, O_NONBLOCK) failure

2019-01-28 Thread Philippe Mathieu-Daudé
On 1/28/19 10:47 AM, Alex Bennée wrote: > > Philippe Mathieu-Daudé writes: > >> Previous to OpenBSD 6.3 [1], fcntl(F_SETFL) is not permitted on memory >> devices. Do not assert fcntl failures on OpenBSD. >> This fixes: >> >> $ lm32-softmmu/qemu-system-lm32 >> assertion "f != -1" failed:

Re: [Qemu-devel] [PATCH 2/3] XXX oslib-posix: Ignore fcntl("/dev/null", F_SETFL, O_NONBLOCK) failure

2019-01-28 Thread Philippe Mathieu-Daudé
On 1/28/19 7:22 AM, Markus Armbruster wrote: > Is the XXX in the subject meant to go on permanent record? The original plan was to rename it as NOTFORMERGE before sending but I forgot (late Friday). So the whole content of this patch isn't meant to go on perm record ;)

Re: [Qemu-devel] [PATCH 47/52] vfio: express vfio dependencies with Kconfig

2019-01-28 Thread Paolo Bonzini
On 25/01/19 21:00, Alex Williamson wrote: >> >> -config VFIO_SPAPR >> -bool >> -default y >> -depends on VFIO && LINUX && PSERIES > > I can't say I really understand what happened with this through the > course of the series. In patch 27 spapr.o became obj-y, VFIO_SPAPR > came

Re: [Qemu-devel] [PATCH 1/3] configure: Disable W^X on OpenBSD

2019-01-28 Thread Philippe Mathieu-Daudé
On 1/28/19 9:43 AM, Thomas Huth wrote: > On 2019-01-25 20:27, Philippe Mathieu-Daudé wrote: >> Since OpenBSD 6.0 [1], W^X is enforced by default [2]. >> TCG requires WX access. Disable W^X if it is available. >> This fixes: >> >> # lm32-softmmu/qemu-system-lm32 >> Could not allocate dynamic

[Qemu-devel] [PATCH] linux-user: fix emulation of accept4/getpeername/getsockname/recvfrom syscalls

2019-01-28 Thread Andreas Schwab
System calls that return a socket address do so by putting the possibly truncated address into the provided buffer space, but setting the addrlen parameter to the actual size of the address. To determine how much to copy back to the target memory the emulation needs to remember the old value of

Re: [Qemu-devel] [PATCH v5 1/2] hw/arm: Add arm SBSA reference machine, skeleton part

2019-01-28 Thread Peter Maydell
On Mon, 28 Jan 2019 at 10:16, Hongbo Zhang wrote: > > On Tue, 22 Jan 2019 at 19:42, Peter Maydell wrote: > > Comment says 256M but the size field says it's larger... > > > I calculated, 256M should be 0x1000, 7 zeros. Yes, you're right, this was my mistake. PS: sorry about the other blank

Re: [Qemu-devel] [PATCH v5 1/2] hw/arm: Add arm SBSA reference machine, skeleton part

2019-01-28 Thread Peter Maydell
On Mon, 28 Jan 2019 at 10:16, Hongbo Zhang wrote: > > On Tue, 22 Jan 2019 at 19:42, Peter Maydell wrote: > > > > On Fri, 7 Dec 2018 at 09:08, Hongbo Zhang wrote: > > > > > > For the Aarch64, there is one machine 'virt', it is primarily meant to > > > run on KVM and execute virtualization

Re: [Qemu-devel] of apci_1_compatible in CPUHotplugFeatures

2019-01-28 Thread Igor Mammedov
On Fri, 25 Jan 2019 14:49:28 -0500 "Michael S. Tsirkin" wrote: > On Fri, Jan 25, 2019 at 09:26:05AM +0100, Igor Mammedov wrote: > > On Wed, 23 Jan 2019 18:28:59 + > > "Dr. David Alan Gilbert" wrote: > > > > > * Michael S. Tsirkin (m...@redhat.com) wrote: > > > > On Tue, Jan 22, 2019 at

Re: [Qemu-devel] [PATCH] slirp: replace QEMU_BUILD_BUG_ON with G_STATIC_ASSERT

2019-01-28 Thread Samuel Thibault
Alex Bennée, le lun. 28 janv. 2019 10:35:37 +, a ecrit: > Samuel Thibault writes: > > > Signed-off-by: Samuel Thibault > > Is there a rationale as to why we should replace QEMU_BUILD_BUG_ON with > G_STATIC_ASSERT or is it particular to these QEMU_BUILD_BUG_ON > instances? It would be nice

Re: [Qemu-devel] Configuring pflash devices for OVMF firmware

2019-01-28 Thread Peter Maydell
On Fri, 25 Jan 2019 at 15:11, Markus Armbruster wrote: > (1) cfi.pflash01 isn't available with -device. > > (2) "Magic board code picks up the backend [created for -drive > if=pflash], creates a frontend (a cfi.pflash01 device), and maps it > into the guest's address space." When we

Re: [Qemu-devel] [PATCH] slirp: replace QEMU_BUILD_BUG_ON with G_STATIC_ASSERT

2019-01-28 Thread Alex Bennée
Samuel Thibault writes: > Signed-off-by: Samuel Thibault Is there a rationale as to why we should replace QEMU_BUILD_BUG_ON with G_STATIC_ASSERT or is it particular to these QEMU_BUILD_BUG_ON instances? It would be nice to have a little more context in the commit message. Otherwise the

[Qemu-devel] [PATCH] spice: set device address and device display ID in QXL interface

2019-01-28 Thread Lukáš Hrázký
Calls the new SPICE QXL interface function spice_qxl_set_device_info to set the hardware address of the graphics device represented by the QXL interface (e.g. a PCI path) and the device display IDs (the IDs of the device's monitors that belong to this QXL interface). Also stops using the

Re: [Qemu-devel] [PATCH] test-filter-mirror: pass UNIX domain socket through fd

2019-01-28 Thread Daniel P . Berrangé
On Mon, Jan 28, 2019 at 12:11:59PM +0800, Jason Wang wrote: > The tests tries to let qemu server mode to process the connection > which turns out to be racy after commit 8258292e18c3 ("monitor: Remove > "x-oob", offer capability "oob" unconditionally"). This is because the > filter may try to

Re: [Qemu-devel] [PATCH] hw/block: clean up stake xen_disk trace entries

2019-01-28 Thread Paul Durrant
Ping? I realize that I typo-ed the commit comment but, assuming that can be fixed, can I get an ack or otherwise on this? Thanks, Paul > -Original Message- > From: Paul Durrant [mailto:paul.durr...@citrix.com] > Sent: 22 January 2019 14:52 > To: qemu-devel@nongnu.org;

Re: [Qemu-devel] Booting Raspbian on RPi emulation

2019-01-28 Thread Peter Maydell
On Sun, 27 Jan 2019 at 23:13, BALATON Zoltan wrote: > On Sun, 27 Jan 2019, Peter Maydell wrote: > > Unfortunately I'm not sufficiently familiar with how OSX > > event handling works to figure out how to plumb it back in > > again. It ought to be a fairly simple matter of "implement > > whatever

Re: [Qemu-devel] [PATCH v5 1/2] hw/arm: Add arm SBSA reference machine, skeleton part

2019-01-28 Thread Hongbo Zhang
On Tue, 22 Jan 2019 at 19:42, Peter Maydell wrote: > > On Fri, 7 Dec 2018 at 09:08, Hongbo Zhang wrote: > > > > For the Aarch64, there is one machine 'virt', it is primarily meant to > > run on KVM and execute virtualization workloads, but we need an > > environment as faithful as possible to

[Qemu-devel] [Bug 1810603] Re: QEMU QCow Images grow dramatically

2019-01-28 Thread Lenny Helpline
> Looking at the file size isn't helpful. The 23 GB > are the space that is actually used. You can use 'du -h' > to confirm this, but I think it gets the number in the exact same way as > qemu-img. Are you sure about that? My OS complains that the disk is full. I can't even start any VM anymore.

Re: [Qemu-devel] [PATCH] gdbstub: Fix i386/x86_64 machine description and add control registers

2019-01-28 Thread Paolo Bonzini
On 24/01/19 21:29, Doug Gale wrote: > The machine description we send is being (silently) thrown on the floor > by GDB and GDB silently uses the default machine description. > > With current QEMU, if you debug gdb, and set debug_xml=1 and continue, > then attach to qemu gdbstub from the debugged

<    1   2   3   4   5   >