Re: [PATCH] util/module: fix a memory leak

2019-12-19 Thread Laurent Vivier
Le 20/12/2019 à 08:37, Markus Armbruster a écrit : > Cc: qemu-trivial > > writes: > >> From: Pan Nengyuan >> >> spotted by ASAN >> >> Fixes: 81d8ccb1bea4fb9eaaf4c8e30bd4021180a9a39f >> Reported-by: Euler Robot >> Signed-off-by: Pan Nengyuan >> --- >> util/module.c | 1 + >> 1 file changed, 1

Re: [PATCH] util/module: fix a memory leak

2019-12-19 Thread Markus Armbruster
Cc: qemu-trivial writes: > From: Pan Nengyuan > > spotted by ASAN > > Fixes: 81d8ccb1bea4fb9eaaf4c8e30bd4021180a9a39f > Reported-by: Euler Robot > Signed-off-by: Pan Nengyuan > --- > util/module.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/util/module.c b/util/module.c > index

Re: [kvm-unit-tests PATCH 05/16] arm/arm64: ITS: Introspection tests

2019-12-19 Thread Zenghui Yu
On 2019/12/18 16:34, Auger Eric wrote: Hi Zenghui, On 12/18/19 4:46 AM, Zenghui Yu wrote: Hi Eric, I have to admit that this is the first time I've looked into the kvm-unit-tests code, so only some minor comments inline :) no problem. Thank you for looking at this. By the way, with patch 16

Re: [kvm-unit-tests PATCH 12/16] arm/arm64: ITS: commands

2019-12-19 Thread Zenghui Yu
Hi Eric, On 2019/12/16 22:02, Eric Auger wrote: Implement main ITS commands. The code is largely inherited from the ITS driver. Signed-off-by: Eric Auger --- [...] diff --git a/lib/arm/asm/gic-v3-its.h b/lib/arm/asm/gic-v3-its.h index 245ef61..d074c17 100644 --- a/lib/arm/asm/gic-v3-its.h

Re: [PATCH v4 5/6] hppa: Add emulation of Artist graphics

2019-12-19 Thread Helge Deller
On 19.12.19 01:28, Richard Henderson wrote: > On 11/3/19 10:56 AM, Sven Schnelle wrote: >> This adds emulation of Artist graphics good enough >> to get a Text console on both Linux and HP-UX. The >> X11 server from HP-UX also works. >> >> Signed-off-by: Sven Schnelle >> --- >> hw/display/Kconfig

Re: [kvm-unit-tests PATCH 11/16] arm/arm64: ITS: Device and collection Initialization

2019-12-19 Thread Zenghui Yu
Hi Eric, On 2019/12/16 22:02, Eric Auger wrote: Introduce an helper functions to register - a new device, characterized by its device id and the max number of event IDs that dimension its ITT (Interrupt Translation Table). The function allocates the ITT. - a new collection, characterized

Re: [kvm-unit-tests PATCH 08/16] arm/arm64: ITS: Init the command queue

2019-12-19 Thread Zenghui Yu
Hi Eric, On 2019/12/16 22:02, Eric Auger wrote: Allocate the command queue and initialize related registers: CBASER, CREADR, CWRITER. The command queue is 64kB. This aims at not bothing with fullness. Signed-off-by: Eric Auger --- lib/arm/asm/gic-v3-its.h | 7 +++ lib/arm/gic-v3-its.c

Re: [kvm-unit-tests PATCH 06/16] arm/arm64: ITS: Test BASER

2019-12-19 Thread Zenghui Yu
Hi Eric, On 2019/12/16 22:02, Eric Auger wrote: Add helper routines to parse and set up BASER registers. Add a new test dedicated to BASER accesses. Signed-off-by: Eric Auger --- arm/gic.c| 20 ++ arm/unittests.cfg| 6 +++ lib/arm/asm/gic-v3-its.h | 17

Re: [PATCH v2 02/13] ppc/pnv: Introduce a "system-memory" property

2019-12-19 Thread Cédric Le Goater
On 20/12/2019 01:31, David Gibson wrote: > On Thu, Dec 19, 2019 at 07:11:44PM +0100, Cédric Le Goater wrote: >> and use a link to pass the system memory to the device models that >> require it to map/unmap BARs. This replace the use of get_system_memory() >> >> Signed-off-by: Cédric Le Goater > >

[PULL 0/1] Seabios 20191220 patches

2019-12-19 Thread Gerd Hoffmann
The following changes since commit aceeaa69d28e6f08a24395d0aa6915b687d0a681: Merge remote-tracking branch 'remotes/huth-gitlab/tags/pull-request-2019-12-17' into staging (2019-12-17 15:55:20 +) are available in the Git repository at: git://git.kraxel.org/qemu tags/seabios-20191220-pull

[PULL 1/1] seabios: update to 1.13.0 final

2019-12-19 Thread Gerd Hoffmann
Update to the final 1.13 release. No code changes. git shortlog Kevin O'Connor (1): docs: Note v1.13.0 release Signed-off-by: Gerd Hoffmann --- pc-bios/bios-256k.bin | Bin 262144 -> 262144 bytes pc-bios/bios.bin | Bin 131072 -> 131072 bytes pc

[PULL 0/2] Vga 20191220 patches

2019-12-19 Thread Gerd Hoffmann
The following changes since commit aceeaa69d28e6f08a24395d0aa6915b687d0a681: Merge remote-tracking branch 'remotes/huth-gitlab/tags/pull-request-2019-12-17' into staging (2019-12-17 15:55:20 +) are available in the Git repository at: git://git.kraxel.org/qemu tags/vga-20191220-pull-req

[PULL 2/2] display/bochs-display: fix memory leak

2019-12-19 Thread Gerd Hoffmann
From: Cameron Esfahani Fix memory leak in bochs_display_update(). Leaks 304 bytes per frame. Fixes: 33ebad54056 Signed-off-by: Cameron Esfahani Message-Id: Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Gerd Hoffmann --- hw/display/bochs-display.c | 2 ++ 1 file changed, 2 insertions(

[PULL 1/2] vhost-user-gpu: Drop trailing json comma

2019-12-19 Thread Gerd Hoffmann
From: Cole Robinson Trailing comma is not valid json: $ cat contrib/vhost-user-gpu/50-qemu-gpu.json.in | jq parse error: Expected another key-value pair at line 5, column 1 Signed-off-by: Cole Robinson Reviewed-by: Marc-André Lureau Reviewed-by: Li Qiang Reviewed-by: Philippe Mathieu-Daudé

[Bug 1856834] Re: Virtio broken in qemu ppc in 4.2.0 and other versions

2019-12-19 Thread ecsdn
Did you try with just a basic virtio disk and it works for you? Because even a basic virtio drive addition fails for me, even this fails on higher than 2.8.1 For example: qemu-system-ppc -M mpc8544ds -nographic -kernel /home/me/boot/uImage-2.6.32 -append "root=/dev/vda rw" -drive file=/home/me/m

Re: [PATCH v2 02/13] ppc/pnv: Introduce a "system-memory" property

2019-12-19 Thread David Gibson
On Thu, Dec 19, 2019 at 07:11:44PM +0100, Cédric Le Goater wrote: > and use a link to pass the system memory to the device models that > require it to map/unmap BARs. This replace the use of get_system_memory() > > Signed-off-by: Cédric Le Goater I don't really see the rationale for this. The s

[PATCH v2 07/13] dp8393x: Don't stop reception upon RBE interrupt assertion

2019-12-19 Thread Finn Thain
Section 5.4.7 of the datasheet explains that the RBE interrupt is an "early warning". It indicates that the last RBA is still available to receive a packet. It doesn't imply actual receive buffer exhaustion. This is an important distinction because Linux will not check and clear the RBE interrupt

[PATCH v2 09/13] dp8393x: Use long-word-aligned RRA pointers in 32-bit mode

2019-12-19 Thread Finn Thain
Section 3.4.1 of the datasheet says, The alignment of the RRA is confined to either word or long word boundaries, depending upon the data width mode. In 16-bit mode, the RRA must be aligned to a word boundary (A0 is always zero) and in 32-bit mode, the RRA is aligned to a long word

Re: [PATCH 00/10] Fixes for DP8393X SONIC device emulation

2019-12-19 Thread Finn Thain
On Sun, 15 Dec 2019, Aleksandar Markovic wrote: > > Herve, > > Is there any way for us to come up with an equivalent or at least > approximate scenario for Jazz machines? > > Regards, > Aleksandar > That would be useful in general, but in this case I think it might be better to test NetBSD,

[PATCH v2 05/13] dp8393x: Clear RRRA command register bit only when appropriate

2019-12-19 Thread Finn Thain
It doesn't make sense to clear the command register bit unless the command was actually issued. Signed-off-by: Finn Thain Reviewed-by: Philippe Mathieu-Daudé --- hw/net/dp8393x.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c index

[PATCH v2 01/13] dp8393x: Mask EOL bit from descriptor addresses

2019-12-19 Thread Finn Thain
The LSB of descriptor address registers is used as an EOL flag. It has to be masked when those registers are to be used as actual addresses for copying memory around. But when the registers are to be updated the EOL bit should not be masked. Signed-off-by: Finn Thain --- Changed since v1: - Adde

[PATCH v2 12/13] dp8393x: Always update RRA pointers and sequence numbers

2019-12-19 Thread Finn Thain
These operations have to take place regardless of whether or not rx descriptors have been used up (that is, EOL flag was observed). Signed-off-by: Finn Thain --- hw/net/dp8393x.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c

[PATCH v2 06/13] dp8393x: Implement packet size limit and RBAE interrupt

2019-12-19 Thread Finn Thain
Add a bounds check to prevent a large packet from causing a buffer overflow. This is defensive programming -- I haven't actually tried sending an oversized packet or a jumbo ethernet frame. The SONIC handles packets that are too big for the buffer by raising the RBAE interrupt and dropping them. L

[PATCH v2 11/13] dp8393x: Clear descriptor in_use field when necessary

2019-12-19 Thread Finn Thain
This is in accordance with section 3.4.7 of the datasheet: When the system appends more descriptors, the SONIC releases ownership of the descriptor after writing h to the RXpkt.in_use field. Signed-off-by: Finn Thain --- hw/net/dp8393x.c | 9 + 1 file changed, 9 insertions(+

[PATCH v2 13/13] dp8393x: Correctly advance RRP

2019-12-19 Thread Finn Thain
The last entry in the RRA is at the address given by the REA register. The address wrap-around logic is off-by-one entry. The last resource never gets used and RRP can jump over the RWP. The guest driver fails badly because the SONIC starts re-using old buffer addresses. Fix this. Signed-off-by: F

[PATCH v2 04/13] dp8393x: Update LLFA and CRDA registers from rx descriptor

2019-12-19 Thread Finn Thain
Follow the algorithm given in the National Semiconductor DP83932C datasheet in section 3.4.7: At the next reception, the SONIC re-reads the last RXpkt.link field, and updates its CRDA register to point to the next descriptor. The chip is designed to allow the host to provide a new list of

[PATCH v2 10/13] dp8393x: Pad frames to word or long word boundary

2019-12-19 Thread Finn Thain
The existing code has a bug where the Remaining Buffer Word Count (RBWC) is calculated with a truncating division, which gives the wrong result for odd-sized packets. Section 1.4.1 of the datasheet says, Once the end of the packet has been reached, the serializer will fill out the last wo

[PATCH v2 02/13] dp8393x: Clean up endianness hacks

2019-12-19 Thread Finn Thain
The in_use field is no different to the other words handled using dp8393x_put() and dp8393x_get(). Use the same technique for in_use that is used everywhere else. Signed-off-by: Finn Thain --- Changed since v1: - Use existing 'address' variable rather than declare a new one. Laurent tells me th

[PATCH v2 08/13] dp8393x: Don't clobber packet checksum

2019-12-19 Thread Finn Thain
A received packet consumes pkt_size bytes in the buffer and the frame checksum that's appended to it consumes another 4 bytes. The Receive Buffer Address register takes the former quantity into account but not the latter. So the next packet written to the buffer overwrites the frame checksum. Fix t

[PATCH v2 00/13] Fixes for DP8393X SONIC device emulation

2019-12-19 Thread Finn Thain
Hi All, There are bugs in the DP8393X emulation that can stop packet reception. Whilst debugging the device I found that the receiver algorithm differs from the one described in the National Semiconductor datasheet. These issues and others are addressed by this patch series. This series has onl

[PATCH v2 03/13] dp8393x: Have dp8393x_receive() return the packet size

2019-12-19 Thread Finn Thain
This function re-uses its 'size' argument as a scratch variable. Instead, declare a local 'size' variable for that purpose so that the function result doesn't get messed up. Signed-off-by: Finn Thain Reviewed-by: Philippe Mathieu-Daudé --- hw/net/dp8393x.c | 9 + 1 file changed, 5 inser

Re: [PATCH 00/10] Fixes for DP8393X SONIC device emulation

2019-12-19 Thread Finn Thain
On Mon, 16 Dec 2019, Finn Thain wrote: > 00:15:29.341601 IP truncated-ip - 52 bytes missing! 192.168.66.1 > > 192.168.66.111: ICMP echo request, id 23957, seq 12, length 64 ... > > Sniffing br0 on the host shows no sign of the truncated packet at all > which leaves a gap in the packet sequenc

Re:[Qemu-devel] [PATCH v2] vhost-vsock: report QMP eventwhensetrunning

2019-12-19 Thread ning.bo9
> > There will be an additional problem if do this: > > Who decides which port the `runtime` should listen? > > Let the host kernel automatically assign a port using VMADDR_PORT_ANY. > It works like this: > > struct sockaddr_vm svm = { > .svm_family = AF_VSOCK, > .svm_port = VMADDR_

[PATCH] util/module: fix a memory leak

2019-12-19 Thread pannengyuan
From: Pan Nengyuan spotted by ASAN Fixes: 81d8ccb1bea4fb9eaaf4c8e30bd4021180a9a39f Reported-by: Euler Robot Signed-off-by: Pan Nengyuan --- util/module.c | 1 + 1 file changed, 1 insertion(+) diff --git a/util/module.c b/util/module.c index e9fe3e5..8c5315a 100644 --- a/util/module.c +++ b/u

[PATCH V2] vhost-user-test: fix a memory leak

2019-12-19 Thread pannengyuan
From: Pan Nengyuan Spotted by ASAN. Reported-by: Euler Robot Signed-off-by: Pan Nengyuan --- Changes V2 to V1: - use a "goto cleanup", instead of duplicating the "free" functions. - free "dest_cmdline" at the end. --- tests/vhost-user-test.c | 5 - 1 file changed, 4 insertions(+), 1 delet

Re: [PATCH v4 3/4] ich9: Simplify ich9_lpc_initfn

2019-12-19 Thread Philippe Mathieu-Daudé
On 12/19/19 7:02 PM, Felipe Franciosi wrote: Currently, ich9_lpc_initfn simply serves as a caller to ich9_lpc_add_properties. This simplifies the code a bit by eliminating ich9_lpc_add_properties altogether and executing its logic in the parent object initialiser function. Signed-off-by: Felipe

Re: [PATCH v10 Kernel 4/5] vfio iommu: Implementation of ioctl to for dirty pages tracking.

2019-12-19 Thread Yan Zhao
On Fri, Dec 20, 2019 at 12:21:45AM +0800, Kirti Wankhede wrote: > > > On 12/19/2019 6:27 AM, Yan Zhao wrote: > > On Thu, Dec 19, 2019 at 04:05:52AM +0800, Dr. David Alan Gilbert wrote: > >> * Yan Zhao (yan.y.z...@intel.com) wrote: > >>> On Tue, Dec 17, 2019 at 07:47:05PM +0800, Kirti Wankhede wro

Re: [PATCH v2 01/13] ppc/pnv: Modify the powerdown notifier to get the PowerNV machine

2019-12-19 Thread David Gibson
On Thu, Dec 19, 2019 at 07:11:43PM +0100, Cédric Le Goater wrote: > Use container_of() instead of qdev_get_machine() > > Signed-off-by: Cédric Le Goater > Reviewed-by: Greg Kurz > Signed-off-by: Cédric Le Goater Applied to ppc-for-5.0. > --- > hw/ppc/pnv.c | 2 +- > 1 file changed, 1 inserti

Re: [PATCH v4 0/4] Improve default object property_add uint helpers

2019-12-19 Thread Alexey Kardashevskiy
On 20/12/2019 05:02, Felipe Franciosi wrote: > This improves the family of object_property_add_uintXX_ptr helpers by enabling > a default getter/setter only when desired. To prevent an API behavioural > change > (from clients that already used these helpers and did not want a setter), we > add

Re: [RFC PATCH 5/5] tests/boot_linux_console: Add a SLOW test booting Ubuntu on OrangePi PC

2019-12-19 Thread Cleber Rosa
On Wed, Dec 18, 2019 at 10:26:08PM +0100, Niek Linnenbank wrote: > Hi Philippe, > > This test has some problems on my host (Ubuntu 18.04.3 LTS, avocado 73.0, > python 3.6.9): > > (4/4) > tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_orangepi_bionic: > ERROR: Input format not

Re: [PATCH] 9p: init_in_iov_from_pdu can truncate the size

2019-12-19 Thread Stefano Stabellini
On Thu, 19 Dec 2019, Christian Schoenebeck wrote: > On Donnerstag, 19. Dezember 2019 01:42:51 CET Stefano Stabellini wrote: > > From: Stefano Stabellini > > > > init_in_iov_from_pdu might not be able to allocate the full buffer size > > requested, which comes from the client and could be larger t

Re: [PATCH] tests/vm: update openbsd to release 6.6

2019-12-19 Thread Brad Smith
ping. On 11/13/2019 10:33 PM, Brad Smith wrote: Thanks. Reviewed-by: Brad Smith On 10/18/2019 6:24 AM, Gerd Hoffmann wrote: Signed-off-by: Gerd Hoffmann --- tests/vm/openbsd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/vm/openbsd b/tests/vm/openbsd index b92

Re: [PATCH v3 0/1] Fix bochs memory leak

2019-12-19 Thread Cameron Esfahani via
Ping. Cameron Esfahani di...@apple.com "Americans are very skilled at creating a custom meaning from something that's mass-produced." Ann Powers > On Dec 12, 2019, at 12:30 AM, Cameron Esfahani via > wrote: > > Fix a small memory leak in the Bochs display driver. > > Each frame would leak

Re: [PATCH v10 Kernel 1/5] vfio: KABI for migration interface for device state

2019-12-19 Thread Alex Williamson
On Fri, 20 Dec 2019 01:40:35 +0530 Kirti Wankhede wrote: > On 12/19/2019 10:57 PM, Alex Williamson wrote: > > > > > >> + * 2. When VFIO application save state or suspend application, VFIO > >> device > >> + *state transition is from _RUNNING to stop-and-copy state and >

Re: [Qemu-devel] [PATCH] RISCV: support riscv vector extension 0.7.1

2019-12-19 Thread Richard Henderson
On 12/18/19 11:11 PM, LIU Zhiwei wrote: > I'm sorry that it's really hard to absorb your opinion. I don't know why clang > will fail > > when index beyond the end of vreg[n] into vreg[n+1]. I thought sure one of the address sanitizer checks would detect array bounds overrun. But it becomes irrel

[PATCH] audio: fix integer overflow

2019-12-19 Thread Volker Rümelin
Tell the compiler to do a 32bit * 32bit -> 64bit multiplication because period_ticks is a 64bit variable. The overflow occurs for audio timer periods larger than 4294967us. Fixes: be1092afa0 "audio: fix audio timer rate conversion bug" Signed-off-by: Volker Rümelin --- audio/audio.c | 2 +- 1 f

[PATCH 0/2] q800: fix and improve RTC/PRAM interface

2019-12-19 Thread Laurent Vivier
A bug has been reported on launchpad about an error reported by cc: qemu-4.2.0/hw/misc/mac_via.c:467:27: style: Expression is always false because 'else if' condition matches previous condition at line 463. [multiCondition] https://bugs.launchpad.net/qemu/+bug/1856549 In fact, the PRAM i

[PATCH 2/2] q800: add a block backend to the PRAM

2019-12-19 Thread Laurent Vivier
This allows to save and restore the content of the PRAM. It may be useful if we want to check the configuration or to change it. The backend is added using mtd interface, for instance: ... -drive file=pram.img,format=raw,if=mtd ... where pram.img is the file where the data will be stored, it

[PATCH 1/2] q800: fix mac_via RTC PRAM commands

2019-12-19 Thread Laurent Vivier
The command byte is not decoded correctly. This patch reworks the RTC/PRAM interface and fixes the problem. It adds a comment before the function to explain how are encoded commands and some trace-events to ease debugging. Bug: https://bugs.launchpad.net/qemu/+bug/1856549 Fixes: 6dca62a000 ("hw/m

Re: [PATCH v10 Kernel 1/5] vfio: KABI for migration interface for device state

2019-12-19 Thread Kirti Wankhede
On 12/19/2019 10:57 PM, Alex Williamson wrote: + * 2. When VFIO application save state or suspend application, VFIO device + *state transition is from _RUNNING to stop-and-copy state and then to + *_STOP. + *On state transition from _RUNNING to stop-and-copy, driver must + *

[PATCH 5/5] paaudio: wait until the recording stream is ready

2019-12-19 Thread Volker Rümelin
Don't call pa_stream_peek before the recording stream is ready. Information to reproduce the problem. Start and stop Audacity in the guest several times because the problem is racy. libvirt log file: -audiodev pa,id=audio0,server=localhost,out.latency=3, out.mixing-engine=off,in.mixing-engi

[PATCH 4/5] paaudio: try to drain the recording stream

2019-12-19 Thread Volker Rümelin
There is no guarantee a single call to pa_stream_peek every timer_period microseconds can read a recording stream faster than the data gets produced at the source. Let qpa_read try to drain the recording stream. To reproduce the problem: Start qemu with -audiodev pa,id=audio0,in.mixing-engine=off

[PATCH 3/5] paaudio: drop recording stream in qpa_fini_in

2019-12-19 Thread Volker Rümelin
Every call to pa_stream_peek which returns a data length > 0 should have a corresponding pa_stream_drop. A call to qpa_read does not necessarily call pa_stream_drop immediately after a call to pa_stream_peek. Test in qpa_fini_in if a last pa_stream_drop is needed. This prevents following messages

Re: [PATCH 3/5] tests/boot_linux_console: Add a SD card test for the OrangePi PC board

2019-12-19 Thread Cleber Rosa
On Tue, Dec 17, 2019 at 07:27:28PM +0100, Philippe Mathieu-Daudé wrote: > The kernel image and DeviceTree blob are built by the Raspbian > project (based on Debian): > https://www.raspbian.org/RaspbianImages > > The SD image is from the kernelci.org project: > https://kernelci.org/faq/#the-code >

[PATCH 2/5] hda-codec: fix recording rate control

2019-12-19 Thread Volker Rümelin
Apply previous commit to hda_audio_input_cb for the same reasons. Signed-off-by: Volker Rümelin --- hw/audio/hda-codec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/audio/hda-codec.c b/hw/audio/hda-codec.c index 768ba31e79..e711a99a41 100644 --- a/hw/audio/hda-code

[PATCH 1/5] hda-codec: fix playback rate control

2019-12-19 Thread Volker Rümelin
Since commit 1930616b98 "audio: make mixeng optional" the function hda_audio_output_cb can no longer assume the function parameter avail contains the free buffer size. With the playback mixing-engine turned off this leads to a broken playback rate control and playback buffer drops in regular interv

[PATCH 0/5] audio fixes

2019-12-19 Thread Volker Rümelin
Here are five patches to fix PulseAudio playback/recording with the mixing engine off. Volker Rümelin (5): hda-codec: fix playback rate control hda-codec: fix recording rate control paaudio: drop recording stream in qpa_fini_in paaudio: try to drain the recording stream paaudio: wait unt

Re: [PATCH v3 12/20] target/arm: generate xml description of our SVE registers

2019-12-19 Thread Alex Bennée
Richard Henderson writes: > On 12/11/19 9:05 AM, Alex Bennée wrote: >> +static struct TypeSize vec_lanes[] = { > > const. > >> +case 51: >> +return gdb_get_reg64(buf, (cpu->env.vfp.zcr_el[1] & 0xf) + 1); > > You need to use sve_zcr_len_for_el to get the effective vq. > Also, I thoug

Re: [PATCH 00/18] block: Allow exporting BDSs via FUSE

2019-12-19 Thread Max Reitz
On 19.12.19 15:38, Max Reitz wrote: [...] > Final rather important notice: I didn’t really run the iotests with this > yet. I wanted to, but they appear rather broken on current master, > actually. I’m not yet sure whether that’s because something in my setup > broke in the last two weeks, or b

[PATCH] target/arm: Set ISSIs16Bit in make_issinfo

2019-12-19 Thread Richard Henderson
During the conversion to decodetree, the setting of ISSIs16Bit got lost. This causes the guest os to incorrectly adjust trapping memory operations. Fixes: 46beb58efbb8a2a32 Cc: qemu-sta...@nongnu.org Reported-by: Jeff Kubascik Signed-off-by: Richard Henderson --- target/arm/translate.c | 3 +++

[RFC PATCH 13/13] hw/timer/allwinner: Rename functions not specific to the A10 SoC

2019-12-19 Thread Philippe Mathieu-Daudé
These functions are used by different Allwinner timer controllers, rename them. Signed-off-by: Philippe Mathieu-Daudé --- hw/timer/allwinner-a10-pit.c | 52 ++-- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/hw/timer/allwinner-a10-pit.c b/hw/time

[RFC PATCH 12/13] hw/timer/allwinner: Rename AW_A10_PIT() as AW_TIMER_CTRL()

2019-12-19 Thread Philippe Mathieu-Daudé
This macro is now used by different Allwinner timer controllers, rename it. Signed-off-by: Philippe Mathieu-Daudé --- hw/timer/allwinner-a10-pit.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/timer/allwinner-a10-pit.c b/hw/timer/allwinner-a10-pit.c index

Re: [PATCH v2 02/10] hw: arm: add Xunlong Orange Pi PC machine

2019-12-19 Thread Philippe Mathieu-Daudé
On 12/18/19 9:14 PM, Niek Linnenbank wrote: Hi Philippe, Thanks again for your quick and helpful feedback! :-) On Tue, Dec 17, 2019 at 8:31 AM Philippe Mathieu-Daudé mailto:phi...@redhat.com>> wrote: Hi Niek, On 12/17/19 12:35 AM, Niek Linnenbank wrote: > The Xunlong Orange Pi

[RFC PATCH 09/13] hw/timer/allwinner: Rename AwA10TimerContext as AllwinnerTmrState

2019-12-19 Thread Philippe Mathieu-Daudé
This structure will be common to various Allwinner timer controllers, rename it. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/timer/allwinner-a10-pit.h | 6 +++--- hw/timer/allwinner-a10-pit.c | 14 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/

[RFC PATCH 07/13] hw/timer/allwinner: Move timer specific fields into AwA10TimerContext

2019-12-19 Thread Philippe Mathieu-Daudé
Move all the timer-related fields into the same structure. We scrambled the migration structure, so we need to increase the version_id. Signed-off-by: Philippe Mathieu-Daudé --- Before I was using g_new(), now I keep AW_PIT_TIMER_MAX so We might avoid this patch. --- include/hw/timer/allwinner-a

[RFC PATCH 06/13] hw/timer/allwinner: Rename 'timer_context' as 'timer'

2019-12-19 Thread Philippe Mathieu-Daudé
The previous 'timer' field has been renamed as 'ptimer'. The 'timer_context' can now be simplified as 'timer'. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/timer/allwinner-a10-pit.h | 2 +- hw/timer/allwinner-a10-pit.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) dif

[RFC PATCH 05/13] hw/timer/allwinner: Rename the ptimer field

2019-12-19 Thread Philippe Mathieu-Daudé
We will later use the 'timer' field name to access all the timer related fields. The name is already use, we need to rename first. 'ptimer' is a good name. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/timer/allwinner-a10-pit.h | 2 +- hw/timer/allwinner-a10-pit.c | 34 ++

[RFC PATCH 08/13] hw/timer/allwinner: Add a timer_count field

2019-12-19 Thread Philippe Mathieu-Daudé
To be able to support controllers with less than 6 timers, we need a field to be able to iterate over the different count. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/timer/allwinner-a10-pit.h | 1 + hw/timer/allwinner-a10-pit.c | 10 ++ 2 files changed, 7 insertions(+)

Re: [PATCH v2 02/13] ppc/pnv: Introduce a "system-memory" property

2019-12-19 Thread Greg Kurz
On Thu, 19 Dec 2019 19:11:44 +0100 Cédric Le Goater wrote: > and use a link to pass the system memory to the device models that > require it to map/unmap BARs. This replace the use of get_system_memory() > > Signed-off-by: Cédric Le Goater > --- Reviewed-by: Greg Kurz > include/hw/ppc/pnv.h

Re: [PATCH v10 Kernel 4/5] vfio iommu: Implementation of ioctl to for dirty pages tracking.

2019-12-19 Thread Alex Williamson
On Fri, 20 Dec 2019 00:12:30 +0530 Kirti Wankhede wrote: > On 12/19/2019 3:09 AM, Alex Williamson wrote: > > On Tue, 17 Dec 2019 14:54:14 +0530 > > Kirti Wankhede wrote: > > > >> On 12/17/2019 10:45 AM, Yan Zhao wrote: > >>> On Tue, Dec 17, 2019 at 04:21:39AM +0800, Kirti Wankhede wrote:

[PATCH 04/13] hw/timer/allwinner: Move definitions from header to source

2019-12-19 Thread Philippe Mathieu-Daudé
These definitions are only used in the implementation, thus don't need to be exported. Move them in the source file. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/timer/allwinner-a10-pit.h | 28 -- hw/timer/allwinner-a10-pit.c | 30 +

[PATCH 02/13] hw/timer/allwinner: Add AW_PIT_TIMER_MAX definition

2019-12-19 Thread Philippe Mathieu-Daudé
This controller is able to use up to 6 timers. Later we will reuse part of it to model other similar controllers but with less timers. To simplify the VMSTATE, we'll keep a max of 6 timers. Add a definition for that value. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/timer/allwinner-a10-

[PATCH 03/13] hw/timer/allwinner: Remove unused definitions

2019-12-19 Thread Philippe Mathieu-Daudé
Keeping unused definition is rather confusing when reviewing. Remove them. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/timer/allwinner-a10-pit.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/hw/timer/allwinner-a10-pit.h b/include/hw/timer/allwinner-a10-pit.h index 54c40c

[RFC PATCH 10/13] hw/timer/allwinner: Rename AwA10PITState as AllwinnerTmrCtrlState

2019-12-19 Thread Philippe Mathieu-Daudé
This structure will be common to various Allwinner timer controllers, rename it. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/arm/allwinner-a10.h | 2 +- include/hw/timer/allwinner-a10-pit.h | 6 ++-- hw/timer/allwinner-a10-pit.c | 42 ++-- 3 files

[RFC PATCH 11/13] hw/timer/allwinner: Introduce TYPE_AW_COMMON_PIT abstract device

2019-12-19 Thread Philippe Mathieu-Daudé
Extract the common code from the TYPE_AW_A10_PIT device into a new abstract device: TYPE_AW_COMMON_PIT, then use it as parent, so we inherit the same functionalities. Signed-off-by: Philippe Mathieu-Daudé --- At this point, the only fields we can modify are the timer_count and the region_size. No

[RFC PATCH 00/13] hw/timer/allwinner: Make it reusable

2019-12-19 Thread Philippe Mathieu-Daudé
Hi, Niek added the H3 SoC in [1] and noticed in [2] the timer controller is very similar (less timers, watchdog register placed at different address). On 12/18/19 9:14 PM, Niek Linnenbank wrote: > Actually, I copied the timer support code from the existing cubieboard.c > that has > the Allwinner

[PATCH 01/13] hw/timer/allwinner: Use the AW_A10_PIT_TIMER_NR definition

2019-12-19 Thread Philippe Mathieu-Daudé
We have a definition for this magic value '6', use it. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/timer/allwinner-a10-pit.h | 2 +- hw/timer/allwinner-a10-pit.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/hw/timer/allwinner-a10-pit.h b/includ

Re: [PATCH v10 Kernel 4/5] vfio iommu: Implementation of ioctl to for dirty pages tracking.

2019-12-19 Thread Kirti Wankhede
On 12/19/2019 3:09 AM, Alex Williamson wrote: On Tue, 17 Dec 2019 14:54:14 +0530 Kirti Wankhede wrote: On 12/17/2019 10:45 AM, Yan Zhao wrote: On Tue, Dec 17, 2019 at 04:21:39AM +0800, Kirti Wankhede wrote: + } else if (range.flags & +VFIO_IOM

[Bug 1854204] Re: Menu is not clickable on OSX Catalina

2019-12-19 Thread Nikita Tsukanov
The workaround on SO was posted way back in 2011. It has initially solved a different issue, I think. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1854204 Title: Menu is not clickable on OSX Catal

[PATCH v2] iotests.py: Let wait_migration wait even more

2019-12-19 Thread Max Reitz
The "migration completed" event may be sent (on the source, to be specific) before the migration is actually completed, so the VM runstate will still be "finish-migrate" instead of "postmigrate". So ask the users of VM.wait_migration() to specify the final runstate they desire and then poll the VM

Re: [PATCH for-5.0 v11 05/20] virtio-iommu: Endpoint and domains structs and helpers

2019-12-19 Thread Auger Eric
Hi Jean, On 12/10/19 5:37 PM, Jean-Philippe Brucker wrote: > On Fri, Nov 22, 2019 at 07:29:28PM +0100, Eric Auger wrote: >> +typedef struct viommu_domain { >> +uint32_t id; >> +GTree *mappings; >> +QLIST_HEAD(, viommu_endpoint) endpoint_list; >> +} viommu_domain; >> + >> +typedef struc

Re: [PATCH 2/5] tests/boot_linux_console: Add initrd test for the Orange Pi PC board

2019-12-19 Thread Cleber Rosa
On Tue, Dec 17, 2019 at 07:27:27PM +0100, Philippe Mathieu-Daudé wrote: > This test boots a Linux kernel on a OrangePi PC board and verify > the serial output is working. > > The kernel image and DeviceTree blob are built by the Raspbian > project (based on Debian): > https://www.raspbian.org/Rasp

[PATCH] backup-top: Begin drain earlier

2019-12-19 Thread Max Reitz
When dropping backup-top, we need to drain the node before freeing the BlockCopyState. Otherwise, requests may still be in flight and then the assertion in shres_destroy() will fail. (This becomes visible in intermittent failure of 056.) Cc: qemu-sta...@nongnu.org Signed-off-by: Max Reitz ---

[PATCH v2 11/13] xive: Add a "presenter" link property to the TCTX object

2019-12-19 Thread Cédric Le Goater
This will be used in subsequent patches to access the XIVE associated to a TCTX without reaching out to the machine through qdev_get_machine(). Signed-off-by: Cédric Le Goater [ groug: - split patch - write subject and changelog ] Signed-off-by: Greg Kurz Signed-off-by: Cédric Le Goater

Re: [PATCH 1/5] tests/boot_linux_console: Add a quick test for the OrangePi PC board

2019-12-19 Thread Cleber Rosa
On Wed, Dec 18, 2019 at 08:05:15PM -0500, Cleber Rosa wrote: > On Tue, Dec 17, 2019 at 07:27:26PM +0100, Philippe Mathieu-Daudé wrote: > > This test boots a Linux kernel on a OrangePi PC board and verify > > the serial output is working. > > > > The kernel image and DeviceTree blob are built by th

[PATCH v2 09/13] ppc/pnv: Add an "nr-threads" property to the base chip class

2019-12-19 Thread Cédric Le Goater
From: Greg Kurz Set it at chip creation and forward it to the cores. This allows to drop a call to qdev_get_machine(). Signed-off-by: Greg Kurz Signed-off-by: Cédric Le Goater --- include/hw/ppc/pnv.h | 1 + hw/ppc/pnv.c | 8 +--- 2 files changed, 6 insertions(+), 3 deletions(-)

[PATCH v2 13/13] pnv/xive: Deduce the PnvXive pointer from XiveTCTX::xptr

2019-12-19 Thread Cédric Le Goater
From: Greg Kurz And use it instead of reaching out to the machine. This allows to get rid of pnv_get_chip(). Signed-off-by: Greg Kurz Signed-off-by: Cédric Le Goater --- include/hw/ppc/pnv.h | 2 -- hw/intc/pnv_xive.c | 8 ++-- hw/ppc/pnv.c | 14 -- 3 files changed

[PATCH v2 06/13] pnv/xive: Use device_class_set_parent_realize()

2019-12-19 Thread Cédric Le Goater
From: Greg Kurz The XIVE router base class currently inherits an empty realize hook from the sysbus device base class, but it will soon implement one of its own to perform some sanity checks. Do the preliminary plumbing to have it called. Signed-off-by: Greg Kurz Signed-off-by: Cédric Le Goater

[PATCH v2 10/13] ppc/pnv: Add a "pnor" const link property to the BMC internal simulator

2019-12-19 Thread Cédric Le Goater
From: Greg Kurz This allows to get rid of a call to qdev_get_machine(). Signed-off-by: Greg Kurz Signed-off-by: Cédric Le Goater --- include/hw/ppc/pnv.h | 2 +- hw/ppc/pnv.c | 2 +- hw/ppc/pnv_bmc.c | 8 +--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/incl

[PATCH v2 08/13] xive: Use the XIVE fabric link under the XIVE router

2019-12-19 Thread Cédric Le Goater
From: Greg Kurz Now that the spapr and pnv machines do set the "xive-fabric" link, the use of the XIVE fabric pointer becomes mandatory. This is checked with an assert() in a new realize hook. Since the XIVE router is realized at machine init for the all the machine's life time, no risk to abort

[PATCH v2 07/13] spapr, pnv, xive: Add a "xive-fabric" link to the XIVE router

2019-12-19 Thread Cédric Le Goater
From: Greg Kurz In order to get rid of qdev_get_machine(), first add a pointer to the XIVE fabric under the XIVE router and make it configurable through a QOM link property. Configure it in the spapr and pnv machine. In the case of pnv, the XIVE routers are under the chip, so this is done with a

[PATCH v2 03/13] ppc/pnv: Introduce a "xics" property alias under the PSI model

2019-12-19 Thread Cédric Le Goater
This removes the need of the intermediate link under PSI to pass the XICS link to the underlying ICSState object. Signed-off-by: Cédric Le Goater Reviewed-by: Greg Kurz Signed-off-by: Cédric Le Goater --- hw/ppc/pnv.c | 4 ++-- hw/ppc/pnv_psi.c | 11 ++- 2 files changed, 4 inserti

[PATCH v2 05/13] spapr/xive: Use device_class_set_parent_realize()

2019-12-19 Thread Cédric Le Goater
From: Greg Kurz The XIVE router base class currently inherits an empty realize hook from the sysbus device base class, but it will soon implement one of its own to perform some sanity checks. Do the preliminary plumbing to have it called. Signed-off-by: Greg Kurz Signed-off-by: Cédric Le Goater

[PATCH v2 02/13] ppc/pnv: Introduce a "system-memory" property

2019-12-19 Thread Cédric Le Goater
and use a link to pass the system memory to the device models that require it to map/unmap BARs. This replace the use of get_system_memory() Signed-off-by: Cédric Le Goater --- include/hw/ppc/pnv.h | 2 ++ include/hw/ppc/pnv_psi.h | 1 + include/hw/ppc/pnv_xive.h | 2 ++ hw/intc/pnv_xiv

[PATCH v2 00/13] ppc/pnv: remove the use of qdev_get_machine() and get_system_memory()

2019-12-19 Thread Cédric Le Goater
Hello, The PowerNV and sPAPR machine use qdev_get_machine() and get_system_memory() in some places. This is not a good modeling pratice and it should be avoided. This series replaces the uses of these routines with a set of QOM properties and aliases. Thanks, C. Changes since v1: - fixed a mi

[PATCH v2 12/13] spapr/xive: Deduce the SpaprXive pointer from XiveTCTX::xptr

2019-12-19 Thread Cédric Le Goater
From: Greg Kurz And use it instead of reaching out to the machine. This allows to get rid of a call to qdev_get_machine() and to reduce the scope of another one so that it is only used within the argument list of error_append_hint(). This is an acceptable tradeoff compared to all it would require

[PATCH v2 04/13] ppc/pnv: Introduce a "xics" property under the POWER8 chip

2019-12-19 Thread Cédric Le Goater
POWER8 is the only chip using the XICS interface. Add a "xics" link and a XICSFabric attribute under this chip to remove the use of qdev_get_machine() Signed-off-by: Cédric Le Goater Reviewed-by: Greg Kurz Signed-off-by: Cédric Le Goater --- include/hw/ppc/pnv.h | 2 ++ hw/ppc/pnv.c |

Re: [PATCH for-5.0 v11 04/20] virtio-iommu: Add the iommu regions

2019-12-19 Thread Auger Eric
Hi Jean, On 12/10/19 5:34 PM, Jean-Philippe Brucker wrote: > Two small things below, but looks good overall > > Reviewed-by: Jean-Philippe Brucker > > On Fri, Nov 22, 2019 at 07:29:27PM +0100, Eric Auger wrote: >> +static AddressSpace *virtio_iommu_find_add_as(PCIBus *bus, void *opaque, >> +

[PATCH v2 01/13] ppc/pnv: Modify the powerdown notifier to get the PowerNV machine

2019-12-19 Thread Cédric Le Goater
Use container_of() instead of qdev_get_machine() Signed-off-by: Cédric Le Goater Reviewed-by: Greg Kurz Signed-off-by: Cédric Le Goater --- hw/ppc/pnv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index f77e7ca84ede..855254f28263 100644 --- a

[PATCH v4 4/4] qom/object: Use common get/set uint helpers

2019-12-19 Thread Felipe Franciosi
Several objects implemented their own uint property getters and setters, despite them being straightforward (without any checks/validations on the values themselves) and identical across objects. This makes use of an enhanced API for object_property_add_uintXX_ptr() which offers default setters. S

  1   2   3   4   5   >