When running LinuxTests we may need to run the guest with
custom params. It is practical to store the pxeboot URL
and the default kernel params so that the
tests just need to fetch those and augment the kernel params.
Signed-off-by: Eric Auger
---
tests/acceptance/avocado_qemu/__init__.py | 46 +
* Greg Kurz (gr...@kaod.org) wrote:
> On Wed, 14 Apr 2021 16:51:20 +0100
> "Dr. David Alan Gilbert (git)" wrote:
>
> > From: "Dr. David Alan Gilbert"
> >
> > The daemon may request that fd's be mapped into the virtio-fs cache
> > visible to the guest.
> > These mappings are triggered by command
On Tue, Apr 20, 2021 at 01:09:00PM -0400, Eduardo Habkost wrote:
> On Tue, Apr 20, 2021 at 07:19:40PM +0300, Valeriy Vdovin wrote:
> [...]
> > +##
> > +# @query-cpu-model-cpuid:
> > +#
> > +# Returns description of a virtual CPU model, created by QEMU after cpu
> > +# initialization routines. The r
On Apr 19 21:28, Klaus Jensen wrote:
From: Klaus Jensen
With the introduction of the nvme-subsystem device we are really
cluttering up the hw/block directory.
As suggested by Philippe previously, move the nvme emulation to hw/nvme.
Suggested-by: Philippe Mathieu-Daudé
Hi Philippe,
You ori
On 4/21/21 9:58 AM, Markus Armbruster wrote:
John Snow writes:
[...]
I've made a re-spin. Let's try something new, if you don't mind:
I've pushed a "almost v5" copy onto my gitlab, where edits made against
this patch are in their own commit so that all of the pending edits I've
made are easil
Hi, this series adds static types to the QAPI module.
This is part three, and it focuses on expr.py.
Environment:
- Python >= 3.6, <= 3.8 *
- mypy >= 0.770
- pylint >= 2.6.0
- flake8
- isort
Every commit should pass with (from ./scripts/):
- flake8 qapi/
- pylint --rcfile=qapi/pylintrc qapi/
-
OrderedDict is a subtype of dict, so we can check for a more general
form. These functions do not themselves depend on it being any
particular type.
Signed-off-by: John Snow
Reviewed-by: Eduardo Habkost
Reviewed-by: Cleber Rosa
---
scripts/qapi/expr.py | 5 ++---
1 file changed, 2 insertions(+
mypy does not know the types of values stored in Dicts that masquerade
as objects. Help the type checker out by constraining the type.
Signed-off-by: John Snow
---
scripts/qapi/expr.py | 28 +---
1 file changed, 25 insertions(+), 3 deletions(-)
diff --git a/scripts/qapi/
mypy isn't fond of allowing you to check for bool membership in a
collection of str elements. Guard this lookup for precisely when we were
given a name.
Signed-off-by: John Snow
Reviewed-by: Eduardo Habkost
Reviewed-by: Cleber Rosa
---
scripts/qapi/expr.py | 4 +++-
1 file changed, 3 insertion
The linter yaps after 0825f62c842. Fix this trivial issue to restore the
linter baseline.
(Yes, ideally -- and soon -- the linter will be part of CI so we don't
clutter up the log with fixups. For now, though, the baseline is useful
for testing intermediate commits as types are added to the QAPI
l
Casts are instructions to the type checker only, they aren't "safe" and
should probably be avoided in general. In this case, when we perform
type checking on a nested structure, the type of each field does not
"stick".
(See PEP 647 for an example of "type narrowing" that does "stick".
It is avail
Signed-off-by: John Snow
---
scripts/qapi/expr.py | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/scripts/qapi/expr.py b/scripts/qapi/expr.py
index de7fc16fac2..5e4d5f80aa7 100644
--- a/scripts/qapi/expr.py
+++ b/scripts/qapi/expr.py
@@ -238,14 +238,14 @@ def ch
This is a minor adjustment that lets parameters @required and
@optional take tuple arguments, in particular (). Later patches will
make use of that.
(Iterable would also have worked, but Iterable also includes things like
generator expressions which are consumed upon iteration, which would
requir
This is a small rewrite to address some minor style nits.
Don't compare against the empty list to check for the empty condition, and
move the normalization forward to unify the check on the now-normalized
structure.
With the check unified, the local nested function isn't needed anymore
and can be
For readability purposes only, shimmy the early return upwards to the
top of the function, so cases proceed in order from least to most
complex.
Signed-off-by: John Snow
Reviewed-by: Eduardo Habkost
Reviewed-by: Cleber Rosa
---
scripts/qapi/expr.py | 8
1 file changed, 4 insertions(+)
Annotations do not change runtime behavior.
This commit *only* adds annotations.
Signed-off-by: John Snow
---
scripts/qapi/expr.py | 68 +++
scripts/qapi/mypy.ini | 5
2 files changed, 43 insertions(+), 30 deletions(-)
diff --git a/scripts/qapi/exp
Per list review: qapi-code-gen.txt reserves suffixes Kind and
List only for type names, but the code rejects them for events and
commands, too.
It turns out we reject them earlier anyway: In check_name_upper() for
event names, and in check_name_lower() for command names.
Still, adjust the code fo
Prior to this commit, specifying a non-object value here causes the QAPI
parser to crash in expr.py with a stack trace with (likely) an
AttributeError when we attempt to call that value's items() method.
This member needs to be an object (Dict), and not anything else. Add a
check for this with a n
It is -- maybe -- possibly -- three nanoseconds faster.
Signed-off-by: John Snow
Reviewed-by: Eduardo Habkost
Reviewed-by: Cleber Rosa
---
scripts/qapi/expr.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/qapi/expr.py b/scripts/qapi/expr.py
index 0b66d808421.
Signed-off-by: John Snow
---
scripts/qapi/expr.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/scripts/qapi/expr.py b/scripts/qapi/expr.py
index 225a82e20d3..496f7e0333e 100644
--- a/scripts/qapi/expr.py
+++ b/scripts/qapi/expr.py
@@ -1,13 +1,14 @@
# -*- coding: utf-8 -*
Signed-off-by: John Snow
Tested-by: Eduardo Habkost
Reviewed-by: Eduardo Habkost
Reviewed-by: Cleber Rosa
Tested-by: Cleber Rosa
---
scripts/qapi/pylintrc | 1 -
1 file changed, 1 deletion(-)
diff --git a/scripts/qapi/pylintrc b/scripts/qapi/pylintrc
index b9e077a1642..fb0386d529a 100644
---
The function can just use the argument from the scope above. Otherwise,
we get shadowed argument errors because the parameter name clashes with
the name of a variable already in-scope.
Signed-off-by: John Snow
Reviewed-by: Eduardo Habkost
Reviewed-by: Cleber Rosa
---
scripts/qapi/expr.py | 6 +
Now with more :words:!
Signed-off-by: John Snow
---
scripts/qapi/expr.py | 256 ++-
1 file changed, 251 insertions(+), 5 deletions(-)
diff --git a/scripts/qapi/expr.py b/scripts/qapi/expr.py
index c33caf00d91..0b66d808421 100644
--- a/scripts/qapi/expr.py
Per the nanoMIPS32 Instruction Set Technical Reference Manual,
Revision 01.01, Chapter 3. "Instruction Definitions":
The Read/Write Previous GPR opcodes "require CP0 privilege".
Add the missing CP0 checks.
Signed-off-by: Philippe Mathieu-Daudé
---
target/mips/translate.c | 2 ++
1 file changed
From: Tom Lendacky
Update the amd-memory-encryption.txt file with information about SEV-ES,
including how to launch an SEV-ES guest and some of the differences
between SEV and SEV-ES guests in regards to launching and measuring the
guest.
Signed-off-by: Tom Lendacky
---
docs/amd-memory-encrypt
Rename QAPIError to QAPISourceError, and then create a new QAPIError
class that serves as the basis for all of our other custom exceptions,
without specifying any class properties.
This leaves QAPIError as a package-wide error class that's suitable for
any current or future errors.
(Right now, we
Missed in commit 2cae67bcb5 "qapi: Use super() now we have Python 3".
Signed-off-by: John Snow
Reviewed-by: Markus Armbruster
---
scripts/qapi/error.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/qapi/error.py b/scripts/qapi/error.py
index 126dda7c9b2..38bd7c4dd6
Signed-off-by: John Snow
---
scripts/qapi/pylintrc | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/scripts/qapi/pylintrc b/scripts/qapi/pylintrc
index fb0386d529a..88efbf71cb2 100644
--- a/scripts/qapi/pylintrc
+++ b/scripts/qapi/pylintrc
@@ -2,8 +2,7 @@
# Add files or di
It's already treated as optional, with one direct caller and some
subclass callers passing 'None'. Make it officially optional, which
requires moving the position of the argument to come after all required
parameters.
QAPISemError becomes functionally identical to QAPISourceError. Keep the
name to
Hi, this series adds static type hints to the QAPI module.
This is part four, and focuses on error.py.
Part 4: https://gitlab.com/jsnow/qemu/-/tree/python-qapi-cleanup-pt4
CI: https://gitlab.com/jsnow/qemu/-/pipelines/290152364
Requirements:
- Python 3.6+
- mypy >= 0.770
- pylint >= 2.6.0 (2.7.0+
Keeping it in error.py will create some cyclic import problems when we
add types to the QAPISchemaParser. Callers don't need to know the
details of QAPIParseError unless they are parsing or dealing directly
with the parser, so this won't create any harsh new requirements for
callers in the general
Signed-off-by: John Snow
---
(This can be squashed with the previous commit when staged.)
Signed-off-by: John Snow
---
scripts/qapi/mypy.ini | 5 -
1 file changed, 5 deletions(-)
diff --git a/scripts/qapi/mypy.ini b/scripts/qapi/mypy.ini
index 7797c834328..54ca4483d6d 100644
--- a/script
Built-in stuff is not parsed from a source file, and therefore have no
QAPISourceInfo. If such None info was used for reporting an error,
built-in stuff would be broken. Programming error. Instead of reporting
a confusing error with bogus source location then, we better crash.
We currently crash o
No functional change.
Note: QAPISourceError's info parameter is Optional[] because schema.py
treats the info property of its various classes as Optional to
accommodate built-in types, which have no source. See prior commit
'qapi/error: assert QAPISourceInfo is not None'.
Signed-off-by: John Snow
On 4/21/21 2:12 PM, Tom Lendacky wrote:
> From: Tom Lendacky
>
> Update the amd-memory-encryption.txt file with information about SEV-ES,
> including how to launch an SEV-ES guest and some of the differences
> between SEV and SEV-ES guests in regards to launching and measuring the
> guest.
>
Hm
On 4/21/21 10:32 AM, Vladimir Sementsov-Ogievskiy wrote:
> Max reported the following bug:
>
> $ ./qemu-img create -f raw src.img 1G
> $ ./qemu-img create -f raw dst.img 1G
>
> $ (echo '
>{"execute":"qmp_capabilities"}
>{"execute":"blockdev-mirror",
> "arguments":{"job-id":"mirror",
>
Alex Bennée writes:
> Alex Bennée writes:
>
>> This adds a simple signal test that combines the POSIX timer_create
>> with signal delivery across multiple threads.
>>
>> [AJB: So I wrote this in an attempt to flush out issues with the
>> s390x-linux-user handling. However I suspect I've done s
On Wed, 21 Apr 2021 at 16:24, Cole Robinson wrote:
>
> Attempting to hotplug a tap nic with libvirt will crash qemu:
>
> $ sudo virsh attach-interface f32 network default
> error: Failed to attach interface
> error: Unable to read from monitor: Connection reset by peer
>
> 0x55875b7f3a99 in ta
On Wed, 21 Apr 2021 at 20:51, Alex Bennée wrote:
>
>
> Alex Bennée writes:
> > To further document my confusion:
> >
> > gdb --args $QEMU ./tests/tcg/$ARCH/signals
> >
> > will SEGV in generated code for every target I've run. This seems to be
> > some sort of change of behaviour by running ins
On Wed, Apr 21, 2021 at 07:13:24PM +0300, Denis Plotnikov wrote:
>
> On 21.04.2021 18:24, Kevin Wolf wrote:
> > Am 25.03.2021 um 16:12 hat Denis Plotnikov geschrieben:
> > > Commit 4bcad76f4c39 ("vhost-user-blk: delay vhost_user_blk_disconnect")
> > > introduced postponing vhost_dev cleanup aiming
On 4/21/21 11:50 AM, Philippe Mathieu-Daudé wrote:
Per the nanoMIPS32 Instruction Set Technical Reference Manual,
Revision 01.01, Chapter 3. "Instruction Definitions":
The Read/Write Previous GPR opcodes "require CP0 privilege".
Add the missing CP0 checks.
Signed-off-by: Philippe Mathieu-Daudé
On Wed, Apr 14, 2021 at 04:51:29PM +0100, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert"
>
> Define a new slave command 'VHOST_USER_SLAVE_FS_IO' for a
> client to ask qemu to perform a read/write from an fd directly
> to GPA.
Hi David,
Today I came across process_vm_readv(
On Wed, Apr 21, 2021 at 08:39:42PM +0300, Valeriy Vdovin wrote:
> On Tue, Apr 20, 2021 at 01:09:00PM -0400, Eduardo Habkost wrote:
> > On Tue, Apr 20, 2021 at 07:19:40PM +0300, Valeriy Vdovin wrote:
> > [...]
> > > +##
> > > +# @query-cpu-model-cpuid:
> > > +#
> > > +# Returns description of a virt
It builds with v6.0.0-rc4 release from Git. Had to add --enable-trace-
backends=syslog
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1918084
Title:
Build fails on macOS 11.2.2
Status in QEMU:
Tr
On Wed, Apr 21, 2021 at 02:26:20PM +0200, David Hildenbrand wrote:
> We return information on the currently configured memory backends and
> don't configure them, so decribe what the currently set properties
> express.
>
> Reviewed-by: Philippe Mathieu-Daudé
> Suggested-by: Markus Armbruster
> C
On Wed, Apr 21, 2021 at 02:26:21PM +0200, David Hildenbrand wrote:
> Let's include the property, which can be helpful when debugging,
> for example, to spot misuse of MAP_PRIVATE which can result in some ugly
> corner cases (e.g., double-memory consumption on shmem).
>
> Use the same description w
On Wed, Apr 21, 2021 at 02:26:22PM +0200, David Hildenbrand wrote:
> Let's print the property.
>
> Reviewed-by: Philippe Mathieu-Daudé
> Reviewed-by: Dr. David Alan Gilbert
> Cc: Markus Armbruster
> Cc: Eric Blake
> Cc: Igor Mammedov
> Signed-off-by: David Hildenbrand
Reviewed-by: Eduardo H
On Wed, Apr 21, 2021 at 02:26:09PM +0200, David Hildenbrand wrote:
> Based-on: 20210406080126.24010-1-da...@redhat.com
>
> Some cleanups previously sent in other context (resizeable allocations),
> followed by RAM_NORESERVE, implementing it under Linux using MAP_NORESERVE,
> and letting users conf
On Wed, Apr 21, 2021 at 02:26:23PM +0200, David Hildenbrand wrote:
> Let's include the new property.
>
> Reviewed-by: Philippe Mathieu-Daudé
> Cc: Eric Blake
> Cc: Markus Armbruster
> Cc: Igor Mammedov
> Signed-off-by: David Hildenbrand
Reviewed-by: Eduardo Habkost
--
Eduardo
On Wed, Apr 21, 2021 at 02:26:24PM +0200, David Hildenbrand wrote:
> Let's print the new property.
>
> Reviewed-by: Philippe Mathieu-Daudé
> Reviewed-by: Dr. David Alan Gilbert
> Cc: Markus Armbruster
> Cc: Eric Blake
> Cc: Igor Mammedov
> Signed-off-by: David Hildenbrand
Reviewed-by: Eduar
I guess the bug still exists, I fixed it back in the time by repackaging
OVMF_VARS.fd (padded to be 1M).
I will try to find some time to mount an environment to reproduce the
issue again.
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEM
On 4/21/21 6:04 AM, Stefano Garzarella wrote:
>> +static char *qemu_rbd_strchr(char *src, char delim)
>> +{
>> +char *p;
>> +
>> +for (p = src; *p; ++p) {
>> +if (*p == delim) {
>> +return p;
>> +}
>> +if (*p == '\\' && p[1] != '\0') {
>> +++p
Connor Kuehl (2):
iotests/231: Update expected deprecation message
block/rbd: Add an escape-aware strchr helper
block/rbd.c| 32 +---
tests/qemu-iotests/231 | 4
tests/qemu-iotests/231.out | 7 ---
3 files changed, 29 insertions(+), 1
19.04.2021 11:55, Emanuele Giuseppe Esposito wrote:
Reads access the list in RCU style, so be careful to avoid use-after-free
scenarios in the backup block job. Apart from this, all that's needed
is protecting updates with a mutex.
Note that backup doesn't use write-notifiers now. Probably bes
Sometimes the parser needs to further split a token it has collected
from the token input stream. Right now, it does a cursory check to see
if the relevant characters appear in the token to determine if it should
break it down further.
However, qemu_rbd_next_tok() will escape characters as it remo
The deprecation message in the expected output has technically been
wrong since the wrong version of a patch was applied to it. Because of
this, the test fails. Correct the expected output so that it passes.
Signed-off-by: Connor Kuehl
Reviewed-by: Max Reitz
Reviewed-by: Stefano Garzarella
---
On Tue, Mar 02, 2021 at 03:57:52PM +0100, Philippe Mathieu-Daudé wrote:
> The cpu model is the single device available in user-mode.
> Since we want to restrict some fields to user-mode emulation,
> we prefer to set the vmsd field of CPUClass, rather than the
> DeviceClass one.
>
> Signed-off-by:
write-notifiers are used only for write-threshold. New code for such
purpose should create filters.
Let's handle write-threshold simply in generic code and drop write
notifiers at all.
Also move part of write-threshold API that is used only for testing to
the test.
Signed-off-by: Vladimir Sement
22.04.2021 00:23, Vladimir Sementsov-Ogievskiy wrote:
19.04.2021 11:55, Emanuele Giuseppe Esposito wrote:
Reads access the list in RCU style, so be careful to avoid use-after-free
scenarios in the backup block job. Apart from this, all that's needed
is protecting updates with a mutex.
Note th
21.04.2021 22:47, Philippe Mathieu-Daudé wrote:
On 4/21/21 10:32 AM, Vladimir Sementsov-Ogievskiy wrote:
Max reported the following bug:
$ ./qemu-img create -f raw src.img 1G
$ ./qemu-img create -f raw dst.img 1G
$ (echo '
{"execute":"qmp_capabilities"}
{"execute":"blockdev-mirror",
21.04.2021 17:00, Roman Kagan wrote:
On Fri, Apr 16, 2021 at 11:08:40AM +0300, Vladimir Sementsov-Ogievskiy wrote:
We have two "return error" paths in nbd_open() after
nbd_process_options(). Actually we should call nbd_clear_bdrvstate()
on these paths. Interesting that nbd_process_options() call
On 4/21/21 3:54 PM, Peter Maydell wrote:
> On Wed, 21 Apr 2021 at 16:24, Cole Robinson wrote:
>>
>> Attempting to hotplug a tap nic with libvirt will crash qemu:
>>
>> $ sudo virsh attach-interface f32 network default
>> error: Failed to attach interface
>> error: Unable to read from monitor: Conn
On Wed, Apr 21, 2021 at 12:17 AM Richard Henderson
wrote:
>
> On 4/19/21 6:31 PM, frank.ch...@sifive.com wrote:
> > From: Frank Chang
> >
> > In IEEE 754-2008 spec:
> >Invalid operation exception is signaled when doing:
> >fusedMultiplyAdd(0, Inf, c) or fusedMultiplyAdd(Inf, 0, c)
> >u
On Tue, Apr 20, 2021 at 10:57 AM LIU Zhiwei wrote:
>
>
> On 2021/4/20 上午7:25, Alistair Francis wrote:
> > On Fri, Apr 9, 2021 at 5:56 PM LIU Zhiwei wrote:
> >> The Core-Local Interrupt Controller (CLIC) provides low-latency,
> >> vectored, pre-emptive interrupts for RISC-V systems.
> >>
> >> The
On Tue, Apr 20, 2021 at 5:20 PM LIU Zhiwei wrote:
>
>
> On 2021/4/20 下午2:26, Alistair Francis wrote:
> > On Tue, Apr 20, 2021 at 11:45 AM LIU Zhiwei wrote:
> >>
> >> On 2021/4/20 上午7:30, Alistair Francis wrote:
> >>> On Fri, Apr 9, 2021 at 5:56 PM LIU Zhiwei wrote:
> This patch set gives an
On Wed, Apr 21, 2021 at 11:33 PM Emmanuel Blot wrote:
>
> Interrupt names have been swapped in 205377f8 and do not follow
> IRQ_*_EXT definition order.
>
> Signed-off-by: Emmanuel Blot
Reviewed-by: Alistair Francis
Alistair
> ---
> target/riscv/cpu.c | 2 +-
> 1 file changed, 1 insertion(+),
A hash table made using ``g_hash_table_new`` requires manually
freeing any dynamically allocated keys/values. The two patches
in this series fixes this issue in hotblocks and hotpages plugins.
v1 -> v2: Added a freeing function to hotpages instead of freeing
the sorted list. That's probably be
Freed the values stored in the hash table ``hotblocks``
returned by ``g_hash_table_get_values()`` by freeing the sorted
list and destroyed the hash table afterward.
Signed-off-by: Mahmoud Mandour
---
contrib/plugins/hotblocks.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
Allocated ``pages`` hash table through ``g_hash_table_new_full`` to
add a freeing function & destroyed the hash table on exit.
Signed-off-by: Mahmoud Mandour
---
contrib/plugins/hotpages.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/contrib/plugins/hotpages.c b/contrib/
On 4/19/21 6:31 PM, frank.ch...@sifive.com wrote:
+return 3; /* deafult NaN */
Late notice of spelling error: default.
r~
On 4/19/21 2:43 AM, Philippe Mathieu-Daudé wrote:
Not really RFC, simply that I'v to add the technical description,
but I'd like to know if there could be a possibility to not accept
this device (because I missed something) before keeping working on
it. So far it is only used in hobbyist boards.
On 4/19/21 2:43 AM, Philippe Mathieu-Daudé wrote:
To be able to manually map the flash region on the main memory
(in the next commit), first expand the pflash_cfi02_register
in place.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/arm/musicpal.c | 27 +--
1 file changed
On 4/19/21 2:43 AM, Philippe Mathieu-Daudé wrote:
Instead of using a device specific feature for mapping the
flash memory multiple times over a wider region, use the
generic memory_region_add_subregion_aliased() helper.
There is no change in the memory layout:
- before:
(qemu) info mtree
On 4/19/21 2:43 AM, Philippe Mathieu-Daudé wrote:
To be able to manually map the flash region on the main memory
(in the next commit), first expand the pflash_cfi02_register
in place.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/arm/digic_boards.c | 27 +--
1 file cha
On Thu, Apr 22, 2021 at 11:06 AM Richard Henderson
wrote:
>
> On 4/19/21 6:31 PM, frank.ch...@sifive.com wrote:
> > +return 3; /* deafult NaN */
>
> Late notice of spelling error: default.
Fixed when I applied it.
Thanks!
Applied to riscv-to-apply.next
Alistair
>
> r~
>
On 4/19/21 2:43 AM, Philippe Mathieu-Daudé wrote:
Instead of using a device specific feature for mapping the
flash memory multiple times over a wider region, use the
generic memory_region_add_subregion_aliased() helper.
There is no change in the memory layout.
* before:
$ qemu-system-arm -M
On 4/19/21 2:43 AM, Philippe Mathieu-Daudé wrote:
All boards calling pflash_cfi02_register() use nb_mappings=1,
which does not do any mapping:
$ git grep -wl pflash_cfi02_register hw/
hw/arm/xilinx_zynq.c
hw/block/pflash_cfi02.c
hw/lm32/lm32_boards.c
hw/ppc/ppc405_boards.c
hw/s
On 4/19/21 2:43 AM, Philippe Mathieu-Daudé wrote:
The previous commit removed the mapping code from TYPE_PFLASH_CFI02.
pflash_cfi02_register() doesn't use the 'nb_mappings' argument
anymore. Simply remove it to simplify.
Reviewed-by: David Gibson
Signed-off-by: Philippe Mathieu-Daudé
Reviewe
On Wed, Apr 14, 2021 at 1:42 PM Richard Henderson
wrote:
>
> On 4/13/21 4:34 PM, Alistair Francis wrote:
> > -#ifndef CONFIG_USER_ONLY
> > -# ifdef TARGET_RISCV32
> > -# define is_32bit(ctx) true
> > -# else
> > +#ifdef TARGET_RISCV32
> > +# define is_32bit(ctx) true
> > +#else
> > static inl
On Wed, Apr 21, 2021 at 12:24:22PM +0530, Ravi Bangoria wrote:
> Hi Cedric,
>
> On 4/21/21 12:01 PM, Cédric Le Goater wrote:
> > On 4/21/21 8:20 AM, Ravi Bangoria wrote:
> > > Hi David,
> > >
> > > On 4/19/21 10:23 AM, David Gibson wrote:
> > > > On Mon, Apr 12, 2021 at 05:14:33PM +0530, Ravi Ban
On Wed, Apr 21, 2021 at 04:50:12PM +1000, Alexey Kardashevskiy wrote:
>
>
> On 4/21/21 15:27, David Gibson wrote:
> > On Tue, Apr 20, 2021 at 07:16:35PM +1000, Alexey Kardashevskiy wrote:
> > > On 20/04/2021 13:14, David Gibson wrote:
[snip]
> > > > > diff --git a/pc-bios/vof/Makefile b/pc-bios/v
在 2021/4/21 下午11:22, Cole Robinson 写道:
Attempting to hotplug a tap nic with libvirt will crash qemu:
$ sudo virsh attach-interface f32 network default
error: Failed to attach interface
error: Unable to read from monitor: Connection reset by peer
0x55875b7f3a99 in tap_send (opaque=0x55875e
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
merge-request (and CI): https://gitlab.com/jsnow/qemu/-/merge_requests/3
I encourage you to leave co
With the QAPISourceInfo(None, None, None) construct gone, there's not
really any reason to have to specify that a file starts on the first
line.
Remove it from the initializer and have it default to 1.
Remove the last vestiges where we check for 'line' being unset. That
won't happen again, now!
No self, no thank you!
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 8d1fe0ddda5..f2425c0228a 100644
--- a/scripts/qapi/parser.py
+++ b/scripts/qapi/parser.py
@@
The single quote token implies the value is a string. Assert this to be
the case.
Signed-off-by: John Snow
---
scripts/qapi/parser.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py
index 6b443b1247e..8d1fe0ddda5 100644
--- a/scripts/qapi/par
The short-ish version of what motivates this patch is:
- The parser initializer does not possess adequate context to write a
good error message -- It tries to determine the caller's semantic
context.
- We don't want to allow QAPISourceInfo(None, None, None) to exist.
- Errors made using such a
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 insertion
get_expr can return many things, depending on where it is used. In the
outer parsing loop, we expect and require it to return a dict.
(It's (maybe) a bit involved to teach mypy that when nested is False,
this is already always True. I'll look into it later, maybe.)
Signed-off-by: John Snow
---
Signed-off-by: John Snow
---
My hubris is infinite.
OK, I only added a few -- to help me remember how the parser works at a glance.
Signed-off-by: John Snow
---
scripts/qapi/parser.py | 66 ++
1 file changed, 66 insertions(+)
diff --git a/scripts/qapi
This is a silly one, but... it's important to have fun.
This patch isn't *needed*, it's here as an RFC. In trying to experiment
with different ways to solve the problem addressed by the previous
commit, I kept getting confused at how the "source location" string with
line and column number was bui
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. We can still invoke it from the init
method to reduce churn.
To accomplish this, 'previously_included' because the private
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
Annotations do not change runtime behavior.
This commit *only* adds annotations.
(Annotations for QAPIDoc are in a later commit.)
Signed-off-by: John Snow
---
scripts/qapi/parser.py | 61 --
1 file changed, 41 insertions(+), 20 deletions(-)
diff --git a/
Mypy cannot generally understand that these regex functions cannot
possibly fail. Add a _nofail helper that clarifies this for mypy.
Signed-off-by: John Snow
---
scripts/qapi/common.py | 8 +++-
scripts/qapi/main.py | 6 ++
scripts/qapi/parser.py | 13 +++--
3 files changed, 1
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-b
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 intermediate
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 in-line under _pragma so it can use
the 'info' object in
Teach mypy that there are two possible return types here: either an
Expression, or ... something else.
Not a SLOC reduction, but it does remove an assertion. It also isn't
much safer than a cast, mypy has no insight into if overloads are true
or not. It's on the honor system.
I thought I'd demons
When the token can be None, 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, if not a little ugly.
Signed-off-by: John Snow
---
scripts/qapi/parser.py | 5 +++--
1 file changed, 3 insertions(+), 2 del
101 - 200 of 310 matches
Mail list logo