Re: [PATCH v2] pc: add property for Linux setup_data random number seed

2022-08-05 Thread Michael S. Tsirkin
On Fri, Aug 05, 2022 at 10:16:37AM +0200, Paolo Bonzini wrote: > On 8/5/22 09:01, Michael S. Tsirkin wrote: > > > -if (!legacy_no_rng_seed) { > > > +if (x86ms->linuxboot_randomness != ON_OFF_AUTO_OFF && > > > +(protocol >= 0x209 || x86ms->linuxboot_randomness == > > >

Re: [PATCH 0/1] Update vfio-user module to the latest

2022-08-05 Thread Michael S. Tsirkin
On Fri, Aug 05, 2022 at 09:21:07AM +0200, Thomas Huth wrote: > On 02/08/2022 12.00, Zhang, Chen wrote: > > > > > > > -Original Message- > > > From: Qemu-devel > > bounces+chen.zhang=intel@nongnu.org> On Behalf Of Jagannathan > > > Raman > > > Sent: Tuesday, August 2, 2022 9:24 AM >

[PATCH for-7.2 v2 10/20] hw/ppc: set machine->fdt in spapr machine

2022-08-05 Thread Daniel Henrique Barboza
The pSeries machine never bothered with the common machine->fdt attribute. We do all the FDT related work using spapr->fdt_blob. We're going to introduce HMP commands to read and save the FDT, which will rely on setting machine->fdt properly to work across all machine archs/types. Let's set

[PATCH for-7.2 v2 20/20] hmp, device_tree.c: add 'info fdt ' support

2022-08-05 Thread Daniel Henrique Barboza
'info fdt' is only able to print full nodes so far. It would be good to be able to also print single properties, since ometimes we just want to verify a single value from the FDT. libfdt does not have support to find a property given its full path, but it does have a way to return a fdt_property

[PATCH for-7.2 v2 18/20] device_node.c: enable 'info fdt' to print subnodes

2022-08-05 Thread Daniel Henrique Barboza
Printing subnodes of a given node will allow us to show a whole subtree, which the additional perk of 'info fdt /' being able to print the whole FDT. Since we're now printing more than one subnode, change 'fdt_info' to print the full path of the first node. This small tweak helps identifying

[PATCH for-7.2 v2 16/20] device_tree.c: support string props in fdt_format_node()

2022-08-05 Thread Daniel Henrique Barboza
To support printing string properties in 'info fdt' we need to determine whether a void data might contain a string. We do that by casting the void data to a string array and: - check if the array finishes with a null character - check if all characters are printable If both conditions are met,

[PATCH for-7.2 v2 19/20] device_tree.c: add fdt_format_property() helper

2022-08-05 Thread Daniel Henrique Barboza
We want to be able to also print properties with 'info fdt'. Create a helper to format properties based on the already existing code from fdt_format_node(). Signed-off-by: Daniel Henrique Barboza --- softmmu/device_tree.c | 35 --- 1 file changed, 20

Re: [PATCH V2] net/colo.c: Fix the pointer issuse reported by Coverity.

2022-08-05 Thread Peter Maydell
On Fri, 5 Aug 2022 at 10:53, Zhang Chen wrote: > > When enable the virtio-net-pci, guest network packet will > load the vnet_hdr. In COLO status, the primary VM's network > packet maybe redirect to another VM, it need filter-redirect > enable the vnet_hdr flag at the same time, COLO-proxy will >

Re: [PATCH] RFC: char: deprecate usage of bidirectional pipe

2022-08-05 Thread Marc-André Lureau
Hi On Tue, Jul 26, 2022 at 12:44 PM Daniel P. Berrangé wrote: > > On Tue, Jul 26, 2022 at 12:32:32PM +0400, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > As Ed Swierk explained back in 2006: > > https://lists.nongnu.org/archive/html/qemu-devel/2006-12/msg00160.html > >

Re: [PATCH RFC 0/7] hostmem: NUMA-aware memory preallocation using ThreadContext

2022-08-05 Thread Michal Prívozník
On 7/21/22 14:07, David Hildenbrand wrote: > This is a follow-up on "util: NUMA aware memory preallocation" [1] by > Michal. > > Setting the CPU affinity of threads from inside QEMU usually isn't > easily possible, because we don't want QEMU -- once started and running > guest code -- to be able

Re: [PATCH for-7.2 00/10] enable pnv-phb user created devices

2022-08-05 Thread Frederic Barrat
Hi Daniel, Other than my comment on patch 6 regarding the qom parenting of the root port, that series looks pretty good to me! Fred On 03/08/2022 15:44, Daniel Henrique Barboza wrote: Hi, This is a rebase on top of ppc-7.2 of the previous patches sent here:

Re: [PATCH v10 18/21] job.c: enable job lock/unlock and remove Aiocontext locks

2022-08-05 Thread Kevin Wolf
Am 25.07.2022 um 09:38 hat Emanuele Giuseppe Esposito geschrieben: > Change the job_{lock/unlock} and macros to use job_mutex. > > Now that they are not nop anymore, remove the aiocontext > to avoid deadlocks. Okay, so this is the big bad patch where we need to verify the completeness of all

Re: [PATCH v10 19/21] block_job_query: remove atomic read

2022-08-05 Thread Kevin Wolf
Am 25.07.2022 um 09:38 hat Emanuele Giuseppe Esposito geschrieben: > Not sure what the atomic here was supposed to do, since job.busy > is protected by the job lock. Since the whole function > is called under job_mutex, just remove the atomic. > > Reviewed-by: Vladimir Sementsov-Ogievskiy >

Re: [PATCH v7 05/14] mm/memfd: Introduce MFD_INACCESSIBLE flag

2022-08-05 Thread David Hildenbrand
On 06.07.22 10:20, Chao Peng wrote: > Introduce a new memfd_create() flag indicating the content of the > created memfd is inaccessible from userspace through ordinary MMU > access (e.g., read/write/mmap). However, the file content can be > accessed via a different mechanism (e.g. KVM MMU)

Re: [PATCH v3] hw/i386: place setup_data at fixed place in memory

2022-08-05 Thread Laszlo Ersek
On 08/05/22 14:47, Jason A. Donenfeld wrote: > Hi Paolo, > > On Fri, Aug 05, 2022 at 10:10:02AM +0200, Paolo Bonzini wrote: >> On 8/5/22 01:04, Jason A. Donenfeld wrote: >>> +/* Nothing else uses this part of the hardware mapped region */ >>> +setup_data_base = 0xf - 0x1000; >> >>

[PATCH 1/2] util/main-loop: Fix maximum number of wait objects for win32

2022-08-05 Thread Bin Meng
From: Bin Meng The maximum number of wait objects for win32 should be MAXIMUM_WAIT_OBJECTS, not MAXIMUM_WAIT_OBJECTS + 1. Signed-off-by: Bin Meng --- util/main-loop.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/util/main-loop.c b/util/main-loop.c index

[PATCH 2/2] util/aio-win32: Correct the event array size in aio_poll()

2022-08-05 Thread Bin Meng
From: Bin Meng WaitForMultipleObjects() can only wait for MAXIMUM_WAIT_OBJECTS object handles. Correct the event array size in aio_poll() and add a assert() to ensure it does not cause out of bound access. Signed-off-by: Bin Meng --- util/aio-win32.c | 3 ++- 1 file changed, 2 insertions(+),

Re: [PATCH 2/2] util/aio-win32: Correct the event array size in aio_poll()

2022-08-05 Thread Stefan Weil via
Am 05.08.22 um 16:56 schrieb Bin Meng: From: Bin Meng WaitForMultipleObjects() can only wait for MAXIMUM_WAIT_OBJECTS object handles. Correct the event array size in aio_poll() and add a assert() to ensure it does not cause out of bound access. Signed-off-by: Bin Meng ---

[PULL 0/6] Misc next patches

2022-08-05 Thread Daniel P . Berrangé
The following changes since commit 09ed077d7fae5f825e18ff9a2004dcdd1b165edb: Merge tag 'trivial-branch-for-7.1-pull-request' of https://gitlab.com/laurent_vivier/qemu into staging (2022-08-04 17:21:13 -0700) are available in the Git repository at: https://gitlab.com/berrange/qemu

[PULL 5/6] target/arm: display deprecation status in '-cpu help'

2022-08-05 Thread Daniel P . Berrangé
When the user queries CPU models via QMP there is a 'deprecated' flag present, however, this is not done for the CLI '-cpu help' command. Reviewed-by: Cornelia Huck Signed-off-by: Daniel P. Berrangé --- target/arm/helper.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git

Re: [PATCH RFC 7/7] vl: Allow ThreadContext objects to be created before the sandbox option

2022-08-05 Thread David Hildenbrand
On 05.08.22 13:01, Michal Prívozník wrote: > On 7/21/22 14:07, David Hildenbrand wrote: >> Currently, there is no way to configure a CPU affinity inside QEMU when >> the sandbox option disables it for QEMU as a whole, for example, via: >> -sandbox enable=on,resourcecontrol=deny >> >> While

[PATCH v2 3/3] iotests, parallels: Add a test for duplicated clusters

2022-08-05 Thread alexander . ivanov
From: Alexander Ivanov Check if original and duplicated offsets refer to the same cluster. Repair the image and check that writing to a referred cluster doesn't affects another referred cluster. Signed-off-by: Natalia Kuzmina Signed-off-by: Alexander Ivanov --- tests/qemu-iotests/314

[PATCH 0/5] QEMU: Fix RISC-V virt & spike machines' dtbs

2022-08-05 Thread Conor Dooley
From: Conor Dooley The device trees produced automatically for the virt and spike machines fail dt-validate on several grounds. Some of these need to be fixed in the linux kernel's dt-bindings, but others are caused by bugs in QEMU. Patch one of this series is lifted from an earlier submission

Re: [PATCH 0/2] Floating-point OE/UE exception bug

2022-08-05 Thread Alex Bennée
"Lucas Mateus Castro(alqotel)" writes: > From: "Lucas Mateus Castro (alqotel)" > > Changes in v2: > - Completely reworked the solution: > * Created re_bias in FloatFmt, it is 3/4 of the total exponent > range of a FP type I thought this might have an effect on the

Re: [PATCH v2 12/20] ppc/ppc405: QOM'ify EBC

2022-08-05 Thread BALATON Zoltan
On Fri, 5 Aug 2022, Peter Maydell wrote: On Fri, 5 Aug 2022 at 13:55, BALATON Zoltan wrote: I know this is a mess curently but QOM is full of boilerplate code which is confusing for new people and makes it hard to undestand the code. So cutting down the boilerplate and making things simpler

[PATCH v2] vl: fix [memory] section with -readconfig

2022-08-05 Thread Paolo Bonzini
The -M memory.* options do not have magic applied to them than the -m option, namely no "M" (for mebibytes) is tacked at the end of a suffixless value for "-M memory.size". This magic is performed by parse_memory_options, and we have to do it for both "-m" and the [memory] section of a config

[PATCH] vl: remove dead code in parse_memory_options()

2022-08-05 Thread Paolo Bonzini
mem_str will never be an empty string, because qemu_opt_get_size() fails if it encounters one: $ ./qemu-system-x86_64 -m size= qemu-system-x86_64: -m size=: Parameter size expects a non-negative number below 2^64 Optional suffix k, M, G, T, P or E means kilo-, mega-, giga-, tera-, peta-

Re: [PATCH v2 1/4] accel/tcg: Invalidate translations when clearing PAGE_READ

2022-08-05 Thread Peter Maydell
On Fri, 5 Aug 2022 at 18:33, Ilya Leoshkevich wrote: > > After mprotect(addr, PROT_NONE), addr can still be executed if there > are cached translations. Drop them. > > Signed-off-by: Ilya Leoshkevich > --- > accel/tcg/translate-all.c | 17 - > 1 file changed, 12 insertions(+), 5

Re: [PATCH] target/loongarch: Fix macros SET_FPU_* in cpu.h

2022-08-05 Thread Richard Henderson
On 8/4/22 06:24, Qi Hu wrote: The macros SET_FPU_* are used to set corresponding bits of fcsr. Unfortunately it forgets to set the result and it causes fcsr's "CAUSE" never being updated. This patch is to fix this bug. Signed-off-by: Qi Hu --- target/loongarch/cpu.h | 18 +++---

[PULL 6/6] util/qemu-sockets: Replace the call to close a socket with closesocket()

2022-08-05 Thread Daniel P . Berrangé
From: Bin Meng close() is a *nix function. It works on any file descriptor, and sockets in *nix are an example of a file descriptor. closesocket() is a Windows-specific function, which works only specifically with sockets. Sockets on Windows do not use *nix-style file descriptors, and socket()

Re: [PATCH RFC 0/7] hostmem: NUMA-aware memory preallocation using ThreadContext

2022-08-05 Thread David Hildenbrand
> > I've timed 'virsh start' with a guest that has 47GB worth of 1GB > hugepages and seen the startup time halved basically (from 10.5s to > 5.6s). The host has 4 NUMA nodes and I'm pinning the guest onto two nodes. > > I've written libvirt counterpart (which I'll post as soon as these are >

Re: [PATCH] hw/loongarch: remove acpi-build.c unused variable 'aml_len'

2022-08-05 Thread Richard Henderson
On 7/20/22 21:00, Song Gao wrote: @@ -413,7 +413,6 @@ static void acpi_build(AcpiBuildTables *tables, MachineState *machine) AcpiFadtData fadt_data; unsigned facs, rsdt, fadt, dsdt; uint8_t *u; -size_t aml_len = 0; ... @@ -451,7 +444,6 @@ static void

Re: [PATCH 0/2] Floating-point OE/UE exception bug

2022-08-05 Thread Lucas Mateus Martins Araujo e Castro
It's missing from the title but this is a v2. v1 id: Message-Id: <20220803122217.20847-1-lucas.ara...@eldorado.org.br> On 05/08/2022 11:15, Lucas Mateus Castro(alqotel) wrote: From: "Lucas Mateus Castro (alqotel)" Changes in v2: - Completely reworked the solution: * Created

Re: [PATCH v2 12/20] ppc/ppc405: QOM'ify EBC

2022-08-05 Thread BALATON Zoltan
On Fri, 5 Aug 2022, Peter Maydell wrote: On Fri, 5 Aug 2022 at 17:50, BALATON Zoltan wrote: This also allows to get the cpu without a link with something like: PPC4XX_MACHINE(current_machine /* or qdev_get_machine() */)->soc.cpu ...and now you have device code that's making assumptions

Re: [PATCH v2 1/4] accel/tcg: Invalidate translations when clearing PAGE_READ

2022-08-05 Thread Richard Henderson
On 8/5/22 09:09, Ilya Leoshkevich wrote: After mprotect(addr, PROT_NONE), addr can still be executed if there are cached translations. Drop them. Signed-off-by: Ilya Leoshkevich --- accel/tcg/translate-all.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff

Re: [PATCH v7 01/14] mm: Add F_SEAL_AUTO_ALLOCATE seal to memfd

2022-08-05 Thread Paolo Bonzini
On 7/21/22 11:44, David Hildenbrand wrote: Also, I*think* you can place pages via userfaultfd into shmem. Not sure if that would count "auto alloc", but it would certainly bypass fallocate(). Yeah, userfaultfd_register would probably have to forbid this for F_SEAL_AUTO_ALLOCATE vmas. Maybe

Re: [PATCH] hw/net: Discard overly fragmented packets

2022-08-05 Thread Thomas Huth
On 11/08/2021 06.08, Jason Wang wrote: 在 2021/8/4 上午9:43, Jason Wang 写道: 在 2021/8/3 下午5:51, Philippe Mathieu-Daudé 写道: On 8/3/21 11:33 AM, Thomas Huth wrote: On 05/07/2021 10.40, Philippe Mathieu-Daudé wrote: Our infrastructure can handle fragmented packets up to NET_MAX_FRAG_SG_LIST (64)

Re: [PATCH v2 00/11] Refactor bdrv_try_set_aio_context using transactions

2022-08-05 Thread Emanuele Giuseppe Esposito
Am 05/08/2022 um 16:35 schrieb Vladimir Sementsov-Ogievskiy: > On 8/5/22 16:22, Emanuele Giuseppe Esposito wrote: >> >> >> Am 27/07/2022 um 18:13 schrieb Vladimir Sementsov-Ogievskiy: >>> On 7/25/22 15:21, Emanuele Giuseppe Esposito wrote: The aim of this series is to reorganize

[PULL 1/6] docs: build-platforms: Clarify stance on minor releases and backports

2022-08-05 Thread Daniel P . Berrangé
From: Andrea Bolognani These changes match those made in the following libvirt commits: 2ac78307af docs: Clarify our stance on backported packages 78cffd450a docs: Spell out our policy concerning minor releases Since QEMU's platform support policy is based on libvirt's, it makes sense to

[PULL 3/6] target/i386: display deprecation status in '-cpu help'

2022-08-05 Thread Daniel P . Berrangé
When the user queries CPU models via QMP there is a 'deprecated' flag present, however, this is not done for the CLI '-cpu help' command. Reviewed-by: Cornelia Huck Signed-off-by: Daniel P. Berrangé --- target/i386/cpu.c | 5 + 1 file changed, 5 insertions(+) diff --git

Re: [PATCH for-7.1 v2 0/5] Fix gdb bugs and update gdb-xml

2022-08-05 Thread Richard Henderson
On 8/4/22 20:35, Song Gao wrote: Hi,All This series fiex LoongArch GDB get the wrong pc, because the xml missing the register orig_a0, and update loongarch gdb-xml to match GDB[1] [1]:https://github.com/bminor/binutils-gdb/blob/master/gdb/features/loongarch Please review! V2: - Update

Re: [PATCH] hw/loongarch: remove acpi-build.c unused variable 'aml_len'

2022-08-05 Thread Richard Henderson
On 7/20/22 21:00, Song Gao wrote: Fix a compiler warning on openbsd: ../src/hw/loongarch/acpi-build.c:416:12: warning: variable 'aml_len' set but not used [-Wunused-but-set-variable] size_t aml_len = 0; ^ Reported-by: Peter Maydell Signed-off-by: Song Gao ---

[PATCH v2 1/3] parallels: Put the image checks in separate functions

2022-08-05 Thread alexander . ivanov
From: Alexander Ivanov We will add more and more checks of images so we need to reorganize the code. Put each check to a separate helper function with a separate loop. Add two helpers: truncate_file() and sync_header(). They will be used in multiple functions. Signed-off-by: Alexander Ivanov

[PATCH 2/5] hw/riscv: virt: fix uart node name

2022-08-05 Thread Conor Dooley
From: Conor Dooley "uart" is not a node name that complies with the dt-schema. Change the node name to "serial" to ix warnings seen during dt-validate on a dtbdump of the virt machine such as: /stuff/qemu/qemu.dtb: uart@1000: $nodename:0: 'uart@1000' does not match '^serial(@.*)?$'

[PATCH 5/5] hw/core: fix platform bus node name

2022-08-05 Thread Conor Dooley
From: Conor Dooley "platform" is not a valid name for a bus node in dt-schema, so warnings can be see in dt-validate on a dump of the riscv virt dtb: /stuff/qemu/qemu.dtb: platform@400: $nodename:0: 'platform@400' does not match

libslirp and static linking

2022-08-05 Thread Peter Maydell
Hi; I noticed today that Debian's libslirp-dev package doesn't ship a static library version of libslirp. I was going to file a Debian bug about that, but then looking at upstream 'libslirp' I found that its README.md https://gitlab.freedesktop.org/slirp/libslirp only documents how to build a

[PATCH v4 0/6] ASID support in vhost-vdpa net

2022-08-05 Thread Eugenio Pérez
Control VQ is the way net devices use to send changes to the device state, like the number of active queues or its mac address. QEMU needs to intercept this queue so it can track these changes and is able to migrate the device. It can do it from 1576dbb5bbc4 ("vdpa: Add x-svq to

[PATCH v4 2/6] vdpa: Use v->shadow_vqs_enabled in vhost_vdpa_svqs_start & stop

2022-08-05 Thread Eugenio Pérez
This function used to trust in v->shadow_vqs != NULL to know if it must start svq or not. This is not going to be valid anymore, as qemu is going to allocate svq unconditionally (but it will only start them conditionally). Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-vdpa.c | 4 ++-- 1

[PATCH v4 3/6] vdpa: Allocate SVQ unconditionally

2022-08-05 Thread Eugenio Pérez
SVQ may run or not in a device depending on runtime conditions (for example, if the device can move CVQ to its own group or not). Allocate the resources unconditionally, and decide later if to use them or not. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-vdpa.c | 33

[PATCH v4 6/6] vdpa: Always start CVQ in SVQ mode

2022-08-05 Thread Eugenio Pérez
Isolate control virtqueue in its own group, allowing to intercept control commands but letting dataplane run totally passthrough to the guest. Signed-off-by: Eugenio Pérez --- v4: * Squash vhost_vdpa_cvq_group_is_independent. * Rebased on last CVQ start series, that allocated CVQ cmd bufs at

Re: [PATCH 1/2] fpu: Add rebias bool, value and operation

2022-08-05 Thread Richard Henderson
On 8/5/22 07:15, Lucas Mateus Castro(alqotel) wrote: From: "Lucas Mateus Castro (alqotel)" Added the possibility of recalculating a result if it overflows or underflows, if the result overflow and the rebias bool is true then the intermediate result should have 3/4 of the total range subtracted

Re: [PATCH 2/2] target/ppc: Bugfix FP when OE/UE are set

2022-08-05 Thread Richard Henderson
On 8/5/22 07:15, Lucas Mateus Castro(alqotel) wrote: From: "Lucas Mateus Castro (alqotel)" When an overflow exception occurs and OE is set the intermediate result should be adjusted (by subtracting from the exponent) to avoid rounding to inf. The same applies to an underflow exceptionion and

Re: [PATCH 0/2] Floating-point OE/UE exception bug

2022-08-05 Thread Daniel Henrique Barboza
Queued in gitlab.com/danielhb/qemu/tree/ppc-next. Thanks, Daniel On 8/5/22 11:15, Lucas Mateus Castro(alqotel) wrote: From: "Lucas Mateus Castro (alqotel)" Changes in v2: - Completely reworked the solution: * Created re_bias in FloatFmt, it is 3/4 of the total exponent

Re: [PATCH v2 00/11] Refactor bdrv_try_set_aio_context using transactions

2022-08-05 Thread Vladimir Sementsov-Ogievskiy
On 8/5/22 16:22, Emanuele Giuseppe Esposito wrote: Am 27/07/2022 um 18:13 schrieb Vladimir Sementsov-Ogievskiy: On 7/25/22 15:21, Emanuele Giuseppe Esposito wrote: The aim of this series is to reorganize bdrv_try_set_aio_context and drop BDS ->set_aio_context and ->can_set_aio_ctx callbacks

Re: [PATCH v2 00/11] Refactor bdrv_try_set_aio_context using transactions

2022-08-05 Thread Vladimir Sementsov-Ogievskiy
On 8/5/22 16:36, Emanuele Giuseppe Esposito wrote: Am 05/08/2022 um 15:22 schrieb Emanuele Giuseppe Esposito: Am 27/07/2022 um 18:13 schrieb Vladimir Sementsov-Ogievskiy: On 7/25/22 15:21, Emanuele Giuseppe Esposito wrote: The aim of this series is to reorganize bdrv_try_set_aio_context

Re: [PATCH for-7.1 v2 1/5] target/loongarch: Fix GDB get the wrong pc

2022-08-05 Thread Richard Henderson
On 8/4/22 20:35, Song Gao wrote: GDB LoongArch add a register orig_a0, see the base64.xml [1]. We should add the orig_a0 to match the upstream GDB. [1]:https://github.com/bminor/binutils-gdb/blob/master/gdb/features/loongarch/base64.xml Signed-off-by: Song Gao ---

[PATCH v2 0/3] Check and repair duplicated clusters in parallels images

2022-08-05 Thread alexander . ivanov
From: Alexander Ivanov We will add more and more checks of images so we need to reorganize the code. Put each check to a separate helper function with a separate loop. Add two helpers: truncate_file() and sync_header(). They will be used in multiple functions. Parallels image file can be

[PATCH v2 2/3] parallels: Add checking and repairing duplicate offsets in BAT

2022-08-05 Thread alexander . ivanov
From: Alexander Ivanov There could be corruptions in the image file: two guest memory areas refer to the same host cluster. If a duplicate offset is found fix it by copying the content of the referred cluster to a new allocated cluster and replace one of the two referring entries by the new

[PATCH 1/5] target/riscv: Ignore the S and U letters when formatting ISA strings

2022-08-05 Thread Conor Dooley
From: Palmer Dabbelt The ISA strings we're providing from QEMU aren't actually legal RISC-V ISA strings, as both S and U cannot exist as single-letter extensions and must instead be multi-letter strings. We're still using the ISA strings inside QEMU to track the availiable extensions, so just

[PATCH 3/5] hw/riscv: virt: Fix the plic's address cells

2022-08-05 Thread Conor Dooley
From: Conor Dooley When optional AIA PLIC support was added the to the virt machine, the address cells property was removed leading the issues with dt-validate on a dump from the virt machine: /stuff/qemu/qemu.dtb: plic@c00: '#address-cells' is a required property From schema:

[PATCH v2 4/4] tests/tcg: Test siginfo_t contents when jumping to non-readable pages

2022-08-05 Thread Ilya Leoshkevich
Add x86_64 and s390x tests to prevent regressions. Signed-off-by: Ilya Leoshkevich --- tests/tcg/multiarch/noexec.h | 114 tests/tcg/s390x/Makefile.target | 1 + tests/tcg/s390x/noexec.c | 145 +++

[PATCH v4 1/6] linux-headers: Update kernel headers

2022-08-05 Thread Eugenio Pérez
Main reason is for new vhost_vdpa address space ioctls to be available. Update kernel headers until 9de1f9c8ca51 ("Merge tag 'irq-core-2022-08-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip"). Signed-off-by: Eugenio Pérez --- include/standard-headers/asm-x86/bootparam.h | 7 +-

Re: [PATCH v2 12/20] ppc/ppc405: QOM'ify EBC

2022-08-05 Thread Peter Maydell
On Fri, 5 Aug 2022 at 17:50, BALATON Zoltan wrote: > This also > allows to get the cpu without a link with something like: > > PPC4XX_MACHINE(current_machine /* or qdev_get_machine() */)->soc.cpu ...and now you have device code that's making assumptions about the machine and SoC it's in. Just

Re: [PATCH for-7.1] vl: fix [memory] section with -readconfig

2022-08-05 Thread Paolo Bonzini
On 8/5/22 15:40, Markus Armbruster wrote: +loc_push_none(); +qemu_opts_loc_restore(opts); + prop = qdict_new(); if (qemu_opt_get_size(opts, "size", 0) != 0) { This treats "size=0" like absent size. Before commit ce9d03fb3f, we instead checked mem_str =

Re: [PATCH v3] hw/i386: place setup_data at fixed place in memory

2022-08-05 Thread Paolo Bonzini
On 8/5/22 13:08, Ard Biesheuvel wrote: Does it work to place setup_data at the end of the cmdline file instead of having it at the end of the kernel file? This way the first item will be at 0x2 + cmdline_size. Does QEMU always allocate the command line statically like that? AFAIK, OVMF

[PATCH v2 1/4] accel/tcg: Invalidate translations when clearing PAGE_READ

2022-08-05 Thread Ilya Leoshkevich
After mprotect(addr, PROT_NONE), addr can still be executed if there are cached translations. Drop them. Signed-off-by: Ilya Leoshkevich --- accel/tcg/translate-all.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/accel/tcg/translate-all.c

Re: libslirp and static linking

2022-08-05 Thread Paolo Bonzini
On 8/5/22 18:13, Peter Maydell wrote: Hi; I noticed today that Debian's libslirp-dev package doesn't ship a static library version of libslirp. I was going to file a Debian bug about that, but then looking at upstream 'libslirp' I found that its README.md

Re: [PATCH v7 00/14] qapi: net: add unix socket type support to netdev backend

2022-08-05 Thread Stefano Brivio
On Fri, 22 Jul 2022 21:04:28 +0200 Laurent Vivier wrote: > "-netdev socket" only supports inet sockets. > > It's not a complex task to add support for unix sockets, but > the socket netdev parameters are not defined to manage well unix > socket parameters. > > As discussed in: > > "socket.c

Re: [PATCH v3] hw/i386: place setup_data at fixed place in memory

2022-08-05 Thread Ard Biesheuvel
On Fri, 5 Aug 2022 at 19:29, Paolo Bonzini wrote: > > On 8/5/22 13:08, Ard Biesheuvel wrote: > >> > >> Does it work to place setup_data at the end of the cmdline file instead > >> of having it at the end of the kernel file? This way the first item > >> will be at 0x2 + cmdline_size. > >> > >

Re: [PATCH] vmxnet3: add stub for encapsulation offload

2022-08-05 Thread Thomas Huth
On 07/08/2021 00.23, Alexander Bulekov wrote: Encapsulation offload (offload mode 1) is a valid mode present in the kernel that isn't implemented in QEMU, yet. https://lore.kernel.org/lkml/20200528015426.8285-4-dos...@vmware.com/ Add a stub for this mode, to avoid the guest-triggerable

Re: [PATCH for-7.1 v2 4/5] target/loongarch: Update loongarch-fpu.xml

2022-08-05 Thread Richard Henderson
On 8/4/22 20:35, Song Gao wrote: Rename loongarch-fpu64.xml to loongarch-fpu.xml and update loongarch-fpu.xml to match upstream GDB [1] [1]:https://github.com/bminor/binutils-gdb/blob/master/gdb/features/loongarch/fpu.xml Signed-off-by: Song Gao --- configs/targets/loongarch64-softmmu.mak |

[PATCH 4/5] hw/riscv: virt: fix syscon subnode paths

2022-08-05 Thread Conor Dooley
From: Conor Dooley The subnodes of the syscon have been added to the incorrect paths. Rather than add them as subnodes, they were originally added to "/foo" and a later patch moved them to "/soc/foo". Both are incorrect & they should have been added as "/soc/test@###/foo" as "/soc/test" is the

[PATCH v4 5/6] vdpa: Store x-svq parameter in VhostVDPAState

2022-08-05 Thread Eugenio Pérez
CVQ can be shadowed two ways: - Device has x-svq=on parameter (current way) - The device can isolate CVQ in its own vq group QEMU needs to check for the second condition dynamically, because CVQ index is not known at initialization time. Since this is dynamic, the CVQ isolation could vary with

[PATCH v4 4/6] vdpa: Add asid parameter to vhost_vdpa_dma_map/unmap

2022-08-05 Thread Eugenio Pérez
So the caller can choose which ASID is destined. No need to update the batch functions as they will always be called from memory listener updates at the moment. Memory listener updates will always update ASID 0, as it's the passthrough ASID. All vhost devices's ASID are 0 at this moment.

Re: [PATCH 0/2] Floating-point OE/UE exception bug

2022-08-05 Thread Lucas Mateus Martins Araujo e Castro
On 05/08/2022 13:20, Alex Bennée wrote: "Lucas Mateus Castro(alqotel)" writes: From: "Lucas Mateus Castro (alqotel)" Changes in v2: - Completely reworked the solution: * Created re_bias in FloatFmt, it is 3/4 of the total exponent range of a FP type I thought this

Re: [PATCH 0/2] Floating-point OE/UE exception bug

2022-08-05 Thread Richard Henderson
On 8/5/22 07:15, Lucas Mateus Castro(alqotel) wrote: Currently there's no test in this patch series as there's no way to disable MSR.FE0 and MSR.FE1 in linux user, so any overflow/underflow exception with OE/UE set causes a trapping exception. You could check the value in the fp register in

Re: [PATCH for-7.1 v2 5/5] target/loongarch: Update gdb_set_fpu() and gdb_get_fpu()

2022-08-05 Thread Richard Henderson
On 8/4/22 20:35, Song Gao wrote: GDB LoongArch fpu use fcc register, update gdb_set_fpu() and gdb_get_fpu() to match it. Signed-off-by: Song Gao --- linux-user/loongarch64/signal.c | 24 ++- target/loongarch/gdbstub.c | 34 ++---

[PULL 2/6] QIOChannelSocket: Add support for MSG_ZEROCOPY + IPV6

2022-08-05 Thread Daniel P . Berrangé
From: Leonardo Bras For using MSG_ZEROCOPY, there are two steps: 1 - io_writev() the packet, which enqueues the packet for sending, and 2 - io_flush(), which gets confirmation that all packets got correctly sent Currently, if MSG_ZEROCOPY is used to send packets over IPV6, no error will be

[PULL 4/6] target/s390x: display deprecation status in '-cpu help'

2022-08-05 Thread Daniel P . Berrangé
When the user queries CPU models via QMP there is a 'deprecated' flag present, however, this is not done for the CLI '-cpu help' command. Reviewed-by: Cornelia Huck Signed-off-by: Daniel P. Berrangé --- target/s390x/cpu_models.c | 23 ++- 1 file changed, 18 insertions(+), 5

Re: [PATCH 2/2] target/ppc: Bugfix FP when OE/UE are set

2022-08-05 Thread Daniel Henrique Barboza
On 8/5/22 14:17, Richard Henderson wrote: On 8/5/22 07:15, Lucas Mateus Castro(alqotel) wrote: From: "Lucas Mateus Castro (alqotel)" When an overflow exception occurs and OE is set the intermediate result should be adjusted (by subtracting from the exponent) to avoid rounding to inf. The

[PATCH v2 0/4] linux-user: Fix siginfo_t contents when jumping to non-readable pages

2022-08-05 Thread Ilya Leoshkevich
Hi, I noticed that when we get a SEGV due to jumping to non-readable memory, sometimes si_addr and program counter in siginfo_t are slightly off. I tracked this down to the assumption that translators stop before the end of a page, while in reality they may stop right after it. Patch 1 fixes a

[PATCH v2 3/4] target/i386: Make translator stop before the end of a page

2022-08-05 Thread Ilya Leoshkevich
Right now translator stops right *after* the end of a page, which breaks reporting of fault locations when the last instruction of a multi-insn translation block crosses a page boundary. We may find out that we crossed page boundary after some ops were emitted and cc_op was updated. In theory it

Re: [PATCH v2 2/4] target/s390x: Make translator stop before the end of a page

2022-08-05 Thread Richard Henderson
On 8/5/22 09:09, Ilya Leoshkevich wrote: Right now translator stops right *after* the end of a page, which breaks reporting of fault locations when the last instruction of a multi-insn translation block crosses a page boundary. Signed-off-by: Ilya Leoshkevich --- include/exec/translator.h

[PATCH v2 2/4] target/s390x: Make translator stop before the end of a page

2022-08-05 Thread Ilya Leoshkevich
Right now translator stops right *after* the end of a page, which breaks reporting of fault locations when the last instruction of a multi-insn translation block crosses a page boundary. Signed-off-by: Ilya Leoshkevich --- include/exec/translator.h| 10 ++

[PATCH] hw/ppc: ppc440_uc: avoid multiply overflow in dcr_write_dma()

2022-08-05 Thread Daniel Henrique Barboza
Coverity reports a OVERFLOW_BEFORE_WIDEN issue in dcr_write_dma(). When handling the DMA0_CR switch we're doing a multiplication between two integers (count and width), and the product is assigned to an uint64_t (xferlen). The int32 product can be overflow before widened. Fix it by casting the

Re: [PULL 0/7] loongarch patch queue

2022-08-05 Thread Richard Henderson
at: https://gitlab.com/rth7680/qemu.git tags/pull-la-20220805 for you to fetch changes up to 2f149c759ff352399e7a0eca25a62388822d7d13: target/loongarch: Update gdb_set_fpu() and gdb_get_fpu() (2022-08-05 10:02:40 -0700

Re: [PATCH v2 12/20] ppc/ppc405: QOM'ify EBC

2022-08-05 Thread BALATON Zoltan
On Fri, 5 Aug 2022, BALATON Zoltan wrote: On Fri, 5 Aug 2022, Peter Maydell wrote: On Fri, 5 Aug 2022 at 17:50, BALATON Zoltan wrote: This also allows to get the cpu without a link with something like: PPC4XX_MACHINE(current_machine /* or qdev_get_machine() */)->soc.cpu ...and now you have

[PULL 0/7] loongarch patch queue

2022-08-05 Thread Richard Henderson
/pull-la-20220805 for you to fetch changes up to 2f149c759ff352399e7a0eca25a62388822d7d13: target/loongarch: Update gdb_set_fpu() and gdb_get_fpu() (2022-08-05 10:02:40 -0700) LoongArch updates: Store value in SET_FPU_* macros

Re: [PATCH v7 08/14] KVM: Rename mmu_notifier_*

2022-08-05 Thread Paolo Bonzini
On 7/29/22 21:02, Sean Christopherson wrote: If we really want a different name, I'd vote for nomenclature that captures the invalidation aspect, which is really what the variables are all trackng, e.g. mmu_invalidate_seq mmu_invalidate_in_progress mmu_invalidate_range_start

[PULL 2/7] hw/loongarch: remove acpi-build.c unused variable 'aml_len'

2022-08-05 Thread Richard Henderson
From: Song Gao Fix a compiler warning on openbsd: ../src/hw/loongarch/acpi-build.c:416:12: warning: variable 'aml_len' set but not used [-Wunused-but-set-variable] size_t aml_len = 0; ^ Reported-by: Peter Maydell Signed-off-by: Song Gao Reviewed-by: Richard Henderson

[PULL 5/7] target/loongarch: update loongarch-base64.xml

2022-08-05 Thread Richard Henderson
From: Song Gao Update loongarch-base64.xml to match the upstream GDB [1]. [1]:https://github.com/bminor/binutils-gdb/blob/master/gdb/features/loongarch/base64.xml Reviewed-by: Richard Henderson Signed-off-by: Song Gao Acked-by: Alex Bennée Message-Id:

[PULL 6/7] target/loongarch: Update loongarch-fpu.xml

2022-08-05 Thread Richard Henderson
From: Song Gao Rename loongarch-fpu64.xml to loongarch-fpu.xml and update loongarch-fpu.xml to match upstream GDB [1] [1]:https://github.com/bminor/binutils-gdb/blob/master/gdb/features/loongarch/fpu.xml Signed-off-by: Song Gao Reviewed-by: Richard Henderson Acked-by: Alex Bennée

[PULL 3/7] target/loongarch: Fix GDB get the wrong pc

2022-08-05 Thread Richard Henderson
From: Song Gao GDB LoongArch add a register orig_a0, see the base64.xml [1]. We should add the orig_a0 to match the upstream GDB. [1]: https://github.com/bminor/binutils-gdb/blob/master/gdb/features/loongarch/base64.xml Signed-off-by: Song Gao Reviewed-by: Richard Henderson Acked-by: Alex

[PULL 1/7] target/loongarch: Fix macros SET_FPU_* in cpu.h

2022-08-05 Thread Richard Henderson
From: Qi Hu The macros SET_FPU_* are used to set corresponding bits of fcsr. Unfortunately it forgets to set the result and it causes fcsr's "CAUSE" never being updated. This patch is to fix this bug. Signed-off-by: Qi Hu Reviewed-by: Song Gao Message-Id:

[PULL 4/7] target/loongarch: add gdb_arch_name()

2022-08-05 Thread Richard Henderson
From: Song Gao Matches bfd/cpu-loongarch.c, bfd_loongarch_arch. Reviewed-by: Richard Henderson Signed-off-by: Song Gao Acked-by: Alex Bennée Message-Id: <20220805033523.1416837-3-gaos...@loongson.cn> --- target/loongarch/cpu.c | 6 ++ 1 file changed, 6 insertions(+) diff --git

[PULL 7/7] target/loongarch: Update gdb_set_fpu() and gdb_get_fpu()

2022-08-05 Thread Richard Henderson
From: Song Gao GDB LoongArch fpu use fcc register, update gdb_set_fpu() and gdb_get_fpu() to match it. Signed-off-by: Song Gao Reviewed-by: Richard Henderson Acked-by: Alex Bennée Message-Id: <20220805033523.1416837-6-gaos...@loongson.cn> --- target/loongarch/internals.h| 3 +++

Re: [PATCH v2 3/4] target/i386: Make translator stop before the end of a page

2022-08-05 Thread Richard Henderson
On 8/5/22 09:09, Ilya Leoshkevich wrote: @@ -4568,9 +4598,19 @@ static target_ulong disas_insn(DisasContext *s, CPUState *cpu) s->rip_offset = 0; /* for relative ip address */ s->vex_l = 0; s->vex_v = 0; -if (sigsetjmp(s->jmpbuf, 0) != 0) { +disas_save(, s); +

Re: [PULL 0/6] Misc next patches

2022-08-05 Thread Richard Henderson
On 8/5/22 08:20, Daniel P. Berrangé wrote: The following changes since commit 09ed077d7fae5f825e18ff9a2004dcdd1b165edb: Merge tag 'trivial-branch-for-7.1-pull-request' of https://gitlab.com/laurent_vivier/qemu into staging (2022-08-04 17:21:13 -0700) are available in the Git repository at:

Re: [PATCH v7 01/14] mm: Add F_SEAL_AUTO_ALLOCATE seal to memfd

2022-08-05 Thread David Hildenbrand
On 05.08.22 19:55, Paolo Bonzini wrote: > On 7/21/22 11:44, David Hildenbrand wrote: >> >> Also, I*think* you can place pages via userfaultfd into shmem. Not >> sure if that would count "auto alloc", but it would certainly bypass >> fallocate(). > > Yeah, userfaultfd_register would probably have

[PATCH v6 0/8] Add support for zoned device

2022-08-05 Thread Sam Li
Zoned Block Devices (ZBDs) devide the LBA space to block regions called zones that are larger than the LBA size. It can only allow sequential writes, which reduces write amplification in SSD, leading to higher throughput and increased capacity. More details about ZBDs can be found at:

<    1   2   3   >