Re: [PATCH v3] yield_until_fd_readable: make it work with any AioContect

2019-10-23 Thread Dietmar Maurer
> > +aio_set_fd_handler(ctx, fd, false, (IOHandler *)qemu_coroutine_enter, > > + NULL, NULL, qemu_coroutine_self()); > > This cast is unsafe. If qemu_coroutine_enter()'s prototype is changed > there will be no compiler warning that the prototypes are now > incompatible.

[PATCH v4] yield_until_fd_readable: make it work with any AioContect

2019-10-23 Thread Dietmar Maurer
Simply use qemu_get_current_aio_context(). Signed-off-by: Dietmar Maurer --- Changelog for v4: - avoid unsafe cast and keep fd_coroutine_enter() Changelog for v3: - use (IOHandler *) instead of ((void (*)(void *)) - coding style: fix max line length Changelog for v2: - use correct read

[PATCH qemu] spapr: Add /choses to FDT only at reset time to preserve kernel and initramdisk

2019-10-23 Thread Alexey Kardashevskiy
Since "spapr: Render full FDT on ibm,client-architecture-support" we build the entire flatten device tree (FDT) twice - at the reset time and when "ibm,client-architecture-support" (CAS) is called. The full FDT from CAS is then applied on top of the SLOF internal device tree. This is mostly ok,

Re: [PATCH] virtio: notify virtqueue via host notifier when available

2019-10-23 Thread Yongji Xie
On Mon, 21 Oct 2019 at 19:40, Stefan Hajnoczi wrote: > > Host notifiers are used in several cases: > 1. Traditional ioeventfd where virtqueue notifications are handled in >the main loop thread. > 2. IOThreads (aio_handle_output) where virtqueue notifications are >handled in an IOThread

RE: [RFC PATCH 1/4] net/awd.c: Introduce Advanced Watch Dog module framework

2019-10-23 Thread Zhang, Chen
> -Original Message- > From: Philippe Mathieu-Daudé > Sent: Wednesday, October 23, 2019 7:39 PM > To: Zhang, Chen ; Jason Wang > ; Paolo Bonzini ; qemu- > dev > Cc: Zhang Chen > Subject: Re: [RFC PATCH 1/4] net/awd.c: Introduce Advanced Watch Dog > module framework > > On 10/23/19

Re: [PATCH 1/6] ppc: Add intc_destroy() handlers to SpaprInterruptController/PnvChip

2019-10-23 Thread David Gibson
On Wed, Oct 23, 2019 at 04:51:59PM +0200, Greg Kurz wrote: > SpaprInterruptControllerClass and PnvChipClass have an intc_create() method > that calls the appropriate routine, ie. icp_create() or xive_tctx_create(), > to establish the link between the VCPU and the presenter component of the >

Re: [PATCH 4/6] qom: Add object_child_foreach_type() helper function

2019-10-23 Thread David Gibson
On Thu, Oct 24, 2019 at 01:59:03PM +1100, David Gibson wrote: > On Wed, Oct 23, 2019 at 04:52:16PM +0200, Greg Kurz wrote: > > Calling a function for children of a certain type is a recurring pattern > > in the QEMU code base. In order to avoid the need to setup the same boiler > > plate again and

Re: [PATCH v5 7/7] spapr/xive: Set the OS CAM line at reset

2019-10-23 Thread David Gibson
On Tue, Oct 22, 2019 at 06:38:12PM +0200, Cédric Le Goater wrote: > When a Virtual Processor is scheduled to run on a HW thread, the > hypervisor pushes its identifier in the OS CAM line. When running with > kernel_irqchip=off, QEMU needs to emulate the same behavior. > > Set the OS CAM line when

Re: [PATCH 5/6] spapr: Don't use CPU_FOREACH() in 'info pic'

2019-10-23 Thread David Gibson
On Wed, Oct 23, 2019 at 04:52:21PM +0200, Greg Kurz wrote: > Now that presenter objects are parented to the interrupt controller, stop > relying on CPU_FOREACH() which can race with CPU hotplug and crash QEMU. > > Signed-off-by: Greg Kurz So.. we might be able to go further than this. Having

Re: [PATCH 3/6] ppc: Reparent presenter objects to the interrupt controller object

2019-10-23 Thread David Gibson
On Wed, Oct 23, 2019 at 04:52:10PM +0200, Greg Kurz wrote: > Each VCPU is associated to a presenter object within the interrupt > controller, ie. TCTX for XIVE and ICP for XICS, but our current > models put these objects below the VCPU, and we rely on CPU_FOREACH() > to do anything that involves

Re: [PATCH 4/6] qom: Add object_child_foreach_type() helper function

2019-10-23 Thread David Gibson
On Wed, Oct 23, 2019 at 04:52:16PM +0200, Greg Kurz wrote: > Calling a function for children of a certain type is a recurring pattern > in the QEMU code base. In order to avoid the need to setup the same boiler > plate again and again, introduce a variant of object_child_foreach() that > only

Re: [PATCH 2/6] xive, xics: Fix reference counting on CPU objects

2019-10-23 Thread David Gibson
On Wed, Oct 23, 2019 at 04:52:05PM +0200, Greg Kurz wrote: > When a VCPU gets connected to the XIVE interrupt controller, we add a > const link targetting the CPU object to the TCTX object. Similar links > are added to the ICP object when using the XICS interrupt controller. > > As explained in :

Re: [PATCH v5 3/7] ppc/pnv: Introduce a PnvCore reset handler

2019-10-23 Thread David Gibson
On Wed, Oct 23, 2019 at 01:18:06PM +0200, Philippe Mathieu-Daudé wrote: > Hi Cédric, > > On 10/22/19 6:38 PM, Cédric Le Goater wrote: > > in which individual CPUs are reset. It will ease the introduction of > > future change reseting the interrupt presenter from the CPU reset > > handler. > > >

Re: [PATCH 6/6] xive: Don't use CPU_FOREACH() to perform CAM line matching

2019-10-23 Thread David Gibson
On Wed, Oct 23, 2019 at 04:52:27PM +0200, Greg Kurz wrote: > Now that the TCTX objects are children of the XIVE router, stop > using CPU_FOREACH() when looking for a matching VCPU target. > > Signed-off-by: Greg Kurz > --- > hw/intc/xive.c | 100 >

Re: [PATCH v5 0/7] ppc: reset the interrupt presenter from the CPU reset handler

2019-10-23 Thread David Gibson
On Tue, Oct 22, 2019 at 06:38:05PM +0200, Cédric Le Goater wrote: > Hello, > > On the sPAPR machine and PowerNV machine, the interrupt presenters are > created by a machine handler at the core level and are reseted > independently. This is not consistent and it raises issues when it > comes to

Re: [PATCH v5 4/7] ppc/pnv: Add a PnvChip pointer to PnvCore

2019-10-23 Thread David Gibson
On Tue, Oct 22, 2019 at 06:38:09PM +0200, Cédric Le Goater wrote: > We will use it to reset the interrupt presenter from the CPU reset > handler. > > Signed-off-by: Cédric Le Goater > Reviewed-by: Greg Kurz > --- > include/hw/ppc/pnv_core.h | 3 +++ > hw/ppc/pnv_core.c | 3 ++- > 2

Re: [PATCH v5 5/7] ppc: Reset the interrupt presenter from the CPU reset handler

2019-10-23 Thread David Gibson
On Tue, Oct 22, 2019 at 06:38:10PM +0200, Cédric Le Goater wrote: > On the sPAPR machine and PowerNV machine, the interrupt presenters are > created by a machine handler at the core level and are reset > independently. This is not consistent and it raises issues when it > comes to handle

Re: [PATCH] spapr: Don't request to unplug the same core twice

2019-10-23 Thread David Gibson
On Wed, Oct 23, 2019 at 09:17:40PM +0200, Greg Kurz wrote: > We must not call spapr_drc_detach() on a detached DRC otherwise bad things > can happen, ie. QEMU hangs or crashes. This is easily demonstrated with > a CPU hotplug/unplug loop using QMP. > > Signed-off-by: Greg Kurz Ouch, good catch.

Re: [Resend PATCH 0/3] Add CPU model for intel processor Cooper Lake

2019-10-23 Thread Eduardo Habkost
On Tue, Oct 22, 2019 at 03:35:25PM +0800, Cathy Zhang wrote: > This patchset is to add CPU model for intel processor Cooper Lake. It > will inherit features from the existing CPU model Cascadelake-Server, > meanwhile, add the platform associated new instruction and feature > for speculative

[PULL 4/4] hppa: drop usage of memory_region_allocate_system_memory() for ROM

2019-10-23 Thread Eduardo Habkost
From: Igor Mammedov machine_hppa_init() violates memory_region_allocate_system_memory() contract by calling it multiple times which could break with -mem-path. Replace the second usage (for 'rom') with memory_region_init_ram() instead. Signed-off-by: Igor Mammedov Message-Id:

[PULL 3/4] ppc: rs6000_mc: drop usage of memory_region_allocate_system_memory()

2019-10-23 Thread Eduardo Habkost
From: Igor Mammedov rs6000mc_realize() violates memory_region_allocate_system_memory() contract by calling it multiple times which could break -mem-path. Replace it with plain memory_region_init_ram() instead. Signed-off-by: Igor Mammedov Message-Id: <20191008113318.7012-3-imamm...@redhat.com>

[PULL 2/4] sparc64: use memory_region_allocate_system_memory() only for '-m' specified RAM

2019-10-23 Thread Eduardo Habkost
From: Igor Mammedov memory_region_allocate_system_memory() was designed to be called for allocating inital RAM. Using it mutiple times within one board is not supported and could fail if -mem-path with non hugepage path is used. Keep using memory_region_allocate_system_memory() only for initial

[PULL 1/4] target/i386: Introduce Denverton CPU model

2019-10-23 Thread Eduardo Habkost
From: Tao Xu Denverton is the Atom Processor of Intel Harrisonville platform. For more information: https://ark.intel.com/content/www/us/en/ark/products/\ codename/63508/denverton.html Signed-off-by: Tao Xu Message-Id: <20190718073405.28301-1-tao3...@intel.com> Signed-off-by: Eduardo Habkost

[PULL 0/4] x86 and machine queue, 2019-10-23

2019-10-23 Thread Eduardo Habkost
The following changes since commit f78398bfe544db81a974825b0a2aa826f6576414: Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2019-10-22' into staging (2019-10-23 16:06:13 +0100) are available in the Git repository at: git://github.com/ehabkost/qemu.git

Re: [PATCH v5] migration: Support QLIST migration

2019-10-23 Thread Peter Xu
On Wed, Oct 23, 2019 at 05:02:37PM +0200, Eric Auger wrote: > Support QLIST migration using the same principle as QTAILQ: > 94869d5c52 ("migration: migrate QTAILQ"). > > The VMSTATE_QLIST_V macro has the same proto as VMSTATE_QTAILQ_V. > The change mainly resides in QLIST RAW macros:

Re: [PATCH 1/1] pci: pass along the return value of dma_memory_rw

2019-10-23 Thread Philippe Mathieu-Daudé
On 10/11/19 9:01 AM, Klaus Jensen wrote: Some might actually care about the return value of dma_memory_rw. So let us pass it along instead of ignoring it. Signed-off-by: Klaus Jensen --- include/hw/pci/pci.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

Re: [PATCH v3 32/33] qdev: remove PROP_MEMORY_REGION

2019-10-23 Thread Philippe Mathieu-Daudé
On 10/23/19 7:31 PM, Marc-André Lureau wrote: PROP_MEMORY_REGION was a derivative of PROP_PTR, added in commit ed03d749f3f513b8fb0287757cfda2cb6825f063 (qdev: add MemoryRegion property) and thankfully no longer needed since commit 3eff40dbf44896a8180c86c84dbdefb2eb173fbe (hw/misc: Remove

Re: [PATCH v3 23/33] dp8393x: replace PROP_PTR with PROP_LINK

2019-10-23 Thread Philippe Mathieu-Daudé
On 10/23/19 7:31 PM, Marc-André Lureau wrote: Link property is the correct way to pass a MemoryRegion to a device for DMA purposes. Sidenote: as a sysbus device, this remains non-usercreatable even though we can drop the specific flag here. Signed-off-by: Marc-André Lureau Reviewed-by: Peter

[PULL 0/2] target/xtensa queue

2019-10-23 Thread Max Filippov
in the Git repository at: git://github.com/OSLL/qemu-xtensa.git tags/20191023-xtensa for you to fetch changes up to d9e8553bc8821d72cb72ca95f76b2d8ff6eb628a: hw/xtensa: add virt machine (2019-10-18 20:38:10 -0700) target/xtensa

Re: [PATCH v3 21/33] lance: replace PROP_PTR with PROP_LINK

2019-10-23 Thread Philippe Mathieu-Daudé
On 10/23/19 7:31 PM, Marc-André Lureau wrote: Signed-off-by: Marc-André Lureau Reviewed-by: Peter Maydell --- hw/dma/sparc32_dma.c | 2 +- hw/net/lance.c | 5 ++--- hw/net/pcnet-pci.c | 2 +- hw/net/pcnet.h | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff

Re: [PATCH v3 20/33] vmmouse: replace PROP_PTR with PROP_LINK

2019-10-23 Thread Philippe Mathieu-Daudé
On 10/23/19 7:31 PM, Marc-André Lureau wrote: While at it, use the expected type. Signed-off-by: Marc-André Lureau Reviewed-by: Peter Maydell --- hw/i386/pc.c | 6 +++--- hw/i386/vmmouse.c| 8 +++- hw/input/pckbd.c | 8 +++- include/hw/input/i8042.h |

Re: [PATCH v3 19/33] sm501: make SerialMM a child, export chardev property

2019-10-23 Thread Philippe Mathieu-Daudé
On 10/23/19 7:31 PM, Marc-André Lureau wrote: Embed the SerialMM sybus device, and re-export its "chardev" property. That way, we can get rid of PROP_PTR "chr-state" and better track devices relationship. Signed-off-by: Marc-André Lureau --- hw/display/sm501.c | 31

[RESEND PATCH 2/2] hw/i386: AMD-Vi IVRS DMA alias support

2019-10-23 Thread Alex Williamson
When we account for DMA aliases in the PCI address space, we can no longer use a single IVHD entry in the IVRS covering all devices. We instead need to walk the PCI bus and create alias ranges when we find a conventional bus. These alias ranges cannot overlap with a "Select All" range (as

[RESEND PATCH 0/2] PCI DMA alias support

2019-10-23 Thread Alex Williamson
Previous posting: https://lists.gnu.org/archive/html/qemu-devel/2019-07/msg06182.html Rebased (no change) and added Peter's R-b. Please apply for QEMU 4.2. Previous cover letter: Please see patch 1/ for the motivation and utility of this series. This v1 submission improves on the previous RFC

[RESEND PATCH 1/2] pci: Use PCI aliases when determining device IOMMU address space

2019-10-23 Thread Alex Williamson
PCIe requester IDs are used by modern IOMMUs to differentiate devices in order to provide a unique IOVA address space per device. These requester IDs are composed of the bus/device/function (BDF) of the requesting device. Conventional PCI pre-dates this concept and is simply a shared parallel

Re: [PATCH v3 05/33] serial-pci-multi: factor out multi_serial_get_nr_ports

2019-10-23 Thread Philippe Mathieu-Daudé
On 10/23/19 7:31 PM, Marc-André Lureau wrote: Reused in following patch. Signed-off-by: Marc-André Lureau --- hw/char/serial-pci-multi.c | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/hw/char/serial-pci-multi.c b/hw/char/serial-pci-multi.c

Re: [PATCH v3 09/33] serial: add "baudbase" property

2019-10-23 Thread Philippe Mathieu-Daudé
On 10/23/19 7:31 PM, Marc-André Lureau wrote: Signed-off-by: Marc-André Lureau --- hw/char/serial.c | 5 +++-- include/hw/char/serial.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/char/serial.c b/hw/char/serial.c index 09e89727a6..069d8715d0 100644 ---

Re: [PATCH v3 08/33] serial: add "chardev" property

2019-10-23 Thread Philippe Mathieu-Daudé
On 10/23/19 7:31 PM, Marc-André Lureau wrote: This is more QOM-friendly, callers may set/get the property themself. Signed-off-by: Marc-André Lureau --- hw/char/serial.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/hw/char/serial.c b/hw/char/serial.c index

Re: [Qemu-devel] [PATCH v2 2/2] linux-user: manage binfmt-misc preserve-arg[0] flag

2019-10-23 Thread Christophe de Dinechin
Laurent Vivier writes: > Add --preserve-arg0 in qemu-binfmt-conf.sh to configure the preserve-arg0 > flag. There is an inconsistency below, where some parts use preserve-argv0 and others preserve-arg0 (no v) Frankly, I would accept both ;-) > > Now, if QEMU is started with -0 or QEMU_ARGV0

Re: [PATCH v3 03/33] sysbus: remove outdated comment

2019-10-23 Thread Philippe Mathieu-Daudé
On 10/23/19 7:31 PM, Marc-André Lureau wrote: The init callback is no more since commit 817a17fc60f44e29a1944b60d32f45ea127f0cf9 ("core/sysbus: remove the SysBusDeviceClass::init path") Signed-off-by: Marc-André Lureau --- include/hw/sysbus.h | 4 1 file changed, 4 deletions(-) diff

Re: [PATCH v3 02/33] sysbus: remove unused sysbus_try_create*

2019-10-23 Thread Philippe Mathieu-Daudé
"Last user removed in commit 7a10ef51c (2013)." On 10/23/19 7:31 PM, Marc-André Lureau wrote: Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- hw/core/sysbus.c| 32 hw/i386/pc.c| 1 - include/hw/sysbus.h | 9

Re: LEON3 networking

2019-10-23 Thread Philippe Mathieu-Daudé
Hi Jiri, On 10/23/19 9:55 PM, Jiri Gaisler wrote: BTW, here is a patch that you might want to apply to qemu if you intend to run RTEMS on leon3. The plug area must support byte accesses, which is used by the RTEMS grlib scanning functions... Do you mean this one?

Re: qemu/powernv: coreboot support?

2019-10-23 Thread Marty E. Plummer
On Tue, Oct 22, 2019 at 09:58:10AM +0200, Cédric Le Goater wrote: > On 22/10/2019 02:32, Marty E. Plummer wrote: > > On Mon, Oct 21, 2019 at 02:46:59PM +0200, Cédric Le Goater wrote: > >> On 21/10/2019 07:34, David Gibson wrote: > >>> On Sun, Oct 20, 2019 at 08:51:47AM +0200, Cédric Le Goater

Re: [PATCH v7 00/14] target/mips: Misc cleanups for September/October 2019

2019-10-23 Thread no-reply
Patchew URL: https://patchew.org/QEMU/1571826227-10583-1-git-send-email-aleksandar.marko...@rt-rk.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH v7 00/14] target/mips: Misc cleanups for September/October 2019 Type: series

[Bug 1846427] Re: 4.1.0: qcow2 corruption on savevm/quit/loadvm cycle

2019-10-23 Thread Michael Weiser
For completeness's sake: All the changes you proposed (replacing call to qcow2_detect_metadata_preallocation() with ret = true and ret = false, moving acquiring s->lock before the call and replacing the call with a sleep) prevent corruption on my system. The latter would suggest that it's not so

Re: [PATCH v5 02/11] pci: add option for net failover

2019-10-23 Thread Alex Williamson
On Wed, 23 Oct 2019 21:30:35 +0200 Jens Freimann wrote: > On Wed, Oct 23, 2019 at 12:06:48PM -0600, Alex Williamson wrote: > >On Wed, 23 Oct 2019 10:27:02 +0200 > >Jens Freimann wrote: > > > >> This patch adds a net_failover_pair_id property to PCIDev which is > >> used to link the primary

Re: [PATCH] nvme: fix NSSRS offset in CAP register

2019-10-23 Thread Klaus Birkelund
On Wed, Oct 23, 2019 at 11:26:57AM -0400, John Snow wrote: > > > On 10/23/19 3:33 AM, Klaus Jensen wrote: > > Fix the offset of the NSSRS field the CAP register. > > From NVME 1.4, section 3 ("Controller Registers"), subsection 3.1.1 > ("Offset 0h: CAP – Controller Capabilities")

Re: [PATCH] virtio: fix IO request length in virtio SCSI/block #PSBM-78839

2019-10-23 Thread Michael S. Tsirkin
On Mon, Oct 21, 2019 at 02:24:55PM +0100, Stefan Hajnoczi wrote: > On Fri, Oct 18, 2019 at 02:55:47PM +0300, Denis Plotnikov wrote: > > From: "Denis V. Lunev" > > > > Linux guests submit IO requests no longer than PAGE_SIZE * max_seg > > field reported by SCSI controler. Thus typical sequential

[PATCH] Semihost SYS_READC implementation (v3)

2019-10-23 Thread Keith Packard
Provides a blocking call to read a character from the console using semihosting.chardev, if specified. This takes some careful command line options to use stdio successfully as the serial ports, monitor and semihost all want to use stdio. Here's a sample set of command line options which share

Re: [PATCH] Semihost SYS_READC implementation

2019-10-23 Thread Keith Packard
Paolo Bonzini writes: > Please take a look at include/qemu/fifo8.h instead of rolling your own > ring buffer. Note that it is not thread-safe so you'll have to keep > that part. Sorry for not looking around sooner, and thanks for the pointer. I've also cleaned up the other issues. > Kudos for

Re: [PATCH] virtio: fix IO request length in virtio SCSI/block #PSBM-78839

2019-10-23 Thread Michael S. Tsirkin
On Fri, Oct 18, 2019 at 02:55:47PM +0300, Denis Plotnikov wrote: > From: "Denis V. Lunev" > > Linux guests submit IO requests no longer than PAGE_SIZE * max_seg > field reported by SCSI controler. Thus typical sequential read with > 1 MB size results in the following pattern of the IO from the

Re: qemu crashing when attaching an ISO file to a virtio-scsi CD-ROM device through libvirt

2019-10-23 Thread Fernando Casas Schössow
In virsh I would do this while the guest is running: virsh attach-disk--type cdrom --mode readonly Following the example for guest from my first email: virsh attach-disk DCHOMENET01 /resources/virtio-win-0.1.171-stable.iso sdb --type cdrom --mode readonly Right after executing this, qemu

Re: [PATCH] translate-all: Remove tb_alloc

2019-10-23 Thread Philippe Mathieu-Daudé
On 10/23/19 6:46 PM, Richard Henderson wrote: Since 2ac01d6dafab, this function does only two things: assert a lock is held, and call tcg_tb_alloc. It is used exactly once, and its user has already done the assert. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé ---

Re: [PATCH v5 02/11] pci: add option for net failover

2019-10-23 Thread Alex Williamson
On Wed, 23 Oct 2019 22:31:37 +0200 Jens Freimann wrote: > On Wed, Oct 23, 2019 at 02:02:11PM -0600, Alex Williamson wrote: > >On Wed, 23 Oct 2019 21:30:35 +0200 > >Jens Freimann wrote: > > > >> On Wed, Oct 23, 2019 at 12:06:48PM -0600, Alex Williamson wrote: > >> >On Wed, 23 Oct 2019

[PATCH v3 32/33] qdev: remove PROP_MEMORY_REGION

2019-10-23 Thread Marc-André Lureau
PROP_MEMORY_REGION was a derivative of PROP_PTR, added in commit ed03d749f3f513b8fb0287757cfda2cb6825f063 (qdev: add MemoryRegion property) and thankfully no longer needed since commit 3eff40dbf44896a8180c86c84dbdefb2eb173fbe (hw/misc: Remove mmio_interface device). Signed-off-by: Marc-André

[PATCH v3 31/33] omap-gpio: remove PROP_PTR

2019-10-23 Thread Marc-André Lureau
Since clocks are not QOM objects, replace PROP_PTR of clocks with setters methods. Move/adapt the existing TODO comment about a clock framework. Reviewed-by: Peter Maydell Signed-off-by: Marc-André Lureau --- hw/arm/omap1.c| 2 +- hw/arm/omap2.c| 13 +++--

[PATCH v3 26/33] RFC: mips/cps: fix setting saar property

2019-10-23 Thread Marc-André Lureau
There is no "saar" property. Note: I haven't been able to test this code. Help welcome. May fix commit 043715d1e0fbb3e3411be3f898c5b77b7f90327a ("target/mips: Update ITU to utilize SAARI and SAAR CP0 registers") Cc: Aleksandar Markovic Signed-off-by: Marc-André Lureau --- hw/mips/cps.c | 2 +-

[PATCH v3 25/33] sparc: move PIL irq handling to cpu.c

2019-10-23 Thread Marc-André Lureau
Rather than tweaking CPU bits from leon3 machine, move it to cpu.c. Suggested-by: Peter Maydell Signed-off-by: Marc-André Lureau --- hw/sparc/leon3.c | 37 - hw/sparc/trace-events | 4 target/sparc/cpu.c| 39

[PATCH v3 24/33] leon3: use qemu_irq framework instead of callback as property

2019-10-23 Thread Marc-André Lureau
"set_pin_in" property is used to define a callback mechanism where the device says "call the callback function, passing it an opaque cookie and a 32-bit value". We already have a generic mechanism for doing that, which is the qemu_irq. So we should just use that. Signed-off-by: Marc-André Lureau

[PATCH v3 23/33] dp8393x: replace PROP_PTR with PROP_LINK

2019-10-23 Thread Marc-André Lureau
Link property is the correct way to pass a MemoryRegion to a device for DMA purposes. Sidenote: as a sysbus device, this remains non-usercreatable even though we can drop the specific flag here. Signed-off-by: Marc-André Lureau Reviewed-by: Peter Maydell --- hw/mips/mips_jazz.c | 3 ++-

[PATCH v3 16/33] serial-mm: use sysbus facilities

2019-10-23 Thread Marc-André Lureau
Make SerialMM a regular sysbus device, by registering the irq, and the mmio region. Reexport the internal serial properties. Signed-off-by: Marc-André Lureau --- hw/char/serial.c | 35 --- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git

Re: [PATCH v5 02/11] pci: add option for net failover

2019-10-23 Thread Jens Freimann
On Wed, Oct 23, 2019 at 02:02:11PM -0600, Alex Williamson wrote: On Wed, 23 Oct 2019 21:30:35 +0200 Jens Freimann wrote: On Wed, Oct 23, 2019 at 12:06:48PM -0600, Alex Williamson wrote: >On Wed, 23 Oct 2019 10:27:02 +0200 >Jens Freimann wrote: [...] >Are there also multi-function

[PATCH v3 10/33] serial: add "instance-id" property

2019-10-23 Thread Marc-André Lureau
This property will be used to move common vmstate registration to device realize in following patch. Signed-off-by: Marc-André Lureau --- hw/char/serial.c | 3 +++ include/hw/char/serial.h | 1 + 2 files changed, 4 insertions(+) diff --git a/hw/char/serial.c b/hw/char/serial.c index

[PATCH v3 05/33] serial-pci-multi: factor out multi_serial_get_nr_ports

2019-10-23 Thread Marc-André Lureau
Reused in following patch. Signed-off-by: Marc-André Lureau --- hw/char/serial-pci-multi.c | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/hw/char/serial-pci-multi.c b/hw/char/serial-pci-multi.c index 5f13b5663b..6fa1cc6225 100644 ---

Re: [PATCH 0/1] pci: pass along the return value of dma_memory_rw

2019-10-23 Thread Klaus Birkelund
On Fri, Oct 11, 2019 at 09:01:40AM +0200, Klaus Jensen wrote: > Hi, > > While working on fixing the emulated nvme device to pass more tests in > the blktests suite, I discovered that the pci_dma_rw function ignores > the return value of dma_memory_rw. > > The nvme device needs to handle DMA

[PATCH v3 04/33] chardev: generate an internal id when none given

2019-10-23 Thread Marc-André Lureau
Internally, qemu may create chardev without ID. Those will not be looked up with qemu_chr_find(), which prevents using qdev_prop_set_chr(). Use id_generate(), to generate an internal name (prefixed with #), so no conflict exist with user-named chardev. Signed-off-by: Marc-André Lureau ---

Re: qemu crashing when attaching an ISO file to a virtio-scsi CD-ROM device through libvirt

2019-10-23 Thread Fernando Casas Schössow
Hi John, Thanks for looking into this. I can quickly repro the problem with qemu 4.0 binary with debugging symbols enabled as I have it available already. Doing the same with qemu 4.1 or development head may be too much hassle but if it's really the only way I can give it try. Would it worth

Re: LEON3 networking

2019-10-23 Thread Jiri Gaisler
BTW, here is a patch that you might want to apply to qemu if you intend to run RTEMS on leon3. The plug area must support byte accesses, which is used by the RTEMS grlib scanning functions... Jiri. On 10/23/19 8:37 PM, Jiri Gaisler wrote: > Leon3 uses the GRETH ethernet IP core for networking.

Re: [Virtio-fs] [PATCH] virtiofsd: Fix data corruption with O_APPEND wirte in writeback mode

2019-10-23 Thread Vivek Goyal
On Wed, Oct 23, 2019 at 09:25:23PM +0900, Misono Tomohiro wrote: > When writeback mode is enabled (-o writeback), O_APPEND handling is > done in kernel. Therefore virtiofsd clears O_APPEND flag when open. > Otherwise O_APPEND flag takes precedence over pwrite() and write > data may corrupt. > >

[PATCH] spapr: Don't request to unplug the same core twice

2019-10-23 Thread Greg Kurz
We must not call spapr_drc_detach() on a detached DRC otherwise bad things can happen, ie. QEMU hangs or crashes. This is easily demonstrated with a CPU hotplug/unplug loop using QMP. Signed-off-by: Greg Kurz --- hw/ppc/spapr.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-)

Re: [PATCH v5 11/11] vfio: unplug failover primary device before migration

2019-10-23 Thread Alex Williamson
On Wed, 23 Oct 2019 10:27:11 +0200 Jens Freimann wrote: > As usual block all vfio-pci devices from being migrated, but make an > exception for failover primary devices. This is achieved by setting > unmigratable to 0 but also add a migration blocker for all vfio-pci > devices except failover

Re: [PATCH v5 02/11] pci: add option for net failover

2019-10-23 Thread Alex Williamson
On Wed, 23 Oct 2019 10:27:02 +0200 Jens Freimann wrote: > This patch adds a net_failover_pair_id property to PCIDev which is > used to link the primary device in a failover pair (the PCI dev) to > a standby (a virtio-net-pci) device. > > It only supports ethernet devices. Also currently it only

Re: [PATCH v2 03/20] piix4: Add a i8259 Interrupt Controller as specified in datasheet

2019-10-23 Thread Esteban Bosse
El mar, 22-10-2019 a las 11:35 +0200, Philippe Mathieu-Daudé escribió: > On 10/22/19 10:44 AM, Esteban Bosse wrote: > > El vie, 18-10-2019 a las 15:47 +0200, Philippe Mathieu-Daudé > > escribió: > > > From: Hervé Poussineau > > > > > > Add ISA irqs as piix4 gpio in, and CPU interrupt request as

[PATCH v3 00/33] Clean-ups: qom-ify serial and remove QDEV_PROP_PTR

2019-10-23 Thread Marc-André Lureau
Hi, QDEV_PROP_PTR is marked in multiple places as "FIXME/TODO/remove me". In most cases, it can be easily replaced with QDEV_PROP_LINK when the pointer points to an Object. There are a few places where such substitution isn't possible. For those places, it seems reasonable to use a specific

Re: [PATCH v5 02/11] pci: add option for net failover

2019-10-23 Thread Jens Freimann
On Wed, Oct 23, 2019 at 12:06:48PM -0600, Alex Williamson wrote: On Wed, 23 Oct 2019 10:27:02 +0200 Jens Freimann wrote: This patch adds a net_failover_pair_id property to PCIDev which is used to link the primary device in a failover pair (the PCI dev) to a standby (a virtio-net-pci) device.

Re: LEON3 networking

2019-10-23 Thread Jiri Gaisler
Leon3 uses the GRETH ethernet IP core for networking. You would need to write a qemu emulation model of it to get networking support. The GRETH is fairly well described in the GRLIB IP manual, so it should not be impossible. The core is also available in open-source (VHDL) if you need to look up

Re: [PATCH] cputlb: Fix tlb_vaddr_to_host

2019-10-23 Thread Philippe Mathieu-Daudé
On 10/23/19 5:49 PM, Richard Henderson wrote: Using uintptr_t instead of target_ulong meant that, for 64-bit guest and 32-bit host, we truncated the guest address comparator and so may not hit the tlb when we should. Fixes: 4811e9095c0 Signed-off-by: Richard Henderson --- Fixes aarch64

[PATCH v3 15/33] serial-mm: add endianness property

2019-10-23 Thread Marc-André Lureau
Add a qdev property for endianness, so memory region setup can be done in realize. Signed-off-by: Marc-André Lureau --- hw/char/serial.c | 2 ++ include/hw/char/serial.h | 1 + 2 files changed, 3 insertions(+) diff --git a/hw/char/serial.c b/hw/char/serial.c index

[Bug 1721275] Re: Support more ARM CPUs

2019-10-23 Thread Richard Henderson
They are implemented, because they also appear in A-profile. We just need to set the corresponding MVFR field to enable them. Setting MVFR2.FPMISC = 4 will do the job, I believe. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

Re: qemu crashing when attaching an ISO file to a virtio-scsi CD-ROM device through libvirt

2019-10-23 Thread John Snow
On 10/23/19 1:28 PM, Fernando Casas Schössow wrote: > Hi John, > > Thanks for looking into this. > I can quickly repro the problem with qemu 4.0 binary with debugging > symbols enabled as I have it available already. > Doing the same with qemu 4.1 or development head may be too much hassle >

[PATCH v3 14/33] serial-mm: add "regshift" property

2019-10-23 Thread Marc-André Lureau
And a property and rename "it_shift" field to "regshift", as it seems to be more popular (and I don't know what "it" stands for). Signed-off-by: Marc-André Lureau --- hw/char/serial.c | 23 ++- include/hw/char/serial.h | 4 ++-- 2 files changed, 20 insertions(+), 7

Re: [PATCH v8 00/22] target/arm: Reduce overhead of cpu_get_tb_cpu_state

2019-10-23 Thread Alex Bennée
For system emulation? Sure. I think linux-user is harder because you need the be crt and libs packaged. On Wed, 23 Oct 2019, 17:13 Richard Henderson, wrote: > On 10/23/19 11:17 AM, Alex Bennée wrote: > >>> Dropping this series again for the moment. > >> Argh! I had forgotten that we have no

[PATCH v3 09/33] serial: add "baudbase" property

2019-10-23 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- hw/char/serial.c | 5 +++-- include/hw/char/serial.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/char/serial.c b/hw/char/serial.c index 09e89727a6..069d8715d0 100644 --- a/hw/char/serial.c +++ b/hw/char/serial.c @@ -988,7

[Bug 1596579] Re: segfault upon reboot

2019-10-23 Thread Eduardo
I have no way of reproducing now, should be good by now, I wouldn't worry about it, just close this, thanks. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1596579 Title: segfault upon reboot

Re: [PATCH v2 03/20] piix4: Add a i8259 Interrupt Controller as specified in datasheet

2019-10-23 Thread Esteban Bosse
El mar, 22-10-2019 a las 10:42 +0100, Peter Maydell escribió: > On Tue, 22 Oct 2019 at 09:52, Esteban Bosse > wrote: > > El vie, 18-10-2019 a las 15:47 +0200, Philippe Mathieu-Daudé > > escribió: > > > +static void piix4_request_i8259_irq(void *opaque, int irq, int > > > level) > > > +{ > > > +

[PATCH v3 06/33] serial: initial qom-ification

2019-10-23 Thread Marc-André Lureau
Make SerialState a device (the following patches will introduce IO/MM sysbus serial devices) None of the serial_{,mm}_init() callers actually free the returned value (even if they did, it would be quite harmless), so we can change the object allocation at will. However, the devices that embed

[PATCH v3 03/33] sysbus: remove outdated comment

2019-10-23 Thread Marc-André Lureau
The init callback is no more since commit 817a17fc60f44e29a1944b60d32f45ea127f0cf9 ("core/sysbus: remove the SysBusDeviceClass::init path") Signed-off-by: Marc-André Lureau --- include/hw/sysbus.h | 4 1 file changed, 4 deletions(-) diff --git a/include/hw/sysbus.h b/include/hw/sysbus.h

[PATCH v3 33/33] qdev: remove QDEV_PROP_PTR

2019-10-23 Thread Marc-André Lureau
No longer used in the tree. The comment about user_creatable is still quite relevant, but there is already a similar comment in qdev-core.h. Reviewed-by: Peter Maydell Signed-off-by: Marc-André Lureau --- hw/core/qdev-properties.c| 18 -- include/hw/qdev-properties.h | 22

[PATCH v3 02/33] sysbus: remove unused sysbus_try_create*

2019-10-23 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- hw/core/sysbus.c| 32 hw/i386/pc.c| 1 - include/hw/sysbus.h | 9 + 3 files changed, 1 insertion(+), 41 deletions(-) diff --git a/hw/core/sysbus.c b/hw/core/sysbus.c index 9e69c83aed..08b0311c5f 100644

[PATCH v3 30/33] omap-i2c: remove PROP_PTR

2019-10-23 Thread Marc-André Lureau
Since clocks are not QOM objects, replace PROP_PTR of clocks with setters methods. Reviewed-by: Peter Maydell Reviewed-by: Corey Minyard Signed-off-by: Marc-André Lureau --- hw/arm/omap1.c| 2 +- hw/arm/omap2.c| 8 hw/i2c/omap_i2c.c | 19 ---

[PATCH v3 01/33] qdev: remove unused qdev_prop_int64

2019-10-23 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- hw/core/qdev-properties.c| 32 include/hw/qdev-properties.h | 3 --- 2 files changed, 35 deletions(-) diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c index ac28890e5a..be4cb01f0b 100644 ---

Re: [PATCH v6 1/4] block/replication.c: Ignore requests after failover

2019-10-23 Thread Lukas Straub
On Wed, 23 Oct 2019 14:49:29 +0200 Max Reitz wrote: > On 05.10.19 15:05, Lukas Straub wrote: > > After failover the Secondary side of replication shouldn't change state, > > because > > it now functions as our primary disk. > > > > In replication_start, replication_do_checkpoint,

[PATCH v3 28/33] smbus-eeprom: remove PROP_PTR

2019-10-23 Thread Marc-André Lureau
Instead, set the initial data field directly. (the initial data is an array of 256 bytes. As I don't know if it may change over time, I keep the pointer to original buffer as is, but it might be worth to consider to copy it instead) Signed-off-by: Marc-André Lureau --- hw/i2c/smbus_eeprom.c |

Re: [PATCH v33 01/13] target/avr: Add outward facing interfaces and core CPU logic

2019-10-23 Thread Michael Rolnik
Hi Aleksandar. I am fixing flag C and I will make flag Z to be like the others, just once bit Sent from my cell phone, please ignore typos On Tue, Oct 22, 2019, 1:37 AM Michael Rolnik wrote: > This includes: > - CPU data structures > - object model classes and functions > - migration

[PATCH v3 29/33] omap-intc: remove PROP_PTR

2019-10-23 Thread Marc-André Lureau
Since clocks are not QOM objects, replace PROP_PTR of clocks with setters methods. (in theory there should probably be different methods for omap1 & omap2 intc, but this is left as a future improvement) Reviewed-by: Peter Maydell Signed-off-by: Marc-André Lureau --- hw/arm/omap1.c| 4

[PATCH v3 27/33] cris: improve passing PIC interrupt vector to the CPU

2019-10-23 Thread Marc-André Lureau
Instead of accessing cpu interrupt vector directly from PIC, send the vector value over the qemu_irq. Suggested-by: Peter Maydell Signed-off-by: Marc-André Lureau --- hw/cris/axis_dev88.c | 4 hw/intc/etraxfs_pic.c | 26 +- target/cris/cpu.c | 8

[PATCH v3 22/33] etraxfs: remove PROP_PTR usage

2019-10-23 Thread Marc-André Lureau
etraxfs_dma_client are not Object, so can't be exposed to user with QOM path. Let's remove property usage and move the constructor to the .c unit, simplifying some code on the way. Signed-off-by: Marc-André Lureau --- hw/net/etraxfs_eth.c | 44 +--

Re: [PATCH v33 01/13] target/avr: Add outward facing interfaces and core CPU logic

2019-10-23 Thread Aleksandar Markovic
On Wednesday, October 23, 2019, Michael Rolnik wrote: > Hi Aleksandar. > > I am fixing flag C and I will make flag Z to be like the others, just once > bit > > Sent from my cell phone, please ignore typos > No worries, thanks. A. > > On Tue, Oct 22, 2019, 1:37 AM Michael Rolnik wrote: > >>

[PATCH v3 20/33] vmmouse: replace PROP_PTR with PROP_LINK

2019-10-23 Thread Marc-André Lureau
While at it, use the expected type. Signed-off-by: Marc-André Lureau Reviewed-by: Peter Maydell --- hw/i386/pc.c | 6 +++--- hw/i386/vmmouse.c| 8 +++- hw/input/pckbd.c | 8 +++- include/hw/input/i8042.h | 4 +++- 4 files changed, 12 insertions(+), 14

[PATCH v3 19/33] sm501: make SerialMM a child, export chardev property

2019-10-23 Thread Marc-André Lureau
Embed the SerialMM sybus device, and re-export its "chardev" property. That way, we can get rid of PROP_PTR "chr-state" and better track devices relationship. Signed-off-by: Marc-André Lureau --- hw/display/sm501.c | 31 ++- hw/sh4/r2d.c | 2 +- 2 files

  1   2   3   4   >