Re: [PATCH v6 1/9] hw/i2c/core: Add i2c_try_create_slave() and i2c_realize_and_unref()

2020-06-26 Thread Philippe Mathieu-Daudé
On Fri, Jun 26, 2020 at 8:27 PM Peter Maydell wrote: > On Tue, 23 Jun 2020 at 08:27, Philippe Mathieu-Daudé wrote: > > Extract i2c_try_create_slave() and i2c_realize_and_unref() > > from i2c_create_slave(). > > We can now set properties on a I2CSlave before it is realized. > > > > This is in line

Re: [PATCH v2 0/2] linux-user/sparc64: Translate flushw opcode

2020-06-26 Thread Richard Henderson
On 6/25/20 2:12 AM, Laurent Vivier wrote: > I send a modified version according to Richard's comments of the original > series sent by Giuseppe Musacchio (aka LemonBoy). > > v2: split patch in two patches > update comment style > > I didn't really test the new patches (except a build and "ma

Re: [PATCH 0/6] target/riscv: NaN-boxing for multiple precison

2020-06-26 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200626205917.4545-1-zhiwei_...@c-sky.com/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN ===

Re: [PATCH] hw/core/null-machine: Do not initialize unused chardev backends

2020-06-26 Thread Richard Henderson
On 6/24/20 3:56 AM, Philippe Mathieu-Daudé wrote: > The MachineClass uses an inverted logic (inherited from the > PC machines [*]) to create the chardev backends for the default > devices (see commits 998bbd74b9d..aa40fc9c964 and ac33f8fad14). > > As the none-machine doesn't have any hardware devi

[PATCH 6/6] target/riscv: clean up fmv.w.x

2020-06-26 Thread LIU Zhiwei
Signed-off-by: LIU Zhiwei --- target/riscv/insn_trans/trans_rvf.inc.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/target/riscv/insn_trans/trans_rvf.inc.c b/target/riscv/insn_trans/trans_rvf.inc.c index b0379b9d1f..fabcd0eccf 100644 --- a/target/riscv/insn_trans/trans

[PATCH 5/6] target/riscv: Flush not valid NaN-boxing input to canonical NaN

2020-06-26 Thread LIU Zhiwei
Signed-off-by: LIU Zhiwei --- target/riscv/insn_trans/trans_rvd.inc.c | 7 +- target/riscv/insn_trans/trans_rvf.inc.c | 272 2 files changed, 235 insertions(+), 44 deletions(-) diff --git a/target/riscv/insn_trans/trans_rvd.inc.c b/target/riscv/insn_trans/trans_rvd.in

[PATCH 4/6] target/riscv: check before allocating TCG temps

2020-06-26 Thread LIU Zhiwei
Signed-off-by: LIU Zhiwei --- target/riscv/insn_trans/trans_rvd.inc.c | 8 target/riscv/insn_trans/trans_rvf.inc.c | 8 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/target/riscv/insn_trans/trans_rvd.inc.c b/target/riscv/insn_trans/trans_rvd.inc.c index cd73a32

[PATCH 3/6] target/riscv: Check for LEGAL NaN-boxing

2020-06-26 Thread LIU Zhiwei
A narrow n-bit operation, where n < FLEN, checks that input operands are correctly NaN-boxed, i.e., all upper FLEN - n bits are 1. If so, the n least-significant bits of the input are used as the input value, otherwise the input value is treated as an n-bit canonical NaN. Signed-off-by: LIU Zhiwei

[PATCH 2/6] target/riscv: NaN-boxing compute, sign-injection and convert instructions.

2020-06-26 Thread LIU Zhiwei
An n-bit foating-point result is written to the n least-significant bits of the destination f register, with all 1s written to the uppermost FLEN - n bits to yield a legal NaN-boxed value Signed-off-by: LIU Zhiwei --- target/riscv/insn_trans/trans_rvd.inc.c | 1 + target/riscv/insn_trans/trans_

[PATCH 1/6] target/riscv: move gen_nanbox_fpr to translate.c

2020-06-26 Thread LIU Zhiwei
As this function will be used by fcvt.d.s in trans_rvd.inc.c, make it a visible function for RVF and RVD. Signed-off-by: LIU Zhiwei --- target/riscv/insn_trans/trans_rvf.inc.c | 14 -- target/riscv/translate.c| 14 ++ 2 files changed, 14 insertions(+), 14

[PATCH 0/6] target/riscv: NaN-boxing for multiple precison

2020-06-26 Thread LIU Zhiwei
Multiple precison shoule be supported by NaN-boxing. That means, we should flush not valid NaN-boxing input to canonical NaN before effective calculation and we should NaN-boxing the result after the effective calculation. In this patch set, split the implementation to three steps for compute, sig

RE: [PATCH 1/2] hw/386: Fix uninitialized memory with -device and CPU hotplug

2020-06-26 Thread Babu Moger
> -Original Message- > From: Moger, Babu > Sent: Thursday, June 25, 2020 5:55 PM > To: Igor Mammedov > Cc: ehabk...@redhat.com; m...@redhat.com; qemu-devel@nongnu.org; > pbonz...@redhat.com; r...@twiddle.net > Subject: Re: [PATCH 1/2] hw/386: Fix uninitialized memory with -device and CP

[PATCH v4 16/16] python/qemu: Add mypy type annotations

2020-06-26 Thread John Snow
These should all be purely annotations with no changes in behavior at all. You need to be in the python folder, but you should be able to confirm that these annotations are correct (or at least self-consistent) by running `mypy --strict qemu`. Signed-off-by: John Snow Reviewed-by: Kevin Wolf ---

[PATCH v4 12/16] python/machine.py: Add _qmp access shim

2020-06-26 Thread John Snow
Like many other Optional[] types, it's not always a given that this object will be set. Wrap it in a type-shim that raises a meaningful error and will always return a concrete type. Signed-off-by: John Snow --- python/qemu/machine.py | 20 +++- 1 file changed, 11 insertions(+), 9

[PATCH v4 11/16] python/machine.py: use qmp.command

2020-06-26 Thread John Snow
machine.py and qmp.py both do the same thing here; refactor machine.py to use qmp.py's functionality more directly. Signed-off-by: John Snow Reviewed-by: Kevin Wolf --- python/qemu/machine.py | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/python

[PATCH v4 14/16] python/qemu: make 'args' style arguments immutable

2020-06-26 Thread John Snow
These arguments don't need to be mutable and aren't really used as such. Clarify their types as immutable and adjust code to match where necessary. In general, It's probably best not to accept a user-defined mutable object and store it as internal object state unless there's a strong justification

[PATCH v4 15/16] iotests.py: Adjust HMP kwargs typing

2020-06-26 Thread John Snow
mypy wants to ensure there's consistency between the kwargs arguments types and any unspecified keyword arguments. In this case, conv_keys is a bool, but the remaining keys are Any type. Mypy (correctly) infers the **kwargs type to be **Dict[str, str], which is not compatible with conv_keys: bool.

[PATCH v4 00/16] python: add mypy support to python/qemu

2020-06-26 Thread John Snow
Based-on: 20200626202350.11060-1-js...@redhat.com This series modifies the python/qemu library to comply with mypy --strict. This requires my "refactor shutdown" patch as a pre-requisite. v4: 001/16:[] [--] 'python/qmp.py: Define common types' 002/16:[] [--] 'iotests.py: use qemu.qmp type

[PATCH v4 10/16] python/machine.py: Handle None events in events_wait

2020-06-26 Thread John Snow
If the timeout is 0, we can get None back. Handle this explicitly. Signed-off-by: John Snow Reviewed-by: Kevin Wolf --- python/qemu/machine.py | 27 --- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/python/qemu/machine.py b/python/qemu/machine.py index 8

[PATCH v4 05/16] python/qmp.py: add casts to JSON deserialization

2020-06-26 Thread John Snow
mypy and python type hints are not powerful enough to properly describe JSON messages in Python 3.6. The best we can do, generally, is describe them as Dict[str, Any]. Add casts to coerce this type for static analysis; but do NOT enforce this type at runtime in any way. Note: Python 3.8 adds a Ty

[PATCH v4 13/16] python/machine.py: fix _popen access

2020-06-26 Thread John Snow
As always, Optional[T] causes problems with unchecked access. Add a helper that asserts the pipe is present before we attempt to talk with it. Signed-off-by: John Snow Reviewed-by: Kevin Wolf --- python/qemu/machine.py | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) d

[PATCH v4 03/16] python/qmp.py: re-absorb MonitorResponseError

2020-06-26 Thread John Snow
When I initially split this out, I considered this more of a machine error than a QMP protocol error, but I think that's misguided. Move this back to qmp.py and name it QMPResponseError. Convert qmp.command() to use this exception type. Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daud

[PATCH v4 08/16] python/machine.py: reorder __init__

2020-06-26 Thread John Snow
Put the init arg handling all at the top, and mostly in order (deviating when one is dependent on another), and put what is effectively runtime state declaration at the bottom. Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Kevin Wolf --- python/qemu/machine.py | 29

[PATCH v4 06/16] python/qmp.py: add QMPProtocolError

2020-06-26 Thread John Snow
In the case that we receive a reply but are unable to understand it, use this exception name to indicate that case. Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Kevin Wolf --- python/qemu/qmp.py | 10 ++ 1 file changed, 10 insertions(+) diff --git a/python

[PATCH v4 09/16] python/machine.py: Don't modify state in _base_args()

2020-06-26 Thread John Snow
Don't append to the _remove_files list during _base_args; instead do so during _launch. Rework _base_args as a @property to help facilitate this impression. This has the additional benefit of making the type of _console_address easier to analyze statically. Signed-off-by: John Snow Reviewed-by:

[PATCH v4 02/16] iotests.py: use qemu.qmp type aliases

2020-06-26 Thread John Snow
iotests.py should use the type definitions from qmp.py instead of its own. Signed-off-by: John Snow Reviewed-by: Kevin Wolf --- tests/qemu-iotests/iotests.py | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.p

[PATCH v4 04/16] python/qmp.py: Do not return None from cmd_obj

2020-06-26 Thread John Snow
This makes typing the qmp library difficult, as it necessitates wrapping Optional[] around the type for every return type up the stack. At some point, it becomes difficult to discern or remember why it's None instead of the expected object. Use the python exception system to tell us exactly why we

[PATCH v4 07/16] python/machine.py: Fix monitor address typing

2020-06-26 Thread John Snow
Prior to this, it's difficult for mypy to intuit what the concrete type of the monitor address is; it has difficulty inferring the type across two variables. Create _monitor_address as a property that always returns a valid address to simplify static type analysis. To preserve our ability to clea

[PATCH v4 01/16] python/qmp.py: Define common types

2020-06-26 Thread John Snow
Define some common types that we'll need to annotate a lot of other functions going forward. Signed-off-by: John Snow Reviewed-by: Kevin Wolf --- python/qemu/qmp.py | 18 ++ 1 file changed, 18 insertions(+) diff --git a/python/qemu/qmp.py b/python/qemu/qmp.py index e64b6b5faa..

Re: [PATCH v2 1/2] tests/qht-bench: Adjust testing rate by -1

2020-06-26 Thread Philippe Mathieu-Daudé
On 6/26/20 10:09 PM, Richard Henderson wrote: > Since the seed must be non-zero, subtracting 1 means puts the > rate in 0..UINT64_MAX-1, which allows the 0 and UINT64_MAX > thresholds to corrspond to 0% (never) and 100% (always). > > Suggested-by: Emilio G. Cota > Signed-off-by: Richard Henderson

Re: [PATCH v2 2/2] tests/qht-bench: Adjust threshold computation

2020-06-26 Thread Philippe Mathieu-Daudé
On 6/26/20 10:09 PM, Richard Henderson wrote: > In 06c4cc3660b3, we split the multiplication in two parts to avoid > a clang warning. But because double still rounds to 53 bits, this > does not provide additional precision beyond multiplication by > nextafter(0x1p64, 0), the largest representable

Re: [PATCH v3 12/16] python/machine.py: Add _qmp access shim

2020-06-26 Thread John Snow
On 6/22/20 7:32 AM, Philippe Mathieu-Daudé wrote: > On 6/22/20 12:23 PM, Kevin Wolf wrote: >> Am 20.06.2020 um 10:20 hat Philippe Mathieu-Daudé geschrieben: >>> On Sat, Jun 20, 2020 at 10:14 AM Philippe Mathieu-Daudé >>> wrote: On 6/4/20 10:22 PM, John Snow wrote: > Like many ot

Re: [PATCH] util/qemu-error: prepend guest name to error message to identify affected VM owner

2020-06-26 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200626201900.8876-1-msmard...@digitalocean.com/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEG

[Bug 1885332] [NEW] Error in user-mode calculation of ELF aux vector's AT_PHDR

2020-06-26 Thread Langston
Public bug reported: I have an (admittedly strange) statically-linked ELF binary for Linux that runs just fine on top of the Linux kernel in QEMU full-system emulation, but crashes before main in user-mode emulation. Specifically, it crashes when initializing thread-local storage in glibc's _d

[PATCH v4 2/3] python/machine.py: refactor shutdown

2020-06-26 Thread John Snow
This is done primarily to avoid the 'bare except' pattern, which suppresses ALL exceptions and not just ones that we are anticipating to see. Replace this with a pattern that isolates the different kind of shutdown paradigms and a new fallback shutdown handler that gracefully attempts one before t

[PATCH v4 0/3] python/machine.py: refactor shutdown

2020-06-26 Thread John Snow
v4: 001/3:[] [--] 'python/machine.py: consolidate _post_shutdown()' 002/3:[0010] [FC] 'python/machine.py: refactor shutdown' 003/3:[] [--] 'python/machine.py: re-add sigkill warning suppression' - Rebased - Fixed exception handler to actually handle exception :( v3: - Split _post_shutdo

[PATCH v4 3/3] python/machine.py: re-add sigkill warning suppression

2020-06-26 Thread John Snow
If the user kills QEMU on purpose, we don't need to warn them about that having happened: they know already. Signed-off-by: John Snow --- python/qemu/machine.py | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/python/qemu/machine.py b/python/qemu/machine.py index 66a9

[PATCH v4 1/3] python/machine.py: consolidate _post_shutdown()

2020-06-26 Thread John Snow
Move more cleanup actions into _post_shutdown. As a change, if QEMU should so happen to be terminated during a call to wait(), that event will now be logged. This is not likely to occur during normative use. Signed-off-by: John Snow --- python/qemu/machine.py | 27 +-- 1

Re: [PATCH v2 0/2] tests/qht-bench: Adjust rate/threshold computation

2020-06-26 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200626200950.1015121-1-richard.hender...@linaro.org/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIP

[PATCH] util/qemu-error: prepend guest name to error message to identify affected VM owner

2020-06-26 Thread Mario Smarduch
This is followup patch to the one submitted back in Oct, 19 https://lists.gnu.org/archive/html/qemu-devel/2019-10/msg02102.html My mistake here, I took my eyes of the mailing list after I got the initial thumbs up. This patch follows up on Markus comments in the above link. Purpose of this patch

Re: [PATCH] hw/arm: Add 'virtm' hardware

2020-06-26 Thread Keith Packard
Max Filippov writes: > Most of them are due to unsupported/differently implemented > syscalls. Yeah, I think that was the basis of my confusion -- qemu-arm is not a bare metal environment, and my work is focused on enabling application development in that environment. -- -keith signature.asc

Re: [PATCH] hw/arm: Add 'virtm' hardware

2020-06-26 Thread Keith Packard
Peter Maydell writes: > You might find the user-mode qemu-arm sufficient for that > kind of thing. I know some gcc tests run that way. You > get a processor, semihosting, and whatever memory your > ELF file's data segment says you have (plus anything > you care to mmap()). Thanks for the pointer

QEMU | Pipeline #160595897 has failed for master | 553cf5d7

2020-06-26 Thread GitLab via
Your pipeline has failed. Project: QEMU ( https://gitlab.com/qemu-project/qemu ) Branch: master ( https://gitlab.com/qemu-project/qemu/-/commits/master ) Commit: 553cf5d7 ( https://gitlab.com/qemu-project/qemu/-/commit/553cf5d7c47bee05a3dec9461c1f8430316d516b ) Commit Message: Merge remote-tr

[PATCH v2 2/2] tests/qht-bench: Adjust threshold computation

2020-06-26 Thread Richard Henderson
In 06c4cc3660b3, we split the multiplication in two parts to avoid a clang warning. But because double still rounds to 53 bits, this does not provide additional precision beyond multiplication by nextafter(0x1p64, 0), the largest representable value smaller than 2**64. However, since we have elim

[PATCH v2 1/2] tests/qht-bench: Adjust testing rate by -1

2020-06-26 Thread Richard Henderson
Since the seed must be non-zero, subtracting 1 means puts the rate in 0..UINT64_MAX-1, which allows the 0 and UINT64_MAX thresholds to corrspond to 0% (never) and 100% (always). Suggested-by: Emilio G. Cota Signed-off-by: Richard Henderson --- tests/qht-bench.c | 22 +++--- 1 fi

[PATCH v2 0/2] tests/qht-bench: Adjust rate/threshold computation

2020-06-26 Thread Richard Henderson
Supercedes: <20200620214551.447392-1-richard.hender...@linaro.org> Thanks for Emilio's review of v1. I've split "seed" from "rate" as suggested, left the comparisons alone, and expanded the comment in do_threshold. r~ Richard Henderson (2): tests/qht-bench: Adjust testing rate by -1 tests

Re: [PATCH v1 12/18] tests/vm: allow us to take advantage of MTTCG

2020-06-26 Thread Alex Bennée
Richard Henderson writes: > On 6/22/20 7:31 AM, Alex Bennée wrote: >> if kvm_available(vmcls.arch): >> return multiprocessing.cpu_count() // 2 >> +elif os.uname().machine == "x86_64" and \ >> + vmcls.arch in ["aarch64", "x86_64", "i386"]: >> +

Re: [PATCH v3 00/30] testing/next (gitlab, vm, docker)

2020-06-26 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200626181357.26211-1-alex.ben...@linaro.org/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN

Re: [PULL 00/57] target-arm queue

2020-06-26 Thread Peter Maydell
e-tracking branch 'remotes/mcayland/tags/qemu-macppc-20200626' > into staging (2020-06-26 12:14:18 +0100) > > are available in the Git repository at: > > https://git.linaro.org/people/pmaydell/qemu-arm.git > tags/pull-target-arm-20200626 > > for you to fetch cha

Re: [PATCH v3 3/3] riscv: Add opensbi firmware dynamic support

2020-06-26 Thread Atish Patra
On Fri, Jun 26, 2020 at 5:18 AM Bin Meng wrote: > > Hi Atish, > > On Fri, Jun 26, 2020 at 8:33 AM Atish Patra wrote: > > > > OpenSBI is the default firmware in Qemu and has various firmware loading > > options. Currently, qemu loader uses fw_jump which has a compile time > > pre-defined address w

Re: [PATCH v4 1/7] qdev: add support for device module loading

2020-06-26 Thread Richard Henderson
On 6/22/20 6:55 AM, Gerd Hoffmann wrote: > @@ -147,6 +150,9 @@ DeviceState *qdev_new(const char *name) > */ > DeviceState *qdev_try_new(const char *name) > { > +if (!object_class_by_name(name)) { > +qdev_module_load_type(name); > +} > if (!object_class_by_name(name)) { >

Re: [PATCH 3/3] virtiofsd: Allow addition or removal of capabilities

2020-06-26 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@redhat.com) wrote: > On Thu, Jun 25, 2020 at 05:29:29PM +0100, Dr. David Alan Gilbert (git) wrote: > > +/* > > + * The modcaps option is a colon separated list of caps, > > + * each preceded by either + or -. > > + */ > > +while (lo->modcaps) { > > +

QEMU | Pipeline #160573945 has failed for master | 3591ddd3

2020-06-26 Thread GitLab via
Your pipeline has failed. Project: QEMU ( https://gitlab.com/qemu-project/qemu ) Branch: master ( https://gitlab.com/qemu-project/qemu/-/commits/master ) Commit: 3591ddd3 ( https://gitlab.com/qemu-project/qemu/-/commit/3591ddd39987cbdaa0cfa344a262f315abd97582 ) Commit Message: Merge remote-tr

Re: [PULL 00/84] QOM patches for 2020-06-15

2020-06-26 Thread Peter Maydell
On Mon, 15 Jun 2020 at 21:43, Markus Armbruster wrote: > > The following changes since commit 7d3660e79830a069f1848bb4fa1cdf8f666424fb: > > Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into > staging (2020-06-12 23:06:22 +0100) > > are available in the Git repository at: > >

Re: [PATCH v2] timer: Handle decrements of PIT counter

2020-06-26 Thread Kevin O'Connor
On Fri, Jun 26, 2020 at 09:06:58PM +0300, Roman Bolshakov wrote: > There's a fallback to PIT if TSC is not present but it doesn't work > properly. It prevents boot from floppy on isapc and 486 cpu [1][2]. > > SeaBIOS configures PIT in Mode 2. PIT counter is decremented in the mode > but timer_adju

Re: [PATCH v6 1/9] hw/i2c/core: Add i2c_try_create_slave() and i2c_realize_and_unref()

2020-06-26 Thread Peter Maydell
On Tue, 23 Jun 2020 at 08:27, Philippe Mathieu-Daudé wrote: > > Extract i2c_try_create_slave() and i2c_realize_and_unref() > from i2c_create_slave(). > We can now set properties on a I2CSlave before it is realized. > > This is in line with the recent qdev/QOM changes merged > in commit 6675a653d2e

[PATCH v3 25/30] tests/docker: add a linux-user testing focused image

2020-06-26 Thread Alex Bennée
We happily use all the cross images for both cross-building QEMU as well as building the linux-user tests. However calling docker from within docker seems not to work. As we can build in Debian anyway why not include an image that has all the compilers available for non-docker invocation. Signed-o

Re: [PATCH v1 12/18] tests/vm: allow us to take advantage of MTTCG

2020-06-26 Thread Richard Henderson
On 6/22/20 7:31 AM, Alex Bennée wrote: > if kvm_available(vmcls.arch): > return multiprocessing.cpu_count() // 2 > +elif os.uname().machine == "x86_64" and \ > + vmcls.arch in ["aarch64", "x86_64", "i386"]: > +# MTTCG is available on these arche

[PATCH v3 29/30] gitlab: limit re-builds of the containers

2020-06-26 Thread Alex Bennée
Most of the time we are just rebuilding the same things. We can skip this although currently there is no mechanism for picking up new distro releases. Rather than try to be too fine grained allow any change to trigger all the images being rebuilt. Signed-off-by: Alex Bennée --- .gitlab-ci.d/con

[PATCH v3 23/30] tests/docker: add packages needed for check-acceptance

2020-06-26 Thread Alex Bennée
We need additional python packages to run check-acceptance. Add them to the docker images we will be using later. Signed-off-by: Alex Bennée --- tests/docker/dockerfiles/fedora.docker | 7 +++ tests/docker/dockerfiles/ubuntu2004.docker | 10 +- 2 files changed, 16 insertions(+),

[PATCH v3 15/30] tests/docker: change tag naming scheme of our images

2020-06-26 Thread Alex Bennée
We've been misusing the tag naming scheme for some time by overloading the post : section with the image type. Really it should be saved for the revision of that particular build. Move the details to the other side so we have: qemu/image-name with the implied :latest version added by the toolin

[PATCH v3 19/30] gitlab: build all container images during CI

2020-06-26 Thread Alex Bennée
From: Daniel P. Berrangé We have a number of container images in tests/docker/dockerfiles that are intended to provide well defined environments for doing test builds. We want our CI system to use these containers too. This introduces builds of all of them as the first stage in the CI, so that t

[PATCH v3 27/30] gitlab: add avocado asset caching

2020-06-26 Thread Alex Bennée
These can be quite big so lets cache them. I couldn't find any nots on ccache in the gitlab docs so I've just ignored it for now. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20200622143204.12921-19-alex.ben...@linaro.org> --- .gitlab-ci.yml | 6 ++ 1 file cha

[PATCH v3 26/30] gitlab: enable check-tcg for linux-user tests

2020-06-26 Thread Alex Bennée
Switch to building in the new debian-all-test-cross image which has most of the cross compilers inline. Signed-off-by: Alex Bennée --- .gitlab-ci.yml | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5ae8130bd1a..17c3349dd9e 100644 -

[PATCH v3 09/30] tests/vm: change scripts to use self._config

2020-06-26 Thread Alex Bennée
From: Robert Foley This change converts existing scripts to using for example self.ROOT_PASS, to self._config['root_pass']. We made similar changes for GUEST_USER, and GUEST_PASS. This allows us also to remove the change in basevm.py, which adds __getattr__ for backwards compatibility. Signed-of

[PATCH v3 24/30] gitlab: add acceptance testing to system builds

2020-06-26 Thread Alex Bennée
As part of migrating things from Travis to GitLab add the acceptance tests. To do this: - rename system1 to system-ubuntu-main - rename system2 to system-fedora-misc - split into build/check/acceptance - remove -j from check stages - use artifacts to save build stage - add post accepta

[PATCH v3 16/30] .gitignore: un-ignore .gitlab-ci.d

2020-06-26 Thread Alex Bennée
The sooner we deprecate in-tree builds the sooner this mess of regexes can be thrown away. Signed-off-by: Alex Bennée --- v2 - just use explicit !/.gitlab-ci.d --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 90acb4347d4..2992d15931a 100644 ---

[PATCH v3 22/30] tests/docker: add --registry support to tooling

2020-06-26 Thread Alex Bennée
This allows us to point the tools towards a registry from which they can grab pre-built layers instead of doing everything from scratch each time. To enable this we need to be using the DOCKER_BUILDKIT engine. [AJB: note registry.gitlab.com/stsquad/qemu is for my testing, the final version will se

[PATCH v3 10/30] python/qemu: Add ConsoleSocket for optional use in QEMUMachine

2020-06-26 Thread Alex Bennée
From: Robert Foley We add the ConsoleSocket object, which has a socket interface and which will consume all arriving characters on the socket, placing them into an in memory buffer. This will also provide those chars via recv() as would a regular socket. ConsoleSocket also has the option of dumpi

[PATCH v3 30/30] containers.yml: build with docker.py tooling

2020-06-26 Thread Alex Bennée
Instead of building the docker files directly use the same docker.py scripting as we do for building locally. This should help ensure we use the exact same steps and allow us to cache properly when building locally. To get this working you have to have a fairly recent docker binary otherwise you w

[PATCH v3 20/30] gitlab: convert jobs to use custom built containers

2020-06-26 Thread Alex Bennée
From: Daniel P. Berrangé Now that we're building standard container images from dockerfiles in tests/docker/dockerfiles, we can convert the build jobs to use them. The key benefit of this is that a contributor can now more easily replicate the CI environment on their local machine. The container

[PATCH v3 28/30] gitlab: split build-disabled into two phases

2020-06-26 Thread Alex Bennée
As we run check-qtest in "SLOW" mode this can timeout so split into two jobs. Signed-off-by: Alex Bennée --- .gitlab-ci.yml | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eb5b335c1e9..c6f1addc2f3 100644 --- a/.gitlab-ci.yml

[PATCH v3 14/30] tests/docker: check for an parameters not empty string

2020-06-26 Thread Alex Bennée
Reported-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Suggested-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé --- tests/docker/common.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/docker/common.rc b/tests/docker/common.rc index 02cd67a8c5e..b27ce

[PATCH v3 08/30] tests/vm: Added a new script for centos.aarch64.

2020-06-26 Thread Alex Bennée
From: Robert Foley centos.aarch64 creates a CentOS 8 image. Also added a new kickstart script used to build the centos.aarch64 image. Signed-off-by: Robert Foley Reviewed-by: Peter Puhov Reviewed-by: Alex Bennée Signed-off-by: Alex Bennée Message-Id: <20200601211421.1277-7-robert.fo...@linar

Re: [PATCH 08/46] error: Avoid unnecessary error_propagate() after error_setg()

2020-06-26 Thread Vladimir Sementsov-Ogievskiy
24.06.2020 19:43, Markus Armbruster wrote: Replace error_setg(&err, ...); error_propagate(errp, err); by error_setg(errp, ...); Related pattern: if (...) { error_setg(&err, ...); goto out; } ... out: error_propagate(errp, err); retu

[PATCH v3 13/30] tests/vm: allow us to take advantage of MTTCG

2020-06-26 Thread Alex Bennée
We currently limit TCG guests to -smp 1 but now we have added some aarch64 guests we can do better when running on x86_64 hardware. Raise the limit for TCG guests when it is safe to do so. Signed-off-by: Alex Bennée Reviewed-by: Robert Foley --- tests/vm/basevm.py | 6 ++ 1 file changed, 6

[PATCH v3 07/30] tests/vm: Added a new script for ubuntu.aarch64.

2020-06-26 Thread Alex Bennée
From: Robert Foley ubuntu.aarch64 provides a script to create an Ubuntu 18.04 VM. Another new file is also added aarch64vm.py, which is a module with common methods used by aarch64 VMs, such as how to create the flash images. Signed-off-by: Robert Foley Reviewed-by: Peter Puhov Signed-off-by:

[PATCH v3 17/30] gitlab-ci: Fix the change rules after moving the YML files

2020-06-26 Thread Alex Bennée
From: Thomas Huth The edk2.yml and opensbi.yml files have recently been moved/renamed, but the change has not been reflected in the rules in the YML files yet. Fixes: 922febe2af ("Move edk2 and opensbi YAML files to .gitlab-ci.d folder") Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-

[PATCH v3 06/30] tests/vm: Add common Ubuntu python module

2020-06-26 Thread Alex Bennée
From: Robert Foley Add a common Ubuntu python module and make use of it with the ubuntu.i386 script. This is preparation for adding an Ubuntu script ubuntu.aarch64. Splitting out the common logic such as build_image() will reduce duplication. Signed-off-by: Robert Foley Tested-by: Philippe Mat

[PATCH v3 11/30] tests/vm: Add workaround to consume console

2020-06-26 Thread Alex Bennée
From: Robert Foley This adds support to basevm.py so that we always drain the console chars. This makes use of support added in an earlier commit that allows QEMUMachine to use the ConsoleSocket. This is a workaround we found was needed since there is a known issue where QEMU will hang waiting

[PATCH v3 03/30] tests/vm: pass args through to BaseVM's __init__

2020-06-26 Thread Alex Bennée
From: Robert Foley Adding the args parameter to BaseVM's __init__. We will shortly need to pass more parameters to the class so let's just pass args rather than growing the parameter list. Signed-off-by: Robert Foley Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Phil

[PATCH v3 21/30] gitlab: build containers with buildkit and metadata

2020-06-26 Thread Alex Bennée
According to the documentation to be able to use --cache-from for remote registries you need to enable both buildkit and inline the metadata. We want to do this to support pulling from gitlab when users build their local docker images. Signed-off-by: Alex Bennée --- .gitlab-ci.d/containers.yml |

[PATCH v3 04/30] tests/vm: Add configuration to basevm.py

2020-06-26 Thread Alex Bennée
From: Robert Foley Added use of a configuration to tests/vm/basevm.py. The configuration provides parameters used to configure a VM. This allows for providing alternate configurations to the VM being created/launched. cpu, machine, memory, and NUMA configuration are all examples of configuration

[PATCH v3 18/30] gitlab: introduce explicit "container" and "build" stages

2020-06-26 Thread Alex Bennée
From: Daniel P. Berrangé If no stage is listed, jobs get put in an implicit "test" stage. Some jobs which create container images to be used by later stages are currently listed as in a "build" stages. Signed-off-by: Daniel P. Berrangé Acked-by: Laszlo Ersek Signed-off-by: Alex Bennée Reviewe

[PATCH v3 02/30] crypto/linux_keyring: fix 'secret_keyring' configure test

2020-06-26 Thread Alex Bennée
From: David Edmondson The configure test for 'secret_keyring' incorrectly checked the 'have_keyring' variable. Fixes: 54e7aac0562452e4fcab65ca5001d030eef2de15 Signed-off-by: David Edmondson Signed-off-by: Alex Bennée Reviewed-by: Thomas Huth Message-Id: <20200618092636.71832-1-david.edmond...

[PATCH v3 12/30] tests/vm: switch from optsparse to argparse

2020-06-26 Thread Alex Bennée
optparse has been deprecated since version 3.2 and argparse is the blessed replacement. Take the opportunity to enhance our help output showing defaults when called. Signed-off-by: Alex Bennée Reviewed-by: Daniel P. Berrangé Reviewed-by: Robert Foley --- v2 - add explicit parser.add_argument

[PATCH v3 05/30] tests/vm: Added configuration file support

2020-06-26 Thread Alex Bennée
From: Robert Foley Changes to tests/vm/basevm.py to allow accepting a configuration file as a parameter. Allows for specifying VM options such as cpu, machine, memory, and arbitrary qemu arguments for specifying options such as NUMA configuration. Also added an example conf_example_aarch64.yml an

[PATCH v3 00/30] testing/next (gitlab, vm, docker)

2020-06-26 Thread Alex Bennée
Hi, This is the next iteration of my testing/next queue. The main changes from the last post: https://patchew.org/QEMU/20200624140446.15380-1-alex.ben...@linaro.org/ The GitLab docker patches are almost ready although there are a couple of problems running on GitLab's infrastructure which need

[PATCH v3 01/30] iotests: Fix 051 output after qdev_init_nofail() removal

2020-06-26 Thread Alex Bennée
From: Philippe Mathieu-Daudé Commit 96927c744 replaced qdev_init_nofail() call by isa_realize_and_unref() which has a different error message. Update the test output accordingly. Gitlab CI error after merging b77b5b3dc7: https://gitlab.com/qemu-project/qemu/-/jobs/597414772#L4375 Reported-by: T

[PATCH v2] timer: Handle decrements of PIT counter

2020-06-26 Thread Roman Bolshakov
There's a fallback to PIT if TSC is not present but it doesn't work properly. It prevents boot from floppy on isapc and 486 cpu [1][2]. SeaBIOS configures PIT in Mode 2. PIT counter is decremented in the mode but timer_adjust_bits() thinks that the counter overflows and increases 32-bit tick count

Re: [PATCH] hw/arm: Add 'virtm' hardware

2020-06-26 Thread Max Filippov
On Fri, Jun 26, 2020 at 10:32 AM Peter Maydell wrote: > You might find the user-mode qemu-arm sufficient for that > kind of thing. I know some gcc tests run that way. You > get a processor, semihosting, and whatever memory your > ELF file's data segment says you have (plus anything > you care to m

Re: [PATCH v5 08/15] hw/sd/sdcard: Check address is in range

2020-06-26 Thread Philippe Mathieu-Daudé
On 6/26/20 6:40 PM, Philippe Mathieu-Daudé wrote: > As a defense, assert if the requested address is out of the card area. > > Suggested-by: Peter Maydell > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/sd/sd.c | 18 ++ > 1 file changed, 10 insertions(+), 8 deletions(-) > >

Re: [PATCH 09/10] spice: Put spice functions in a separate load module

2020-06-26 Thread Daniel P . Berrangé
On Fri, Jun 26, 2020 at 06:43:06PM +0200, Christophe de Dinechin wrote: > Use the MODIFACE and MODIMPL macros to to redirect the highest-level > qemu_spice functions into the spice-app.so load module when SPICE is > compiled as a module. > > With these changes, the following shared libraries are n

Re: [PATCH] hw/arm: Add 'virtm' hardware

2020-06-26 Thread Peter Maydell
On Fri, 26 Jun 2020 at 17:40, Keith Packard wrote: > > Peter Maydell writes: > > > So, I'm really dubious about adding more "virtual" > > not-real-hardware boards. We have "virt" because we > > absolutely have to have it for KVM purposes; but otherwise > > "emulate real hardware" gives us a concr

Re: [PATCH 10/10] REMOVE: Instrumentation to show the module functions being replaced

2020-06-26 Thread Daniel P . Berrangé
On Fri, Jun 26, 2020 at 06:43:07PM +0200, Christophe de Dinechin wrote: > Signed-off-by: Christophe de Dinechin > --- > include/qemu/module.h | 4 > 1 file changed, 4 insertions(+) > > diff --git a/include/qemu/module.h b/include/qemu/module.h > index 1922a0293c..8d6e10ba81 100644 > ---

Re: [PATCH v3 0/3] python/machine.py: refactor shutdown

2020-06-26 Thread John Snow
On 6/20/20 6:14 AM, Philippe Mathieu-Daudé wrote: > On 6/17/20 7:13 PM, Philippe Mathieu-Daudé wrote: >> On 6/16/20 11:49 PM, Cleber Rosa wrote: >>> On Mon, Jun 15, 2020 at 05:21:18PM +0200, Philippe Mathieu-Daudé wrote: On 6/9/20 11:55 PM, John Snow wrote: > > > On 6/9/2

Re: [PATCH 08/10] build: Add SPICE_CFLAGS and SPICE_LIBS to relevant files

2020-06-26 Thread Daniel P . Berrangé
On Fri, Jun 26, 2020 at 06:43:05PM +0200, Christophe de Dinechin wrote: > Instead of adding the spice build flags to the top-level build > options, add them where they are necessary. This is a step to move the > burden of linking with spice libraries away from the top-level qemu. > > Signed-off-by

Re: [PATCH 05/10] build: Avoid build failure when building drivers as modules

2020-06-26 Thread Daniel P . Berrangé
On Fri, Jun 26, 2020 at 06:43:02PM +0200, Christophe de Dinechin wrote: > Signed-off-by: Gerd Hoffmann > Signed-off-by: Christophe de Dinechin > --- > Makefile.objs| 1 + > Makefile.target | 7 +++ > hw/Makefile.objs | 1 + > 3 files changed, 9 insertions(+) > > diff --git a/Makefile.o

Re: [PULL v2 00/31] Misc patches for 2020-06-24

2020-06-26 Thread Peter Maydell
On Fri, 26 Jun 2020 at 14:57, Paolo Bonzini wrote: > > The following changes since commit 5acc270a355120ce967ca1f1eeca0abbdb9303c8: > > Merge remote-tracking branch 'remotes/xtensa/tags/20200625-xtensa' into > staging (2020-06-25 21:20:45 +0100) > > are available in the Git repository at: > >

Re: [PATCH 07/46] error: Avoid more error_propagate() when error is not used here

2020-06-26 Thread Vladimir Sementsov-Ogievskiy
24.06.2020 19:43, Markus Armbruster wrote: When all we do with an Error we receive into a local variable is propagating to somewhere else, we can just as well receive it there right away. The previous commit did that for simple cases with Coccinelle. Do it for a few more manually. Signed-off-b

<    1   2   3   4   5   6   >