Re: [Qemu-devel] [PATCH] target/ppc: fix mtmsr instruction for icount

2018-11-06 Thread Pavel Dovgalyuk
> From: Richard Henderson [mailto:richard.hender...@linaro.org] > On 10/30/18 9:30 AM, Pavel Dovgalyuk wrote: > > This patch fixes processing of mtmsr instructions in icount mode. > > In this mode writing to interrupt/peripheral state is controlled > > by can_do_io flag. This flag must be set

Re: [Qemu-devel] [PATCH for-3.1] replay: Exit on errors reading from replay log

2018-11-06 Thread Pavel Dovgalyuk
> From: Peter Maydell [mailto:peter.mayd...@linaro.org] > Currently replay_get_byte() does not check for an error > from getc(). Coverity points out (CID 1390622) that this > could result in unexpected behaviour (such as looping > forever, if we use the replay_get_dword() return value > for a loop

[Qemu-devel] [PATCH] ui/gtk: fix cursor in egl mode

2018-11-06 Thread Gerd Hoffmann
In egl mode the scale_x and scale_y variables are not set, so the scaling logic in the mouse motion event handler does not work. Fix that. Also scale the cursor position in gd_egl_cursor_position(). Reported-by: Chen Zhang Signed-off-by: Gerd Hoffmann Tested-by: Chen Zhang --- ui/gtk-egl.c

[Qemu-devel] [PATCH] netdev: fix socket backend implementation and docs

2018-11-06 Thread Artem Pisarenko
Changes: - user documentation and QAPI 'NetdevSocketOptions' comments updated to match current implementation ('udp' type description added, 'fd' option separated to exclusive type and described, 'localaddr'-related description for 'mcast' type fixed, hostname parts in "[host]:port" options

Re: [Qemu-devel] [PATCH] block: Make more block drivers compile-time configurable

2018-11-06 Thread Markus Armbruster
Max Reitz writes: > On 05.11.18 16:25, Markus Armbruster wrote: >> Max Reitz writes: >> >>> On 19.10.18 13:34, Markus Armbruster wrote: From: Jeff Cody This adds configure options to control the following block drivers: * Bochs * Cloop * Dmg * Qcow (V1)

[Qemu-devel] [PATCH v2] block: Make more block drivers compile-time configurable

2018-11-06 Thread Markus Armbruster
From: Jeff Cody This adds configure options to control the following block drivers: * Bochs * Cloop * Dmg * Qcow (V1) * Vdi * Vvfat * qed * parallels * sheepdog Each of these defaults to being enabled. Signed-off-by: Jeff Cody Signed-off-by: Markus Armbruster --- v2: Fix handling of

Re: [Qemu-devel] [Qemu-block] [PATCH] tests: Fix Python 3 detection on older GNU make versions

2018-11-06 Thread Markus Armbruster
Eduardo Habkost writes: > The $(SHELLSTATUS) variable requires GNU make >= 4.2, but Travis > seems to provide an older version. Change the existing rules to > use command output instead of exit code, to make it compatible > with older GNU make versions. > > Signed-off-by: Eduardo Habkost > ---

Re: [Qemu-devel] [QEMU-PPC] [PATCH V3 0/3] ppc/spapr: Add support for nested kvm-hv

2018-11-06 Thread David Gibson
On Thu, Oct 11, 2018 at 05:16:06PM +1100, Suraj Jitindar Singh wrote: > This patch series adds the qemu support for running nested kvm-hv on a > POWER9 platform with appropriate hypervisor support and migration of > these guests. > That is, the ability to run kvm-hv guests as guests of an

Re: [Qemu-devel] [PATCH v2 2/2] spapr_pci: rename some structured types

2018-11-06 Thread David Gibson
On Mon, Oct 15, 2018 at 12:49:53PM +1100, Alexey Kardashevskiy wrote: > > > On 12/10/2018 20:05, Greg Kurz wrote: > > According to CODING_STYLE, structured types names are expected to be > > in CamelCase but we have: > > > > typedef struct spapr_pci_msi { > > uint32_t first_irq; > >

Re: [Qemu-devel] [PATCH] MAINTAINERS: PPC: Remove myself

2018-11-06 Thread David Gibson
On Tue, Oct 30, 2018 at 02:34:46PM +, Mark Cave-Ayland wrote: > On 30/10/2018 09:35, Alexander Graf wrote: > > > I haven't really been maintaining any PowerPC code for quite a while now, > > so let's reflect reality: David does all the work and embedded PPC is in > > "Odd Fixes" state rather

Re: [Qemu-devel] [PATCH for-3.1] hw/ppc/ppc440_uc: Remove dead code in sdram_size()

2018-11-06 Thread David Gibson
On Tue, Oct 30, 2018 at 05:03:53PM +, Peter Maydell wrote: > Coverity points out in CID 1390588 that the test for sh == 0 > in sdram_size() can never fire, because we calculate sh with > sh = 1024 - ((bcr >> 6) & 0x3ff); > which must result in a value between 1 and 1024 inclusive. > >

Re: [Qemu-devel] [PATCH v2 10/10] spapr_pci: perform unplug via the hotplug handler

2018-11-06 Thread David Gibson
On Mon, Nov 05, 2018 at 11:20:44AM +0100, David Hildenbrand wrote: > Introduce and use the "unplug" callback. > > This is a preparation for multi-stage hotplug handlers, whereby the bus > hotplug handler is overwritten by the machine hotplug handler. This handler > will then pass control to the

Re: [Qemu-devel] [PULL 0/8] Monitor patches for 2018-10-30

2018-11-06 Thread Peter Xu
On Tue, Nov 06, 2018 at 04:56:51PM +0100, Markus Armbruster wrote: > Peter Maydell writes: > > > On 30 October 2018 at 19:16, Markus Armbruster wrote: > >> The following changes since commit > >> 3f3285491dd52014852a56135c90e428c8b507ea: > >> > >> Merge remote-tracking branch

Re: [Qemu-devel] [PATCH v2 0/5] migration: improve multithreads

2018-11-06 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20181106122025.3487-1-xiaoguangr...@tencent.com Subject: [Qemu-devel] [PATCH v2 0/5] migration: improve multithreads === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1

Re: [Qemu-devel] [PATCH] MAINTAINERS: PPC: Remove myself

2018-11-06 Thread David Gibson
On Tue, Oct 30, 2018 at 10:35:31AM +0100, Alexander Graf wrote: > I haven't really been maintaining any PowerPC code for quite a while now, > so let's reflect reality: David does all the work and embedded PPC is in > "Odd Fixes" state rather than supported now. > > Signed-off-by: Alexander Graf

Re: [Qemu-devel] [PATCH] gtk: Fix mouse offset in scaled gtk-gl display for VFIO/iGVT-g DMA Buf mode

2018-11-06 Thread Chen Zhang via Qemu-devel
Yes, this patch just works. Thank you. Best regards On Nov 06, 2018, at 08:22 PM, Gerd Hoffmann wrote: On Wed, Oct 31, 2018 at 06:24:56AM +, Chen Zhang wrote: The issue was reported as in https://bugs.launchpad.net/qemu/+bug/1793859 When an OpenGL accelerated GTK window is used for

Re: [Qemu-devel] [PATCH v2 09/10] pci/shpc: perform unplug via the hotplug handler

2018-11-06 Thread David Gibson
On Mon, Nov 05, 2018 at 11:20:43AM +0100, David Hildenbrand wrote: > Introduce and use the "unplug" callback. > > This is a preparation for multi-stage hotplug handlers, whereby the bus > hotplug handler is overwritten by the machine hotplug handler. This handler > will then pass control to the

Re: [Qemu-devel] [PATCH v2 08/10] pci/pcie: perform unplug via the hotplug handler

2018-11-06 Thread David Gibson
On Mon, Nov 05, 2018 at 11:20:42AM +0100, David Hildenbrand wrote: > Introduce and use the "unplug" callback. > > This is a preparation for multi-stage hotplug handlers, whereby the bus > hotplug handler is overwritten by the machine hotplug handler. This handler > will then pass control to the

Re: [Qemu-devel] [PATCH v3 26/35] target/riscv: Remove shift and slt insn manual decoding

2018-11-06 Thread Palmer Dabbelt
On Mon, 05 Nov 2018 09:00:10 PST (-0800), Bastian Koppelmann wrote: On 11/1/18 4:59 PM, Palmer Dabbelt wrote: On Wed, 31 Oct 2018 15:38:08 PDT (-0700), richard.hender...@linaro.org wrote: On 10/31/18 1:20 PM, Bastian Koppelmann wrote:  static bool trans_slt(DisasContext *ctx, arg_slt *a)  {

[Qemu-devel] [PATCH] 9p: write lock path in v9fs_co_open2()

2018-11-06 Thread Greg Kurz
The assumption that the fid cannot be used by any other operation is wrong. At least, nothing prevents a misbehaving client to create a file with a given fid, and to pass this fid to some other operation at the same time (ie, without waiting for the response to the creation request). The call to

Re: [Qemu-devel] [PATCH v2 04/10] pci/pcie: stop plug/unplug if the slot is locked

2018-11-06 Thread David Gibson
On Mon, Nov 05, 2018 at 11:20:38AM +0100, David Hildenbrand wrote: > We better stop right away. While at it, properly move the check > to the pre_plug handler. > > Reviewed-by: Igor Mammedov > Signed-off-by: David Hildenbrand Reviewed-by: David Gibson Although I'm not sure the commit message

Re: [Qemu-devel] [PATCH v1 1/1] riscv: spike: Fix memory leak in the board init

2018-11-06 Thread Palmer Dabbelt
On Mon, 05 Nov 2018 11:44:41 PST (-0800), Alistair Francis wrote: Coverity caught a malloc() call that was never freed. This patch ensures that we free the memory but also updates the allocation to use g_strdup_printf() instead of malloc(). Signed-off-by: Alistair Francis Suggested-by: Peter

Re: [Qemu-devel] [PATCH 7/7] qcow2: do decompression in threads

2018-11-06 Thread Paolo Bonzini
On 01/11/2018 19:27, Vladimir Sementsov-Ogievskiy wrote: > -/* See qcow2_compress definition for parameters description */ > -static ssize_t qcow2_co_compress(BlockDriverState *bs, > - void *dest, size_t dest_size, > - const void

Re: [Qemu-devel] [PATCH v2 1/6] move ObjectClass to typedefs.h

2018-11-06 Thread David Gibson
On Tue, Nov 06, 2018 at 11:23:30AM +0100, Gerd Hoffmann wrote: > Signed-off-by: Gerd Hoffmann Reviewed-by: David Gibson > --- > include/qemu/typedefs.h | 1 + > include/qom/object.h| 1 - > 2 files changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/qemu/typedefs.h

Re: [Qemu-devel] [PULL 12/15] Acceptance tests: add make rule for running them

2018-11-06 Thread Paolo Bonzini
On 31/10/2018 01:31, Eduardo Habkost wrote: > From: Cleber Rosa > > The acceptance (aka functional, aka Avocado-based) tests are > Python files located in "tests/acceptance" that need to be run > with the Avocado libs and test runner. > > Let's provide a convenient way for QEMU developers to

Re: [Qemu-devel] List of files containing devices which have not been QOMified

2018-11-06 Thread Paolo Bonzini
On 07/11/2018 00:05, Peter Maydell wrote: > On 6 November 2018 at 19:46, Paolo Bonzini wrote: >> On 06/11/2018 19:43, Peter Maydell wrote: >>> hw/core/ptimer.c >> >> Not a device. > > Indeed not, but it could be a QOM object I guess (would > that gain us anything?) I don't know, it seems to me

Re: [Qemu-devel] [PATCH for-3.1 3/4] slirp: Remove code that handles socreate() failure

2018-11-06 Thread Samuel Thibault
Peter Maydell, le mar. 06 nov. 2018 15:13:22 +, a ecrit: > Now that socreate() can never fail, we can remove the code > that was trying to handle that situation. > > In particular this removes code in tcp_connect() that > provoked Coverity to complain (CID 1005724): in >

Re: [Qemu-devel] [PULL 00/17] Misc patches for QEMU 3.1 hard freeze (?)

2018-11-06 Thread Peter Maydell
On 6 November 2018 at 21:37, Paolo Bonzini wrote: > The following changes since commit fc3d1bad1edf08871275cf469a64e12dae4eba96: > > oslib-posix: Use MAP_STACK in qemu_alloc_stack() on OpenBSD (2018-11-06 > 10:52:23 +) > > are available in the git repository at: > >

Re: [Qemu-devel] [PATCH for-3.1 4/4] slirp: fork_exec(): create and connect child socket before fork()

2018-11-06 Thread Samuel Thibault
Peter Maydell, le mar. 06 nov. 2018 15:13:23 +, a ecrit: > Currently fork_exec() fork()s, and then creates and connects the > child socket which it uses for communication with the parent in > the child process. This is awkward because the child has no > mechanism to report failure back to the

Re: [Qemu-devel] [PATCH v2 2/6] add QemuSupportState

2018-11-06 Thread Paolo Bonzini
On 06/11/2018 15:26, Eduardo Habkost wrote: > On Tue, Nov 06, 2018 at 11:23:31AM +0100, Gerd Hoffmann wrote: >> Indicates support state for something (device, backend, subsystem, ...) >> in qemu. Add QemuSupportState field to ObjectClass. Add some support >> code. >> >> TODO: wire up to

Re: [Qemu-devel] [PATCH for-3.1 2/4] slirp: Use g_new() to allocate sockets in socreate()

2018-11-06 Thread Samuel Thibault
Peter Maydell, le mar. 06 nov. 2018 15:13:21 +, a ecrit: > The slirp socreate() function can only fail if the attempt > to malloc() the struct socket fails. Switch to using > g_new() instead, which will allow us to remove the > error-handling code from its callers. > > Signed-off-by: Peter

Re: [Qemu-devel] List of files containing devices which have not been QOMified

2018-11-06 Thread Peter Maydell
On 6 November 2018 at 19:16, Philippe Mathieu-Daudé wrote: > On 6/11/18 19:43, Peter Maydell wrote: >> >> I had an idea for how to get a rough list of source files >> containing devices that haven't been QOMified. The theory >> is that a pre-QOM device generally has an "init" function >> which

Re: [Qemu-devel] List of files containing devices which have not been QOMified

2018-11-06 Thread Peter Maydell
On 6 November 2018 at 19:46, Paolo Bonzini wrote: > On 06/11/2018 19:43, Peter Maydell wrote: >> hw/core/ptimer.c > > Not a device. Indeed not, but it could be a QOM object I guess (would that gain us anything?) >> hw/i2c/bitbang_i2c.c > > TYPE_GPIO_I2C? That part is, but bitbang_i2c_init()

Re: [Qemu-devel] [PATCH for-3.1 1/4] slirp: Don't pass possibly -1 fd to send()

2018-11-06 Thread Samuel Thibault
Peter Maydell, le mar. 06 nov. 2018 15:13:20 +, a ecrit: > Coverity complains (CID 1005726) that we might pass -1 as the fd > argument to send() in slirp_send(), because we previously checked for > "so->s == -1 && so->extra". The case of "so->s == -1 but so->extra > NULL" should not in theory

Re: [Qemu-devel] [Qemu-block] ping Re: [PATCH v4 00/11] backup-top filter driver for backup

2018-11-06 Thread John Snow
On 11/06/2018 12:21 PM, Kevin Wolf wrote: > Am 02.11.2018 um 17:41 hat Vladimir Sementsov-Ogievskiy geschrieben: >> ping >> >> 15.10.2018 19:06, Vladimir Sementsov-Ogievskiy wrote: >>> Hi all! >>> >>> These series introduce backup-top driver. It's a filter-node, which >>> do copy-before-write

Re: [Qemu-devel] [PATCH for-3.1] replay: Exit on errors reading from replay log

2018-11-06 Thread Paolo Bonzini
On 06/11/2018 16:33, Peter Maydell wrote: > Currently replay_get_byte() does not check for an error > from getc(). Coverity points out (CID 1390622) that this > could result in unexpected behaviour (such as looping > forever, if we use the replay_get_dword() return value > for a loop count). We

[Qemu-devel] [PULL 07/17] memory: learn about non-volatile memory region

2018-11-06 Thread Paolo Bonzini
From: Marc-André Lureau Add a new flag to mark memory region that are used as non-volatile, by NVDIMM for example. That bit is propagated down to the flat view, and reflected in HMP info mtree with a "nv-" prefix on the memory type. This way, guest_phys_blocks_region_add() can skip the NV

[Qemu-devel] [PULL 08/17] nvdimm: set non-volatile on the memory region

2018-11-06 Thread Paolo Bonzini
From: Marc-André Lureau qemu-system-x86_64 -machine pc,nvdimm -m 2G,slots=4,maxmem=16G -enable-kvm -monitor stdio -object memory-backend-file,id=mem1,share=on,mem-path=/tmp/foo,size=1G -device nvdimm,id=nvdimm1,memdev=mem1 HMP info mtree command reflects the flag with "nv-" prefix on memory

Re: [Qemu-devel] [PATCH v4 00/16] gdbstub: support for the multiprocess extension

2018-11-06 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20181106110548.4209-1-luc.mic...@greensocs.com Subject: [Qemu-devel] [PATCH v4 00/16] gdbstub: support for the multiprocess extension === TEST SCRIPT BEGIN === #!/bin/bash

[Qemu-devel] [PULL 04/17] ivshmem: fix memory backend leak

2018-11-06 Thread Paolo Bonzini
From: Igor Mammedov object_new() returns a new backend with refcount == 1 and then later object_property_add_child() increases refcount to 2 So when ivshmem is destroyed, the backend it has created isn't destroyed along with it as children cleanup will bring backend's refcount only to 1, which

[Qemu-devel] [PULL 15/17] scsi-generic: do not do VPD emulation for sense other than ILLEGAL_REQUEST

2018-11-06 Thread Paolo Bonzini
Pass other sense, such as UNIT_ATTENTION or BUSY, directly to the guest. Reported-by: Max Reitz Signed-off-by: Paolo Bonzini --- hw/scsi/scsi-generic.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/scsi/scsi-generic.c b/hw/scsi/scsi-generic.c index

[Qemu-devel] [PULL 10/17] scripts/dump-guest-memory: Synchronize with guest_phys_blocks_region_add

2018-11-06 Thread Paolo Bonzini
Recent patches have removed ram_device and nonvolatile RAM from dump-guest-memory's output. Do the same for dumps that are extracted from a QEMU core file. Reviewed-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- scripts/dump-guest-memory.py | 4 +++- 1 file changed, 3 insertions(+), 1

[Qemu-devel] [PULL 01/17] icount: fix deadlock when all cpus are sleeping

2018-11-06 Thread Paolo Bonzini
From: Clement Deschamps When all cpus are sleeping (e.g in WFI), to avoid a deadlock in the main_loop, wake it up in order to start the warp timer. Signed-off-by: Clement Deschamps Message-Id: <20181021142103.19014-1-clement.descha...@greensocs.com> Signed-off-by: Paolo Bonzini --- cpus.c |

[Qemu-devel] [PULL 09/17] memory-mapping: skip non-volatile memory regions in GuestPhysBlockList

2018-11-06 Thread Paolo Bonzini
From: Marc-André Lureau GuestPhysBlockList is currently used to produce dumps. Given the size and the typical usage of NVDIMM for storage, they are not a good idea to have in the dumps. We may want to have an extra dump option to include them. For now, skip non-volatile regions. The TCG memory

[Qemu-devel] [PULL 17/17] util/qemu-thread-posix: Fix qemu_thread_atexit* for OSX

2018-11-06 Thread Paolo Bonzini
From: Peter Maydell Our current implementation of qemu_thread_atexit* is broken on OSX. This is because it works by cerating a piece of thread-specific data with pthread_key_create() and using the destructor function for that data to run the notifier function passed to it by the caller of

[Qemu-devel] [PULL 11/17] lsi53c895a: check message length value is valid

2018-11-06 Thread Paolo Bonzini
From: Prasad J Pandit While writing a message in 'lsi_do_msgin', message length value in 'msg_len' could be invalid due to an invalid migration stream. Add an assertion to avoid an out of bounds access, and reject the incoming migration data if it contains an invalid message length. Discovered

[Qemu-devel] [PULL 16/17] include/qemu/thread.h: Document qemu_thread_atexit* API

2018-11-06 Thread Paolo Bonzini
From: Peter Maydell Add documentation for the qemu_thread_atexit_add() and qemu_thread_atexit_remove() functions. We include a (previously undocumented) constraint that notifiers may not be called if a thread is exiting because the entire process is exiting. This is fine for our current use

[Qemu-devel] [PULL 02/17] x86: hv_evmcs CPU flag support

2018-11-06 Thread Paolo Bonzini
From: Vitaly Kuznetsov Adds a new CPU flag to enable the Enlightened VMCS KVM feature. QEMU enables KVM_CAP_HYPERV_ENLIGHTENED_VMCS and gets back the version to be advertised in lower 16 bits of CPUID.0x400A:EAX. Suggested-by: Ladi Prosek Signed-off-by: Vitaly Kuznetsov Message-Id:

[Qemu-devel] [PULL 13/17] scsi-generic: avoid out-of-bounds access to VPD page list

2018-11-06 Thread Paolo Bonzini
A device can report an excessive number of VPD pages when asked for a list; this can cause an out-of-bounds access to buf in scsi_generic_set_vpd_bl_emulation. It should not happen, but it is technically not incorrect so handle it: do not check any byte past the allocation length that was sent to

[Qemu-devel] [PULL 06/17] target/i386: Clear RF on SYSCALL instruction

2018-11-06 Thread Paolo Bonzini
From: Rudolf Marek Fix the SYSCALL instruction in 64-bit (long mode). The RF flag should be cleared in R11 as well as in the RFLAGS. Intel and AMD CPUs behave same. AMD has this documented in the APM vol 3. Signed-off-by: Roman Kapl Signed-off-by: Rudolf Marek Message-Id:

[Qemu-devel] [PULL 00/17] Misc patches for QEMU 3.1 hard freeze (?)

2018-11-06 Thread Paolo Bonzini
The following changes since commit fc3d1bad1edf08871275cf469a64e12dae4eba96: oslib-posix: Use MAP_STACK in qemu_alloc_stack() on OpenBSD (2018-11-06 10:52:23 +) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for you to fetch changes up to

[Qemu-devel] [PULL 14/17] scsi-generic: avoid invalid access to struct when emulating block limits

2018-11-06 Thread Paolo Bonzini
Emulation of the block limits VPD page called back into scsi-disk.c, which however expected the request to be for a SCSIDiskState and accessed a scsi-generic device outside the bounds of its struct (namely to retrieve s->max_unmap_size and s->max_io_size). To avoid this, move the emulation code

[Qemu-devel] [PULL 05/17] MAINTAINERS: remove or downgrade myself to reviewer from some subsystems

2018-11-06 Thread Paolo Bonzini
Other people are doing a much better work than myself at handling some subsystems. For those files it is better if I downgrade myself to reviewer or recognize that I am not actually doing any work there. Cc: Daniel P. Berrange Cc: Gerd Hoffmann Cc: Eric Blake Cc: Thomas Huth Cc: Laurent

[Qemu-devel] [PULL 12/17] scsi-generic: keep VPD page list sorted

2018-11-06 Thread Paolo Bonzini
Block limits emulation is just placing 0xb0 as the final byte of the VPD pages list. However, VPD page numbers must be sorted, so change that to an in-place insert. Since I couldn't find any disk that triggered the loop more than once, this was tested by adding manually 0xb1 at the end of the

[Qemu-devel] [PULL 03/17] i386: clarify that the Q35 machine type implements a P35 chipset

2018-11-06 Thread Paolo Bonzini
From: Daniel P. Berrangé The 'q35' machine type implements an Intel Series 3 chipset, of which there are several variants: https://www.intel.com/Assets/PDF/datasheet/316966.pdf The key difference between the 82P35 MCH ('p35', PCI device ID 0x29c0) and 82Q35 GMCH ('q35', PCI device ID 0x29b0)

Re: [Qemu-devel] List of files containing devices which have not been QOMified

2018-11-06 Thread Paolo Bonzini
On 06/11/2018 22:23, John Snow wrote: > > > On 11/06/2018 02:46 PM, Paolo Bonzini wrote: >> On 06/11/2018 19:43, Peter Maydell wrote: > >>> hw/ide/ahci.c >> >> Even though AHCIState is not a QOM object, all of its users are >> (TYPE_SYSBUS_AHCI is in this file, TYPE_ICH9_AHCI is in

Re: [Qemu-devel] List of files containing devices which have not been QOMified

2018-11-06 Thread John Snow
On 11/06/2018 02:46 PM, Paolo Bonzini wrote: > On 06/11/2018 19:43, Peter Maydell wrote: >> hw/ide/ahci.c > > Even though AHCIState is not a QOM object, all of its users are > (TYPE_SYSBUS_AHCI is in this file, TYPE_ICH9_AHCI is in hw/ide/ich.c). > Yeah, if there's something *further* that

Re: [Qemu-devel] List of files containing devices which have not been QOMified

2018-11-06 Thread Alistair Francis
On Tue, Nov 6, 2018 at 11:47 AM Paolo Bonzini wrote: > > On 06/11/2018 19:43, Peter Maydell wrote: > > hw/core/ptimer.c > > Not a device. > > > hw/i2c/bitbang_i2c.c > > TYPE_GPIO_I2C? > > > hw/ide/ahci.c > > Even though AHCIState is not a QOM object, all of its users are > (TYPE_SYSBUS_AHCI is in

Re: [Qemu-devel] List of files containing devices which have not been QOMified

2018-11-06 Thread Paolo Bonzini
On 06/11/2018 19:43, Peter Maydell wrote: > hw/core/ptimer.c Not a device. > hw/i2c/bitbang_i2c.c TYPE_GPIO_I2C? > hw/ide/ahci.c Even though AHCIState is not a QOM object, all of its users are (TYPE_SYSBUS_AHCI is in this file, TYPE_ICH9_AHCI is in hw/ide/ich.c). Paolo

Re: [Qemu-devel] List of files containing devices which have not been QOMified

2018-11-06 Thread Paolo Bonzini
On 06/11/2018 19:43, Peter Maydell wrote: > hw/pci/shpc.c ? This is not a device, it is a PCI capability. Paolo

Re: [Qemu-devel] List of files containing devices which have not been QOMified

2018-11-06 Thread Philippe Mathieu-Daudé
On 6/11/18 19:43, Peter Maydell wrote: I had an idea for how to get a rough list of source files containing devices that haven't been QOMified. The theory is that a pre-QOM device generally has an "init" function which allocates memory for the device struct. So looking in hw/ for files which

Re: [Qemu-devel] [PATCH v4] lsi_scsi: Reselection needed to remove pending commands from queue

2018-11-06 Thread Paolo Bonzini
On 06/11/2018 20:13, george kennedy wrote: > > On 11/6/2018 1:58 PM, Paolo Bonzini wrote: >> On 31/10/2018 22:03, George Kennedy wrote: >>> +#define SCRIPTS_LOAD_AND_STORE  0xe2340004 >> I'm very confused.  Why did this constant reappear? > > Ok. Me too. > > What are you proposing instead and

Re: [Qemu-devel] [PATCH v4] lsi_scsi: Reselection needed to remove pending commands from queue

2018-11-06 Thread george kennedy
On 11/6/2018 1:58 PM, Paolo Bonzini wrote: On 31/10/2018 22:03, George Kennedy wrote: +#define SCRIPTS_LOAD_AND_STORE 0xe2340004 I'm very confused. Why did this constant reappear? Ok. Me too. What are you proposing instead and I'll change it to that? Did I have what you're after in a

Re: [Qemu-devel] [PATCH] MAINTAINERS: Add an entry for the 'collie' machine

2018-11-06 Thread Peter Maydell
On 6 November 2018 at 18:52, Thomas Huth wrote: > On 2018-11-06 19:49, Philippe Mathieu-Daudé wrote: >> On 6/11/18 19:17, Thomas Huth wrote: >>> There is no active maintainer, but since Peter is picking up >>> patches via qemu-...@nongnu.org, I think we could at least use >>> "Odd Fixes" as

Re: [Qemu-devel] [PATCH v4] lsi_scsi: Reselection needed to remove pending commands from queue

2018-11-06 Thread Paolo Bonzini
On 31/10/2018 22:03, George Kennedy wrote: > +#define SCRIPTS_LOAD_AND_STORE 0xe2340004 I'm very confused. Why did this constant reappear? Paolo

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

2018-11-06 Thread Paolo Bonzini
On 06/11/2018 15:52, Thomas Huth wrote: > The bluetooth subsystem is completely unmaintained, so if Paolo does not > want to pick it up through his "misc" tree, maybe Peter could apply this > patch directly? Or maybe it could go through the trivial tree since it > does not look very complicated?

Re: [Qemu-devel] [PATCH 0/4] scsi-generic: fixes for Block Limits emulation

2018-11-06 Thread Paolo Bonzini
On 06/11/2018 16:54, Daniel Henrique Barboza wrote: > Hi, > > How did you find all those issues, Max? First patch is something that > I missed out from the SCSI spec (ordering of the VPD pages) > and could have been detected by code inspection,  but I am curious about > the other fixes. It was

Re: [Qemu-devel] [PATCH] MAINTAINERS: Add an entry for the 'collie' machine

2018-11-06 Thread Thomas Huth
On 2018-11-06 19:49, Philippe Mathieu-Daudé wrote: > On 6/11/18 19:17, Thomas Huth wrote: >> There is no active maintainer, but since Peter is picking up >> patches via qemu-...@nongnu.org, I think we could at least use >> "Odd Fixes" as status here. > > This looks more as "Orphan" to me... I'll

Re: [Qemu-devel] [PATCH] MAINTAINERS: Add an entry for the 'collie' machine

2018-11-06 Thread Philippe Mathieu-Daudé
On 6/11/18 19:17, Thomas Huth wrote: There is no active maintainer, but since Peter is picking up patches via qemu-...@nongnu.org, I think we could at least use "Odd Fixes" as status here. This looks more as "Orphan" to me... Regardless the one choosed: Reviewed-by: Philippe Mathieu-Daudé

[Qemu-devel] List of files containing devices which have not been QOMified

2018-11-06 Thread Peter Maydell
I had an idea for how to get a rough list of source files containing devices that haven't been QOMified. The theory is that a pre-QOM device generally has an "init" function which allocates memory for the device struct. So looking in hw/ for files which call g_new*() or g_malloc*() should get us

[Qemu-devel] [PATCH v2 for-3.1] hw/arm/sysbus-fdt: Only call match_fn callback if the type matches

2018-11-06 Thread Eric Auger
Commit af7d64ede0b9 (hw/arm/sysbus-fdt: Allow device matching with DT compatible value) introduced a match_fn callback which gets called for each registered combo to check whether a sysbus device can be dynamically instantiated. However the callback gets called even if the device type does not

Re: [Qemu-devel] [PULL v2 0/3] Monitor patches for 2018-10-30

2018-11-06 Thread Peter Maydell
On 6 November 2018 at 17:39, Markus Armbruster wrote: > The following changes since commit 0ca70f19c010ccf0b10cf7cc1d2b9a87193fe787: > > tests: Fix Python 3 detection on older GNU make versions (2018-11-06 > 14:58:13 +) > > are available in the Git repository at: > >

[Qemu-devel] [PATCH] MAINTAINERS: Add an entry for the 'collie' machine

2018-11-06 Thread Thomas Huth
There is no active maintainer, but since Peter is picking up patches via qemu-...@nongnu.org, I think we could at least use "Odd Fixes" as status here. Signed-off-by: Thomas Huth --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index

Re: [Qemu-devel] [PATCH v4 04/11] block: improve should_update_child

2018-11-06 Thread Kevin Wolf
Am 15.10.2018 um 18:06 hat Vladimir Sementsov-Ogievskiy geschrieben: > As it already said in the comment, we don't want to create loops in > parent->child relations. So, when we try to append @to to @c, we should > check that @c is not in @to children subtree, and we should check it > recursively,

Re: [Qemu-devel] [PATCH v4 03/11] block: allow serialized reads to intersect

2018-11-06 Thread Kevin Wolf
Am 15.10.2018 um 18:06 hat Vladimir Sementsov-Ogievskiy geschrieben: > Otherwise, if we have serialized read-part in copy_range from backing > file to its parent if CoW take place, this CoW's sub-reads will > intersect with firstly created serialized read request. > > Anyway, reads should not

[Qemu-devel] [PULL v2 0/3] Monitor patches for 2018-10-30

2018-11-06 Thread Markus Armbruster
The following changes since commit 0ca70f19c010ccf0b10cf7cc1d2b9a87193fe787: tests: Fix Python 3 detection on older GNU make versions (2018-11-06 14:58:13 +) are available in the Git repository at: git://repo.or.cz/qemu/armbru.git tags/pull-monitor-2018-10-30-v2 for you to fetch

[Qemu-devel] [PULL v2 2/3] monitor: delay monitor iothread creation

2018-11-06 Thread Markus Armbruster
From: Wolfgang Bumiller Commit d32749deb615 moved the call to monitor_init_globals() to before os_daemonize(), making it an unsuitable place to spawn the monitor iothread as it won't be inherited over the fork() in os_daemonize(). We now spawn the thread the first time we instantiate a monitor

[Qemu-devel] [PULL v2 3/3] vl: Avoid crash when -mon is underspecified

2018-11-06 Thread Markus Armbruster
From: Eric Blake A quick coredump on an incomplete command line: ./x86_64-softmmu/qemu-system-x86_64 -mon mode=control,pretty=on #0 0x7723d9e4 in g_str_hash () at /lib64/libglib-2.0.so.0 #1 0x7723ce38 in g_hash_table_lookup () at /lib64/libglib-2.0.so.0 #2

[Qemu-devel] [PULL v2 1/3] monitor: guard iothread access by mon->use_io_thread

2018-11-06 Thread Markus Armbruster
From: Wolfgang Bumiller monitor_resume() and monitor_suspend() both want to "kick" the I/O thread if it is there, but in monitor_suspend() lacked the use_io_thread flag condition. This is required when we later only spawn the thread on first use. Signed-off-by: Wolfgang Bumiller Reviewed-by:

Re: [Qemu-devel] [PULL 1/1] update seabios to master snapshot

2018-11-06 Thread Stefan Berger
On 11/6/18 6:28 AM, Gerd Hoffmann wrote: seabios 1.12 release is planned for november. update seabios to a master branch snapshot so it gets more testing and to make the delta smaller when updating to -final during freeze. git shortlog rel-1.11.2..14221cd86e ===

Re: [Qemu-devel] [PATCH for-3.1] target/arm: Remove workaround for small SAU regions

2018-11-06 Thread Philippe Mathieu-Daudé
On 6/11/18 17:38, Peter Maydell wrote: Before we supported direct execution from MMIO regions, we implemented workarounds in commit 720424359917887c926a33d2 which let us avoid doing so, even if the SAU or MPU region was less than page-sized. Once we implemented execute-from-MMIO, we removed

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

2018-11-06 Thread Kevin Wolf
Am 15.10.2018 um 18:06 hat Vladimir Sementsov-Ogievskiy geschrieben: > 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 requests, so their handling is

Re: [Qemu-devel] ping Re: [PATCH v4 00/11] backup-top filter driver for backup

2018-11-06 Thread Kevin Wolf
Am 02.11.2018 um 17:41 hat Vladimir Sementsov-Ogievskiy geschrieben: > ping > > 15.10.2018 19:06, Vladimir Sementsov-Ogievskiy wrote: > > Hi all! > > > > These series introduce backup-top driver. It's a filter-node, which > > do copy-before-write operation. Mirror uses filter-node for handling >

Re: [Qemu-devel] ping2 Re: [PATCH 0/2] replication: drop extra sync

2018-11-06 Thread Kevin Wolf
Am 31.10.2018 um 10:30 hat Vladimir Sementsov-Ogievskiy geschrieben: > ping2 > > Hi, it's a first step to backup refactoring and improving. Just get rid > of this extra and unnatural synchronization. The replication maintainers don't seem to have an opinion about this, so thanks, applied to

Re: [Qemu-devel] [PATCH v3 0/4] Adding LZFSE compression support for DMG block driver.

2018-11-06 Thread Kevin Wolf
Am 05.11.2018 um 16:08 hat Julio Faracco geschrieben: > Since Mac OS X El Capitain (v10.11), Apple uses LZFSE compression to > generate compressed DMGs as an alternative to BZIP2. Possible, Apple > want to keep this algorithm as default in long term. Some years ago, > Apple opened the LZFSE

Re: [Qemu-devel] [PATCH] blockdev: handle error on block latency histogram set error

2018-11-06 Thread Kevin Wolf
Am 05.11.2018 um 04:04 hat zhenwei pi geschrieben: > Function block_latency_histogram_set may return error, but qapi ignore this. > This can be reproduced easily by qmp command: > virsh qemu-monitor-command INSTANCE > '{"execute":"x-block-latency-histogram-set", >

Re: [Qemu-devel] [PATCH for-3.1] blockdev: Consistently use snapshot_node_name in external_snapshot_prepare()

2018-11-06 Thread Kevin Wolf
Am 01.11.2018 um 17:30 hat Peter Maydell geschrieben: > In the function external_snapshot_prepare() we have a > BlockdevSnapshotSync struct, which has the usual combination > of has_snapshot_node_name and snapshot_node_name fields for an > optional field. We set up a local variable > const

[Qemu-devel] [PATCH for-3.1] target/arm: Remove antique TODO comment

2018-11-06 Thread Peter Maydell
Remove a TODO comment about implementing the vectored interrupt controller. We have had an implementation of that for a decade; it's in hw/intc/pl190.c. Signed-off-by: Peter Maydell --- target/arm/helper.c | 1 - 1 file changed, 1 deletion(-) diff --git a/target/arm/helper.c

[Qemu-devel] [PATCH for-3.1] target/arm: Remove workaround for small SAU regions

2018-11-06 Thread Peter Maydell
Before we supported direct execution from MMIO regions, we implemented workarounds in commit 720424359917887c926a33d2 which let us avoid doing so, even if the SAU or MPU region was less than page-sized. Once we implemented execute-from-MMIO, we removed part of those workarounds in commit

Re: [Qemu-devel] [Qemu-block] [PATCH 6/7] qcow2: aio support for compressed cluster read

2018-11-06 Thread Vladimir Sementsov-Ogievskiy
06.11.2018 18:30, Alberto Garcia wrote: > On Tue 06 Nov 2018 04:13:58 PM CET, Vladimir Sementsov-Ogievskiy wrote: >> 06.11.2018 18:06, Alberto Garcia wrote: >>> On Thu 01 Nov 2018 07:27:37 PM CET, Vladimir Sementsov-Ogievskiy wrote: >>> +buf = g_try_malloc(csize); +if (!buf) {

Re: [Qemu-devel] [PULL 02/33] tests: Move tests/hex-loader-check-data/ to tests/data/hex-loader/

2018-11-06 Thread Laurent Vivier
On 06/11/2018 16:15, Philippe Mathieu-Daudé wrote: > On 6/11/18 15:13, Michael S. Tsirkin wrote: >> On Tue, Nov 06, 2018 at 02:27:18PM +0100, Philippe Mathieu-Daudé wrote: >>> On 5/11/18 19:14, Michael S. Tsirkin wrote: From: Peter Maydell Currently tests/hex-loader-check-data

[Qemu-devel] [PATCH 1/1] virtio-blk: rename iov to out_iov in virtio_blk_handle_request()

2018-11-06 Thread Dongli Zhang
In virtio_blk_handle_request(), in_iov is used for input header while iov is used for output header. Rename iov to out_iov to pair output header's name with in_iov to avoid confusing people when reading source code. Signed-off-by: Dongli Zhang --- hw/block/virtio-blk.c | 8 1 file

Re: [Qemu-devel] [PULL 02/33] tests: Move tests/hex-loader-check-data/ to tests/data/hex-loader/

2018-11-06 Thread Michael S. Tsirkin
On Tue, Nov 06, 2018 at 04:15:03PM +0100, Philippe Mathieu-Daudé wrote: > On 6/11/18 15:13, Michael S. Tsirkin wrote: > > On Tue, Nov 06, 2018 at 02:27:18PM +0100, Philippe Mathieu-Daudé wrote: > > > On 5/11/18 19:14, Michael S. Tsirkin wrote: > > > > From: Peter Maydell > > > > > > > >

Re: [Qemu-devel] [PULL 02/33] tests: Move tests/hex-loader-check-data/ to tests/data/hex-loader/

2018-11-06 Thread Michael S. Tsirkin
On Tue, Nov 06, 2018 at 03:31:08PM +, Peter Maydell wrote: > On 6 November 2018 at 15:15, Philippe Mathieu-Daudé wrote: > > No worry, I'm not mad at all, but there might be an issue in your git PR > > workflow, this series also missed your maintainer S-o-b. > > > > Peter: Can you add a such

Re: [Qemu-devel] [PATCH 1/2] nvme: don't unref ctrl_mem when device unrealized

2018-11-06 Thread Igor Mammedov
On Sun, 28 Oct 2018 23:29:40 -0700 Li Qiang wrote: > Currently, when hotplug/unhotplug nvme device, it will cause an > assert in object.c. Following is the backtrack: > > ERROR:qom/object.c:981:object_unref: assertion failed: (obj->ref > 0) > > Thread 2 "qemu-system-x86" received signal

Re: [Qemu-devel] [PULL 0/8] Monitor patches for 2018-10-30

2018-11-06 Thread Markus Armbruster
Peter Maydell writes: > On 30 October 2018 at 19:16, Markus Armbruster wrote: >> The following changes since commit 3f3285491dd52014852a56135c90e428c8b507ea: >> >> Merge remote-tracking branch 'remotes/jnsnow/tags/bitmaps-pull-request' >> into staging (2018-10-30 14:09:25 +) >> >> are

Re: [Qemu-devel] [PATCH 0/4] scsi-generic: fixes for Block Limits emulation

2018-11-06 Thread Daniel Henrique Barboza
Hi, How did you find all those issues, Max? First patch is something that I missed out from the SCSI spec (ordering of the VPD pages) and could have been detected by code inspection,  but I am curious about the other fixes. Thanks, Daniel On 10/29/18 2:34 PM, Paolo Bonzini wrote:

Re: [Qemu-devel] [Libguestfs] How to emulate block I/O timeout on qemu side?

2018-11-06 Thread Richard W.M. Jones
On Tue, Nov 06, 2018 at 09:43:06AM +, Richard W.M. Jones wrote: > On Tue, Nov 06, 2018 at 09:14:57AM +, Richard W.M. Jones wrote: > > This link shows how to combine delay and error filters together: > > > > https://rwmj.wordpress.com/2018/11/04/nbd-graphical-viewer/ > > Oops, that's in

Re: [Qemu-devel] [PULL 00/33] pci, pc, virtio: fixes, features

2018-11-06 Thread Laszlo Ersek
On 11/06/18 13:39, Peter Maydell wrote: > On 6 November 2018 at 11:20, Peter Maydell wrote: >> On 6 November 2018 at 11:07, Michael S. Tsirkin wrote: >>> On Tue, Nov 06, 2018 at 09:18:49AM +0100, Thomas Huth wrote: On 2018-11-05 19:14, Michael S. Tsirkin wrote: > The following changes

Re: [Qemu-devel] [RESEND PATCH for-3.1] hw/arm/sysbus-fdt: Only call match_fn callback if the type matches

2018-11-06 Thread Peter Maydell
On 5 November 2018 at 15:35, Eric Auger wrote: > Commit af7d64ede0b9 (hw/arm/sysbus-fdt: Allow device matching with DT > compatible value) introduced a match_fn callback which gets called > for each registered combo to check whether a sysbus device can be > dynamically instantiated. However the

  1   2   3   >