Re: [PATCH RFC] virtio-net: fix bottom-half packet TX on asynchronous completion

2022-10-14 Thread Laurent Vivier
On 10/14/22 05:10, Jason Wang wrote: On Thu, Oct 13, 2022 at 10:48 PM Michael S. Tsirkin wrote: On Thu, Oct 13, 2022 at 04:00:57PM +0200, Laurent Vivier wrote: When virtio-net is used with the socket netdev backend, the backend can be busy and not able to collect new packets. In this case, n

[PULL 2/2] m68k: write bootinfo as rom section and re-randomize on reboot

2022-10-14 Thread Laurent Vivier
From: "Jason A. Donenfeld" Rather than poking directly into RAM, add the bootinfo block as a proper ROM, so that it's restored when rebooting the system. This way, if the guest corrupts any of the bootinfo items, but then tries to reboot, it'll still be restored back to normal as expected. Then,

[PULL 1/2] m68k: rework BI_VIRT_RNG_SEED as BI_RNG_SEED

2022-10-14 Thread Laurent Vivier
From: "Jason A. Donenfeld" Following a change on the kernel side (see link), pass BI_RNG_SEED instead of BI_VIRT_RNG_SEED. This should have no impact on compatibility, as there will simply be no effect if it's an old kernel, which is how things have always been. We then use this as an opportunity

[PULL 0/2] M68k for 7.2 patches

2022-10-14 Thread Laurent Vivier
u-m68k.git tags/m68k-for-7.2-pull-request for you to fetch changes up to fa327be58280f76d2565ff0bdb9b0010ac97c3b0: m68k: write bootinfo as rom section and re-randomize on reboot (2022-10-11 23:02:46 +0200) Pull request m68k branc

Regression save/restore of vsock: (was [PULL 07/55] hw/virtio: move vm_running check to virtio_device_started)

2022-10-14 Thread Christian Borntraeger
Am 10.10.22 um 19:29 schrieb Michael S. Tsirkin: From: Alex Bennée All the boilerplate virtio code does the same thing (or should at least) of checking to see if the VM is running before attempting to start VirtIO. Push the logic up to the common function to avoid getting a copy and paste wrong

[PATCH v3] configure: Avoid using strings binary

2022-10-14 Thread Michal Privoznik
When determining the endiandness of the target architecture we're building for a small program is compiled, which in an obfuscated way declares two strings. Then, we look which string is in correct order (using strings binary) and deduct the endiandness. But using the strings binary is problematic,

Re: [PATCH v4 2/7] qga: Move Linux-specific FS freeze/thaw code to a separate file

2022-10-14 Thread Alexander Ivanov
Hi On 13.10.2022 14:10, Marc-André Lureau wrote: Hi On Thu, Oct 13, 2022 at 1:23 PM Alexander Ivanov wrote: In the next patches we are going to add FreeBSD support for QEMU Guest Agent. In the result, code in commands-posix.c will be too cumbersome. Move Linux-specific FS freez

[PULL 02/10] hw/ssi: ibex_spi: fixup coverity issue

2022-10-14 Thread Alistair Francis
From: Wilfred Mallawa This patch addresses the coverity issues specified in [1], as suggested, `FIELD_DP32()`/`FIELD_EX32()` macros have been implemented to clean up the code. [1] https://www.mail-archive.com/qemu-devel@nongnu.org/msg887713.html Fixes: Coverity CID 1488107 Signed-off-by: Wilfr

[PULL 03/10] hw/ssi: ibex_spi: fixup/add rw1c functionality

2022-10-14 Thread Alistair Francis
From: Wilfred Mallawa This patch adds the `rw1c` functionality to the respective registers. The status fields are cleared when the respective field is set. Signed-off-by: Wilfred Mallawa Reviewed-by: Alistair Francis Message-Id: <20220930033241.206581-3-wilfred.mall...@opensource.wdc.com> Sign

[PULL 04/10] hw/arm, loongarch: Move load_image_to_fw_cfg() to common location

2022-10-14 Thread Alistair Francis
From: Sunil V L load_image_to_fw_cfg() is duplicated by both arm and loongarch. The same function will be required by riscv too. So, it's time to refactor and move this function to a common path. Signed-off-by: Sunil V L Reviewed-by: Andrew Jones Reviewed-by: Alistair Francis Reviewed-by: Son

[PULL 00/10] riscv-to-apply queue

2022-10-14 Thread Alistair Francis
alistair23/qemu.git tags/pull-riscv-to-apply-20221014 for you to fetch changes up to 47566421f029b0a489b63f8195b3ff944e017056: target/riscv: pmp: Fixup TLB size calculation (2022-10-14 14:36:19 +1000) Third RISC-V PR for QEMU 7.2

[PULL 09/10] hw/intc: sifive_plic: change interrupt priority register to WARL field

2022-10-14 Thread Alistair Francis
From: Jim Shu PLIC spec [1] requires interrupt source priority registers are WARL field and the number of supported priority is power-of-2 to simplify SW discovery. Existing QEMU RISC-V machine (e.g. shakti_c) don't strictly follow PLIC spec, whose number of supported priority is not power-of-2.

[PULL 05/10] hw/riscv: virt: Move create_fw_cfg() prior to loading kernel

2022-10-14 Thread Alistair Francis
From: Sunil V L To enable both -kernel and -pflash options, the fw_cfg needs to be created prior to loading the kernel. Signed-off-by: Sunil V L Reviewed-by: Andrew Jones Reviewed-by: Alistair Francis Message-Id: <20221004092351.18209-3-suni...@ventanamicro.com> Signed-off-by: Alistair Franci

[PULL 01/10] hw/riscv: Update comment for qtest check in riscv_find_firmware()

2022-10-14 Thread Alistair Francis
From: Bin Meng Since commit 4211fc553234 ("roms/opensbi: Remove ELF images"), the comment for qtest check in riscv_find_firmware() is out of date. Update it to reflect the latest status. Signed-off-by: Bin Meng Reviewed-by: Alistair Francis Message-Id: Signed-off-by: Alistair Francis --- h

[PULL 07/10] disas/riscv.c: rvv: Add disas support for vector instructions

2022-10-14 Thread Alistair Francis
From: Yang Liu Tested with https://github.com/ksco/rvv-decoder-tests Expected checkpatch errors for consistency and brevity reasons: ERROR: line over 90 characters ERROR: trailing statements should be on next line ERROR: braces {} are necessary for all arms of this statement Signed-off-by: Yan

[PULL 08/10] hw/intc: sifive_plic: fix hard-coded max priority level

2022-10-14 Thread Alistair Francis
From: Jim Shu The maximum priority level is hard-coded when writing to interrupt priority register. However, when writing to priority threshold register, the maximum priority level is from num_priorities Property which is configured by platform. Also change interrupt priority register to use num

[PULL 06/10] hw/riscv: virt: Enable booting S-mode firmware from pflash

2022-10-14 Thread Alistair Francis
From: Sunil V L To boot S-mode firmware payload like EDK2 from persistent flash storage, qemu needs to pass the flash address as the next_addr in fw_dynamic_info to the opensbi. When both -kernel and -pflash options are provided in command line, the kernel (and initrd if -initrd) will be copied

[PULL 10/10] target/riscv: pmp: Fixup TLB size calculation

2022-10-14 Thread Alistair Francis
From: Alistair Francis Since commit 4047368938f6 "accel/tcg: Introduce tlb_set_page_full" we have been seeing this assert ../accel/tcg/cputlb.c:1294: tlb_set_page_with_attrs: Assertion `is_power_of_2(size)' failed. When running Tock on the OpenTitan machine. The issue is that pmp_get_tlb_

Re: [PATCH v2 4/7] configure: don't enable cross compilers unless in target_list

2022-10-14 Thread Alex Bennée
Paolo Bonzini writes: > On 10/13/22 21:48, Alex Bennée wrote: >>> + case " $target_list " in >>> +" $1 ") ;; >>> +*) return 1 ;; >>> + esac >>> + >> this of course prevents building of roms by actually disabling all >> target compilers... > > Yeah, two asterisks are missing. I'll sen

Re: [PATCH v4 2/7] qga: Move Linux-specific FS freeze/thaw code to a separate file

2022-10-14 Thread Marc-André Lureau
Hi On Fri, Oct 14, 2022 at 11:56 AM Alexander Ivanov < alexander.iva...@virtuozzo.com> wrote: > Hi > On 13.10.2022 14:10, Marc-André Lureau wrote: > > Hi > > On Thu, Oct 13, 2022 at 1:23 PM Alexander Ivanov < > alexander.iva...@virtuozzo.com> wrote: > >> In the next patches we are going to add Fr

Re: Regression save/restore of vsock: (was [PULL 07/55] hw/virtio: move vm_running check to virtio_device_started)

2022-10-14 Thread Christian Borntraeger
Am 14.10.22 um 09:30 schrieb Christian Borntraeger: Am 10.10.22 um 19:29 schrieb Michael S. Tsirkin: From: Alex Bennée All the boilerplate virtio code does the same thing (or should at least) of checking to see if the VM is running before attempting to start VirtIO. Push the logic up to the co

Re: [PATCH] tests/tcg: include CONFIG_PLUGIN in config-host.mak

2022-10-14 Thread Alex Bennée
Paolo Bonzini writes: > On Thu, Oct 13, 2022 at 10:35 PM Alex Bennée wrote: >> >> >> Paolo Bonzini writes: >> >> > Signed-off-by: Paolo Bonzini >> > --- >> > configure | 3 +++ >> > 1 file changed, 3 insertions(+) >> > >> > diff --git a/configure b/configure >> > index f4ff1cf305..a5af9c524

Re: [PATCH v3] configure: Avoid using strings binary

2022-10-14 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: Regression save/restore of vsock: (was [PULL 07/55] hw/virtio: move vm_running check to virtio_device_started)

2022-10-14 Thread Alex Bennée
Christian Borntraeger writes: > Am 10.10.22 um 19:29 schrieb Michael S. Tsirkin: >> From: Alex Bennée >> All the boilerplate virtio code does the same thing (or should at >> least) of checking to see if the VM is running before attempting to >> start VirtIO. Push the logic up to the common fun

Re: Regression save/restore of vsock: (was [PULL 07/55] hw/virtio: move vm_running check to virtio_device_started)

2022-10-14 Thread Christian Borntraeger
Am 14.10.22 um 10:37 schrieb Alex Bennée: Christian Borntraeger writes: Am 10.10.22 um 19:29 schrieb Michael S. Tsirkin: From: Alex Bennée All the boilerplate virtio code does the same thing (or should at least) of checking to see if the VM is running before attempting to start VirtIO. Pu

Re: [PATCH v2 4/7] configure: don't enable cross compilers unless in target_list

2022-10-14 Thread Paolo Bonzini
On 10/14/22 10:13, Alex Bennée wrote: @@ -1866,6 +1866,15 @@ probe_target_compiler() { container_cross_ranlib= container_cross_strip= + # We shall skip configuring the target compiler if the user didn't + # bother enabling an appropriate guest. This avoids building + # extraneous f

Re: [PATCH] util/log: Always send errors to logfile when daemonized

2022-10-14 Thread Paolo Bonzini
On 10/14/22 08:08, Greg Kurz wrote: +need_to_open_file = log_flags && !per_thread; Pre-existing, but I think this should check log_per_thread instead of per_thread. +} else if (filename) { +/* + * If we are daemonized, we will only log if there is a filename. +

Re: [PATCH v3 05/13] mac_{old|new}world: Simplify cmdline_base calculation

2022-10-14 Thread Mark Cave-Ayland
On 03/10/2022 21:13, BALATON Zoltan wrote: By slight reorganisation we can avoid an else branch and some code duplication which makes it easier to follow the code. Signed-off-by: BALATON Zoltan --- hw/ppc/mac_newworld.c | 6 +++--- hw/ppc/mac_oldworld.c | 7 +++ 2 files changed, 6 inse

Re: [PATCH v3 06/13] mac_newworld: Clean up creation of Uninorth devices

2022-10-14 Thread Mark Cave-Ayland
On 03/10/2022 21:13, BALATON Zoltan wrote: Map regions in ascending order and reorganise code a bit to avoid some casts and move Uninorth parts together. Signed-off-by: BALATON Zoltan --- hw/ppc/mac_newworld.c | 38 ++ 1 file changed, 18 insertions(+), 20

Re: [PATCH v3 10/13] hw/ppc/mac.h: Move grackle-pcihost type declaration out to a header

2022-10-14 Thread Mark Cave-Ayland
On 03/10/2022 21:13, BALATON Zoltan wrote: Signed-off-by: BALATON Zoltan --- MAINTAINERS | 1 + hw/pci-host/grackle.c | 14 +-- hw/ppc/mac.h | 3 --- hw/ppc/mac_oldworld.c | 1 + include/hw/pci-host/grackle.h | 44 +

Re: [PATCH RFC] virtio-net: fix bottom-half packet TX on asynchronous completion

2022-10-14 Thread Laurent Vivier
On 10/14/22 09:06, Laurent Vivier wrote: On 10/14/22 05:10, Jason Wang wrote: On Thu, Oct 13, 2022 at 10:48 PM Michael S. Tsirkin wrote: On Thu, Oct 13, 2022 at 04:00:57PM +0200, Laurent Vivier wrote: When virtio-net is used with the socket netdev backend, the backend can be busy and not abl

Re: [RFC PATCH 1/4] docs/devel: add a maintainers section to development process

2022-10-14 Thread Mark Cave-Ayland
On 12/10/2022 13:11, Alex Bennée wrote: We don't currently have a clear place in the documentation to describe the rolls and responsibilities of a maintainer. Lets create one so we can. I've moved a few small bits out of other files to try and keep everything in one place. Signed-off-by: Alex B

Re: [PATCH v3] qapi/qmp: Add timestamps to qmp command responses

2022-10-14 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Thu, Oct 13, 2022 at 05:00:26PM +0200, Markus Armbruster wrote: >> Denis Plotnikov writes: >> >> > Add "start" & "end" time values to qmp command responses. >> >> Please spell it QMP. More of the same below. >> >> > >> > These time values are added to let the

Re: [RFC PATCH 3/4] docs/devel: simplify the minimal checklist

2022-10-14 Thread Mark Cave-Ayland
On 12/10/2022 13:11, Alex Bennée wrote: The bullet points are quite long and contain process tips. Move those bits of the bullet to the relevant sections and link to them. Use a table for nicer formatting of the checklist. Signed-off-by: Alex Bennée --- docs/devel/submitting-a-patch.rst | 75

Re: [RFC PATCH 0/4] docs/devel suggestions for discussion

2022-10-14 Thread Mark Cave-Ayland
On 12/10/2022 13:11, Alex Bennée wrote: Hi, This is an attempt to improve our processes documentation by: - adding an explicit section on maintainers - reducing the up-front verbiage in patch submission - emphasising the importance to respectful reviews I'm sure the language could be im

Re: [PATCH v3] qapi/qmp: Add timestamps to qmp command responses

2022-10-14 Thread Denis Plotnikov
On 13.10.2022 18:00, Markus Armbruster wrote: Denis Plotnikov writes: Add "start" & "end" time values to qmp command responses. Please spell it QMP. More of the same below. ok Can you tell me about a problem you cracked (or could have cracked) with the help of this? We have a managemen

KVM Call for 2022-10-18

2022-10-14 Thread Juan Quintela
Hi Please, send any topic that you are interested in covering. For next week, we have a topic: - VFIO and migration We are going to discuss what to do with vfio devices that support migration. See my RFC on the list, so far we are discussing: - we need a way to know the size of the vfio de

Re: [PATCH v3] tcg/loongarch64: Add direct jump support

2022-10-14 Thread Richard Henderson
On 10/14/22 14:40, Qi Hu wrote: Similar to the ARM64, LoongArch has PC-relative instructions such as PCADDU18I. These instructions can be used to support direct jump for LoongArch. Additionally, if instruction "B offset" can cover the target address(target is within ±128MB range), a single "B off

Re: [PATCH] MAINTAINERS: step back from PPC

2022-10-14 Thread Daniel Henrique Barboza
Queued in gitlab.com/danielhb/qemu/tree/ppc-next. Thanks, Daniel On 9/29/22 15:09, Cédric Le Goater wrote: I am not active anymore on the PPC maintainership, degrade my self as standard Reviewer. Also degrade PowerNV and XIVE status since I am not funded for this work. Signed-off-by: Cédric L

Re: [PATCH] target/ppc: Fix xvcmp* clearing FI bit

2022-10-14 Thread Daniel Henrique Barboza
Queued in gitlab.com/danielhb/qemu/tree/ppc-next. Thanks, Daniel On 10/5/22 09:15, Víctor Colombo wrote: Vector instructions in general are not supposed to change the FI bit. However, xvcmp* instructions are calling gen_helper_float_check_status, which is leading to a cleared FI flag where it

Re: [RFC 7/7] migration: call qemu_savevm_state_pending_exact() with the guest stopped

2022-10-14 Thread Joao Martins
On 13/10/2022 17:08, Juan Quintela wrote: > Oops. My understanding was that once the guest is stopped you can say > how big is it. It's worth keeping in mind that conceptually a VF won't stop (e.g. DMA) until really told through VFIO. So, stopping CPUs (guest) just means that guest code does not

Re: Regression save/restore of vsock: (was [PULL 07/55] hw/virtio: move vm_running check to virtio_device_started)

2022-10-14 Thread Alex Bennée
Christian Borntraeger writes: > Am 14.10.22 um 09:30 schrieb Christian Borntraeger: >> Am 10.10.22 um 19:29 schrieb Michael S. Tsirkin: >>> From: Alex Bennée >>> >>> All the boilerplate virtio code does the same thing (or should at >>> least) of checking to see if the VM is running before attem

Re: [PATCH v2] qapi-gen: mark coroutine QMP command functions as coroutine_fn

2022-10-14 Thread Markus Armbruster
Paolo Bonzini writes: > Coroutine commands have to be declared as coroutine_fn, but the Reminder, because I had to look this up... A "coroutine command" is a command that has flag coroutine set, like so: { 'command': 'block_resize', 'data': { '*device': 'str', '*node-

Re: [PATCH] disas/mips: Fix branch displacement for BEQZC and BNEZC

2022-10-14 Thread Philippe Mathieu-Daudé
On Thu, Oct 13, 2022 at 9:26 PM Richard Henderson wrote: > On 10/14/22 07:52, Philippe Mathieu-Daudé wrote: > > +/* Sign extend the displacement with 21 bits. */ > > +delta = l & 0x1F; > > +if (delta & 0x10) { > > +delta

[PATCH v2] disas/mips: Fix branch displacement for BEQZC and BNEZC

2022-10-14 Thread Philippe Mathieu-Daudé
From: David Daney disas/mips.c got added in commit 6643d27ea0 ("MIPS disas support") apparently based on binutils tag 'gdb_6_1-branchpoint' [1]. Back then, MIPSr6 was not supported (added in binutils commit 7361da2c952 during 2014 [2]). Binutils codebase diverged so much over the last 18 years,

Re: [RFC PATCH 1/4] docs/devel: add a maintainers section to development process

2022-10-14 Thread Markus Armbruster
Mark Cave-Ayland writes: > On 12/10/2022 13:11, Alex Bennée wrote: [...] >> +Becoming a maintainer >> +- >> + >> +Maintainers are volunteers who put themselves forward to keep an eye >> +on an area of code. They are generally accepted by the community to Do you mean "expect

Re: [RFC 7/7] migration: call qemu_savevm_state_pending_exact() with the guest stopped

2022-10-14 Thread Juan Quintela
Joao Martins wrote: > On 13/10/2022 17:08, Juan Quintela wrote: >> Oops. My understanding was that once the guest is stopped you can say >> how big is it. Hi > It's worth keeping in mind that conceptually a VF won't stop (e.g. DMA) until > really told through VFIO. So, stopping CPUs (guest) ju

Re: [RFC PATCH 0/4] docs/devel suggestions for discussion

2022-10-14 Thread Markus Armbruster
Mark Cave-Ayland writes: > On 12/10/2022 13:11, Alex Bennée wrote: > >> Hi, >> This is an attempt to improve our processes documentation by: >> - adding an explicit section on maintainers >> - reducing the up-front verbiage in patch submission >> - emphasising the importance to respectful r

Re: [PATCH v2 4/8] hw/arm/virt: Fix devicetree warning about the gpio-key node

2022-10-14 Thread Peter Maydell
On Thu, 13 Oct 2022 at 22:47, Rob Herring wrote: > > On Tue, Sep 27, 2022 at 6:56 AM Peter Maydell > wrote: > > Please don't retrospectively make perfectly valid working DTs > > non-valid. I don't see any reason to change QEMU here. > > > > More generally, the set of things you might want the >

Re: [PATCH v3] qapi/qmp: Add timestamps to qmp command responses

2022-10-14 Thread Daniel P . Berrangé
On Fri, Oct 14, 2022 at 11:31:13AM +0200, Markus Armbruster wrote: > Daniel P. Berrangé writes: > > > On Thu, Oct 13, 2022 at 05:00:26PM +0200, Markus Armbruster wrote: > >> Denis Plotnikov writes: > >> > >> > Add "start" & "end" time values to qmp command responses. > >> > >> Please spell it

[PATCH] input: Allow to choose console with qemu_input_is_absolute

2022-10-14 Thread Akihiko Odaki
Although an input is routed depending on the console, qemu_input_is_absolute() had no mechanism to specify the console. Accept QemuConsole as an argument for qemu_input_is_absolute, and let the display know the absolute/relative state for a particular console. Signed-off-by: Akihiko Odaki --- i

Re: [PATCH v2] migration/channel-block: fix return value for qio_channel_block_{readv,writev}

2022-10-14 Thread Juan Quintela
Fiona Ebner wrote: > in the error case. The documentation in include/io/channel.h states > that -1 or QIO_CHANNEL_ERR_BLOCK should be returned upon error. Simply > passing along the return value from the bdrv-functions has the > potential to confuse the call sides. Non-blocking mode is not > imple

Re: [PATCH v3 05/13] mac_{old|new}world: Simplify cmdline_base calculation

2022-10-14 Thread BALATON Zoltan
On Fri, 14 Oct 2022, Mark Cave-Ayland wrote: On 03/10/2022 21:13, BALATON Zoltan wrote: By slight reorganisation we can avoid an else branch and some code duplication which makes it easier to follow the code. Signed-off-by: BALATON Zoltan --- hw/ppc/mac_newworld.c | 6 +++--- hw/ppc/mac_ol

Re: Regression save/restore of vsock: (was [PULL 07/55] hw/virtio: move vm_running check to virtio_device_started)

2022-10-14 Thread Christian Borntraeger
Am 14.10.22 um 13:07 schrieb Alex Bennée: Christian Borntraeger writes: Am 14.10.22 um 09:30 schrieb Christian Borntraeger: Am 10.10.22 um 19:29 schrieb Michael S. Tsirkin: From: Alex Bennée All the boilerplate virtio code does the same thing (or should at least) of checking to see if

Re: [RFC 7/7] migration: call qemu_savevm_state_pending_exact() with the guest stopped

2022-10-14 Thread Joao Martins
On 14/10/2022 12:28, Juan Quintela wrote: > Joao Martins wrote: >> On 13/10/2022 17:08, Juan Quintela wrote: >>> Oops. My understanding was that once the guest is stopped you can say >>> how big is it. > > Hi > >> It's worth keeping in mind that conceptually a VF won't stop (e.g. DMA) until >>

Re: [PATCH v3] qapi/qmp: Add timestamps to qmp command responses

2022-10-14 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Fri, Oct 14, 2022 at 11:31:13AM +0200, Markus Armbruster wrote: >> Daniel P. Berrangé writes: >> >> > On Thu, Oct 13, 2022 at 05:00:26PM +0200, Markus Armbruster wrote: >> >> Denis Plotnikov writes: >> >> >> >> > Add "start" & "end" time values to qmp command r

Re: [PATCH v3] qapi/qmp: Add timestamps to qmp command responses

2022-10-14 Thread Daniel P . Berrangé
On Fri, Oct 14, 2022 at 02:57:06PM +0200, Markus Armbruster wrote: > Daniel P. Berrangé writes: > > > On Fri, Oct 14, 2022 at 11:31:13AM +0200, Markus Armbruster wrote: > >> Daniel P. Berrangé writes: > >> > >> > On Thu, Oct 13, 2022 at 05:00:26PM +0200, Markus Armbruster wrote: > >> >> Denis P

[PATCH v2 1/2] virtio-net: fix bottom-half packet TX on asynchronous completion

2022-10-14 Thread Laurent Vivier
When virtio-net is used with the socket netdev backend, the backend can be busy and not able to collect new packets. In this case, net_socket_receive() returns 0 and registers a poll function to detect when the socket is ready again. In virtio_net_tx_bh(), virtio_net_flush_tx() forwards the 0, th

[PATCH v2 2/2] virtio-net: fix TX timer with tx_burst

2022-10-14 Thread Laurent Vivier
When virtio_net_flush_tx() reaches the tx_burst value all the queue is not flushed and nothing restart the timer. Fix that by doing for TX timer as we do for bottom half TX: rearming the timer if we find any packet to send during the virtio_net_flush_tx() call. Fixes: e3f30488e5f8 ("virtio-net: L

[RFC PATCH] virtio: re-order vm_running and use_started checks

2022-10-14 Thread Alex Bennée
During migration the virtio device state can be restored before we restart the VM. As no devices can be running while the VM is paused it makes sense to bail out early in that case. This returns the order introduced in: 9f6bcfd99f (hw/virtio: move vm_running check to virtio_device_started) to w

[PATCH v2 0/2] virtio-net: re-arm/re-schedule when tx_burst stops virtio_net_flush_tx()

2022-10-14 Thread Laurent Vivier
When virtio_net_flush_tx() reaches the tx_burst value all the queue is not flushed and nothing restart the timer or the bottom half function. For BH, this is only missing in the virtio_net_tx_complete() function. For the timer, the same fix is needed in virtio_net_tx_complete() but it must be also

Re: [RFC PATCH 1/4] docs/devel: add a maintainers section to development process

2022-10-14 Thread Alex Bennée
Markus Armbruster writes: > Mark Cave-Ayland writes: > >> On 12/10/2022 13:11, Alex Bennée wrote: > > [...] > >>> +Becoming a maintainer >>> +- >>> + >>> +Maintainers are volunteers who put themselves forward to keep an eye >>> +on an area of code. They are generally accept

Re: [PATCH] MAINTAINERS: step back from PPC

2022-10-14 Thread Alex Bennée
Cédric Le Goater writes: > I am not active anymore on the PPC maintainership, degrade my self as > standard Reviewer. Also degrade PowerNV and XIVE status since I am not > funded for this work. > > Signed-off-by: Cédric Le Goater Reviewed-by: Alex Bennée -- Alex Bennée

Re: [RFC PATCH 0/4] docs/devel suggestions for discussion

2022-10-14 Thread Alex Bennée
Markus Armbruster writes: > Mark Cave-Ayland writes: > >> On 12/10/2022 13:11, Alex Bennée wrote: >> >>> Hi, >>> This is an attempt to improve our processes documentation by: >>> - adding an explicit section on maintainers >>> - reducing the up-front verbiage in patch submission >>> - em

[PATCH v3 2/7] util: Introduce qemu_thread_set_affinity() and qemu_thread_get_affinity()

2022-10-14 Thread David Hildenbrand
Usually, we let upper layers handle CPU pinning, because pthread_setaffinity_np() (-> sched_setaffinity()) is blocked via seccomp when starting QEMU with -sandbox enable=on,resourcecontrol=deny However, we want to configure and observe the CPU affinity of threads from QEMU directly in some cas

[PATCH v3 1/7] util: Cleanup and rename os_mem_prealloc()

2022-10-14 Thread David Hildenbrand
Let's * give the function a "qemu_*" style name * make sure the parameters in the implementation match the prototype * rename smp_cpus to max_threads, which makes the semantics of that parameter clearer ... and add a function documentation. Reviewed-by: Michal Privoznik Signed-off-by: David Hi

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

2022-10-14 Thread David Hildenbrand
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 to mess up the system. QEMU disallows relevant syscalls

[PATCH v3 4/7] util: Add write-only "node-affinity" property for ThreadContext

2022-10-14 Thread David Hildenbrand
Let's make it easier to pin threads created via a ThreadContext to all host CPUs currently belonging to a given set of host NUMA nodes -- which is the common case. "node-affinity" is simply a shortcut for setting "cpu-affinity" manually to the list of host CPUs belonging to the set of host nodes.

[PATCH v3 3/7] util: Introduce ThreadContext user-creatable object

2022-10-14 Thread David Hildenbrand
Setting the CPU affinity of QEMU threads is a bit problematic, because QEMU doesn't always have permissions to set the CPU affinity itself, for example, with seccomp after initialized by QEMU: -sandbox enable=on,resourcecontrol=deny General information about CPU affinities can be found in the

[PATCH v3 5/7] util: Make qemu_prealloc_mem() optionally consume a ThreadContext

2022-10-14 Thread David Hildenbrand
... and implement it under POSIX. When a ThreadContext is provided, create new threads via the context such that these new threads obtain a properly configured CPU affinity. Reviewed-by: Michal Privoznik Signed-off-by: David Hildenbrand --- backends/hostmem.c | 5 +++-- hw/virtio/virtio-me

[PATCH v3 6/7] hostmem: Allow for specifying a ThreadContext for preallocation

2022-10-14 Thread David Hildenbrand
Let's allow for specifying a thread context via the "prealloc-context" property. When set, preallcoation threads will be crated via the thread context -- inheriting the same CPU affinity as the thread context. Pinning preallcoation threads to CPUs can heavily increase performance in NUMA setups, b

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

2022-10-14 Thread David Hildenbrand
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 ThreadContext objects can be created on the QEMU commandline and the CPU affinity can be configured extern

Re: [RFC PATCH] virtio: re-order vm_running and use_started checks

2022-10-14 Thread Christian Borntraeger
Am 14.10.22 um 15:21 schrieb Alex Bennée: During migration the virtio device state can be restored before we restart the VM. As no devices can be running while the VM is paused it makes sense to bail out early in that case. This returns the order introduced in: 9f6bcfd99f (hw/virtio: move

[RFC PATCH] MAINTAINERS: add entries for the key build bits

2022-10-14 Thread Alex Bennée
Changes to the build files are a bit special in that they usually go through other maintainer trees. However considering the build system is the root of everything a developer is likely to do we should at least set it out in MAINTAINERS. I'm going to nominate Paolo for meson stuff given the conver

Re: [PATCH v3 12/29] target/ppc: create an interrupt masking method for POWER8

2022-10-14 Thread Fabiano Rosas
Matheus Ferst writes: > The new method is identical to ppc_next_unmasked_interrupt_generic, > processor-specific code will be added/removed in the following patches. > > Signed-off-by: Matheus Ferst Reviewed-by: Fabiano Rosas

Re: [PATCH v3 4/5] bios-tables-test: add test for number of cores > 255

2022-10-14 Thread Igor Mammedov
On Tue, 11 Oct 2022 13:17:30 +0200 Julia Suvorova wrote: > The new test is run with a large number of cpus and checks if the > core_count field in smbios_cpu_test (structure type 4) is correct. > > Choose q35 as it allows to run with -smp > 255. > > Signed-off-by: Julia Suvorova > Message-Id:

Re: [PATCH v3 3/5] tests/acpi: allow changes for core_count2 test

2022-10-14 Thread Igor Mammedov
On Tue, 11 Oct 2022 13:17:29 +0200 Julia Suvorova wrote: > Signed-off-by: Julia Suvorova > Message-Id: <20220731162141.178443-4-jus...@redhat.com> Acked-by: Igor Mammedov > --- > tests/data/acpi/q35/APIC.core-count2| 0 > tests/data/acpi/q35/DSDT.core-count2| 0 > tests/data/

Re: [PATCH v4 03/10] m25p80: Add erase size for mx25l25635e

2022-10-14 Thread Francisco Iglesias
On [2022 Oct 13] Thu 18:12:34, Cédric Le Goater wrote: > Signed-off-by: Cédric Le Goater Reviewed-by: Francisco Iglesias > --- > hw/block/m25p80.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c > index 13e7b28fd2b0..637c25d76e3

[PATCH 0/2] hw/audio/intel-hda: Don't use device_legacy_reset()

2022-10-14 Thread Peter Maydell
This patchset removes a use of device_legacy_reset() from the intel-hda audio device, and removes a duplicated reset of the codec devices. Currently the intel-hda device has a reset method which manually resets all the codecs by calling device_legacy_reset() on them. This means they get reset twi

[PATCH 2/2] hw/audio/intel-hda: Drop unnecessary prototype

2022-10-14 Thread Peter Maydell
The only use of intel_hda_reset() is after its definition, so we don't need to separately declare its prototype at the top of the file; drop the unnecessary line. Signed-off-by: Peter Maydell --- hw/audio/intel-hda.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/audio/intel-hda.c b/hw/

[PATCH 1/2] hw/audio/intel-hda: don't reset codecs twice

2022-10-14 Thread Peter Maydell
Currently the intel-hda device has a reset method which manually resets all the codecs by calling device_legacy_reset() on them. This means they get reset twice, once because child devices on a qbus get reset before the parent device's reset method is called, and then again because we're manually

[PATCH] hw/ppc/spapr_pci.c: Use device_cold_reset() rather than device_legacy_reset()

2022-10-14 Thread Peter Maydell
In spapr_phb_children_reset() we call device_legacy_reset() to reset any QOM children of the SPAPR PCI host bridge device. This will not reset any qbus such a child might own. Switch to device_cold_reset(), which will reset both the device and its buses. (If the child has no qbuses then there will

[PATCH] edk2: fix TPM 2.0 regression

2022-10-14 Thread Natanael Copa
Fix a regression that was introduced with the edk2 202202 upgrade (commit e2f3137c7344). Upstream changed TPM_ENABLE to TPM1_ENABLE and TPM2_ENABLE. This led to TPM 2.0 (which is needed for windows 11) silently got disabled. Ref: https://github.com/tianocore/edk2/commit/4de8d61bcec02a13ceed84f92

Re: [PATCH v3 13/29] target/ppc: remove unused interrupts from p8_next_unmasked_interrupt

2022-10-14 Thread Fabiano Rosas
Matheus Ferst writes: > Remove the following unused interrupts from the POWER8 interrupt masking > method: > - PPC_INTERRUPT_RESET: only raised for 6xx, 7xx, 970, and POWER5p; > - Debug Interrupt: removed in Power ISA v2.07; > - Hypervisor Virtualization: introduced in Power ISA v3.0; > - Critica

Re: [PATCH v3 14/29] target/ppc: create an interrupt deliver method for POWER8

2022-10-14 Thread Fabiano Rosas
Matheus Ferst writes: > The new method is identical to ppc_deliver_interrupt, processor-specific > code will be added/removed in the following patches. > > Signed-off-by: Matheus Ferst Reviewed-by: Fabiano Rosas

Re: [PATCH v3 15/29] target/ppc: remove unused interrupts from p8_deliver_interrupt

2022-10-14 Thread Fabiano Rosas
Matheus Ferst writes: > Remove the following unused interrupts from the POWER8 interrupt > processing method: > - PPC_INTERRUPT_RESET: only raised for 6xx, 7xx, 970 and POWER5p; > - Debug Interrupt: removed in Power ISA v2.07; > - Hypervisor Virtualization: introduced in Power ISA v3.0; > - Criti

Re: [PATCH v3 16/29] target/ppc: remove generic architecture checks from p8_deliver_interrupt

2022-10-14 Thread Fabiano Rosas
Matheus Ferst writes: > Signed-off-by: Matheus Ferst Reviewed-by: Fabiano Rosas > --- > target/ppc/excp_helper.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c > index 662daad796..aaf1c95087 100644 > --- a/target/ppc/excp_helper

Re: [PATCH v3 17/29] target/ppc: move power-saving interrupt masking out of cpu_has_work_POWER8

2022-10-14 Thread Fabiano Rosas
Matheus Ferst writes: > Move the interrupt masking logic out of cpu_has_work_POWER8 in a new > method, p8_interrupt_powersave, that only returns an interrupt if it can > wake the processor from power-saving mode. > > Signed-off-by: Matheus Ferst Reviewed-by: Fabiano Rosas

Re: [PATCH v3 18/29] target/ppc: add power-saving interrupt masking logic to p8_next_unmasked_interrupt

2022-10-14 Thread Fabiano Rosas
Matheus Ferst writes: > Export p8_interrupt_powersave and use it in p8_next_unmasked_interrupt. > > Signed-off-by: Matheus Ferst Reviewed-by: Fabiano Rosas

[PATCH] hw/usb/hcd-xhci: Reset the XHCIState with device_cold_reset()

2022-10-14 Thread Peter Maydell
Currently the hcd-xhci-pci and hcd-xhci-sysbus devices, which are mostly wrappers around the TYPE_XHCI device, which is a direct subclass of TYPE_DEVICE. Since TYPE_DEVICE devices are not on any qbus and do not get automatically reset, the wrapper devices both reset the TYPE_XHCI device in their o

Re: [PATCH V3 1/4] intel-iommu: don't warn guest errors when getting rid2pasid entry

2022-10-14 Thread Peter Xu
On Sun, Oct 09, 2022 at 01:48:32PM +0800, Jason Wang wrote: > We use to warn on wrong rid2pasid entry. But this error could be > triggered by the guest and could happens during initialization. So > let's don't warn in this case. > > Signed-off-by: Jason Wang Reviewed-by: Peter Xu -- Peter Xu

Re: [PATCH V3 3/4] intel-iommu: convert VTD_PE_GET_FPD_ERR() to be a function

2022-10-14 Thread Peter Xu
On Sun, Oct 09, 2022 at 01:48:34PM +0800, Jason Wang wrote: > We used to have a macro for VTD_PE_GET_FPD_ERR() but it has an > internal goto which prevents it from being reused. This patch convert > that macro to a dedicated function and let the caller to decide what > to do (e.g using goto or not)

[PATCH v9 0/5] QEMU PCIe DOE for PCIe 4.0/5.0 and CXL 2.

2022-10-14 Thread Jonathan Cameron via
Changes since v8: - Take the entry enums out of the functions and prefix them appropriately. - Use the visibility of *_NUM_ENTRIES to allocate the cdat_table - Fix volatile_mr -> nonvolatile_mr V7 Cover letter - lightly edited. Whilst I have carried on Huai-Cheng Kuo's series version number

Re: [PATCH v3 19/29] target/ppc: create an interrupt masking method for POWER7

2022-10-14 Thread Fabiano Rosas
Matheus Ferst writes: > The new method is identical to ppc_next_unmasked_interrupt_generic, > processor-specific code will be added/removed in the following patches. > > Signed-off-by: Matheus Ferst Reviewed-by: Fabiano Rosas

Re: [PATCH v3 21/29] target/ppc: create an interrupt deliver method for POWER7

2022-10-14 Thread Fabiano Rosas
Matheus Ferst writes: > The new method is identical to ppc_deliver_interrupt, processor-specific > code will be added/removed in the following patches. > > Signed-off-by: Matheus Ferst Reviewed-by: Fabiano Rosas

[PATCH v9 1/5] hw/pci: PCIe Data Object Exchange emulation

2022-10-14 Thread Jonathan Cameron via
From: Huai-Cheng Kuo Emulation of PCIe Data Object Exchange (DOE) PCIE Base Specification r6.0 6.3 Data Object Exchange Supports multiple DOE PCIe Extended Capabilities for a single PCIe device. For each capability, a static array of DOEProtocol should be passed to pcie_doe_init(). The protocols

[PATCH v9 3/5] hw/cxl/cdat: CXL CDAT Data Object Exchange implementation

2022-10-14 Thread Jonathan Cameron via
From: Huai-Cheng Kuo The Data Object Exchange implementation of CXL Coherent Device Attribute Table (CDAT). This implementation is referring to "Coherent Device Attribute Table Specification, Rev. 1.03, July. 2022" and "Compute Express Link Specification, Rev. 3.0, July. 2022" This patch adds co

Re: [PATCH v3 26/29] target/ppc: remove ppc_store_lpcr from CONFIG_USER_ONLY builds

2022-10-14 Thread Fabiano Rosas
Matheus Ferst writes: > Writes to LPCR are hypervisor privileged. > > Signed-off-by: Matheus Ferst Reviewed-by: Fabiano Rosas

[PATCH v9 4/5] hw/mem/cxl-type3: Add CXL CDAT Data Object Exchange

2022-10-14 Thread Jonathan Cameron via
From: Huai-Cheng Kuo The CDAT can be specified in two ways. One is to add ",cdat=" in "-device cxl-type3"'s command option. The file is required to provide the whole CDAT table in binary mode. The other is to use the default that provides some 'reasonable' numbers based on type of memory and size

[PATCH v9 2/5] hw/mem/cxl-type3: Add MSIX support

2022-10-14 Thread Jonathan Cameron via
This will be used by several upcoming patch sets so break it out such that it doesn't matter which one lands first. Signed-off-by: Jonathan Cameron --- hw/mem/cxl_type3.c | 9 + 1 file changed, 9 insertions(+) diff --git a/hw/mem/cxl_type3.c b/hw/mem/cxl_type3.c index a71bf1afeb..568c9d

  1   2   >