Re: [PATCH RESEND v8 2/6] [RISCV_PM] Support CSRs required for RISC-V PM extension except for the h-mode

2021-05-11 Thread Alistair Francis
On Wed, Apr 28, 2021 at 2:19 PM Alexey Baturo wrote: > > Signed-off-by: Alexey Baturo > --- > resend: > minor codestyle fix > > target/riscv/cpu.c | 5 + > target/riscv/cpu.h | 12 ++ > target/riscv/cpu_bits.h | 66 +++ > target/riscv/csr.c | 240

[PATCH v2 6/6] gitlab-ci: Add FreeBSD jobs

2021-05-11 Thread Philippe Mathieu-Daudé
Add system/user emulation jobs on FreeBSD host. To build these jobs, you need to add a FreeBSD runner and add 'freebsd' to the QEMU_CUSTOM_RUNNER variable in your GitLab project. Signed-off-by: Philippe Mathieu-Daudé --- .gitlab-ci.d/buildtest-freebsd.yml | 59 ++

[PATCH v2 4/6] gitlab-ci: Add ccache in $PATH and display statistics

2021-05-11 Thread Philippe Mathieu-Daudé
If a runner has ccache installed, use it and display statistics at the end of the build. Signed-off-by: Philippe Mathieu-Daudé --- .gitlab-ci.d/buildtest-template.yml | 5 + 1 file changed, 5 insertions(+) diff --git a/.gitlab-ci.d/buildtest-template.yml

Re: [PATCH] configure: Only clone softfloat-3 repositories if TCG is enabled

2021-05-11 Thread Philippe Mathieu-Daudé
On 5/12/21 7:12 AM, Thomas Huth wrote: > On 12/05/2021 06.58, Philippe Mathieu-Daudé wrote: >> Signed-off-by: Philippe Mathieu-Daudé >> --- >>   configure | 7 +-- >>   1 file changed, 5 insertions(+), 2 deletions(-) >> >> diff --git a/configure b/configure >> index 5877a6b2bfe..e0e02623e3e

[PATCH v2 5/6] gitlab-ci: Simplify before/after script for Avocado based jobs

2021-05-11 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- .gitlab-ci.d/buildtest-template.yml | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.d/buildtest-template.yml b/.gitlab-ci.d/buildtest-template.yml index a625c697d3b..f968fa1ad99 100644 ---

[PATCH v2 3/6] gitlab-ci: Run GNU make via the $MAKE variable

2021-05-11 Thread Philippe Mathieu-Daudé
Add the $MAKE variable to call GNU make, and set it to 'gmake' on FreeBSD to avoid: $ make -j"$JOBS" make: Unknown modifier ',' make: "/builds/dTyar424/0/qemu/build/Makefile" line 3: Need an operator make: "/builds/dTyar424/0/qemu/build/Makefile" line 4: Missing dependency operator

[PATCH v2 2/6] gitlab-ci: Adapt JOBS variable for FreeBSD runners

2021-05-11 Thread Philippe Mathieu-Daudé
'nproc' is not available on FreeBSD: $ JOBS=$(expr $(nproc) + 1) bash: line 119: nproc: command not found expr: syntax error Instead, use 'sysctl -n hw.ncpu'. Signed-off-by: Philippe Mathieu-Daudé --- .gitlab-ci.d/buildtest-template.yml | 12 +++- 1 file changed, 11

[PATCH v2 1/6] gitlab-ci: Extract _variables template

2021-05-11 Thread Philippe Mathieu-Daudé
To be able to set the same environment variables to multiple jobs, extract what we currently have as a template. Signed-off-by: Philippe Mathieu-Daudé --- .gitlab-ci.d/buildtest-template.yml | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git

[PATCH v2 0/6] gitlab-ci: Allow using FreeBSD runners

2021-05-11 Thread Philippe Mathieu-Daudé
Minor shell fixes to use FreeBSD runners. Since v1: - share the FreeBSD jobs, restricted with QEMU_CUSTOM_RUNNER=freebsd so mergeable in mainstream. Jobs: https://gitlab.com/philmd/qemu/-/pipelines/301361673 Based-on: <20210511072952.2813358-1-f4...@amsat.org> gitlab-ci: Ease forks pipeline

Re: [RFC PATCH 1/5] hw/mem/nvdimm: Use Kconfig 'imply' instead of 'depends on'

2021-05-11 Thread Thomas Huth
On 12/05/2021 07.08, Philippe Mathieu-Daudé wrote: On 5/12/21 6:53 AM, Thomas Huth wrote: On 12/05/2021 05.57, Philippe Mathieu-Daudé wrote: On 5/12/21 4:24 AM, David Gibson wrote: On Tue, May 11, 2021 at 05:53:50PM +0200, Philippe Mathieu-Daudé wrote: Per the kconfig.rst:    A device

[Bug 1899539] Re: keyboard errors in DOS, found links to similar errors for reference

2021-05-11 Thread Thomas Huth
Hmm, you likely need the whole patch series, and not only a single patch... If you've got a git checkout and b4 installed, you could try: b4 am a898b0d5-7086-9699-ae8b-9524ad319...@t-online.de git am ./v2_20210507_vr_qemu_ps_2_controller_related_fixes.mbx Otherwise it's maybe easier to wait

Re: [PATCH] configure: Only clone softfloat-3 repositories if TCG is enabled

2021-05-11 Thread Thomas Huth
On 12/05/2021 06.58, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- configure | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 5877a6b2bfe..e0e02623e3e 100755 --- a/configure +++ b/configure @@ -257,8 +257,6 @@ if

[Bug 1883729] Re: xhci_find_stream: Assertion `streamid != 0' failed.

2021-05-11 Thread Thomas Huth
Ok, with the new attachment from comment #5, I can also reporoduce the bug again. It does not reproduce with the attachments from comment #1 or #2 anymore, so this now seems to be a different way to run into this assert. Anyway, setting the status back to Confirmed since it is reproducible again.

[Bug 1883728] Re: address_space_unmap: Assertion `mr != NULL' failed.

2021-05-11 Thread Thomas Huth
Ok, thanks for checking! So seems like this has been fixed, thus I'm closing the bug. If it happens again, please open a new ticket in our new gitlab issue tracker. ** Changed in: qemu Status: Incomplete => Fix Released -- You received this bug notification because you are a member of

Re: [PATCH v8] introduce vfio-user protocol specification

2021-05-11 Thread John Johnson
> On May 10, 2021, at 3:25 PM, John Levon wrote: > > On Mon, May 10, 2021 at 05:57:37PM +0100, Stefan Hajnoczi wrote: > > >>> +VFIO_USER_VM_INTERRUPT >>> +-- >>> + >>> +Message format >>> +^^ >>> + >>> ++++ >>> +| Name

Re: [RFC PATCH 1/5] hw/mem/nvdimm: Use Kconfig 'imply' instead of 'depends on'

2021-05-11 Thread Philippe Mathieu-Daudé
On 5/12/21 6:53 AM, Thomas Huth wrote: > On 12/05/2021 05.57, Philippe Mathieu-Daudé wrote: >> On 5/12/21 4:24 AM, David Gibson wrote: >>> On Tue, May 11, 2021 at 05:53:50PM +0200, Philippe Mathieu-Daudé wrote: Per the kconfig.rst:    A device should be listed [...] ``imply`` if

Re: [PATCH 1/1] gitlab-ci: Add KVM x86 cross-build jobs

2021-05-11 Thread Philippe Mathieu-Daudé
On 5/12/21 6:57 AM, Thomas Huth wrote: > On 12/05/2021 06.42, Philippe Mathieu-Daudé wrote: >> Add a new job to cross-build the x86 target without the >> TCG/XEN accelerators (IOW: only KVM accelerator enabled). >> >> Signed-off-by: Philippe Mathieu-Daudé >> --- >>   .gitlab-ci.d/crossbuilds.yml

[PATCH] configure: Only clone softfloat-3 repositories if TCG is enabled

2021-05-11 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- configure | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 5877a6b2bfe..e0e02623e3e 100755 --- a/configure +++ b/configure @@ -257,8 +257,6 @@ if test -e "$source_path/.git" then

Re: [PATCH 1/1] gitlab-ci: Add KVM x86 cross-build jobs

2021-05-11 Thread Thomas Huth
On 12/05/2021 06.42, Philippe Mathieu-Daudé wrote: Add a new job to cross-build the x86 target without the TCG/XEN accelerators (IOW: only KVM accelerator enabled). Signed-off-by: Philippe Mathieu-Daudé --- .gitlab-ci.d/crossbuilds.yml | 8 1 file changed, 8 insertions(+) diff

Re: [PATCH v2 29/30] cirrus.yml: Fix the MSYS2 task

2021-05-11 Thread Yonggang Luo
Reviewed-by: Yonggang Luo On Tue, May 4, 2021 at 6:09 PM Alex Bennée wrote: > > From: Thomas Huth > > The MSYS2 task in the Cirrus-CI is currently failing with error messages > like this: > > warning: database file for 'ucrt64' does not exist (use '-Sy' to download) > :: Starting core system

Re: [PATCH v2 29/30] cirrus.yml: Fix the MSYS2 task

2021-05-11 Thread Yonggang Luo
LGTM, Thanks, forget to update this On Wed, May 12, 2021 at 12:49 PM Philippe Mathieu-Daudé wrote: > Hi Yonggang Luo, > > Does this look OK to you? > > On 5/4/21 12:02 PM, Alex Bennée wrote: > > From: Thomas Huth > > > > The MSYS2 task in the Cirrus-CI is currently failing with error messages

Re: [RFC PATCH 1/5] hw/mem/nvdimm: Use Kconfig 'imply' instead of 'depends on'

2021-05-11 Thread Thomas Huth
On 12/05/2021 05.57, Philippe Mathieu-Daudé wrote: On 5/12/21 4:24 AM, David Gibson wrote: On Tue, May 11, 2021 at 05:53:50PM +0200, Philippe Mathieu-Daudé wrote: Per the kconfig.rst: A device should be listed [...] ``imply`` if (depending on the QEMU command line) the board may or may

Re: [PATCH qemu v19] spapr: Implement Open Firmware client interface

2021-05-11 Thread Alexey Kardashevskiy
On 4/22/21 22:58, Alexey Kardashevskiy wrote: The PAPR platform describes an OS environment that's presented by a combination of a hypervisor and firmware. The features it specifies require collaboration between the firmware and the hypervisor. Ping? Thanks, Since the beginning, the

Re: [PATCH v2 30/30] configure: use cc, not host_cc to set cross_cc for build arch

2021-05-11 Thread Philippe Mathieu-Daudé
On 5/4/21 12:02 PM, Alex Bennée wrote: > Otherwise you run into hilarity like trying when cross compiling a 32 > bit ARM build on a 64 bit system trying to use host_cc to build 32 bit > test cases. > > Signed-off-by: Alex Bennée > --- > configure | 2 +- > 1 file changed, 1 insertion(+), 1

Re: [PATCH v2 29/30] cirrus.yml: Fix the MSYS2 task

2021-05-11 Thread Philippe Mathieu-Daudé
Hi Yonggang Luo, Does this look OK to you? On 5/4/21 12:02 PM, Alex Bennée wrote: > From: Thomas Huth > > The MSYS2 task in the Cirrus-CI is currently failing with error messages > like this: > > warning: database file for 'ucrt64' does not exist (use '-Sy' to download) > :: Starting core

Re: [PATCH v2 01/30] checkpatch: Fix use of uninitialized value

2021-05-11 Thread Philippe Mathieu-Daudé
On 5/4/21 12:01 PM, Alex Bennée wrote: > From: Greg Kurz > > checkfilename() doesn't always set $acpi_testexpected. Fix the following > warning: > > Use of uninitialized value $acpi_testexpected in string eq at > ./scripts/checkpatch.pl line 1529. > > Fixes: d2f1af0e4120 ("checkpatch: don't

[PATCH 1/1] gitlab-ci: Add KVM x86 cross-build jobs

2021-05-11 Thread Philippe Mathieu-Daudé
Add a new job to cross-build the x86 target without the TCG/XEN accelerators (IOW: only KVM accelerator enabled). Signed-off-by: Philippe Mathieu-Daudé --- .gitlab-ci.d/crossbuilds.yml | 8 1 file changed, 8 insertions(+) diff --git a/.gitlab-ci.d/crossbuilds.yml

[PATCH 0/1] gitlab-ci: Add KVM x86 cross-build jobs

2021-05-11 Thread Philippe Mathieu-Daudé
Add a job to avoid breaking x86 KVM-only builds (the feature recently added by Claudio): https://gitlab.com/philmd/qemu/-/jobs/1255115665 Paolo, (assuming Thomas Acks the patch), could you queue it on top of your current pull request? Based-on: <20210511081350.419428-1-pbonz...@redhat.com>

[PATCH 1/2] target/i386: Make sure that vsyscall's tb->size != 0

2021-05-11 Thread Ilya Leoshkevich
tb_gen_code() assumes that tb->size must never be zero, otherwise it may produce spurious exceptions. For x86_64 this may happen when creating a translation block for the vsyscall page. Fix by pretending that vsyscall translation blocks have at least one instruction. Signed-off-by: Ilya

[PATCH 2/2] tests/tcg/x86_64: add vsyscall smoke test

2021-05-11 Thread Ilya Leoshkevich
Having a small test will prevent trivial regressions in the future. Signed-off-by: Ilya Leoshkevich --- tests/tcg/x86_64/Makefile.target | 6 +- tests/tcg/x86_64/vsyscall.c | 11 +++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644

[PATCH 0/2] target/i386: Make sure that vsyscall's tb->size != 0

2021-05-11 Thread Ilya Leoshkevich
This series for the s390-next tree fixes [1]. Patch 1 is the fix, patch 2 is the new test to avoid similar regressions in the future. [1] https://lists.nongnu.org/archive/html/qemu-devel/2021-05/msg02962.html Ilya Leoshkevich (2): target/i386: Make sure that vsyscall's tb->size != 0

Re: [RFC PATCH 1/5] hw/mem/nvdimm: Use Kconfig 'imply' instead of 'depends on'

2021-05-11 Thread Philippe Mathieu-Daudé
On 5/12/21 4:24 AM, David Gibson wrote: > On Tue, May 11, 2021 at 05:53:50PM +0200, Philippe Mathieu-Daudé wrote: >> Per the kconfig.rst: >> >> A device should be listed [...] ``imply`` if (depending on >> the QEMU command line) the board may or may not be started >> without it. >> >> This

Re: [RFC PATCH 0/5] buildsys: Do not use internal fdt library when asked for the system one

2021-05-11 Thread Philippe Mathieu-Daudé
Hi Paolo, On 5/11/21 5:57 PM, Philippe Mathieu-Daudé wrote: > On 5/11/21 5:53 PM, Philippe Mathieu-Daudé wrote: >> Attempt to fix the issue reported by John when building >> with an outdated libfdt. > > Unencoded version of this cover: > > For now it changes: > > hw/ppc/spapr_hcall.c: In

Re: [PATCH] ppc/spapr: advertise secure boot in the guest device tree

2021-05-11 Thread Daniel Axtens
> So.. what's the point? AFAIK we have no secure boot support in SLOF, > so what would advertising it in the device tree accomplish? Linux reads the property and enters secure boot mode: commit 61f879d97ce4 ("powerpc/pseries: Detect secure and trusted boot state of the system.") grub patches

Re: [PULL 0/1] NBD patches for 2021-05-11

2021-05-11 Thread Philippe Mathieu-Daudé
Hi Eric, On 5/11/21 9:28 PM, Eric Blake wrote: > The following changes since commit f9a576a818044133f8564e0d243ebd97df0b3280: > > Merge remote-tracking branch > 'remotes/dgilbert-gitlab/tags/pull-virtiofs-20210506' into staging > (2021-05-11 13:03:44 +0100) > > are available in the Git

Re: making a qdev bus available from a (non-qtree?) device

2021-05-11 Thread Philippe Mathieu-Daudé
On 5/11/21 8:17 PM, Klaus Jensen wrote: > Hi all, > > I need some help with grok'ing qdev busses. Stefan, Michael - David > suggested on IRC that I CC'ed you guys since you might have solved a > similar issue with virtio devices. I've tried to study how that works, > but I'm not exactly sure how

Re: [PATCH v4 2/2] ui/cocoa: add option to swap Option and Command

2021-05-11 Thread Akihiko Odaki
Reviewed-by: Akihiko Odaki I applied them to my personal tree: https://github.com/akihikodaki/qemu/tree/macos 2021年5月12日(水) 3:56 : > > From: Gustavo Noronha Silva > > On Mac OS X the Option key maps to Alt and Command to Super/Meta. This change > swaps them around so that Alt is the key closer

Re: [PATCH 3/3] virtio-net: Constify VirtIOFeature feature_sizes[]

2021-05-11 Thread Jason Wang
在 2021/5/11 下午6:41, Philippe Mathieu-Daudé 写道: Signed-off-by: Philippe Mathieu-Daudé --- hw/net/virtio-net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 66b9ff45118..6b7e8dd04ef 100644 --- a/hw/net/virtio-net.c +++

Re: [PATCH 2/3] virtio-blk: Constify VirtIOFeature feature_sizes[]

2021-05-11 Thread Jason Wang
在 2021/5/11 下午6:41, Philippe Mathieu-Daudé 写道: Signed-off-by: Philippe Mathieu-Daudé --- hw/block/virtio-blk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index d28979efb8d..f139cd7cc9c 100644 --- a/hw/block/virtio-blk.c

Re: [PATCH 1/3] hw/virtio: Pass virtio_feature_get_config_size() a const argument

2021-05-11 Thread Jason Wang
在 2021/5/11 下午6:41, Philippe Mathieu-Daudé 写道: The VirtIOFeature structure isn't modified, mark it const. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Jason Wang --- include/hw/virtio/virtio.h | 2 +- hw/virtio/virtio.c | 2 +- 2 files changed, 2 insertions(+), 2

Re: [PULL 00/10] Net patches

2021-05-11 Thread Jason Wang
在 2021/5/12 上午4:20, Peter Maydell 写道: On Sat, 8 May 2021 at 08:18, Jason Wang wrote: The following changes since commit d90f154867ec0ec22fd719164b88716e8fd48672: Merge remote-tracking branch 'remotes/dg-gitlab/tags/ppc-for-6.1-20210504' into staging (2021-05-05 20:29:14 +0100) are

Re: [RFC PATCH 4/5] hw/ppc/fdt: Drop dependency on libfdt

2021-05-11 Thread David Gibson
On Tue, May 11, 2021 at 05:53:53PM +0200, Philippe Mathieu-Daudé wrote: > hw/ppc/fdt.c defines the ppc_create_page_sizes_prop() function, > which is unrelated to the libfdt. Remove the incorrect library > dependency on the file. > > Signed-off-by: Philippe Mathieu-Daudé This is definitely wrong

Re: [RFC PATCH 3/5] hw/ppc: Have pSeries depends on libfdt (via host Kconfig FDT symbol)

2021-05-11 Thread David Gibson
On Tue, May 11, 2021 at 05:53:52PM +0200, Philippe Mathieu-Daudé wrote: > Since commit fea35ca4b8e ("ppc/spapr: Receive and store device > tree blob from SLOF") the pSeries machine depends on the libfdt > fdt_check_full() call, which is available in libfdt v1.4.7. > > Add the corresponding

Re: [RFC PATCH 1/5] hw/mem/nvdimm: Use Kconfig 'imply' instead of 'depends on'

2021-05-11 Thread David Gibson
On Tue, May 11, 2021 at 05:53:50PM +0200, Philippe Mathieu-Daudé wrote: > Per the kconfig.rst: > > A device should be listed [...] ``imply`` if (depending on > the QEMU command line) the board may or may not be started > without it. > > This is the case with the NVDIMM device, so use the

Re: [PATCH] ppc/spapr: advertise secure boot in the guest device tree

2021-05-11 Thread David Gibson
On Mon, May 10, 2021 at 10:07:13PM +1000, Daniel Axtens wrote: > The ibm,secure-boot property of the / node determines how firmware > and the operating system should enforce secure boot. The meaning > of the various values are: > > 0 - secure boot is disabled > 1 - secure boot in log-only

Re: [PATCH 00/72] Convert floatx80 and float128 to FloatParts

2021-05-11 Thread Richard Henderson
On 5/10/21 8:36 AM, Alex Bennée wrote: Richard Henderson writes: Reorg everything using QEMU_GENERIC and multiple inclusion to reduce the amount of code duplication between the formats. The use of QEMU_GENERIC means that we need to use pointers instead of structures, which means that even

Re: GICv3 for MTTCG

2021-05-11 Thread Zenghui Yu
[+Shashi] On 2021/5/12 1:51, Andrey Shinkevich wrote: Dear colleagues, I am looking for ways to accelerate the MTTCG for ARM guest on x86-64 host. The maximum number of CPUs for MTTCG that uses GICv2 is limited by 8: include/hw/intc/arm_gic_common.h:#define GIC_NCPU 8 The version 3 of the

Re: [PATCH 12/12] configure: bump min required CLang to 7.0.0 / XCode 10.2

2021-05-11 Thread Richard Henderson
On 5/11/21 8:26 AM, Daniel P. Berrangé wrote: Several distros have been dropped since the last time we bumped the minimum required CLang version. Per repology, currently shipping versions are: RHEL-8: 10.0.1 Debian Stretch: 7.0.1 Debian Buster: 7.0.1 openSUSE Leap

Re: [PATCH 07/12] crypto: drop used conditional check

2021-05-11 Thread Richard Henderson
On 5/11/21 8:26 AM, Daniel P. Berrangé wrote: The condition being tested has never been set since the day the code was first introduced. Signed-off-by: Daniel P. Berrangé --- crypto/tlscredsx509.c | 2 -- 1 file changed, 2 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH 11/12] configure: bump min required GCC to 6.3.0

2021-05-11 Thread Richard Henderson
On 5/11/21 8:26 AM, Daniel P. Berrangé wrote: Several distros have been dropped since the last time we bumped the minimum required GCC version. Per repology, currently shipping versions are: RHEL-8: 8.3.1 Debian Stretch: 6.3.0 Debian Buster: 8.3.0 openSUSE Leap

Re: [PATCH 04/12] crypto: drop back compatibility typedefs for nettle

2021-05-11 Thread Richard Henderson
On 5/11/21 8:26 AM, Daniel P. Berrangé wrote: Now that we only support modern nettle, we don't need to have local typedefs to mask the real nettle types. Signed-off-by: Daniel P. Berrangé --- crypto/cipher-nettle.c.inc | 60 -- crypto/hash-nettle.c |

Re: [PATCH 05/12] crypto: bump min gcrypt to 1.7.6, dropping RHEL-7 support

2021-05-11 Thread Richard Henderson
On 5/11/21 8:26 AM, Daniel P. Berrangé wrote: It has been over two years since RHEL-8 was released, and thus per the platform build policy, we no longer need to support RHEL-7 as a build target. This lets us increment the minimum required gcrypt version and assume that HMAC is always supported

Re: [PATCH 03/12] crypto: bump min nettle to 3.3, dropping RHEL-7 support

2021-05-11 Thread Richard Henderson
On 5/11/21 8:26 AM, Daniel P. Berrangé wrote: It has been over two years since RHEL-8 was released, and thus per the platform build policy, we no longer need to support RHEL-7 as a build target. This lets us increment the minimum required nettle version and drop a lot of backwards compatibility

Re: [PATCH 06/12] crypto: bump min gnutls to 3.5.8, dropping RHEL-7 support

2021-05-11 Thread Richard Henderson
On 5/11/21 8:26 AM, Daniel P. Berrangé wrote: Per repology, current shipping versions are: RHEL-8: 3.6.14 Debian Stretch: 3.5.8 Debian Buster: 3.6.7 openSUSE Leap 15.2: 3.6.7 Ubuntu LTS 18.04: 3.5.18 Ubuntu LTS 20.04: 3.6.13 FreeBSD: 3.6.15

[Bug 1899539] Re: keyboard errors in DOS, found links to similar errors for reference

2021-05-11 Thread p kirkham
Which source version should I be applying that patch to? It's partially failing on 4.1.0, 5.0.0, and 6.0.0 -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1899539 Title: keyboard errors in DOS,

[PATCH v4 09/13] ui/pixman: Add qemu_pixman_to_drm_format()

2021-05-11 Thread Vivek Kasireddy
This new function to get the drm_format associated with a pixman format will be useful while creating a dmabuf. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- include/ui/qemu-pixman.h | 1 + ui/qemu-pixman.c | 35

[PATCH v4 11/13] virtio-gpu: Factor out update scanout

2021-05-11 Thread Vivek Kasireddy
Creating a small helper function for updating the scanout will be useful in the next patch where this needs to be done early in do_set_scanout before returning. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu.c | 35 +++ 1 file

[PATCH v4 06/13] virtio-gpu: Refactor virtio_gpu_create_mapping_iov

2021-05-11 Thread Vivek Kasireddy
Instead of passing the attach_backing object to extract nr_entries and offset, explicitly pass these as arguments to this function. This will be helpful when adding create_blob API. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu-virgl.c | 3 ++-

[PATCH v4 08/13] virtio-gpu: Add virtio_gpu_resource_create_blob

2021-05-11 Thread Vivek Kasireddy
This API allows Qemu to register the blob allocated by the Guest as a new resource and map its backing storage. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/trace-events | 1 + hw/display/virtio-gpu.c | 75

[PATCH v4 00/13] virtio-gpu: Add support for Blob resources feature (v4)

2021-05-11 Thread Vivek Kasireddy
Enabling this feature would eliminate data copies from the resource object in the Guest to the shadow resource in Qemu. This patch series however adds support only for Blobs of type VIRTIO_GPU_BLOB_MEM_GUEST with property VIRTIO_GPU_BLOB_FLAG_USE_SHAREABLE. Most of the patches in this series are

[PATCH v4 07/13] virtio-gpu: Add initial definitions for blob resources

2021-05-11 Thread Vivek Kasireddy
Add the property bit, configuration flag and other relevant macros and definitions associated with this feature. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu-base.c | 3 +++ hw/display/virtio-gpu.c| 14 ++

[PATCH v4 05/13] virtio-gpu: Refactor virtio_gpu_set_scanout

2021-05-11 Thread Vivek Kasireddy
Store the meta-data associated with a FB in a new object (struct virtio_gpu_framebuffer) and pass the object to set_scanout. Also move code in set_scanout into a do_set_scanout function. This will be helpful when adding set_scanout_blob API. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann

[PATCH v4 04/13] virtio-gpu: Add virtio_gpu_find_check_resource

2021-05-11 Thread Vivek Kasireddy
Move finding the resource and validating its backing storage into one function. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu.c | 66 + 1 file changed, 47 insertions(+), 19 deletions(-) diff

[PATCH v4 12/13] virtio-gpu: Add virtio_gpu_set_scanout_blob

2021-05-11 Thread Vivek Kasireddy
This API allows Qemu to set the blob allocated by the Guest as the scanout buffer. If Opengl support is available, then the scanout buffer would be submitted as a dmabuf to the UI; if not, a pixman image is created from the scanout buffer and is submitted to the UI via the display surface.

[PATCH v4 13/13] virtio-gpu: Update cursor data using blob

2021-05-11 Thread Vivek Kasireddy
If a blob is available for the cursor, copy the data from the blob. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/hw/display/virtio-gpu.c

[PATCH v4 10/13] virtio-gpu: Add helpers to create and destroy dmabuf objects

2021-05-11 Thread Vivek Kasireddy
These helpers can be useful for creating dmabuf objects from blobs and submitting them to the UI. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu-udmabuf.c | 74 + include/hw/virtio/virtio-gpu.h | 15 +++ 2 files changed, 89

[PATCH v4 03/13] virtio-gpu: Add udmabuf helpers

2021-05-11 Thread Vivek Kasireddy
Add helper functions to create a dmabuf for a resource and mmap it. Also, introduce the fields blob and blob_size so that these helpers can start to use them but the full picture will emerge only after adding create_blob API in patch 8 of this series. To be able to create a dmabuf using the

[PATCH v4 01/13] ui: Get the fd associated with udmabuf driver

2021-05-11 Thread Vivek Kasireddy
Try to open the udmabuf dev node for the first time or return the fd if the device was previously opened. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- include/ui/console.h | 3 +++ ui/meson.build | 1 + ui/udmabuf.c | 40

[PATCH v4 02/13] headers: Add udmabuf.h

2021-05-11 Thread Vivek Kasireddy
This adds udmabuf header to standard headers so that the relevant udmabuf objects can be accessed in subsequent patches. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- include/standard-headers/linux/udmabuf.h | 32

RE: [PATCH v3 12/20] virtio-gpu: Add virtio_gpu_set_scanout_blob

2021-05-11 Thread Kasireddy, Vivek
Hi Gerd, > > -pixman_image_unref(res->image); > > +if (res->image) { > > +pixman_image_unref(res->image); > > +} > > There is qemu_pixman_image_unref(). > > Like pixman_image_unref except that it also accepts (and ignores) NULL > pointers. [Kasireddy, Vivek] Made the change

Re: Sphinx and the :any: role

2021-05-11 Thread John Snow
On 5/11/21 1:31 PM, John Snow wrote: For the purposes of my QAPI generator cleanup (adding docstrings and mypy static types to ./scripts/qapi), I have a series of patches I've been carrying off-list that changes the behavior of how Sphinx cross-references work. Presently, `foo` in our Sphinx

[PATCH v2 20/21] qapi: [WIP] Add QAPIDocError

2021-05-11 Thread John Snow
Raise this error instead of QAPIParseError and delegate the context up to the parent parser. In a chat off-list, we discussed how this design forces us to continue having less accurate error context information. Still, it's useful for an extremely simple split without a lot of fuss.

[PATCH v2 19/21] qapi: [WIP] Import QAPIDoc from qapidoc Signed-off-by: John Snow

2021-05-11 Thread John Snow
Signed-off-by: John Snow --- scripts/qapi/expr.py | 2 +- scripts/qapi/parser.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/qapi/expr.py b/scripts/qapi/expr.py index 496f7e0333e..7616646e43d 100644 --- a/scripts/qapi/expr.py +++ b/scripts/qapi/expr.py @@ -44,7

[PATCH v2 14/21] qapi/parser: allow 'ch' variable name

2021-05-11 Thread John Snow
We can have a two-letter variable name, as a treat. Signed-off-by: John Snow -- I don't want to use 'chr' or 'char', and in context 'ch' works well enough. I will assume that any possible future uses will also be obvious enough. Signed-off-by: John Snow --- scripts/qapi/pylintrc | 1 + 1

[PATCH v2 16/21] CHECKPOINT

2021-05-11 Thread John Snow
As of here, parser is actually fully typed, and QAPIDoc is not. Below, there are a few extra patches that "prove" this, but they are not necessarily meant for inclusion. They could theoretically be included anyway, but a few of them would need to be squashed together to ensure our "no

[PATCH v2 17/21] qapi: [WIP] Rip QAPIDoc out of parser.py

2021-05-11 Thread John Snow
This (rather unglamorously) rips QAPIDoc out of parser.py. It does not leave a working solution in its place, opting instead just for code movement. Signed-off-by: John Snow --- scripts/qapi/parser.py | 342 - scripts/qapi/qapidoc.py | 362

[PATCH v2 15/21] qapi/parser: add docstrings

2021-05-11 Thread John Snow
Signed-off-by: John Snow --- scripts/qapi/parser.py | 68 ++ 1 file changed, 68 insertions(+) diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py index e80e0a7d965..ed543a2b7a4 100644 --- a/scripts/qapi/parser.py +++ b/scripts/qapi/parser.py @@

[PATCH v2 21/21] qapi: [WIP] Enable linters on parser.py

2021-05-11 Thread John Snow
(Only works after we excise QAPIDoc, of course.) Signed-off-by: John Snow --- scripts/qapi/mypy.ini | 6 -- scripts/qapi/pylintrc | 3 +-- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/scripts/qapi/mypy.ini b/scripts/qapi/mypy.ini index 1a72be2c788..56c0f306c5e 100644 ---

[PATCH v2 18/21] qapi: [WIP] Add type ignores for qapidoc.py

2021-05-11 Thread John Snow
Signed-off-by: John Snow --- scripts/qapi/mypy.ini | 5 + scripts/qapi/pylintrc | 1 + 2 files changed, 6 insertions(+) diff --git a/scripts/qapi/mypy.ini b/scripts/qapi/mypy.ini index d7bbb2dc9c7..1a72be2c788 100644 --- a/scripts/qapi/mypy.ini +++ b/scripts/qapi/mypy.ini @@ -9,6 +9,11 @@

[PATCH v2 12/21] qapi/parser: add type hint annotations

2021-05-11 Thread John Snow
Annotations do not change runtime behavior. This commit *only* adds annotations. (Annotations for QAPIDoc are in a forthcoming commit.) Signed-off-by: John Snow --- scripts/qapi/parser.py | 58 +++--- 1 file changed, 38 insertions(+), 20 deletions(-) diff

[PATCH v2 08/21] qapi/parser: Use @staticmethod where appropriate

2021-05-11 Thread John Snow
No self, no thank you! (Quiets pylint warnings.) Signed-off-by: John Snow --- scripts/qapi/parser.py | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py index 6d774df6d0a..5ef1b8935e6 100644 --- a/scripts/qapi/parser.py +++

[PATCH v2 13/21] qapi/parser: Remove superfluous list comprehension

2021-05-11 Thread John Snow
A generator suffices (and quiets a pylint warning). Signed-off-by: John Snow --- scripts/qapi/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py index 631863bac14..e80e0a7d965 100644 --- a/scripts/qapi/parser.py +++

[PATCH v2 09/21] qapi: add must_match helper

2021-05-11 Thread John Snow
Mypy cannot generally understand that these regex functions cannot possibly fail. Add a "must_match" helper that makes this clear for mypy. Signed-off-by: John Snow --- scripts/qapi/common.py | 8 +++- scripts/qapi/main.py | 6 ++ scripts/qapi/parser.py | 13 +++-- 3 files

[PATCH v2 11/21] qapi/parser: Rework _check_pragma_list_of_str as a TypeGuard

2021-05-11 Thread John Snow
TypeGuards wont exist in Python proper until 3.10. Ah well. We can hack up our own by declaring this function to return the type we claim it checks for and using this to safely downcast object -> List[str]. In so doing, I bring this function under _pragma so it can use the 'info' object in its

[PATCH v2 07/21] qapi/parser: assert object keys are strings

2021-05-11 Thread John Snow
The single quote token implies the value is a string. Assert this to be the case, to allow us to write an accurate return type for get_members. Signed-off-by: John Snow --- scripts/qapi/parser.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/qapi/parser.py

[PATCH v2 10/21] qapi/parser: Fix token membership tests when token can be None

2021-05-11 Thread John Snow
When the token can be None (EOF), we can't use 'x in "abc"' style membership tests to group types of tokens together, because 'None in "abc"' is a TypeError. Easy enough to fix. (Use a tuple: It's neither a static typing error nor a runtime error to check for None in Tuple[str, ...]) Add tests

[PATCH v2 03/21] qapi/source: Remove line number from QAPISourceInfo initializer

2021-05-11 Thread John Snow
With the QAPISourceInfo(None, None, None) construct gone, there's no longer any reason to have to specify that a file starts on the first line. Remove it from the initializer and default it to 1. Remove the last vestiges where we check for 'line' being unset, that can't happen, now.

[PATCH v2 05/21] qapi/parser: Assert lexer value is a string

2021-05-11 Thread John Snow
The type checker can't narrow the type of the token value to string, because it's only loosely correlated with the return token. We know that a token of '#' should always have a "str" value. Add an assertion. Signed-off-by: John Snow --- scripts/qapi/parser.py | 1 + 1 file changed, 1

[PATCH v2 02/21] qapi: Add test for nonexistent schema file

2021-05-11 Thread John Snow
This tests the error-return pathway introduced in the previous commit. (Thanks to Paolo for the help with the Meson magic.) Signed-off-by: John Snow --- This went after the previous patch instead of before because prior to removing the sys.argv[0] bit from QAPISourceInfo, I can't filter the

[PATCH v2 00/21] qapi: static typing conversion, pt5a

2021-05-11 Thread John Snow
This is part five, and focuses on QAPISchemaParser in parser.py. It does not touch QAPIDoc yet, which will be covered next. gitlab: https://gitlab.com/jsnow/qemu/-/commits/python-qapi-cleanup-pt5a Requirements: - Python 3.6+ - mypy >= 0.770 - pylint >= 2.6.0 (2.7.0+ when using Python 3.9+)

[PATCH v2 06/21] qapi/parser: enforce all top-level expressions must be dict in _parse()

2021-05-11 Thread John Snow
Instead of using get_expr nested=False, allow get_expr to always return any expression. In exchange, add a new error message to the top-level parser that explains the semantic error: Top-level expressions must always be JSON objects. This helps mypy understand the rest of this function which

[PATCH v2 04/21] qapi/parser: factor parsing routine into method

2021-05-11 Thread John Snow
For the sake of keeping __init__ smaller (and treating it more like a gallery of what state variables we can expect to see), put the actual parsing action into a parse method. It remains invoked from the init method to reduce churn. To accomplish this, 'previously_included' becomes the private

[PATCH v2 01/21] qapi/parser: Don't try to handle file errors

2021-05-11 Thread John Snow
Remove the try/except block that handles file-opening errors in QAPISchemaParser.__init__() and add one each to QAPISchemaParser._include() and QAPISchema.__init__() respectively. The short-ish version of what motivates this patch is: - It's hard to write a good error message in the init

Re: [PATCH 0/7] virtiofsd: Few cleanups in virtio_send_data_iov()

2021-05-11 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210511213736.281016-1-vgo...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210511213736.281016-1-vgo...@redhat.com Subject: [PATCH 0/7] virtiofsd: Few cleanups in

[PATCH 7/7] virtiofsd: Set req->reply_sent right after sending reply

2021-05-11 Thread Vivek Goyal
There is no reason to set it in label "err". We should be able to set it right after sending reply. It is easier to read. Signed-off-by: Vivek Goyal --- tools/virtiofsd/fuse_virtio.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/virtiofsd/fuse_virtio.c

[PATCH 0/7] virtiofsd: Few cleanups in virtio_send_data_iov()

2021-05-11 Thread Vivek Goyal
Hi, Code in virtio_send_data_iov() little twisted and complicated. This patch series just tries to simplify it a bit to make it little easier to read this piece of code. Thanks Vivek Vivek Goyal (7): virtiofsd: Check for EINTR in preadv() and retry virtiofsd: Get rid of unreachable code in

[PATCH 4/7] virtiofsd: get rid of in_sg_left variable

2021-05-11 Thread Vivek Goyal
in_sg_left seems to be being used primarly for debugging purpose. It is keeping track of how many bytes are left in the scatter list we are reading into. We already have another variable "len" which keeps track how many bytes are left to be read. And in_sg_left is greater than or equal to len. We

[PATCH 2/7] virtiofsd: Get rid of unreachable code in read

2021-05-11 Thread Vivek Goyal
pvreadv() can return following. - error - 0 in case of EOF - short read We seem to handle all the cases already. We are retrying read in case of short read. So another check for short read seems like dead code. Get rid of it. Signed-off-by: Vivek Goyal --- tools/virtiofsd/fuse_virtio.c | 5

[PATCH 6/7] virtiofsd: Check EOF before short read

2021-05-11 Thread Vivek Goyal
In virtio_send_data_iov() we are checking first for short read and then EOF condition. Change the order. Basically check for error and EOF first and last remaining piece is short ready which will lead to retry automatically at the end of while loop. Just that it is little simpler to read to the

[PATCH 5/7] virtiofsd: Simplify skip byte logic

2021-05-11 Thread Vivek Goyal
We need to skip bytes in two cases. a. Before we start reading into in_sg, we need to skip iov_len bytes in the beginning which typically will have fuse_out_header. b. If preadv() does a short read, then we need to retry preadv() with remainig bytes and skip the bytes preadv() read in

  1   2   3   4   5   6   >