Re: [Qemu-devel] [PATCH] hw/timer/m48t59: Move away from old_mmio accessors

2018-08-03 Thread Mark Cave-Ayland
On 02/08/18 19:06, Peter Maydell wrote: Move the m48t59 device away from using old_mmio MemoryRegionOps accessors. Signed-off-by: Peter Maydell --- Tested with 'make check' and by booting a sparc guest. hw/timer/m48t59.c | 59 +-- 1 file changed,

Re: [Qemu-devel] [PATCH 0/6] qcow2: Make the L2 cache cover the whole image by default

2018-08-03 Thread Kevin Wolf
Am 29.07.2018 um 23:27 hat Leonid Bloch geschrieben: > This series makes the qcow2 L2 cache cover the entire image by default. > The importance of this change is in noticeable performance improvement, > especially with heavy random I/O. The memory overhead is very small: > only 1 MB of cache for ev

Re: [Qemu-devel] Can I create img more thant 16TB?

2018-08-03 Thread Daniel P . Berrangé
On Fri, Aug 03, 2018 at 12:46:19PM +0800, lampahome wrote: > There's file size maximum in ext4 and it's 16TB > > Can I create qcow2 ex:32TB and write more than 16TB? You'll need to switch to a more scalable filesystem such as XFS to be able to write more then 16TB of data. Regards, Daniel -- |:

Re: [Qemu-devel] [PATCH] migrate/cpu-throttle: Add max-cpu-throttle migration parameter

2018-08-03 Thread Dr. David Alan Gilbert
* Li Qiang (liq...@gmail.com) wrote: > 2018-08-02 18:47 GMT+08:00 Dr. David Alan Gilbert : > > > * Li Qiang (liq...@gmail.com) wrote: > > > Currently, the default maximum CPU throttle for migration is > > > 99(CPU_THROTTLE_PCT_MAX). This is too big and can make a remarkable > > > performance effec

Re: [Qemu-devel] [PATCH 4/6] dirty-bitmaps: clean-up bitmaps loading and migration logic

2018-08-03 Thread Dr. David Alan Gilbert
* Denis V. Lunev (d...@openvz.org) wrote: > On 08/02/2018 12:50 PM, Dr. David Alan Gilbert wrote: > > * Denis V. Lunev (d...@openvz.org) wrote: > > > > > >>> I don't quite understand the last two paragraphs. > >> we are thinking right now to eliminate delay on regular IO > >> for migration. There i

Re: [Qemu-devel] [PATCH 4/6] dirty-bitmaps: clean-up bitmaps loading and migration logic

2018-08-03 Thread Vladimir Sementsov-Ogievskiy
03.08.2018 11:33, Dr. David Alan Gilbert wrote: * Denis V. Lunev (d...@openvz.org) wrote: On 08/02/2018 12:50 PM, Dr. David Alan Gilbert wrote: * Denis V. Lunev (d...@openvz.org) wrote: I don't quite understand the last two paragraphs. we are thinking right now to eliminate delay on regular

Re: [Qemu-devel] [PATCH] qemu-img.c: Add examples section

2018-08-03 Thread Fam Zheng
On Thu, 08/02 22:34, Programmingkid wrote: > > > On Aug 2, 2018, at 10:10 PM, Fam Zheng wrote: > > > > On Thu, 08/02 20:50, John Arbuckle wrote: > >> Add an examples section to the help output. > >> > >> Signed-off-by: John Arbuckle > >> --- > >> qemu-img.c | 11 +++ > >> 1 file changed

Re: [Qemu-devel] [PATCH 4/6] dirty-bitmaps: clean-up bitmaps loading and migration logic

2018-08-03 Thread Dr. David Alan Gilbert
* Vladimir Sementsov-Ogievskiy (vsement...@virtuozzo.com) wrote: > 03.08.2018 11:33, Dr. David Alan Gilbert wrote: > > * Denis V. Lunev (d...@openvz.org) wrote: > > > On 08/02/2018 12:50 PM, Dr. David Alan Gilbert wrote: > > > > * Denis V. Lunev (d...@openvz.org) wrote: > > > > > > > > > > > > >

[Qemu-devel] [PATCH 1/5] tests/vm: Use -cpu max rather than -cpu host

2018-08-03 Thread Peter Maydell
Currently attempting to run the vm-build-* tests on a system where the user does not have access to KVM will fail, because although they avoid using -enable-kvm, they use "-cpu host", which only works with KVM. Switch to "-cpu max" instead, which works with any accelerator. Signed-off-by: Peter Ma

[Qemu-devel] [PATCH 0/5] tests/vm: various minor improvements

2018-08-03 Thread Peter Maydell
The setup I had for my BSD VMs broke today, so I thought I'd have a look at using the tests/vm/ support for building QEMU inside BSD VMs rather than re-rolling my own. This patchset fixes some rough edges I ran into along the way: * fixes support for non-KVM accelerators * propagates J=n setting

[Qemu-devel] [PATCH 4/5] tests/vm: Bump guest RAM up from 2G to 4G

2018-08-03 Thread Peter Maydell
Currently we run the guests in a VM which is given only 2G of RAM. Since the guests are configured without any swap space, builds can fail because the system runs out of memory and kills the compiler, especially if the job count is set for a lot of parallelism. Bump the setting up from 2G to 4G to

[Qemu-devel] [PATCH 5/5] tests/vm: Use make's --output-sync option

2018-08-03 Thread Peter Maydell
Use make's --output-sync option when running tests inside VMs, so that if we're building with parallelization the output doesn't get scrambled. Signed-off-by: Peter Maydell --- tests/vm/freebsd | 4 ++-- tests/vm/netbsd | 4 ++-- tests/vm/openbsd | 4 ++-- tests/vm/ubuntu.i386 | 4 +

[Qemu-devel] [PATCH 3/5] tests/vm: Propagate V=1 down into the make inside the VM

2018-08-03 Thread Peter Maydell
Invoking 'make vm-build-freebsd' and friends with V=1 should propagate that verbosity setting down into the build run inside the VM. Make sure we do that. This brings it into line with how the container tests handle V=1. Signed-off-by: Peter Maydell --- tests/vm/Makefile.include | 1 + docs/deve

[Qemu-devel] [PATCH 2/5] tests/vm: Pass the jobs parallelism setting to 'make check'

2018-08-03 Thread Peter Maydell
Our test suite works for parallel execution too, and this can noticeably speed up a test run; pass the 'jobs' setting to it as well as to the build proper. Signed-off-by: Peter Maydell --- tests/vm/freebsd | 2 +- tests/vm/netbsd | 2 +- tests/vm/openbsd | 2 +- tests/vm/ubuntu.i386

Re: [Qemu-devel] [PATCH 4/6] dirty-bitmaps: clean-up bitmaps loading and migration logic

2018-08-03 Thread Denis V. Lunev
On 08/03/2018 11:33 AM, Dr. David Alan Gilbert wrote: > * Denis V. Lunev (d...@openvz.org) wrote: >> On 08/02/2018 12:50 PM, Dr. David Alan Gilbert wrote: >>> * Denis V. Lunev (d...@openvz.org) wrote: >>> >>> > I don't quite understand the last two paragraphs. we are thinking right now to

Re: [Qemu-devel] [PATCH 4/6] dirty-bitmaps: clean-up bitmaps loading and migration logic

2018-08-03 Thread Dr. David Alan Gilbert
* Denis V. Lunev (d...@openvz.org) wrote: > On 08/03/2018 11:33 AM, Dr. David Alan Gilbert wrote: > > * Denis V. Lunev (d...@openvz.org) wrote: > >> On 08/02/2018 12:50 PM, Dr. David Alan Gilbert wrote: > >>> * Denis V. Lunev (d...@openvz.org) wrote: > >>> > >>> > > I don't quite understand the

[Qemu-devel] qemu 2.12.0 crash during install windows 10 with vga.

2018-08-03 Thread Changlimin
Hi, I have the same issue as https://www.qubes-os.org/doc/windows-vm/ , it's not easy to reproduce. cpu_physical_memory_snapshot_get_dirty: Assertion `start + length <= snap->end' failed Qemu version is 2.12.0. (gdb) bt #0 0x7f504ed6fc37 in raise () from /lib/x86_64-linux-gnu/libc.so.6 #1

[Qemu-devel] [PATCH v6 00/12] Enable postcopy RDMA live migration

2018-08-03 Thread Lidong Chen
The RDMA QIOChannel does not support bi-directional communication, so when RDMA live migration with postcopy enabled, the source qemu return path get qemu file error. These patches implement bi-directional communication for RDMA QIOChannel and disable the RDMA WRITE during the postcopy phase.

[Qemu-devel] [PATCH v6 06/12] migration: implement io_set_aio_fd_handler function for RDMA QIOChannel

2018-08-03 Thread Lidong Chen
From: Lidong Chen if qio_channel_rdma_readv return QIO_CHANNEL_ERR_BLOCK, the destination qemu crash. The backtrace is: (gdb) bt #0 0x in ?? () #1 0x008db50e in qio_channel_set_aio_fd_handler (ioc=0x38111e0, ctx=0x3726080, io_read=0x8db841 , io_write=0x

[Qemu-devel] [PATCH v6 05/12] migration: Stop rdma yielding during incoming postcopy

2018-08-03 Thread Lidong Chen
From: Lidong Chen During incoming postcopy, the destination qemu will invoke qemu_rdma_wait_comp_channel in a seprate thread. So does not use rdma yield, and poll the completion channel fd instead. Signed-off-by: Lidong Chen Reviewed-by: Dr. David Alan Gilbert --- migration/rdma.c | 4 +++- 1

[Qemu-devel] [PATCH v6 04/12] migration: implement bi-directional RDMA QIOChannel

2018-08-03 Thread Lidong Chen
From: Lidong Chen This patch implements bi-directional RDMA QIOChannel. Because different threads may access RDMAQIOChannel currently, this patch use RCU to protect it. Signed-off-by: Lidong Chen Reviewed-by: Dr. David Alan Gilbert --- migration/colo.c | 2 + migration/migration.c

[Qemu-devel] [PATCH v6 01/12] migration: disable RDMA WRITE after postcopy started

2018-08-03 Thread Lidong Chen
From: Lidong Chen RDMA WRITE operations are performed with no notification to the destination qemu, then the destination qemu can not wakeup. This patch disable RDMA WRITE after postcopy started. Signed-off-by: Lidong Chen Reviewed-by: Dr. David Alan Gilbert --- migration/qemu-file.c | 8 +++

[Qemu-devel] [PATCH v6 08/12] migration: poll the cm event while wait RDMA work request completion

2018-08-03 Thread Lidong Chen
From: Lidong Chen If the peer qemu is crashed, the qemu_rdma_wait_comp_channel function maybe loop forever. so we should also poll the cm event fd, and when receive RDMA_CM_EVENT_DISCONNECTED and RDMA_CM_EVENT_DEVICE_REMOVAL, we consider some error happened. Signed-off-by: Lidong Chen Signed-of

[Qemu-devel] [PATCH v6 10/12] migration: poll the cm event for destination qemu

2018-08-03 Thread Lidong Chen
The destination qemu only poll the comp_channel->fd in qemu_rdma_wait_comp_channel. But when source qemu disconnnect the rdma connection, the destination qemu should be notified. Signed-off-by: Lidong Chen --- migration/migration.c | 3 ++- migration/rdma.c | 31 +++

[Qemu-devel] [PATCH v6 11/12] migration: remove the unnecessary RDMA_CONTROL_ERROR message

2018-08-03 Thread Lidong Chen
It's not necessary to send RDMA_CONTROL_ERROR when clean up rdma resource. If rdma->error_state is ture, the message may not send successfully. and the cm event can also notify the peer qemu. Signed-off-by: Lidong Chen --- migration/rdma.c | 11 --- 1 file changed, 11 deletions(-) diff

[Qemu-devel] [PATCH v6 02/12] migration: create a dedicated connection for rdma return path

2018-08-03 Thread Lidong Chen
From: Lidong Chen If start a RDMA migration with postcopy enabled, the source qemu establish a dedicated connection for return path. Signed-off-by: Lidong Chen Reviewed-by: Dr. David Alan Gilbert --- migration/rdma.c | 94 ++-- 1 file change

[Qemu-devel] [PATCH v6 12/12] migration: create a dedicated thread to release rdma resource

2018-08-03 Thread Lidong Chen
ibv_dereg_mr wait for a long time for big memory size virtual server. The test result is: 10GB 326ms 20GB 699ms 30GB 1021ms 40GB 1387ms 50GB 1712ms 60GB 2034ms 70GB 2457ms 80GB 2807ms 90GB 3107ms 100GB 3474ms 110GB 3735ms 120GB 4064ms 130GB 4567ms 140GB 4886ms

[Qemu-devel] [PATCH v6 03/12] migration: avoid concurrent invoke channel_close by different threads

2018-08-03 Thread Lidong Chen
From: Lidong Chen The channel_close maybe invoked by different threads. For example, source qemu invokes qemu_fclose in main thread, migration thread and return path thread. Destination qemu invokes qemu_fclose in main thread, listen thread and COLO incoming thread. Signed-off-by: Lidong Chen R

[Qemu-devel] [PATCH v6 07/12] migration: invoke qio_channel_yield only when qemu_in_coroutine()

2018-08-03 Thread Lidong Chen
From: Lidong Chen when qio_channel_read return QIO_CHANNEL_ERR_BLOCK, the source qemu crash. The backtrace is: (gdb) bt #0 0x7fb20aba91d7 in raise () from /lib64/libc.so.6 #1 0x7fb20abaa8c8 in abort () from /lib64/libc.so.6 #2 0x7fb20aba2146 in __assert_fail_base (

Re: [Qemu-devel] [PATCH v2 2/2] hw/arm: Add Arm Enterprise machine type

2018-08-03 Thread Hongbo Zhang
On 26 July 2018 at 20:43, Peter Maydell wrote: > On 26 July 2018 at 13:35, Andrew Jones wrote: >> On Thu, Jul 26, 2018 at 01:10:34PM +0100, Peter Maydell wrote: >>> On 26 July 2018 at 12:41, Andrew Jones wrote: >>> > The patch guards the generation. It'll only modify DT and ACPI for the >>> > ne

[Qemu-devel] [PATCH v6 09/12] migration: implement the shutdown for RDMA QIOChannel

2018-08-03 Thread Lidong Chen
From: Lidong Chen Because RDMA QIOChannel not implement shutdown function, If the to_dst_file was set error, the return path thread will wait forever. and the migration thread will wait return path thread exit. the backtrace of return path thread is: (gdb) bt #0 0x7f372a76bb0f in ppoll

Re: [Qemu-devel] [PATCH v2 2/2] hw/arm: Add Arm Enterprise machine type

2018-08-03 Thread Peter Maydell
On 3 August 2018 at 10:21, Hongbo Zhang wrote: > The 'sbsa' machine won't consume QEMU generated ACPI, so it won't > touch or add new ACPI tables. > > UEFI relies on its ACPI to load OS, but currently it still needs DT > from QEMU to pass some info, one example is CPU number. > > So, the 'sbsa' co

Re: [Qemu-devel] [PATCH 1/4] qcow2: Introduce an option for sufficient L2 cache for the entire image

2018-08-03 Thread Alberto Garcia
On Tue 24 Jul 2018 04:52:17 PM CEST, Eric Blake wrote: >> @item refcount-cache-size >> The maximum size of the refcount block cache in bytes >> (default: 1/5 of the total cache size) > > Alberto, looks like we missed this documentation in your changes to > the defaults. Oh, indeed! Berto

Re: [Qemu-devel] [PATCH v2 2/2] hw/arm: Add Arm Enterprise machine type

2018-08-03 Thread Ard Biesheuvel
On 3 August 2018 at 11:23, Peter Maydell wrote: > On 3 August 2018 at 10:21, Hongbo Zhang wrote: >> The 'sbsa' machine won't consume QEMU generated ACPI, so it won't >> touch or add new ACPI tables. >> >> UEFI relies on its ACPI to load OS, but currently it still needs DT >> from QEMU to pass som

[Qemu-devel] [PULL 1/5] vhost: check region type before casting

2018-08-03 Thread Michael S. Tsirkin
From: Tiwei Bie Check region type first before casting the memory region to IOMMUMemoryRegion. Otherwise QEMU will abort with below error message when casting non-IOMMU memory region: vhost_iommu_region_add: Object 0x561f28bce4f0 is not an instance of type qemu:iommu-memory-region Fixes: cb1efc

[Qemu-devel] [PULL 5/5] tests/acpi: update tables after memory hotplug changes

2018-08-03 Thread Michael S. Tsirkin
Previous patch changes acpi tables, update expected files accordingly. Signed-off-by: Michael S. Tsirkin --- tests/acpi-test-data/pc/SRAT.dimmpxm | Bin 472 -> 472 bytes tests/acpi-test-data/pc/SRAT.memhp| Bin 264 -> 264 bytes tests/acpi-test-data/q35/SRAT.dimmpxm | Bin 472 -> 472 bytes t

[Qemu-devel] [PULL 2/5] hw/acpi-build: Add a check for memory-less NUMA nodes

2018-08-03 Thread Michael S. Tsirkin
From: Dou Liyang Currently, Qemu ACPI builder doesn't consider the memory-less NUMA nodes, eg: -m 4G,slots=4,maxmem=8G \ -numa node,nodeid=0 \ -numa node,nodeid=1,mem=2G \ -numa node,nodeid=2,mem=2G \ -numa node,nodeid=3\ Guest Linux will report [0.00] ACPI: SRAT: Node 0 PX

[Qemu-devel] [PULL 3/5] tests/acpi-test: update ACPI tables test blobs

2018-08-03 Thread Michael S. Tsirkin
From: Dou Liyang Now, QEmu adds a new check for memory-less NUMA nodes in build_srat(). It effects the ACPI test. So, Update ACPI tables test blobs. Signed-off-by: Dou Liyang Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/acpi-test-data/pc/SRAT.numamem | Bin 2

[Qemu-devel] [PULL 0/5] pc, virtio: fixes

2018-08-03 Thread Michael S. Tsirkin
Please consider for 3.0 if there is another rc. The following changes since commit f7502360397d291be04bc040e9f96c92ff2d8030: Update version for v3.0.0-rc3 release (2018-07-31 19:30:17 +0100) are available in the Git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_

[Qemu-devel] [PULL 4/5] pc: acpi: fix memory hotplug regression by reducing stub SRAT entry size

2018-08-03 Thread Michael S. Tsirkin
From: Igor Mammedov Commit 848a1cc1e (hw/acpi-build: build SRAT memory affinity structures for DIMM devices) broke the first dimm hotplug in following cases: 1: there is no coldplugged dimm in the last numa node but there is a coldplugged dimm in another node -m 4096,slots=4,maxmem=32G

Re: [Qemu-devel] [PATCH 0/5] tests/vm: various minor improvements

2018-08-03 Thread Fam Zheng
On Fri, 08/03 09:52, Peter Maydell wrote: > The setup I had for my BSD VMs broke today, so I thought I'd > have a look at using the tests/vm/ support for building QEMU > inside BSD VMs rather than re-rolling my own. This patchset > fixes some rough edges I ran into along the way: > * fixes support

[Qemu-devel] [Bug 1785197] [NEW] qemu 2.12.0 crash during install windows 10 with vga

2018-08-03 Thread changlimin
Public bug reported: Same issue as https://www.qubes-os.org/doc/windows-vm/ , it's not easy to reproduced. cpu_physical_memory_snapshot_get_dirty: Assertion `start + length <= snap->end’ failed Qemu version is 2.12.0. (gdb) bt #0 0x7f504ed6fc37 in raise () from /lib/x86_64-linux-gnu/libc.

Re: [Qemu-devel] [PATCH v2 2/2] hw/arm: Add Arm Enterprise machine type

2018-08-03 Thread Andrew Jones
On Fri, Aug 03, 2018 at 11:26:41AM +0200, Ard Biesheuvel wrote: > On 3 August 2018 at 11:23, Peter Maydell wrote: > > On 3 August 2018 at 10:21, Hongbo Zhang wrote: > >> The 'sbsa' machine won't consume QEMU generated ACPI, so it won't > >> touch or add new ACPI tables. > >> > >> UEFI relies on i

Re: [Qemu-devel] [PATCH v2 2/2] hw/arm: Add Arm Enterprise machine type

2018-08-03 Thread Peter Maydell
On 3 August 2018 at 10:26, Ard Biesheuvel wrote: > On 3 August 2018 at 11:23, Peter Maydell wrote: >> Would the real hardware you are trying to be an example >> for use DT for this? It seems a bit unlikely to me. >> > > Yes, as a matter of fact. There is work underway both on the EDK2 and > the A

[Qemu-devel] [Bug 1785203] [NEW] accel/tcg/translate-all.c:2511: page_check_range: Assertion `start < ((target_ulong)1 << L1_MAP_ADDR_SPACE_BITS)' failed.

2018-08-03 Thread Serge Belyshev
Public bug reported: qemu-riscv64 version 2.12.93 crashes when mincore() is called with invalid pointer with the following message: qemu-riscv64: /opt/qemu/accel/tcg/translate-all.c:2511: page_check_range: Assertion `start < ((target_ulong)1 << L1_MAP_ADDR_SPACE_BITS)' failed. qemu:handle_cpu_si

Re: [Qemu-devel] [PATCH v2 2/2] hw/arm: Add Arm Enterprise machine type

2018-08-03 Thread Hongbo Zhang
On 3 August 2018 at 17:39, Peter Maydell wrote: > On 3 August 2018 at 10:26, Ard Biesheuvel wrote: >> On 3 August 2018 at 11:23, Peter Maydell wrote: >>> Would the real hardware you are trying to be an example >>> for use DT for this? It seems a bit unlikely to me. >>> >> >> Yes, as a matter of

[Qemu-devel] [PATCH] hw/intc/apic: Switch away from old_mmio

2018-08-03 Thread Peter Maydell
Switch the apic away from using the old_mmio MemoryRegionOps accessor functions. Signed-off-by: Peter Maydell --- I think this is the last old_mmio user. We can clean up the core code once all the on-list patches get into master. --- hw/intc/apic.c | 42 ++

Re: [Qemu-devel] [PATCH v3 6/7] loader: Implement .hex file loader

2018-08-03 Thread Stefan Hajnoczi
On Thu, Aug 02, 2018 at 11:04:46PM +0100, Peter Maydell wrote: > On 2 August 2018 at 13:43, Stefan Hajnoczi wrote: > > On Mon, Jul 30, 2018 at 07:01:53PM +0100, Peter Maydell wrote: > >> I'm still not convinced we want to add another random > >> special case only-works-on-one-architecture-and-some

Re: [Qemu-devel] [PATCH 0/5] tests/vm: various minor improvements

2018-08-03 Thread Fam Zheng
On Fri, 08/03 09:52, Peter Maydell wrote: > The setup I had for my BSD VMs broke today, so I thought I'd > have a look at using the tests/vm/ support for building QEMU > inside BSD VMs rather than re-rolling my own. This patchset > fixes some rough edges I ran into along the way: > * fixes support

Re: [Qemu-devel] [PULL 0/5] pc, virtio: fixes

2018-08-03 Thread Peter Maydell
On 3 August 2018 at 10:27, Michael S. Tsirkin wrote: > Please consider for 3.0 if there is another rc. > > The following changes since commit f7502360397d291be04bc040e9f96c92ff2d8030: > > Update version for v3.0.0-rc3 release (2018-07-31 19:30:17 +0100) > > are available in the Git repository at

Re: [Qemu-devel] [PATCH v6 38/77] target/mips: Add emulation of DSP ASE for nanoMIPS - part 1

2018-08-03 Thread Aleksandar Markovic
> > From: Stefan Markovic > Sent: Thursday, August 2, 2018 4:16 PM > Subject: [PATCH v6 38/77] target/mips: Add emulation of DSP ASE for nanoMIPS > - part 1 > > From: Stefan Markovic > > Add emulation of DSP ASE instructions for nanoMIPS - part 1. > > Signed-off-by: Aleksandar Markovic > Si

Re: [Qemu-devel] [Qemu-ppc] [PULL 0/2] ppc-for-3.0 queue 20180801

2018-08-03 Thread David Gibson
On Fri, Aug 03, 2018 at 07:49:12AM +0200, Thomas Huth wrote: > On 08/02/2018 04:07 PM, David Gibson wrote: > > On Thu, Aug 02, 2018 at 10:16:32AM +0100, Peter Maydell wrote: > >> On 2 August 2018 at 08:08, David Gibson > >> wrote: > >>> The macio fix, however, *is* a regression from 2.12. Whethe

Re: [Qemu-devel] [PATCH v6 39/77] target/mips: Add emulation of DSP ASE for nanoMIPS - part 2

2018-08-03 Thread Aleksandar Markovic
> +case NM_BPOSGE32C: > +check_dsp(ctx); > +{ > +int32_t imm = extract32(ctx->opcode, 1, 13) | > + extract32(ctx->opcode, 0, 1) << 13; > + > +gen_compute_bran

Re: [Qemu-devel] [Qemu-block] [PATCH 3/6 for-3.0] qcow2: Options' documentation fixes

2018-08-03 Thread Alberto Garcia
On Sun 29 Jul 2018 11:27:41 PM CEST, Leonid Bloch wrote: > Signed-off-by: Leonid Bloch > --- > docs/qcow2-cache.txt | 9 ++--- > qapi/block-core.json | 6 +++--- > qemu-options.hx | 15 +-- > 3 files changed, 18 insertions(+), 12 deletions(-) > > diff --git a/docs/qcow2-cac

Re: [Qemu-devel] [PATCH v6 40/77] target/mips: Add emulation of DSP ASE for nanoMIPS - part 3

2018-08-03 Thread Aleksandar Markovic
> From: Stefan Markovic > Sent: Thursday, August 2, 2018 4:16 PM > Subject: [PATCH v6 40/77] target/mips: Add emulation of DSP ASE for nanoMIPS > - part 3 > > From: Stefan Markovic > > Add emulation of DSP ASE instructions for nanoMIPS - part 3. > > Signed-off-by: Aleksandar Markovic > Signe

Re: [Qemu-devel] [PATCH v6 41/77] target/mips: Add emulation of DSP ASE for nanoMIPS - part 4

2018-08-03 Thread Aleksandar Markovic
> From: Stefan Markovic > Sent: Thursday, August 2, 2018 4:16 PM > Subject: [PATCH v6 41/77] target/mips: Add emulation of DSP ASE for nanoMIPS > - part 4 > > From: Stefan Markovic > > Add emulation of DSP ASE instructions for nanoMIPS - part 4. > > Signed-off-by: Aleksandar Markovic > Signe

Re: [Qemu-devel] [PATCH v6 42/77] target/mips: Add emulation of DSP ASE for nanoMIPS - part 5

2018-08-03 Thread Aleksandar Markovic
> From: Stefan Markovic > Sent: Thursday, August 2, 2018 4:16 PM > Subject: [PATCH v6 42/77] target/mips: Add emulation of DSP ASE for nanoMIPS > - part 5 > > From: Stefan Markovic > > Add emulation of DSP ASE instructions for nanoMIPS - part 5. > > Signed-off-by: Aleksandar Markovic > Signe

Re: [Qemu-devel] [Qemu-block] [PATCH 4/6] qcow2: Update total_sectors when resizing the image

2018-08-03 Thread Alberto Garcia
On Mon 30 Jul 2018 02:28:28 PM CEST, Kevin Wolf wrote: >> > Also, 512 should be BDRV_SECTOR_SIZE. >> >> I was surprised that it's not, but it's 512 also in two other places, >> including in qcow2_co_truncate itself. So I decided to keep >> that. Probably would be better if I'd repair it in the oth

Re: [Qemu-devel] [PATCH v6 77/77] linux-user: Add nanoMIPS support in scripts/qemu-binfmt-conf.sh

2018-08-03 Thread Laurent Vivier
Le 03/08/2018 à 13:23, Aleksandar Rikalo a écrit : > Hi, Laurent, > > Thank You for the explanation. > > We will correct this in the next version. > We will also fix family values for the regular mips architectures in > separate patch. It's a good idea. Thanks, Laurent

Re: [Qemu-devel] [PATCH v6 43/77] target/mips: Add emulation of DSP ASE for nanoMIPS - part 6

2018-08-03 Thread Aleksandar Markovic
> > From: Stefan Markovic > Sent: Thursday, August 2, 2018 4:16 PM > Subject: [PATCH v6 43/77] target/mips: Add emulation of DSP ASE for nanoMIPS > - part 6 > > From: Stefan Markovic > > Add emulation of DSP ASE instructions for nanoMIPS - part 6. > > Signed-off-by: Aleksandar Markovic > Si

Re: [Qemu-devel] [PATCH v6 23/77] target/mips: Add emulation of nanoMIPS 16-bit load and store instructions

2018-08-03 Thread Aleksandar Markovic
Also, wrong indentation of the block that follows these lines: > +case NM_P_LS_WM: > +case NM_P_LS_UAWM: From: Richard Henderson Sent: Thursday, August 2, 2018 7:39:27 PM To: Stefan Markovic; qemu-devel@nongnu.org Cc: laur...@viv

Re: [Qemu-devel] [PATCH v6 77/77] linux-user: Add nanoMIPS support in scripts/qemu-binfmt-conf.sh

2018-08-03 Thread Aleksandar Rikalo
Hi, Laurent, Thank You for the explanation. We will correct this in the next version. We will also fix family values for the regular mips architectures in separate patch. Best Regards, Aleksandar Rikalo From: Laurent Vivier Sent: Thursday, August 2, 2018 9

Re: [Qemu-devel] [PATCH] qemu-img.c: Add examples section

2018-08-03 Thread Programmingkid
> On Aug 3, 2018, at 4:46 AM, Fam Zheng wrote: > > On Thu, 08/02 22:34, Programmingkid wrote: >> >>> On Aug 2, 2018, at 10:10 PM, Fam Zheng wrote: >>> >>> On Thu, 08/02 20:50, John Arbuckle wrote: Add an examples section to the help output. Signed-off-by: John Arbuckle

Re: [Qemu-devel] [Qemu-block] [PATCH 6/6] qcow2: Resize the cache upon image resizing

2018-08-03 Thread Alberto Garcia
On Sun 29 Jul 2018 11:27:44 PM CEST, Leonid Bloch wrote: > The caches are now recalculated upon image resizing. This is done > because the new default behavior of assigning a sufficient L2 cache to > cover the entire image implies that the cache will still be sufficient > after image resizing. To p

Re: [Qemu-devel] [PATCH v6 00/77] Add nanoMIPS support to QEMU

2018-08-03 Thread Stefan Markovic
Hi, This series seems to have some coding style problems. Yes, we are aware of those issues: 1. "Does MAINTAINERS need an update" warning for several patches: The answer is there is no need to update MAINTAINERS file. These warnings will persist in any version of this series. We will not fix

Re: [Qemu-devel] [kvm-unit-tests PATCH v2 1/4] mark exit() and abort() as non-returning functions

2018-08-03 Thread Andrew Jones
On Fri, Jul 20, 2018 at 04:39:39PM +0100, Andre Przywara wrote: > exit() and abort() are functions that never return, and (at least) > GCC has an attribute to flag those functions accordingly. This allows > the compiler to do further optimizations and to omit various warnings > about uninitialized

Re: [Qemu-devel] [kvm-unit-tests PATCH v2 2/4] arm/arm64: GIC: basic GICv2 MMIO tests

2018-08-03 Thread Andrew Jones
On Fri, Jul 20, 2018 at 04:39:40PM +0100, Andre Przywara wrote: > This adds an MMIO subtest to the GIC test. > It accesses some generic GICv2 registers and does some sanity tests, > like checking for some of them being read-only. > > Signed-off-by: Andre Przywara > --- > arm/gic.c | 91

Re: [Qemu-devel] [kvm-unit-tests PATCH v2 3/4] arm/arm64: GICv2: add GICD_IPRIORITYR testing

2018-08-03 Thread Andrew Jones
On Fri, Jul 20, 2018 at 04:39:41PM +0100, Andre Przywara wrote: > Some tests for the IPRIORITY registers. The significant number of bits > is IMPLEMENTATION DEFINED, but should be the same for every IRQ. > Also these registers must be byte-accessible. > Check that accesses beyond the implemented IR

[Qemu-devel] [PATCH] Makefile: Don't add -dirty to pkgversion when tree is not dirty

2018-08-03 Thread Lucas Eriksson
On a clean just-cloned repo, git-diff-index has no local index to compare with, leading to all files being marked as new on some systems. git-diff on the other hand actually compares the files contents with the repository tree and then updates said local index. This problem was found when trying to

Re: [Qemu-devel] [kvm-unit-tests PATCH v2 3/4] arm/arm64: GICv2: add GICD_IPRIORITYR testing

2018-08-03 Thread Andrew Jones
On Fri, Jul 20, 2018 at 04:39:41PM +0100, Andre Przywara wrote: > Some tests for the IPRIORITY registers. The significant number of bits > is IMPLEMENTATION DEFINED, but should be the same for every IRQ. > Also these registers must be byte-accessible. > Check that accesses beyond the implemented IR

Re: [Qemu-devel] [kvm-unit-tests PATCH v2 4/4] arm/arm64: GICv2: add GICD_ITARGETSR testing

2018-08-03 Thread Andrew Jones
On Fri, Jul 20, 2018 at 04:39:42PM +0100, Andre Przywara wrote: > Some tests for the ITARGETS registers. > Bits corresponding to non-existent CPUs must be RAZ/WI. > These registers must be byte-accessible, also check that accesses beyond > the implemented IRQ limit are actually read-as-zero/write-i

Re: [Qemu-devel] [PATCH 0/4] target/arm sve fixes

2018-08-03 Thread Peter Maydell
On 1 August 2018 at 13:31, Richard Henderson wrote: > These four patches are minor, reported by Laurent this week. > > If there happens to be an -rc4 release, it would be nice if > they were included. But if not, no biggie. I suspect that > other minor issues will be found past these four, so I

Re: [Qemu-devel] [PATCH 0/6] qcow2: Make the L2 cache cover the whole image by default

2018-08-03 Thread Alberto Garcia
On Mon 30 Jul 2018 12:55:22 PM CEST, Kevin Wolf wrote: > I agree with changing the defaults, I would have proposed a change > myself soon. We have been offering cache size options for a long time, > and management tools are still ignoring them. So we need to do > something in QEMU. Indeed, there's

Re: [Qemu-devel] [PATCH v2 2/2] hw/arm: Add Arm Enterprise machine type

2018-08-03 Thread Laszlo Ersek
Hi Drew, On 08/03/18 11:37, Andrew Jones wrote: > On Fri, Aug 03, 2018 at 11:26:41AM +0200, Ard Biesheuvel wrote: >> On 3 August 2018 at 11:23, Peter Maydell >> wrote: >>> On 3 August 2018 at 10:21, Hongbo Zhang >>> wrote: The 'sbsa' machine won't consume QEMU generated ACPI, so it won't >>

Re: [Qemu-devel] [PATCH v6 39/77] target/mips: Add emulation of DSP ASE for nanoMIPS - part 2

2018-08-03 Thread Stefan Markovic
BPOSGE32C is introduced in DSP-R3. Shouldn't there be check_dspr3(), and applied here? You're right. DSPR3 is not supported in QEMU at the moment. Patch with DSP Revision 3 support will be included in next version of patch set. >From the code, it turns out that the only difference between BP

Re: [Qemu-devel] [PATCH v2 2/2] hw/arm: Add Arm Enterprise machine type

2018-08-03 Thread Andrew Jones
On Fri, Aug 03, 2018 at 03:44:21PM +0200, Laszlo Ersek wrote: > Hi Drew, > > On 08/03/18 11:37, Andrew Jones wrote: > > On Fri, Aug 03, 2018 at 11:26:41AM +0200, Ard Biesheuvel wrote: > >> On 3 August 2018 at 11:23, Peter Maydell > >> wrote: > >>> On 3 August 2018 at 10:21, Hongbo Zhang > >>> wr

[Qemu-devel] [PATCH v4 2/6] target/arm: add "cortex-m0" CPU model

2018-08-03 Thread Stefan Hajnoczi
Define a "cortex-m0" ARMv6-M CPU model. Most of the register reset values set by other CPU models are not relevant for the cut-down ARMv6-M architecture. Signed-off-by: Stefan Hajnoczi Reviewed-by: Peter Maydell --- target/arm/cpu.c | 11 +++ 1 file changed, 11 insertions(+) diff --gi

[Qemu-devel] [PATCH v4 4/6] loader: add rom transaction API

2018-08-03 Thread Stefan Hajnoczi
Image file loaders may add a series of roms. If an error occurs partway through loading there is no easy way to drop previously added roms. This patch adds a transaction mechanism that works like this: rom_transaction_begin(); ...call rom_add_*()... rom_transaction_end(ok); If ok is false

[Qemu-devel] [PATCH v4 3/6] loader: extract rom_free() function

2018-08-03 Thread Stefan Hajnoczi
The next patch will need to free a rom. There is already code to do this in rom_add_file(). Note that rom_add_file() uses: rom = g_malloc0(sizeof(*rom)); ... if (rom->fw_dir) { g_free(rom->fw_dir); g_free(rom->fw_file); } The conditional is unnecessary since g_free(NULL) is

[Qemu-devel] [PATCH v4 1/6] hw/arm: make bitbanded IO optional on ARMv7-M

2018-08-03 Thread Stefan Hajnoczi
Some ARM CPUs have bitbanded IO, a memory region that allows convenient bit access via 32-bit memory loads/stores. This eliminates the need for read-modify-update instruction sequences. This patch makes this optional feature an ARMv7MState qdev property, allowing boards to choose whether they wan

[Qemu-devel] [PATCH v4 5/6] loader: Implement .hex file loader

2018-08-03 Thread Stefan Hajnoczi
From: Su Hang This patch adds Intel Hexadecimal Object File format support to the generic loader device. The file format specification is available here: http://www.piclist.com/techref/fileext/hex/intel.htm This file format is often used with microcontrollers such as the micro:bit, Arduino, STM

[Qemu-devel] [PATCH v4 0/6] arm: add Cortex M0 CPU model and hex file loader

2018-08-03 Thread Stefan Hajnoczi
v4: * Drop ARMv7MState to ARMMProfileState rename because it causes a lot of code churn and is incomplete. Other parts of QEMU (like NVIC emulation) still refer to "v7m" although they apply to other architecture versions too. [Peter] * Use the generic loader device (-device loader,file=

[Qemu-devel] [PATCH v4 6/6] Add QTest testcase for the Intel Hexadecimal

2018-08-03 Thread Stefan Hajnoczi
From: Su Hang 'test.hex' file is a bare metal ARM software stored in Hexadecimal Object Format. When it's loaded by QEMU, it will print "Hello world!\n" on console. `pre_store` array in 'hexloader-test.c' file, stores the binary format of 'test.hex' file, which is used to verify correctness. Re

Re: [Qemu-devel] [PATCH v2 2/2] hw/arm: Add Arm Enterprise machine type

2018-08-03 Thread Laszlo Ersek
On 08/03/18 16:39, Andrew Jones wrote: > On Fri, Aug 03, 2018 at 03:44:21PM +0200, Laszlo Ersek wrote: >> In my earlier email >> >> dynamic DRAM base for ArmVirtQemu >> http://mid.mail-archive.com/4cce2b8b-a411-bd5d-a06f-b0b80a5fb2f1@redhat.com >> >> I investigated what it would take to adapt

Re: [Qemu-devel] [PATCH 0/6] qcow2: Make the L2 cache cover the whole image by default

2018-08-03 Thread Kevin Wolf
Am 03.08.2018 um 15:37 hat Alberto Garcia geschrieben: > On Mon 30 Jul 2018 12:55:22 PM CEST, Kevin Wolf wrote: > > I agree with changing the defaults, I would have proposed a change > > myself soon. We have been offering cache size options for a long time, > > and management tools are still ignori

Re: [Qemu-devel] [PULL 30/35] block/dirty-bitmap: Add bdrv_dirty_iter_next_area

2018-08-03 Thread Vladimir Sementsov-Ogievskiy
18.06.2018 19:44, Kevin Wolf wrote: From: Max Reitz This new function allows to look for a consecutively dirty area in a dirty bitmap. Signed-off-by: Max Reitz Reviewed-by: Fam Zheng Reviewed-by: John Snow Message-id: 20180613181823.13618-10-mre...@redhat.com Signed-off-by: Max Reitz ---

Re: [Qemu-devel] [PULL 33/35] block/mirror: Add active mirroring

2018-08-03 Thread Vladimir Sementsov-Ogievskiy
18.06.2018 19:45, Kevin Wolf wrote: From: Max Reitz This patch implements active synchronous mirroring. In active mode, the passive mechanism will still be in place and is used to copy all initially dirty clusters off the source disk; but every write request will write data both to the source

[Qemu-devel] [PATCH] virtio-gpu: fix crashes upon warm reboot with vga mode

2018-08-03 Thread Marc-André Lureau
With vga=775 on the Linux command line a first boot of the VM running Linux works fine. After a warm reboot it crashes during Linux boot. Before that, valgrind points out bad memory write to console surface. The VGA code is not aware that virtio-gpu got a message surface scanout when the display i

[Qemu-devel] [RFC PATCH] async: Fix aio_notify_accept

2018-08-03 Thread Fam Zheng
>From main loop, bdrv_set_aio_context() can call IOThread's aio_poll(). That breaks aio_notify() because the ctx->notifier event can get cleared too early by this which causes IOThread hanging. See https://bugzilla.redhat.com/show_bug.cgi?id=1562750 for details. Signed-off-by: Fam Zheng --- uti

Re: [Qemu-devel] [PATCH v3 for-3.0] tests/libqtest: Improve kill_qemu()

2018-08-03 Thread Markus Armbruster
Eric Blake writes: > In kill_qemu() we have an assert that checks that the QEMU process > didn't dump core: > assert(!WCOREDUMP(wstatus)); > > Unfortunately the WCOREDUMP macro here means the resulting message > is not very easy to comprehend on at least some systems: > > ahci-test: t

[Qemu-devel] [PATCH 0/3] Arm migration fixes for 3.0

2018-08-03 Thread Peter Maydell
This patchset primarily fixes problems with Arm migration induced by a bug in the core vmstate handling of subsections: currently the migration code incorrectly treats a subsection with no .needed function pointer as if it was the subsection list terminator -- it is ignored and so is everything aft

[Qemu-devel] [PATCH 2/3] hw/intc/arm_gicv3_common: Combine duplicate .subsections in vmstate_gicv3_cpu

2018-08-03 Thread Peter Maydell
Commit 6692aac411199064 accidentally introduced a second initialization of the .subsections field of vmstate_gicv3_cpu, instead of adding the new subsection to the existing list. The effect of this was probably that migration of GICv3 with virtualization enabled was broken (or alternatively that mi

[Qemu-devel] [PATCH 3/3] target/arm: Add dummy needed functions to M profile vmstate subsections

2018-08-03 Thread Peter Maydell
Currently the migration code incorrectly treats a subsection with no .needed function pointer as if it was the subsection list terminator -- it is ignored and so is everything after it. Work around this by giving various M profile vmstate structs a 'needed' function that always returns true. We reu

[Qemu-devel] [PATCH 1/3] hw/intc/arm_gicv3_common: Give no-migration-shift-bug subsection a needed function

2018-08-03 Thread Peter Maydell
Currently the migration code incorrectly treats a subsection with no .needed function pointer as if it was the subsection list terminator -- it is ignored and so is everything after it. Work around this by giving vmstate_gicv3_gicd_no_migration_shift_bug a 'needed' function that always returns true

Re: [Qemu-devel] [PATCH] virtio-gpu: fix crashes upon warm reboot with vga mode

2018-08-03 Thread Stefan Berger
On 08/03/2018 11:32 AM, Marc-André Lureau wrote: With vga=775 on the Linux command line a first boot of the VM running Linux works fine. After a warm reboot it crashes during Linux boot. Before that, valgrind points out bad memory write to console surface. The VGA code is not aware that virtio-g

Re: [Qemu-devel] [RFC PATCH] async: Fix aio_notify_accept

2018-08-03 Thread Paolo Bonzini
On 03/08/2018 17:49, Fam Zheng wrote: > void aio_notify_accept(AioContext *ctx) > { > -if (atomic_xchg(&ctx->notified, false)) { > +/* If ctx->notify_me >= 2, another aio_poll() is waiting which may need > the > + * ctx->notifier event to wake up, so don't already clear it just > be

Re: [Qemu-devel] [PATCH 2/3] hw/intc/arm_gicv3_common: Combine duplicate .subsections in vmstate_gicv3_cpu

2018-08-03 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > Commit 6692aac411199064 accidentally introduced a second initialization > of the .subsections field of vmstate_gicv3_cpu, instead of adding > the new subsection to the existing list. The effect of this was > probably that migration of GICv3 with v

Re: [Qemu-devel] [RFC PATCH] async: Fix aio_notify_accept

2018-08-03 Thread Paolo Bonzini
On 03/08/2018 17:49, Fam Zheng wrote: > void aio_notify_accept(AioContext *ctx) > { > -if (atomic_xchg(&ctx->notified, false)) { > +/* If ctx->notify_me >= 2, another aio_poll() is waiting which may need > the > + * ctx->notifier event to wake up, so don't already clear it just > be

Re: [Qemu-devel] [PATCH v3 for-3.0] tests/libqtest: Improve kill_qemu()

2018-08-03 Thread Eric Blake
On 08/03/2018 10:51 AM, Markus Armbruster wrote: Eric Blake writes: In kill_qemu() we have an assert that checks that the QEMU process didn't dump core: assert(!WCOREDUMP(wstatus)); Unfortunately the WCOREDUMP macro here means the resulting message is not very easy to comprehend

Re: [Qemu-devel] [PATCH 1/3] hw/intc/arm_gicv3_common: Give no-migration-shift-bug subsection a needed function

2018-08-03 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > Currently the migration code incorrectly treats a subsection with > no .needed function pointer as if it was the subsection list > terminator -- it is ignored and so is everything after it. > Work around this by giving vmstate_gicv3_gicd_no_migrat

  1   2   >