Re: [PATCH] MAINTAINERS: add fuzzing reviewer

2021-08-24 Thread Philippe Mathieu-Daudé
On 8/24/21 8:26 AM, Qiuhao Li wrote: > To keep me cc-ed when something changes. Suggested by Alexander. > > https://lists.gnu.org/archive/html/qemu-devel/2021-08/msg03631.html > > Signed-off-by: Qiuhao Li > --- > MAINTAINERS | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Philippe

[PATCH v8 04/34] qdev: allow setting drive property for realized device

2021-08-24 Thread Vladimir Sementsov-Ogievskiy
We need an ability to insert filters above top block node, attached to block device. It can't be achieved with blockdev-reopen command. So, we want do it with help of qom-set. Intended usage: Assume there is a node A that is attached to some guest device. 1. blockdev-add to create a filter node

[PATCH v8 26/34] iotests/222: fix pylint and mypy complains

2021-08-24 Thread Vladimir Sementsov-Ogievskiy
Here: - long line - move to new interface of vm.qmp() (direct passing dict), to avoid mypy false-positive, as it thinks that unpacked dict is a positional argument. - extra parenthesis - handle event_wait possible None value Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max

[PATCH v8 23/34] python/qemu/machine.py: refactor _qemu_args()

2021-08-24 Thread Vladimir Sementsov-Ogievskiy
- use shorter construction - don't create new dict if not needed - drop extra unpacking key-val arguments - drop extra default values Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Reviewed-by: John Snow --- python/qemu/machine/machine.py | 18 -- 1

[PATCH v8 29/34] iotests.py: hmp_qemu_io: support qdev

2021-08-24 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Reviewed-by: John Snow --- tests/qemu-iotests/iotests.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 89663dac06..77efcb0927 100644

Re: [PATCH v3 0/6] qapi: Add support for aliases

2021-08-24 Thread Markus Armbruster
Conflicts with Marc-André's "[PATCH v7 00/10] qapi: untie 'if' conditions from C preprocessor", which I queued for 6.2. The conflicts look harmless to me.

[qemu-web PATCH] Update the information about the required version of macOS

2021-08-24 Thread Thomas Huth
The versions that we specify for macOS are way too old already. Let's rephrase this without specific version numbers, pointing the users to the latest version instead. Signed-off-by: Thomas Huth --- _download/macos.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [PATCH v7 05/15] machine: Improve the error reporting of smp parsing

2021-08-24 Thread Philippe Mathieu-Daudé
On 8/24/21 6:51 AM, wangyanan (Y) wrote: > On 2021/8/23 21:17, Philippe Mathieu-Daudé wrote: >> On 8/23/21 2:27 PM, Yanan Wang wrote: >>> We have two requirements for a valid SMP configuration: >>> the product of "sockets * cores * threads" must represent all the >>> possible cpus, i.e., max_cpus,

Re: [PATCH 1/2] hw/arm/virt: Rename default_bus_bypass_iommu

2021-08-24 Thread Markus Armbruster
Did this series fall through the cracks for 6.1? Jean-Philippe Brucker writes: > Since commit d8fb7d0969d5 ("vl: switch -M parsing to keyval"), machine > parameter definitions cannot use underscores, because keyval_dashify() > transforms them to dashes and the parser doesn't find the parameter.

[PATCH v4 0/4] hw/arm/smmuv3: Support non PCI/PCIe devices

2021-08-24 Thread Li, Chunming
The current SMMU v3 model only support PCI/PCIe devices, so we update it for non-PCI/PCIe devices. . Add independent IOMMU memory regions for non-PCI/PCIe devices . Add SID value property setting for non-PCI/PCIe devices . Add PL330 DMA controller into "virt" machine and connect with SMMU

[PATCH v4 1/4] hw/arm/smmuv3: Support non PCI/PCIe device connect with SMMU v3

2021-08-24 Thread Li, Chunming
. Add sid-map property to store non PCI/PCIe devices SID . Create IOMMU memory regions for non PCI/PCIe devices based on their SID . Update SID getting strategy for PCI/PCIe and non PCI/PCIe devices Signed-off-by: Li, Chunming --- hw/arm/smmuv3.c | 46

[PATCH v4 4/4] hw/arm/virt: Add PL330 DMA controller and connect with SMMU v3

2021-08-24 Thread Li, Chunming
Add PL330 DMA controller to test SMMU v3 connection and function. The default SID for PL330 is 1 but we test other values, it works well. Signed-off-by: Li, Chunming --- hw/arm/virt.c | 92 ++- include/hw/arm/virt.h | 1 + 2 files changed, 92

[PATCH v8 18/34] block/copy-before-write: cbw_init(): use options

2021-08-24 Thread Vladimir Sementsov-Ogievskiy
One more step closer to .bdrv_open(): use options instead of plain arguments. Move to bdrv_open_child() calls, native for drive open handlers. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz --- block/copy-before-write.c | 29 +++-- 1 file changed,

[PATCH v8 31/34] iotests/image-fleecing: rename tgt_node

2021-08-24 Thread Vladimir Sementsov-Ogievskiy
Actually target of backup(sync=None) is not a final backup target: image fleecing is intended to be used with external tool, which will copy data from fleecing node to some real backup target. Also, we are going to add a test case for "push backup with fleecing", where instead of exporting

Re: [PATCH v2 2/3] hw/usb/hcd-xhci-pci: Abort if setting link property failed

2021-08-24 Thread Philippe Mathieu-Daudé
On 8/24/21 10:35 AM, Philippe Mathieu-Daudé wrote: > On 8/24/21 10:13 AM, Markus Armbruster wrote: >> Eduardo Habkost writes: >> >>> +Markus >>> >>> On Thu, Aug 19, 2021 at 07:15:46PM +0200, Philippe Mathieu-Daudé wrote: Do not ignore eventual error if we failed at setting the 'host'

Re: [qemu-web PATCH] Update the information about the required version of macOS

2021-08-24 Thread Peter Maydell
On Tue, 24 Aug 2021 at 08:27, Thomas Huth wrote: > > The versions that we specify for macOS are way too old already. Let's > rephrase this without specific version numbers, pointing the users > to the latest version instead. > > Signed-off-by: Thomas Huth > --- > _download/macos.md | 4 ++-- >

Re: [PATCH] hw/acpi/pcihp: validate bsel property of the bus before unplugging device

2021-08-24 Thread Ani Sinha
On Tue, 24 Aug 2021, Igor Mammedov wrote: > On Mon, 23 Aug 2021 19:06:47 -0400 > "Michael S. Tsirkin" wrote: > > > On Sat, Aug 21, 2021 at 08:35:35PM +0530, Ani Sinha wrote: > > > Bsel property of the pci bus indicates whether the bus supports acpi > > > hotplug. > > > We need to validate

Re: [PATCH v2 1/5] qemu/qarray.h: introduce QArray

2021-08-24 Thread Markus Armbruster
Christian Schoenebeck writes: > Implements deep auto free of arrays while retaining common C-style > squared bracket access. > > Signed-off-by: Christian Schoenebeck You provide some motivation for this, but only in your cover letter: Patches 1 and 2 introduce include/qemu/qarray.h which

Re: [PATCH v7 05/15] machine: Improve the error reporting of smp parsing

2021-08-24 Thread wangyanan (Y)
On 2021/8/24 15:29, Philippe Mathieu-Daudé wrote: On 8/24/21 6:51 AM, wangyanan (Y) wrote: On 2021/8/23 21:17, Philippe Mathieu-Daudé wrote: On 8/23/21 2:27 PM, Yanan Wang wrote: We have two requirements for a valid SMP configuration: the product of "sockets * cores * threads" must

[PATCH v8 14/34] block/copy-before-write: introduce cbw_init()

2021-08-24 Thread Vladimir Sementsov-Ogievskiy
Move part of bdrv_cbw_append() to new function cbw_open(). It's an intermediate step for adding normal .bdrv_open() handler to the filter. With this commit no logic is changed, but we have a function which will be turned into .bdrv_open() handler in future commit. Signed-off-by: Vladimir

[PATCH v8 32/34] iotests/image-fleecing: prepare for adding new test-case

2021-08-24 Thread Vladimir Sementsov-Ogievskiy
We are going to add a test-case with some behavior modifications. So, let's prepare a function to be reused. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/tests/image-fleecing | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-)

Re: hw/nvme: fix verification of select field in namespace attachment

2021-08-24 Thread Klaus Jensen
On Aug 23 16:33, Naveen wrote: > Fix is added to check for reserved value in select field for > namespace attachment > > Signed-off-by: Naveen Nagar > Signed-off-by: Klaus Jensen > cc: Minwoo Im > Looks like your MUA didnt pick up on the CC: tag, so: +CC Minwoo signature.asc Description:

Re: [PATCH v12] qapi: introduce 'query-x86-cpuid' QMP command.

2021-08-24 Thread Markus Armbruster
Eduardo Habkost writes: > On Mon, Aug 23, 2021 at 9:35 AM Markus Armbruster wrote: >> >> Eduardo Habkost writes: >> >> > On Wed, Aug 11, 2021 at 9:44 AM Thomas Huth wrote: >> >> >> >> On 11/08/2021 15.40, Eduardo Habkost wrote: >> >> > On Wed, Aug 11, 2021 at 2:10 AM Thomas Huth wrote: >> >>

RE: [PATCH] hw/arm/smmuv3: Support non-PCI/PCIe devices connection

2021-08-24 Thread Li, Chunming
> -Original Message- > From: Peter Maydell [mailto:peter.mayd...@linaro.org] > Sent: Friday, August 20, 2021 5:15 PM > To: Li, Chunming > Cc: eric.au...@redhat.com; qemu-...@nongnu.org; qemu-devel@nongnu.org; > Wen, Jianxian; Liu, Renwei > Subject: Re: [PATCH] hw/arm/smmuv3: Support

Re: Testing a microcontroller emulation by loading the binary on incomplete Flash emulation

2021-08-24 Thread Philippe Mathieu-Daudé
On 8/23/21 9:46 PM, Gautam Bhat wrote: > On Sun, Aug 22, 2021 at 10:18 PM Peter Maydell > wrote: >> On Sun, 22 Aug 2021 at 15:37, Gautam Bhat wrote: >>> >>> Hi, >>> >>> I am to implement a very simple microcontroller for my understanding >>> of Qemu development. This microcontroller runs its

[PATCH v8 01/34] block: introduce bdrv_replace_child_bs()

2021-08-24 Thread Vladimir Sementsov-Ogievskiy
Add function to transactionally replace bs inside BdrvChild. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- include/block/block.h | 2 ++ block.c | 31 +++ 2 files changed, 33 insertions(+) diff --git a/include/block/block.h

[PATCH v8 06/34] block-copy: move detecting fleecing scheme to block-copy

2021-08-24 Thread Vladimir Sementsov-Ogievskiy
We want to simplify initialization interface of copy-before-write filter as we are going to make it public. So, let's detect fleecing scheme exactly in block-copy code, to not pass this information through extra levels. Why not just set BDRV_REQ_SERIALISING unconditionally: because we are going

[PATCH v8 08/34] block/backup: set copy_range and compress after filter insertion

2021-08-24 Thread Vladimir Sementsov-Ogievskiy
We are going to publish copy-before-write filter, so it would be initialized through options. Still we don't want to publish compress and copy-range options, as 1. Modern way to enable compression is to use compress filter. 2. For copy-range it's unclean how to make proper interface: - it's has

[PATCH v8 05/34] block: rename backup-top to copy-before-write

2021-08-24 Thread Vladimir Sementsov-Ogievskiy
We are going to convert backup_top to full featured public filter, which can be used in separate of backup job. Start from renaming from "how it used" to "what it does". While updating comments in 283 iotest, drop and rephrase also things about ".active", as this field is now dropped, and filter

[PATCH v8 27/34] iotests/222: constantly use single quotes for strings

2021-08-24 Thread Vladimir Sementsov-Ogievskiy
The file use both single and double quotes for strings. Let's be consistent. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/222 | 68 +- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git

[PATCH v8 33/34] iotests/image-fleecing: add test-case for copy-before-write filter

2021-08-24 Thread Vladimir Sementsov-Ogievskiy
New fleecing method becomes available: copy-before-write filter. Actually we don't need backup job to setup image fleecing. Add test for new recommended way of image fleecing. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/tests/image-fleecing |

Re: [PATCH 1/3] simplebench: add img_bench_templater.py

2021-08-24 Thread Hanna Reitz
On 24.08.21 10:53, Vladimir Sementsov-Ogievskiy wrote: 19.08.2021 19:37, Hanna Reitz wrote: On 24.07.21 15:38, Vladimir Sementsov-Ogievskiy wrote: [...] +import itertools +from lark import Lark + +grammar = """ +start: ( text | column_switch | row_switch )+ + +column_switch: "{" text ["|"

Re: [RFC PATCH v2 0/5] physmem: Have flaview API check bus permission from MemTxAttrs argument

2021-08-24 Thread Stefan Hajnoczi
On Mon, Aug 23, 2021 at 06:41:52PM +0200, Philippe Mathieu-Daudé wrote: > This series aim to kill a recent class of bug, the infamous > "DMA reentrancy" issues found by Alexander while fuzzing. > > Introduce the 'bus_perm' field in MemTxAttrs, defining 3 bits: > > - MEMTXPERM_UNSPECIFIED

Re: Testing a microcontroller emulation by loading the binary on incomplete Flash emulation

2021-08-24 Thread Peter Maydell
On Tue, 24 Aug 2021 at 09:22, Philippe Mathieu-Daudé wrote: > > On 8/23/21 9:46 PM, Gautam Bhat wrote: > > On Sun, Aug 22, 2021 at 10:18 PM Peter Maydell > > wrote: > >> On Sun, 22 Aug 2021 at 15:37, Gautam Bhat wrote: > >>> > >>> Hi, > >>> > >>> I am to implement a very simple microcontroller

Re: [RFC PATCH v2 0/5] physmem: Have flaview API check bus permission from MemTxAttrs argument

2021-08-24 Thread Peter Maydell
On Mon, 23 Aug 2021 at 21:50, Peter Xu wrote: > > On Mon, Aug 23, 2021 at 08:10:50PM +0100, Peter Maydell wrote: > > On Mon, 23 Aug 2021 at 17:42, Philippe Mathieu-Daudé > > wrote: > > > > > > This series aim to kill a recent class of bug, the infamous > > > "DMA reentrancy" issues found by

[PATCH v8 07/34] block/block-copy: introduce block_copy_set_copy_opts()

2021-08-24 Thread Vladimir Sementsov-Ogievskiy
We'll need a possibility to set compress and use_copy_range options after initialization of the state. So make corresponding part of block_copy_state_new() separate and public. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block-copy.h | 3 +++ block/block-copy.c | 49

[PATCH v8 13/34] block/copy-before-write: bdrv_cbw_append(): replace child at last

2021-08-24 Thread Vladimir Sementsov-Ogievskiy
Refactor the function to replace child at last. Thus we don't need to revert it and code is simplified. block-copy state initialization being done before replacing the child doesn't need any drained section. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz ---

[PATCH v8 02/34] block: introduce blk_replace_bs

2021-08-24 Thread Vladimir Sementsov-Ogievskiy
Add function to change bs inside blk. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- include/sysemu/block-backend.h | 1 + block/block-backend.c | 8 2 files changed, 9 insertions(+) diff --git a/include/sysemu/block-backend.h

[PATCH v8 25/34] python:QEMUMachine: template typing for self returning methods

2021-08-24 Thread Vladimir Sementsov-Ogievskiy
mypy thinks that return value of these methods in subclusses is QEMUMachine, which is wrong. So, make typing smarter. Suggested-by: John Snow Signed-off-by: Vladimir Sementsov-Ogievskiy --- python/qemu/machine/machine.py | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff

[PATCH v8 30/34] iotests/image-fleecing: proper source device

2021-08-24 Thread Vladimir Sementsov-Ogievskiy
Define scsi device to operate with it by qom-set in further patch. Give a new node-name to source block node, to not look like device name. Job now don't want to work without giving explicit id, so, let's call it "fleecing". Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz

[BUG] scsi: vmw_pvscsi: Boot hangs during scsi under qemu, post commit e662502b3a78

2021-08-24 Thread Shmulik Ladkani
Hi, Commit e662502b3a78 ("scsi: vmw_pvscsi: Set correct residual data length"), and its backports to stable trees, makes kernel hang during boot, when ran as a VM under qemu with following parameters: -drive file=$DISKFILE,if=none,id=sda -device pvscsi -device scsi-hd,bus=scsi.0,drive=sda

Re: [PATCH] softmmu/physmem: Improve guest memory allocation failure error message

2021-08-24 Thread David Hildenbrand
On 24.08.21 10:37, Dr. David Alan Gilbert wrote: * David Hildenbrand (da...@redhat.com) wrote: On 23.08.21 12:34, Philippe Mathieu-Daudé wrote: On 8/23/21 12:24 PM, David Hildenbrand wrote: On 23.08.21 12:12, Philippe Mathieu-Daudé wrote: On 8/23/21 11:29 AM, David Hildenbrand wrote: On

Re: [PATCH 1/3] simplebench: add img_bench_templater.py

2021-08-24 Thread Vladimir Sementsov-Ogievskiy
24.08.2021 11:59, Hanna Reitz wrote: On 24.08.21 10:53, Vladimir Sementsov-Ogievskiy wrote: 19.08.2021 19:37, Hanna Reitz wrote: On 24.07.21 15:38, Vladimir Sementsov-Ogievskiy wrote: [...] +import itertools +from lark import Lark + +grammar = """ +start: ( text | column_switch |

[PATCH] MAINTAINERS: add fuzzing reviewer

2021-08-24 Thread Qiuhao Li
To keep me cc-ed when something changes. Suggested by Alexander. https://lists.gnu.org/archive/html/qemu-devel/2021-08/msg03631.html Signed-off-by: Qiuhao Li --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 6b3697962c..3a979b1bc7 100644 ---

Re: [PATCH 5/5] qmp: Added qemu-ebpf-rss-path command.

2021-08-24 Thread Markus Armbruster
Andrew Melnichenko writes: > Hi, > >> The helper may or may not be installed at the path compiled into QEMU. >> > Yes, so the helper will not be called - QEMU will try to initiate eBPF RSS > or use "in-qemu" RSS. My point is: the proposed command's mission is to help the management application

Re: [PATCH v2 3/4] target/arm/cpu64: Replace kvm_supported with sve_vq_supported

2021-08-24 Thread Andrew Jones
On Tue, Aug 24, 2021 at 08:28:55AM +0200, Andrew Jones wrote: > On Mon, Aug 23, 2021 at 10:53:48AM -0700, Richard Henderson wrote: > > On 8/23/21 9:06 AM, Andrew Jones wrote: > > > Now that we have an ARMCPU member sve_vq_supported we no longer > > > need the local kvm_supported bitmap for KVM's

Re: [PATCH v2 2/3] hw/usb/hcd-xhci-pci: Abort if setting link property failed

2021-08-24 Thread Markus Armbruster
Eduardo Habkost writes: > +Markus > > On Thu, Aug 19, 2021 at 07:15:46PM +0200, Philippe Mathieu-Daudé wrote: >> Do not ignore eventual error if we failed at setting the 'host' >> property of the TYPE_XHCI model. >> >> Signed-off-by: Philippe Mathieu-Daudé >> --- >> hw/usb/hcd-xhci-pci.c | 2

Re: [PATCH v2 2/3] hw/usb/hcd-xhci-pci: Abort if setting link property failed

2021-08-24 Thread Philippe Mathieu-Daudé
On 8/24/21 10:13 AM, Markus Armbruster wrote: > Eduardo Habkost writes: > >> +Markus >> >> On Thu, Aug 19, 2021 at 07:15:46PM +0200, Philippe Mathieu-Daudé wrote: >>> Do not ignore eventual error if we failed at setting the 'host' >>> property of the TYPE_XHCI model. >>> >>> Signed-off-by:

[PATCH v8 12/34] block/copy-before-write: use file child instead of backing

2021-08-24 Thread Vladimir Sementsov-Ogievskiy
We are going to publish copy-before-write filter, and there no public backing-child-based filter in Qemu. No reason to create a precedent, so let's refactor copy-before-write filter instead. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/copy-before-write.c | 39

[PATCH v8 09/34] block/backup: move cluster size calculation to block-copy

2021-08-24 Thread Vladimir Sementsov-Ogievskiy
The main consumer of cluster-size is block-copy. Let's calculate it here instead of passing through backup-top. We are going to publish copy-before-write filter soon, so it will be created through options. But we don't want for now to make explicit option for cluster-size, let's continue to

[PATCH v8 11/34] block/copy-before-write: drop extra bdrv_unref on failure path

2021-08-24 Thread Vladimir Sementsov-Ogievskiy
bdrv_attach_child() do bdrv_unref() on failure, so we shouldn't do it by hand here. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/copy-before-write.c | 1 - 1 file changed, 1 deletion(-) diff --git a/block/copy-before-write.c b/block/copy-before-write.c index

[PATCH v8 22/34] qapi: publish copy-before-write filter

2021-08-24 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Acked-by: Markus Armbruster --- qapi/block-core.json | 25 +++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 675d8265eb..6764d8b84f 100644

[Bug 1921664] Re: Coroutines are racy for risc64 emu on arm64 - crash on Assertion

2021-08-24 Thread Christian Ehrhardt 
Hmm, thanks for the hint Thomas. Of the two formerly referenced same-source different result builds: [1] => built 2021-03-23 in Hirsute => works [2] => built 2021-04-12 in Hirsute => fails [1]: https://launchpad.net/ubuntu/+source/qemu/1:5.2+dfsg-9ubuntu1/+build/21196422 [2]:

Re: [PATCH 0/3] gdbstub: add support for switchable endianness

2021-08-24 Thread Peter Maydell
On Tue, 24 Aug 2021 at 00:05, Changbin Du wrote: > > On Mon, Aug 23, 2021 at 04:30:05PM +0100, Peter Maydell wrote: > > changes to be more capable of handling dynamic target changes > > (this would also help with eg debugging across 32<->64 bit switches); > > as I understand it that gdb work

Re: Is QEMU's vmxnet3 still being used?

2021-08-24 Thread Markus Armbruster
Peter Maydell writes: > On Thu, 19 Aug 2021 at 09:54, Daniel P. Berrangé wrote: >> We've especially not had "how many users >> are there" as a criteria for acceptance or removal of a device. > > ...not least because we have no accurate way to determine > the answer to that question! I'd like

Re: Is QEMU's vmxnet3 still being used?

2021-08-24 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Wed, Aug 18, 2021 at 03:42:23PM +0200, Thomas Huth wrote: >> >> Hi all, >> >> I recently noticed that we have quite a bunch of tickets against the vmxnet3 >> device in our bug trackers, which indicate that this device could be used to >> crash QEMU in various

Re: [PATCH v2 3/4] target/arm/cpu64: Replace kvm_supported with sve_vq_supported

2021-08-24 Thread Andrew Jones
On Mon, Aug 23, 2021 at 10:53:48AM -0700, Richard Henderson wrote: > On 8/23/21 9:06 AM, Andrew Jones wrote: > > Now that we have an ARMCPU member sve_vq_supported we no longer > > need the local kvm_supported bitmap for KVM's supported vector > > lengths. > > > > Signed-off-by: Andrew Jones > >

Re: [PATCH v5 17/24] target/riscv: Fix hgeie, hgeip

2021-08-24 Thread Bin Meng
On Tue, Aug 24, 2021 at 4:08 AM Richard Henderson wrote: > > We failed to write into *val for these read functions; > replace them with read_zero. Only warn about unsupported > non-zero value when writing a non-zero value. > > Signed-off-by: Richard Henderson > --- > target/riscv/csr.c | 26

Re: [PATCH] softmmu/physmem: Improve guest memory allocation failure error message

2021-08-24 Thread Dr. David Alan Gilbert
* David Hildenbrand (da...@redhat.com) wrote: > On 23.08.21 12:34, Philippe Mathieu-Daudé wrote: > > On 8/23/21 12:24 PM, David Hildenbrand wrote: > > > On 23.08.21 12:12, Philippe Mathieu-Daudé wrote: > > > > On 8/23/21 11:29 AM, David Hildenbrand wrote: > > > > > On 23.08.21 11:23, Peter Maydell

[PATCH v8 28/34] iotests: move 222 to tests/image-fleecing

2021-08-24 Thread Vladimir Sementsov-Ogievskiy
Give a good name to test file. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/{222 => tests/image-fleecing} | 0 tests/qemu-iotests/{222.out => tests/image-fleecing.out} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename

[PATCH v8 17/34] block/copy-before-write: bdrv_cbw_append(): drop unused compress arg

2021-08-24 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz --- block/copy-before-write.h | 1 - block/backup.c| 2 +- block/copy-before-write.c | 7 +++ 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/block/copy-before-write.h b/block/copy-before-write.h

[PATCH v8 10/34] block/copy-before-write: relax permission requirements when no parents

2021-08-24 Thread Vladimir Sementsov-Ogievskiy
We are going to publish copy-before-write filter. So, user should be able to create it with blockdev-add first, specifying both filtered and target children. And then do blockdev-reopen, to actually insert the filter where needed. Currently, filter unshares write permission unconditionally on

[PATCH v8 16/34] block/copy-before-write: cbw_init(): use file child after attaching

2021-08-24 Thread Vladimir Sementsov-Ogievskiy
In the next commit we'll get rid of source argument of cbw_init(). Prepare to it now, to make next commit simpler: move the code block that uses source below attaching the child and use bs->file->bs instead of source variable. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz

[PATCH v8 34/34] block/block-copy: block_copy_state_new(): drop extra arguments

2021-08-24 Thread Vladimir Sementsov-Ogievskiy
The only caller pass copy_range and compress both false. Let's just drop these arguments. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block-copy.h | 1 - block/block-copy.c | 5 ++--- block/copy-before-write.c | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-)

Re: [RFC PATCH v2 1/5] softmmu/physmem: Simplify flatview_write and address_space_access_valid

2021-08-24 Thread Alexander Bulekov
On 210823 1841, Philippe Mathieu-Daudé wrote: > Remove unuseful local 'result' variables. > > Signed-off-by: Philippe Mathieu-Daudé > --- > softmmu/physmem.c | 11 +++ > 1 file changed, 3 insertions(+), 8 deletions(-) > Reviewed-by: Alexander Bulekov

Re: [RFC PATCH v2 0/5] physmem: Have flaview API check bus permission from MemTxAttrs argument

2021-08-24 Thread Edgar E. Iglesias
On Mon, Aug 23, 2021 at 08:10:50PM +0100, Peter Maydell wrote: > On Mon, 23 Aug 2021 at 17:42, Philippe Mathieu-Daudé > wrote: > > > > This series aim to kill a recent class of bug, the infamous > > "DMA reentrancy" issues found by Alexander while fuzzing. > > > > Introduce the 'bus_perm' field

Re: [PATCH v2 4/4] target/arm/cpu64: Validate sve vector lengths are supported

2021-08-24 Thread Andrew Jones
On Mon, Aug 23, 2021 at 11:04:49AM -0700, Richard Henderson wrote: > On 8/23/21 9:06 AM, Andrew Jones wrote: > > Future CPU types may specify which vector lengths are supported. > > We can apply nearly the same logic to validate those lengths > > as we do for KVM's supported vector lengths. We

[PATCH v8 03/34] qdev-properties: PropertyInfo: add realized_set_allowed field

2021-08-24 Thread Vladimir Sementsov-Ogievskiy
Add field, so property can declare support for setting the property when device is realized. To be used in the following commit. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- include/hw/qdev-properties.h | 1 + hw/core/qdev-properties.c| 6 +++--- 2 files changed,

[PATCH v8 15/34] block/copy-before-write: cbw_init(): rename variables

2021-08-24 Thread Vladimir Sementsov-Ogievskiy
One more step closer to real .bdrv_open() handler: use more usual names for bs being initialized and its state. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/copy-before-write.c | 29 ++--- 1 file changed, 14 insertions(+), 15 deletions(-)

[PATCH v8 24/34] python/qemu/machine: QEMUMachine: improve qmp() method

2021-08-24 Thread Vladimir Sementsov-Ogievskiy
We often call qmp() with unpacking dict, like qmp('foo', **{...}). mypy don't really like it, it thinks that passed unpacked dict is a positional argument and complains that it type should be bool (because second argument of qmp() is conv_keys: bool). Allow passing dict directly, simplifying

[PATCH v8 19/34] block/copy-before-write: initialize block-copy bitmap

2021-08-24 Thread Vladimir Sementsov-Ogievskiy
We are going to publish copy-before-write filter to be used in separate of backup. Future step would support bitmap for the filter. But let's start from full set bitmap. We have to modify backup, as bitmap is first initialized by copy-before-write filter, and then backup modifies it.

Re: [PATCH] MAINTAINERS: add fuzzing reviewer

2021-08-24 Thread Alexander Bulekov
On 210824 1426, Qiuhao Li wrote: > To keep me cc-ed when something changes. Suggested by Alexander. > > https://lists.gnu.org/archive/html/qemu-devel/2021-08/msg03631.html > > Signed-off-by: Qiuhao Li Reviewed-by: Alexander Bulekov

Re: [PATCH] hw/acpi/pcihp: validate bsel property of the bus before unplugging device

2021-08-24 Thread Igor Mammedov
On Mon, 23 Aug 2021 19:06:47 -0400 "Michael S. Tsirkin" wrote: > On Sat, Aug 21, 2021 at 08:35:35PM +0530, Ani Sinha wrote: > > Bsel property of the pci bus indicates whether the bus supports acpi > > hotplug. > > We need to validate the presence of this property before performing any > >

[PATCH v8 20/34] block/block-copy: make setting progress optional

2021-08-24 Thread Vladimir Sementsov-Ogievskiy
Now block-copy will crash if user don't set progress meter by block_copy_set_progress_meter(). copy-before-write filter will be used in separate of backup job, and it doesn't want any progress meter (for now). So, allow not setting it. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max

Re: [PATCH 1/3] simplebench: add img_bench_templater.py

2021-08-24 Thread Vladimir Sementsov-Ogievskiy
19.08.2021 19:37, Hanna Reitz wrote: On 24.07.21 15:38, Vladimir Sementsov-Ogievskiy wrote: Add simple grammar-parsing template benchmark. This doesn’t really say much, and FWIW, for like ten minutes I thought this would do something completely different than it did (while I was trying to

Re: [PATCH v2 2/3] hw/usb/hcd-xhci-pci: Abort if setting link property failed

2021-08-24 Thread Peter Maydell
On Tue, 24 Aug 2021 at 09:14, Markus Armbruster wrote: > In functions with an Error **errp parameter, use of _fatal is > almost always wrong. What are the cases where it is not wrong? My guess is "in board code and other places where the error handling would have been 'print a message and call

Re: [PATCH V6 00/27] Live Update

2021-08-24 Thread Zheng Chuan
Hi, Steve. I think I have found the problem, it is because the rom_reset() during the cpr_exec will write dtb into the mach-virt.ram which cause the memory corruption. Also I found in x86 the memoryregion of acpi also changed during rom_rest. Maybe we should keep it consistent and skip the

Re: [PATCH v5 13/24] target/riscv: Use extracts for sraiw and srliw

2021-08-24 Thread Bin Meng
On Tue, Aug 24, 2021 at 4:05 AM Richard Henderson wrote: > > These operations can be done in one instruction on some hosts. > > Signed-off-by: Richard Henderson > --- > target/riscv/insn_trans/trans_rvi.c.inc | 14 -- > 1 file changed, 12 insertions(+), 2 deletions(-) >

Re: [PATCH v2 2/3] hw/usb/hcd-xhci-pci: Abort if setting link property failed

2021-08-24 Thread Markus Armbruster
Eduardo Habkost writes: > On Tue, Aug 24, 2021 at 01:16:40PM +0100, Peter Maydell wrote: >> On Tue, 24 Aug 2021 at 13:05, Markus Armbruster wrote: >> > When you know that all callers handle errors like _fatal does, use >> > of _fatal doesn't produce wrong behavior. It's still kind of >> >

Re: [PATCH v2 2/3] hw/usb/hcd-xhci-pci: Abort if setting link property failed

2021-08-24 Thread Peter Maydell
On Tue, 24 Aug 2021 at 16:15, Markus Armbruster wrote: > True, except when I called it "kind of wrong", I was still talking about > functions with an Error **errp parameter. Oh yes, so you were. I even quoted your sentence starting "In functions with an Error **errp parameter ...". I must have

Re: Using loadvm with snapshot

2021-08-24 Thread Peter Maydell
On Tue, 24 Aug 2021 at 16:21, Kevin Wolf wrote: > > Am 17.08.2021 um 20:48 hat Peter Maydell geschrieben: > > On Tue, 17 Aug 2021 at 17:27, Dr. David Alan Gilbert > > wrote: > > > > > > * Gabriel Southern (gsout...@qti.qualcomm.com) wrote: > > > > Hi, > > > > > > > > Are there plans to support

Re: [PATCH 1/2] iotests: Fix unspecified-encoding pylint warnings

2021-08-24 Thread Philippe Mathieu-Daudé
On 8/24/21 5:35 PM, Hanna Reitz wrote: > As of recently, pylint complains when `open()` calls are missing an > `encoding=` specified. Everything we have should be UTF-8 (and in fact, > everything should be UTF-8, period (exceptions apply)), so use that. > > Signed-off-by: Hanna Reitz > --- >

[PATCH v2 02/16] target/ppc: add user read functions for MMCR0 and MMCR2

2021-08-24 Thread Daniel Henrique Barboza
From: Gustavo Romero This patch adds handling of UMMCR0 and UMMCR2 user read which, according to PowerISA 3.1, has some bits ommited to the userspace. CC: Gustavo Romero Signed-off-by: Gustavo Romero Signed-off-by: Daniel Henrique Barboza --- target/ppc/cpu.h | 5 +

[PATCH v2 10/16] target/ppc: PMU Event-Based exception support

2021-08-24 Thread Daniel Henrique Barboza
From: Gustavo Romero Following up the rfebb implementation, this patch adds the EBB exception support that are triggered by Performance Monitor alerts. This exception occurs when an enabled PMU condition or event happens and both MMCR0_EBE and BESCR_PME are set. The supported PM alerts will

[PATCH v2 00/16] PMU-EBB support for PPC64 TCG

2021-08-24 Thread Daniel Henrique Barboza
Hi, This second version is considerably different than the first one. All changes were made based on review comments from David and Richard, along with some design changes I decided to make along the way. Patches were rebased using current David's ppc-for-6.2 tree. Changes from v1: - all

Re: [PATCH v2 18/30] linux-user/i386: Use force_sig, force_sig_fault, force_sigsegv_for_addr

2021-08-24 Thread Peter Maydell
On Sun, 22 Aug 2021 at 04:55, Richard Henderson wrote: > > Replace the local gen_signal with the generic functions that > match how the kernel raises signals. > > Signed-off-by: Richard Henderson Mention behaviour changes in the commit message. Otherwise Reviewed-by: Peter Maydell thanks --

[PATCH v2 13/16] target/ppc/power8_pmu.c: cycles overflow with all PMCs

2021-08-24 Thread Daniel Henrique Barboza
All performance monitor counters can trigger a counter negative condition if the proper MMCR0 bits are set. This patch does that for all PMCs that can count cycles by doing the following: - pmc_counter_negative_enabled() will check whether a given PMC is eligible to trigger the counter negative

Re: [PATCH v2 07/30] linux-user/arm: Use force_sig_fault()

2021-08-24 Thread Philippe Mathieu-Daudé
On 8/22/21 5:55 AM, Richard Henderson wrote: > From: Peter Maydell > > Use the new force_sig_fault() function instead of setting up > a target_siginfo_t and calling queue_signal(). > > Signed-off-by: Peter Maydell > Message-Id: <20210813131809.28655-7-peter.mayd...@linaro.org> > Signed-off-by:

Re: [PATCH v2 05/30] linux-user: Provide new force_sig_fault() function

2021-08-24 Thread Philippe Mathieu-Daudé
On 8/22/21 5:55 AM, Richard Henderson wrote: > From: Peter Maydell > > In many places in the linux-user code we need to queue a signal for > the guest using the QEMU_SI_FAULT si_type. This requires that the > caller sets up and passes us a target_siginfo, including setting the > appropriate

Re: [PATCH v2 26/30] linux-user/riscv: Use force_sig_fault, force_sigsegv_for_addr

2021-08-24 Thread Peter Maydell
On Sun, 22 Aug 2021 at 04:55, Richard Henderson wrote: > > Use the new functions instead of setting up a target_siginfo_t > and calling queue_signal. > > Signed-off-by: Richard Henderson > --- > linux-user/riscv/cpu_loop.c | 36 +++- > 1 file changed, 7

[PATCH v2 2/3] qcow2: refactor handle_dependencies() loop body

2021-08-24 Thread Vladimir Sementsov-Ogievskiy
No logic change, just prepare for the following commit. While being here do also small grammar fix in a comment. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Reviewed-by: Hanna Reitz --- block/qcow2-cluster.c | 49 --- 1 file

Re: [RFC 09/10] hw/mos6522: Avoid using discrepant QEMU clock values

2021-08-24 Thread Philippe Mathieu-Daudé
On 8/24/21 12:09 PM, Finn Thain wrote: > mos6522_read() and mos6522_write() may call various functions to determine > timer irq state, timer counter value and QEMUTimer deadline. All called > functions must use the same value for the present time. > > Signed-off-by: Finn Thain > --- >

Re: [RFC PATCH v2 3/5] exec/memattrs: Introduce MemTxAttrs::bus_perm field

2021-08-24 Thread Stefan Hajnoczi
On Mon, Aug 23, 2021 at 06:41:55PM +0200, Philippe Mathieu-Daudé wrote: > Add the 'direct_access' bit to the memory attributes to restrict > bus master access to ROM/RAM. > Have read/write accessors return MEMTX_BUS_ERROR if an access is > restricted and the region is not ROM/RAM ('direct'). > Add

Re: [PATCH v8 07/34] block/block-copy: introduce block_copy_set_copy_opts()

2021-08-24 Thread Hanna Reitz
On 24.08.21 10:38, Vladimir Sementsov-Ogievskiy wrote: We'll need a possibility to set compress and use_copy_range options after initialization of the state. So make corresponding part of block_copy_state_new() separate and public. Signed-off-by: Vladimir Sementsov-Ogievskiy ---

Re: [PATCH] MAINTAINERS: add fuzzing reviewer

2021-08-24 Thread Darren Kenny
On Tuesday, 2021-08-24 at 04:43:39 -04, Alexander Bulekov wrote: > On 210824 1426, Qiuhao Li wrote: >> To keep me cc-ed when something changes. Suggested by Alexander. >> >> https://lists.gnu.org/archive/html/qemu-devel/2021-08/msg03631.html >> >> Signed-off-by: Qiuhao Li > > Reviewed-by:

Re: [PATCH v6 1/5] hw/arm/virt: Only describe cpu topology since virt-6.2

2021-08-24 Thread Andrew Jones
On Tue, Aug 24, 2021 at 08:20:12PM +0800, Yanan Wang wrote: > On existing older machine types, without cpu topology described > in ACPI or DT, the guest will populate one by default. With the > topology described, it will read the information and set up its > topology as instructed, but that may

Re: [PATCH v8 34/34] block/block-copy: block_copy_state_new(): drop extra arguments

2021-08-24 Thread Hanna Reitz
On 24.08.21 10:38, Vladimir Sementsov-Ogievskiy wrote: The only caller pass copy_range and compress both false. Let's just drop these arguments. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block-copy.h | 1 - block/block-copy.c | 5 ++--- block/copy-before-write.c

[PATCH 3/9] util/vfio-helpers: Let qemu_vfio_verify_mappings() use error_report()

2021-08-24 Thread Philippe Mathieu-Daudé
Instead of displaying the error on stderr, use error_report() which also report to the monitor. Reviewed-by: Fam Zheng Reviewed-by: Stefan Hajnoczi Signed-off-by: Philippe Mathieu-Daudé --- util/vfio-helpers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 11/19] libdecnumber: Introduce decNumberIntegralToInt128

2021-08-24 Thread Luis Pires
This will be used to implement PowerPC's dctfixqq. Signed-off-by: Luis Pires --- include/libdecnumber/decNumber.h | 2 + include/libdecnumber/decNumberLocal.h | 2 +- libdecnumber/decContext.c | 7 +- libdecnumber/decNumber.c | 94 +++ 4

Re: [PATCH] MAINTAINERS: Add myself as a reviewer for Device Fuzzing

2021-08-24 Thread Alexander Bulekov
On 210824 1404, Darren Kenny wrote: > Should have done this much sooner given the amount of reviewing I'm > already doing in this area. > > Signed-off-by: Darren Kenny > --- > MAINTAINERS | 1 + > 1 file changed, 1 insertion(+) I forgot that you weren't already on this list! Reviewed-by:

  1   2   3   4   >