Re: [PATCH] console: make QMP screendump use coroutine

2020-02-19 Thread Markus Armbruster
Marc-André Lureau writes: > Thanks to the QMP coroutine support, the screendump handler can > trigger a graphic_hw_update(), yield and let the main loop run until > update is done. Then the handler is resumed, and the ppm_save() will > write the screen image to disk in the coroutine context

Re: [PULL SUBSYSTEM qemu-pseries] pseries: Update SLOF firmware image

2020-02-19 Thread Cédric Le Goater
On 2/20/20 2:50 AM, Alexey Kardashevskiy wrote: > > > On 19/02/2020 18:18, Cédric Le Goater wrote: >> On 2/19/20 7:44 AM, Alexey Kardashevskiy wrote: >>> >>> >>> On 19/02/2020 12:20, Alexey Kardashevskiy wrote: On 18/02/2020 23:59, Cédric Le Goater wrote: > On 2/18/20 1:48 PM,

Re: [PATCH v2 7/7] block/block-copy: hide structure definitions

2020-02-19 Thread Vladimir Sementsov-Ogievskiy
17.02.2020 17:04, Max Reitz wrote: On 27.11.19 19:08, Vladimir Sementsov-Ogievskiy wrote: Hide structure definitions and add explicit API instead, to keep an eye on the scope of the shared fields. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block-copy.h | 57

Re: [PATCH v2 6/7] block/block-copy: reduce intersecting request lock

2020-02-19 Thread Vladimir Sementsov-Ogievskiy
17.02.2020 16:38, Max Reitz wrote: On 27.11.19 19:08, Vladimir Sementsov-Ogievskiy wrote: Currently, block_copy operation lock the whole requested region. But there is no reason to lock clusters, which are already copied, it will disturb other parallel block_copy requests for no reason. Let's

[Bug 1823790] Re: QEMU mishandling of SO_PEERSEC forces systemd into tight loop

2020-02-19 Thread Charlie Sharpsteen
Laurent's patch worked for me as well. I grabbed the source for the Debian 10 qemu-user-static package, qemu_3.1+dfsg-8+deb10u3, applied the patch and re-built the qemu-arm- static binary. Copying the new binary into a Docker image based on arm32v7/debian:10-slim allowed /sbin/init to bring up

Re: [PATCH v2 1/5] vhost-user block device backend

2020-02-19 Thread Coiby Xu
Hi Kevin, Thank you for reviewing my work in a rather detailed way. > > blockdev-vu.c | 1008 > > include/block/vhost-user.h | 46 ++ > > vl.c |4 + > > 3 files changed, 1058 insertions(+) > > create mode 100644

Re: [PATCH v4 00/14] Fixes for DP8393X SONIC device emulation

2020-02-19 Thread Jason Wang
On 2020/2/19 下午3:55, Laurent Vivier wrote: Le 19/02/2020 à 02:57, Aleksandar Markovic a écrit : 2:54 AM Sre, 19.02.2020. Aleksandar Markovic mailto:aleksandar.m.m...@gmail.com>> је написао/ла: 2:06 AM Sre, 19.02.2020. Finn Thain > је написао/ла: On Tue,

Re: [PATCH v7 0/4] colo: Add support for continuous replication

2020-02-19 Thread Jason Wang
On 2020/2/20 上午9:38, Zhang, Chen wrote: Hi Jason, I noticed this series can't be merged or queued, do you met some problem about it? Thanks Zhang Chen Not, I've queued this. Thanks

[PATCH qemu v7 2/5] spapr/spapr: Make vty_getchars public

2020-02-19 Thread Alexey Kardashevskiy
A serial device fetches the data from the chardev backend as soon as input happens and stores it in its internal device specific buffer, every char device implements it again. Since there is no unified interface to read such buffer, we will have to read characters directly from

[PATCH qemu v7 3/5] spapr/cas: Separate CAS handling from rebuilding the FDT

2020-02-19 Thread Alexey Kardashevskiy
At the moment "ibm,client-architecture-support" ("CAS") is implemented in SLOF and QEMU assists via the custom H_CAS hypercall which copies an updated flatten device tree (FDT) blob to the SLOF memory which it then uses to update its internal tree. When we enable the OpenFirmware client interface

[PATCH qemu v7 4/5] spapr: Implement Open Firmware client interface

2020-02-19 Thread Alexey Kardashevskiy
The PAPR platform which 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. Since the beginning, the runtime component of the firmware (RTAS) has been implemented as a

[PATCH qemu v7 0/5] spapr: Kill SLOF

2020-02-19 Thread Alexey Kardashevskiy
This is another attempt to implement minimalistic Open Firmware Client Interface in QEMU. With this thing, I can boot unmodified Ubuntu 18.04 and Fedora 30 directly from the disk without SLOF. A useful discussion happened esrlier:

[PATCH qemu v7 1/5] ppc/spapr: Move GPRs setup to one place

2020-02-19 Thread Alexey Kardashevskiy
At the moment "pseries" starts in SLOF which only expects the FDT blob pointer in r3. As we are going to introduce a OpenFirmware support in QEMU, we will be booting OF clients directly and these expect a stack pointer in r1, Linux looks at r3/r4 for the initramdisk location (although vmlinux can

[PATCH qemu v7 5/5] spapr/vof: Add basic support for MBR/GPT/GRUB

2020-02-19 Thread Alexey Kardashevskiy
This hooks up disks to block backends so vof.bin can read MBR/GPT, find a bootloader and run it. This bypasses the device drivers and goes straight to the backend. This implements basic support for 32bit big endian bootloader; tested on GRUB. Signed-off-by: Alexey Kardashevskiy ---

[PATCH] hw/char/pl011: Output characters using best-effort mode

2020-02-19 Thread Gavin Shan
Currently, PL011 is used by ARM virt board by default. It's possible to block the system from booting. With below parameters in command line, the backend could run into endless attempts of transmitting packets, which can't succeed because of running out of sending buffer. The socket might be not

Re: [RFC PATCH v2] target/ppc: Enable hardfloat for PPC

2020-02-19 Thread Howard Spoelstra
On Wed, Feb 19, 2020 at 8:28 PM BALATON Zoltan wrote: > On Wed, 19 Feb 2020, Howard Spoelstra wrote: > > I tested with the current ppc-for-5.0 branch and with v1 of the hardfloat > > patches applied on top of that. There is a noticeable speed improvement > in > > Linux and OSX hosts. Windows 10

[no subject]

2020-02-19 Thread Wayne Li
Dear QEMU list members, This will kind of be a repost but I'd like to post my question again because I've gained some more knowledge that makes me feel that my question would be easier to answer. So we developed a custom-made QEMU VM that emulates a custom machine that has an e5500 processor.

[PATCH v10 20/22] fuzz: add virtio-net fuzz target

2020-02-19 Thread Alexander Bulekov
The virtio-net fuzz target feeds inputs to all three virtio-net virtqueues, and uses forking to avoid leaking state between fuzz runs. Signed-off-by: Alexander Bulekov Reviewed-by: Stefan Hajnoczi --- tests/qtest/fuzz/Makefile.include | 1 + tests/qtest/fuzz/virtio_net_fuzz.c | 198

[PATCH v10 17/22] fuzz: add target/fuzz makefile rules

2020-02-19 Thread Alexander Bulekov
Signed-off-by: Alexander Bulekov Reviewed-by: Darren Kenny Reviewed-by: Stefan Hajnoczi --- Makefile| 15 ++- Makefile.target | 16 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f0e1a2fc1d..36ca26f0f5 100644 ---

[PATCH v10 11/22] libqos: move useful qos-test funcs to qos_external

2020-02-19 Thread Alexander Bulekov
The moved functions are not specific to qos-test and might be useful elsewhere. For example the virtual-device fuzzer makes use of them for qos-assisted fuzz-targets. Signed-off-by: Alexander Bulekov Reviewed-by: Stefan Hajnoczi Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Darren Kenny

[PATCH v10 12/22] fuzz: add fuzzer skeleton

2020-02-19 Thread Alexander Bulekov
tests/fuzz/fuzz.c serves as the entry point for the virtual-device fuzzer. Namely, libfuzzer invokes the LLVMFuzzerInitialize and LLVMFuzzerTestOneInput functions, both of which are defined in this file. This change adds a "FuzzTarget" struct, along with the fuzz_add_target function, which should

[PATCH v10 09/22] libqos: rename i2c_send and i2c_recv

2020-02-19 Thread Alexander Bulekov
The names i2c_send and i2c_recv collide with functions defined in hw/i2c/core.c. This causes an error when linking against libqos and softmmu simultaneously (for example when using qtest inproc). Rename the libqos functions to avoid this. Signed-off-by: Alexander Bulekov Reviewed-by: Stefan

[PATCH v10 22/22] fuzz: add documentation to docs/devel/

2020-02-19 Thread Alexander Bulekov
Signed-off-by: Alexander Bulekov Reviewed-by: Stefan Hajnoczi Reviewed-by: Darren Kenny --- docs/devel/fuzzing.txt | 116 + 1 file changed, 116 insertions(+) create mode 100644 docs/devel/fuzzing.txt diff --git a/docs/devel/fuzzing.txt

[PATCH v10 18/22] fuzz: add configure flag --enable-fuzzing

2020-02-19 Thread Alexander Bulekov
Signed-off-by: Alexander Bulekov Reviewed-by: Stefan Hajnoczi Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Darren Kenny --- configure | 39 +++ 1 file changed, 39 insertions(+) diff --git a/configure b/configure index 115dc38085..bd873177ad 100755 ---

[PATCH v10 08/22] qtest: add in-process incoming command handler

2020-02-19 Thread Alexander Bulekov
The handler allows a qtest client to send commands to the server by directly calling a function, rather than using a file/CharBackend Signed-off-by: Alexander Bulekov Reviewed-by: Stefan Hajnoczi Reviewed-by: Darren Kenny --- include/sysemu/qtest.h | 1 + qtest.c| 13

[PATCH v10 21/22] fuzz: add virtio-scsi fuzz target

2020-02-19 Thread Alexander Bulekov
The virtio-scsi fuzz target sets up and fuzzes the available virtio-scsi queues. After an element is placed on a queue, the fuzzer can select whether to perform a kick, or continue adding elements. Signed-off-by: Alexander Bulekov --- tests/qtest/fuzz/Makefile.include | 1 +

[PATCH v10 15/22] fuzz: support for fork-based fuzzing.

2020-02-19 Thread Alexander Bulekov
fork() is a simple way to ensure that state does not leak in between fuzzing runs. Unfortunately, the fuzzer mutation engine relies on bitmaps which contain coverage information for each fuzzing run, and these bitmaps should be copied from the child to the parent(where the mutation occurs). These

[PATCH v10 07/22] libqtest: make bufwrite rely on the TransportOps

2020-02-19 Thread Alexander Bulekov
When using qtest "in-process" communication, qtest_sendf directly calls a function in the server (qtest.c). Previously, bufwrite used socket_send, which bypasses the TransportOps enabling the call into qtest.c. This change replaces the socket_send calls with ops->send, maintaining the benefits of

[PATCH v10 19/22] fuzz: add i440fx fuzz targets

2020-02-19 Thread Alexander Bulekov
These three targets should simply fuzz reads/writes to a couple ioports, but they mostly serve as examples of different ways to write targets. They demonstrate using qtest and qos for fuzzing, as well as using rebooting and forking to reset state, or not resetting it at all. Signed-off-by:

[PATCH v10 13/22] exec: keep ram block across fork when using qtest

2020-02-19 Thread Alexander Bulekov
Ram blocks were marked MADV_DONTFORK breaking fuzzing-tests which execute each test-input in a forked process. Signed-off-by: Alexander Bulekov Reviewed-by: Stefan Hajnoczi Reviewed-by: Darren Kenny --- exec.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git

[PATCH v10 06/22] libqtest: add a layer of abstraction to send/recv

2020-02-19 Thread Alexander Bulekov
This makes it simple to swap the transport functions for qtest commands to and from the qtest client. For example, now it is possible to directly pass qtest commands to a server handler that exists within the same process, without the standard way of writing to a file descriptor. Signed-off-by:

[PATCH v10 16/22] fuzz: add support for qos-assisted fuzz targets

2020-02-19 Thread Alexander Bulekov
Signed-off-by: Alexander Bulekov Reviewed-by: Stefan Hajnoczi --- tests/qtest/fuzz/Makefile.include | 2 + tests/qtest/fuzz/qos_fuzz.c | 234 ++ tests/qtest/fuzz/qos_fuzz.h | 33 + 3 files changed, 269 insertions(+) create mode 100644

[PATCH v10 10/22] libqos: split qos-test and libqos makefile vars

2020-02-19 Thread Alexander Bulekov
Most qos-related objects were specified in the qos-test-obj-y variable. qos-test-obj-y also included qos-test.o which defines a main(). This made it difficult to repurpose qos-test-obj-y to link anything beside tests/qos-test against libqos. This change separates objects that are libqos-specific

[PATCH v10 05/22] qtest: add qtest_server_send abstraction

2020-02-19 Thread Alexander Bulekov
qtest_server_send is a function pointer specifying the handler used to transmit data to the qtest client. In the standard configuration, this calls the CharBackend handler, but now it is possible for other types of handlers, e.g direct-function calls if the qtest client and server exist within the

[PATCH v10 14/22] main: keep rcu_atfork callback enabled for qtest

2020-02-19 Thread Alexander Bulekov
The qtest-based fuzzer makes use of forking to reset-state between tests. Keep the callback enabled, so the call_rcu thread gets created within the child process. Signed-off-by: Alexander Bulekov Reviewed-by: Darren Kenny Acked-by: Stefan Hajnoczi --- softmmu/vl.c | 12 +++- 1 file

[PATCH v10 04/22] fuzz: add FUZZ_TARGET module type

2020-02-19 Thread Alexander Bulekov
Signed-off-by: Alexander Bulekov Reviewed-by: Stefan Hajnoczi Reviewed-by: Darren Kenny --- include/qemu/module.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/qemu/module.h b/include/qemu/module.h index 65ba596e46..684753d808 100644 --- a/include/qemu/module.h

[PATCH v10 02/22] softmmu: split off vl.c:main() into main.c

2020-02-19 Thread Alexander Bulekov
A program might rely on functions implemented in vl.c, but implement its own main(). By placing main into a separate source file, there are no complaints about duplicate main()s when linking against vl.o. For example, the virtual-device fuzzer uses a main() provided by libfuzzer, and needs to

[PATCH v10 00/22] Add virtual device fuzzing support

2020-02-19 Thread Alexander Bulekov
Hello, This series adds a framework for coverage-guided fuzzing of virtual-devices. Fuzzing targets are based on qtest and can make use of libqos. Fuzzing can help discover device bugs, such as assertion-failures, timeouts, and overflows, triggerable from within guests. V10: * Update

[PATCH v10 03/22] module: check module wasn't already initialized

2020-02-19 Thread Alexander Bulekov
The virtual-device fuzzer must initialize QOM, prior to running vl:qemu_init, so that it can use the qos_graph to identify the arguments required to initialize a guest for libqos-assisted fuzzing. This change prevents errors when vl:qemu_init tries to (re)initialize the previously initialized QOM

[PATCH v10 01/22] softmmu: move vl.c to softmmu/

2020-02-19 Thread Alexander Bulekov
Move vl.c to a separate directory, similar to linux-user/ Update the chechpatch and get_maintainer scripts, since they relied on /vl.c for top_of_tree checks. Signed-off-by: Alexander Bulekov --- MAINTAINERS | 2 +- Makefile.objs | 2 -- Makefile.target | 1 +

Re: [PATCH 2/2] aspeed/smc: Fix User mode select/unselect scheme

2020-02-19 Thread Andrew Jeffery
On Thu, 6 Feb 2020, at 21:56, Cédric Le Goater wrote: > The Aspeed SMC Controller can operate in different modes : Read, Fast > Read, Write and User modes. When the User mode is configured, it > selects automatically the SPI slave device until the CE_STOP_ACTIVE > bit is set to 1. When any

Re: [PATCH 1/2] aspeed/smc: Add some tracing

2020-02-19 Thread Andrew Jeffery
On Thu, 6 Feb 2020, at 21:56, Cédric Le Goater wrote: > Signed-off-by: Cédric Le Goater Reviewed-by: Andrew Jeffery

Re: The issues about architecture of the COLO checkpoint

2020-02-19 Thread Daniel Cho
Hi Hailiang, I have already patched the file to my branch, but there is a problem while doing migration. Here is the error message from SVM "qemu-system-x86_64: /root/download/qemu-4.1.0/memory.c:1079: memory_region_transaction_commit: Assertion `qemu_mutex_iothread_locked()' failed." Do you

Re: The issues about architecture of the COLO checkpoint

2020-02-19 Thread Daniel Cho
Hi Zhang, Thanks, I will configure on code for testing first. However, if you have free time, could you please send the patch file to us, Thanks. Best Regard, Daniel Cho Zhang, Chen 於 2020年2月20日 週四 上午11:07寫道: > > On 2/18/2020 5:22 PM, Daniel Cho wrote: > > Hi Hailiang, > Thanks for your

Re: [PATCH V4 0/5] Introduce Advanced Watch Dog module

2020-02-19 Thread Zhang, Chen
On 2/12/2020 10:56 AM, Jason Wang wrote: On 2020/2/11 下午4:58, Zhang, Chen wrote: -Original Message- From: Jason Wang Sent: Monday, January 20, 2020 10:57 AM To: Zhang, Chen; Paolo Bonzini ; Philippe Mathieu-Daudé; qemu-dev Cc: Zhang Chen Subject: Re: [PATCH V4 0/5] Introduce Advanced

[PATCH v5 16/18] spapr: Don't clamp RMA to 16GiB on new machine types

2020-02-19 Thread David Gibson
In spapr_machine_init() we clamp the size of the RMA to 16GiB and the comment saying why doesn't make a whole lot of sense. In fact, this was done because the real mode handling code elsewhere limited the RMA in TCG mode to the maximum value configurable in LPCR[RMLS], 16GiB. But, * Actually

[PATCH v5 17/18] spapr: Clean up RMA size calculation

2020-02-19 Thread David Gibson
Move the calculation of the Real Mode Area (RMA) size into a helper function. While we're there clean it up and correct it in a few ways: * Add comments making it clearer where the various constraints come from * Remove a pointless check that the RMA fits within Node 0 (we've just clamped

[PATCH v5 03/18] target/ppc: Correct handling of real mode accesses with vhyp on hash MMU

2020-02-19 Thread David Gibson
On ppc we have the concept of virtual hypervisor ("vhyp") mode, where we only model the non-hypervisor-privileged parts of the cpu. Essentially we model the hypervisor's behaviour from the point of view of a guest OS, but we don't model the hypervisor's execution. In particular, in this mode,

[PATCH v5 11/18] target/ppc: Streamline construction of VRMA SLB entry

2020-02-19 Thread David Gibson
When in VRMA mode (i.e. a guest thinks it has the MMU off, but the hypervisor is still applying translation) we use a special SLB entry, rather than looking up an SLBE by address as we do when guest translation is on. We build that special entry in ppc_hash64_update_vrma() along with some logic

[PATCH v5 15/18] spapr: Don't attempt to clamp RMA to VRMA constraint

2020-02-19 Thread David Gibson
The Real Mode Area (RMA) is the part of memory which a guest can access when in real (MMU off) mode. Of course, for a guest under KVM, the MMU isn't really turned off, it's just in a special translation mode - Virtual Real Mode Area (VRMA) - which looks like real mode in guest mode. The

[PATCH v5 12/18] target/ppc: Don't store VRMA SLBE persistently

2020-02-19 Thread David Gibson
Currently, we construct the SLBE used for VRMA translations when the LPCR is written (which controls some bits in the SLBE), then use it later for translations. This is a bit complex and confusing - simplify it by simply constructing the SLBE directly from the LPCR when we need it.

[PATCH v5 08/18] target/ppc: Streamline calculation of RMA limit from LPCR[RMLS]

2020-02-19 Thread David Gibson
Currently we use a big switch statement in ppc_hash64_update_rmls() to work out what the right RMA limit is based on the LPCR[RMLS] field. There's no formula for this - it's just an arbitrary mapping defined by the existing CPU implementations - but we can make it a bit more readable by using a

[PATCH v5 14/18] spapr,ppc: Simplify signature of kvmppc_rma_size()

2020-02-19 Thread David Gibson
This function calculates the maximum size of the RMA as implied by the host's page size of structure of the VRMA (there are a number of other constraints on the RMA size which will supersede this one in many circumstances). The current interface takes the current RMA size estimate, and clamps it

[PATCH v5 06/18] target/ppc: Remove RMOR register from POWER9 & POWER10

2020-02-19 Thread David Gibson
Currently we create the Real Mode Offset Register (RMOR) on all Book3S cpus from POWER7 onwards. However the translation mode which the RMOR controls is no longer supported in POWER9, and so the register has been removed from the architecture. Remove it from our model on POWER9 and POWER10.

[PATCH v5 13/18] spapr: Don't use weird units for MIN_RMA_SLOF

2020-02-19 Thread David Gibson
MIN_RMA_SLOF records the minimum about of RMA that the SLOF firmware requires. It lets us give a meaningful error if the RMA ends up too small, rather than just letting SLOF crash. It's currently stored as a number of megabytes, which is strange for global constants. Move that megabyte scaling

[PATCH v5 02/18] ppc: Remove stub of PPC970 HID4 implementation

2020-02-19 Thread David Gibson
The PowerPC 970 CPU was a cut-down POWER4, which had hypervisor capability. However, it can be (and often was) strapped into "Apple mode", where the hypervisor capabilities were disabled (essentially putting it always in hypervisor mode). That's actually the only mode of the 970 we support in

[PATCH v5 10/18] target/ppc: Only calculate RMLS derived RMA limit on demand

2020-02-19 Thread David Gibson
When the LPCR is written, we update the env->rmls field with the RMA limit it implies. Simplify things by just calculating the value directly from the LPCR value when we need it. It's possible this is a little slower, but it's unlikely to be significant, since this is only for real mode accesses

[PATCH v5 07/18] target/ppc: Use class fields to simplify LPCR masking

2020-02-19 Thread David Gibson
When we store the Logical Partitioning Control Register (LPCR) we have a big switch statement to work out which are valid bits for the cpu model we're emulating. As well as being ugly, this isn't really conceptually correct, since it is based on the mmu_model variable, whereas the LPCR isn't

[PATCH v5 18/18] spapr: Fold spapr_node0_size() into its only caller

2020-02-19 Thread David Gibson
The Real Mode Area (RMA) needs to fit within the NUMA node owning memory at address 0. That's usually node 0, but can be a later one if there are some nodes which have no memory (only CPUs). This is currently handled by the spapr_node0_size() helper. It has only one caller, so there's not a lot

[PATCH v5 00/18] target/ppc: Correct some errors with real mode handling

2020-02-19 Thread David Gibson
POWER "book S" (server class) cpus have a concept of "real mode" where MMU translation is disabled... sort of. In fact this can mean a bunch of slightly different things when hypervisor mode and other considerations are present. We had some errors in edge cases here, so clean some things up and

[PATCH v5 05/18] spapr, ppc: Remove VPM0/RMLS hacks for POWER9

2020-02-19 Thread David Gibson
For the "pseries" machine, we use "virtual hypervisor" mode where we only model the CPU in non-hypervisor privileged mode. This means that we need guest physical addresses within the modelled cpu to be treated as absolute physical addresses. We used to do that by clearing LPCR[VPM0] and setting

Re: [PATCH v3 04/12] target/ppc: Introduce ppc_hash64_use_vrma() helper

2020-02-19 Thread David Gibson
On Wed, Feb 19, 2020 at 11:06:20AM -0300, Fabiano Rosas wrote: > David Gibson writes: > > > When running guests under a hypervisor, the hypervisor obviously needs to > > be protected from guest accesses even if those are in what the guest > > considers real mode (translation off). The POWER

Re: [PATCH v3 11/12] target/ppc: Streamline construction of VRMA SLB entry

2020-02-19 Thread David Gibson
On Wed, Feb 19, 2020 at 11:34:22AM -0300, Fabiano Rosas wrote: > David Gibson writes: > > > Hi, just a nitpick, feel free to ignore. > > > When in VRMA mode (i.e. a guest thinks it has the MMU off, but the > > hypervisor is still applying translation) we use a special SLB entry, > > rather

[PATCH v5 04/18] target/ppc: Introduce ppc_hash64_use_vrma() helper

2020-02-19 Thread David Gibson
When running guests under a hypervisor, the hypervisor obviously needs to be protected from guest accesses even if those are in what the guest considers real mode (translation off). The POWER hardware provides two ways of doing that: The old way has guest real mode accesses simply offset and

[PATCH v5 01/18] ppc: Remove stub support for 32-bit hypervisor mode

2020-02-19 Thread David Gibson
a4f30719a8cd, way back in 2007 noted that "PowerPC hypervisor mode is not fundamentally available only for PowerPC 64" and added a 32-bit version of the MSR[HV] bit. But nothing was ever really done with that; there is no meaningful support for 32-bit hypervisor mode 13 years later. Let's stop

[PATCH v5 09/18] target/ppc: Correct RMLS table

2020-02-19 Thread David Gibson
The table of RMA limits based on the LPCR[RMLS] field is slightly wrong. We're missing the RMLS == 0 => 256 GiB RMA option, which is available on POWER8, so add that. The comment that goes with the table is much more wrong. We *don't* filter invalid RMLS values when writing the LPCR, and there's

Re: The issues about architecture of the COLO checkpoint

2020-02-19 Thread Zhang, Chen
On 2/18/2020 5:22 PM, Daniel Cho wrote: Hi Hailiang, Thanks for your help. If we have any problems we will contact you for your favor. Hi Zhang, " If colo-compare got a primary packet without related secondary packet in a certain time , it will automatically trigger checkpoint.  " As you

Re: [PATCH v3 04/12] target/ppc: Introduce ppc_hash64_use_vrma() helper

2020-02-19 Thread Paul Mackerras
On Wed, Feb 19, 2020 at 11:06:20AM -0300, Fabiano Rosas wrote: > David Gibson writes: > > > When running guests under a hypervisor, the hypervisor obviously needs to > > be protected from guest accesses even if those are in what the guest > > considers real mode (translation off). The POWER

Re: [PATCH v2] pcie_root_port: Add enable_hotplug option

2020-02-19 Thread Laine Stump
On 2/19/20 9:55 AM, Julia Suvorova wrote: Make hot-plug/hot-unplug on PCIe Root Ports optional to allow libvirt manage it and restrict unplug for the whole machine. This is going to prevent user-initiated unplug in guests (Windows mostly). Hotplug is enabled by default. Usage: -device

[PATCH v9 2/3] Acceptance test: add "boot_linux" tests

2020-02-19 Thread Cleber Rosa
This acceptance test, validates that a full blown Linux guest can successfully boot in QEMU. In this specific case, the guest chosen is Fedora version 31. * x86_64, pc-i440fx and pc-q35 machine types, with TCG and KVM as accelerators * aarch64 and virt machine type, with TCG and KVM as

[PATCH v9 0/3] Acceptance test: Add "boot_linux" acceptance test

2020-02-19 Thread Cleber Rosa
This acceptance test, validates that a full blown Linux guest can successfully boot in QEMU. In this specific case, the guest chosen is Fedora version 31. It covers the following architectures and machine types: * x86_64, pc-i440fx and pc-q35 machine types, with TCG and KVM as accelerators

[PATCH v9 1/3] Acceptance tests: introduce BUILD_DIR and SOURCE_DIR

2020-02-19 Thread Cleber Rosa
Some tests may benefit from using resources from a build directory. This introduces three variables that can help tests find resources in those directories. First, a BUILD_DIR is assumed to exist, given that the primary form of running the acceptance tests is from a build directory (which may or

[PATCH v9 3/3] Acceptance tests: add make targets to download images

2020-02-19 Thread Cleber Rosa
The newly introduced "boot linux" tests make use of Linux images that are larger than usual, and fall into what Avocado calls "vmimages", and can be referred to by name, version and architecture. The images can be downloaded automatically during the test. But, to make for more reliable test

Re: [PULL SUBSYSTEM qemu-pseries] pseries: Update SLOF firmware image

2020-02-19 Thread Alexey Kardashevskiy
On 19/02/2020 18:18, Cédric Le Goater wrote: > On 2/19/20 7:44 AM, Alexey Kardashevskiy wrote: >> >> >> On 19/02/2020 12:20, Alexey Kardashevskiy wrote: >>> >>> >>> On 18/02/2020 23:59, Cédric Le Goater wrote: On 2/18/20 1:48 PM, Cédric Le Goater wrote: > On 2/18/20 10:40 AM, Cédric Le

Re: [PATCH v7 0/4] colo: Add support for continuous replication

2020-02-19 Thread Zhang, Chen
Hi Jason, I noticed this series can't be merged or queued, do you met some problem about it? Thanks Zhang Chen Max Reitz ; qemu-block Subject: Re: [PATCH v7 0/4] colo: Add support for continuous replication On Fri, 25 Oct 2019 19:06:31 +0200 Lukas Straub wrote: Hello Everyone, These

Re: [PATCH v3 02/12] ppc: Remove stub of PPC970 HID4 implementation

2020-02-19 Thread David Gibson
On Wed, Feb 19, 2020 at 12:18:34PM +0100, BALATON Zoltan wrote: > On Wed, 19 Feb 2020, David Gibson wrote: > > The PowerPC 970 CPU was a cut-down POWER4, which had hypervisor capability. > > However, it can be (and often was) strapped into "Apple mode", where the > > hypervisor capabilities were

Re: [PATCH v2 fixed 11/16] util/mmap-alloc: Prepare for resizable mmaps

2020-02-19 Thread Peter Xu
On Wed, Feb 12, 2020 at 02:42:49PM +0100, David Hildenbrand wrote: > @@ -178,13 +183,15 @@ void *qemu_ram_mmap(int fd, > size_t offset, total; > void *ptr, *guardptr; > > +g_assert(QEMU_IS_ALIGNED(size, pagesize)); (NOTE: assertion is fine, but as I mentioned in previous patch, I

Re: [PATCH v2 fixed 10/16] util/mmap-alloc: Factor out populating of memory to mmap_populate()

2020-02-19 Thread Peter Xu
On Wed, Feb 12, 2020 at 02:42:48PM +0100, David Hildenbrand wrote: > We want to populate memory within a reserved memory region. Let's factor > that out. > > Reviewed-by: Richard Henderson > Acked-by: Murilo Opsfelder Araujo > Cc: Igor Kotrasinski > Cc: "Michael S. Tsirkin" > Cc: Greg Kurz >

Re: [PATCH v2 fixed 09/16] util/mmap-alloc: Factor out reserving of a memory region to mmap_reserve()

2020-02-19 Thread Peter Xu
On Wed, Feb 12, 2020 at 02:42:47PM +0100, David Hildenbrand wrote: > We want to reserve a memory region without actually populating memory. > Let's factor that out. > > Reviewed-by: Igor Kotrasinski > Acked-by: Murilo Opsfelder Araujo > Reviewed-by: Richard Henderson > Cc: "Michael S. Tsirkin"

Re: [PATCH v2 fixed 08/16] util/mmap-alloc: Factor out calculation of pagesize to mmap_pagesize()

2020-02-19 Thread Peter Xu
On Wed, Feb 12, 2020 at 02:42:46PM +0100, David Hildenbrand wrote: > Factor it out and add a comment. > > Reviewed-by: Igor Kotrasinski > Acked-by: Murilo Opsfelder Araujo > Reviewed-by: Richard Henderson > Cc: "Michael S. Tsirkin" > Cc: Murilo Opsfelder Araujo > Cc: Greg Kurz > Cc: Eduardo

[PATCH v2 14/20] linux-user, x86_64: add syscall table generation support

2020-02-19 Thread Laurent Vivier
Copy syscall_64.tbl and syscallhdr.sh from linux/arch/x86/kernel/syscalls v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h Signed-off-by: Laurent Vivier --- Notes: v2: fix a typo (double comma) in $(call quiet-command) remove dependencies to syscall_nr.h in source

[PATCH v2 19/20] linux-user,mips: move content of mips_syscall_args

2020-02-19 Thread Laurent Vivier
Move content of mips_syscall_args to mips-syscall-args-o32.c.inc to ease automatic update. No functionnal change Signed-off-by: Laurent Vivier --- linux-user/mips/cpu_loop.c | 440 + linux-user/mips/syscall-args-o32.c.inc | 438 2

[PATCH v2 13/20] linux-user, i386: add syscall table generation support

2020-02-19 Thread Laurent Vivier
Copy syscall_32.tbl and syscallhdr.sh from linux/arch/x86/kernel/syscalls v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h Disable arch_prctl in syscall_32.tbl because linux-user/syscall.c only defines do_arch_prctl() with TARGET_ABI32, and TARGET_ABI32 is never defined for TARGET_I386

[PATCH v2 20/20] linux-user,mips: update syscall-args-o32.c.inc

2020-02-19 Thread Laurent Vivier
Add a script to update the file from strace github and run it Signed-off-by: Laurent Vivier --- linux-user/mips/syscall-args-o32.c.inc | 874 - scripts/update-mips-syscall-args.sh| 57 ++ 2 files changed, 493 insertions(+), 438 deletions(-) create mode 100755

[PATCH v2 18/20] linux-user: update syscall.tbl from linux 0bf999f9c5e7

2020-02-19 Thread Laurent Vivier
Run scripts/update-syscalltbl.sh with linux commit 0bf999f9c5e7 Signed-off-by: Laurent Vivier --- linux-user/arm/syscall.tbl| 2 ++ linux-user/hppa/syscall.tbl | 2 ++ linux-user/i386/syscall_32.tbl| 2 ++ linux-user/m68k/syscall.tbl | 4 +++-

[PATCH v2 17/20] linux-user, scripts: add a script to update syscall.tbl

2020-02-19 Thread Laurent Vivier
scripts/update-syscalltbl.sh has the list of syscall.tbl to update and can copy them from the linux source directory Signed-off-by: Laurent Vivier --- MAINTAINERS | 1 + scripts/update-syscalltbl.sh | 49 2 files changed, 50 insertions(+)

[PATCH v2 16/20] linux-user, mips64: add syscall table generation support

2020-02-19 Thread Laurent Vivier
Copy syscall_n32.tbl, syscall_n64.tbl and syscallhdr.sh from linux/arch/parisc/kernel/syscalls v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h Move the offsets (6000 for n32 and 5000 for n64) from the file to the Makefile.objs to be passed to syscallhdr.sh Signed-off-by: Laurent Vivier

[PATCH v2 15/20] linux-user, mips: add syscall table generation support

2020-02-19 Thread Laurent Vivier
Copy syscall.tbl and syscallhdr.sh from linux/arch/mips/kernel/syscalls/syscall_o32.tbl v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h Move the offset (4000) from the file to the Makefile.objs to be passed to syscallhdr.sh Rename on the fly fadvise64 to fadvise64_64. Signed-off-by:

[PATCH v2 12/20] linux-user, sparc, sparc64: add syscall table generation support

2020-02-19 Thread Laurent Vivier
Copy syscall.tbl and syscallhdr.sh from linux/arch/sparc/kernel/syscalls v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h Signed-off-by: Laurent Vivier --- Notes: v2: fix a typo (double comma) in $(call quiet-command) remove dependencies to syscall_nr.h in source

[PATCH v2 07/20] linux-user, microblaze: add syscall table generation support

2020-02-19 Thread Laurent Vivier
Copy syscall.tbl and syscallhdr.sh from linux/arch/microblaze/kernel/syscalls v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h Signed-off-by: Laurent Vivier --- Notes: v2: fix a typo (double comma) in $(call quiet-command) remove dependencies to syscall_nr.h in source

[PATCH v2 09/20] linux-user, ppc: add syscall table generation support

2020-02-19 Thread Laurent Vivier
Copy syscall.tbl and syscallhdr.sh from linux/arch/ppc/kernel/syscalls v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h and to not generate the entry if entry point is sys_ni_syscall. Fix ppc/signal.c to define do_sigreturn() for TARGET_ABI32. Signed-off-by: Laurent Vivier --- Notes:

[PATCH v2 06/20] linux-user, sh4: add syscall table generation support

2020-02-19 Thread Laurent Vivier
Copy syscall.tbl and syscallhdr.sh from linux/arch/sh/kernel/syscalls v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h Signed-off-by: Laurent Vivier --- Notes: v2: fix a typo (double comma) in $(call quiet-command) remove dependencies to syscall_nr.h in source directory

[PATCH v2 02/20] linux-user, alpha: add syscall table generation support

2020-02-19 Thread Laurent Vivier
Copy syscall.tbl and syscallhdr.sh from linux/arch/alpha/kernel/syscalls v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h Signed-off-by: Laurent Vivier --- Notes: v2: fix a typo (double comma) in $(call quiet-command) remove dependencies to syscall_nr.h in source

[PATCH v2 04/20] linux-user, m68k: add syscall table generation support

2020-02-19 Thread Laurent Vivier
Copy syscall.tbl and syscallhdr.sh from linux/arch/m68k/kernel/syscalls v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h Signed-off-by: Laurent Vivier --- Notes: v2: fix a typo (double comma) in $(call quiet-command) remove dependencies to syscall_nr.h in source

[PATCH v2 00/20] linux-user: generate syscall_nr.sh

2020-02-19 Thread Laurent Vivier
This series copies the files syscall.tbl from linux v5.5 and generates the file syscall_nr.h from them. This is done for all the QEMU targets that have a syscall.tbl in the linux source tree: mips, mips64, i386, x86_64, sparc, s390x, ppc, arm, microblaze, sh4, xtensa, m68k, hppa and alpha.

[PATCH v2 08/20] linux-user, arm: add syscall table generation support

2020-02-19 Thread Laurent Vivier
Copy syscall.tbl and syscallhdr.sh from linux/arch/arm/tools/syscalls v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h Update syscall.c to manage TARGET_NR_arm_sync_file_range as it has replaced TARGET_NR_sync_file_range2 Move existing stuff from linux-user/Makefile.objs to

[PATCH v2 03/20] linux-user, hppa: add syscall table generation support

2020-02-19 Thread Laurent Vivier
Copy syscall.tbl and syscallhdr.sh from linux/arch/parisc/kernel/syscalls v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h Signed-off-by: Laurent Vivier --- Notes: v2: fix a typo (double comma) in $(call quiet-command) remove dependencies to syscall_nr.h in source

[PATCH v2 11/20] linux-user, s390x: add syscall table generation support

2020-02-19 Thread Laurent Vivier
Copy syscall.tbl from linux/arch/s390x/kernel/syscalls v5.5 Copy syscallhdr.sh from m68k. Signed-off-by: Laurent Vivier --- Notes: v2: fix a typo (double comma) in $(call quiet-command) remove dependencies to syscall_nr.h in source directory configure |

[PATCH v2 05/20] linux-user, xtensa: add syscall table generation support

2020-02-19 Thread Laurent Vivier
Copy syscall.tbl and syscallhdr.sh from linux/arch/xtensa/kernel/syscalls v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h Signed-off-by: Laurent Vivier --- Notes: v2: fix a typo (double comma) in $(call quiet-command) remove dependencies to syscall_nr.h in source

[PATCH v2 01/20] linux-user: introduce parameters to generate syscall_nr.h

2020-02-19 Thread Laurent Vivier
This will be used when we'll import syscall.tbl from the kernel Add a script to remove all the dependencies to syscall_nr.h that point to source directory and not to the build directory. The list of arch will be update while the generated files are added. Signed-off-by: Laurent Vivier ---

  1   2   3   4   >