Re: [PATCH v2 0/3] block: Start/end drain on correct AioContext

2022-11-10 Thread Hanna Reitz
On 10.11.22 15:01, Kevin Wolf wrote: Am 07.11.2022 um 16:13 hat Hanna Reitz geschrieben: Hi, v1 cover letter: https://lists.nongnu.org/archive/html/qemu-block/2022-09/msg00389.html bdrv_replace_child_noperm() drains the child via bdrv_parent_drained_{begin,end}_single(). When it removes a chi

Re: [PATCH 0/4] hw: make TCO watchdog actually work by default for Q35

2022-11-10 Thread Michael S. Tsirkin
On Tue, Nov 01, 2022 at 01:03:17PM +, Daniel P. Berrangé wrote: > On Tue, Nov 01, 2022 at 01:57:24PM +0100, Igor Mammedov wrote: > > On Mon, 31 Oct 2022 11:48:58 -0400 > > "Michael S. Tsirkin" wrote: > > > > > On Mon, Oct 31, 2022 at 01:50:24PM +, Daniel P. Berrangé wrote: > > > > On Mon,

Re: [PATCH 0/4] hw: make TCO watchdog actually work by default for Q35

2022-11-10 Thread Michael S. Tsirkin
On Mon, Oct 31, 2022 at 01:19:30PM +, Daniel P. Berrangé wrote: > The TCO watchdog is unconditionally integrated into the Q35 machine > type by default, but at the same time is unconditionally disabled > from firing by a host config option that overrides guest OS attempts > to enable it. People

[PATCH v2 3/3] kvm: Atomic memslot updates

2022-11-10 Thread Emanuele Giuseppe Esposito
From: David Hildenbrand If we update an existing memslot (e.g., resize, split), we temporarily remove the memslot to re-add it immediately afterwards. These updates are not atomic, especially not for KVM VCPU threads, such that we can get spurious faults. Let's inhibit most KVM ioctls while perf

[PATCH v2 1/3] accel: introduce accelerator blocker API

2022-11-10 Thread Emanuele Giuseppe Esposito
This API allows the accelerators to prevent vcpus from issuing new ioctls while execting a critical section marked with the accel-ioctl_inhibit_begin/end functions. Note that all functions submitting ioctls must mark where the ioctl is being called with accel_{cpu_}set_in_ioctl(). This API requir

[PATCH v2 2/3] KVM: keep track of running ioctls

2022-11-10 Thread Emanuele Giuseppe Esposito
Using the new accel-blocker API, mark where ioctls are being called in KVM. Next, we will implement the critical section that will take care of performing memslots modifications atomically, therefore preventing any new ioctl from running and allowing the running ones to finish. Signed-off-by: Davi

[PATCH v2 0/3] KVM: allow listener to stop all vcpus before

2022-11-10 Thread Emanuele Giuseppe Esposito
QEMU needs to perform memslots operations like merging and splitting, and each operation requires more than a single ioctl. Therefore if a vcpu is concurrently reading the same memslots, it could end up reading something that was temporarly deleted. For example, merging two memslots into one would

Re: [QEMU][PATCH v2 2/5] hw/net/can: Introduce Xilinx Versal CANFD controller

2022-11-10 Thread Peter Maydell
On Sat, 22 Oct 2022 at 06:48, Vikram Garhwal wrote: > > The Xilinx Versal CANFD controller is developed based on SocketCAN, QEMU CAN > bus > implementation. Bus connection and socketCAN connection for each CAN module > can be set through command lines. > > Signed-off-by: Vikram Garhwal > --- >

Re: [QEMU][PATCH v2 4/5] tests/qtest: Introduce tests for Xilinx VERSAL CANFD controller

2022-11-10 Thread Peter Maydell
On Sat, 22 Oct 2022 at 07:20, Vikram Garhwal wrote: > > The QTests perform three tests on the Xilinx VERSAL CANFD controller: > Tests the CANFD controllers in loopback. > Tests the CANFD controllers in normal mode with CAN frame. > Tests the CANFD controllers in normal mode with CANFD

Re: [QEMU][PATCH v2 1/5] MAINTAINERS: Update maintainer's email for Xilinx CAN

2022-11-10 Thread Peter Maydell
On Sat, 22 Oct 2022 at 06:56, Vikram Garhwal wrote: > > Signed-off-by: Vikram Garhwal > Reviewed-by: Francisco Iglesias > --- > MAINTAINERS | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/MAINTAINERS b/MAINTAINERS > index e3d5b7e09c..538af2885c 100644 > --- a/MAINTA

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

2022-11-10 Thread Peter Maydell
On Tue, 8 Nov 2022 at 15:50, Schspa Shi wrote: > > > 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: > >> > I think this lowmem does not mean below 4GB. and it is to make sure > >> > the initrd_start > memblo

should ioapic_service really be modelling cpu writes?

2022-11-10 Thread Alex Bennée
Hi, I've been trying to remove current_cpu hacks from our hw/ emulation and replace them with an explicit cpu_index derived from MemTxAttrs. So far this has been going mostly ok but I've run into problems on x86 due to the way the apic/ioapic are modelled. It comes down to the function ioapic_serv

Re: [PATCH 08/13] stream: Replace subtree drain with a single node drain

2022-11-10 Thread Kevin Wolf
Am 10.11.2022 um 12:25 hat Vladimir Sementsov-Ogievskiy geschrieben: > On 11/10/22 13:16, Kevin Wolf wrote: > > Am 09.11.2022 um 17:52 hat Vladimir Sementsov-Ogievskiy geschrieben: > > > On 11/8/22 15:37, Kevin Wolf wrote: > > > > The subtree drain was introduced in commit b1e1af394d9 as a way to a

Re: [PATCH v2 0/3] block: Start/end drain on correct AioContext

2022-11-10 Thread Kevin Wolf
Am 10.11.2022 um 17:11 hat Hanna Reitz geschrieben: > On 10.11.22 15:01, Kevin Wolf wrote: > > Am 07.11.2022 um 16:13 hat Hanna Reitz geschrieben: > > > Hi, > > > > > > v1 cover letter: > > > https://lists.nongnu.org/archive/html/qemu-block/2022-09/msg00389.html > > > > > > bdrv_replace_child_nop

Re: [PATCH v9 4/8] KVM: Use gfn instead of hva for mmu_notifier_retry

2022-11-10 Thread Sean Christopherson
On Tue, Nov 08, 2022, Chao Peng wrote: > On Fri, Nov 04, 2022 at 10:29:48PM +, Sean Christopherson wrote: > > The APICv case that this was added for could very well be broken because of > > this, and the resulting failures would be an absolute nightmare to debug. > > Given the apicv_inhibit sh

Re: should ioapic_service really be modelling cpu writes?

2022-11-10 Thread Alex Bennée
Alex Bennée writes: > Hi, > > I've been trying to remove current_cpu hacks from our hw/ emulation and > replace them with an explicit cpu_index derived from MemTxAttrs. So far > this has been going mostly ok but I've run into problems on x86 due to > the way the apic/ioapic are modelled. It com

biosbits test failing on origin/master

2022-11-10 Thread John Snow
Hiya, on today's origin/master (2ccad61746ca7de5dd3e25146062264387e43bd4) I'm finding that "make check-avocado" is failing on the new biosbits test on my local development machine: (001/193) tests/avocado/acpi-bits.py:AcpiBitsTest.test_acpi_smbios_bits: FAIL: True is not false : The VM seems to h

Re: [PATCH 0/4] hw: make TCO watchdog actually work by default for Q35

2022-11-10 Thread Daniel P . Berrangé
On Thu, Nov 10, 2022 at 11:29:21AM -0500, Michael S. Tsirkin wrote: > On Tue, Nov 01, 2022 at 01:03:17PM +, Daniel P. Berrangé wrote: > > On Tue, Nov 01, 2022 at 01:57:24PM +0100, Igor Mammedov wrote: > > > On Mon, 31 Oct 2022 11:48:58 -0400 > > > "Michael S. Tsirkin" wrote: > > > > > > > On

Re: [PATCH] hw/sd/sdhci: reset data count in sdhci_buff_access_is_sequential()

2022-11-10 Thread Mauro Matteo Cascella
On Wed, Nov 9, 2022 at 5:19 PM Bin Meng wrote: > > On Wed, Nov 9, 2022 at 6:10 PM Mauro Matteo Cascella > wrote: > > > > On Wed, Nov 9, 2022 at 10:45 AM Siqi Chen wrote: > > > > > > Hi, > > > > > > >This reproducer does not crash my QEMU. Am I missing anything? > > > I submitted the reproducer.

Re: [PATCH v3 0/2] Fix the virtio features negotiation flaw

2022-11-10 Thread Michael S. Tsirkin
On Sun, Oct 30, 2022 at 09:52:37PM +0800, huang...@chinatelecom.cn wrote: > From: Hyman Huang(黄勇) > > v3: > -rebase on master > -code clean on [PATCH v2 1/2]: keep the commit self-consistent and > do not modify the logic of saving acked_features. Just abstract the > util function. > -modify the

Re: [PATCH v3 1/2] vhost-user: Refactor vhost acked features saving

2022-11-10 Thread Michael S. Tsirkin
On Sun, Oct 30, 2022 at 09:52:38PM +0800, huang...@chinatelecom.cn wrote: > From: Hyman Huang(黄勇) > > Abstract vhost acked features saving into > vhost_user_save_acked_features, export it as util function. > > Signed-off-by: Hyman Huang(黄勇) > Signed-off-by: Guoyi Tu > --- > include/net/vhost-

Re: [PATCH v3 2/2] vhost-net: Fix the virtio features negotiation flaw

2022-11-10 Thread Michael S. Tsirkin
On Sun, Oct 30, 2022 at 09:52:39PM +0800, huang...@chinatelecom.cn wrote: > From: Hyman Huang(黄勇) > > Save the acked_features once it be configured by guest > virtio driver so it can't miss any features. > > Note that this patch also change the features saving logic > in chr_closed_bh, which ori

[PATCH for-7.2] Fix several typos in documentation (found by codespell)

2022-11-10 Thread Stefan Weil via
Those typos are in files which are used to generate the QEMU manual. Signed-off-by: Stefan Weil --- I did not fix memory_region_init_resizeable_ram. That might be done after 7.2. Stefan docs/devel/acpi-bits.rst | 2 +- docs/system/devices/can.rst| 2 +- hw/scsi/esp.c

Re: [PATCH v3 2/2] vhost-net: Fix the virtio features negotiation flaw

2022-11-10 Thread Michael S. Tsirkin
On Sun, Oct 30, 2022 at 09:52:39PM +0800, huang...@chinatelecom.cn wrote: > From: Hyman Huang(黄勇) > > Save the acked_features once it be configured by guest > virtio driver so it can't miss any features. > > Note that this patch also change the features saving logic > in chr_closed_bh, which ori

Re: [PATCH for-7.2] Fix several typos in documentation (found by codespell)

2022-11-10 Thread Michael S. Tsirkin
On Thu, Nov 10, 2022 at 08:08:25PM +0100, Stefan Weil wrote: > Those typos are in files which are used to generate the QEMU manual. > > Signed-off-by: Stefan Weil Acked-by: Michael S. Tsirkin > --- > > I did not fix memory_region_init_resizeable_ram. That might be done after 7.2. > > Stefan

[RFC: PATCH v2] Add new build targets 'check-spelling' and 'check-spelling-docs'

2022-11-10 Thread Stefan Weil via
`make check-spelling` can now be used to get a list of spelling errors. It uses the latest version of codespell, a spell checker implemented in Python. 'make check-spelling-docs' checks the generated documentation. Signed-off-by: Stefan Weil --- v2: Additional target check-spelling-docs, update

Re: [PATCH] avocado: use sha1 for fc31 imgs to avoid first time re-download

2022-11-10 Thread Daniel Henrique Barboza
On 11/10/22 11:57, Jan Richter wrote: On 11/10/22 00:26, Philippe Mathieu-Daudé wrote: On 9/11/22 16:39, Daniel Henrique Barboza wrote: On 10/27/22 06:01, Daniel P. Berrangé wrote: On Thu, Oct 27, 2022 at 09:46:29AM +0200, Thomas Huth wrote: On 24/10/2022 11.02, Daniel P. Berrangé wrote:

Re: [PATCH 05/13] block: Inline bdrv_drain_invoke()

2022-11-10 Thread Stefan Hajnoczi
On Tue, Nov 08, 2022 at 01:37:30PM +0100, Kevin Wolf wrote: > bdrv_drain_invoke() has now two entirely separate cases that share no > code any more and are selected depending on a bool parameter. Each case > has only one caller. Just inline the function. > > Signed-off-by: Kevin Wolf > --- > blo

Re: [PATCH for-8.0 1/2] hw/misc/mos6522: Convert TYPE_MOS6522 to 3-phase reset

2022-11-10 Thread Philippe Mathieu-Daudé
On 10/11/22 15:34, Peter Maydell wrote: Convert the TYPE_MOS6522 parent class to use 3-phase reset. This is a prerequisite for converting its subclasses. Signed-off-by: Peter Maydell --- hw/misc/mos6522.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) Reviewed-by: Philippe M

Re: [PATCH for-7.2] Fix several typos in documentation (found by codespell)

2022-11-10 Thread Philippe Mathieu-Daudé
On 10/11/22 20:08, Stefan Weil wrote: Those typos are in files which are used to generate the QEMU manual. Signed-off-by: Stefan Weil --- I did not fix memory_region_init_resizeable_ram. That might be done after 7.2. Stefan docs/devel/acpi-bits.rst | 2 +- docs/system/devices/can.rs

Re: [PATCH] libdecnumber/dpd/decimal64: Fix compiler warning from Clang 15

2022-11-10 Thread Philippe Mathieu-Daudé
On 10/11/22 14:11, Thomas Huth wrote: Clang 15 from Fedora 37 complains: ../libdecnumber/dpd/decimal64.c:620:8: error: variable 'n' set but not used [-Werror,-Wunused-but-set-variable] Int n; /* output bunch counter */ ^ 1 error generated. Remove the unus

[RFC PATCH] gitlab: integrate coverage report

2022-11-10 Thread Alex Bennée
This should hopefully give is nice coverage information about what our tests (or at least the subset we are running) have hit. Ideally we would want a way to trigger coverage on tests likely to be affected by the current commit. Signed-off-by: Alex Bennée --- .gitlab-ci.d/buildtest.yml | 12

Re: [PATCH v9 4/8] KVM: Use gfn instead of hva for mmu_notifier_retry

2022-11-10 Thread Sean Christopherson
On Tue, Oct 25, 2022, Chao Peng wrote: > @@ -715,15 +715,9 @@ static void kvm_mmu_notifier_change_pte(struct > mmu_notifier *mn, > kvm_handle_hva_range(mn, address, address + 1, pte, kvm_set_spte_gfn); > } > > -void kvm_mmu_invalidate_begin(struct kvm *kvm, unsigned long start, > -

Re: [PATCH for-7.2] Fix several typos in documentation (found by codespell)

2022-11-10 Thread Peter Maydell
On Thu, 10 Nov 2022 at 19:09, Stefan Weil via wrote: > > Those typos are in files which are used to generate the QEMU manual. > > Signed-off-by: Stefan Weil > --- > > I did not fix memory_region_init_resizeable_ram. That might be done after 7.2. > > Stefan > > docs/devel/acpi-bits.rst | 2

Re: [PATCH 00/13] block: Simplify drain

2022-11-10 Thread Stefan Hajnoczi
On Tue, Nov 08, 2022 at 01:37:25PM +0100, Kevin Wolf wrote: > I'm aware that exactly nobody has been looking forward to a series with > this title, but it has to be. The way drain works means that we need to > poll in bdrv_replace_child_noperm() and that makes things rather messy > with Emanuele's

Re: [PATCH for-7.2] Fix several typos in documentation (found by codespell)

2022-11-10 Thread Peter Maydell
On Thu, 10 Nov 2022 at 19:09, Stefan Weil via wrote: > > Those typos are in files which are used to generate the QEMU manual. > > Signed-off-by: Stefan Weil > --- > > I did not fix memory_region_init_resizeable_ram. That might be done after 7.2. I think that's a UK vs US spellings one anyway...

Re: [PATCH for-8.0 6/9] hw/hyperv/vmbus: Use device_cold_reset() and bus_cold_reset()

2022-11-10 Thread Maciej S. Szmigiero
On 4.11.2022 17:15, Peter Maydell wrote: In the vmbus code we currently use the legacy functions qdev_reset_all() and qbus_reset_all(). These perform a recursive reset, starting from either a qbus or a qdev. However they do not permit any of the devices in the tree to use three-phase reset, bec

Re: [PATCH v3 0/7] memory: prevent dma-reentracy issues

2022-11-10 Thread Stefan Hajnoczi
Preventing this class of bugs is important but QEMU is currently frozen for the 7.2 release. I'm a little concerned about regressions in a patch series that changes core device emulation code. I'll review the series on Monday and if anyone has strong opinions on whether to merge this into 7.2, ple

Re: [PATCH v3 0/7] memory: prevent dma-reentracy issues

2022-11-10 Thread Michael S. Tsirkin
On Thu, Nov 10, 2022 at 03:50:51PM -0500, Stefan Hajnoczi wrote: > Preventing this class of bugs is important but QEMU is currently > frozen for the 7.2 release. I'm a little concerned about regressions > in a patch series that changes core device emulation code. > > I'll review the series on Mond

Re: [RFC PATCH] gitlab: integrate coverage report

2022-11-10 Thread Stefan Hajnoczi
On Thu, 10 Nov 2022 at 15:04, Alex Bennée wrote: > > This should hopefully give is nice coverage information about what our > tests (or at least the subset we are running) have hit. Ideally we > would want a way to trigger coverage on tests likely to be affected by > the current commit. > > Signed

Re: [PATCH for-7.2] block/blkio: Set BlockDriver::has_variable_length to false

2022-11-10 Thread Stefan Hajnoczi
On Tue, 8 Nov 2022 at 09:45, Alberto Faria wrote: > > Setting it to true can cause the device size to be queried from libblkio > in otherwise fast paths, degrading performance. Set it to false and > require users to refresh the device size explicitly instead. > > Fixes: 4c8f4fda0504 ("block/blkio:

[PULL 2/3] display: include dependencies explicitly

2022-11-10 Thread Michael S. Tsirkin
acpi-vga-stub.c pulls in vga_int.h However that currently pulls in ui/console.h which breaks e.g. on systems without pixman. It's better to remove ui/console.h from vga_int.h and directly include it where it's used. Signed-off-by: Michael S. Tsirkin Message-Id: <20221109222112.74519-1-...@redhat.

[PULL 1/3] checkpatch: typo fix

2022-11-10 Thread Michael S. Tsirkin
remove inline #inline - it's an obvious typo. Should just be remove inline. Fixes: 1ef47f40dc ("checkpatch: better pattern for inline comments") Signed-off-by: Michael S. Tsirkin Message-Id: <20221108135155.1121566-1-...@redhat.com> --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+

[PULL 3/3] virtio-net: fix for heap-buffer-overflow

2022-11-10 Thread Michael S. Tsirkin
From: Xuan Zhuo Run shell script: cat << EOF | valgrind qemu-system-i386 -display none -machine accel=qtest, -m \ 512M -M q35 -nodefaults -device virtio-net,netdev=net0 -netdev \ user,id=net0 -qtest stdio outl 0xcf8 0x8810 outl 0xcfc 0xc000 outl 0xcf8 0x8804

[PULL 0/3] pc,virtio: regression fixes

2022-11-10 Thread Michael S. Tsirkin
There's one other bugfix I'm tracking for 7.2, dealing with reconnect for vhost-user, let's see whether it's ready in time. Other than that, this release seems mostly done to me. The following changes since commit 60ab36907ded2918d33683f2b66f603b7400d8f3: Update VERSION for v7.2.0-rc0 (2022-11-

Is bdrv_poll_co() IO_CODE()?

2022-11-10 Thread Stefan Hajnoczi
Hi, bdrv_coroutine_enter() is IO_CODE but is called from any coroutine wrapper function. When there is an IOThread and main loop code calls a coroutine wrapper function then I think bdrv_coroutine_enter() is called from outside IO_CODE? Thanks, Stefan signature.asc Description: PGP signature

Re: [PATCH for-8.0 1/2] hw/misc/mos6522: Convert TYPE_MOS6522 to 3-phase reset

2022-11-10 Thread Richard Henderson
On 11/11/22 00:34, Peter Maydell wrote: Convert the TYPE_MOS6522 parent class to use 3-phase reset. This is a prerequisite for converting its subclasses. Signed-off-by: Peter Maydell --- hw/misc/mos6522.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) Reviewed-by: Richard He

Re: [PATCH for-8.0 2/2] hw/misc: Convert TYPE_MOS6522 subclasses to 3-phase reset

2022-11-10 Thread Richard Henderson
On 11/11/22 00:34, Peter Maydell wrote: Convert the various subclasses of TYPE_MOS6522 to 3-phase reset. This removes some uses of device_class_set_parent_reset(), which we would eventually like to be able to get rid of. Signed-off-by: Peter Maydell --- include/hw/misc/mos6522.h | 2 +- hw/m

Re: [PATCH v2 1/2] hw/nvme: fix incorrect use of errp/local_err

2022-11-10 Thread Klaus Jensen
On Nov 10 10:59, Philippe Mathieu-Daudé wrote: > On 10/11/22 07:23, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Make nvme_check_constraints() return a bool and fix an invalid error > > propagation where the actual error is thrown away in favor of an unused > > local Error value. > > > > S

Re: [PATCH v2 2/2] hw/nvme: cleanup error reporting in nvme_init_pci()

2022-11-10 Thread Klaus Jensen
On Nov 10 11:00, Markus Armbruster wrote: > Klaus Jensen writes: > > > From: Klaus Jensen > > > > Replace the local Error variable with errp and ERRP_GUARD() and change > > the return value to bool. > > > > Reviewed-by: Markus Armbruster > > Signed-off-by: Klaus Jensen > > --- > > hw/nvme/ctr

[PATCH v3 1/2] hw/nvme: fix incorrect use of errp/local_err

2022-11-10 Thread Klaus Jensen
From: Klaus Jensen Remove an unnecessary local Error value in nvme_realize(). In the process, change nvme_check_constraints() into returning a bool. Finally, removing the local Error value also fixes a bug where an error returned from nvme_init_subsys() would be lost. Reviewed-by: Philippe Math

[PATCH v3 2/2] hw/nvme: cleanup error reporting in nvme_init_pci()

2022-11-10 Thread Klaus Jensen
From: Klaus Jensen Replace the local Error variable with errp and ERRP_GUARD() and change the return value to bool. Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 23 ++- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c index

[PATCH v3 0/2] hw/nvme: errp fixes

2022-11-10 Thread Klaus Jensen
From: Klaus Jensen Fix a couple of invalid errp usages. v3: - reword the commit message in patch 1 - fix an embarrassing bug in patch 2 Klaus Jensen (2): hw/nvme: fix incorrect use of errp/local_err hw/nvme: cleanup error reporting in nvme_init_pci() hw/nvme/ctrl.c | 71

Re: should ioapic_service really be modelling cpu writes?

2022-11-10 Thread Peter Xu
Hi, Alex, On Thu, Nov 10, 2022 at 05:55:51PM +, Alex Bennée wrote: > > Alex Bennée writes: > > > Hi, > > > > I've been trying to remove current_cpu hacks from our hw/ emulation and > > replace them with an explicit cpu_index derived from MemTxAttrs. So far > > this has been going mostly ok

Re: [PATCH v2] migration: check magic value for deciding the mapping of channels

2022-11-10 Thread Peter Xu
On Thu, Nov 10, 2022 at 05:59:45PM +0530, manish.mishra wrote: > Hi Everyone, Just a gentle reminder for review. :) Hi, Manish, I've got a slightly busy week, sorry! If Daniel and Juan won't have time to look at it I'll have a closer look at it next Monday (holiday tomorrow). -- Peter Xu

Re: [PATCH v3 0/7] memory: prevent dma-reentracy issues

2022-11-10 Thread Peter Maydell
On Thu, 10 Nov 2022 at 20:51, Stefan Hajnoczi wrote: > > Preventing this class of bugs is important but QEMU is currently > frozen for the 7.2 release. I'm a little concerned about regressions > in a patch series that changes core device emulation code. > > I'll review the series on Monday and if

Re: [PATCH] chardev/char-win-stdio: Pass Ctrl+C to guest with a multiplexed monitor

2022-11-10 Thread Bin Meng
On Wed, Oct 26, 2022 at 3:39 PM Marc-André Lureau wrote: > > On Tue, Oct 25, 2022 at 6:15 PM Bin Meng wrote: > > > > At present when pressing Ctrl+C from a guest running on QEMU Windows > > with a multiplexed monitor, e.g.: -serial mon:stdio, QEMU executable > > just exits. This behavior is incon

Re: [PATCH] hw/sd/sdhci: reset data count in sdhci_buff_access_is_sequential()

2022-11-10 Thread Bin Meng
On Fri, Nov 11, 2022 at 2:51 AM Mauro Matteo Cascella wrote: > > On Wed, Nov 9, 2022 at 5:19 PM Bin Meng wrote: > > > > On Wed, Nov 9, 2022 at 6:10 PM Mauro Matteo Cascella > > wrote: > > > > > > On Wed, Nov 9, 2022 at 10:45 AM Siqi Chen wrote: > > > > > > > > Hi, > > > > > > > > >This reproduc

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

2022-11-10 Thread Taylor Simpson
Reviewed-by: Richard Henderson Signed-off-by: Taylor Simpson Message-Id: <20221108162906.3166-10-tsimp...@quicinc.com> --- target/hexagon/gen_tcg.h | 201 +++ target/hexagon/genptr.c | 43 + 2 files changed, 244 insertions(+) diff --git a/target/hex

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

2022-11-10 Thread Taylor Simpson
Add overrides for J2_call J2_callt J2_callf Reviewed-by: Richard Henderson Signed-off-by: Taylor Simpson Message-Id: <20221108162906.3166-8-tsimp...@quicinc.com> --- target/hexagon/gen_tcg.h | 8 ++ target/hexagon/genptr.c | 55 2 files

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

2022-11-10 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

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

2022-11-10 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

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

2022-11-10 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 Reviewed-by: Richard Henderson Message-Id: <202

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

2022-11-10 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 Message-Id: <2022110

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

2022-11-10 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

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

2022-11-10 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 Message-Id: <20221108162906.3166-6-tsimp...@quicinc.com>

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

2022-11-10 Thread Taylor Simpson
Acked-by: Richard Henderson Signed-off-by: Taylor Simpson Message-Id: <20221108162906.3166-9-tsimp...@quicinc.com> --- target/hexagon/gen_tcg.h | 177 +++ target/hexagon/genptr.c | 90 2 files changed, 267 insertions(+) diff --git a/tar

[PULL 00/11] Hexagon bug fixes and performance improvement

2022-11-10 Thread Taylor Simpson
The following changes since commit 2ccad61746ca7de5dd3e25146062264387e43bd4: Merge tag 'pull-tcg-20221109' of https://gitlab.com/rth7680/qemu into staging (2022-11-09 13:26:45 -0500) are available in the Git repository at: https://github.com/quic/qemu tags/pull-hex-20221110

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

2022-11-10 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 Message-Id: <20221108162906.3166-7-tsimp...@quicinc.com> --- target/hexagon/cpu.h| 1 - target

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

2022-11-10 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

Re: [PATCH v1 4/4] target/riscv: Add itrigger_enabled field to CPURISCVState

2022-11-10 Thread Alistair Francis
On Thu, Nov 10, 2022 at 3:35 PM Richard Henderson wrote: > > On 11/10/22 13:15, LIU Zhiwei wrote: > >>> +static int debug_post_load(void *opaque, int version_id) > >>> +{ > >>> +RISCVCPU *cpu = opaque; > >>> +CPURISCVState *env = &cpu->env; > >>> + > >>> +if (icount_enabled()) { > >>>

Re: [PULL 00/11] Hexagon bug fixes and performance improvement

2022-11-10 Thread Stefan Hajnoczi
Hi Taylor, QEMU is frozen for the 7.2 release cycle. Only bug fixes can be merged as the tree is being stabilized. You can find the release schedule here: https://wiki.qemu.org/Planning/7.2 Please resend with only the bug fixes needed for the 7.2 release. Thanks! Stefan

[PATCH v3] qapi/qom: Memory backend property prealloc-threads doc fix

2022-11-10 Thread Zhenyu Zhang
Commit ffac16fab3 "hostmem: introduce "prealloc-threads" property" (v5.0.0) changed the default number of threads from number of CPUs to 1. This was deemed a regression, and fixed in commit f8d426a685 "hostmem: default the amount of prealloc-threads to smp-cpus". Except the documentation remained

Re: biosbits test failing on origin/master

2022-11-10 Thread Ani Sinha
On Thu, Nov 10, 2022 at 11:37 PM John Snow wrote: > > Hiya, on today's origin/master > (2ccad61746ca7de5dd3e25146062264387e43bd4) I'm finding that "make > check-avocado" is failing on the new biosbits test on my local > development machine: > > (001/193) tests/avocado/acpi-bits.py:AcpiBitsTest.te

[PATCH v2 05/19] hw/9pfs: Update 9pfs to use the new QemuFd_t type

2022-11-10 Thread Bin Meng
With this new QemuFd_t type, it significantly reduces the number of deviated code paths when adding Windows support. Signed-off-by: Bin Meng --- Changes in v2: - Use the new QemuFd_t type hw/9pfs/9p-local.h | 6 +- hw/9pfs/9p-util.h| 26 +++--- hw/9pfs/9p-local.c | 174

[PATCH v2 08/19] hw/9pfs: Update the local fs driver to support Windows

2022-11-10 Thread Bin Meng
From: Guohuai Shi Update the 9p 'local' file system driver to support Windows, including open, read, write, close, rename, remove, etc. All security models are supported. The mapped (mapped-xattr) security model is implemented using NTFS Alternate Data Stream (ADS) so the 9p export path shall be

[PATCH v2 04/19] osdep.h: Introduce a QEMU file descriptor type

2022-11-10 Thread Bin Meng
Introduce a new QemuFd_t type to represent a file descriptor for different platforms. On POSIX platforms, this is a file descriptor On Windows, this is a file handle. Signed-off-by: Bin Meng --- Changes in v2: - Change to introduce QemuFd_t in osdep.h include/qemu/osdep.h | 26 +++

[PATCH v2 03/19] hw/9pfs: Replace the direct call to xxxat() APIs with a wrapper

2022-11-10 Thread Bin Meng
xxxat() APIs are only available on POSIX platforms. For future extension to Windows, let's replace the direct call to xxxat() APIs with a wrapper. Signed-off-by: Bin Meng --- (no changes since v1) hw/9pfs/9p-util.h | 15 +++ hw/9pfs/9p-local.c | 32

[PATCH v2 02/19] hw/9pfs: Drop unnecessary *xattr wrapper API declarations

2022-11-10 Thread Bin Meng
These are not used anywhere in the source tree. Drop them. Signed-off-by: Bin Meng --- (no changes since v1) hw/9pfs/9p-util.h | 11 --- 1 file changed, 11 deletions(-) diff --git a/hw/9pfs/9p-util.h b/hw/9pfs/9p-util.h index c3526144c9..ccfc8b1cb3 100644 --- a/hw/9pfs/9p-util.h +++ b

[PATCH v2 16/19] fsdev: Disable proxy fs driver on Windows

2022-11-10 Thread Bin Meng
From: Guohuai Shi We don't plan to support 'proxy' file system driver for 9pfs on Windows. Disable it for Windows build. Signed-off-by: Guohuai Shi Signed-off-by: Bin Meng --- (no changes since v1) fsdev/qemu-fsdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fsdev/qemu-fsdev.c b

[PATCH v2 14/19] hw/9pfs: Add Linux error number definition

2022-11-10 Thread Bin Meng
From: Guohuai Shi When using 9p2000.L protocol, the errno should use the Linux errno. Currently magic numbers with comments are used. Replace these with macros for future expansion. Signed-off-by: Guohuai Shi Signed-off-by: Bin Meng --- Changes in v2: - Use a more compact solution in the swi

[PATCH v2 15/19] hw/9pfs: Translate Windows errno to Linux value

2022-11-10 Thread Bin Meng
From: Guohuai Shi Some of Windows error numbers have different value from Linux ones. For example, ENOTEMPTY is defined to 39 in Linux, but is defined to 41 in Windows. So deleting a directory from a Linux guest on top of QEMU from a Windows host complains: # rmdir tmp rmdir: 'tmp': Unknown

[PATCH v2 17/19] hw/9pfs: Update synth fs driver for Windows

2022-11-10 Thread Bin Meng
From: Guohuai Shi Adapt synth fs driver for Windows in preparation to running qtest 9p testing on Windows. Signed-off-by: Guohuai Shi Signed-off-by: Bin Meng --- (no changes since v1) hw/9pfs/9p-synth.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/9pfs/9p-synth

[PATCH v2 07/19] hw/9pfs: Implement Windows specific utilities functions for 9pfs

2022-11-10 Thread Bin Meng
From: Guohuai Shi Windows POSIX API and MinGW library do not provide the NO_FOLLOW flag, and do not allow opening a directory by POSIX open(). This causes all xxx_at() functions cannot work directly. However, we can provide Windows handle based functions to emulate xxx_at() functions (e.g.: opena

[PATCH v2 06/19] hw/9pfs: Add missing definitions for Windows

2022-11-10 Thread Bin Meng
From: Guohuai Shi Some definitions currently used by the 9pfs codes are only available on POSIX platforms. Let's add our own ones in preparation to adding 9pfs support for Windows. Signed-off-by: Guohuai Shi Signed-off-by: Bin Meng --- Changes in v2: - Add S_IFLNK related macros to support s

[PATCH v2 11/19] hw/9pfs: Add a helper qemu_stat_blksize()

2022-11-10 Thread Bin Meng
As Windows host does not have stat->st_blksize field, we use the one we calculated in init_win32_root_directory(). Add a helper qemu_stat_blksize() and use it to avoid direct access to stat->st_blksize. Co-developed-by: Guohuai Shi Signed-off-by: Bin Meng --- Changes in v2: - new patch: "hw/9

[PATCH v2 18/19] tests/qtest: virtio-9p-test: Adapt the case for win32

2022-11-10 Thread Bin Meng
From: Guohuai Shi Windows does not provide the getuid() API. Let's create a local one and return a fixed value 0 as the uid for testing. Co-developed-by: Xuzhou Cheng Signed-off-by: Guohuai Shi Signed-off-by: Bin Meng --- Changes in v2: - Move getuid() to virtio-9p-client.h tests/qtest/li

[PATCH v2 01/19] qemu/xattr.h: Exclude for Windows

2022-11-10 Thread Bin Meng
Windows does not have . Signed-off-by: Bin Meng --- (no changes since v1) include/qemu/xattr.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/qemu/xattr.h b/include/qemu/xattr.h index f1d0f7be74..b08a934acc 100644 --- a/include/qemu/xattr.h +++ b/include/qemu/xa

[PATCH v2 13/19] hw/9pfs: Update v9fs_set_fd_limit() for Windows

2022-11-10 Thread Bin Meng
From: Guohuai Shi Use _getmaxstdio() to set the fd limit on Windows. Signed-off-by: Guohuai Shi Signed-off-by: Bin Meng --- Changes in v2: - new patch: "hw/9pfs: Update v9fs_set_fd_limit() for Windows" hw/9pfs/9p.c | 23 --- 1 file changed, 20 insertions(+), 3 deletions

[PATCH v2 10/19] hw/9pfs: Add a helper qemu_stat_rdev()

2022-11-10 Thread Bin Meng
As Windows host does not have stat->st_rdev field, we use the first 3 characters of the root path to build a device id. Add a helper qemu_stat_rdev() to use it to avoid direct access to stat->st_rdev. Co-developed-by: Guohuai Shi Signed-off-by: Bin Meng --- Changes in v2: - new patch: "hw/9pf

[PATCH v2 19/19] meson.build: Turn on virtfs for Windows

2022-11-10 Thread Bin Meng
From: Guohuai Shi Enable virtfs configuration option for Windows host. Signed-off-by: Guohuai Shi Signed-off-by: Bin Meng --- (no changes since v1) meson.build | 10 +- fsdev/meson.build | 1 + hw/9pfs/meson.build | 8 +--- 3 files changed, 11 insertions(+), 8 delet

[PATCH v2 09/19] hw/9pfs: Support getting current directory offset for Windows

2022-11-10 Thread Bin Meng
From: Guohuai Shi On Windows 'struct dirent' does not have current directory offset. Update qemu_dirent_off() to support Windows. While we are here, add a build time check to error out if a new host does not implement this helper. Signed-off-by: Guohuai Shi Signed-off-by: Bin Meng --- Chang

[PATCH v2 00/19] At present there is no Windows support for 9p file system.

2022-11-10 Thread Bin Meng
This series adds initial Windows support for 9p file system. 'local' file system backend driver is supported on Windows, including open, read, write, close, rename, remove, etc. All security models are supported. The mapped (mapped-xattr) security model is implemented using NTFS Alternate Data Str

[PATCH v2 12/19] hw/9pfs: Disable unsupported flags and features for Windows

2022-11-10 Thread Bin Meng
From: Guohuai Shi Some flags and features are not supported on Windows, like mknod, readlink, file mode, etc. Update the codes for Windows. Signed-off-by: Guohuai Shi Signed-off-by: Bin Meng --- Changes in v2: - Use precise platform check in ifdefs to avoid automatically opting-out other f

Re: [PATCH v3] qapi/qom: Memory backend property prealloc-threads doc fix

2022-11-10 Thread Gavin Shan
Hi Zhenyu, On 11/11/22 11:05 AM, Zhenyu Zhang wrote: Commit ffac16fab3 "hostmem: introduce "prealloc-threads" property" (v5.0.0) changed the default number of threads from number of CPUs to 1. This was deemed a regression, and fixed in commit f8d426a685 "hostmem: default the amount of prealloc-

Re: [PATCH for-7.2] Fix several typos in documentation (found by codespell)

2022-11-10 Thread Ani Sinha
On Fri, Nov 11, 2022 at 12:38 AM Stefan Weil wrote: > > Those typos are in files which are used to generate the QEMU manual. > > Signed-off-by: Stefan Weil For acpi-bits.rst, Reviewed-by: Ani Sinha > --- > > I did not fix memory_region_init_resizeable_ram. That might be done after 7.2. > > Ste

Re: [PATCH v1 0/4] Support native debug icount trigger

2022-11-10 Thread Alistair Francis
On Thu, Oct 13, 2022 at 4:34 PM LIU Zhiwei wrote: > > icount trigger set an instruction count. After one instruction retired, > the count will be decreased by 1. If the count decreased to 0, the icount > trigger will fire. > > icount trigger is needed by single step ptrace system call and the nati

Re: [PATCH v3 1/2] hw/nvme: fix incorrect use of errp/local_err

2022-11-10 Thread Markus Armbruster
Klaus Jensen writes: > From: Klaus Jensen > > Remove an unnecessary local Error value in nvme_realize(). In the > process, change nvme_check_constraints() into returning a bool. > > Finally, removing the local Error value also fixes a bug where an error > returned from nvme_init_subsys() would b

Re: [PATCH v3 1/2] hw/nvme: fix incorrect use of errp/local_err

2022-11-10 Thread Klaus Jensen
On Nov 11 07:36, Markus Armbruster wrote: > Klaus Jensen writes: > > > From: Klaus Jensen > > > > Remove an unnecessary local Error value in nvme_realize(). In the > > process, change nvme_check_constraints() into returning a bool. > > > > Finally, removing the local Error value also fixes a bug

Re: [PATCH] Add missing pixman dependecy

2022-11-10 Thread Miroslav Rezanina
On Wed, Nov 9, 2022 at 5:14 PM Philippe Mathieu-Daudé wrote: > > Hi Mirek, > > On 9/11/22 16:34, mreza...@redhat.com wrote: > > From: Miroslav Rezanina > > > > Commit cfead31326 'acpi: pc: vga: use AcpiDevAmlIf interface to build VGA > > device descriptors' added > > a new file - acpi-vga.c. Thi

<    1   2   3   >