Re: [RFC PATCH] iothread: add set_iothread_poll_* commands

2019-10-23 Thread Stefan Hajnoczi
On Tue, Oct 22, 2019 at 04:12:03PM +0800, yezhenyu (A) wrote: > Since qemu2.9, QEMU added three AioContext poll parameters to struct > IOThread: poll_max_ns, poll_grow and poll_shrink. These properties are > used to control iothread polling time. > > However, there isn't properly hmp commands to a

Re: [PATCH] target/riscv: PMP violation due to wrong size parameter

2019-10-23 Thread Palmer Dabbelt
On Tue, 22 Oct 2019 14:21:29 PDT (-0700), day...@berkeley.edu wrote: riscv_cpu_tlb_fill() uses the `size` parameter to check PMP violation using pmp_hart_has_privs(). However, if the size is unknown (=0), the ending address will be `addr - 1` as it is `addr + size - 1` in `pmp_hart_has_privs()`.

Re: [PATCH] Semihost SYS_READC implementation

2019-10-23 Thread Paolo Bonzini
On 22/10/19 20:12, Keith Packard wrote: > $ qemu-system-arm -chardev stdio,mux=on,id=stdio0 -serial chardev:stdio0 > -semihosting-config enable=on,chardev=stdio0 -mon > chardev=stdio0,mode=readline > > It might be nice if this could be shortened, but it certainly provides > the necessary option

[PATCH 0/3] qcow2: Fix image corruption bug in 4.1

2019-10-23 Thread Kevin Wolf
This series fixes an image corruption bug that was introduced in commit 69f47505e ('block: avoid recursive block_status call if possible'), first contained in the QEMU 4.1.0 release. This bug was reported by Michael Weiser on Launchpad: https://bugs.launchpad.net/qemu/+bug/1846427 Kevin Wolf (3):

Re: [PATCH] blockdev: modify blockdev-change-medium to change non-removable device

2019-10-23 Thread Kevin Wolf
Am 23.10.2019 um 15:56 hat Vladimir Sementsov-Ogievskiy geschrieben: > 22.10.2019 14:05, Max Reitz wrote: > > On 21.10.19 08:50, Denis Plotnikov wrote: > >> > >> On 18.10.2019 18:02, Max Reitz wrote: > >>> On 18.10.19 14:09, Denis Plotnikov wrote: > The modification is useful to workaround exc

Re: [PATCH v3 4/9] tests/acceptance: Refactor exec_command_and_wait_for_pattern()

2019-10-23 Thread Philippe Mathieu-Daudé
On 10/20/19 12:10 PM, David Gibson wrote: On Thu, Oct 17, 2019 at 06:52:34PM +0200, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daudé The same utility method is already present in two different test files, This patch only appears to remove it from one, though. so let's consolidate

[PATCH 1/3] coroutine: Add qemu_co_mutex_assert_locked()

2019-10-23 Thread Kevin Wolf
Some functions require that the caller holds a certain CoMutex for them to operate correctly. Add a function so that they can assert the lock is really held. Cc: qemu-sta...@nongnu.org Signed-off-by: Kevin Wolf --- include/qemu/coroutine.h | 7 +++ 1 file changed, 7 insertions(+) diff --git

[PATCH 3/3] qcow2: Fix corruption bug in qcow2_detect_metadata_preallocation()

2019-10-23 Thread Kevin Wolf
qcow2_detect_metadata_preallocation() calls qcow2_get_refcount() which requires s->lock to be taken to protect its accesses to the refcount table and refcount blocks. However, nothing in this code path actually took the lock. This could cause the same cache entry to be used by two requests at the s

Re: [PATCH 2/3] qcow2: Assert that qcow2_cache_get() callers hold s->lock

2019-10-23 Thread Kevin Wolf
Am 23.10.2019 um 17:26 hat Kevin Wolf geschrieben: > qcow2_cache_do_get() requires that s->lock is locked because it can > yield between picking a cache entry and actually taking ownership of it > by setting offset and increasing the reference count. > > Add an assertion to make sure the caller re

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

2019-10-23 Thread Richard Henderson
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 testing of armeb in check-tcg. > > Does it need it's own toolchain or can it be done with flags? I think the compiler only needs flags, so we might be able to gin some

Re: [PATCH] cputlb: Fix tlb_vaddr_to_host

2019-10-23 Thread David Hildenbrand
On 23.10.19 17:49, 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 emulation

[PATCH v2 0/7] exec: Improve code for TARGET_PAGE_BITS_VARY

2019-10-23 Thread Richard Henderson
Changes since v1: * Replace my patch for TARGET_PAGE_ALIGN with Wei Yang's. * Detect __attribute__((alias)) support in configure. If unsupported, as for Apple Xcode9, use preprocessor trickery. Passes travis build tests for xcode9. Link for v1: https://lists.gnu.org/archive/html/qemu

[PATCH v2 1/7] cpu: use ROUND_UP() to define xxx_PAGE_ALIGN

2019-10-23 Thread Richard Henderson
From: Wei Yang Use ROUND_UP() to define, which is a little bit easy to read. Reviewed-by: Michael S. Tsirkin Reviewed-by: David Gibson Reviewed-by: David Gibson Reviewed-by: Juan Quintela Signed-off-by: Wei Yang Message-Id: <20191013021145.16011-2-richardw.y...@linux.intel.com> Signed-off-b

[PATCH] translate-all: Remove tb_alloc

2019-10-23 Thread Richard Henderson
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 --- I noticed that this function was essentially a stub while reviewing Clement's tb->orig_tb

[PATCH v2 3/7] configure: Detect compiler support for __attribute__((alias))

2019-10-23 Thread Richard Henderson
Such support is present almost everywhere, except for Xcode 9. It is added in Xcode 10, but travis uses xcode9 by default, so we should support it for a while yet. Signed-off-by: Richard Henderson --- configure | 19 +++ 1 file changed, 19 insertions(+) diff --git a/configure b/

[PATCH v2 2/7] exec: Split out variable page size support to exec-vary.c

2019-10-23 Thread Richard Henderson
The next patch will play a trick with "const" that will confuse the compiler about the uses of target_page_bits within exec.c. Moving everything to a new file prevents this confusion. No functional change so far. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Paolo Bonzini Signed-off-by: Ric

[PATCH v2 6/7] exec: Promote TARGET_PAGE_MASK to target_long

2019-10-23 Thread Richard Henderson
There are some uint64_t uses that expect TARGET_PAGE_MASK to extend for a 32-bit, so this must continue to be a signed type. Define based on TARGET_PAGE_BITS not TARGET_PAGE_SIZE; this will make a following patch more clear. This should not have a functional effect so far. Reviewed-by: Paolo Bonz

Re: [PULL 0/3] NBD patches for 2019-10-22

2019-10-23 Thread Peter Maydell
On Wed, 23 Oct 2019 at 03:04, Eric Blake wrote: > > The following changes since commit f9bec781379dd7ccf9d01b4b6a79a9ec82c192e5: > > Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20191022' into > staging (2019-10-22 13:45:09 +0100) > > are available in the Git repository at: > > htt

Re: LEON3 networking

2019-10-23 Thread Joshua Shaffer
Does anyone know what needs implemented to get networking supported? Joshua On Wed, Oct 16, 2019 at 6:34 AM Fabien Chouteau wrote: > > Hello people, > > On 15/10/2019 18:57, Philippe Mathieu-Daudé wrote: > > Hi Joshua, > > > > On 10/15/19 3:17 PM, Joshua Shaffer wrote: > >> Hello, > >> > >> I've

[PATCH v2 4/7] exec: Use const alias for TARGET_PAGE_BITS_VARY

2019-10-23 Thread Richard Henderson
Using a variable that is declared "const" for this tells the compiler that it may read the value once and assume that it does not change across function calls. For target_page_size, this means we have only one assert per function, and one read of the variable. This reduces the size of qemu-system

[PATCH] cputlb: Fix tlb_vaddr_to_host

2019-10-23 Thread Richard Henderson
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 emulation on arm32 host, after our recent changes to tl

[Bug 1848901] Re: kvm_mem_ioeventfd_add: error adding ioeventfd: No space left on device (28)

2019-10-23 Thread P.O.
apparently then the fix didn't work :P -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1848901 Title: kvm_mem_ioeventfd_add: error adding ioeventfd: No space left on device (28) Status in QEMU:

[PATCH] hw/audio: fix a memory leak in OPLCreate()

2019-10-23 Thread Jidong Xia
There is a memory leak in OPLCreate(),Should free allocated mem before return. Signed-off-by: Jidong Xia --- hw/audio/fmopl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/audio/fmopl.c b/hw/audio/fmopl.c index 9f50a89..ca9825b 100644 --- a/hw/audio/fmopl.c +++ b/hw/audio/fmopl.c @@ -11

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

2019-10-23 Thread Marc-André Lureau
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 4af8b0ce4c..09e89727a6 100644 --- a/hw/char/serial

[PATCH 0/2] target/mips: Rearrange handling of vector compare instructions

2019-10-23 Thread Filip Bozuta
Simplify instructions by removing unnecessary argument and creating separate comparing functions for each instruction. Filip Bozuta (2): target/mips: Rearrange vector compare equal instructions target/mips: Rearrange vector compare less than (signed) instructions target/mips/msa_helper.c | 1

[PATCH v3 07/33] serial: register vmsd with DeviceClass

2019-10-23 Thread Marc-André Lureau
QOM-ify further. Signed-off-by: Marc-André Lureau --- hw/char/serial.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/hw/char/serial.c b/hw/char/serial.c index c839035fdd..4af8b0ce4c 100644 --- a/hw/char/serial.c +++ b/hw/char/serial.c @@ -990,8 +990,7 @@ Seri

[PATCH 2/2] target/mips: Rearrange vector compare less than (signed) instructions

2019-10-23 Thread Filip Bozuta
Remove unnecessary argument and provide separate function for each instruction. Signed-off-by: Filip Bozuta --- target/mips/msa_helper.c | 80 ++-- 1 file changed, 50 insertions(+), 30 deletions(-) diff --git a/target/mips/msa_helper.c b/target/mips/m

[PATCH v3 11/33] serial: realize the serial device

2019-10-23 Thread Marc-André Lureau
Instead of calling serial_realize_core(), use the QDev realize callback. Move qdev_set_legacy_instance_id() there. Signed-off-by: Marc-André Lureau --- hw/char/serial-isa.c | 2 +- hw/char/serial-pci-multi.c | 2 +- hw/char/serial-pci.c | 2 +- hw/char/serial.c | 11

[PATCH v3 13/33] serial: start making SerialMM a sysbus device

2019-10-23 Thread Marc-André Lureau
Memory mapped serial device is in fact a sysbus device. The following patches will make use of sysbus facilities for resource and registration. Signed-off-by: Marc-André Lureau --- hw/char/omap_uart.c | 2 +- hw/char/serial.c | 47 hw/mips/b

[PATCH 1/2] target/mips: Rearrange vector compare equal instructions

2019-10-23 Thread Filip Bozuta
Remove unnecessary argument and provide separate function for each instruction. Signed-off-by: Filip Bozuta --- target/mips/msa_helper.c | 80 ++-- 1 file changed, 50 insertions(+), 30 deletions(-) diff --git a/target/mips/msa_helper.c b/target/mips/m

[PATCH v3 12/33] serial: replace serial_exit_core() with unrealize

2019-10-23 Thread Marc-André Lureau
Instead of calling serial_exit_core() directly, use the QDev unrealize callback. Signed-off-by: Marc-André Lureau --- hw/char/serial-pci-multi.c | 2 +- hw/char/serial-pci.c | 2 +- hw/char/serial.c | 5 - include/hw/char/serial.h | 1 - 4 files changed, 6 insertions(+), 4

[PATCH v3 17/33] serial: make SerialIO a sysbus device

2019-10-23 Thread Marc-André Lureau
Make serial IO a proper sysbus device, similar to serial MM. Signed-off-by: Marc-André Lureau --- hw/char/serial.c | 58 include/hw/char/serial.h | 13 +++-- 2 files changed, 58 insertions(+), 13 deletions(-) diff --git a/hw/char/serial.c b/h

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

2019-10-23 Thread Marc-André Lureau
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 --git a/hw/dma/sparc32_dma.c b/hw/dma/sparc32_dma.c index

[PATCH v3 18/33] mips: inline serial_init

2019-10-23 Thread Marc-André Lureau
The function is specific to mipssim, let's inline it. Signed-off-by: Marc-André Lureau --- hw/char/serial.c | 16 hw/mips/mips_mipssim.c | 13 ++--- include/hw/char/serial.h | 2 -- 3 files changed, 10 insertions(+), 21 deletions(-) diff --git a/hw/char/seria

[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 changed

[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 deletio

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: > >> T

[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 +-- includ

[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 tar

[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

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 functions

[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 | 1

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, replication_st

[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 --- a/hw/core/qd

[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 --- incl

[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 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 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 in

[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 Ser

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) > > > +{ > > > +

[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 Statu

[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

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 tes

[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 d

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 > bu

[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. https:

[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 c28cfc94fd..2f7667c30c

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 emulati

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 so

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.

[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 sette

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 p

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 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 prim

[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(-) dif

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. > > Cu

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&play 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 networkin

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 it

[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 --- chard

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 error

[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 --- a/hw/char/se

[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 069

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 considerat

[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 a/hw/char/ser

[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 ++- hw/net

[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 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 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 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 +++-- hw/gpio/omap

[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é Lurea

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 10:27:0

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: 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] 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 gu

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

[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 stdi

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 r

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") CAP_NSSRS_SHIFT

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 dev

[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 mu

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

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 wrote

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&play area must support byte accesses, which is used by the RTEMS grlib scanning functions... Do you mean this one? http://gaisler.org/qemu/

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: [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: [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 an

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: [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 --- a

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 in

[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 bus

<    1   2   3   4   >