Re: [PATCH v2 2/3] ui: Switch "-display sdl" to use the QAPI parser

2022-05-19 Thread Thomas Huth
On 19/05/2022 08.39, Thomas Huth wrote: On 18/05/2022 17.08, Markus Armbruster wrote: Thomas Huth writes: The "-display sdl" option still uses a hand-crafted parser for its parameters since we didn't want to drag an interface we considered somewhat flawed into the QAPI schema. Since the flaws

Re: [PATCH v2 2/3] ui: Switch "-display sdl" to use the QAPI parser

2022-05-19 Thread Thomas Huth
On 19/05/2022 09.08, Thomas Huth wrote: On 19/05/2022 08.39, Thomas Huth wrote: On 18/05/2022 17.08, Markus Armbruster wrote: Thomas Huth writes: The "-display sdl" option still uses a hand-crafted parser for its parameters since we didn't want to drag an interface we considered somewhat fla

Re: [PATCH v2 2/3] ui: Switch "-display sdl" to use the QAPI parser

2022-05-19 Thread Markus Armbruster
Thomas Huth writes: > On 18/05/2022 17.08, Markus Armbruster wrote: >> Thomas Huth writes: >> >>> The "-display sdl" option still uses a hand-crafted parser for its >>> parameters since we didn't want to drag an interface we considered >>> somewhat flawed into the QAPI schema. Since the flaws a

Re: [PATCH 4/6] tests/acpi: virt: allow VIOT acpi table changes

2022-05-19 Thread Ani Sinha
On Wed, May 18, 2022 at 4:39 PM Mark Cave-Ayland wrote: > > Signed-off-by: Mark Cave-Ayland Acked-by: Ani Sinha > --- > tests/qtest/bios-tables-test-allowed-diff.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tests/qtest/bios-tables-test-allowed-diff.h > b/tests/qtest/bios-tables

Re: [PATCH 1/6] hw/acpi/viot: rename build_pci_range_node() to pci_host_bridges()

2022-05-19 Thread Ani Sinha
On Wed, May 18, 2022 at 5:57 PM Mark Cave-Ayland wrote: > > On 18/05/2022 12:36, Ani Sinha wrote: > > > On Wed, May 18, 2022 at 4:38 PM Mark Cave-Ayland > > wrote: > >> > >> This is in preparation for separating out the VIOT ACPI table build from > >> the > >> PCI host bridge numeration. > >> >

Re: [PATCH] pc: q35: Bump max_cpus to 512

2022-05-19 Thread Julia Suvorova
On Tue, May 10, 2022 at 1:38 PM Igor Mammedov wrote: > > On Tue, 10 May 2022 09:14:19 +0100 > Daniel P. Berrangé wrote: > > > On Tue, May 10, 2022 at 09:03:25AM +0200, Igor Mammedov wrote: > > > On Mon, 9 May 2022 13:03:38 +0100 > > > Daniel P. Berrangé wrote: > > > > > > > On Mon, May 09, 2022

Re: [PATCH 5/6] hw/acpi/viot: sort VIOT ACPI table entries by PCI host bus min_bus

2022-05-19 Thread Ani Sinha
On Wed, May 18, 2022 at 4:39 PM Mark Cave-Ayland wrote: > > This ensures that the VIOT ACPI table output is always stable for a given PCI > topology by ensuring that entries are ordered according to min_bus. > > Signed-off-by: Mark Cave-Ayland other than the nit below, Reviewed-by: Ani Sinha >

Re: [PATCH v2 2/3] ui: Switch "-display sdl" to use the QAPI parser

2022-05-19 Thread Daniel P . Berrangé
On Thu, May 19, 2022 at 09:27:08AM +0200, Thomas Huth wrote: > On 19/05/2022 09.08, Thomas Huth wrote: > > On 19/05/2022 08.39, Thomas Huth wrote: > > > On 18/05/2022 17.08, Markus Armbruster wrote: > > > > Thomas Huth writes: > > > > > > > > > The "-display sdl" option still uses a hand-crafted

Re: [PATCH v5 2/8] block-backend: Introduce blk_get_guest_block_size()

2022-05-19 Thread Yongji Xie
On Wed, May 18, 2022 at 9:17 PM Stefan Hajnoczi wrote: > > On Wed, May 04, 2022 at 03:40:45PM +0800, Xie Yongji wrote: > > Support getting the guest block size for the block backend. > > It's needed for the following commit. > > > > Signed-off-by: Xie Yongji > > --- > > block/block-backend.c

Re: The fate of iotest 297

2022-05-19 Thread Kevin Wolf
Am 18.05.2022 um 20:21 hat John Snow geschrieben: > To wire it up to "make check" by *default*, I believe I need to expand the > configure script to poll for certain requisites and then create some > wrapper script of some kind that only engages the python tests if the > requisites were met ... and

Re: [PATCH v5 3/8] block/export: Abstract out the logic of virtio-blk I/O process

2022-05-19 Thread Yongji Xie
On Wed, May 18, 2022 at 9:14 PM Stefan Hajnoczi wrote: > > On Wed, May 04, 2022 at 03:40:46PM +0800, Xie Yongji wrote: > > -static void vu_blk_req_complete(VuBlkReq *req) > > +static void vu_blk_req_complete(VuBlkReq *req, size_t in_len) > > { > > VuDev *vu_dev = &req->server->vu_dev; > > >

Re: [PATCH v5 5/8] libvduse: Add VDUSE (vDPA Device in Userspace) library

2022-05-19 Thread Yongji Xie
On Wed, May 18, 2022 at 9:46 PM Stefan Hajnoczi wrote: > > On Wed, May 04, 2022 at 03:40:48PM +0800, Xie Yongji wrote: > > +static int vduse_queue_update_vring(VduseVirtq *vq, uint64_t desc_addr, > > +uint64_t avail_addr, uint64_t > > used_addr) > > +{ > > +

Re: [PATCH v5 8/8] libvduse: Add support for reconnecting

2022-05-19 Thread Yongji Xie
On Wed, May 18, 2022 at 10:03 PM Stefan Hajnoczi wrote: > > On Wed, May 04, 2022 at 03:40:51PM +0800, Xie Yongji wrote: > > @@ -291,6 +294,15 @@ static int vduse_blk_exp_create(BlockExport *exp, > > BlockExportOptions *opts, > > return -ENOMEM; > > } > > > > +vblk_exp->recon_fil

Re: The fate of iotest 297

2022-05-19 Thread Daniel P . Berrangé
On Thu, May 19, 2022 at 09:54:56AM +0200, Kevin Wolf wrote: > Am 18.05.2022 um 20:21 hat John Snow geschrieben: > > To wire it up to "make check" by *default*, I believe I need to expand the > > configure script to poll for certain requisites and then create some > > wrapper script of some kind tha

Re: Attaching qcow2 images to containers

2022-05-19 Thread Fam Zheng
On 2022-05-18 07:30, Stefan Hajnoczi wrote: > Hi Kirill, > I saw your "[PATCH 0/4] dm: Introduce dm-qcow2 driver to attach QCOW2 > files as block device" patch series: > https://lore.kernel.org/linux-kernel/ykme5zs2cpxun...@infradead.org/T/ > > There has been recent work in vDPA (VIRTIO Data Path

Re: [PATCH v2 2/3] ui: Switch "-display sdl" to use the QAPI parser

2022-05-19 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Thu, May 19, 2022 at 09:27:08AM +0200, Thomas Huth wrote: >> On 19/05/2022 09.08, Thomas Huth wrote: >> > On 19/05/2022 08.39, Thomas Huth wrote: >> > > On 18/05/2022 17.08, Markus Armbruster wrote: >> > > > Thomas Huth writes: >> > > > >> > > > > The "-display s

Re: [PATCH v6 13/13] tests: Add postcopy preempt tests

2022-05-19 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Four tests are added for preempt mode: > > - Postcopy plain > - Postcopy recovery > - Postcopy tls > - Postcopy tls+recovery > > Signed-off-by: Peter Xu Reviewed-by: Dr. David Alan Gilbert > --- > tests/qtest/migration-test.c | 54 +

Re: [PATCH v2 2/3] ui: Switch "-display sdl" to use the QAPI parser

2022-05-19 Thread Thomas Huth
On 19/05/2022 10.57, Markus Armbruster wrote: Daniel P. Berrangé writes: On Thu, May 19, 2022 at 09:27:08AM +0200, Thomas Huth wrote: On 19/05/2022 09.08, Thomas Huth wrote: On 19/05/2022 08.39, Thomas Huth wrote: On 18/05/2022 17.08, Markus Armbruster wrote: Thomas Huth writes: The "-d

Re: [PATCH v2 2/3] ui: Switch "-display sdl" to use the QAPI parser

2022-05-19 Thread Thomas Huth
On 19/05/2022 09.51, Daniel P. Berrangé wrote: On Thu, May 19, 2022 at 09:27:08AM +0200, Thomas Huth wrote: On 19/05/2022 09.08, Thomas Huth wrote: On 19/05/2022 08.39, Thomas Huth wrote: On 18/05/2022 17.08, Markus Armbruster wrote: Thomas Huth writes: The "-display sdl" option still uses

Re: hang in migration-test (s390 host)

2022-05-19 Thread Peter Maydell
On Thu, 28 Apr 2022 at 16:08, Peter Maydell wrote: > > On Fri, 25 Mar 2022 at 08:04, Juan Quintela wrote: > > > > Laurent Vivier wrote: > > > Perhaps Juan or Thomas can help too (added to cc) > > > > > > Is this a regression? > > > It looks like a bug in QEMU as it doesn't move from cancelling t

Re: [PATCH v6 12/13] tests: Add postcopy tls recovery migration test

2022-05-19 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > It's easy to build this upon the postcopy tls test. Rename the old > postcopy recovery test to postcopy/recovery/plain. > > Signed-off-by: Peter Xu Reviewed-by: Dr. David Alan Gilbert > --- > tests/qtest/migration-test.c | 33 ++

[RFC 1/2] vhost-user: share the vhost-user protocol related structures

2022-05-19 Thread Usama Arif
Put the vhost-user protocol related data structures to vhost-user.h, so that they can be used in other implementations (e.g. a backend implementation). Signed-off-by: Wei Wang Signed-off-by: Usama Arif --- hw/virtio/vhost-user.c | 160 include/hw/virtio/

[RFC 0/2] Introduce virtio-vhost-user device

2022-05-19 Thread Usama Arif
The virtio-vhost-user (vvu) allows moving the vhost-user process inside a VM. This is done by moving vhost device backend into a guest and tunneling the vhost-user protocol over a new type of device called virtio-vhost-user. A usecase for this is live-updating the host kernel which has the DPDK ap

Re: [PATCH v5 8/8] libvduse: Add support for reconnecting

2022-05-19 Thread Stefan Hajnoczi
On Thu, May 19, 2022 at 04:25:13PM +0800, Yongji Xie wrote: > On Wed, May 18, 2022 at 10:03 PM Stefan Hajnoczi wrote: > > > > On Wed, May 04, 2022 at 03:40:51PM +0800, Xie Yongji wrote: > > > @@ -291,6 +294,15 @@ static int vduse_blk_exp_create(BlockExport *exp, > > > BlockExportOptions *opts, >

[RFC 2/2] virtio-vhost-user: add virtio-vhost-user device

2022-05-19 Thread Usama Arif
The virtio-vhost-user device lets a guest act as a vhost device backend. It works by tunneling vhost-user protocol messages into a guest. The new device syntax is as follows: -chardev socket,id=chardev0,path=vhost-user.sock,server=on,wait=off \ -device virtio-vhost-user-pci,chardev=chardev0

Re: [PATCH v6 11/13] tests: Add postcopy tls migration test

2022-05-19 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > We just added TLS tests for precopy but not postcopy. Add the > corresponding test for vanilla postcopy. > > Rename the vanilla postcopy to "postcopy/plain" because all postcopy tests > will only use unix sockets as channel. > > Signed-off-by: Peter Xu R

Re: [PATCH v5 8/8] libvduse: Add support for reconnecting

2022-05-19 Thread Yongji Xie
On Thu, May 19, 2022 at 5:44 PM Stefan Hajnoczi wrote: > > On Thu, May 19, 2022 at 04:25:13PM +0800, Yongji Xie wrote: > > On Wed, May 18, 2022 at 10:03 PM Stefan Hajnoczi > > wrote: > > > > > > On Wed, May 04, 2022 at 03:40:51PM +0800, Xie Yongji wrote: > > > > @@ -291,6 +294,15 @@ static int v

Re: [PATCH 2/2] target/s390x: kvm: Honor storage keys during emulation

2022-05-19 Thread Thomas Huth
On 06/05/2022 17.39, Janis Schoetterl-Glausch wrote: Storage key controlled protection is currently not honored when emulating instructions. If available, enable key protection for the MEM_OP ioctl, thereby enabling it for the s390_cpu_virt_mem_* functions, when using kvm. As a result, the emulat

Re: [PATCH v6 11/13] tests: Add postcopy tls migration test

2022-05-19 Thread Daniel P . Berrangé
On Tue, May 17, 2022 at 03:57:28PM -0400, Peter Xu wrote: > We just added TLS tests for precopy but not postcopy. Add the > corresponding test for vanilla postcopy. > > Rename the vanilla postcopy to "postcopy/plain" because all postcopy tests > will only use unix sockets as channel. > > Signed-

Re: [PATCH] target/arm: Fix PAuth keys access checks for disabled SEL2

2022-05-19 Thread Peter Maydell
On Tue, 17 May 2022 at 15:53, Florian Lugou wrote: > > As per the description of the HCR_EL2.APK field in the ARMv8 ARM, > Pointer Authentication keys accesses should only be trapped to Secure > EL2 if it is enabled. > > Signed-off-by: Florian Lugou > --- > target/arm/helper.c | 2 +- > 1 file c

bios bits for QEMU acpi tests

2022-05-19 Thread Ani Sinha
Hi Josh: I am looking into integrating bios bits into Qemu functional tests for acpi. Towards that end, I am trying to compile the code on a newer compiler as we might need to make some changes, for example, update acpica so that it can recognize newer tables etc. gcc (Ubuntu 9.4.0-1ubuntu1~20.04.

Re: [PATCH v2 3/7] target/arm: Do not use aarch64_sve_zcr_get_valid_len in reset

2022-05-19 Thread Peter Maydell
On Tue, 17 May 2022 at 07:00, Richard Henderson wrote: > > We don't need to constrain the value set in zcr_el[1], > because it will be done by sve_zcr_len_for_el. > > Signed-off-by: Richard Henderson > --- > target/arm/cpu.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --gi

Re: [PATCH v7 03/13] s390x: topology: CPU topology objects and structures

2022-05-19 Thread Thomas Huth
On 20/04/2022 13.57, Pierre Morel wrote: We use new objects to have a dynamic administration of the CPU topology. The highest level object in this implementation is the s390 book and in this first implementation of CPU topology for S390 we have a single book. The book is built as a SYSBUS bridge

Re: [PATCH v2 2/3] ui: Switch "-display sdl" to use the QAPI parser

2022-05-19 Thread Gerd Hoffmann
Hi, > Oh well, I just noticed that we already have a GrabToggleKeys enum in > qapi/common.json ... I wonder whether I should try to use that instead? It > seems to be used in a slightly different context, though, if I get that > right ...? qemu/ui/input-linux.c Those switch the input routing b

Re: [PATCH v2 2/3] ui: Switch "-display sdl" to use the QAPI parser

2022-05-19 Thread Thomas Huth
On 19/05/2022 12.48, Gerd Hoffmann wrote: Hi, Oh well, I just noticed that we already have a GrabToggleKeys enum in qapi/common.json ... I wonder whether I should try to use that instead? It seems to be used in a slightly different context, though, if I get that right ...? qemu/ui/input-li

Re: [PATCH v2 2/3] ui: Switch "-display sdl" to use the QAPI parser

2022-05-19 Thread Gerd Hoffmann
Hi, > Hmm, ok ... but maybe I should call the new enum HotKeyMod instead of > GrabMod to make it more obvious that it is something different? Looks good to me. take care, Gerd

Re: [RFC PATCH v2 0/8] Removal of AioContext lock, bs->parents and ->children: new rwlock

2022-05-19 Thread Stefan Hajnoczi
On Wed, May 18, 2022 at 06:14:17PM +0200, Kevin Wolf wrote: > If we want to use drain for locking, we need to make sure that drain > actually does the job correctly. I see two major problems with it: > > The first one is that drain only covers I/O paths, but we need to > protect against _anything_

Re: [PATCH v5 8/8] libvduse: Add support for reconnecting

2022-05-19 Thread Stefan Hajnoczi
On Thu, May 19, 2022 at 06:02:50PM +0800, Yongji Xie wrote: > On Thu, May 19, 2022 at 5:44 PM Stefan Hajnoczi wrote: > > > > On Thu, May 19, 2022 at 04:25:13PM +0800, Yongji Xie wrote: > > > On Wed, May 18, 2022 at 10:03 PM Stefan Hajnoczi > > > wrote: > > > > > > > > On Wed, May 04, 2022 at 03:

Re: [PATCH v2 6/7] target/arm: Remove fp checks from sve_exception_el

2022-05-19 Thread Peter Maydell
On Tue, 17 May 2022 at 07:00, Richard Henderson wrote: > > Instead of checking these bits in fp_exception_el and > also in sve_exception_el, document that we must compare > the results. The only place where we have not already > checked that FP EL is zero is in rebuild_hflags_a64. aarch64_cpu_du

Re: [PULL 0/8] Misc patches (Gitlab-CI, qtest, Capstone, ...)

2022-05-19 Thread Stefan Hajnoczi
On Thu, May 19, 2022 at 08:29:09AM +0200, Thomas Huth wrote: > On 18/05/2022 18.12, Richard Henderson wrote: > > On 5/18/22 02:04, Thomas Huth wrote: > > >   Hi Richard! > > > > > > The following changes since commit > > > eec398119fc6911d99412c37af06a6bc27871f85: > > > > > >    Merge tag 'for_u

Re: [PATCH v2 7/7] target/arm: Add el_is_in_host

2022-05-19 Thread Peter Maydell
On Tue, 17 May 2022 at 07:05, Richard Henderson wrote: > > This (newish) ARM pseudocode function is easier to work with > than open-coded tests for HCR_E2H etc. Use of the function > will be staged into the code base in parts. > > Signed-off-by: Richard Henderson > --- > target/arm/internals.h

PING: [PATCH 2/2] tests/tcg/s390x: Test unwinding from signal handlers

2022-05-19 Thread Ilya Leoshkevich
On Wed, 2022-05-04 at 00:51 +0200, Ilya Leoshkevich wrote: > Add a small test to prevent regressions. > > Signed-off-by: Ilya Leoshkevich > --- >  tests/tcg/s390x/signals-s390x.c | 69 ++- > -- >  1 file changed, 55 insertions(+), 14 deletions(-) > > diff --git a/tests

Re: [PULL 0/8] Misc patches (Gitlab-CI, qtest, Capstone, ...)

2022-05-19 Thread Daniel P . Berrangé
On Thu, May 19, 2022 at 08:29:09AM +0200, Thomas Huth wrote: > On 18/05/2022 18.12, Richard Henderson wrote: > > On 5/18/22 02:04, Thomas Huth wrote: > > >   Hi Richard! > > > > > > The following changes since commit > > > eec398119fc6911d99412c37af06a6bc27871f85: > > > > > >    Merge tag 'for_u

Re: [PATCH 3/3] capstone: Remove the capstone submodule

2022-05-19 Thread Peter Maydell
On Mon, 16 May 2022 at 16:22, Thomas Huth wrote: > > Now that we allow compiling with Capstone v3.05 again, all our supported > build hosts should provide at least this version of the disassembler > library, so we do not need to ship this as a submodule anymore. When this eventually goes in, plea

Re: [PATCH 28/35] acpi: pvpanic-isa: use AcpiDevAmlIfClass:build_dev_aml to provide device's AML

2022-05-19 Thread Igor Mammedov
On Wed, 18 May 2022 12:29:25 -0400 "Michael S. Tsirkin" wrote: > On Tue, May 17, 2022 at 10:13:51AM +0200, Gerd Hoffmann wrote: > > That problem isn't new and we already have a bunch of aml_* stubs > > because of that. I expect it'll work just fine, at worst we'll > > have to add a stub or two i

Re: [PULL 0/8] Misc patches (Gitlab-CI, qtest, Capstone, ...)

2022-05-19 Thread Peter Maydell
On Thu, 19 May 2022 at 07:32, Thomas Huth wrote: > > On 18/05/2022 18.12, Richard Henderson wrote: > > On 5/18/22 02:04, Thomas Huth wrote: > >> Hi Richard! > >> > >> The following changes since commit > >> eec398119fc6911d99412c37af06a6bc27871f85: > >> > >>Merge tag 'for_upstream' of > >>

Re: [PATCH] hw/nvme: clean up CC register write logic

2022-05-19 Thread Lukasz Maniak
On Tue, May 17, 2022 at 01:16:05PM +0200, Klaus Jensen wrote: > From: Klaus Jensen > > The SRIOV series exposed an issued with how CC register writes are > handled and how CSTS is set in response to that. Specifically, after > applying the SRIOV series, the controller could end up in a state with

Re: [PATCH v2 5/7] target/arm: Use uint32_t instead of bitmap for sve vq's

2022-05-19 Thread Peter Maydell
On Tue, 17 May 2022 at 06:59, Richard Henderson wrote: > > The bitmap need only hold 15 bits; bitmap is over-complicated. > We can simplify operations quite a bit with plain logical ops. > > The introduction of SVE_VQ_POW2_MAP eliminates the need for > looping in order to search for powers of two.

Re: [PATCH v2 0/7] target/arm: SME prep patches

2022-05-19 Thread Peter Maydell
On Tue, 17 May 2022 at 06:49, Richard Henderson wrote: > > Changes for v2: > * Fixed the errors PMM noticed in patch 2. > * Cleanups for SVE vector length selection. > * Cleanups for SVE exception el selection. > * Add el_is_in_host -- I'm not sure this one will really help, > but it's

Re: [PATCH v8 00/12] hw/nvme: SR-IOV with Virtualization Enhancements

2022-05-19 Thread Lukasz Maniak
On Tue, May 17, 2022 at 01:04:56PM +0200, Klaus Jensen wrote: > On May 16 17:25, Lukasz Maniak wrote: > > On Mon, May 09, 2022 at 04:16:08PM +0200, Lukasz Maniak wrote: > > > Changes since v7: > > > - Fixed description of hw/acpi: Make the PCI hot-plug aware of SR-IOV > > > - Added description to d

Re: [PATCH 1/2] acpi/nvdimm: Create _LS{I,R,W} method for NVDIMM device

2022-05-19 Thread Igor Mammedov
On Wed, 18 May 2022 08:20:56 +0800 Robert Hoo wrote: > On Fri, 2022-05-06 at 11:23 +0200, Igor Mammedov wrote: > > > > > > > > No, sorry, I didn't explain it clear. > > > No extra interface/ABI but these 3 must _LS{I,R,W} nvdimm-sub- > > > device > > > methods. Of course, I'm going to extract

Re: [PATCH] pc: q35: Bump max_cpus to 512

2022-05-19 Thread Igor Mammedov
On Thu, 19 May 2022 13:53:49 +0700 Suravee Suthikulpanit wrote: > On 5/13/22 6:23 PM, Michael S. Tsirkin wrote: > > On Mon, May 09, 2022 at 09:12:49AM +0200, Igor Mammedov wrote: > >> On Wed, 4 May 2022 08:16:39 -0500 > >> Suravee Suthikulpanit wrote: > >> > >>> This is the maximum number of

[PATCH v5 0/6] Introduce CanoKey QEMU

2022-05-19 Thread Hongren (Zenithal) Zheng
- One sentense With this patch series, QEMU would fully emulate an open-source secure key, CanoKey, with supports of various features listed below: * U2F / FIDO2 with Ed25519 and HMAC-secret * OpenPGP Card V3.4 with RSA4096, Ed25519 and more * PIV (NIST SP 800-73-4) * HOTP / TOTP - What's Ne

[PATCH v5 4/6] docs: Add CanoKey documentation

2022-05-19 Thread Hongren (Zenithal) Zheng
Signed-off-by: Hongren (Zenithal) Zheng --- docs/system/device-emulation.rst | 1 + docs/system/devices/canokey.rst | 168 +++ 2 files changed, 169 insertions(+) create mode 100644 docs/system/devices/canokey.rst Note on the qemu-xhci issue: For FIDO2 packets, th

[PATCH v5 5/6] docs/system/devices/usb: Add CanoKey to USB devices examples

2022-05-19 Thread Hongren (Zenithal) Zheng
Signed-off-by: Hongren (Zenithal) Zheng --- docs/system/devices/usb.rst | 4 1 file changed, 4 insertions(+) diff --git a/docs/system/devices/usb.rst b/docs/system/devices/usb.rst index afb7d6c226..872d916758 100644 --- a/docs/system/devices/usb.rst +++ b/docs/system/devices/usb.rst @@ -199

[PATCH v5 1/6] hw/usb: Add CanoKey Implementation

2022-05-19 Thread Hongren (Zenithal) Zheng
This commit added a new emulated device called CanoKey to QEMU. CanoKey implements platform independent features in canokey-core https://github.com/canokeys/canokey-core, and leaves the USB implementation to the platform. In this commit the USB part was implemented in QEMU using QEMU's USB APIs,

[PATCH v5 3/6] meson: Add CanoKey

2022-05-19 Thread Hongren (Zenithal) Zheng
Signed-off-by: Hongren (Zenithal) Zheng --- hw/usb/Kconfig| 5 + hw/usb/meson.build| 5 + meson.build | 6 ++ meson_options.txt | 2 ++ scripts/meson-buildoptions.sh | 3 +++ 5 files changed, 21 insertions(+) diff --git a/hw/u

Re: [PATCH] acpi/erst: fix fallthrough code upon validation failure

2022-05-19 Thread Igor Mammedov
On Fri, 13 May 2022 19:40:05 +0530 Ani Sinha wrote: > At any step when any validation fail in check_erst_backend_storage(), there is > no need to continue further through other validation checks. Further, by > continuing even when record_size is 0, we run the risk of triggering a divide > by zero

[PATCH v5 6/6] MAINTAINERS: add myself as CanoKey maintainer

2022-05-19 Thread Hongren (Zenithal) Zheng
Signed-off-by: Hongren (Zenithal) Zheng --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index dff0200f70..03856c558f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2397,6 +2397,14 @@ F: hw/intc/s390_flic*.c F: include/hw/s390x/s390_flic.h L:

[PATCH v5 2/6] hw/usb/canokey: Add trace events

2022-05-19 Thread Hongren (Zenithal) Zheng
Signed-off-by: Hongren (Zenithal) Zheng --- hw/usb/canokey.c| 13 + hw/usb/trace-events | 16 2 files changed, 29 insertions(+) diff --git a/hw/usb/canokey.c b/hw/usb/canokey.c index 6cb8b7cdb0..4a08b1cbd7 100644 --- a/hw/usb/canokey.c +++ b/hw/usb/canokey.c @@ -

Re: [RFC PATCH v2 0/8] Removal of AioContext lock, bs->parents and ->children: new rwlock

2022-05-19 Thread Kevin Wolf
Am 19.05.2022 um 13:27 hat Stefan Hajnoczi geschrieben: > On Wed, May 18, 2022 at 06:14:17PM +0200, Kevin Wolf wrote: > > If we want to use drain for locking, we need to make sure that drain > > actually does the job correctly. I see two major problems with it: > > > > The first one is that drain

Re: [PATCH 01/35] acpi: add interface to build device specific AML

2022-05-19 Thread Igor Mammedov
On Wed, 18 May 2022 15:30:07 +0530 Ani Sinha wrote: > On Mon, May 16, 2022 at 8:56 PM Igor Mammedov wrote: > > > > There is already ISADeviceClass::build_aml() callback which > > builds device specific AML blob for some ISA devices. > > To extend the same idea to other devices, add TYPE_ACPI_DEV

Re: [PATCH 31/35] acpi: pc/q35: tpm-tis: fix TPM device scope

2022-05-19 Thread Igor Mammedov
On Wed, 18 May 2022 14:33:12 +0530 Ani Sinha wrote: > On Mon, May 16, 2022 at 8:57 PM Igor Mammedov wrote: > > > > tpm-tis, is not a PCI device but ISA one, move it > > under ISA scope to fix incorrect placement. > > This description is a little misleading. What we fix here is for > TPM-tis 2

Re: [PATCH v4 38/43] hw/loongarch: Add LoongArch ls7a rtc device support

2022-05-19 Thread yangxiaojuan
On 2022/5/19 上午3:59, Richard Henderson wrote: On 5/17/22 04:30, Xiaojuan Yang wrote: +static void ls7a_stop_toymatch(LS7ARtcState *s) +{ +    int i; +    uint64_t now; + +    now = qemu_clock_get_ms(rtc_clock); +    for (i = 0; i < TIMER_NUMS; i++) { +    if (s->toy_timer[i].flag) { +

Re: [PATCH] acpi/erst: fix fallthrough code upon validation failure

2022-05-19 Thread Eric DeVolder
On 5/13/22 09:10, Ani Sinha wrote: At any step when any validation fail in check_erst_backend_storage(), there is no need to continue further through other validation checks. Further, by continuing even when record_size is 0, we run the risk of triggering a divide by zero error if we continued

Re: [PATCH 06/18] block: Implement blk_{pread, pwrite}() using generated_co_wrapper

2022-05-19 Thread Alberto Faria
On Wed, May 18, 2022 at 2:34 PM Emanuele Giuseppe Esposito wrote: > This is the main patch: it just moves headers from block/coroutines.h to > the script (block_gen.c). > > This allows you to keep generated_co_wrapper functions in the header > where they originally were (no need to move the functi

g_assert(cpu->halted) in mttcg_cpu_thread_fn()

2022-05-19 Thread Nicholas Piggin
I hit this assert in a ppc spapr guest with several CPUs. There are some paths where cpu1->halted is set to 0 by cpu2, e.g., h_prod(). AFAIKS this could trigger the assert if another thread raced with the thread that is halting. Is this just a false positive in the assert, or is our handling of

[PATCH v4] qga: add guest-get-diskstats command for Linux guests

2022-05-19 Thread luzhipeng
Add a new 'guest-get-diskstats' command for report disk io statistics for Linux guests. This can be useful for getting io flow or handling IO fault, no need to enter guests. Signed-off-by: luzhipeng --- Changes v3->v4: https://patchew.org/QEMU/20220515095437.1291-1-luzhip...@cestc.cn/ Changes

Re: [PATCH] pc: q35: Bump max_cpus to 512

2022-05-19 Thread Suravee Suthikulpanit
On 5/19/22 7:37 PM, Igor Mammedov wrote: On Thu, 19 May 2022 13:53:49 +0700 Suravee Suthikulpanit wrote: On 5/13/22 6:23 PM, Michael S. Tsirkin wrote: On Mon, May 09, 2022 at 09:12:49AM +0200, Igor Mammedov wrote: On Wed, 4 May 2022 08:16:39 -0500 Suravee Suthikulpanit wrote: This i

Re: [PATCH] target/riscv: add zicsr/zifencei to isa_string

2022-05-19 Thread Jiatai He
This patch could work successfully in qemu. With command "cat /proc/device-tree/cpus/cpu@0/riscv\,isa", string "zicsr" and "zifencei" could be found in linux device tree. Tested-by: Jiatai He

Re: [PATCH v4] qga: add guest-get-diskstats command for Linux guests

2022-05-19 Thread Marc-André Lureau
On Thu, May 19, 2022 at 3:28 PM luzhipeng wrote: > > Add a new 'guest-get-diskstats' command for report disk io statistics > for Linux guests. This can be useful for getting io flow or handling > IO fault, no need to enter guests. > > Signed-off-by: luzhipeng Reviewed-by: Marc-André Lureau > -

Re: [PATCH] hostmem: default the amount of prealloc-threads to smp-cpus

2022-05-19 Thread Igor Mammedov
On Wed, 18 May 2022 16:06:47 +0200 Paolo Bonzini wrote: > On 5/18/22 15:31, Daniel P. Berrangé wrote: > > When picking defaults there is never a perfect answer, it > > is more a matter of the least-worst option. > > > > It is pretty clear that nthreads=1 is terrible for any > > large VMs. Defaul

Re: [PATCH 2/2] target/s390x: kvm: Honor storage keys during emulation

2022-05-19 Thread Janis Schoetterl-Glausch
On 5/19/22 12:05, Thomas Huth wrote: > On 06/05/2022 17.39, Janis Schoetterl-Glausch wrote: >> Storage key controlled protection is currently not honored when >> emulating instructions. >> If available, enable key protection for the MEM_OP ioctl, thereby >> enabling it for the s390_cpu_virt_mem_* f

Re: [PATCH v4] qga: add guest-get-diskstats command for Linux guests

2022-05-19 Thread Markus Armbruster
luzhipeng writes: > Add a new 'guest-get-diskstats' command for report disk io statistics > for Linux guests. This can be useful for getting io flow or handling > IO fault, no need to enter guests. > > Signed-off-by: luzhipeng [...] > diff --git a/qga/qapi-schema.json b/qga/qapi-schema.json >

[PATCH 0/4] ppc: improve some memory ordering issues

2022-05-19 Thread Nicholas Piggin
Since RFC[*], this fixes a compile issue noticed by Richard, and has survived some basic stressing with mttcg. Thanks, Nick [*] https://lists.nongnu.org/archive/html/qemu-ppc/2022-05/msg00046.html Nicholas Piggin (4): target/ppc: Fix eieio memory ordering semantics tcg/ppc: ST_ST memory orde

[PATCH 1/4] target/ppc: Fix eieio memory ordering semantics

2022-05-19 Thread Nicholas Piggin
The generated eieio memory ordering semantics do not match the instruction definition in the architecture. Add a big comment to explain this strange instruction and correct the memory ordering behaviour. Signed-off: Nicholas Piggin --- target/ppc/translate.c | 27 ++- 1 f

[PATCH 2/4] tcg/ppc: ST_ST memory ordering is not provided with eieio

2022-05-19 Thread Nicholas Piggin
eieio does not provide ordering between stores to CI memory and stores to cacheable memory so it can't be used as a general ST_ST barrier. Reviewed-by: Richard Henderson Signed-of-by: Nicholas Piggin --- tcg/ppc/tcg-target.c.inc | 2 -- 1 file changed, 2 deletions(-) diff --git a/tcg/ppc/tcg-t

[PATCH 4/4] target/ppc: Implement lwsync with weaker memory ordering

2022-05-19 Thread Nicholas Piggin
This allows an x86 host to no-op lwsyncs, and ppc host can use lwsync rather than sync. Signed-off-by: Nicholas Piggin --- target/ppc/cpu.h | 4 +++- target/ppc/cpu_init.c | 13 +++-- target/ppc/machine.c | 3 ++- target/ppc/translate.c | 8 +++- 4 files changed, 19 inser

[PATCH 3/4] tcg/ppc: Optimize memory ordering generation with lwsync

2022-05-19 Thread Nicholas Piggin
lwsync orders more than just LD_LD, importantly it matches x86 and s390 default memory ordering. Signed-off-by: Nicholas Piggin --- tcg/ppc/tcg-target.c.inc | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tcg/ppc/tcg-target.c.inc b/tcg/ppc/tcg-target.c.inc index 3ff8

Re: [PATCH] block: get rid of blk->guest_block_size

2022-05-19 Thread Eric Blake
On Wed, May 18, 2022 at 02:09:45PM +0100, Stefan Hajnoczi wrote: > Commit 1b7fd729559c ("block: rename buffer_alignment to > guest_block_size") noted: > > At this point, the field is set by the device emulation, but completely > ignored by the block layer. > > The last time the value of buffe

[PATCH] util: optimise flush_idcache_range when the ppc host has coherent icache

2022-05-19 Thread Nicholas Piggin
dcache writeback and icache invalidate is not required when icache is coherent, a shorter fixed-length sequence can be used which just has to flush and re-fetch instructions that were in-flight. Signed-off-by: Nicholas Piggin --- I haven't been able to measure a significant performance differenc

[PATCH 4/4] vhost: forward vring errors into virtio device

2022-05-19 Thread Konstantin Khlebnikov
Setup eventfd for vring error notifications. Add eventfd for each virt-queue to detect which queue faced error. For example vhost-net in kernel silently stop working at first error. Now we'll see message and qmp event if guest driver did something wrong. Signed-off-by: Konstantin Khlebnikov ---

[PATCH 2/4] virtio: forward errors into qdev_report_runtime_error()

2022-05-19 Thread Konstantin Khlebnikov
Repalce virtio_error() with macro which forms structured Error and reports it as device runtime-error in addition to present actions. Signed-off-by: Konstantin Khlebnikov --- hw/virtio/virtio.c |9 +++-- include/hw/virtio/virtio.h | 10 +- 2 files changed, 12 insertions

[PATCH 3/4] vhost: add method vhost_set_vring_err

2022-05-19 Thread Konstantin Khlebnikov
Kernel and user vhost may report virtqueue errors via eventfd. This is only reliable way to get notification about protocol error. Signed-off-by: Konstantin Khlebnikov --- hw/virtio/vhost-backend.c |7 +++ hw/virtio/vhost-user.c|6 ++ include/hw/virtio/vhost-b

[PATCH 1/4] qdev: add DEVICE_RUNTIME_ERROR event

2022-05-19 Thread Konstantin Khlebnikov
This event represents device runtime errors to give time and reason why device is broken. Signed-off-by: Konstantin Khlebnikov --- hw/core/qdev.c |7 +++ include/hw/qdev-core.h |1 + qapi/qdev.json | 26 ++ 3 files changed, 34 insertions(+)

Re: [PATCH v2 1/3] hw/ide/piix: Remove redundant "piix3-ide-xen" device class

2022-05-19 Thread Anthony PERARD via
On Fri, May 13, 2022 at 08:09:55PM +0200, Bernhard Beschow wrote: > Commit 0f8445820f11a69154309863960328dda3dc1ad4 'xen: piix reuse pci > generic class init function' already resolved redundant code which in > turn rendered piix3-ide-xen redundant. > > Signed-off-by: Bernhard Beschow Creating a

Re: [PATCH v2 2/3] hw/ide/piix: Add some documentation to pci_piix3_xen_ide_unplug()

2022-05-19 Thread Anthony PERARD via
On Fri, May 13, 2022 at 08:09:56PM +0200, Bernhard Beschow wrote: > The comment is based on commit message > ae4d2eb273b167dad748ea4249720319240b1ac2 'xen-platform: add missing disk > unplug option'. Since it seems to describe design decisions and > limitations that still apply it seems worth havin

Re: [PATCH v2 3/3] include/hw/ide: Unexport pci_piix3_xen_ide_unplug()

2022-05-19 Thread Anthony PERARD via
On Fri, May 13, 2022 at 08:09:57PM +0200, Bernhard Beschow wrote: > This function was declared in a generic and public header, implemented > in a device-specific source file but only used in xen_platform. Given its > 'aux' parameter, this function is more xen-specific than piix-specific. > Also, th

Re: [PATCH v4] fcntl: Add 32bit filesystem mode

2022-05-19 Thread Icenowy Zheng
在 2020-11-18星期三的 00:39 +0100,Linus Walleij写道: > It was brought to my attention that this bug from 2018 was > still unresolved: 32 bit emulators like QEMU were given > 64 bit hashes when running 32 bit emulation on 64 bit systems. > Sorry for replying such an old mail, but I found that using 32-bi

[PATCH v3 00/10] Implement bdrv_{pread, pwrite, pwrite_sync, pwrite_zeroes}() using generated_co_wrapper

2022-05-19 Thread Alberto Faria
Start by making the interfaces of analogous non-coroutine and coroutine functions consistent with each other, then implement the non-coroutine ones using generated_co_wrapper. For the bdrv_pwrite_sync() case, also add the missing bdrv_co_pwrite_sync() function. Changes v2 --> v3: - Add `assert(by

[PATCH v3 02/10] block: Change bdrv_{pread, pwrite, pwrite_sync}() param order

2022-05-19 Thread Alberto Faria
Swap 'buf' and 'bytes' around for consistency with bdrv_co_{pread,pwrite}(), and in preparation to implement these functions using generated_co_wrapper. Callers were updated using this Coccinelle script: @@ expression child, offset, buf, bytes, flags; @@ - bdrv_pread(child, offset, buf, b

[PATCH v3 01/10] block: Add a 'flags' param to bdrv_{pread, pwrite, pwrite_sync}()

2022-05-19 Thread Alberto Faria
For consistency with other I/O functions, and in preparation to implement them using generated_co_wrapper. Callers were updated using this Coccinelle script: @@ expression child, offset, buf, bytes; @@ - bdrv_pread(child, offset, buf, bytes) + bdrv_pread(child, offset, buf, bytes, 0)

[PATCH v3 07/10] block: Implement bdrv_{pread, pwrite, pwrite_zeroes}() using generated_co_wrapper

2022-05-19 Thread Alberto Faria
bdrv_pwrite_zeroes() now also calls trace_bdrv_co_pwrite_zeroes() and clears the BDRV_REQ_MAY_UNMAP flag when appropriate, which it didn't previously. Signed-off-by: Alberto Faria Reviewed-by: Paolo Bonzini --- block/io.c | 41 include/bloc

[PATCH v3 05/10] block: Make bdrv_co_pwrite() take a const buffer

2022-05-19 Thread Alberto Faria
It does not mutate the buffer. Signed-off-by: Alberto Faria Reviewed-by: Paolo Bonzini --- include/block/block_int-io.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/block/block_int-io.h b/include/block/block_int-io.h index bb454200e5..d4d3bed783 100644 --- a/inclu

[PATCH v3 03/10] block: Make bdrv_{pread, pwrite}() return 0 on success

2022-05-19 Thread Alberto Faria
They currently return the value of their 'bytes' parameter on success. Make them return 0 instead, for consistency with other I/O functions and in preparation to implement them using generated_co_wrapper. This also makes it clear that short reads/writes are not possible. The few callers that rely

[PATCH v3 08/10] block: Add bdrv_co_pwrite_sync()

2022-05-19 Thread Alberto Faria
Also convert bdrv_pwrite_sync() to being implemented using generated_co_wrapper. Signed-off-by: Alberto Faria Reviewed-by: Eric Blake --- block/io.c | 9 + include/block/block-io.h | 8 ++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/block/io.c b/b

[PATCH v3 10/10] block/qcow2: Use bdrv_pwrite_sync() in qcow2_mark_dirty()

2022-05-19 Thread Alberto Faria
Use bdrv_pwrite_sync() instead of calling bdrv_pwrite() and bdrv_flush() separately. Signed-off-by: Alberto Faria Reviewed-by: Eric Blake --- block/qcow2.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index f2fb54c51f..90a2dd406b 100

[PATCH v3 06/10] block: Make 'bytes' param of bdrv_co_{pread, pwrite, preadv, pwritev}() an int64_t

2022-05-19 Thread Alberto Faria
For consistency with other I/O functions, and in preparation to implement bdrv_{pread,pwrite}() using generated_co_wrapper. unsigned int fits in int64_t, so all callers remain correct. Signed-off-by: Alberto Faria --- block/coroutines.h | 4 ++-- include/block/block_int-io.h | 8 +

[PATCH v3 04/10] crypto: Make block callbacks return 0 on success

2022-05-19 Thread Alberto Faria
They currently return the value of their headerlen/buflen parameter on success. Returning 0 instead makes it clear that short reads/writes are not possible. Signed-off-by: Alberto Faria Reviewed-by: Eric Blake --- block/crypto.c | 52 +- block/qco

Re: [PATCH] hw/riscv: virt: Avoid double FDT platform node

2022-05-19 Thread Anup Patel
On Fri, May 13, 2022 at 1:34 AM Dylan Reid wrote: > > When starting the virt machine with `-machine virt,aia=aplic-imsic`, > both the imsic and aplic init code will add platform fdt nodes by > calling `platform_bus_add_all_fdt_nodes`. This leads to an error at > startup: > ``` > qemu_fdt_add_subno

  1   2   3   >