Re: [PATCH V2] hw/riscv: virt: Remove size restriction for pflash

2022-11-08 Thread Andrew Jones
On Tue, Nov 08, 2022 at 03:12:42PM +0100, Philippe Mathieu-Daudé wrote: > On 7/11/22 18:34, Daniel P. Berrangé wrote: > > On Mon, Nov 07, 2022 at 06:32:01PM +0100, Andrew Jones wrote: > > > On Mon, Nov 07, 2022 at 04:19:10PM +, Daniel P. Berrangé wrote: > > > > On Mon, Nov 07, 2022 at 03:50:44P

Re: [PATCH v2 3/9] nbd/server.c: add missing coroutine_fn annotations

2022-11-08 Thread Vladimir Sementsov-Ogievskiy
On 11/4/22 12:56, Emanuele Giuseppe Esposito wrote: These functions end up calling bdrv_*() implemented as generated_co_wrapper functions. Same here. Sorry that I joined only on v3. In past we had a lot of "coroutine wrappers", each IO function in block/io.c and many in block.c had two varian

Re: [PULL v4 00/83] pci,pc,virtio: features, tests, fixes, cleanups

2022-11-08 Thread Stefan Hajnoczi
On Tue, Nov 08, 2022 at 01:23:16AM -0500, Michael S. Tsirkin wrote: > On Mon, Nov 07, 2022 at 05:47:16PM -0500, Michael S. Tsirkin wrote: > > Changes from v3: > > Applied and squashed fix by Ani for modular build breakage > > Reordered Julia's patches to avoid bisect breakage > > Checkp

Re: [PATCH v2 5/9] block: distinguish between bdrv_create running in coroutine and not

2022-11-08 Thread Vladimir Sementsov-Ogievskiy
On 11/4/22 12:56, Emanuele Giuseppe Esposito wrote: Call two different functions depending on whether bdrv_create is in coroutine or not, following the same pattern as generated_co_wrapper functions. This allows to also call the coroutine function directly, without using CreateCo or relying in b

Re: [PATCH V2] hw/riscv: virt: Remove size restriction for pflash

2022-11-08 Thread Daniel P . Berrangé
On Tue, Nov 08, 2022 at 03:12:42PM +0100, Philippe Mathieu-Daudé wrote: > On 7/11/22 18:34, Daniel P. Berrangé wrote: > > On Mon, Nov 07, 2022 at 06:32:01PM +0100, Andrew Jones wrote: > > > On Mon, Nov 07, 2022 at 04:19:10PM +, Daniel P. Berrangé wrote: > > > > On Mon, Nov 07, 2022 at 03:50:44P

Re: [PULL 00/55] MIPS patches for 2022-10-30

2022-11-08 Thread Thomas Huth
On 08/11/2022 15.23, Philippe Mathieu-Daudé wrote: On 8/11/22 14:59, Peter Maydell wrote: On Sun, 30 Oct 2022 at 22:29, Philippe Mathieu-Daudé wrote: The following changes since commit 344744e148e6e865f5a57e745b02a87e5ea534ad:    Merge tag 'dump-pull-request' of https://gitlab.com/marcandre

Re: [PATCH v2 2/9] block-copy: add missing coroutine_fn annotations

2022-11-08 Thread Emanuele Giuseppe Esposito
Am 08/11/2022 um 15:48 schrieb Vladimir Sementsov-Ogievskiy: > On 11/4/22 12:56, Emanuele Giuseppe Esposito wrote: >> These functions end up calling bdrv_common_block_status_above(), a >> generated_co_wrapper function. > > generated_co_wrapper is not a coroutine_fn. Сonversely it's a function >

Re: [PATCH v2 1/9] block: call bdrv_co_drain_begin in a coroutine

2022-11-08 Thread Emanuele Giuseppe Esposito
Am 08/11/2022 um 15:33 schrieb Vladimir Sementsov-Ogievskiy: > On 11/4/22 12:56, Emanuele Giuseppe Esposito wrote: >> It seems that bdrv_open_driver() forgot to create a coroutine >> where to call bs->drv->bdrv_co_drain_begin(), a callback >> marked as coroutine_fn. >> >> Because there is no act

Re: [PATCH v2 1/9] block: call bdrv_co_drain_begin in a coroutine

2022-11-08 Thread Kevin Wolf
Am 08.11.2022 um 15:33 hat Vladimir Sementsov-Ogievskiy geschrieben: > On 11/4/22 12:56, Emanuele Giuseppe Esposito wrote: > > It seems that bdrv_open_driver() forgot to create a coroutine > > where to call bs->drv->bdrv_co_drain_begin(), a callback > > marked as coroutine_fn. > > > > Because ther

Re: [PULL 00/55] MIPS patches for 2022-10-30

2022-11-08 Thread Philippe Mathieu-Daudé
On 8/11/22 16:09, Thomas Huth wrote: On 08/11/2022 15.23, Philippe Mathieu-Daudé wrote: On 8/11/22 14:59, Peter Maydell wrote: Was this the last use of C++ in the tree, or am I forgetting some other part that still needs the C++ compiler? If it is the last thing, we should put in the "Build

Re: [PATCH v2 8/9] block: bdrv_create is never called in non-coroutine context

2022-11-08 Thread Kevin Wolf
Am 04.11.2022 um 10:56 hat Emanuele Giuseppe Esposito geschrieben: > Delete the if case and make sure it won't be called again > in coroutines. > > Signed-off-by: Emanuele Giuseppe Esposito > Reviewed-by: Paolo Bonzini In the subject line, it should be "never called in coroutine context" rather

Re: [PATCH v1 5/9] hw/virtio: introduce virtio_device_should_start

2022-11-08 Thread Michael S. Tsirkin
On Tue, Nov 08, 2022 at 11:21:26AM +, Alex Bennée wrote: > > "Michael S. Tsirkin" writes: > > > On Tue, Nov 08, 2022 at 10:23:15AM +, Alex Bennée wrote: > >> > >> "Michael S. Tsirkin" writes: > >> > >> > On Tue, Nov 08, 2022 at 09:23:04AM +, Alex Bennée wrote: > >> >> The previous

Re: [PATCH v3 4/4] scripts: add script to compare compatible properties

2022-11-08 Thread Vladimir Sementsov-Ogievskiy
On 11/3/22 13:27, Maksim Davydov wrote: This script run QEMU to obtain compat_props of machines and default values of different types and produce appropriate table. This table can be used to compare machine types to choose the most suitable machine. Also this table in json or csv format should be

RE: [PATCH v4 10/11] Hexagon (target/hexagon) Use direct block chaining for direct jump/branch

2022-11-08 Thread Taylor Simpson
> -Original Message- > From: Richard Henderson > Sent: Tuesday, November 8, 2022 1:24 AM > To: Taylor Simpson ; qemu-devel@nongnu.org > Cc: phi...@linaro.org; a...@rev.ng; a...@rev.ng; Brian Cain > ; Matheus Bernardino (QUIC) > > Subject: Re: [PATCH v4 10/11] Hexagon (target/hexagon) Us

RE: [PATCH v4 03/11] Hexagon (target/hexagon) Add overrides for S2_asr_r_r_sat/S2_asl_r_r_sat

2022-11-08 Thread Taylor Simpson
> -Original Message- > From: Richard Henderson > Sent: Tuesday, November 8, 2022 1:20 AM > To: Taylor Simpson ; qemu-devel@nongnu.org > Cc: phi...@linaro.org; a...@rev.ng; a...@rev.ng; Brian Cain > ; Matheus Bernardino (QUIC) > > Subject: Re: [PATCH v4 03/11] Hexagon (target/hexagon) Ad

Call for FOSDEM presentations on QEMU, KVM, and rust-vmm

2022-11-08 Thread Stefan Hajnoczi
Hi, The yearly FOSDEM open source conference is now accepting talk proposals. FOSDEM '23 will be held in Brussels, Belgium on 4 & 5 February. FOSDEM is a huge free conference about all things open source and an opportunity for anyone to present QEMU or KVM topics. Both in-person and pre-recorded t

Re: [PATCH] hw/arm/boot: set initrd parameters to 64bit in fdt

2022-11-08 Thread Schspa Shi
Peter Maydell writes: > On Tue, 8 Nov 2022 at 13:54, Peter Maydell wrote: >> >> On Tue, 8 Nov 2022 at 12:52, Schspa Shi wrote: >> > Alex Bennée writes: >> > > There is a whole comment in boot.c talking about keeping initrd within >> > > lowmem: >> > > >> > > /* >> > > * We want to p

Re: [PATCH v2 1/9] block: call bdrv_co_drain_begin in a coroutine

2022-11-08 Thread Vladimir Sementsov-Ogievskiy
On 11/8/22 18:13, Emanuele Giuseppe Esposito wrote: Am 08/11/2022 um 15:33 schrieb Vladimir Sementsov-Ogievskiy: On 11/4/22 12:56, Emanuele Giuseppe Esposito wrote: It seems that bdrv_open_driver() forgot to create a coroutine where to call bs->drv->bdrv_co_drain_begin(), a callback marked as

Re: [PATCH V2] hw/riscv: virt: Remove size restriction for pflash

2022-11-08 Thread Markus Armbruster
Peter Maydell writes: > On Mon, 7 Nov 2022 at 14:08, Sunil V L wrote: >> >> On Mon, Nov 07, 2022 at 01:06:38PM +, Peter Maydell wrote: >> > On Mon, 7 Nov 2022 at 13:03, Sunil V L wrote: >> > > >> > > The pflash implementation currently assumes fixed size of the >> > > backend storage. Due t

QOM: should you be able to cast from an interface class to the concrete class?

2022-11-08 Thread Peter Maydell
Hi; in the QOM model, are you supposed to be able to cast from an interface class to the concrete class that is implementing it? To give a specific example, if I have a ResettableClass *rc should I be able to do DeviceClass *dc = DEVICE_CLASS(rc); (assuming that the rc I have is actually from a De

Re: [PATCH v2 1/9] block: call bdrv_co_drain_begin in a coroutine

2022-11-08 Thread Emanuele Giuseppe Esposito
Am 08/11/2022 um 16:52 schrieb Vladimir Sementsov-Ogievskiy: > On 11/8/22 18:13, Emanuele Giuseppe Esposito wrote: >> >> >> Am 08/11/2022 um 15:33 schrieb Vladimir Sementsov-Ogievskiy: >>> On 11/4/22 12:56, Emanuele Giuseppe Esposito wrote: It seems that bdrv_open_driver() forgot to create

Re: GTK clipboard implementation causing regression, falling through the cracks?

2022-11-08 Thread Claudio Fontana
On 11/8/22 12:42, Gerd Hoffmann wrote: > On Mon, Oct 24, 2022 at 12:49:19PM +0200, Claudio Fontana wrote: >> Hi all, >> >> the GTK clipboard implementation seems to be causing some stability issues >> (guest CPUs stuck), >> >> Gerd can you take a look? > > Sorry, no. Just back online from sick l

Re: [PATCH v2 2/9] block-copy: add missing coroutine_fn annotations

2022-11-08 Thread Vladimir Sementsov-Ogievskiy
[add Stefan] On 11/8/22 18:09, Emanuele Giuseppe Esposito wrote: Am 08/11/2022 um 15:48 schrieb Vladimir Sementsov-Ogievskiy: On 11/4/22 12:56, Emanuele Giuseppe Esposito wrote: These functions end up calling bdrv_common_block_status_above(), a generated_co_wrapper function. generated_co_

[PATCH] gtk: disable GTK Clipboard with a new option 'gtk_clipboard'

2022-11-08 Thread Claudio Fontana
The GTK Clipboard implementation may cause guest hangs. Therefore implement a new configure switch --enable-gtk-clipboard, disabled by default, as a meson option. Regenerate the meson build options to include it. The initialization of the clipboard is gtk.c, as well as the compilation of gtk-cli

Re: [RFC PATCH 3/3] kvm: Atomic memslot updates

2022-11-08 Thread Paolo Bonzini
On 11/4/22 16:14, Emanuele Giuseppe Esposito wrote: +g_assert(qemu_mutex_iothread_locked()); Please add a comment here: /* Block further invocations of the ioctls outside the BQL. */ +CPU_FOREACH(cpu) { +qemu_lockcnt_lock(&cpu->in_ioctl_lock); +} +qemu_lockcnt_lo

[PATCH v5 03/11] Hexagon (target/hexagon) Add overrides for S2_asr_r_r_sat/S2_asl_r_r_sat

2022-11-08 Thread Taylor Simpson
These instructions will not be generated by idef-parser, so we override them manually. Test cases added to tests/tcg/hexagon/usr.c Co-authored-by: Matheus Tavares Bernardino Signed-off-by: Matheus Tavares Bernardino Signed-off-by: Taylor Simpson --- target/hexagon/gen_tcg.h | 10 +++- target

[PATCH v5 02/11] Hexagon (target/hexagon) Fix predicated assignment to .tmp and .cur

2022-11-08 Thread Taylor Simpson
Here are example instructions with a predicated .tmp/.cur assignment if (p1) v12.tmp = vmem(r7 + #0) if (p0) v12.cur = vmem(r9 + #0) The .tmp/.cur indicates that references to v12 in the same packet take the result of the load. However, when the predicate is false, the value at the start o

[PATCH v5 10/11] Hexagon (target/hexagon) Use direct block chaining for direct jump/branch

2022-11-08 Thread Taylor Simpson
Direct block chaining is documented here https://qemu.readthedocs.io/en/latest/devel/tcg.html#direct-block-chaining Recall that Hexagon allows packets with multiple jumps where only the first one with a true predicate will actually jump. We can use tcg_gen_goto_tb/tcg_gen_exit_tb when the packet

[PATCH v5 09/11] Hexagon (target/hexagon) Add overrides for various forms of jump

2022-11-08 Thread Taylor Simpson
Reviewed-by: Richard Henderson Signed-off-by: Taylor Simpson --- target/hexagon/gen_tcg.h | 203 +++ target/hexagon/genptr.c | 43 + 2 files changed, 246 insertions(+) diff --git a/target/hexagon/gen_tcg.h b/target/hexagon/gen_tcg.h index 506b454e4e

[PATCH v5 01/11] Hexagon (target/hexagon) Add pkt and insn to DisasContext

2022-11-08 Thread Taylor Simpson
This enables us to reduce the number of parameters to many functions In particular, the generated functions previously took all 3 as arguments Not only does this simplify the code, it improves the translation time Reviewed-by: Richard Henderson Signed-off-by: Taylor Simpson --- target/hexagon/

[PATCH v5 05/11] Hexagon (target/hexagon) Remove PC from the runtime state

2022-11-08 Thread Taylor Simpson
Add pc field to Packet structure For helpers that need PC, pass an extra argument Remove slot arg from conditional jump helpers On a trap0, copy pkt->pc into hex_gpr[HEX_REG_PC] Reviewed-by: Richard Henderson Signed-off-by: Taylor Simpson --- target/hexagon/gen_tcg.h| 7 +++ tar

[PATCH v5 11/11] Hexagon (target/hexagon) Use direct block chaining for tight loops

2022-11-08 Thread Taylor Simpson
Direct block chaining is documented here https://qemu.readthedocs.io/en/latest/devel/tcg.html#direct-block-chaining Hexagon inner loops end with the endloop0 instruction To go back to the beginning of the loop, this instructions writes to PC from register SA0 (start address 0). To use direct bloc

[PATCH v5 07/11] Hexagon (target/hexagon) Add overrides for direct call instructions

2022-11-08 Thread Taylor Simpson
Add overrides for J2_call J2_callt J2_callf Reviewed-by: Richard Henderson Signed-off-by: Taylor Simpson --- target/hexagon/gen_tcg.h | 8 ++ target/hexagon/genptr.c | 55 2 files changed, 63 insertions(+) diff --git a/target/hexagon/g

[PATCH v5 06/11] Hexagon (target/hexagon) Remove next_PC from runtime state

2022-11-08 Thread Taylor Simpson
The imported files don't properly mark all CONDEXEC instructions, so we add some logic to hex_common.py to add the attribute. Acked-by: Richard Henderson Signed-off-by: Taylor Simpson --- target/hexagon/cpu.h| 1 - target/hexagon/gen_tcg.h| 6 ++ target/hexagon

Re: [PULL 0/2] Net patches

2022-11-08 Thread Stefan Hajnoczi
On Mon, 7 Nov 2022 at 23:20, Jason Wang wrote: > > The following changes since commit 524fc737431d240f9d9f10aaf381003092868bac: > > util/log: Ignore per-thread flag if global file already there (2022-11-07 > 16:00:02 -0500) > > are available in the git repository at: > > https://github.com/ja

[PATCH v5 00/11] Hexagon (target/hexagon) performance and bug fixes

2022-11-08 Thread Taylor Simpson
1) Performance improvement Add pkt and insn to DisasContext Many functions need information from all 3 structures, so merge them together. 2) Bug fix Fix predicated assignment to .tmp and .cur 3) Performance improvement Add overrides for S2_asr_r_r_sat/S2_asl_r_r_sat These functions will not be

[PATCH v5 04/11] Hexagon (target/hexagon) Only use branch_taken when packet has multi cof

2022-11-08 Thread Taylor Simpson
When a packet has more than one change-of-flow instruction, only the first one to branch is considered. We use the branch_taken variable to keep track of this. However, when there is a single cof instruction, we don't need the same amount of bookkeeping. We add the pkt_has_multi_cof member to th

Re: [PATCH v2 2/9] block-copy: add missing coroutine_fn annotations

2022-11-08 Thread Vladimir Sementsov-Ogievskiy
On 11/8/22 19:19, Vladimir Sementsov-Ogievskiy wrote: This is a lot better than our "coroutine_fn" sign, which actually do no check (and can't do). Don't you plan to swap a "coroutine_fn" noop marker with more meaningful IN_COROUTINE(); (or something like this, which just do assert(qemu_in_coro

[PATCH v5 08/11] Hexagon (target/hexagon) Add overrides for compound compare and jump

2022-11-08 Thread Taylor Simpson
Acked-by: Richard Henderson Signed-off-by: Taylor Simpson --- target/hexagon/gen_tcg.h | 177 +++ target/hexagon/genptr.c | 90 2 files changed, 267 insertions(+) diff --git a/target/hexagon/gen_tcg.h b/target/hexagon/gen_tcg.h index 1b

[RFC PATCH] tests/plugins: add a new vcpu state tracking plugin

2022-11-08 Thread Alex Bennée
Although we call qemu_plugin_register_vcpu_idle_cb() in the bb test we don't really exercise the rest of the state change callbacks. Add a new test that tests the whole API. [AJB: I wrote this in an attempt to flush out a reproducer for #1195 although so far now joy.] Signed-off-by: Alex Bennée

Re: [PATCH v1 5/9] hw/virtio: introduce virtio_device_should_start

2022-11-08 Thread Alex Bennée
"Michael S. Tsirkin" writes: > On Tue, Nov 08, 2022 at 11:21:26AM +, Alex Bennée wrote: >> >> "Michael S. Tsirkin" writes: >> >> > On Tue, Nov 08, 2022 at 10:23:15AM +, Alex Bennée wrote: >> >> >> >> "Michael S. Tsirkin" writes: >> >> >> >> > On Tue, Nov 08, 2022 at 09:23:04AM +00

[PATCH v6 02/10] vhost: set SVQ device call handler at SVQ start

2022-11-08 Thread Eugenio Pérez
By the end of this series CVQ is shadowed as long as the features support it. Since we don't know at the beginning of qemu running if this is supported, move the event notifier handler setting to the start of the SVQ, instead of the start of qemu run. Signed-off-by: Eugenio Pérez --- hw/virtio/

[PATCH v6 06/10] vdpa: Allocate SVQ unconditionally

2022-11-08 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 SVQ array unconditionally at startup, since its hard to move this allocation elsewhere. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-vdpa.c | 4

[PATCH v6 05/10] vdpa: move SVQ vring features check to net/

2022-11-08 Thread Eugenio Pérez
The next patches will start control SVQ if possible. However, we don't know if that will be possible at qemu boot anymore. Since the moved checks will be already evaluated at net/ to know if it is ok to shadow CVQ, move them. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-vdpa.c | 33 ++--

[PATCH v6 01/10] vdpa: Use v->shadow_vqs_enabled in vhost_vdpa_svqs_start & stop

2022-11-08 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 file

[PATCH v6 07/10] vdpa: Add asid parameter to vhost_vdpa_dma_map/unmap

2022-11-08 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. Signed-

[PATCH v6 09/10] vdpa: Add listener_shadow_vq to vhost_vdpa

2022-11-08 Thread Eugenio Pérez
The memory listener that thells the device how to convert GPA to qemu's va is registered against CVQ vhost_vdpa. This series try to map the memory listener translations to ASID 0, while it maps the CVQ ones to ASID 1. Let's tell the listener if it needs to register them on iova tree or not. Signe

[PATCH v6 10/10] vdpa: Always start CVQ in SVQ mode

2022-11-08 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 --- v6: * Disable control SVQ if the device does not support it because of features. v5: * Fixing the not adding cvq buffers

[PATCH v6 08/10] vdpa: Store x-svq parameter in VhostVDPAState

2022-11-08 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 dif

[PATCH v6 04/10] vdpa: add vhost_vdpa_net_valid_svq_features

2022-11-08 Thread Eugenio Pérez
It will be reused at vdpa device start so let's extract in its own function Signed-off-by: Eugenio Pérez --- net/vhost-vdpa.c | 26 +- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index e370ecb8eb..d3b1de481b 100644 --

[PATCH v6 00/10] ASID support in vhost-vdpa net

2022-11-08 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 NetdevVhostVDPAOpt

[PATCH v6 03/10] vhost: Allocate SVQ device file descriptors at device start

2022-11-08 Thread Eugenio Pérez
The next patches will start control SVQ if possible. However, we don't know if that will be possible at qemu boot anymore. Delay device file descriptors until we know it at device start. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-shadow-virtqueue.c | 31 ++ hw/virt

[PATCH] block: m25p80: fix dummy byte count read from spansion cfg register

2022-11-08 Thread Ramon Aerne
Spansion nor-flash stores the dummy read count in bits in a config register. This is currently read and used as the byte count which is wrong. This patch fixes this bit to byte conversion without warning about unsupported configurations (such as bits % 8 != 0) Signed-off-by: Ramon Aerne --- hw/

[PATCH] Revert "hw/block/pflash_cfi0{1, 2}: Error out if device length isn't a power of two"

2022-11-08 Thread Daniel Henrique Barboza
This commit caused a regression [1] that prevents machines that uses Open Virtual Machine Firmware (OVMF) to boot. This is a long standing behavior with how pflash handles images. More information about why this happens can be found in [2] and commit 06f1521795 ("pflash: Require backend size to ma

Re: [PATCH-for-7.2 1/2] hw/sd/sdhci: Do not set Buf Wr Ena before writing block (CVE-2022-3872)

2022-11-08 Thread Alexander Bulekov
On 221107 2312, Philippe Mathieu-Daudé wrote: > When sdhci_write_block_to_card() is called to transfer data from > the FIFO to the SD bus, the data is already present in the buffer > and we have to consume it directly. > > See the description of the 'Buffer Write Enable' bit from the > 'Present St

Re: [PULL 59/62] hw/block/pflash_cfi0{1, 2}: Error out if device length isn't a power of two

2022-11-08 Thread Daniel Henrique Barboza
Phil, On 11/1/22 19:49, Philippe Mathieu-Daudé wrote: On 1/11/22 23:23, Stefan Hajnoczi wrote: There is a report that this commit breaks an existing OVMF setup: https://gitlab.com/qemu-project/qemu/-/issues/1290#note_1156507334 I'm not familiar with pflash. Please find a way to avoid a regress

Re: [PATCH v3 4/4] scripts: add script to compare compatible properties

2022-11-08 Thread Maksim Davydov
On 11/8/22 18:37, Vladimir Sementsov-Ogievskiy wrote: On 11/3/22 13:27, Maksim Davydov wrote: This script run QEMU to obtain compat_props of machines and default values of different types and produce appropriate table. This table can be used to compare machine types to choose the most suitable

Re: QOM: should you be able to cast from an interface class to the concrete class?

2022-11-08 Thread Daniel P . Berrangé
On Tue, Nov 08, 2022 at 04:01:56PM +, Peter Maydell wrote: > Hi; in the QOM model, are you supposed to be able to cast from > an interface class to the concrete class that is implementing it? > > To give a specific example, if I have a ResettableClass *rc > should I be able to do DeviceClass *

Re: [PATCH v3 01/17] migration: Remove res_compatible parameter

2022-11-08 Thread Vladimir Sementsov-Ogievskiy
On 11/3/22 19:16, Avihai Horon wrote: From: Juan Quintela It was only used for RAM, and in that case, it means that this amount of data was sent for memory. Not clear for me, what means "this amount of data was sent for memory"... That amount of data was not yet sent, actually. Just delet

Re: [PULL 00/55] MIPS patches for 2022-10-30

2022-11-08 Thread Konstantin Kostiuk
On Tue, Nov 8, 2022 at 5:23 PM Philippe Mathieu-Daudé wrote: > On 8/11/22 16:09, Thomas Huth wrote: > > On 08/11/2022 15.23, Philippe Mathieu-Daudé wrote: > >> On 8/11/22 14:59, Peter Maydell wrote: > > >>> Was this the last use of C++ in the tree, or am I forgetting > >>> some other part that st

[PATCH-for-7.2] Revert "hw/block/pflash_cfi: Error out if dev length isn't power of 2"

2022-11-08 Thread Philippe Mathieu-Daudé
Commit 334c388f25 ("pflash_cfi: Error out if device length isn't a power of two") aimed to finish the effort started by commit 06f1521795 ("pflash: Require backend size to match device, improve errors"), but unfortunately we are not quite there since various machines are still ready to accept incom

Re: [PATCH v3 02/17] migration: No save_live_pending() method uses the QEMUFile parameter

2022-11-08 Thread Vladimir Sementsov-Ogievskiy
On 11/3/22 19:16, Avihai Horon wrote: From: Juan Quintela So remove it everywhere. Signed-off-by: Juan Quintela Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [PATCH] Revert "hw/block/pflash_cfi0{1, 2}: Error out if device length isn't a power of two"

2022-11-08 Thread Philippe Mathieu-Daudé
On 8/11/22 18:26, Daniel Henrique Barboza wrote: This commit caused a regression [1] that prevents machines that uses Open Virtual Machine Firmware (OVMF) to boot. This is a long standing behavior with how pflash handles images. More information about why this happens can be found in [2] and com

Re: [PATCH] Revert "hw/block/pflash_cfi0{1, 2}: Error out if device length isn't a power of two"

2022-11-08 Thread Stefan Hajnoczi
On Tue, 8 Nov 2022 at 13:10, Philippe Mathieu-Daudé wrote: > > On 8/11/22 18:26, Daniel Henrique Barboza wrote: > > This commit caused a regression [1] that prevents machines that uses > > Open Virtual Machine Firmware (OVMF) to boot. > > > > This is a long standing behavior with how pflash handle

Re: [PATCH-for-7.2] Revert "hw/block/pflash_cfi: Error out if dev length isn't power of 2"

2022-11-08 Thread Stefan Hajnoczi
Applied to staging. Thanks! Stefan

Re: [PATCH-for-7.2 0/2] hw/sd/sdhci: Do not set Buf Wr Ena before writing block (CVE-2022-3872)

2022-11-08 Thread Stefan Hajnoczi
Applied to the staging tree. Thanks! Stefan

Re: [PULL 0/2] Net patches

2022-11-08 Thread Stefan Hajnoczi
On Mon, 7 Nov 2022 at 23:20, Jason Wang wrote: > Si-Wei Liu (1): > vhost-vdpa: fix assert !virtio_net_get_subqueue(nc)->async_tx.elem in > virtio_net_reset I have applied just this patch to the staging tree. Thanks, Stefan

[PULL 1/3] memory: Fix wrong end address dump

2022-11-08 Thread Philippe Mathieu-Daudé
From: Zhenzhong Duan The end address of memory region section isn't correctly calculated which leads to overflowed mtree dump: Dispatch Physical sections .. #70 @2000..00011fff io [ROOT] #71 @5000..5fff (noname) #72 @0

[PULL 2/3] hw/sd/sdhci: Do not set Buf Wr Ena before writing block (CVE-2022-3872)

2022-11-08 Thread Philippe Mathieu-Daudé
When sdhci_write_block_to_card() is called to transfer data from the FIFO to the SD bus, the data is already present in the buffer and we have to consume it directly. See the description of the 'Buffer Write Enable' bit from the 'Present State' register (prnsts::SDHC_SPACE_AVAILABLE) in Table 2.14

[PULL 0/3] Memory/SDHCI/ParallelFlash patches for v7.2.0-rc0

2022-11-08 Thread Philippe Mathieu-Daudé
The following changes since commit ade760a2f63804b7ab1839fbc3e5ddbf30538718: Merge tag 'pull-request-2022-11-08' of https://gitlab.com/thuth/qemu into staging (2022-11-08 11:34:06 -0500) are available in the Git repository at: https://github.com/philmd/qemu.git tags/memflash-202

[PULL 3/3] Revert "hw/block/pflash_cfi: Error out if dev length isn't power of 2"

2022-11-08 Thread Philippe Mathieu-Daudé
From: Daniel Henrique Barboza Commit 334c388f25 ("pflash_cfi: Error out if device length isn't a power of two") aimed to finish the effort started by commit 06f1521795 ("pflash: Require backend size to match device, improve errors"), but unfortunately we are not quite there since various machines

Re: [PATCH v3 03/17] migration: Block migration comment or code is wrong

2022-11-08 Thread Vladimir Sementsov-Ogievskiy
On 11/3/22 19:16, Avihai Horon wrote: From: Juan Quintela And it appears that what is wrong is the code. During bulk stage we need to make sure that some block is dirty, but no games with max_size at all. :) That made me interested in, why we need this one block, so I decided to search throu

Re: [PATCH v3 03/17] migration: Block migration comment or code is wrong

2022-11-08 Thread Vladimir Sementsov-Ogievskiy
On 11/8/22 21:36, Vladimir Sementsov-Ogievskiy wrote: On 11/3/22 19:16, Avihai Horon wrote: From: Juan Quintela And it appears that what is wrong is the code. During bulk stage we need to make sure that some block is dirty, but no games with max_size at all. :) That made me interested in, wh

Re: [PULL 00/55] MIPS patches for 2022-10-30

2022-11-08 Thread Paolo Bonzini
Il mar 8 nov 2022, 16:09 Thomas Huth ha scritto: > >> If it is the last thing, we should put in the "Build Dependencies" > >> part of the release notes that a C++ compiler is no longer required > >> and mention that the configure options to specify it will go away in > >> a future release. > > >

Re: [PATCH v3 04/17] migration: Simplify migration_iteration_run()

2022-11-08 Thread Vladimir Sementsov-Ogievskiy
On 11/3/22 19:16, Avihai Horon wrote: From: Juan Quintela Signed-off-by: Juan Quintela Signed-off-by: Avihai Horon --- migration/migration.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index f

Re: [PULL 00/14] MIPS patches for 2022-11-08

2022-11-08 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/7.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL 0/5] s390x fix and white space cleanup

2022-11-08 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/7.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PATCH v3 05/17] vfio/migration: Fix wrong enum usage

2022-11-08 Thread Vladimir Sementsov-Ogievskiy
On 11/3/22 19:16, Avihai Horon wrote: vfio_migration_init() initializes VFIOMigration->device_state using enum of VFIO migration protocol v2. Current implemented protocol is v1 so v1 enum should be used. Fix it. Fixes: 429c72800654 ("vfio/migration: Fix incorrect initialization value for parame

Re: [PATCH v3 06/17] vfio/migration: Fix NULL pointer dereference bug

2022-11-08 Thread Vladimir Sementsov-Ogievskiy
On 11/3/22 19:16, Avihai Horon wrote: As part of its error flow, vfio_vmstate_change() accesses MigrationState->to_dst_file without any checks. This can cause a NULL pointer dereference if the error flow is taken and MigrationState->to_dst_file is not set. For example, this can happen if VM is s

Re: [PATCH-for-7.2 1/2] hw/sd/sdhci: Do not set Buf Wr Ena before writing block (CVE-2022-3872)

2022-11-08 Thread Alexander Bulekov
On 221108 1225, Alexander Bulekov wrote: > On 221107 2312, Philippe Mathieu-Daudé wrote: > > When sdhci_write_block_to_card() is called to transfer data from > > the FIFO to the SD bus, the data is already present in the buffer > > and we have to consume it directly. > > > > See the description of

Re: [PULL v4 29/83] virtio: introduce virtio_queue_enable()

2022-11-08 Thread Stefan Hajnoczi
On Mon, 7 Nov 2022 at 18:10, Michael S. Tsirkin wrote: > > From: Kangjie Xu > > Introduce the interface queue_enable() in VirtioDeviceClass and the > fucntion virtio_queue_enable() in virtio, it can be called when > VIRTIO_PCI_COMMON_Q_ENABLE is written and related virtqueue can be > started. It

Re: [PATCH v3 08/17] migration/qemu-file: Add qemu_file_get_to_fd()

2022-11-08 Thread Vladimir Sementsov-Ogievskiy
On 11/3/22 19:16, Avihai Horon wrote: Add new function qemu_file_get_to_fd() that allows reading data from QEMUFile and writing it straight into a given fd. This will be used later in VFIO migration code. Signed-off-by: Avihai Horon Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards,

Re: [PATCH v3 2/4] python/qmp: increase read buffer size

2022-11-08 Thread John Snow
On Thu, Nov 3, 2022 at 6:29 AM Maksim Davydov wrote: > > After modification of "query-machines" command the buffer size should be > more than 452kB to contain output with compat-props. > > Signed-off-by: Maksim Davydov > Reviewed-by: Vladimir Sementsov-Ogievskiy > --- > python/qemu/qmp/qmp_clie

Re: [PULL 0/3] Memory/SDHCI/ParallelFlash patches for v7.2.0-rc0

2022-11-08 Thread Stefan Hajnoczi
; > are available in the Git repository at: > > https://github.com/philmd/qemu.git tags/memflash-20221108 > > for you to fetch changes up to cf9b3efd816518f9f210f50a0fa3e46a00b33c27: > > Revert "hw/block/pflash_cfi: Error out if dev

Re: [PULL 0/3] Memory/SDHCI/ParallelFlash patches for v7.2.0-rc0

2022-11-08 Thread Stefan Hajnoczi
I've dropped the SDHCI CVE fix due to the CI failure. The rest of the commits are still in the staging tree and I plan to include them in v7.2.0-rc0. Stefan

Re: [PATCH v3 4/4] scripts: add script to compare compatible properties

2022-11-08 Thread John Snow
On Thu, Nov 3, 2022 at 6:29 AM Maksim Davydov wrote: > > This script run QEMU to obtain compat_props of machines and default > values of different types and produce appropriate table. This table > can be used to compare machine types to choose the most suitable > machine. Also this table in json o

[PATCH 1/8] virtio_queue_aio_attach_host_notifier: remove AioContext lock

2022-11-08 Thread Stefan Hajnoczi
From: Emanuele Giuseppe Esposito virtio_queue_aio_attach_host_notifier() and virtio_queue_aio_attach_host_notifier_nopoll() run always in the main loop, so there is no need to protect them with AioContext lock. On the other side, virtio_queue_aio_detach_host_notifier() runs in a bh in the iothre

[PATCH 0/8] virtio-blk: remove AioContext lock

2022-11-08 Thread Stefan Hajnoczi
This is a continuation of Emanuele Esposito's work to remove the AioContext lock in virtio-blk. In the past it was necessary to acquire the AioContext lock in order to do I/O. Paolo Bonzini and Emanuele have removed the need for the AioContext in the core block layer code, with a few exceptions lik

Re: [PATCH v1 2/9] tests/avocado: improve behaviour waiting for login prompts

2022-11-08 Thread John Snow
On Tue, Nov 8, 2022 at 4:26 AM Alex Bennée wrote: > > This attempts to deal with the problem of login prompts not being > guaranteed to be terminated with a newline. The solution to this is to > peek at the incoming data looking to see if we see an up-coming match > before we fall back to the old

[PATCH 7/8] virtio-blk: don't acquire AioContext in virtio_blk_handle_vq()

2022-11-08 Thread Stefan Hajnoczi
There is no need to acquire AioContext in virtio_blk_handle_vq() because no APIs used in the function require it and nothing else in the virtio-blk code requires mutual exclusion anymore. Signed-off-by: Stefan Hajnoczi --- hw/block/virtio-blk.c | 2 -- 1 file changed, 2 deletions(-) diff --git

[PATCH 5/8] virtio-blk: mark IO_CODE functions

2022-11-08 Thread Stefan Hajnoczi
From: Emanuele Giuseppe Esposito Just as done in the block API, mark functions in virtio-blk that are called also from iothread(s). We know such functions are IO because many are blk_* callbacks, running always in the device iothread, and remaining are propagated from the leaf IO functions (if a

[PATCH 2/8] block-backend: enable_write_cache should be atomic

2022-11-08 Thread Stefan Hajnoczi
From: Emanuele Giuseppe Esposito It is read from IO_CODE and written with BQL held, so setting it as atomic should be enough. Also remove the aiocontext lock that was sporadically taken around the set. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi Signed-off-by: Stefa

[PATCH 8/8] virtio-blk: minimize virtio_blk_reset() AioContext lock region

2022-11-08 Thread Stefan Hajnoczi
blk_drain() needs the lock because it calls AIO_WAIT_WHILE(). The s->rq loop doesn't need the lock because dataplane has been stopped when virtio_blk_reset() is called. Signed-off-by: Stefan Hajnoczi --- hw/block/virtio-blk.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a

[PATCH 3/8] virtio: categorize callbacks in GS

2022-11-08 Thread Stefan Hajnoczi
From: Emanuele Giuseppe Esposito All the callbacks below are always running in the main loop. The callbacks are the following: - start/stop_ioeventfd: these are the callbacks where blk_set_aio_context(iothread) is done, so they are called in the main loop. - save and load: called during mig

[PATCH 4/8] virtio-blk: mark GLOBAL_STATE_CODE functions

2022-11-08 Thread Stefan Hajnoczi
From: Emanuele Giuseppe Esposito Just as done in the block API, mark functions in virtio-blk that are always called in the main loop with BQL held. We know such functions are GS because they all are callbacks from virtio.c API that has already classified them as GS. Signed-off-by: Emanuele Gius

[PATCH 6/8] virtio-blk: remove unnecessary AioContext lock from function already safe

2022-11-08 Thread Stefan Hajnoczi
From: Emanuele Giuseppe Esposito AioContext lock was introduced in b9e413dd375 and in this instance it is used to protect these 3 functions: - virtio_blk_handle_rw_error - virtio_blk_req_complete - block_acct_done Now that all three of the above functions are protected with their own locks, we c

Re: [PULL v3 49/81] acpi: pc: vga: use AcpiDevAmlIf interface to build VGA device descriptors

2022-11-08 Thread B
Am 7. November 2022 22:28:31 UTC schrieb "Michael S. Tsirkin" : >On Mon, Nov 07, 2022 at 10:07:52PM +, Bernhard Beschow wrote: >> Am 7. November 2022 13:00:36 UTC schrieb "Michael S. Tsirkin" >> : >> >On Mon, Nov 07, 2022 at 06:16:25PM +0530, Ani Sinha wrote: >> >> On Mon, Nov 7, 2022 at 6:

Re: [PATCH trivial for 7.2] hw/ssi/sifive_spi.c: spelling: reigster

2022-11-08 Thread Palmer Dabbelt
On Sat, 05 Nov 2022 04:53:29 PDT (-0700), m...@tls.msk.ru wrote: Fixes: 0694dabe9763847f3010b54ab3ec7d367d2f0ff0 Not sure if I missed something in QEMU land, but those are usually listed more like Fixes: 0694dabe97 ("hw/ssi: Add SiFive SPI controller support") Checkpatch isn't failing, thou

[PATCH v1 22/24] vfio-user: add 'x-msg-timeout' option that specifies msg wait times

2022-11-08 Thread John Johnson
Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman --- hw/vfio/pci.c | 4 hw/vfio/pci.h | 1 + hw/vfio/user.c | 7 +-- hw/vfio/user.h | 1 + 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index

[PATCH v1 19/24] vfio-user: secure DMA support

2022-11-08 Thread John Johnson
Secure DMA forces the remote process to use DMA r/w messages instead of directly mapping guest memeory. Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman --- hw/vfio/pci.c | 4 hw/vfio/pci.h | 1 + hw/vfio/user.c | 2 +- hw/vfio/user.h | 1 +

<    1   2   3   >