[PATCH v5 10/10] KVM: Dirty ring support

2021-03-10 Thread Peter Xu
KVM dirty ring is a new interface to pass over dirty bits from kernel to the userspace. Instead of using a bitmap for each memory region, the dirty ring contains an array of dirtied GPAs to fetch (in the form of offset in slots). For each vcpu there will be one dirty ring that binds to it.

[PATCH v5 00/10] KVM: Dirty ring support (QEMU part)

2021-03-10 Thread Peter Xu
This is v5 of the qemu dirty ring interface support. v5: - rebase - dropped patch "update-linux-headers: Include const.h" after rebase - dropped patch "KVM: Fixup kvm_log_clear_one_slot() ioctl return check" since similar patch got merged recently (38e0b7904eca7cd32f8953c3) = v4 cover

[PATCH v5 05/10] KVM: Provide helper to sync dirty bitmap from slot to ramblock

2021-03-10 Thread Peter Xu
kvm_physical_sync_dirty_bitmap() calculates the ramblock offset in an awkward way from the MemoryRegionSection that passed in from the caller. The truth is for each KVMSlot the ramblock offset never change for the lifecycle. Cache the ramblock offset for each KVMSlot into the structure when the

[PATCH v5 06/10] KVM: Simplify dirty log sync in kvm_set_phys_mem

2021-03-10 Thread Peter Xu
kvm_physical_sync_dirty_bitmap() on the whole section is inaccurate, because the section can be a superset of the memslot that we're working on. The result is that if the section covers multiple kvm memslots, we could be doing the synchronization for multiple times for each kvmslot in the

[PATCH v5 08/10] KVM: Add dirty-gfn-count property

2021-03-10 Thread Peter Xu
Add a parameter for dirty gfn count for dirty rings. If zero, dirty ring is disabled. Otherwise dirty ring will be enabled with the per-vcpu gfn count as specified. If dirty ring cannot be enabled due to unsupported kernel or illegal parameter, it'll fallback to dirty logging. By default,

[PATCH v5 04/10] KVM: Provide helper to get kvm dirty log

2021-03-10 Thread Peter Xu
Provide a helper kvm_slot_get_dirty_log() to make the function kvm_physical_sync_dirty_bitmap() clearer. We can even cache the as_id into KVMSlot when it is created, so that we don't even need to pass it down every time. Since at it, remove return value of kvm_physical_sync_dirty_bitmap()

[PATCH v5 01/10] memory: Introduce log_sync_global() to memory listener

2021-03-10 Thread Peter Xu
Some of the memory listener may want to do log synchronization without being able to specify a range of memory to sync but always globally. Such a memory listener should provide this new method instead of the log_sync() method. Obviously we can also achieve similar thing when we put the global

[PATCH v5 02/10] KVM: Use a big lock to replace per-kml slots_lock

2021-03-10 Thread Peter Xu
Per-kml slots_lock will bring some trouble if we want to take all slots_lock of all the KMLs, especially when we're in a context that we could have taken some of the KML slots_lock, then we even need to figure out what we've taken and what we need to take. Make this simple by merging all KML

[PATCH v5 03/10] KVM: Create the KVMSlot dirty bitmap on flag changes

2021-03-10 Thread Peter Xu
Previously we have two places that will create the per KVMSlot dirty bitmap: 1. When a newly created KVMSlot has dirty logging enabled, 2. When the first log_sync() happens for a memory slot. The 2nd case is lazy-init, while the 1st case is not (which is a fix of what the 2nd case missed).

Re: [PATCH 1/2] hw/mips/jazz: Use generic I/O bus via get_system_io()

2021-03-10 Thread Peter Xu
On Wed, Mar 10, 2021 at 09:11:40PM +0100, Philippe Mathieu-Daudé wrote: > >> /* ISA bus: IO space at 0x9000, mem space at 0x9100 */ > >> -memory_region_init(isa_io, NULL, "isa-io", 0x0001); > >> memory_region_init(isa_mem, NULL, "isa-mem", 0x0100); > >> -

Re: [PATCH] vfio: Support host translation granule size

2021-03-10 Thread Alex Williamson
On Wed, 10 Mar 2021 15:19:33 +0800 Kunkun Jiang wrote: > Hi Alex, > > On 2021/3/10 7:17, Alex Williamson wrote: > > On Thu, 4 Mar 2021 21:34:46 +0800 > > Kunkun Jiang wrote: > > > >> The cpu_physical_memory_set_dirty_lebitmap() can quickly deal with > >> the dirty pages of memory by

Re: [PATCH v4 00/78] target/arm: Implement SVE2

2021-03-10 Thread Peter Maydell
On Tue, 9 Mar 2021 at 16:20, Richard Henderson wrote: > > After a 6-month hiatus, sve2 is back. This time, with RISU > testing vs FVP 11.13.36. > > Based-on: 20210309155305.11301-1-richard.hender...@linaro.org > ("target/arm: sve1 fixes") Are you hoping to squeeze this into 6.0, or can I delay

Re: [PATCH v1 4/7] tests/docker: add "fetch" sub-command

2021-03-10 Thread Philippe Mathieu-Daudé
On 3/10/21 8:23 PM, Alex Bennée wrote: > This simply wraps up fetching a build from the registry and tagging it > as the local build. > > Signed-off-by: Alex Bennée > --- > tests/docker/docker.py | 17 + > 1 file changed, 17 insertions(+) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 1/2] hw/mips/jazz: Use generic I/O bus via get_system_io()

2021-03-10 Thread Philippe Mathieu-Daudé
On 3/10/21 8:49 PM, Peter Xu wrote: > On Wed, Mar 10, 2021 at 08:12:54PM +0100, Philippe Mathieu-Daudé wrote: >> No need to create a local ISA I/O MemoryRegion, use get_system_io(). >> >> This partly reverts commit 5c63bcf7501527b844f61624957bdba254d75bfc. > > I think it's not a clean revert of

Re: [PULL 00/14] Gitlab, testing and misc patches

2021-03-10 Thread Peter Maydell
On Tue, 9 Mar 2021 at 10:55, Thomas Huth wrote: > > Hi Peter, > > the following changes since commit 229a834518b950d56fd1bc94923276504d0ee9d4: > > Merge remote-tracking branch 'remotes/philmd-gitlab/tags/renesas-20210306' > into staging (2021-03-08 15:45:48 +) > > are available in the Git

[PATCH v4 4/5] tests/acceptance: update sunxi kernel from armbian to 5.10.16

2021-03-10 Thread Niek Linnenbank
The linux kernel 4.20.7 binary for sunxi has been removed from apt.armbian.com: $ ARMBIAN_ARTIFACTS_CACHED=yes AVOCADO_ALLOW_LARGE_STORAGE=yes avocado --show=app,console run -t machine:orangepi-pc tests/acceptance/boot_linux_console.py Fetching asset from

[PATCH v4 5/5] tests/acceptance: drop ARMBIAN_ARTIFACTS_CACHED condition for orangepi-pc, cubieboard tests

2021-03-10 Thread Niek Linnenbank
Previously the ARMBIAN_ARTIFACTS_CACHED pre-condition was added to allow running tests that have already existing armbian.com artifacts stored in the local avocado cache, but do not have working URLs to download a fresh copy. At this time of writing the URLs for artifacts on the armbian.com

[PATCH v4 1/5] hw/net/allwinner-sun8i-emac: traverse transmit queue using TX_CUR_DESC register value

2021-03-10 Thread Niek Linnenbank
Currently the emulated EMAC for sun8i always traverses the transmit queue from the head when transferring packets. It searches for a list of consecutive descriptors whichs are flagged as ready for processing and transmits their payloads accordingly. The controller stops processing once it finds a

[PATCH v4 2/5] tests/acceptance/boot_linux_console: remove Armbian 19.11.3 bionic test for orangepi-pc machine

2021-03-10 Thread Niek Linnenbank
The image for Armbian 19.11.3 bionic has been removed from the armbian server. Without the image as input the test arm_orangepi_bionic_19_11 cannot run. This commit removes the test completely and merges the code of the generic function do_test_arm_orangepi_uboot_armbian back with the 20.08

[PATCH v4 3/5] tests/acceptance/boot_linux_console: change URL for test_arm_orangepi_bionic_20_08

2021-03-10 Thread Niek Linnenbank
Update the download URL of the Armbian 20.08 Bionic image for test_arm_orangepi_bionic_20_08 of the orangepi-pc machine. The archive.armbian.com URL contains more images and should keep stable for a longer period of time than dl.armbian.com. Signed-off-by: Niek Linnenbank Reviewed-by: Philippe

[PATCH v4 0/5] Allwinner H3 fixes for EMAC and acceptance tests

2021-03-10 Thread Niek Linnenbank
The following are maintenance patches for the Allwinner H3. The first patch resolves artifact download errors by updating the URLs to the armbian.com server. The second patch is a fix for the EMAC that is used by the Allwinner H3 / Orange Pi PC machine. All these patches have been reviewed and

Re: [PATCH 1/2] hw/mips/jazz: Use generic I/O bus via get_system_io()

2021-03-10 Thread Peter Xu
On Wed, Mar 10, 2021 at 08:12:54PM +0100, Philippe Mathieu-Daudé wrote: > No need to create a local ISA I/O MemoryRegion, use get_system_io(). > > This partly reverts commit 5c63bcf7501527b844f61624957bdba254d75bfc. I think it's not a clean revert of that, see below. > > Signed-off-by:

Re: [PATCH v1 0/7] testing/next (hexagon 2, electric boogaloo)

2021-03-10 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210310192331.29284-1-alex.ben...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210310192331.29284-1-alex.ben...@linaro.org Subject: [PATCH v1 0/7] testing/next

Re: [RFC] hw/display: add virtio-ramfb device

2021-03-10 Thread Laszlo Ersek
On 03/10/21 17:42, Joelle van Dyne wrote: > On Wed, Mar 10, 2021 at 4:45 AM Laszlo Ersek wrote: >> >> On 03/10/21 10:51, Gerd Hoffmann wrote: >>> On Tue, Mar 09, 2021 at 01:35:13PM -0800, Joelle van Dyne wrote: Like virtio-vga, but using ramfb instead of legacy vga. Useful for booting

[PATCH v1 7/7] gitlab: add build-user-hexagon test

2021-03-10 Thread Alex Bennée
We special case this as the container with the cross compiler for the tests takes so long to build it is manually uploaded into the registry. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Wainer dos Santos Moschetta Message-Id:

[PATCH v1 6/7] tests/tcg: Use Hexagon Docker image

2021-03-10 Thread Alex Bennée
From: Alessandro Di Federico [PMD: Split from 'Add Hexagon Docker image' patch] Signed-off-by: Alessandro Di Federico Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20210228222314.304787-5-f4...@amsat.org> Message-Id:

Re: [PATCH v3 3/3] target/arm: set ID_AA64ISAR0.TLB to 2 for max AARCH64 CPU type

2021-03-10 Thread Richard Henderson
On 3/9/21 6:29 PM, Rebecca Cran wrote: @@ -651,6 +651,7 @@ static void aarch64_max_initfn(Object *obj) t = FIELD_DP64(t, ID_AA64ISAR0, DP, 1); t = FIELD_DP64(t, ID_AA64ISAR0, FHM, 1); t = FIELD_DP64(t, ID_AA64ISAR0, TS, 2); /* v8.5-CondM */ +t =

[PATCH v2 1/1] docs/devel: Add VFIO device migration documentation

2021-03-10 Thread Tarun Gupta
Document interfaces used for VFIO device migration. Added flow of state changes during live migration with VFIO device. Tested by building docs with the new vfio-migration.rst file. v2: - Included the new vfio-migration.rst file in index.rst - Updated dirty page tracking section, also added

[PATCH v1 0/7] testing/next (hexagon 2, electric boogaloo)

2021-03-10 Thread Alex Bennée
Hi, This is basically the bits I dropped out of the in-flight PR: pull-testing-docs-xen-updates-080321-2 In an attempt to avoid docker caching shenanigans I basically took the fugly hammer to our existing over-engineered docker.py script to grow new features to handle the case of images we

[PATCH v1 1/7] tests/docker: fix copying of executable in "update"

2021-03-10 Thread Alex Bennée
We have the same symlink chasing problem when doing an "update" operation. Fix that. Based-on: 5e33f7fead ("tests/docker: better handle symlinked libs") Signed-off-by: Alex Bennée --- tests/docker/docker.py | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git

Re: [PATCH v3 2/3] target/arm: Add support for FEAT_TLBIOS

2021-03-10 Thread Richard Henderson
On 3/9/21 6:29 PM, Rebecca Cran wrote: +static inline bool isar_feature_aa64_tlbios(const ARMISARegisters *id) +{ +return FIELD_EX64(id->id_aa64isar0, ID_AA64ISAR0, TLB) == 1 || + FIELD_EX64(id->id_aa64isar0, ID_AA64ISAR0, TLB) == 2; +} The correct test here is != 0. See D13.1.3

Re: [PATCH 2/3] memory: Provide 'base address' argument to mtree_print_mr()

2021-03-10 Thread Peter Xu
On Wed, Mar 10, 2021 at 08:09:59PM +0100, Philippe Mathieu-Daudé wrote: > On 3/10/21 6:06 PM, Peter Xu wrote: > > Phil, > > > > On Tue, Mar 09, 2021 at 10:54:18PM +0100, Philippe Mathieu-Daudé wrote: > >> +Peter/Mark/Edgar for SoC modelling > >> > >> On 3/9/21 10:39 AM, Philippe Mathieu-Daudé

[PATCH v1 5/7] docker: Add Hexagon image

2021-03-10 Thread Alex Bennée
From: Alessandro Di Federico This image is a little special because it takes a long time to build. As such most users don't want to be doing that and just pull random binaries from the ether as intended by the container gods. This involves someone with credentials and a beefy machine running:

[PATCH v1 3/7] tests/docker: allow "update" to add the current user

2021-03-10 Thread Alex Bennée
The current user functionality is used for cross compiling to avoid complications with permissions when building test programs. However for images that come from the registry we still need the ability to add the user after the fact. Signed-off-by: Alex Bennée --- tests/docker/docker.py | 12

Re: [PATCH v3 1/3] target/arm: Add support for FEAT_TLBIRANGE

2021-03-10 Thread Richard Henderson
On 3/9/21 6:29 PM, Rebecca Cran wrote: +void tlb_flush_page_range_by_mmuidx(CPUState *cpu, target_ulong addr, +unsigned int num_pages, uint16_t idxmap) I am not keen on this interface. I think you should take either start+end addresses (inclusive) or

[PATCH v1 4/7] tests/docker: add "fetch" sub-command

2021-03-10 Thread Alex Bennée
This simply wraps up fetching a build from the registry and tagging it as the local build. Signed-off-by: Alex Bennée --- tests/docker/docker.py | 17 + 1 file changed, 17 insertions(+) diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 86d31a5fe6..f6f461bbc9

[PATCH v1 2/7] tests/docker: make executable an optional argument to "update"

2021-03-10 Thread Alex Bennée
We're going to extend the abilities of the command shortly. Signed-off-by: Alex Bennée --- tests/docker/Makefile.include | 2 +- tests/docker/docker.py| 56 ++- 2 files changed, 30 insertions(+), 28 deletions(-) diff --git

[PATCH 1/2] hw/mips/jazz: Use generic I/O bus via get_system_io()

2021-03-10 Thread Philippe Mathieu-Daudé
No need to create a local ISA I/O MemoryRegion, use get_system_io(). This partly reverts commit 5c63bcf7501527b844f61624957bdba254d75bfc. Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/jazz.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/mips/jazz.c

[PATCH 2/2] NOTFORMERGE memory: Ensure AddressSpace physical base address is zero

2021-03-10 Thread Philippe Mathieu-Daudé
AddressSpaces aren't suppose to have a physical base address. Add an assertion to demostrate the problem: $ echo info mtree | qemu-system-mips64el -M magnum -S -monitor stdio QEMU 5.2.50 monitor - type 'help' for more information (qemu) info mtree address-space: memory

Re: [PATCH 2/3] memory: Provide 'base address' argument to mtree_print_mr()

2021-03-10 Thread Philippe Mathieu-Daudé
On 3/10/21 6:06 PM, Peter Xu wrote: > Phil, > > On Tue, Mar 09, 2021 at 10:54:18PM +0100, Philippe Mathieu-Daudé wrote: >> +Peter/Mark/Edgar for SoC modelling >> >> On 3/9/21 10:39 AM, Philippe Mathieu-Daudé wrote: >>> Hi Peter, >>> >>> On 3/9/21 12:40 AM, Peter Xu wrote:> On Sat, Mar 06, 2021 at

[PATCH v6 5/7] net/eth: Check iovec has enough data earlier

2021-03-10 Thread Philippe Mathieu-Daudé
We want to check fields from ip6_ext_hdr_routing structure and if correct read the full in6_address. Let's directly check if our iovec contains enough data for everything, else return early. Suggested-by: Stefano Garzarella Signed-off-by: Philippe Mathieu-Daudé --- net/eth.c | 2 +- 1 file

[PATCH v6 7/7] net/eth: Add an assert() and invert if() statement to simplify code

2021-03-10 Thread Philippe Mathieu-Daudé
To simplify the function body, invert the if() statement, returning earlier. Since we already checked there is enough data in the iovec buffer, simply add an assert() call to consume the bytes_read variable. Reviewed-by: Stefano Garzarella Signed-off-by: Philippe Mathieu-Daudé --- net/eth.c |

[PATCH v6 6/7] net/eth: Read ip6_ext_hdr_routing buffer before accessing it

2021-03-10 Thread Philippe Mathieu-Daudé
We can't know the caller read enough data in the memory pointed by ext_hdr to cast it as a ip6_ext_hdr_routing. Declare rt_hdr on the stack and fill it again from the iovec. Since we already checked there is enough data in the iovec buffer, simply add an assert() call to consume the bytes_read

[PATCH v6 3/7] net/eth: Better describe _eth_get_rss_ex_dst_addr's offset argument

2021-03-10 Thread Philippe Mathieu-Daudé
The 'offset' argument represents the offset to the ip6_ext_hdr header, rename it as 'ext_hdr_offset'. Reviewed-by: Stefano Garzarella Signed-off-by: Philippe Mathieu-Daudé --- net/eth.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/eth.c b/net/eth.c index

[PATCH v6 1/7] net/eth: Use correct in6_address offset in _eth_get_rss_ex_dst_addr()

2021-03-10 Thread Philippe Mathieu-Daudé
The in6_address comes after the ip6_ext_hdr_routing header, not after the ip6_ext_hdr one. Fix the offset. Cc: qemu-sta...@nongnu.org Reported-by: Stefano Garzarella Fixes: eb700029c78 ("net_pkt: Extend packet abstraction as required by e1000e functionality") Signed-off-by: Philippe

[PATCH v6 4/7] net/eth: Check size earlier in _eth_get_rss_ex_dst_addr()

2021-03-10 Thread Philippe Mathieu-Daudé
Reviewed-by: Stefano Garzarella Signed-off-by: Philippe Mathieu-Daudé --- net/eth.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/net/eth.c b/net/eth.c index ed047b5760b..492359afbbb 100644 --- a/net/eth.c +++ b/net/eth.c @@ -406,16 +406,14 @@

[PATCH v6 2/7] net/eth: Simplify _eth_get_rss_ex_dst_addr()

2021-03-10 Thread Philippe Mathieu-Daudé
The length field is already contained in the ip6_ext_hdr structure. Check it direcly in eth_parse_ipv6_hdr() before calling _eth_get_rss_ex_dst_addr(), which gets a bit simplified. Reviewed-by: Miroslav Rezanina Reviewed-by: Stefano Garzarella Signed-off-by: Philippe Mathieu-Daudé ---

[PATCH v6 0/7] net/eth: Fix stack-buffer-overflow in _eth_get_rss_ex_dst_addr()

2021-03-10 Thread Philippe Mathieu-Daudé
I had a look at the patch from Miroslav trying to silence a compiler warning which in fact is a nasty bug. Here is a fix. https://www.mail-archive.com/qemu-devel@nongnu.org/msg772735.html Since v5: - addressed Stefano's review comments: - add now patch fixing in6_address offset Since v4: -

Re: [PATCH] plugins: new syscalls plugin

2021-03-10 Thread Alex Bennée
Matthias Weckbecker writes: > This commit adds a new syscalls plugin that displays the syscalls > as they are executed and returned. This plugin outputs the number > of the syscall as well as the syscall return value. > > Works in *-user only. > > Essentially, this commit restores: > >

Re: [PATCH v5 5/7] net/eth: Check iovec has enough data earlier

2021-03-10 Thread Philippe Mathieu-Daudé
On 3/10/21 6:57 PM, Philippe Mathieu-Daudé wrote: > On 3/10/21 5:53 PM, Stefano Garzarella wrote: >> On Wed, Mar 10, 2021 at 05:01:33PM +0100, Philippe Mathieu-Daudé wrote: >>> We want to check fields from ip6_ext_hdr_routing structure >>> and if correct read the full in6_address. Let's directly

Re: [RFC] tests/migration: introduce multifd into guestperf toolkit

2021-03-10 Thread no-reply
Patchew URL: https://patchew.org/QEMU/726fc52e2f4ae6914ae43263bc02721a6c0eb6e7.1615398669.git.huang...@chinatelecom.cn/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id:

Re: [PATCH 1/4] usb: remove support for -usbdevice parameters

2021-03-10 Thread Eric Blake
On 3/10/21 11:33 AM, Thomas Huth wrote: > From: Paolo Bonzini > > No device needs them anymore and in fact they're undocumented. > Remove the code. The only change in behavior is that "-usbdevice > braille:hello" now reports an error, which is a bugfix. > > Signed-off-by: Paolo Bonzini > Cc:

Re: [PATCH] sockets: update SOCKET_ADDRESS_TYPE_FD listen(2) backlog

2021-03-10 Thread Eric Blake
On 3/10/21 11:30 AM, Stefan Hajnoczi wrote: > socket_get_fd() fails with the error "socket_get_fd: too many > connections" if the given listen backlog value is not 1. > > Not all callers set the backlog to 1. For example, commit > 582d4210eb2f2ab5baac328fe4b479cd86da1647 ("qemu-nbd: Use SOMAXCONN

Re: [PATCH v5 5/7] net/eth: Check iovec has enough data earlier

2021-03-10 Thread Philippe Mathieu-Daudé
On 3/10/21 5:53 PM, Stefano Garzarella wrote: > On Wed, Mar 10, 2021 at 05:01:33PM +0100, Philippe Mathieu-Daudé wrote: >> We want to check fields from ip6_ext_hdr_routing structure >> and if correct read the full in6_address. Let's directly check >> if our iovec contains enough data for

Re: [PATCH 0/4] vhost-user-blk-test: add vhost-user-blk server tests

2021-03-10 Thread Kevin Wolf
Am 09.03.2021 um 10:41 hat Stefan Hajnoczi geschrieben: > These patches were dropped from Kevin's last block pull request due to a > GitLab > CI failure. The old CentOS 7 and opensuse Leap build images lack > memfd_create(2) (introduced in Linux around 2014). The vhost-user-blk server > had a

[RFC] tests/migration: introduce multifd into guestperf toolkit

2021-03-10 Thread huangy81
From: Hyman Current guestperf tool does not support multifd migration, introducing it is good idea so that we can compare the performence of all type of migration. Signed-off-by: Hyman --- tests/migration/guestperf/comparison.py | 14 ++ tests/migration/guestperf/engine.py |

Re: [PATCH] sockets: update SOCKET_ADDRESS_TYPE_FD listen(2) backlog

2021-03-10 Thread Richard W.M. Jones
On Wed, Mar 10, 2021 at 05:30:04PM +, Stefan Hajnoczi wrote: > socket_get_fd() fails with the error "socket_get_fd: too many > connections" if the given listen backlog value is not 1. > > Not all callers set the backlog to 1. For example, commit > 582d4210eb2f2ab5baac328fe4b479cd86da1647

[PATCH 0/4] Clean up the -usbdevice mess

2021-03-10 Thread Thomas Huth
"-usbdevice" is still useful for some users. Thus let's clean up the unwanted parts and make sure that the rest is in a better shape again. Paolo Bonzini (2): usb: remove support for -usbdevice parameters usb: remove '-usbdevice u2f-key' Thomas Huth (2): usb: Un-deprecate -usbdevice

[PATCH 4/4] usb: Document the missing -usbdevice options

2021-03-10 Thread Thomas Huth
There are some more -usbdevice options that have never been mentioned in the documentation. Now that we removed -usbdevice from the list of deprecated features again, we should document them properly. While we're at it, also sort them alphabetically. Signed-off-by: Thomas Huth ---

[PATCH] tests/migration: fix unix socket batch migration

2021-03-10 Thread huangy81
From: Hyman when execute the following test command: "guestperf-batch.py --dst-host localhost --transport unix ..." test aborts and error message as the following be throwed: "launching VM Failed: [Errno 98] Address already in use". The reason is that batch script use the same monitor socket in

[PATCH 2/4] usb: remove '-usbdevice u2f-key'

2021-03-10 Thread Thomas Huth
From: Paolo Bonzini It never worked. Signed-off-by: Paolo Bonzini Cc: Gerd Hoffmann Signed-off-by: Thomas Huth --- hw/usb/u2f.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/usb/u2f.c b/hw/usb/u2f.c index bc09191f06..56001249a4 100644 --- a/hw/usb/u2f.c +++ b/hw/usb/u2f.c @@ -346,7

Re: [PATCH v2 07/12] hw/block/pflash_cfi02: Factor out pflash_reset_state_machine()

2021-03-10 Thread David Edmondson
On Wednesday, 2021-03-10 at 18:05:23 +01, Philippe Mathieu-Daudé wrote: > There is multiple places resetting the internal state machine. > Factor the code out in a new pflash_reset_state_machine() method. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Edmondson > --- >

Re: [PATCH v2 08/12] hw/block/pflash_cfi02: Add DeviceReset method

2021-03-10 Thread David Edmondson
On Wednesday, 2021-03-10 at 18:05:24 +01, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Edmondson > --- > hw/block/pflash_cfi02.c | 8 > 1 file changed, 8 insertions(+) > > diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c >

Re: [PULL v2 00/54] target-arm queue

2021-03-10 Thread Peter Maydell
ni-gitlab/tags/for-upstream' > into staging (2021-03-08 13:51:41 +) > > are available in the Git repository at: > > https://git.linaro.org/people/pmaydell/qemu-arm.git > tags/pull-target-arm-20210310 > > for you to fetch changes up to 81b3ddaf8772ec6f88d372e52f

Re: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-10 Thread Kevin Wolf
Am 10.03.2021 um 15:31 hat Paolo Bonzini geschrieben: > On 10/03/21 15:22, Peter Krempa wrote: > > I've stumbled upon a regression with this patchset applied: > > > > error: internal error: process exited while connecting to monitor: > > qemu-system-x86_64: -object > >

[PATCH] sockets: update SOCKET_ADDRESS_TYPE_FD listen(2) backlog

2021-03-10 Thread Stefan Hajnoczi
socket_get_fd() fails with the error "socket_get_fd: too many connections" if the given listen backlog value is not 1. Not all callers set the backlog to 1. For example, commit 582d4210eb2f2ab5baac328fe4b479cd86da1647 ("qemu-nbd: Use SOMAXCONN for socket listen() backlog") uses SOMAXCONN. This

Re: [PATCH v2 04/12] hw/block/pflash_cfi02: Set rom_mode to true in pflash_setup_mappings()

2021-03-10 Thread David Edmondson
On Wednesday, 2021-03-10 at 18:05:20 +01, Philippe Mathieu-Daudé wrote: > There is only one call to pflash_setup_mappings(). Convert 'rom_mode' > to boolean and set it to true directly within pflash_setup_mappings(). > > Reviewed-by: Bin Meng > Signed-off-by: Philippe Mathieu-Daudé

Re: [PATCH] tests: remove "make check-speed" in favor of "make bench"

2021-03-10 Thread Willian Rampazzo
On Wed, Mar 10, 2021 at 1:46 PM Paolo Bonzini wrote: > > "make check-speed" has been broken since the removal of ninja2make > last October. It was just a backwards-compatibility alias for > "make bench-speed", which in turn is in principle a subset of > "make bench". Advertise the latter and

Re: [PATCH] baum: Fix crash when Braille output is not available

2021-03-10 Thread Peter Maydell
On Wed, 10 Mar 2021 at 16:08, Samuel Thibault wrote: > > When Braille output is not available, the backend properly reports being > unable to be created, but 5f8e93c3e262 ("util/qemu-timer: Make timer_free() > imply timer_del()") made the timer_free() call now refuse any NULL > parameter.

Re: [PATCH v5 3/7] net/eth: Make ip6_ext_hdr *ext_hdr pointer to const

2021-03-10 Thread Philippe Mathieu-Daudé
On 3/10/21 5:46 PM, Stefano Garzarella wrote: > On Wed, Mar 10, 2021 at 05:01:31PM +0100, Philippe Mathieu-Daudé wrote: >> As the callee doesn't need to modify the ext_hdr buffer, >> mark it const. >> >> Signed-off-by: Philippe Mathieu-Daudé >> --- >> net/eth.c | 2 +- >> 1 file changed, 1

Re: [PATCH] block: Introduce zero-co:// and zero-aio://

2021-03-10 Thread Kevin Wolf
Am 10.03.2021 um 15:17 hat f...@euphon.net geschrieben: > From: Fam Zheng > > null-co:// has a read-zeroes=off default, when used to in security > analysis, this can cause false positives because the driver doesn't > write to the read buffer. > > null-co:// has the highest possible performance

Re: [PATCH] baum: Fix crash when Braille output is not available

2021-03-10 Thread Philippe Mathieu-Daudé
Hi Samuel, On 3/10/21 5:08 PM, Samuel Thibault wrote: > When Braille output is not available, the backend properly reports being > unable to be created, but 5f8e93c3e262 ("util/qemu-timer: Make timer_free() > imply timer_del()") made the timer_free() call now refuse any NULL > parameter.

[PATCH 3/4] usb: Un-deprecate -usbdevice (except for -usbdevice audio which gets removed)

2021-03-10 Thread Thomas Huth
When trying to remove the -usbdevice option, there were complaints that "-usbdevice braille" is still a very useful shortcut for some people. Thus we never remove this option. Since it's not such a big burden to keep it around, and it's also convenient in the sense that you don't have to worry to

[PATCH v2 12/12] hw/block/pflash_cfi: Replace DPRINTF with trace events

2021-03-10 Thread Philippe Mathieu-Daudé
From: David Edmondson Rather than having a device specific debug implementation in pflash_cfi01.c and pflash_cfi02.c, use the standard tracing facility. Signed-off-by: David Edmondson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210216142721.1985543-2-david.edmond...@oracle.com> [PMD:

Re: [PATCH] baum: Fix crash when Braille output is not available

2021-03-10 Thread Thomas Huth
On 10/03/2021 17.08, Samuel Thibault wrote: When Braille output is not available, the backend properly reports being unable to be created, but 5f8e93c3e262 ("util/qemu-timer: Make timer_free() imply timer_del()") made the timer_free() call now refuse any NULL parameter. char_braille_finalize

[PATCH 1/4] usb: remove support for -usbdevice parameters

2021-03-10 Thread Thomas Huth
From: Paolo Bonzini No device needs them anymore and in fact they're undocumented. Remove the code. The only change in behavior is that "-usbdevice braille:hello" now reports an error, which is a bugfix. Signed-off-by: Paolo Bonzini Cc: Gerd Hoffmann Signed-off-by: Thomas Huth ---

[PATCH v2 10/12] hw/block/pflash_cfi01: Extract pflash_mode_read_array()

2021-03-10 Thread Philippe Mathieu-Daudé
The same pattern is used when setting the flash in READ_ARRAY mode: - Set the state machine command to READ_ARRAY - Reset the write_cycle counter - Reset the memory region in ROMD Refactor the current code by extracting this pattern. It is used three times: - On a read access (on invalid

[PATCH v2 07/12] hw/block/pflash_cfi02: Factor out pflash_reset_state_machine()

2021-03-10 Thread Philippe Mathieu-Daudé
There is multiple places resetting the internal state machine. Factor the code out in a new pflash_reset_state_machine() method. Signed-off-by: Philippe Mathieu-Daudé --- hw/block/pflash_cfi02.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git

Re: [PATCH v2 05/12] hw/block/pflash_cfi02: Open-code pflash_register_memory(rom=false)

2021-03-10 Thread David Edmondson
On Wednesday, 2021-03-10 at 18:05:21 +01, Philippe Mathieu-Daudé wrote: > There is only one call to pflash_register_memory() with > rom_mode == false. As we want to modify pflash_register_memory() > in the next patch, open-code this trivial function in place for > the 'rom_mode == false' case. >

Re: [PATCH 2/3] memory: Provide 'base address' argument to mtree_print_mr()

2021-03-10 Thread Peter Xu
Phil, On Tue, Mar 09, 2021 at 10:54:18PM +0100, Philippe Mathieu-Daudé wrote: > +Peter/Mark/Edgar for SoC modelling > > On 3/9/21 10:39 AM, Philippe Mathieu-Daudé wrote: > > Hi Peter, > > > > On 3/9/21 12:40 AM, Peter Xu wrote:> On Sat, Mar 06, 2021 at 12:54:13AM > > +0100, Philippe

[PATCH v2 05/12] hw/block/pflash_cfi02: Open-code pflash_register_memory(rom=false)

2021-03-10 Thread Philippe Mathieu-Daudé
There is only one call to pflash_register_memory() with rom_mode == false. As we want to modify pflash_register_memory() in the next patch, open-code this trivial function in place for the 'rom_mode == false' case. Reviewed-by: Bin Meng Signed-off-by: Philippe Mathieu-Daudé ---

[PATCH v2 11/12] hw/block/pflash_cfi01: Correct the type of PFlashCFI01.ro

2021-03-10 Thread Philippe Mathieu-Daudé
From: David Edmondson PFlashCFI01.ro is a bool, declare it as such. Signed-off-by: David Edmondson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210216142721.1985543-3-david.edmond...@oracle.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/block/pflash_cfi01.c | 4 ++-- 1 file

[PATCH v2 02/12] hw/block/pflash_cfi01: Extract pflash_cfi01_fill_cfi_table()

2021-03-10 Thread Philippe Mathieu-Daudé
Fill the CFI table in out of DeviceRealize() in a new function: pflash_cfi01_fill_cfi_table(). Reviewed-by: Bin Meng Reviewed-by: David Edmondson Signed-off-by: Philippe Mathieu-Daudé --- hw/block/pflash_cfi01.c | 140 +--- 1 file changed, 73 insertions(+),

[PATCH v2 04/12] hw/block/pflash_cfi02: Set rom_mode to true in pflash_setup_mappings()

2021-03-10 Thread Philippe Mathieu-Daudé
There is only one call to pflash_setup_mappings(). Convert 'rom_mode' to boolean and set it to true directly within pflash_setup_mappings(). Reviewed-by: Bin Meng Signed-off-by: Philippe Mathieu-Daudé --- v2: Convert to bool in pflash_register_memory (David) --- hw/block/pflash_cfi02.c | 6

Re: [PATCH] baum: Fix crash when Braille output is not available

2021-03-10 Thread Samuel Thibault
Peter Maydell, le mer. 10 mars 2021 17:18:11 +, a ecrit: > On Wed, 10 Mar 2021 at 16:08, Samuel Thibault > wrote: > > > > When Braille output is not available, the backend properly reports being > > unable to be created, but 5f8e93c3e262 ("util/qemu-timer: Make timer_free() > > imply

[PATCH v2 09/12] hw/block/pflash_cfi01: Clarify trace events

2021-03-10 Thread Philippe Mathieu-Daudé
Use the 'mode_read_array' event when we set the device in such mode, and use the 'reset' event in DeviceReset handler. Reviewed-by: Bin Meng Reviewed-by: David Edmondson Signed-off-by: Philippe Mathieu-Daudé --- hw/block/pflash_cfi01.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

Re: [PATCH] tests: remove "make check-speed" in favor of "make bench"

2021-03-10 Thread Thomas Huth
On 10/03/2021 17.46, Paolo Bonzini wrote: "make check-speed" has been broken since the removal of ninja2make last October. It was just a backwards-compatibility alias for "make bench-speed", which in turn is in principle a subset of "make bench". Advertise the latter and drop "make

[PATCH v2 08/12] hw/block/pflash_cfi02: Add DeviceReset method

2021-03-10 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/block/pflash_cfi02.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c index aea47a99c61..c40febd2a41 100644 --- a/hw/block/pflash_cfi02.c +++ b/hw/block/pflash_cfi02.c @@ -942,6 +942,13 @@

Re: [PATCH v5 7/7] net/eth: Add an assert() and invert if() statement to simplify code

2021-03-10 Thread Stefano Garzarella
On Wed, Mar 10, 2021 at 05:01:35PM +0100, Philippe Mathieu-Daudé wrote: To simplify the function body, invert the if() statement, returning earlier. Since we already checked there is enough data in the iovec buffer, simply add an assert() call to consume the bytes_read variable. Signed-off-by:

Re: [PATCH v5 5/7] net/eth: Check iovec has enough data earlier

2021-03-10 Thread Stefano Garzarella
On Wed, Mar 10, 2021 at 05:01:33PM +0100, Philippe Mathieu-Daudé wrote: We want to check fields from ip6_ext_hdr_routing structure and if correct read the full in6_address. Let's directly check if our iovec contains enough data for everything, else return early. Suggested-by: Stefano Garzarella

[PATCH v2 03/12] hw/block/pflash_cfi02: Extract pflash_cfi02_fill_cfi_table()

2021-03-10 Thread Philippe Mathieu-Daudé
Fill the CFI table in out of DeviceRealize() in a new function: pflash_cfi02_fill_cfi_table(). Reviewed-by: Bin Meng Reviewed-by: David Edmondson Signed-off-by: Philippe Mathieu-Daudé --- hw/block/pflash_cfi02.c | 193 +--- 1 file changed, 99 insertions(+),

Re: [PATCH v9 5/6] KVM: arm64: ioctl to fetch/store tags in a guest

2021-03-10 Thread Steven Price
On 09/03/2021 17:57, Marc Zyngier wrote: On Mon, 01 Mar 2021 14:23:14 +, Steven Price wrote: The VMM may not wish to have it's own mapping of guest memory mapped with PROT_MTE because this causes problems if the VMM has tag checking enabled (the guest controls the tags in physical RAM and

[PATCH v2 06/12] hw/block/pflash_cfi02: Rename register_memory(true) as mode_read_array

2021-03-10 Thread Philippe Mathieu-Daudé
The same pattern is used when setting the flash in READ_ARRAY mode: - Set the state machine command to READ_ARRAY - Reset the write_cycle counter - Reset the memory region in ROMD Refactor the current code by extracting this pattern. It is used three times: - When the timer expires and not in

Re: [PATCH v2] MAINTAINERS: Merge the Gitlab-CI section into the generic CI section

2021-03-10 Thread Fam Zheng
My time on QEMU is rather limited and I could hardly look at testing patches for long. So it makes sense to drop me. Acked-by: Fam Zheng Thanks! Fam On Mon, 8 Mar 2021 at 15:50, Thomas Huth wrote: > The status of the gitlab-CI files is currently somewhat confusing, and > it is often not

[PATCH v2 01/12] hw/block/pflash_cfi: Fix code style for checkpatch.pl

2021-03-10 Thread Philippe Mathieu-Daudé
We are going to move this code, fix its style first. Reviewed-by: Bin Meng Reviewed-by: David Edmondson Signed-off-by: Philippe Mathieu-Daudé --- hw/block/pflash_cfi01.c | 36 hw/block/pflash_cfi02.c | 9 ++--- 2 files changed, 30 insertions(+), 15

Re: [PATCH] block: Introduce zero-co:// and zero-aio://

2021-03-10 Thread Fam Zheng
On Wed, 10 Mar 2021 at 15:02, Max Reitz wrote: > On 10.03.21 15:17, f...@euphon.net wrote: > > From: Fam Zheng > > > > null-co:// has a read-zeroes=off default, when used to in security > > analysis, this can cause false positives because the driver doesn't > > write to the read buffer. > > > >

Re: [PATCH v5 4/7] net/eth: Check the size earlier

2021-03-10 Thread Stefano Garzarella
On Wed, Mar 10, 2021 at 05:01:32PM +0100, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- net/eth.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) Reviewed-by: Stefano Garzarella diff --git a/net/eth.c b/net/eth.c index 7c47a267a7a..e870d02b0df

[PATCH v2 00/12] hw/block/pflash: Refactors around setting the device in read-array mode

2021-03-10 Thread Philippe Mathieu-Daudé
I remembered this almost 2 years old series while reviewing David Edmondson's patches... (which are included at the end). Basically we move things around to make the code easier to maintain. Since v1: - Addressed David/Bin comments - Added R-b Missing review: patches 7 & 8 Regards, Phil.

Re: [PATCH 6/9] hw/block/pflash_cfi02: Rename register_memory(true) as mode_read_array

2021-03-10 Thread Philippe Mathieu-Daudé
On 3/10/21 5:31 PM, Philippe Mathieu-Daudé wrote: > On 3/10/21 11:59 AM, David Edmondson wrote: >> On Wednesday, 2021-03-10 at 00:50:25 +01, Philippe Mathieu-Daudé wrote: >> >>> The same pattern is used when setting the flash in READ_ARRAY mode: >>> - Set the state machine command to READ_ARRAY

Re: [PATCH v5 3/7] net/eth: Make ip6_ext_hdr *ext_hdr pointer to const

2021-03-10 Thread Stefano Garzarella
On Wed, Mar 10, 2021 at 05:01:31PM +0100, Philippe Mathieu-Daudé wrote: As the callee doesn't need to modify the ext_hdr buffer, mark it const. Signed-off-by: Philippe Mathieu-Daudé --- net/eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/eth.c b/net/eth.c index

<    1   2   3   4   5   >