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
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 ++
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
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
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
---
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
'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
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
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
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
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
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
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.
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
> 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
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
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
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
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
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
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
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
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
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
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
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
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
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>
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
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
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
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
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
> 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
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
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
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
在 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
+++
在 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
在 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
在 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
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
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
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
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
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
[+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
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
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~
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
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 |
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
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
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
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,
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
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
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 ++-
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
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
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 ++
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
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
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.
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
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
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
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
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
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
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
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.
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
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
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
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
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
@@
(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
---
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 @@
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
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
+++
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
+++
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
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
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
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
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.
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
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
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+)
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
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
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
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
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
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
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
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
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
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 - 100 of 524 matches
Mail list logo