Re: [PATCH 04/38] target/riscv: 16-bit Addition & Subtraction Instructions

2021-02-18 Thread Richard Henderson
On 2/18/21 12:39 AM, LIU Zhiwei wrote: > On 2021/2/13 2:03, Richard Henderson wrote: >> On 2/12/21 7:02 AM, LIU Zhiwei wrote: >>> +    if (a->rd && a->rs1 && a->rs2) { >>> +#ifdef TARGET_RISCV64 >>> +    f64(vece, offsetof(CPURISCVState, gpr[a->rd]), >>> +    offsetof(CPURISCVState, gpr

Re: [PATCH 04/38] target/riscv: 16-bit Addition & Subtraction Instructions

2021-02-18 Thread Richard Henderson
On 2/18/21 12:47 AM, LIU Zhiwei wrote: > Do you mind  continue to review the other patches in v1? Or should I send a v2 > to fix current error at first? Yes, I can have a look through the others. r!

Re: [PATCH] virtiofs_submounts.py test: Note on vmlinuz param

2021-02-18 Thread Max Reitz
On 12.02.21 19:58, Cleber Rosa wrote: On Fri, Feb 12, 2021 at 04:16:49PM +0100, Max Reitz wrote: From the cancel message, it is not entirely clear why this parameter is mandatory now, or that it will be optional in the future. Add such a more detailed explanation as a comment in the test sourc

Re: [PATCH v2 1/6] hw/sd: sdhci: Don't transfer any data when command time out

2021-02-18 Thread Philippe Mathieu-Daudé
On 2/16/21 4:46 AM, Bin Meng wrote: > At the end of sdhci_send_command(), it starts a data transfer if the > command register indicates data is associated. But the data transfer > should only be initiated when the command execution has succeeded. > > With this fix, the following reproducer: > > o

[PULL v2 35/35] Hexagon build infrastructure

2021-02-18 Thread Richard Henderson
From: Taylor Simpson Add file to default-configs Add hexagon to meson.build Add hexagon to target/meson.build Add target/hexagon/meson.build Change scripts/qemu-binfmt-conf.sh We can build a hexagon-linux-user target and run programs on the Hexagon scalar core. With hexagon-linux-clang installe

Re: [PULL 0/2] Usb 20210218 patches

2021-02-18 Thread Peter Maydell
; > are available in the Git repository at: > > git://git.kraxel.org/qemu tags/usb-20210218-pull-request > > for you to fetch changes up to 6ba5a437ad48f10931592f649b5b7375968f362d: > > usb/pcap: set flag_setup (2021-02-17 14:29:12 +0100) > > -

Re: [PATCH v2 2/6] hw/sd: sdhci: Don't write to SDHC_SYSAD register when transfer is in progress

2021-02-18 Thread Philippe Mathieu-Daudé
On 2/16/21 4:46 AM, Bin Meng wrote: > Per "SD Host Controller Standard Specification Version 7.00" > chapter 2.2.1 SDMA System Address Register: > > This register can be accessed only if no transaction is executing > (i.e., after a transaction has stopped). > > With this fix, the following reprod

[PULL v2 00/35] hexagon initial commit

2021-02-18 Thread Richard Henderson
in the Git repository at: https://gitlab.com/rth7680/qemu.git tags/pull-hex-20210218 for you to fetch changes up to 3e7a84eeccc3b3a9b43c6dfb52bd98ea5acebf0a: Hexagon build infrastructure (2021-02-18 08:25:06 -0800) Initial comm

Re: [PATCH v2 3/5] target/sh4: Remove unused 'int access_type' argument

2021-02-18 Thread Richard Henderson
On 2/18/21 6:51 AM, Philippe Mathieu-Daudé wrote: > get_mmu_address() and get_physical_address() don't use their > 'int access_type' argument: remove it along with ACCESS_INT > in superh_cpu_tlb_fill(). > > Suggested-by: Richard Henderson > Signed-off-by: Philippe Mathieu-Daudé > --- > target/s

Re: [PATCH v2] qga: return a more explicit error on why a command is disabled

2021-02-18 Thread Markus Armbruster
marcandre.lur...@redhat.com writes: > From: Marc-André Lureau > > qmp_disable_command() now takes an enum for the reason, to be able > to give more explicit error messages. > > Fixes: > https://bugzilla.redhat.com/show_bug.cgi?id=1928806 > > Signed-off-by: Marc-André Lureau > --- > > v2: > - re

Re: [PATCH] virtio-iommu: Handle non power of 2 range invalidations

2021-02-18 Thread Peter Xu
Eric, On Thu, Feb 18, 2021 at 03:16:50PM +0100, Eric Auger wrote: > @@ -164,12 +166,27 @@ static void virtio_iommu_notify_unmap(IOMMUMemoryRegion > *mr, hwaddr virt_start, > > event.type = IOMMU_NOTIFIER_UNMAP; > event.entry.target_as = &address_space_memory; > -event.entry.addr_m

Re: [PATCH v2 4/6] hw/sd: sdhci: Simplify updating s->prnsts in sdhci_sdma_transfer_multi_blocks()

2021-02-18 Thread Philippe Mathieu-Daudé
On 2/16/21 4:46 AM, Bin Meng wrote: > s->prnsts is updated in both branches of the if () else () statement. > Move the common bits outside so that it is cleaner. > > Signed-off-by: Bin Meng > --- > > (no changes since v1) > > hw/sd/sdhci.c | 7 +++ > 1 file changed, 3 insertions(+), 4 dele

Re: [PATCH v2] qga: return a more explicit error on why a command is disabled

2021-02-18 Thread Marc-André Lureau
Hi On Thu, Feb 18, 2021 at 8:40 PM Markus Armbruster wrote: > marcandre.lur...@redhat.com writes: > > > From: Marc-André Lureau > > > > qmp_disable_command() now takes an enum for the reason, to be able > > to give more explicit error messages. > > > > Fixes: > > https://bugzilla.redhat.com/sho

Re: [PATCH v2 3/6] hw/sd: sdhci: Correctly set the controller status for ADMA

2021-02-18 Thread Philippe Mathieu-Daudé
On 2/16/21 4:46 AM, Bin Meng wrote: > When an ADMA transfer is started, the codes forget to set the > controller status to indicate a transfer is in progress. > > With this fix, the following 2 reproducers: > > https://paste.debian.net/plain/1185136 > https://paste.debian.net/plain/1185141 > > c

Re: [PATCH v2 1/6] hw/sd: sdhci: Don't transfer any data when command time out

2021-02-18 Thread Philippe Mathieu-Daudé
On 2/18/21 5:25 PM, Philippe Mathieu-Daudé wrote: > On 2/16/21 4:46 AM, Bin Meng wrote: >> At the end of sdhci_send_command(), it starts a data transfer if the >> command register indicates data is associated. But the data transfer >> should only be initiated when the command execution has succeede

Re: [RFC PATCH v3 05/31] hw/cxl/device: Implement basic mailbox (8.2.8.4)

2021-02-18 Thread Jonathan Cameron
On Wed, 17 Feb 2021 16:55:14 -0800 Ben Widawsky wrote: > On 21-02-11 17:46:39, Jonathan Cameron wrote: > > On Tue, 2 Feb 2021 14:58:30 + > > Jonathan Cameron wrote: > > > > > On Mon, 1 Feb 2021 16:59:22 -0800 > > > Ben Widawsky wrote: > > > > > > > This is the beginning of implementin

Re: [PATCH v2 5/6] hw/sd: sdhci: Limit block size only when SDHC_BLKSIZE register is writable

2021-02-18 Thread Philippe Mathieu-Daudé
On 2/16/21 4:46 AM, Bin Meng wrote: > The codes to limit the maximum block size is only necessary when > SDHC_BLKSIZE register is writable. > > Signed-off-by: Bin Meng > > --- > > Changes in v2: > - new patch: sdhci: Limit block size only when SDHC_BLKSIZE register is > writable > > hw/sd/sd

Re: [PATCH] virtio-iommu: Handle non power of 2 range invalidations

2021-02-18 Thread Auger Eric
Hi Peter, On 2/18/21 5:42 PM, Peter Xu wrote: > Eric, > > On Thu, Feb 18, 2021 at 03:16:50PM +0100, Eric Auger wrote: >> @@ -164,12 +166,27 @@ static void >> virtio_iommu_notify_unmap(IOMMUMemoryRegion *mr, hwaddr virt_start, >> >> event.type = IOMMU_NOTIFIER_UNMAP; >> event.entry.ta

[PATCH v20 03/17] accel: introduce new accessor functions

2021-02-18 Thread Claudio Fontana
avoid open coding the accesses to cpu->accel_cpu interfaces, and instead introduce: accel_cpu_instance_init, accel_cpu_realizefn to be used by the targets/ initfn code, and by cpu_exec_realizefn respectively. Signed-off-by: Claudio Fontana Reviewed-by: Alex Bennée --- include/qemu/accel.h | 1

[PATCH v20 17/17] i386: move cpu_load_efer into SOFTMMU-only section of cpu.h

2021-02-18 Thread Claudio Fontana
cpu_load_efer is now used only for softmmu code. Therefore, make this inline function not visible anymore in CONFIG_USER_ONLY builds. Signed-off-by: Claudio Fontana --- target/i386/cpu.h | 31 --- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/target

[PATCH v20 00/17] i386 cleanup PART 2

2021-02-18 Thread Claudio Fontana
Hi, just a respin with the latest state, a few improvements after the discussion with Paolo, and a rebase to latest master. Thanks, C. v19 -> v20: * add new patch to make gdbstub only write certain registers for softmmu. In particular, CR0, CR2, CR3 and EFER should not be changed under CON

[PATCH v20 01/17] i386: split cpu accelerators from cpu.c, using AccelCPUClass

2021-02-18 Thread Claudio Fontana
i386 is the first user of AccelCPUClass, allowing to split cpu.c into: cpu.ccpuid and common x86 cpu functionality host-cpu.c host x86 cpu functions and "host" cpu type kvm/kvm-cpu.cKVM x86 AccelCPUClass hvf/hvf-cpu.cHVF x86 AccelCPUClass tcg/tcg-cpu.cTCG x86 AccelCPU

[PATCH v20 02/17] cpu: call AccelCPUClass::cpu_realizefn in cpu_exec_realizefn

2021-02-18 Thread Claudio Fontana
move the call to accel_cpu->cpu_realizefn to the general cpu_exec_realizefn from target/i386, so it does not need to be called for every target explicitly as we enable more targets. Signed-off-by: Claudio Fontana Reviewed-by: Alex Bennée --- cpu.c | 6 ++ target/i386/cpu.c | 20

[PATCH v20 11/17] i386: split misc helper into user and softmmu parts

2021-02-18 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- target/i386/tcg/misc_helper.c | 463 -- target/i386/tcg/softmmu/misc_helper.c | 438 target/i386/tcg/user/misc_helper.c| 72 target/i386/tcg/softmmu/meson.build | 1 + target/i386/tcg/user/me

[PATCH v20 08/17] i386: split smm helper (softmmu)

2021-02-18 Thread Claudio Fontana
smm is only really useful for softmmu, split in two modules around the CONFIG_USER_ONLY, in order to remove the ifdef and use the build system instead. add cpu_abort() when detecting attempts to enter SMM mode via SMI interrupt in user-mode, and assert that the cpu is not in SMM mode while transla

[PATCH v20 06/17] meson: add target_user_arch

2021-02-18 Thread Claudio Fontana
the lack of target_user_arch makes it hard to fully leverage the build system in order to separate user code from softmmu code. Provide it, so that we can avoid the proliferation of #ifdef in target code. Signed-off-by: Claudio Fontana Reviewed-by: Alex Bennée --- meson.build

[PATCH v20 04/17] target/i386: fix host_cpu_adjust_phys_bits error handling

2021-02-18 Thread Claudio Fontana
move the check for phys_bits outside of host_cpu_adjust_phys_bits, because otherwise it is impossible to return an error condition explicitly. Signed-off-by: Claudio Fontana Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson --- target/i386/host-cpu.c

[PATCH v20 09/17] i386: split tcg excp_helper into softmmu and user parts

2021-02-18 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- target/i386/tcg/excp_helper.c | 572 -- target/i386/tcg/softmmu/excp_helper.c | 562 + target/i386/tcg/user/excp_helper.c| 39 ++ target/i386/tcg/softmmu/meson.build | 1 + target/i386/tcg/user/mes

[PATCH v20 07/17] i386: split off softmmu-only functionality in tcg-cpu

2021-02-18 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- target/i386/tcg/tcg-cpu.h | 24 + target/i386/tcg/softmmu/tcg-cpu.c | 83 + target/i386/tcg/tcg-cpu.c | 75 ++ target/i386/tcg/meson.build | 3 ++ target/i386/tcg/softmmu/

[PATCH v20 05/17] accel-cpu: make cpu_realizefn return a bool

2021-02-18 Thread Claudio Fontana
overall, all devices' realize functions take an Error **errp, but return void. hw/core/qdev.c code, which realizes devices, therefore does: local_err = NULL; dc->realize(dev, &local_err); if (local_err != NULL) { goto fail; } However, we can improve at least accel_cpu to return a meaningful

[PATCH v20 13/17] i386: split svm_helper into softmmu and stub-only user

2021-02-18 Thread Claudio Fontana
For now we just copy over the previous user stubs, but really, everything that requires s->cpl == 0 should be impossible to trigger from user-mode emulation. Later on we should add a check that asserts this easily f.e.: static bool check_cpl0(DisasContext *s) { int cpl = s->cpl; #ifdef CON

[PATCH v20 10/17] i386: move TCG btp_helper into softmmu/

2021-02-18 Thread Claudio Fontana
for user-mode, assert that the hidden IOBPT flags are not set while attempting to generate io_bpt helpers. Signed-off-by: Claudio Fontana Cc: Paolo Bonzini --- target/i386/helper.h | 7 + target/i386/tcg/helper-tcg.h | 3 + target/i386/tcg/bpt_helper.c | 276

[PATCH v20 12/17] i386: separate fpu_helper into user and softmmu parts

2021-02-18 Thread Claudio Fontana
Signed-off-by: Claudio Fontana Reviewed-by: Alex Bennée --- target/i386/cpu.h| 3 ++ target/i386/tcg/fpu_helper.c | 65 +--- target/i386/tcg/softmmu/fpu_helper.c | 58 + target/i386/tcg/user/fpu_helper.c| 42 +++

[PATCH v20 16/17] i386: gdbstub: only write CR0/CR2/CR3/EFER for SOFTMMU

2021-02-18 Thread Claudio Fontana
Signed-off-by: Claudio Fontana Cc: Paolo Bonzini --- target/i386/gdbstub.c | 16 1 file changed, 16 insertions(+) diff --git a/target/i386/gdbstub.c b/target/i386/gdbstub.c index 41e265fc67..9f505d6ee3 100644 --- a/target/i386/gdbstub.c +++ b/target/i386/gdbstub.c @@ -383,26 +3

[PATCH v20 14/17] i386: split seg_helper into user-only and softmmu parts

2021-02-18 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- target/i386/tcg/helper-tcg.h | 5 + target/i386/tcg/seg_helper.h | 66 target/i386/tcg/seg_helper.c | 233 +-- target/i386/tcg/softmmu/seg_helper.c | 125 ++ target/i386/tcg/user/seg_helper.

Re: [PATCH v2 33/42] esp: defer command completion interrupt on incoming data transfers

2021-02-18 Thread Mark Cave-Ayland
On 09/02/2021 19:30, Mark Cave-Ayland wrote: The MacOS toolbox ROM issues a command to the ESP controller as part of its "FAST" SCSI routines and then proceeds to read the incoming data soon after receiving the command completion interrupt. Unfortunately due to SCSI block transfers being asynch

[PATCH v20 15/17] i386: split off softmmu part of cpu.c

2021-02-18 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- target/i386/cpu-internal.h | 70 +++ target/i386/cpu-softmmu.c | 352 ++ target/i386/cpu.c | 383 + target/i386/meson.build| 1 + 4 files changed, 428 insertions(+), 378 del

[PATCH] meson: Re-enable the possibility to run "make check SPEED=slow"

2021-02-18 Thread Thomas Huth
"make check SPEED=slow" got lost in the conversion of the build system to meson - the tests were always running in "quick" mode. Fix it by passing the "-m" parameter to the test harness at the right spot in scripts/mtest2make.py. Signed-off-by: Thomas Huth --- scripts/mtest2make.py | 2 +- 1 fil

Re: [PATCH v20 00/17] i386 cleanup PART 2

2021-02-18 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210218172156.25520-1-cfont...@suse.de/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210218172156.25520-1-cfont...@suse.de Subject: [PATCH v20 00/17] i386 cleanup PART 2 === T

Re: [PATCH] virtio-iommu: Handle non power of 2 range invalidations

2021-02-18 Thread Peter Xu
On Thu, Feb 18, 2021 at 06:18:22PM +0100, Auger Eric wrote: > Hi Peter, > > On 2/18/21 5:42 PM, Peter Xu wrote: > > Eric, > > > > On Thu, Feb 18, 2021 at 03:16:50PM +0100, Eric Auger wrote: > >> @@ -164,12 +166,27 @@ static void > >> virtio_iommu_notify_unmap(IOMMUMemoryRegion *mr, hwaddr virt_s

Re: [PATCH 06/24] DAX: virtio-fs: Add cache BAR

2021-02-18 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@redhat.com) wrote: > On Tue, Feb 09, 2021 at 07:02:06PM +, Dr. David Alan Gilbert (git) wrote: > > @@ -46,6 +51,26 @@ static void vhost_user_fs_pci_realize(VirtIOPCIProxy > > *vpci_dev, Error **errp) > > } > > > > qdev_realize(vdev, BUS(&vpci_dev->bus),

Re: [Rust-VMM] Call for Google Summer of Code 2021 project ideas

2021-02-18 Thread Stefan Hajnoczi
On Thu, Feb 18, 2021 at 11:50 AM Andreea Florescu wrote: > On 2/17/21 1:20 PM, Stefan Hajnoczi wrote: > > CAUTION: This email originated from outside of the organization. Do not > > click links or open attachments unless you can confirm the sender and know > > the content is safe. > > > > > > >

Re: [PATCH v4 07/24] python: add directory structure README.rst files

2021-02-18 Thread John Snow
On 2/16/21 9:47 PM, Cleber Rosa wrote: On Thu, Feb 11, 2021 at 01:58:39PM -0500, John Snow wrote: Add short readmes to python/, python/qemu/, python/qemu/machine, python/qemu/qmp, and python/qemu/utils that explain the directory hierarchy. These readmes are visible when browsing the source on e.

Re: [PATCH] meson: Re-enable the possibility to run "make check SPEED=slow"

2021-02-18 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210218172313.2217440-1-th...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210218172313.2217440-1-th...@redhat.com Subject: [PATCH] meson: Re-enable the possibility

[PATCH 1/1] css: SCHIB measurement block origin must be aligned

2021-02-18 Thread Pierre Morel
The Measurement Block Origin inside the SCHIB is used when Mesurement Block format 1 is in used and must be aligned on 128bits. Signed-off-by: Pierre Morel --- target/s390x/ioinst.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/target/s390x/ioinst.c b/target/s390x/ioinst.c index a412

[PATCH 0/1] css: SCHIB measurement block origin must be aligned

2021-02-18 Thread Pierre Morel
Hi, By testing Measurement with KVM unit tests I fall on this: we forgot to test the alignment of the MBO for measurement format 1. The MB must be aligned on 128bits otherwise an operand exception is recognized. Regards, Pierre Pierre Morel (1): css: SCHIB measurement block origin must be ali

Re: [PATCH v2 5/6] hw/sd: sdhci: Limit block size only when SDHC_BLKSIZE register is writable

2021-02-18 Thread Philippe Mathieu-Daudé
On 2/18/21 6:09 PM, Philippe Mathieu-Daudé wrote: > On 2/16/21 4:46 AM, Bin Meng wrote: >> The codes to limit the maximum block size is only necessary when >> SDHC_BLKSIZE register is writable. Per "SD Command Generation": The Host Driver should not read the SDMA System Address, Block Size an

Re: [PATCH v2 6/6] hw/sd: sdhci: Reset the data pointer of s->fifo_buffer[] when a different block size is programmed

2021-02-18 Thread Philippe Mathieu-Daudé
Hi Bin, On 2/16/21 4:46 AM, Bin Meng wrote: > If the block size is programmed to a different value from the > previous one, reset the data pointer of s->fifo_buffer[] so that > s->fifo_buffer[] can be filled in using the new block size in > the next transfer. > > With this fix, the following repr

Re: [PATCH] virtio-iommu: Handle non power of 2 range invalidations

2021-02-18 Thread Auger Eric
Hi Peter, On 2/18/21 6:48 PM, Peter Xu wrote: > On Thu, Feb 18, 2021 at 06:18:22PM +0100, Auger Eric wrote: >> Hi Peter, >> >> On 2/18/21 5:42 PM, Peter Xu wrote: >>> Eric, >>> >>> On Thu, Feb 18, 2021 at 03:16:50PM +0100, Eric Auger wrote: @@ -164,12 +166,27 @@ static void virtio_iommu

[PATCH] hw/sd/sdhci: Report error when guest access protected registers

2021-02-18 Thread Philippe Mathieu-Daudé
The SDHC_SYSAD and SDHC_BLKSIZE can not be accessed while a transaction is in progress, see 'SD Host Controller Simplified Specification' 1.5) SD Command Generation The Host Driver should not read the SDMA System Address, Block Size and Block Count registers during a data transaction unless

Re: [PATCH] meson: Re-enable the possibility to run "make check SPEED=slow"

2021-02-18 Thread Paolo Bonzini
On 18/02/21 18:23, Thomas Huth wrote: "make check SPEED=slow" got lost in the conversion of the build system to meson - the tests were always running in "quick" mode. Fix it by passing the "-m" parameter to the test harness at the right spot in scripts/mtest2make.py. Signed-off-by: Thomas Huth

Re: [PATCH 1/1] hw/s390x: modularize virtio-gpu-ccw

2021-02-18 Thread Halil Pasic
On Thu, 18 Feb 2021 14:38:20 +0100 Gerd Hoffmann wrote: > Hi, > > > > The explanation is simple. Unlike most devices, the ccw devices aren't > > > portable. In particular both css.c and css.h includes "cpu.h", and > > > virtio-ccw-gpu.c includes "qemu/osdep.h". Furthermore osdep.h contains: >

Re: [PATCH v2 2/6] hw/sd: sdhci: Don't write to SDHC_SYSAD register when transfer is in progress

2021-02-18 Thread Philippe Mathieu-Daudé
On 2/16/21 4:46 AM, Bin Meng wrote: > Per "SD Host Controller Standard Specification Version 7.00" > chapter 2.2.1 SDMA System Address Register: > > This register can be accessed only if no transaction is executing > (i.e., after a transaction has stopped). > > With this fix, the following reprod

Re: [PATCH 1/1] hw/s390x: modularize virtio-gpu-ccw

2021-02-18 Thread Halil Pasic
On Thu, 18 Feb 2021 15:44:47 +0100 Thomas Huth wrote: > On 18/02/2021 11.34, Halil Pasic wrote: > > On Thu, 18 Feb 2021 10:23:16 +0100 > > Thomas Huth wrote: > > > >>> Since the virtio-gpu-ccw device depends on the hw-display-virtio-gpu > >>> module, which provides the type virtio-gpu-device,

Re: [PATCH RESEND] hostmem: Don't report pmem attribute if unsupported

2021-02-18 Thread John Snow
On 2/17/21 2:31 AM, Michal Privoznik wrote: On 2/17/21 12:07 AM, John Snow wrote: On 2/16/21 5:23 PM, Eduardo Habkost wrote: On Tue, Jan 26, 2021 at 08:48:25AM +0100, Michal Privoznik wrote: When management applications (like Libvirt) want to check whether memory-backend-file.pmem is supported

Re: [RFC v2 5/7] vhost: Add x-vhost-enable-shadow-vq qmp

2021-02-18 Thread Eugenio Perez Martin
On Wed, Feb 17, 2021 at 7:47 PM Eugenio Perez Martin wrote: > > On Wed, Feb 17, 2021 at 4:26 PM Stefan Hajnoczi wrote: > > > > On Tue, Feb 09, 2021 at 04:37:55PM +0100, Eugenio Pérez wrote: > > > diff --git a/qapi/net.json b/qapi/net.json > > > index c31748c87f..a1cdffb0f9 100644 > > > --- a/qapi

Re: [PATCH v2] Correct CRIS TCG register lifetime management

2021-02-18 Thread Stefan Sandström
Hi, Thanks for the feedback! I've posted a new patch which should address this feedback. And, it seems like I've managed to get the patch mailing right at last. Thanks, -stefan > On 18 Feb 2021, at 19:43, Stefan Sandström wrote: > > From: Stefan Sandstrom > > Add and fix deallocation of te

Re: [PATCH] virtio-ccw: commands on revision-less devices

2021-02-18 Thread Halil Pasic
On Thu, 18 Feb 2021 14:51:09 +0100 Cornelia Huck wrote: > On Wed, 17 Feb 2021 15:39:36 +0100 > Halil Pasic wrote: > > > On Tue, 16 Feb 2021 16:54:05 +0100 > > Cornelia Huck wrote: > > > > > On Tue, 16 Feb 2021 15:19:45 +0100 [..] > > > > Exactly, so the legacy stuff is not normative, and s

Re: [PATCH v6 14/19] qapi/introspect.py: add type hint annotations

2021-02-18 Thread Markus Armbruster
John Snow writes: > NB: The type aliases (SchemaInfo et al) declare intent for some of the > "dictly-typed" objects we pass around in introspect.py. They do not > enforce the shape of those objects, and cannot, until Python 3.7 or > later. (And even then, it may not be "worth it".) > > Signed-off

Re: [PATCH v6 14/19] qapi/introspect.py: add type hint annotations

2021-02-18 Thread Markus Armbruster
Markus Armbruster writes: > John Snow writes: > >> NB: The type aliases (SchemaInfo et al) declare intent for some of the >> "dictly-typed" objects we pass around in introspect.py. They do not >> enforce the shape of those objects, and cannot, until Python 3.7 or >> later. (And even then, it may

Re: [PATCH v2.1 1/3] virtiofsd: Add an option to enable/disable posix acls

2021-02-18 Thread Vivek Goyal
fuse has an option FUSE_POSIX_ACL which needs to be opted in by fuse server to enable posix acls. Add virtiofsd option "-o posix_acl/no_posix_acl" to let users enable/disable posix acl support. By default it is disabled as of now. Currently even if file server has not opted in for FUSE_POSIX_ACL

Re: [RFC PATCH v2 1/2] Basic PCIe DOE support

2021-02-18 Thread Jonathan Cameron
On Fri, 12 Feb 2021 16:58:21 -0500 Chris Browy wrote: > > On Feb 12, 2021, at 11:24 AM, Jonathan Cameron > > wrote: > > > > On Tue, 9 Feb 2021 15:35:49 -0500 > > Chris Browy wrote: > > > > Run ./scripts/checkpatch.pl over the patches and fix all the warnings before > > posting. It will save

Re: [RFC v2 2/2] Basic CXL DOE for CDAT and Compliance Mode

2021-02-18 Thread Jonathan Cameron
On Fri, 12 Feb 2021 17:26:50 -0500 Chris Browy wrote: > > On Feb 12, 2021, at 12:23 PM, Jonathan Cameron > > wrote: > > > > On Tue, 9 Feb 2021 15:36:03 -0500 > > Chris Browy wrote: > > > > Split this into two patches for v3. CDAT in one, compliance mode in the > > other. > > > > Compli

[PATCH v2] Correct CRIS TCG register lifetime management

2021-02-18 Thread Stefan Sandström
From: Stefan Sandstrom Add and fix deallocation of temporary TCG registers in CRIS code generation. Change-Id: I17fce5d95bdc4418337ba885d53ba97afb1bafcc Signed-off-by: Stefan Sandstrom --- target/cris/translate.c | 132 target/cris/translate_v10

[PATCH v5 01/25] python/console_socket: avoid one-letter variable

2021-02-18 Thread John Snow
Fixes pylint warnings. Signed-off-by: John Snow Reviewed-by: Cleber Rosa --- python/qemu/console_socket.py | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/python/qemu/console_socket.py b/python/qemu/console_socket.py index ac21130e446..87237bebef7 100644 --- a/pyt

[PATCH v5 02/25] iotests/297: add --namespace-packages to mypy arguments

2021-02-18 Thread John Snow
mypy is kind of weird about how it handles imports. For legacy reasons, it won't load PEP 420 namespaces, because of logic implemented prior to that becoming a standard. So, if you plan on using any, you have to pass --namespace-packages. Alright, fine. Signed-off-by: John Snow Reviewed-by: Cleb

[PATCH v5 14/25] python: Add flake8 to pipenv

2021-02-18 Thread John Snow
flake8 3.5.x does not support the --extend-ignore syntax used in the .flake8 file to gracefully extend default ignores, so 3.6.x is our minimum requirement. There is no known upper bound. flake8 can be run from the python/ directory with no arguments. Signed-off-by: John Snow Reviewed-by: Cleber

[PATCH v5 07/25] python: add directory structure README.rst files

2021-02-18 Thread John Snow
Add short readmes to python/, python/qemu/, python/qemu/machine, python/qemu/qmp, and python/qemu/utils that explain the directory hierarchy. These readmes are visible when browsing the source on e.g. gitlab/github and are designed to help new developers/users quickly make sense of the source tree.

[PATCH v5 00/25] python: create installable package

2021-02-18 Thread John Snow
This series factors the python/qemu directory as an installable package. It does not yet actually change the mechanics of how any other python source in the tree actually consumes it (yet), beyond the import path. (some import statements change in a few places.) git: https://gitlab.com/jsnow/qemu/

[PATCH v5 03/25] python: create qemu packages

2021-02-18 Thread John Snow
move python/qemu/*.py to python/qemu/[machine, qmp]/*.py and update import directives across the tree. This is done to create a PEP420 namespace package, in which we may create subpackages. To do this, the namespace directory ("qemu") should not have any modules in it. Those files will go into new

[PATCH v5 18/25] python/qemu: add isort to pipenv

2021-02-18 Thread John Snow
isort 5.0.0 through 5.0.4 has a bug that causes it to misinterpret certain "from ..." clauses that are not related to imports. Require 5.0.5 or greater. isort can be run with 'isort -c qemu' from the python root. Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Cleber

[PATCH v5 09/25] python: add pylint import exceptions

2021-02-18 Thread John Snow
Pylint 2.5.x and 2.6.x have regressions that make import checking inconsistent, see: https://github.com/PyCQA/pylint/issues/3609 https://github.com/PyCQA/pylint/issues/3624 https://github.com/PyCQA/pylint/issues/3651 Pinning to 2.4.4 is worse, because it mandates versions of shared dependencies t

[PATCH v5 04/25] python: create utils sub-package

2021-02-18 Thread John Snow
Create a space for miscellaneous things that don't belong strictly in "qemu.machine" nor "qemu.qmp" packages. Signed-off-by: John Snow --- python/qemu/machine/__init__.py | 8 python/qemu/utils/__init__.py | 23 +++ python/qemu/{machine => util

[PATCH v5 23/25] python: add .gitignore

2021-02-18 Thread John Snow
Ignore *Python* build and package output (build, dist, qemu.egg-info); these files are not created as part of a QEMU build. Ignore miscellaneous cached python confetti (__pycache__, *.pyc, .mypy_cache). Ignore .idea (pycharm) and .venv (pipenv et al). Signed-off-by: John Snow --- python/.gitig

[PATCH v5 05/25] python: add qemu package installer

2021-02-18 Thread John Snow
Add setup.cfg and setup.py, necessary for installing a package via pip. Add a ReST document (PACKAGE.rst) explaining the basics of what this package is for and who to contact for more information. This document will be used as the landing page for the package on PyPI. I am not yet using a pyprojec

[PATCH v5 08/25] python: Add pipenv support

2021-02-18 Thread John Snow
pipenv is a tool used for managing virtual environments with pinned, explicit dependencies. It is used for precisely recreating python virtual environments. pipenv uses two files to do this: (1) Pipfile, which is similar in purpose and scope to what setup.py lists. It specifies the requisite mini

[PATCH v5 06/25] python: add VERSION file

2021-02-18 Thread John Snow
Python infrastructure as it exists today is not capable reliably of single-sourcing a package version from a parent directory. The authors of pip are working to correct this, but as of today this is not possible. The problem is that when using pip to build and install a python package, it copies f

[PATCH v5 12/25] python: move flake8 config to setup.cfg

2021-02-18 Thread John Snow
Update the comment concerning the flake8 exception to match commit 42c0dd12, whose commit message stated: A note on the flake8 exception: flake8 will warn on *any* bare except, but pylint's is context-aware and will suppress the warning if you re-raise the exception. Signed-off-by: John Snow Rev

[PATCH v5 10/25] python: move pylintrc into setup.cfg

2021-02-18 Thread John Snow
Delete the empty settings now that it's sharing a home with settings for other tools. pylint can now be run from this folder as "pylint qemu". Signed-off-by: John Snow Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa --- python/qemu/machine/pylintrc | 58 p

[PATCH v5 11/25] python: add pylint to pipenv

2021-02-18 Thread John Snow
We are specifying >= pylint 2.6.x for two reasons: 1. For setup.cfg support, added in pylint 2.5.x 2. To clarify that we are using a version that has incompatibly dropped bad-whitespace checks. Signed-off-by: John Snow Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa --- python/Pipfile |

[PATCH v5 17/25] python: move .isort.cfg into setup.cfg

2021-02-18 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Cleber Rosa --- python/.isort.cfg | 7 --- python/setup.cfg | 8 2 files changed, 8 insertions(+), 7 deletions(-) delete mode 100644 python/.isort.cfg diff --git a/python/.isort.cfg b/python/.isort.cfg deleted file mode 100644 index 6d0fd6cc0

[PATCH v5 15/25] python: move mypy.ini into setup.cfg

2021-02-18 Thread John Snow
mypy supports reading its configuration values from a central project configuration file; do so. Signed-off-by: John Snow --- python/mypy.ini | 4 python/setup.cfg | 5 + 2 files changed, 5 insertions(+), 4 deletions(-) delete mode 100644 python/mypy.ini diff --git a/python/mypy.ini

[PATCH v5 13/25] python: add excluded dirs to flake8 config

2021-02-18 Thread John Snow
Instruct flake8 to avoid certain well-known directories created by python tooling that it ought not check. Note that at-present, nothing actually creates a ".venv" directory; but it is in such widespread usage as a de-facto location for a developer's virtual environment that it should be excluded

[PATCH v5 19/25] python/qemu: add qemu package itself to pipenv

2021-02-18 Thread John Snow
This adds the python qemu packages themselves to the pipenv manifest. 'pipenv sync' will create a virtual environment sufficient to use the SDK. 'pipenv sync --dev' will create a virtual environment sufficient to use and test the SDK (with pylint, mypy, isort, flake8, etc.) The qemu packages are i

[PATCH v5 16/25] python: add mypy to pipenv

2021-02-18 Thread John Snow
0.730 appears to be about the oldest version that works with the features we want, including nice human readable output (to make sure iotest 297 passes), and type-parameterized Popen generics. 0.770, however, supports adding 'strict' to the config file, so require at least 0.770. Now that we are

[PATCH v5 25/25] python: add 'make develop' target

2021-02-18 Thread John Snow
Add a shortcut that canonizes the runes needed to get both the linting pre-requisites (the "[devel]" part), and the editable live-install (the "-e" part) of these python libraries. Signed-off-by: John Snow --- python/Makefile | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff -

[PATCH v5 20/25] python: add devel package requirements to setuptools

2021-02-18 Thread John Snow
setuptools doesn't have a formal understanding of development requires, but it has an optional feataures section. Fine; add a "devel" feature and add the requirements to it. To avoid duplication, we can modify pipenv to install qemu[devel] instead. This enables us to run invocations like "pip inst

Re: [PATCH 0/3] virtio-net: graceful drop of vhost for TAP

2021-02-18 Thread Yuri Benditovich
On Thu, Feb 18, 2021 at 11:35 AM Daniel P. Berrangé wrote: > On Wed, Feb 10, 2021 at 02:19:59PM +0800, Jason Wang wrote: > > > > On 2021/2/9 下午11:04, Michael S. Tsirkin wrote: > > > On Tue, Feb 09, 2021 at 02:51:05PM +, Daniel P. Berrangé wrote: > > > > On Tue, Feb 09, 2021 at 09:34:20AM -050

[PATCH v5 21/25] python: add pytest and tests

2021-02-18 Thread John Snow
Try using pytest to manage our various tests; even though right now they're only invoking binaries and not really running any python-native code. Create tests/, and add test_lint.py which calls out to mypy, flake8, pylint and isort to enforce the standards in this directory. Add pytest to the set

[PATCH v5 22/25] python: add Makefile for some common tasks

2021-02-18 Thread John Snow
Add "make venv" to create the pipenv-managed virtual environment that contains our explicitly pinned dependencies. Add "make check" to run the python linters [in the host execution environment]. Add "make venv-check" which combines the above two: create/update the venv, then run the linters in th

[PATCH v5 24/25] gitlab: add python linters to CI

2021-02-18 Thread John Snow
Add python3.6 to the fedora container image: we need it to run the linters against that explicit version to make sure we don't break our minimum version promise. Add pipenv so that we can fetch precise versions of pip packages we need to guarantee test reproducability. Signed-off-by: John Snow -

Re: [PATCH v2] Correct CRIS TCG register lifetime management

2021-02-18 Thread Stefan Sandström
> On 18 Feb 2021, at 20:59, Philippe Mathieu-Daudé wrote: > > Hi Stefan, > >> On 2/18/21 7:43 PM, Stefan Sandström wrote: >> From: Stefan Sandstrom >> >> Add and fix deallocation of temporary TCG registers in CRIS code >> generation. > > What did you run to figure this out? Hi Philippe,

Re: [PATCH v2] Correct CRIS TCG register lifetime management

2021-02-18 Thread Philippe Mathieu-Daudé
Hi Stefan, On 2/18/21 7:43 PM, Stefan Sandström wrote: > From: Stefan Sandstrom > > Add and fix deallocation of temporary TCG registers in CRIS code > generation. What did you run to figure this out? > Change-Id: I17fce5d95bdc4418337ba885d53ba97afb1bafcc > Signed-off-by: Stefan Sandstrom > --

Re: [PULL v2 00/35] hexagon initial commit

2021-02-18 Thread Peter Maydell
d/tags/pull-plugin-updates-180221-1' into staging (2021-02-18 > 13:27:03 +) > > are available in the Git repository at: > > https://gitlab.com/rth7680/qemu.git tags/pull-hex-20210218 > > for you to fetch changes up to 3e7a84eeccc3b3a9b43c6dfb52bd98ea5acebf0a:

[PATCH 2/5] block: Fix BDRV_BLOCK_RAW status to honor alignment

2021-02-18 Thread Eric Blake
Previous patches mentioned how the blkdebug filter driver demonstrates a bug present in our NBD server (for example, commit b0245d64); the bug is also present with the raw format driver when probing occurs. Basically, if we specify a particular alignment > 1, but defer the actual block status to th

[PATCH 1/5] iotests: Update 241 to expose backing layer fragmentation

2021-02-18 Thread Eric Blake
Previous commits (such as 6e280648, 75d34eb9) have mentioned that our NBD server still sends unaligned fragments when an active layer with large advertised minimum block size is backed by another layer with a smaller block size. Expand the test to actually cover these scenario, by using two differe

[PATCH 0/5] Obey NBD spec regarding block size bounds on reply

2021-02-18 Thread Eric Blake
We've had some known long-standing compliance bugs in our NBD server not always honoring a minimum block size in its response to client requests, when dealing with an image with a large block size backed by another image with a smaller block size (for example, an encrypted qcow2 image has a minimum

[PATCH v4 2/4] util/qemu-sockets.c: Split host:port parsing out of inet_parse

2021-02-18 Thread Doug Evans via
The parsing is moved into new function inet_parse_host_and_port. This is done in preparation for using the function in net/slirp.c. Signed-off-by: Doug Evans --- Changes from v3: - this patch is new in v4 - provides new utility: inet_parse_host_and_port, updates inet_parse to use it incl

[PATCH 4/5] nbd/server: Avoid unaligned dirty-bitmap status

2021-02-18 Thread Eric Blake
The NBD spec requires that responses to NBD_CMD_BLOCK_STATUS be aligned to the server's advertised min_block alignment, if the client agreed to abide by alignments. In general, since dirty bitmap granularity cannot go below 512, and it is hard to provoke qcow2 to go above an alignment of 512, this

[PATCH 3/5] nbd/server: Avoid unaligned read/block_status from backing

2021-02-18 Thread Eric Blake
The NBD server code used bdrv_block_status_above() to determine where to fragment structured read and block status replies, and similarly used bdrv_is_allocated_above() for the qemu:allocation-depth context. However, the protocol can only advertise the active layer's minimum block size; if the acti

<    1   2   3   >