Re: [Qemu-devel] [PATCH v5 08/10] migration: create a dedicated thread to release rdma resource

2018-07-18 Thread 858585 jemmy
On Thu, Jul 5, 2018 at 10:26 PM, 858585 jemmy wrote: > On Thu, Jun 28, 2018 at 2:59 AM, Dr. David Alan Gilbert > wrote: >> * Lidong Chen (jemmy858...@gmail.com) wrote: >>> ibv_dereg_mr wait for a long time for big memory size virtual server. >>> >>> The test result is: >>> 10GB 326ms >>>

Re: [Qemu-devel] [RFC v3] qemu: Add virtio pmem device

2018-07-18 Thread Pankaj Gupta
> > > This patch adds virtio-pmem Qemu device. > > > > This device presents memory address range information to guest > > which is backed by file backend type. It acts like persistent > > memory device for KVM guest. Guest can perform read and persistent > > write operations on this

Re: [Qemu-devel] [RFC PATCH 0/3] Balloon inhibit enhancements

2018-07-18 Thread Peter Xu
On Wed, Jul 18, 2018 at 10:31:33AM -0600, Alex Williamson wrote: > On Wed, 18 Jul 2018 14:48:03 +0800 > Peter Xu wrote: > > > On Tue, Jul 17, 2018 at 04:47:31PM -0600, Alex Williamson wrote: > > > Directly assigned vfio devices have never been compatible with > > > ballooning. Zapping

Re: [Qemu-devel] [PATCH v4] monitor: let cur_mon be per-thread

2018-07-18 Thread Peter Xu
On Wed, Jul 18, 2018 at 05:38:11PM +0200, Markus Armbruster wrote: > Peter Xu writes: > > > After the Out-Of-Band work, the monitor iothread may be accessing the > > cur_mon as well (via monitor_qmp_dispatch_one()). Let's convert the > > cur_mon variable to be a per-thread variable to make sure

Re: [Qemu-devel] [RFC PATCH 0/3] Balloon inhibit enhancements

2018-07-18 Thread Peter Xu
On Wed, Jul 18, 2018 at 11:36:40AM +0200, Cornelia Huck wrote: > On Wed, 18 Jul 2018 14:48:03 +0800 > Peter Xu wrote: > > > On Tue, Jul 17, 2018 at 04:47:31PM -0600, Alex Williamson wrote: > > > Directly assigned vfio devices have never been compatible with > > > ballooning. Zapping

Re: [Qemu-devel] [RFC PATCH 1/3] balloon: Allow nested inhibits

2018-07-18 Thread Peter Xu
On Wed, Jul 18, 2018 at 10:37:36AM -0600, Alex Williamson wrote: > On Wed, 18 Jul 2018 14:40:15 +0800 > Peter Xu wrote: > > > On Tue, Jul 17, 2018 at 04:47:37PM -0600, Alex Williamson wrote: > > > A simple true/false internal state does not allow multiple users. Fix > > > this within the

[Qemu-devel] [PATCH] hw/block/nvme: add optional parameter num_namespaces for nvme device

2018-07-18 Thread Weiping Zhang
Add an optional paramter num_namespaces for device, and set it to 1 by default. Signed-off-by: Weiping Zhang --- hw/block/nvme.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 156ecf3c41..b53be4b5c0 100644 --- a/hw/block/nvme.c

[Qemu-devel] [PATCH] block: Don't lock /dev/null and /dev/zero automatically

2018-07-18 Thread Fam Zheng
On my Fedora 28, /dev/null is locked by some other process (couldn't inspect it due to the current lslocks limitation), so iotests 226 fails with some unexpected image locking errors because it uses qemu-io to open it. Actually it's safe to not use any lock on /dev/null or /dev/zero.

[Qemu-devel] [PATCH] hw/intc/arm_gicv3_its: downgrade error_report to warn_report in kvm_arm_its_reset

2018-07-18 Thread Jia He
In scripts/arch-run.bash of kvm-unit-tests, it will check the qemu output log with: if [ -z "$(echo "$errors" | grep -vi warning)" ]; then Thus without the warning prefix, all of the test fail. Since it is not unrecoverable error in kvm_arm_its_reset for current implementation, downgrading the

Re: [Qemu-devel] [libvirt] CPU Support

2018-07-18 Thread Brijesh Singh
On 7/18/18 8:49 AM, Eduardo Habkost wrote: > CCing the AMD people who worked on this. > > On Wed, Jul 18, 2018 at 12:18:45PM +0200, Pavel Hrdina wrote: >> On Wed, Jul 18, 2018 at 10:50:34AM +0100, Daniel P. Berrangé wrote: >>> On Wed, Jul 18, 2018 at 12:41:48PM +0300, Hetz Ben Hamo wrote:

Re: [Qemu-devel] [PATCH] block/vvfat: Fix crash when reporting error about too many files in directory

2018-07-18 Thread Philippe Mathieu-Daudé
On 07/18/2018 12:28 PM, Thomas Huth wrote: > When using the vvfat driver with a directory that contains too many files, > QEMU currently crashes. We are trying to print the wrong path variable here. > > Signed-off-by: Thomas Huth > --- > block/vvfat.c | 3 +-- > 1 file changed, 1 insertion(+),

Re: [Qemu-devel] [PATCH] linux-user/ppc: Implement swapcontext syscall

2018-07-18 Thread Philippe Mathieu-Daudé
Hi Richard, On 07/18/2018 05:06 PM, Richard Henderson wrote: > This allows the tests generated by debian-powerpc-user-cross > to function properly, especially tests/test-coroutine. > > Technically this syscall is available to both ppc32 and ppc64, > but only ppc32 glibc actually uses it. Thus

[Qemu-devel] [PATCH for-3.1 v2] python: Use io.StringIO

2018-07-18 Thread Philippe Mathieu-Daudé
Both Python 2.7 and 3 support the same io.StringIO to handle unicode strings. Python 2.6 requires special care, but since 7f2b55443a his support was removed. Stop caring, drop the ImportError check. Use the common form to use indistinctly Python 2.7 or 3.

Re: [Qemu-devel] [PULL 0/5] riscv-pull queue

2018-07-18 Thread Alistair Francis
m:alistair23/qemu.git tags/pull-riscv-pull-20180718-2 > > for you to fetch changes up to 451ea962be0cbb6710737eeb90c2a801b979cad3: > > spike: Fix crash when introspecting the device (2018-07-18 14:33:40 -0700) > > -

[Qemu-devel] [PULL 4/5] riscv_hart: Fix crash when introspecting the device

2018-07-18 Thread Alistair Francis
Use the new object_initialize_child() and sysbus_init_child_obj() to fix the issue. Signed-off-by: Alistair Francis Suggested-by: Thomas Huth Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- hw/riscv/riscv_hart.c | 7 +++ 1 file changed,

[Qemu-devel] [PULL 5/5] spike: Fix crash when introspecting the device

2018-07-18 Thread Alistair Francis
Use the new object_initialize_child() and sysbus_init_child_obj() to fix the issue. Signed-off-by: Alistair Francis Suggested-by: Thomas Huth Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- hw/riscv/spike.c | 10 -- 1 file changed,

[Qemu-devel] [PULL 3/5] virt: Fix crash when introspecting the device

2018-07-18 Thread Alistair Francis
Use the new object_initialize_child() and sysbus_init_child_obj() to fix the issue. Signed-off-by: Alistair Francis Suggested-by: Thomas Huth Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- hw/riscv/virt.c | 5 ++--- 1 file changed, 2

[Qemu-devel] [PULL 2/5] sifive_u: Fix crash when introspecting the device

2018-07-18 Thread Alistair Francis
Use the new object_initialize_child() and sysbus_init_child_obj() to fix the issue. Signed-off-by: Alistair Francis Suggested-by: Thomas Huth Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- hw/riscv/sifive_u.c | 15 +++ 1 file

[Qemu-devel] [PULL 0/5] riscv-pull queue

2018-07-18 Thread Alistair Francis
The following changes since commit ea6abffa8a08d832feb759d359d5b935e3087cf7: Update version for v3.0.0-rc1 release (2018-07-17 18:15:19 +0100) are available in the Git repository at: g...@github.com:alistair23/qemu.git tags/pull-riscv-pull-20180718-2 for you to fetch changes up

[Qemu-devel] [PULL 1/5] sifive_e: Fix crash when introspecting the device

2018-07-18 Thread Alistair Francis
Use the new object_initialize_child() and sysbus_init_child_obj() to fix the issue. Signed-off-by: Alistair Francis Suggested-by: Thomas Huth Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- hw/riscv/sifive_e.c | 12 ++-- 1 file

Re: [Qemu-devel] [PATCH v1 0/5] riscv: Fix introspection problems

2018-07-18 Thread Alistair Francis
On Wed, Jul 18, 2018 at 12:22 AM, Thomas Huth wrote: > On 17.07.2018 22:27, Alistair Francis wrote: >> This is based on Thomas's work fixing introspection problems [1] and >> applied to the RISC-V port. >> >> 1: https://lists.gnu.org/archive/html/qemu-devel/2018-07/msg03261.html >> >> Alistair

[Qemu-devel] How to generate custom fw paths for IDE devices?

2018-07-18 Thread Mark Cave-Ayland
Hi all, Following on from a couple of patches I've previously posted to the mailing list at https://lists.gnu.org/archive/html/qemu-devel/2018-06/msg08836.html I've made some good progress with trying to add bootindex support to OpenBIOS but I'm stuck with generating the IDE device paths

[Qemu-devel] [PATCH] block/file-posix: add bdrv_attach_aio_context callback for host dev and cdrom

2018-07-18 Thread Nishanth Aravamudan via Qemu-devel
In ed6e2161 ("linux-aio: properly bubble up errors from initialzation"), I only added a bdrv_attach_aio_context callback for the bdrv_file driver. There are several other drivers that use the shared aio_plug callback, though, and they will trip the assertion added to aio_get_linux_aio because they

Re: [Qemu-devel] [PATCH 1/7] tests: qgraph API for the qtest driver framework

2018-07-18 Thread Emanuele
On 07/18/2018 09:28 PM, Paolo Bonzini wrote: On 18/07/2018 16:23, Stefan Hajnoczi wrote: +struct QOSGraphObject { +/* for produces, returns void * */ +QOSGetDriver get_driver; Unused? +/* for contains, returns a QOSGraphObject * */ +QOSGetDevice get_device; Unused? What

Re: [Qemu-devel] [Qemu-stable] [PATCH v2] tap: fix memory leak on success to create a tap device

2018-07-18 Thread Michael Roth
Quoting Jason Wang (2018-05-31 04:46:05) > > > On 2018年05月31日 15:28, wangyunjian wrote: > > From: Yunjian Wang > > > > The memory leak on success to create a tap device. And the nfds and > > nvhosts may not be the same and need to be processed separately. > > > > Fixes: 07825977 ("tap: fix

Re: [Qemu-devel] [Qemu-stable] [PATCH v4] block: fix QEMU crash with scsi-hd and drive_del

2018-07-18 Thread Michael Roth
Quoting Kevin Wolf (2018-05-29 15:19:17) > Am 28.05.2018 um 14:03 hat Greg Kurz geschrieben: > > Removing a drive with drive_del while it is being used to run an I/O > > intensive workload can cause QEMU to crash. > > > > An AIO flush can yield at some point: > > > > blk_aio_flush_entry() > >

Re: [Qemu-devel] [PATCH 2/7] tests/qgraph: pci-pc driver and interface nodes

2018-07-18 Thread Emanuele
On 07/18/2018 09:33 PM, Paolo Bonzini wrote: On 18/07/2018 20:29, Emanuele wrote: I had to put this patch here because it also introduces qpci_device_init, used by sdhci (patch 3). For the next version I plan to have a patch X where I rename all occurrences of qpci_init_pc in qpci_pc_new,

Re: [Qemu-devel] hw/display/sm501* status

2018-07-18 Thread Sebastian Bauer
Hi, Am 2018-07-18 04:30, schrieb David Gibson: On Mon, Jul 16, 2018 at 09:43:05PM +0100, Peter Maydell wrote: On 16 July 2018 at 21:26, BALATON Zoltan wrote: > I could list sm501 in the sam460ex section thus formally taking > sub-maintainership but this would only go as far that I'll get cc-d

[Qemu-devel] [PATCH] linux-user/ppc: Implement swapcontext syscall

2018-07-18 Thread Richard Henderson
This allows the tests generated by debian-powerpc-user-cross to function properly, especially tests/test-coroutine. Technically this syscall is available to both ppc32 and ppc64, but only ppc32 glibc actually uses it. Thus the ppc64 path is untested. Signed-off-by: Richard Henderson ---

Re: [Qemu-devel] [PATCH 2/7] tests/qgraph: pci-pc driver and interface nodes

2018-07-18 Thread Paolo Bonzini
On 11/07/2018 19:46, Emanuele wrote: >>> +static void qpci(void) >>> +{ >>> +    qos_node_create_interface("pci-bus"); >>> +} >>> + >>> +libqos_init(qpci); >> Why does an interface need to be created?  The drivers declare which >> interfaces they support? >> >> I don't think this can be used to

Re: [Qemu-devel] [PATCH 0/7] Qtest driver framework

2018-07-18 Thread Paolo Bonzini
On 18/07/2018 19:14, Markus Armbruster wrote: >> The main challenge to me seems "how can we make tests simpler?". The >> presence of a new API and object model raises the bar for writing and >> running tests. I hope all qtests will use qgraph but if the complexity >> is too high then qgraph may

Re: [Qemu-devel] [PATCH 2/7] tests/qgraph: pci-pc driver and interface nodes

2018-07-18 Thread Paolo Bonzini
On 18/07/2018 20:29, Emanuele wrote: > I had to put this patch here because it also introduces > qpci_device_init, used by sdhci (patch 3). > > For the next version I plan to have a patch X where I rename all > occurrences of qpci_init_pc in qpci_pc_new, and a patch X+1 that > introduces

Re: [Qemu-devel] [PATCH 1/7] tests: qgraph API for the qtest driver framework

2018-07-18 Thread Paolo Bonzini
On 18/07/2018 16:23, Stefan Hajnoczi wrote: +struct QOSGraphObject { +/* for produces, returns void * */ +QOSGetDriver get_driver; >>> Unused? >>> +/* for contains, returns a QOSGraphObject * */ +QOSGetDevice get_device; >>> Unused? >> What is unused? >

Re: [Qemu-devel] [PATCH] configure: Support pkg-config for zlib

2018-07-18 Thread Peter Maydell
On 18 July 2018 at 18:04, Daniel P. Berrangé wrote: > On Wed, Jul 18, 2018 at 06:59:25PM +0200, Stefan Weil wrote: >> Am 18.07.2018 um 18:21 schrieb Daniel P. Berrangé: >> > this fallback support for non-pkgconfig scenarios can be entirely >> > deleted, just leaving the error_exit message.

Re: [Qemu-devel] [BUG?] aio_get_linux_aio: Assertion `ctx->linux_aio' failed

2018-07-18 Thread Nishanth Aravamudan via Qemu-devel
On 18.07.2018 [11:10:27 -0400], Farhan Ali wrote: > > > On 07/18/2018 09:42 AM, Farhan Ali wrote: > > > > > > On 07/17/2018 04:52 PM, Nishanth Aravamudan wrote: > > > iiuc, this possibly implies AIO was not actually used previously on this > > > guest (it might have silently been falling back

Re: [Qemu-devel] [PATCH 2/7] tests/qgraph: pci-pc driver and interface nodes

2018-07-18 Thread Emanuele
On 07/18/2018 04:29 PM, Stefan Hajnoczi wrote: On Wed, Jul 11, 2018 at 05:18:03PM +0200, Paolo Bonzini wrote: On 11/07/2018 16:49, Stefan Hajnoczi wrote: On Mon, Jul 09, 2018 at 11:11:31AM +0200, Emanuele Giuseppe Esposito wrote: -QPCIBus *qpci_init_pc(QTestState *qts, QGuestAllocator

Re: [Qemu-devel] [PATCH 1/7] tests: qgraph API for the qtest driver framework

2018-07-18 Thread Emanuele
On 07/18/2018 04:23 PM, Stefan Hajnoczi wrote: On Wed, Jul 11, 2018 at 04:58:41PM +0200, Paolo Bonzini wrote: On 11/07/2018 16:28, Stefan Hajnoczi wrote: + * + * QOSGraphObject also provides a destructor, used to deallocate the + * after the test has been executed. + */ +struct

Re: [Qemu-devel] [PATCH] nvic: Change NVIC to support ARMv6-M

2018-07-18 Thread Peter Maydell
On 18 July 2018 at 14:59, Julia Suvorova wrote: > On 17.07.2018 15:58, Peter Maydell wrote: >> >> On 10 July 2018 at 16:33, Julia Suvorova wrote: >>> >>> The differences from ARMv7-M NVIC are: >>>* ARMv6-M only supports up to 32 external interrupts >>> (configurable feature already). The

Re: [Qemu-devel] Native Memory Virtualization in qemu-system-aarch64

2018-07-18 Thread Peter Maydell
On 18 July 2018 at 02:34, Kevin Loughlin wrote: > Under my setup, the CPU's MMU translates from VAs to IPAs, and an external > memory controller then intercepts all memory transactions and translates > these IPAs to true PAs. This allows the memory controller to enforce > physical isolation of

Re: [Qemu-devel] [PATCH 0/7] Qtest driver framework

2018-07-18 Thread Markus Armbruster
Stefan Hajnoczi writes: > On Mon, Jul 09, 2018 at 11:11:29AM +0200, Emanuele Giuseppe Esposito wrote: >> This work is being done as Google Summer of Code 2018 project for QEMU, >> my mentors are Paolo Bonzini and Laurent Vivier. >> Additional infos on the project can be found at: >>

Re: [Qemu-devel] [PATCH] configure: Support pkg-config for zlib

2018-07-18 Thread Daniel P . Berrangé
On Wed, Jul 18, 2018 at 06:59:25PM +0200, Stefan Weil wrote: > Am 18.07.2018 um 18:21 schrieb Daniel P. Berrangé: > > On Thu, Jul 12, 2018 at 09:26:03PM +0200, Stefan Weil wrote: > >> This is needed for builds with the mingw64-* packages from Cygwin, > >> but also works for Linux. > >> > >> Move

Re: [Qemu-devel] [PATCH] configure: Support pkg-config for zlib

2018-07-18 Thread Stefan Weil
Am 18.07.2018 um 18:21 schrieb Daniel P. Berrangé: > On Thu, Jul 12, 2018 at 09:26:03PM +0200, Stefan Weil wrote: >> This is needed for builds with the mingw64-* packages from Cygwin, >> but also works for Linux. >> >> Move the zlib test also more to the end because users should >> get information

Re: [Qemu-devel] [RFC PATCH 1/3] balloon: Allow nested inhibits

2018-07-18 Thread Alex Williamson
On Wed, 18 Jul 2018 14:40:15 +0800 Peter Xu wrote: > On Tue, Jul 17, 2018 at 04:47:37PM -0600, Alex Williamson wrote: > > A simple true/false internal state does not allow multiple users. Fix > > this within the existing interface by converting to a counter, so long > > as the counter is

Re: [Qemu-devel] [RFC PATCH 0/3] Balloon inhibit enhancements

2018-07-18 Thread Alex Williamson
On Wed, 18 Jul 2018 14:48:03 +0800 Peter Xu wrote: > On Tue, Jul 17, 2018 at 04:47:31PM -0600, Alex Williamson wrote: > > Directly assigned vfio devices have never been compatible with > > ballooning. Zapping MADV_DONTNEED pages happens completely > > independent of vfio page pinning and IOMMU

Re: [Qemu-devel] [PATCH] configure: Support pkg-config for zlib

2018-07-18 Thread Daniel P . Berrangé
On Thu, Jul 12, 2018 at 09:26:03PM +0200, Stefan Weil wrote: > This is needed for builds with the mingw64-* packages from Cygwin, > but also works for Linux. > > Move the zlib test also more to the end because users should > get information on the really important missing packages > (which also

Re: [Qemu-devel] [PATCH] configure: Support pkg-config for zlib

2018-07-18 Thread Stefan Hajnoczi
On Thu, Jul 12, 2018 at 09:26:03PM +0200, Stefan Weil wrote: > This is needed for builds with the mingw64-* packages from Cygwin, > but also works for Linux. > > Move the zlib test also more to the end because users should > get information on the really important missing packages > (which also

Re: [Qemu-devel] [PATCH] migration: add capability to bypass the shared memory

2018-07-18 Thread Stefan Hajnoczi
On Thu, Jul 12, 2018 at 11:02:08PM +0800, Peng Tao wrote: > On Tue, Jul 10, 2018 at 9:40 PM, Stefan Hajnoczi wrote: > > Two things come to mind: > > > > At that point both guest kernel and agent address-space layout > > randomization (ASLR) is finished. ALSR makes it harder for memory > >

Re: [Qemu-devel] [PATCH for-3.1] qemu-iotests: Adapt to moved location of StringIO module in py3

2018-07-18 Thread Eduardo Habkost
On Wed, Jul 18, 2018 at 12:22:19PM -0300, Philippe Mathieu-Daudé wrote: > On 07/18/2018 12:05 PM, Eduardo Habkost wrote: > > On Wed, Jul 18, 2018 at 12:02:39PM -0300, Philippe Mathieu-Daudé wrote: > >> Hi Eduardo, > >> > >> On 07/18/2018 11:53 AM, Eduardo Habkost wrote: > >>> On Tue, Jul 17, 2018

[Qemu-devel] [PATCH v1 10/17] background snapshots: adapt the page queueing code for using page copies

2018-07-18 Thread Denis Plotnikov
The background snapshot uses memeory page copying to seal the page memory content. The patch adapts the migration infrastructure to save copies of the pages. Signed-off-by: Denis Plotnikov --- migration/migration.c | 2 +- migration/ram.c | 59 ---

[Qemu-devel] [PATCH v1 17/17] background snapshot: enable background snapshot

2018-07-18 Thread Denis Plotnikov
The patch enables to save vmstate to a migration thread in the background: ram is being saved while vCPUs are running. This is done to reduce downtime on vm snapshotting: the majority of vmstate is ram, the rest of devices consumes only a few MB of memory on a typical vm. By this moment, there

[Qemu-devel] [PATCH v1 16/17] migration: move the device state saving logic to a separate function

2018-07-18 Thread Denis Plotnikov
The logic being split will be reused by the background snapshot. Signed-off-by: Denis Plotnikov --- migration/savevm.c | 91 +- migration/savevm.h | 2 + 2 files changed, 52 insertions(+), 41 deletions(-) diff --git a/migration/savevm.c

[Qemu-devel] [PATCH v1 11/17] background snapshot: add a memory page copying function

2018-07-18 Thread Denis Plotnikov
It's the only function making a memory page copy. It supports multithreading semantics ensuring that the page is copied by one thread only and releasing the copied page from write protection. Signed-off-by: Denis Plotnikov --- migration/ram.c | 56

[Qemu-devel] [PATCH v1 08/17] migration: add helpers to change VM memory protection rights

2018-07-18 Thread Denis Plotnikov
Signed-off-by: Denis Plotnikov --- migration/ram.c | 54 + migration/ram.h | 3 +++ 2 files changed, 57 insertions(+) diff --git a/migration/ram.c b/migration/ram.c index 27d3403435..ce3dead932 100644 --- a/migration/ram.c +++ b/migration/ram.c

[Qemu-devel] [PATCH v1 03/17] threads: add infrastructure to process sigsegv

2018-07-18 Thread Denis Plotnikov
Allows to define sigsegv handler temporary for all threads. This is useful to implement copy-on-write logic while linux usefaultfd doesn't support write-protected faults. In the future, switch to using WP userfaultfd when it's available. Signed-off-by: Denis Plotnikov --- include/qemu/thread.h

[Qemu-devel] [PATCH v1 02/17] bitops: add some atomic versions of bitmap operations

2018-07-18 Thread Denis Plotnikov
1. test bit 2. test and set bit Signed-off-by: Denis Plotnikov --- include/qemu/bitops.h | 25 + 1 file changed, 25 insertions(+) diff --git a/include/qemu/bitops.h b/include/qemu/bitops.h index 3f0926cf40..72afcfaec5 100644 --- a/include/qemu/bitops.h +++

[Qemu-devel] [PATCH v1 07/17] background snapshot: introduce page buffer

2018-07-18 Thread Denis Plotnikov
To limit the amount of memory used by the background snapshot a memory limiter is used which called "page buffer". In fact, it's a memory page counter limiting the page allocation. Currently, the limit of pages is hardcoded but its setter is the matter of the future work. The background snapshot

[Qemu-devel] [PATCH v1 01/17] migration: add background snapshot capability

2018-07-18 Thread Denis Plotnikov
The capability is used for the background vmstate saving using the migration infrastructure. Background vmstate saving means that the majority of vmstate (RAM) is saved in the background when VM's vCPUS are running. This helps to reduce the VM downtime on VM snapshotting. Signed-off-by: Denis

[Qemu-devel] [PATCH v1 06/17] background snapshot: add helpers to manage a copy of ram block list

2018-07-18 Thread Denis Plotnikov
The VM ramblock list may be changed during the snapshotting. We want to make sure that we have the same ramblock list as it was at the time of snapshot beginning. So, we create a copy of the list at the beginning of the snapshotting and use it during the process. Signed-off-by: Denis Plotnikov

[Qemu-devel] [PATCH v1 12/17] ram: add background snapshot support in ram page saving part of migration

2018-07-18 Thread Denis Plotnikov
Unify the function saving the ram pages for using in both the migration and the background snapshots. Signed-off-by: Denis Plotnikov --- migration/ram.c | 17 + 1 file changed, 17 insertions(+) diff --git a/migration/ram.c b/migration/ram.c index 10b6fdf23e..b1623e96e7 100644

[Qemu-devel] [PATCH v1 00/17] Background snapshots

2018-07-18 Thread Denis Plotnikov
The workflow to make a snapshot is the following: 1. Pause the vm 2. Make a snapshot of block devices using the scheme of your choice 3. Turn on background-snapshot migration capability 4. Start the migration using the destination (migration stream) of your choice. The migration will resume the

[Qemu-devel] [PATCH v1 13/17] background snapshot: add write-protected page access handler function

2018-07-18 Thread Denis Plotnikov
The handler does all the necessary operations to save the page being accessed to the snapshot file(stream). Signed-off-by: Denis Plotnikov --- migration/ram.c | 43 +++ migration/ram.h | 1 + 2 files changed, 44 insertions(+) diff --git

[Qemu-devel] [PATCH v1 04/17] background snapshot: make a dedicated type for ram block list

2018-07-18 Thread Denis Plotnikov
The type will be used later to hold a list of ram blocks which memory content to be used for the vm state saving when making a background snapshot. Signed-off-by: Denis Plotnikov --- include/exec/ramlist.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[Qemu-devel] [PATCH v1 14/17] kvm: add failed memeory access exit reason

2018-07-18 Thread Denis Plotnikov
The patch allows qemu to be aware of how to read kvm failed memeory access. This is a temporary patch. It sould be removed on importing the kvm failed memeory access exit from the linux branch. Signed-off-by: Denis Plotnikov --- linux-headers/linux/kvm.h | 5 + 1 file changed, 5

[Qemu-devel] [PATCH v1 05/17] ram: extend the data structures for background snapshotting

2018-07-18 Thread Denis Plotnikov
Signed-off-by: Denis Plotnikov --- include/exec/ram_addr.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h index 6cbc02aa0f..5b403d537d 100644 --- a/include/exec/ram_addr.h +++ b/include/exec/ram_addr.h @@ -36,6 +36,8 @@ struct

[Qemu-devel] [PATCH v1 15/17] kvm: add vCPU failed memeory access processing

2018-07-18 Thread Denis Plotnikov
Is done with support of the KVM patch returning the faulting address. Signed-off-by: Denis Plotnikov --- target/i386/kvm.c | 17 + 1 file changed, 17 insertions(+) diff --git a/target/i386/kvm.c b/target/i386/kvm.c index 3ac5302bc5..55b8860d1a 100644 --- a/target/i386/kvm.c +++

Re: [Qemu-devel] [PATCH 1/7] tests: qgraph API for the qtest driver framework

2018-07-18 Thread Stefan Hajnoczi
On Wed, Jul 11, 2018 at 04:58:41PM +0200, Paolo Bonzini wrote: > On 11/07/2018 16:28, Stefan Hajnoczi wrote: > >> + * > >> + * QOSGraphObject also provides a destructor, used to deallocate the > >> + * after the test has been executed. > >> + */ > >> +struct QOSGraphObject { > >> +/* for

[Qemu-devel] [PATCH v1 09/17] background snapshot: extend RAM request for holding a page copy pointer

2018-07-18 Thread Denis Plotnikov
This pointer is going to be used to transfer a memory. Once the memory page is copied the content the snapshot interested in is saved for writing and we can make the page writable again. Signed-off-by: Denis Plotnikov --- migration/ram.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

Re: [Qemu-devel] [PATCH v4] monitor: let cur_mon be per-thread

2018-07-18 Thread Markus Armbruster
Peter Xu writes: > After the Out-Of-Band work, the monitor iothread may be accessing the > cur_mon as well (via monitor_qmp_dispatch_one()). Let's convert the > cur_mon variable to be a per-thread variable to make sure there won't be > a race between threads when accessing the variable. Hmm...

Re: [Qemu-devel] [RFC v3 2/2] tests: Add bbc:microbit / nRF51 test suite

2018-07-18 Thread Stefan Hajnoczi
On Thu, Jul 12, 2018 at 12:12:19PM +0200, Steffen Görtz wrote: > diff --git a/tests/microbit-test.c b/tests/microbit-test.c > new file mode 100644 > index 00..c502ee3976 > --- /dev/null > +++ b/tests/microbit-test.c > @@ -0,0 +1,118 @@ > + /* > + * QTest testcase for Microbit board using

Re: [Qemu-devel] [RFC v3 1/2] arm: Add NRF51 SOC non-volatile memory controller

2018-07-18 Thread Stefan Hajnoczi
On Thu, Jul 12, 2018 at 12:12:18PM +0200, Steffen Görtz wrote: > Changes in V3: > - NVMs consolidated in one file > - Removed bitfields > - Add VMState > - Add reset > > Changes in V1/V2: > - Code style changes > > Signed-off-by: Steffen Görtz > --- Everything above '---' goes into the commit

Re: [Qemu-devel] [PATCH 2/7] tests/qgraph: pci-pc driver and interface nodes

2018-07-18 Thread Stefan Hajnoczi
On Wed, Jul 11, 2018 at 07:46:09PM +0200, Emanuele wrote: > On 07/11/2018 04:49 PM, Stefan Hajnoczi wrote: > > On Mon, Jul 09, 2018 at 11:11:31AM +0200, Emanuele Giuseppe Esposito wrote: > > > +void qpci_device_init(QPCIDevice *dev, QPCIBus *bus, int devfn) > > > +{ > > > +if (!bus) { > > > +

Re: [Qemu-devel] [RFC v3 0/2] Add NRF51 SOC non-volatile memory controller

2018-07-18 Thread Stefan Hajnoczi
On Thu, Jul 12, 2018 at 12:12:17PM +0200, Steffen Görtz wrote: > Add some non-volatile memories and a non-volatile > memory controller for the nRF51. > Furthermore, a testsuite for the bbc:microbit and > nrf51 soc was added. > > Examination of the real device showed that > NVMs remained unchanged

Re: [Qemu-devel] [PATCH 2/7] tests/qgraph: pci-pc driver and interface nodes

2018-07-18 Thread Stefan Hajnoczi
On Wed, Jul 11, 2018 at 05:18:03PM +0200, Paolo Bonzini wrote: > On 11/07/2018 16:49, Stefan Hajnoczi wrote: > > On Mon, Jul 09, 2018 at 11:11:31AM +0200, Emanuele Giuseppe Esposito wrote: > >> -QPCIBus *qpci_init_pc(QTestState *qts, QGuestAllocator *alloc) > >> +static void *qpci_get_driver(void

Re: [Qemu-devel] [PATCH v2] arm: Add ARMv6-M programmer's model support

2018-07-18 Thread Stefan Hajnoczi
On Wed, Jul 18, 2018 at 12:56:28PM +0300, Julia Suvorova wrote: > Forbid stack alignment change. (CCR) > Reserve FAULTMASK, BASEPRI registers. > Report any fault as a HardFault. Disable MemManage, BusFault and > UsageFault, so they always escalated to HardFault. (SHCSR) > > Signed-off-by: Julia

Re: [Qemu-devel] [Qemu-block] [PATCH v2] nvme: Fix nvme_init error handling

2018-07-18 Thread Stefan Hajnoczi
On Thu, Jul 12, 2018 at 10:54:20AM +0800, Fam Zheng wrote: > It is wrong to leave this field as 1, as nvme_close() called in the > error handling code in nvme_file_open() will use it and try to free > s->queues again. > > Another problem is the cleaning ups are duplicated between the fail* >

Re: [Qemu-devel] [Qemu-block] [PATCH for-3.1] qemu-iotests: Adapt to moved location of StringIO module in py3

2018-07-18 Thread John Snow
On 07/18/2018 11:05 AM, Eduardo Habkost wrote: > On Wed, Jul 18, 2018 at 12:02:39PM -0300, Philippe Mathieu-Daudé wrote: >> Hi Eduardo, >> >> On 07/18/2018 11:53 AM, Eduardo Habkost wrote: >>> On Tue, Jul 17, 2018 at 08:40:15PM -0300, Philippe Mathieu-Daudé wrote: >>> [...] -import

Re: [Qemu-devel] [Qemu-block] [PATCH] block/vvfat: Disable debug message by default

2018-07-18 Thread John Snow
On 07/18/2018 11:08 AM, Thomas Huth wrote: > It's annoying to see this debug message every time you use vvfat. > Disable it with the DLOG() macro by default, as it is done with the > other debug messages in this file. > > Signed-off-by: Thomas Huth > --- > block/vvfat.c | 4 ++-- > 1 file

[Qemu-devel] [PATCH] block/vvfat: Fix crash when reporting error about too many files in directory

2018-07-18 Thread Thomas Huth
When using the vvfat driver with a directory that contains too many files, QEMU currently crashes. We are trying to print the wrong path variable here. Signed-off-by: Thomas Huth --- block/vvfat.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/vvfat.c

Re: [Qemu-devel] [PATCH for-3.1] qemu-iotests: Adapt to moved location of StringIO module in py3

2018-07-18 Thread Philippe Mathieu-Daudé
On 07/18/2018 12:05 PM, Eduardo Habkost wrote: > On Wed, Jul 18, 2018 at 12:02:39PM -0300, Philippe Mathieu-Daudé wrote: >> Hi Eduardo, >> >> On 07/18/2018 11:53 AM, Eduardo Habkost wrote: >>> On Tue, Jul 17, 2018 at 08:40:15PM -0300, Philippe Mathieu-Daudé wrote: >>> [...] -import

Re: [Qemu-devel] [PATCH 5/7 V11] mem/nvdimm: ensure write persistence to PMEM in label emulation

2018-07-18 Thread Richard Henderson
On 07/18/2018 12:48 AM, junyan...@gmx.com wrote: > From: Junyan He > > Guest writes to vNVDIMM labels are intercepted and performed on the > backend by QEMU. When the backend is a real persistent memort, QEMU > needs to take proper operations to ensure its write persistence on the > persistent

Re: [Qemu-devel] spice/qlx: atomic-alignment error with clang-7

2018-07-18 Thread Philippe Mathieu-Daudé
On 07/18/2018 12:12 PM, Paolo Bonzini wrote: > On 18/07/2018 16:56, Philippe Mathieu-Daudé wrote: >> Using clang-7 (Debian) on x86_64 to build v3.0.0-rc1. >> >> Not a regression, it was probably always there: >> >> $ ./configure --cc=clang-7 && make hw/display/qxl.o >> hw/display/qxl.c:1884:19:

Re: [Qemu-devel] [PATCH 2/7 V11] memory, exec: switch file ram allocation functions to 'flags' parameters

2018-07-18 Thread Richard Henderson
On 07/18/2018 12:47 AM, junyan...@gmx.com wrote: > From: Junyan He > > As more flag parameters besides the existing 'share' are going to be > added to following functions > memory_region_init_ram_from_file > qemu_ram_alloc_from_fd > qemu_ram_alloc_from_file > let's switch them to use the 'flags'

Re: [Qemu-devel] spice/qlx: atomic-alignment error with clang-7

2018-07-18 Thread Paolo Bonzini
On 18/07/2018 16:56, Philippe Mathieu-Daudé wrote: > Using clang-7 (Debian) on x86_64 to build v3.0.0-rc1. > > Not a regression, it was probably always there: > > $ ./configure --cc=clang-7 && make hw/display/qxl.o > hw/display/qxl.c:1884:19: error: misaligned or large atomic operation > may

Re: [Qemu-devel] [BUG?] aio_get_linux_aio: Assertion `ctx->linux_aio' failed

2018-07-18 Thread Farhan Ali
On 07/18/2018 09:42 AM, Farhan Ali wrote: On 07/17/2018 04:52 PM, Nishanth Aravamudan wrote: iiuc, this possibly implies AIO was not actually used previously on this guest (it might have silently been falling back to threaded IO?). I don't have access to s390x, but would it be possible to

Re: [Qemu-devel] monitor: enable OOB by default

2018-07-18 Thread Markus Armbruster
Marc-André, one question for you inline. Search for your name. Peter Xu writes: > On Thu, Jun 28, 2018 at 03:20:41PM +0200, Markus Armbruster wrote: >> Peter Xu writes: >> >> > On Wed, Jun 27, 2018 at 03:13:57PM +0200, Markus Armbruster wrote: >> >> Monitor behavior changes even when the

[Qemu-devel] [PATCH] block/vvfat: Disable debug message by default

2018-07-18 Thread Thomas Huth
It's annoying to see this debug message every time you use vvfat. Disable it with the DLOG() macro by default, as it is done with the other debug messages in this file. Signed-off-by: Thomas Huth --- block/vvfat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [Qemu-devel] [PATCH for-3.1] qemu-iotests: Adapt to moved location of StringIO module in py3

2018-07-18 Thread Eduardo Habkost
On Wed, Jul 18, 2018 at 12:02:39PM -0300, Philippe Mathieu-Daudé wrote: > Hi Eduardo, > > On 07/18/2018 11:53 AM, Eduardo Habkost wrote: > > On Tue, Jul 17, 2018 at 08:40:15PM -0300, Philippe Mathieu-Daudé wrote: > > [...] > >> -import StringIO > >> +try: > >> +from StringIO

Re: [Qemu-devel] [PATCH for-3.1] qemu-iotests: Adapt to moved location of StringIO module in py3

2018-07-18 Thread Philippe Mathieu-Daudé
Hi Eduardo, On 07/18/2018 11:53 AM, Eduardo Habkost wrote: > On Tue, Jul 17, 2018 at 08:40:15PM -0300, Philippe Mathieu-Daudé wrote: > [...] >> -import StringIO >> +try: >> +from StringIO import StringIO >> +except ImportError: >> +from io import StringIO > > Why do

[Qemu-devel] spice/qlx: atomic-alignment error with clang-7

2018-07-18 Thread Philippe Mathieu-Daudé
Using clang-7 (Debian) on x86_64 to build v3.0.0-rc1. Not a regression, it was probably always there: $ ./configure --cc=clang-7 && make hw/display/qxl.o hw/display/qxl.c:1884:19: error: misaligned or large atomic operation may incur significant performance penalty [-Werror,-Watomic-alignment]

Re: [Qemu-devel] [PATCH for-3.1] qemu-iotests: Adapt to moved location of StringIO module in py3

2018-07-18 Thread Eduardo Habkost
On Tue, Jul 17, 2018 at 08:40:15PM -0300, Philippe Mathieu-Daudé wrote: [...] > -import StringIO > +try: > +from StringIO import StringIO > +except ImportError: > +from io import StringIO Why do we need this? Python 2.7 has io.StringIO. -- Eduardo

Re: [Qemu-devel] [PATCH v1 2/5] sifive_u: Fix crash when introspecting the device

2018-07-18 Thread Philippe Mathieu-Daudé
On 07/17/2018 05:28 PM, Alistair Francis wrote: > Use the new object_initialize_child() and sysbus_init_child_obj() to > fix the issue. > Suggested-by: Thomas Huth > Signed-off-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé > --- >

Re: [Qemu-devel] [RFC v3 00/15] ARM virt: PCDIMM/NVDIMM at 2TB

2018-07-18 Thread Igor Mammedov
On Tue, 3 Jul 2018 09:19:43 +0200 Eric Auger wrote: > This series aims at supporting PCDIMM/NVDIMM intantiation in > machvirt at 2TB guest physical address. > > This is achieved in 3 steps: > 1) support more than 40b IPA/GPA will it work for TCG as well? /important from make check pov and

Re: [Qemu-devel] [RFC v3 08/15] hw/arm/boot: introduce fdt_add_memory_node helper

2018-07-18 Thread Igor Mammedov
On Tue, 3 Jul 2018 09:19:51 +0200 Eric Auger wrote: > From: Shameer Kolothum > > We introduce an helper to create a memory node. > > Signed-off-by: Eric Auger > Signed-off-by: Shameer Kolothum > > --- > > v1 -> v2: > - nop of existing /memory nodes was already handled > --- >

Re: [Qemu-devel] [PATCH] nvic: Change NVIC to support ARMv6-M

2018-07-18 Thread Julia Suvorova via Qemu-devel
On 17.07.2018 15:58, Peter Maydell wrote: On 10 July 2018 at 16:33, Julia Suvorova wrote: The differences from ARMv7-M NVIC are: * ARMv6-M only supports up to 32 external interrupts (configurable feature already). The ICTR is reserved. * Active Bit Register is reserved. * ARMv6-M

Re: [Qemu-devel] [PATCH for-3.0] po: Don't include comments with location

2018-07-18 Thread Philippe Mathieu-Daudé
Hi Stefan, On 07/18/2018 03:10 AM, Stefan Weil wrote: > Those comments change often when ui/gtk.c is changed and are not > really useful. Reviewed-by: Philippe Mathieu-Daudé > > Add also a new translation for German (still to be done for all other > languages). Do you mind moving this change

Re: [Qemu-devel] qemu-iotests: workaround to avoid Python3 while running tests on Fedora Docker image

2018-07-18 Thread Philippe Mathieu-Daudé
Hi Daniel, On 07/18/2018 04:25 AM, Daniel P. Berrangé wrote: > On Tue, Jul 17, 2018 at 08:37:58PM -0300, Philippe Mathieu-Daudé wrote: >> I noticed this while running "make docker-test-block@fedora": >> >> $ make docker-test-block@fedora NETWORK=1 >> BUILD fedora >> RUN test-block in

Re: [Qemu-devel] [libvirt] CPU Support

2018-07-18 Thread Eduardo Habkost
CCing the AMD people who worked on this. On Wed, Jul 18, 2018 at 12:18:45PM +0200, Pavel Hrdina wrote: > On Wed, Jul 18, 2018 at 10:50:34AM +0100, Daniel P. Berrangé wrote: > > On Wed, Jul 18, 2018 at 12:41:48PM +0300, Hetz Ben Hamo wrote: > > > Hi, > > > > > > I've been looking at the CPU list

Re: [Qemu-devel] [PATCH for-3.0] i386: Rename enum CacheType members

2018-07-18 Thread Moger, Babu
> -Original Message- > From: Aleksandar Markovic [mailto:amarko...@wavecomp.com] > Sent: Wednesday, July 18, 2018 8:35 AM > To: Philippe Mathieu-Daudé ; Eduardo Habkost > ; qemu-devel@nongnu.org > Cc: Moger, Babu ; Paolo Bonzini > ; Aurelien Jarno ; Richard > Henderson > Subject: Re:

Re: [Qemu-devel] [PATCH for 3.0 3/4] tests: use error_abort in places expecting errors

2018-07-18 Thread Philippe Mathieu-Daudé
On 07/18/2018 06:38 AM, Daniel P. Berrangé wrote: > Most of the TLS related tests are passing an in a "Error" object to > methods that are expected to fail, but then ignoring any error that is > set and instead asserting on a return value. This means that when an > error is unexpectedly raised, no

Re: [Qemu-devel] qemu-iotests: workaround to avoid Python3 while running tests on Fedora Docker image

2018-07-18 Thread Eduardo Habkost
On Wed, Jul 18, 2018 at 08:25:48AM +0100, Daniel P. Berrangé wrote: > On Tue, Jul 17, 2018 at 08:37:58PM -0300, Philippe Mathieu-Daudé wrote: > > I noticed this while running "make docker-test-block@fedora": > > > > $ make docker-test-block@fedora NETWORK=1 > > BUILD fedora > > RUN

  1   2   >