[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

[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 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,

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] [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] [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] 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:

[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.

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

[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] 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 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] [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

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] [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'

[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] [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 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) { > > > +

[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] [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] [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...

[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

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é > --- >

[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 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 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

[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 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

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] [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] 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] 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 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 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] [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 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 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 +++

[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 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

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 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] [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

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* >

[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 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 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 for-3.0] po: Don't include comments with location

2018-07-18 Thread Stefan Weil
Those comments change often when ui/gtk.c is changed and are not really useful. Add also a new translation for German (still to be done for all other languages). Signed-off-by: Stefan Weil --- CC'ing all translators because of the new string which still needs translations. Regards Stefan

[Qemu-devel] Bugs when cross-compiling qemu for Windows with mingw 8.1, executable doesn't run

2018-07-18 Thread Howard Spoelstra
Hi all, I have two issues when cross compiling current master for Windows with mingw 8.1. Host is Fedora29. See further below for gcc and mingw versions. Reproduce with: ./configure --cross-prefix=x86_64-w64-mingw32- --target-list="ppc-softmmu" --enable-gtk --with-gtkabi=3.0 --enable-sdl

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

2018-07-18 Thread Peter Xu
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 mapping, leaving us with > inconsistent GPA to HPA mapping

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

2018-07-18 Thread Daniel P . Berrangé
On Tue, Jul 17, 2018 at 08:40:15PM -0300, Philippe Mathieu-Daudé wrote: > Since 356dc290f the Fedora image default to Python3. > > This fixes: > > $ make docker-test-block@fedora > [...] > 045 [failed, exit status 1] - output mismatch (see 045.out.bad) > ---

[Qemu-devel] [PATCH 3/7 V11] configure: add libpmem support

2018-07-18 Thread junyan . he
From: Junyan He Add a pair of configure options --{enable,disable}-libpmem to control whether QEMU is compiled with PMDK libpmem [1]. QEMU may write to the host persistent memory (e.g. in vNVDIMM label emulation and live migration), so it must take the proper operations to ensure the

[Qemu-devel] [PATCH 0/7 V11] nvdimm: guarantee persistence of QEMU writes to persistent memory

2018-07-18 Thread junyan . he
From: Junyan He QEMU writes to vNVDIMM backends in the vNVDIMM label emulation and live migration. If the backend is on the persistent memory, QEMU needs to take proper operations to ensure its writes persistent on the persistent memory. Otherwise, a host power failure may result in the loss

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

2018-07-18 Thread junyan . he
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' parameters so as to ease future flag additions. The existing

Re: [Qemu-devel] [Qemu-block] [PATCH v0 0/2] Postponed actions

2018-07-18 Thread Denis Plotnikov
On 16.07.2018 21:59, John Snow wrote: On 07/16/2018 11:01 AM, Denis Plotnikov wrote: Ping! I never saw a reply to Stefan's question on July 2nd, did you reply off-list? For some reason, there are no Stefan's replies on my server. Found it in the web. Will respond to it shortly.

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

2018-07-18 Thread junyan . he
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 memory. Otherwise, a host power failure may result in the loss

Re: [Qemu-devel] [PATCH v2 1/2] ppc/pnv: Add model for Power8 PHB3 PCIe Host bridge

2018-07-18 Thread David Gibson
On Thu, Jun 28, 2018 at 10:36:32AM +0200, Cédric Le Goater wrote: > From: Benjamin Herrenschmidt > > This is a model of the PCIe Host Bridge (PHB3) found on a Power8 > processor. It includes the PowerBus logic interface (PBCQ), IOMMU > support, PCIe root complex, the XICS MSI and LSI interrupt

Re: [Qemu-devel] [PATCH 10/12] migration: introduce lockless multithreads model

2018-07-18 Thread Xiao Guangrong
On 07/14/2018 12:24 AM, Dr. David Alan Gilbert wrote: +static void *thread_run(void *opaque) +{ +ThreadLocal *self_data = (ThreadLocal *)opaque; +Threads *threads = self_data->threads; +void (*handler)(ThreadRequest *data) = threads->thread_request_handler; +ThreadRequest

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

2018-07-18 Thread Daniel P . Berrangé
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 qemu:fedora > Configure options: > --enable-werror

[Qemu-devel] [PATCH 7/7 V11] migration/ram: ensure write persistence on loading all data to PMEM.

2018-07-18 Thread junyan . he
From: Junyan He Because we need to make sure the pmem kind memory data is synced after migration, we choose to call pmem_persist() when the migration finish. This will make sure the data of pmem is safe and will not lose if power is off. Signed-off-by: Junyan He Reviewed-by: Stefan Hajnoczi

[Qemu-devel] [PATCH 6/7 V11] migration/ram: Add check and info message to nvdimm post copy.

2018-07-18 Thread junyan . he
From: Junyan He The nvdimm kind memory does not support post copy now. We disable post copy if we have nvdimm memory and print some log hint to user. Signed-off-by: Junyan He Reviewed-by: Stefan Hajnoczi Reviewed-by: Igor Mammedov --- migration/ram.c | 9 + 1 file changed, 9

Re: [Qemu-devel] [PATCH v2 1/2] ppc/pnv: Add model for Power8 PHB3 PCIe Host bridge

2018-07-18 Thread David Gibson
On Mon, Jul 09, 2018 at 09:22:59AM +0200, Cédric Le Goater wrote: > On 06/28/2018 10:36 AM, Cédric Le Goater wrote: > > From: Benjamin Herrenschmidt > > > > This is a model of the PCIe Host Bridge (PHB3) found on a Power8 > > processor. It includes the PowerBus logic interface (PBCQ), IOMMU > >

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

2018-07-18 Thread Peter Xu
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 elevated, ballooning is inhibited. > > Signed-off-by: Alex

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

2018-07-18 Thread Thomas Huth
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 Francis (5): > sifive_e: Fix crash when introspecting the

[Qemu-devel] [PATCH 1/7 V11] memory, exec: Expose all memory block related flags.

2018-07-18 Thread junyan . he
From: Junyan He We need to use these flags in other files rather than just in exec.c, For example, RAM_SHARED should be used when create a ram block from file. We expose them the exec/memory.h Signed-off-by: Junyan He Reviewed-by: Stefan Hajnoczi Reviewed-by: Igor Mammedov Reviewed-by:

[Qemu-devel] [PATCH 4/7 V11] hostmem-file: add the 'pmem' option

2018-07-18 Thread junyan . he
From: Junyan He When QEMU emulates vNVDIMM labels and migrates vNVDIMM devices, it needs to know whether the backend storage is a real persistent memory, in order to decide whether special operations should be performed to ensure the data persistence. This boolean option 'pmem' allows users to

Re: [Qemu-devel] [RFC v3 2/2] virtio-pmem: Add virtio pmem driver

2018-07-18 Thread Pankaj Gupta
Hi Stefan, > > + /* The request submission function */ > > +static int virtio_pmem_flush(struct device *dev) > > +{ > > + int err; > > + unsigned long flags; > > + struct scatterlist *sgs[2], sg, ret; > > + struct virtio_device *vdev = dev_to_virtio(dev->parent->parent); > > + struct

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

2018-07-18 Thread Thomas Huth
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 Francis (5): > sifive_e: Fix crash when introspecting the

Re: [Qemu-devel] [qemu-s390x] [RFC 14/15] s390-bios: Support booting from real dasd device

2018-07-18 Thread Cornelia Huck
On Tue, 17 Jul 2018 22:43:27 +0200 David Hildenbrand wrote: > On 05.07.2018 19:25, Jason J. Herne wrote: > > +* > > +* How this all pertains to Qemu * > > +* > > + > > +In theory we should merely have to do

Re: [Qemu-devel] [qemu-s390x] [RFC 14/15] s390-bios: Support booting from real dasd device

2018-07-18 Thread David Hildenbrand
On 18.07.2018 09:40, Cornelia Huck wrote: > On Tue, 17 Jul 2018 22:43:27 +0200 > David Hildenbrand wrote: > >> On 05.07.2018 19:25, Jason J. Herne wrote: > >>> +* >>> +* How this all pertains to Qemu * >>>

Re: [Qemu-devel] [PATCH v2 1/2] ppc/pnv: Add model for Power8 PHB3 PCIe Host bridge

2018-07-18 Thread Benjamin Herrenschmidt
On Wed, 2018-07-18 at 16:12 +1000, David Gibson wrote: > On Thu, Jun 28, 2018 at 10:36:32AM +0200, Cédric Le Goater wrote: > > From: Benjamin Herrenschmidt Can you trim your replies ? It's really hard to find your comments in such a long patch... > > diff --git a/include/hw/ppc/xics.h

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] [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

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] 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] 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] [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 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

[Qemu-devel] [PATCH v2] migration: release MigrationIncomingState in migration_object_finalize

2018-07-18 Thread Lidong Chen
Qemu initialize the MigrationIncomingState structure in migration_object_init, but not release it. this patch release it in migration_object_finalize. Signed-off-by: Lidong Chen --- migration/migration.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/migration/migration.c

Re: [Qemu-devel] [PATCH v8 3/5] acpi: add fw_cfg file for TPM and PPI virtual memory device

2018-07-18 Thread Igor Mammedov
On Mon, 16 Jul 2018 16:46:59 +0200 Igor Mammedov wrote: > On Mon, 16 Jul 2018 14:59:46 +0200 > Marc-André Lureau wrote: > > > From: Stefan Berger > > > > To avoid having to hard code the base address of the PPI virtual > > memory device we introduce a fw_cfg file etc/tpm/config that holds

Re: [Qemu-devel] [Qemu-block] [PATCH v0 0/2] Postponed actions

2018-07-18 Thread Stefan Hajnoczi
On Mon, Jul 02, 2018 at 04:18:43PM +0100, Stefan Hajnoczi wrote: > On Fri, Jun 29, 2018 at 03:40:50PM +0300, Denis Plotnikov wrote: > > There are cases when a request to a block driver state shouldn't have > > appeared producing dangerous race conditions. > > This misbehaviour is usually happens

[Qemu-devel] [PATCH] s390x/cpumodel: fix segmentation fault when baselining models

2018-07-18 Thread David Hildenbrand
Usually, when baselining two CPU models, whereby one of them has base CPU features disabled (e.g. z14-base,msa=off), we fallback to an older model that did not have these features in the base model. We always try to create a "sane" CPU model (as far as possible), and one part of it is that

Re: [Qemu-devel] [PATCH 06/12] migration: do not detect zero page for compression

2018-07-18 Thread Xiao Guangrong
On 07/17/2018 02:58 AM, Dr. David Alan Gilbert wrote: * Xiao Guangrong (guangrong.x...@gmail.com) wrote: On 06/29/2018 05:42 PM, Dr. David Alan Gilbert wrote: * Xiao Guangrong (guangrong.x...@gmail.com) wrote: Hi Peter, Sorry for the delay as i was busy on other things. On 06/19/2018

Re: [Qemu-devel] [qemu-s390x] [PATCH] s390x/cpumodel: fix segmentation fault when baselining models

2018-07-18 Thread Cornelia Huck
On Wed, 18 Jul 2018 10:40:18 +0200 David Hildenbrand wrote: > On 18.07.2018 10:39, Christian Borntraeger wrote: > > > > > > On 07/18/2018 10:24 AM, David Hildenbrand wrote: > >> Usually, when baselining two CPU models, whereby one of them has base > >> CPU features disabled (e.g.

Re: [Qemu-devel] [PATCH 07/12] migration: hold the lock only if it is really needed

2018-07-18 Thread Xiao Guangrong
On 07/12/2018 04:26 PM, Peter Xu wrote: On Thu, Jul 12, 2018 at 03:47:57PM +0800, Xiao Guangrong wrote: On 07/11/2018 04:21 PM, Peter Xu wrote: On Thu, Jun 28, 2018 at 05:33:58PM +0800, Xiao Guangrong wrote: On 06/19/2018 03:36 PM, Peter Xu wrote: On Mon, Jun 04, 2018 at 05:55:15PM

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

2018-07-18 Thread Daniel P . Berrangé
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 information about it is printed out, making failures hard

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

2018-07-18 Thread Julia Suvorova via Qemu-devel
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 Suvorova --- v2: * Changed CCR reset value hw/intc/armv7m_nvic.c | 10

Re: [Qemu-devel] [qemu-s390x] [PATCH] s390x/cpumodel: fix segmentation fault when baselining models

2018-07-18 Thread Christian Borntraeger
On 07/18/2018 10:24 AM, David Hildenbrand wrote: > Usually, when baselining two CPU models, whereby one of them has base > CPU features disabled (e.g. z14-base,msa=off), we fallback to an older > model that did not have these features in the base model. We always try to > create a "sane" CPU

Re: [Qemu-devel] [qemu-s390x] [PATCH] s390x/cpumodel: fix segmentation fault when baselining models

2018-07-18 Thread David Hildenbrand
On 18.07.2018 10:39, Christian Borntraeger wrote: > > > On 07/18/2018 10:24 AM, David Hildenbrand wrote: >> Usually, when baselining two CPU models, whereby one of them has base >> CPU features disabled (e.g. z14-base,msa=off), we fallback to an older >> model that did not have these features in

Re: [Qemu-devel] [qemu-s390x] [PATCH] s390x/cpumodel: fix segmentation fault when baselining models

2018-07-18 Thread Christian Borntraeger
On 07/18/2018 10:40 AM, David Hildenbrand wrote: > On 18.07.2018 10:39, Christian Borntraeger wrote: >> >> >> On 07/18/2018 10:24 AM, David Hildenbrand wrote: >>> Usually, when baselining two CPU models, whereby one of them has base >>> CPU features disabled (e.g. z14-base,msa=off), we fallback

Re: [Qemu-devel] [PATCH 08/12] migration: do not flush_compressed_data at the end of each iteration

2018-07-18 Thread Xiao Guangrong
On 07/14/2018 02:01 AM, Dr. David Alan Gilbert wrote: * guangrong.x...@gmail.com (guangrong.x...@gmail.com) wrote: From: Xiao Guangrong flush_compressed_data() needs to wait all compression threads to finish their work, after that all threads are free until the migration feed new request

  1   2   >