Re: [Qemu-devel] [PATCH RFC v1 1/3] target/ppc: Emulate LL/SC using cmpxchg helpers

2017-04-06 Thread Nikunj A Dadhania
David Gibson writes: > [ Unknown signature status ] > On Thu, Apr 06, 2017 at 03:52:47PM +0530, Nikunj A Dadhania wrote: >> Emulating LL/SC with cmpxchg is not correct, since it can suffer from >> the ABA problem. However, portable parallel code is written assuming

Re: [Qemu-devel] [PATCH RFC v1 1/3] target/ppc: Emulate LL/SC using cmpxchg helpers

2017-04-06 Thread David Gibson
On Thu, Apr 06, 2017 at 03:52:47PM +0530, Nikunj A Dadhania wrote: > Emulating LL/SC with cmpxchg is not correct, since it can suffer from > the ABA problem. However, portable parallel code is written assuming > only cmpxchg which means that in practice this is a viable alternative. > >

Re: [Qemu-devel] [Qemu-ppc] [PATCH RFC v1 0/3] Enable MTTCG on PPC64

2017-04-06 Thread Nikunj A Dadhania
Cédric Le Goater writes: > Hello Nikunj, > > On 04/06/2017 12:22 PM, Nikunj A Dadhania wrote: >> The series enables Multi-Threaded TCG on PPC64 >> >> Patch 01: Use atomic_cmpxchg in store conditional >> 02: Handle first write to page during atomic operation >> 03:

Re: [Qemu-devel] [PATCH 0/2] use blk_pwrite_zeroes for each zero cluster

2017-04-06 Thread 858585 jemmy
the test result for this patch: the migration command : virsh migrate --live 165cf436-312f-47e7-90f2-f8aa63f34893 --copy-storage-all qemu+ssh://10.59.163.38/system the qemu-img info on source host: qemu-img info

Re: [Qemu-devel] [PATCH RFC v1 3/3] target/ppc: Generate fence operations

2017-04-06 Thread Nikunj A Dadhania
Richard Henderson writes: > On 04/06/2017 03:22 AM, Nikunj A Dadhania wrote: >> @@ -3028,6 +3030,7 @@ static void gen_##name(DisasContext *ctx) >> \ >> tcg_gen_qemu_ld_tl(gpr, t0, ctx->mem_idx, memop);\ >>

Re: [Qemu-devel] [PATCH RFC v1 1/3] target/ppc: Emulate LL/SC using cmpxchg helpers

2017-04-06 Thread Nikunj A Dadhania
Richard Henderson writes: > On 04/06/2017 03:22 AM, Nikunj A Dadhania wrote: >> tcg_gen_trunc_tl_i32(cpu_crf[0], cpu_so); >> l1 = gen_new_label(); >> tcg_gen_brcond_tl(TCG_COND_NE, EA, cpu_reserve, l1); >> -tcg_gen_ori_i32(cpu_crf[0], cpu_crf[0], CRF_EQ); >>

Re: [Qemu-devel] [PATCH RFC v1 1/3] target/ppc: Emulate LL/SC using cmpxchg helpers

2017-04-06 Thread Nikunj A Dadhania
Richard Henderson writes: > On 04/06/2017 03:22 AM, Nikunj A Dadhania wrote: >> +TCGv_i32 tmp = tcg_temp_local_new_i32(); >> +TCGv t0; >> >> +tcg_gen_movi_i32(tmp, 0); >> tcg_gen_trunc_tl_i32(cpu_crf[0], cpu_so); >> l1 = gen_new_label(); >>

Re: [Qemu-devel] [PATCH v8 3/9] memory: provide iommu_replay_all()

2017-04-06 Thread Peter Xu
On Thu, Apr 06, 2017 at 07:46:47PM +0800, Peter Xu wrote: > On Thu, Apr 06, 2017 at 12:52:19PM +0200, Auger Eric wrote: > > Hi Peter, > > > > On 06/04/2017 09:08, Peter Xu wrote: [...] > > > +void memory_region_iommu_replay_all(MemoryRegion *mr) > > > +{ > > > +IOMMUNotifier *notifier; > >

Re: [Qemu-devel] [PATCH] kvm: pass the virtual SEI syndrome to guest OS

2017-04-06 Thread gengdongjiu
Hi Laszlo, thanks. On 2017/4/7 2:55, Laszlo Ersek wrote: > On 04/06/17 14:35, gengdongjiu wrote: >> Dear, Laszlo >>Thanks for your detailed explanation. >> >> On 2017/3/29 19:58, Laszlo Ersek wrote: >>> (This ought to be one of the longest address lists I've ever seen :) >>> Thanks for the

Re: [Qemu-devel] [Qemu-ppc] [PATCH RFC v1 0/3] Enable MTTCG on PPC64

2017-04-06 Thread luigi burdo
Hi i can help test it too on my two Be machine. If some one help me to find where is the patch or where i can download the commits Thanks Luigi

[Qemu-devel] [PATCH for-2.9?] qcow2: Allow discard of final unaligned cluster

2017-04-06 Thread Eric Blake
As mentioned in commit 0c1bd46, we ignored requests to discard the trailing cluster of an unaligned image. While discard is an advisory operation from the guest standpoint, (and we are therefore free to ignore any request), our qcow2 implementation exploits the fact that a discarded cluster reads

Re: [Qemu-devel] [PATCH v3] migration/block:limit the time used for block migration

2017-04-06 Thread 858585 jemmy
On Thu, Apr 6, 2017 at 10:02 PM, Stefan Hajnoczi wrote: > On Wed, Apr 05, 2017 at 05:27:58PM +0800, jemmy858...@gmail.com wrote: >> From: Lidong Chen >> >> when migration with high speed, mig_save_device_bulk invoke >> bdrv_is_allocated too

Re: [Qemu-devel] [PATCH for-2.9 3/5] block: Quiesce old aio context during bdrv_set_aio_context

2017-04-06 Thread Fam Zheng
On Thu, 04/06 17:17, Kevin Wolf wrote: > Am 06.04.2017 um 16:25 hat Fam Zheng geschrieben: > > The fact that the bs->aio_context is changing can confuse the dataplane > > iothread, because of the now fine granularity aio context lock. > > bdrv_drain should rather be a bdrv_drained_begin/end pair,

Re: [Qemu-devel] [PATCH for-2.9 1/5] block: Fix unpaired aio_disable_external in external snapshot

2017-04-06 Thread Fam Zheng
On Thu, 04/06 16:36, Kevin Wolf wrote: > Am 06.04.2017 um 16:25 hat Fam Zheng geschrieben: > > bdrv_replace_child_noperm tries to hand over the quiesce_counter state > > from old bs to the new one, but if they are not on the same aio context > > this causes unbalance. > > > > Fix this by forcing

[Qemu-devel] [PULL for-2.9 1/1] vfio/pci-quirks: Exclude non-ioport BAR from NVIDIA quirk

2017-04-06 Thread Alex Williamson
The NVIDIA BAR5 quirk is targeting an ioport BAR. Some older devices have a BAR5 which is not ioport and can induce a segfault here. Test the BAR type to skip these devices. Link: https://bugs.launchpad.net/qemu/+bug/1678466 Signed-off-by: Alex Williamson ---

[Qemu-devel] [PULL for-2.9 0/1] VFIO fixes 2017-04-06

2017-04-06 Thread Alex Williamson
The following changes since commit 54d689988c847271d87b3eb113712147129fb811: Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2017-04-06 09:27:49 +0100) are available in the git repository at: git://github.com/awilliam/qemu-vfio.git

Re: [Qemu-devel] [PATCH 03/21] ppc/pnv: Add support for POWER8+ LPC Controller

2017-04-06 Thread Benjamin Herrenschmidt
On Thu, 2017-04-06 at 14:44 +0200, Cédric Le Goater wrote: > May be we could move that under the LPC object even if it is not > strictly > correct from a HW pov ?  I'm not fan of this. It's really not part of the LPC controller and it's specific to a certain crop of P8 machines. Cheers, Ben.

Re: [Qemu-devel] [PATCH 04/21] ppc/pnv: enable only one LPC bus

2017-04-06 Thread Benjamin Herrenschmidt
On Thu, 2017-04-06 at 14:35 +0200, Cédric Le Goater wrote: > but real HW (2 sockets OpenPOWER systems, garrison and firestone) > does  > not expose the LPC bus on the second chip, should we do so in qemu ? It's not so much HW as it it HostBoot. Not a huge deal. Cheers, Ben.

Re: [Qemu-devel] [PULL 43/46] block: Assertions for write permissions

2017-04-06 Thread Richard W.M. Jones
On Thu, Apr 06, 2017 at 04:23:19PM -0500, Eric Blake wrote: > On 04/06/2017 04:15 PM, Richard W.M. Jones wrote: > > +++ b/block/io.c > @@ -945,6 +945,8 @@ static int coroutine_fn > bdrv_co_do_copy_on_readv(BdrvChild *child, > size_t skip_bytes; > int ret; >

Re: [Qemu-devel] [PULL 43/46] block: Assertions for write permissions

2017-04-06 Thread Eric Blake
On 04/06/2017 04:15 PM, Richard W.M. Jones wrote: +++ b/block/io.c @@ -945,6 +945,8 @@ static int coroutine_fn bdrv_co_do_copy_on_readv(BdrvChild *child, size_t skip_bytes; int ret; +assert(child->perm & (BLK_PERM_WRITE_UNCHANGED |

[Qemu-devel] [PATCH] hw/arm/virt: generate 64-bit addressable ACPI objects

2017-04-06 Thread Ard Biesheuvel
Our current ACPI table generation code limits the placement of ACPI tables to 32-bit addressable memory, in order to be able to emit the root pointer (RSDP) and root table (RSDT) using table types from the ACPI 1.0 days. Since ARM was not supported by ACPI before version 5.0, it makes sense to

Re: [Qemu-devel] [PULL 43/46] block: Assertions for write permissions

2017-04-06 Thread Richard W.M. Jones
On Thu, Apr 06, 2017 at 04:03:28PM -0500, Eric Blake wrote: > On 04/06/2017 03:59 PM, Richard W.M. Jones wrote: > > On Tue, Feb 28, 2017 at 09:36:42PM +0100, Kevin Wolf wrote: > >> This adds assertions that ensure that the necessary write permissions > >> have been granted before someone attempts

[Qemu-devel] [PATCH] event: Add signal information to SHUTDOWN

2017-04-06 Thread Eric Blake
qemu_kill_report() is already able to tell whether a shutdown was triggered by guest action (no output) or by a host signal (a message about termination is printed via error_report); but this information is then lost. Libvirt would like to be able to distinguish between a SHUTDOWN event triggered

Re: [Qemu-devel] [PULL 43/46] block: Assertions for write permissions

2017-04-06 Thread Eric Blake
On 04/06/2017 03:59 PM, Richard W.M. Jones wrote: > On Tue, Feb 28, 2017 at 09:36:42PM +0100, Kevin Wolf wrote: >> This adds assertions that ensure that the necessary write permissions >> have been granted before someone attempts to write to a node. >> >> Signed-off-by: Kevin Wolf

Re: [Qemu-devel] [PULL 43/46] block: Assertions for write permissions

2017-04-06 Thread Richard W.M. Jones
On Tue, Feb 28, 2017 at 09:36:42PM +0100, Kevin Wolf wrote: > This adds assertions that ensure that the necessary write permissions > have been granted before someone attempts to write to a node. > > Signed-off-by: Kevin Wolf > Acked-by: Fam Zheng >

Re: [Qemu-devel] [PATCH RFC] hw/pvrdma: Proposal of a new pvrdma device

2017-04-06 Thread Jason Gunthorpe
On Thu, Apr 06, 2017 at 10:45:54PM +0300, Yuval Shaia wrote: > > Just add my 2 cents. You didn't answer on my question about other possible > > implementations. It can be SoftRoCE loopback optimizations, special ULP, > > RDMA transport, virtual driver with multiple VFs and single PF. > > Please

Re: [Qemu-devel] [PATCH RFC] hw/pvrdma: Proposal of a new pvrdma device

2017-04-06 Thread Jason Gunthorpe
On Thu, Apr 06, 2017 at 10:42:20PM +0300, Yuval Shaia wrote: > > I'd rather see someone optimize the loopback path of soft roce than > > see KDBR :) > > Can we assume that the optimized loopback path will be as fast as direct > copy between one VM address space to another VM address space?

Re: [Qemu-devel] [PATCH RFC] hw/pvrdma: Proposal of a new pvrdma device

2017-04-06 Thread Yuval Shaia
On Tue, Apr 04, 2017 at 08:33:49PM +0300, Leon Romanovsky wrote: > > I'm not going to repeat Jason's answer, I'm completely agree with him. > > Just add my 2 cents. You didn't answer on my question about other possible > implementations. It can be SoftRoCE loopback optimizations, special ULP, >

Re: [Qemu-devel] [PATCH RFC] hw/pvrdma: Proposal of a new pvrdma device

2017-04-06 Thread Yuval Shaia
On Tue, Apr 04, 2017 at 10:01:55AM -0600, Jason Gunthorpe wrote: > On Tue, Apr 04, 2017 at 04:38:40PM +0300, Marcel Apfelbaum wrote: > > > Here are some thoughts regarding the Soft RoCE usage in our project. > > We thought about using it as backend for QEMU pvrdma device > > we didn't how it will

[Qemu-devel] [PATCH for-2.9] throttle: Remove block from group on hot-unplug

2017-04-06 Thread Eric Blake
When a block device that is part of a throttle group is hot-unplugged, we forgot to remove it from the throttle group. This leaves stale memory around, and causes an easily reproducible crash: $ ./x86_64-softmmu/qemu-system-x86_64 -nodefaults -nographic -qmp stdio \ -device

Re: [Qemu-devel] [PATCH for-2.9] block: Ignore guest dev permissions during incoming migration

2017-04-06 Thread Kashyap Chamarthy
On Thu, Apr 06, 2017 at 07:59:53PM +0200, Kevin Wolf wrote: > Usually guest devices don't like other writers to the same image, so > they use blk_set_perm() to prevent this from happening. In the migration > phase before the VM is actually running, though, they don't have a > problem with writes

Re: [Qemu-devel] help debugging throttle crash

2017-04-06 Thread Eric Blake
On 04/03/2017 10:24 AM, Alberto Garcia wrote: > On Mon, Apr 03, 2017 at 09:07:02AM -0500, Eric Blake wrote: > >> At this point, it looks like no one is calling >> throttle_group_unregister_blk() as a result of the 'device_del', >> which leaves stale memory around > > I see, I can also reproduce

Re: [Qemu-devel] [PATCH] kvm: pass the virtual SEI syndrome to guest OS

2017-04-06 Thread Laszlo Ersek
On 04/06/17 14:35, gengdongjiu wrote: > Dear, Laszlo >Thanks for your detailed explanation. > > On 2017/3/29 19:58, Laszlo Ersek wrote: >> (This ought to be one of the longest address lists I've ever seen :) >> Thanks for the CC. I'm glad Shannon is already on the CC list. For good >>

[Qemu-devel] [PATCH v2] kvmvapic: Enable kvmvapic when necessary

2017-04-06 Thread Anthony Xu
If KVM provides VAPIC, don't set up kvmvapic. Signed-off-by: Anthony Xu --- hw/intc/apic_common.c | 5 - include/sysemu/kvm.h | 1 + kvm-all.c | 5 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/hw/intc/apic_common.c

Re: [Qemu-devel] [Qemu-block] [RFC PATCH for-2.9] block: Ignore guest dev permissions during incoming migration

2017-04-06 Thread Kashyap Chamarthy
On Thu, Apr 06, 2017 at 07:26:15PM +0200, Kashyap Chamarthy wrote: > On Tue, Apr 04, 2017 at 05:35:56PM +0200, Kevin Wolf wrote: > > Usually guest devices don't like other writers to the same image, so > > they use blk_set_perm() to prevent this from happening. In the migration > > phase before

Re: [Qemu-devel] Fix build break during configuration on musl-libc based Linux systems.

2017-04-06 Thread Peter Maydell
On 6 April 2017 at 19:15, Rainer Müller wrote: > A bit late to this thread, but the original problem was also reported > for Mac OS X with --enable-curses in MacPorts. The build fails with the > same symptoms as in the original report. > >

Re: [Qemu-devel] [PATCH 1/1] qemu-img: img_create does not support image-opts, fix docs

2017-04-06 Thread Kevin Wolf
Am 06.04.2017 um 19:45 hat Jeff Cody geschrieben: > The documentation and help for qemu-img claims that 'qemu-img create' > will take the '--image-opts' argument. This is not true, so this > patch removes those claims. > > Signed-off-by: Jeff Cody Thanks, applied to the block

Re: [Qemu-devel] [PATCH]Enable kvmvapic only when host doesn't support VAPIC capability in KVM mode

2017-04-06 Thread Xu, Anthony
> > --- a/kvm-all.c > > +++ b/kvm-all.c > > @@ -2232,6 +2232,10 @@ int kvm_has_sync_mmu(void) > > return kvm_check_extension(kvm_state, KVM_CAP_SYNC_MMU); > > } > > > > +int kvm_has_vapic(void){ > > +return !kvm_check_extension(kvm_state, KVM_CAP_VAPIC); > > +} > > + > > Is that

Re: [Qemu-devel] Fix build break during configuration on musl-libc based Linux systems.

2017-04-06 Thread Rainer Müller
On 2017-02-17 17:57, Peter Maydell wrote: > On 17 February 2017 at 11:20, Paolo Bonzini wrote: >> >> >> On 17/02/2017 11:18, Peter Maydell wrote: >>> Defining _XOPEN_SOURCE is easy enough, and I think we should >>> do it unconditionally. We should check what effect this has

Re: [Qemu-devel] [PATCH for-2.9 1/1] qemu-img: img_create does not support image-opts, fix docs

2017-04-06 Thread Eric Blake
On 04/06/2017 12:45 PM, Jeff Cody wrote: > The documentation and help for qemu-img claims that 'qemu-img create' > will take the '--image-opts' argument. This is not true, so this > patch removes those claims. > > Signed-off-by: Jeff Cody > --- > qemu-img-cmds.hx | 4 ++-- >

Re: [Qemu-devel] [Qemu-ppc] [PATCH RFC v1 0/3] Enable MTTCG on PPC64

2017-04-06 Thread G 3
On Apr 6, 2017, at 1:08 PM, luigi burdo wrote: Hi i can help test it too on my two Be machine. If some one help me to find where is the patch or where i can download the commits Thanks Luigi Here are the patches: 1/3 https://patchwork.ozlabs.org/patch/747691/ 2/3

[Qemu-devel] [PATCH for-2.9] block: Ignore guest dev permissions during incoming migration

2017-04-06 Thread Kevin Wolf
Usually guest devices don't like other writers to the same image, so they use blk_set_perm() to prevent this from happening. In the migration phase before the VM is actually running, though, they don't have a problem with writes to the image. On the other hand, storage migration needs to be able

Re: [Qemu-devel] is qemu able to run multiple system emulation simultaneously

2017-04-06 Thread G 3
On Apr 6, 2017, at 12:00 PM, qemu-devel-requ...@nongnu.org wrote: Dear QEMU developers, I need multiple ARM-based hardware emulation runing simultaneously in one PC. I wander if QEMU is capble to run two system emulation at the same time. Or I have to use two QEMU for two system

Re: [Qemu-devel] [PATCH for-2.9 0/2] block/mirror: Fix use-after-free

2017-04-06 Thread Kevin Wolf
Am 03.04.2017 um 19:51 hat Max Reitz geschrieben: > And the exciting 2.9 ride continues! > > When mirroring from a BDS with no parents at all (such as those added > with -blockdev or blockdev-add), we have a use-after-free in mirror's > error path. The first patch of this series fixes that, the

[Qemu-devel] [PATCH 1/1] qemu-img: img_create does not support image-opts, fix docs

2017-04-06 Thread Jeff Cody
The documentation and help for qemu-img claims that 'qemu-img create' will take the '--image-opts' argument. This is not true, so this patch removes those claims. Signed-off-by: Jeff Cody --- qemu-img-cmds.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

Re: [Qemu-devel] EXT :Re: Emulating external registers

2017-04-06 Thread Peter Maydell
On 6 April 2017 at 18:23, Wu, Michael Y [US] (MS) wrote: > I changed my code to the following and added the appropriate read,write > functions and a MemoryRegionOps. > memory_region_init_io(reg_memory, NULL, _ops, reg, > "reg_mem", 0x0040);

Re: [Qemu-devel] [PATCH for-2.9 2/2] commit: Set commit_top_bs->total_sectors

2017-04-06 Thread Eric Blake
On 04/06/2017 12:14 PM, Kevin Wolf wrote: > Like in the mirror filter driver, we also need to set the image size for > the commit filter driver. This is less likely to be a problem in > practice than for the mirror because we're not at the active layer here, > but attaching new parents to a node

Re: [Qemu-devel] [PATCH for-2.9 1/2] commit: Set commit_top_bs->aio_context

2017-04-06 Thread Eric Blake
On 04/06/2017 12:14 PM, Kevin Wolf wrote: > The filter driver that is inserted by the commit job needs to use the > same AioContext as its parent and child nodes. > > Signed-off-by: Kevin Wolf > --- > block/commit.c | 2 ++ > 1 file changed, 2 insertions(+) > Reviewed-by:

Re: [Qemu-devel] [Qemu-block] [RFC PATCH for-2.9] block: Ignore guest dev permissions during incoming migration

2017-04-06 Thread Kashyap Chamarthy
On Tue, Apr 04, 2017 at 05:35:56PM +0200, Kevin Wolf wrote: > Usually guest devices don't like other writers to the same image, so > they use blk_set_perm() to prevent this from happening. In the migration > phase before the VM is actually running, though, they don't have a > problem with writes

Re: [Qemu-devel] EXT :Re: Emulating external registers

2017-04-06 Thread Wu, Michael Y [US] (MS)
Thank you Peter! I changed my code to the following and added the appropriate read,write functions and a MemoryRegionOps. memory_region_init_io(reg_memory, NULL, _ops, reg, "reg_mem", 0x0040); //set to 64 bytes memory_region_add_subregion(sysmem, 0xFC00,

Re: [Qemu-devel] [Qemu-block] [RFC PATCH for-2.9] block: Ignore guest dev permissions during incoming migration

2017-04-06 Thread Kashyap Chamarthy
On Tue, Apr 04, 2017 at 05:35:56PM +0200, Kevin Wolf wrote: > Usually guest devices don't like other writers to the same image, so > they use blk_set_perm() to prevent this from happening. In the migration > phase before the VM is actually running, though, they don't have a > problem with writes

[Qemu-devel] [PATCH for-2.9 0/2] commit: Fix commit_top_bs problems

2017-04-06 Thread Kevin Wolf
The same problem that Fam's patch "mirror: Fix aio context of mirror_top_bs" fixes for the mirror block job also exists for the commit block job and the 'commit' HMP command. While comparing the respective places in mirror.c and commit.c, I also noticed that commit neglects to set an image size.

[Qemu-devel] [PATCH for-2.9 1/2] commit: Set commit_top_bs->aio_context

2017-04-06 Thread Kevin Wolf
The filter driver that is inserted by the commit job needs to use the same AioContext as its parent and child nodes. Signed-off-by: Kevin Wolf --- block/commit.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/commit.c b/block/commit.c index 2832482..4c38220 100644

[Qemu-devel] [PATCH for-2.9 2/2] commit: Set commit_top_bs->total_sectors

2017-04-06 Thread Kevin Wolf
Like in the mirror filter driver, we also need to set the image size for the commit filter driver. This is less likely to be a problem in practice than for the mirror because we're not at the active layer here, but attaching new parents to a node in the middle of the chain is possible, so the size

[Qemu-devel] [Bug 1635339] Re: qxl_pre_save assertion failure on vm "save"

2017-04-06 Thread rubenvb
I'm running into this issue as well: Arch Linux Qemu 2.8.0 spice guest tools: 0.132 QXL driver version (as reported by Windows Device Manager): 10.0.0.15000 Everything else works great. It would save me a lot of rebooting if this could get fixed. If there is anything I can do or try, I'll be

Re: [Qemu-devel] [RFC] Proposed qcow2 extension: subcluster allocation

2017-04-06 Thread Eric Blake
On 04/06/2017 10:01 AM, Alberto Garcia wrote: > Hi all, > > over the past couple of months I discussed with some of you the > possibility to extend the qcow2 format in order to improve its > performance and reduce its memory requirements (particularly with very > large images). > > After some

Re: [Qemu-devel] [PATCH 1/5] qdev: qdev_hotplug is really a bool

2017-04-06 Thread Philippe Mathieu-Daudé
On 04/06/2017 10:13 AM, Juan Quintela wrote: Signed-off-by: Juan Quintela Reviewed-by: Philippe Mathieu-Daudé --- hw/core/qdev.c | 4 ++-- include/hw/qdev-core.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git

Re: [Qemu-devel] [Qemu-arm] [PATCH] target/arm: Add missing entries to excnames[] for log strings

2017-04-06 Thread Peter Maydell
On 6 April 2017 at 17:34, Philippe Mathieu-Daudé wrote: > Hi Peter, > > excnames[] is only used in arm_log_exception(), can we move it there? Seems like a good idea. I think this is historic, we used to use it in separate functions in different files for the 32-bit and 64-bit

Re: [Qemu-devel] [Qemu-arm] [PATCH] stellaris: Don't hw_error() on bad register accesses

2017-04-06 Thread Peter Maydell
On 6 April 2017 at 17:24, Philippe Mathieu-Daudé wrote: > Hi Peter, > > > On 04/06/2017 10:45 AM, Peter Maydell wrote: >> default: >> -hw_error("gptm_write: Bad offset 0x%x\n", (int)offset); >> +qemu_log_mask(LOG_GUEST_ERROR, >> + "GPTM:

Re: [Qemu-devel] [Qemu-arm] [PATCH] target/arm: Add missing entries to excnames[] for log strings

2017-04-06 Thread Philippe Mathieu-Daudé
Hi Peter, excnames[] is only used in arm_log_exception(), can we move it there? anyway: Reviewed-by: Philippe Mathieu-Daudé On 04/06/2017 10:45 AM, Peter Maydell wrote: Recent changes have added new EXCP_ values to ARM but forgot to update the excnames[] array which is used

Re: [Qemu-devel] [Qemu-arm] [PATCH] stellaris: Don't hw_error() on bad register accesses

2017-04-06 Thread Philippe Mathieu-Daudé
Hi Peter, On 04/06/2017 10:45 AM, Peter Maydell wrote: Current recommended style is to log a guest error on bad register accesses, not kill the whole system with hw_error(). Change the hw_error() calls to log as LOG_GUEST_ERROR or LOG_UNIMP or use g_assert_not_reached() as appropriate.

Re: [Qemu-devel] [PATCH for-2.9 5/5] coroutine: Explicitly specify AioContext when creating coroutine

2017-04-06 Thread Kevin Wolf
Am 06.04.2017 um 16:25 hat Fam Zheng geschrieben: > Coroutine in block layer should always be waken up in bs->aio_context > rather than the "current" context where it is entered. They differ when > the main loop is doing QMP tasks. This whole mechanism is complex stuff that I haven't quite caught

Re: [Qemu-devel] is qemu able to run multiple system emulation simultaneously

2017-04-06 Thread Peter Maydell
On 6 April 2017 at 16:47, Jiahuan Zhang wrote: > I need multiple ARM-based hardware emulation runing simultaneously in one > PC. > I wander if QEMU is capble to run two system emulation at the same time. > Or I have to use two QEMU for two system emulation You need to

Re: [Qemu-devel] [PATCH RFC v1 3/3] target/ppc: Generate fence operations

2017-04-06 Thread Richard Henderson
On 04/06/2017 03:22 AM, Nikunj A Dadhania wrote: @@ -3028,6 +3030,7 @@ static void gen_##name(DisasContext *ctx) \ tcg_gen_qemu_ld_tl(gpr, t0, ctx->mem_idx, memop);\ tcg_gen_mov_tl(cpu_reserve, t0); \

Re: [Qemu-devel] [PATCH 2/2] parallels: relax check for auto switch of prealloc_mode

2017-04-06 Thread Stefan Hajnoczi
On Wed, Apr 05, 2017 at 06:12:06PM +0300, Denis V. Lunev wrote: > PRL_PREALLOC_MODE_TRUNCATE can be set only through command line. Remove > the check that bdrv_truncate() is working on, this is almost always the > case, while the check could lead to serious consequences during migration > etc when

Re: [Qemu-devel] [PATCH for-2.9?] tests/check-qdict: Fix missing brackets

2017-04-06 Thread Eric Blake
On 04/06/2017 10:49 AM, Eric Blake wrote: > On 04/06/2017 10:41 AM, Dr. David Alan Gilbert (git) wrote: >> From: "Dr. David Alan Gilbert" >> >> Gcc 7 (on Fedora 26) spotted odd use of integers instead of a >> boolean; it's got a point. >> >> Signed-off-by: Dr. David Alan

Re: [Qemu-devel] [PATCH RFC v1 2/3] cputlb: handle first atomic write to the page

2017-04-06 Thread Richard Henderson
On 04/06/2017 03:22 AM, Nikunj A Dadhania wrote: In case where the conditional write is the first write to the page, TLB_NOTDIRTY will be set and stop_the_world is triggered. Handle this as a special case and set the dirty bit. After that fall through to the actual atomic instruction below.

Re: [Qemu-devel] [PATCH RFC v1 1/3] target/ppc: Emulate LL/SC using cmpxchg helpers

2017-04-06 Thread Richard Henderson
On 04/06/2017 03:22 AM, Nikunj A Dadhania wrote: tcg_gen_trunc_tl_i32(cpu_crf[0], cpu_so); l1 = gen_new_label(); tcg_gen_brcond_tl(TCG_COND_NE, EA, cpu_reserve, l1); -tcg_gen_ori_i32(cpu_crf[0], cpu_crf[0], CRF_EQ); -tcg_gen_qemu_st_tl(cpu_gpr[reg], EA, ctx->mem_idx,

Re: [Qemu-devel] [PATCH] tests/check-qdict: Fix missing brackets

2017-04-06 Thread Dr. David Alan Gilbert
* Eric Blake (ebl...@redhat.com) wrote: > On 04/06/2017 10:41 AM, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > Gcc 7 (on Fedora 26) spotted odd use of integers instead of a > > boolean; it's got a point. > > > > Signed-off-by: Dr. David

Re: [Qemu-devel] [PATCH RFC v1 1/3] target/ppc: Emulate LL/SC using cmpxchg helpers

2017-04-06 Thread Richard Henderson
On 04/06/2017 03:22 AM, Nikunj A Dadhania wrote: +TCGv_i32 tmp = tcg_temp_local_new_i32(); +TCGv t0; +tcg_gen_movi_i32(tmp, 0); tcg_gen_trunc_tl_i32(cpu_crf[0], cpu_so); l1 = gen_new_label(); tcg_gen_brcond_tl(TCG_COND_NE, EA, cpu_reserve, l1); -

Re: [Qemu-devel] [PATCH] tests/check-qdict: Fix missing brackets

2017-04-06 Thread Eric Blake
On 04/06/2017 10:41 AM, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Gcc 7 (on Fedora 26) spotted odd use of integers instead of a > boolean; it's got a point. > > Signed-off-by: Dr. David Alan Gilbert > --- >

[Qemu-devel] is qemu able to run multiple system emulation simultaneously

2017-04-06 Thread Jiahuan Zhang
Dear QEMU developers, I need multiple ARM-based hardware emulation runing simultaneously in one PC. I wander if QEMU is capble to run two system emulation at the same time. Or I have to use two QEMU for two system emulation If the former is possible, where can i find some docs about it? I have

[Qemu-devel] [PATCH] tests/check-qdict: Fix missing brackets

2017-04-06 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Gcc 7 (on Fedora 26) spotted odd use of integers instead of a boolean; it's got a point. Signed-off-by: Dr. David Alan Gilbert --- tests/check-qdict.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [Qemu-devel] [PATCH for-2.9 4/5] block: Drain BH in bdrv_drained_begin

2017-04-06 Thread Kevin Wolf
Am 06.04.2017 um 16:25 hat Fam Zheng geschrieben: > During block job completion, nothing is preventing > block_job_defer_to_main_loop_bh from being called in a nested > aio_poll(), which is a trouble, such as in this code path: > > qmp_block_commit > commit_active_start >

Re: [Qemu-devel] [PATCH v6] vfio error recovery: kernel support

2017-04-06 Thread Alex Williamson
On Thu, 6 Apr 2017 16:53:44 +0800 Cao jin wrote: > On 04/06/2017 06:36 AM, Michael S. Tsirkin wrote: > > On Wed, Apr 05, 2017 at 04:19:10PM -0600, Alex Williamson wrote: > >> On Thu, 6 Apr 2017 00:50:22 +0300 > >> "Michael S. Tsirkin" wrote: > >> >

Re: [Qemu-devel] [PATCH for-2.9 5/5] coroutine: Explicitly specify AioContext when creating coroutine

2017-04-06 Thread Eric Blake
On 04/06/2017 09:25 AM, Fam Zheng wrote: > Coroutine in block layer should always be waken up in bs->aio_context s/waken up/awakened/ > rather than the "current" context where it is entered. They differ when > the main loop is doing QMP tasks. > > Race conditions happen without this patch,

Re: [Qemu-devel] [PATCH v6] vfio error recovery: kernel support

2017-04-06 Thread Alex Williamson
On Thu, 6 Apr 2017 16:49:35 +0800 Cao jin wrote: > On 04/06/2017 05:56 AM, Michael S. Tsirkin wrote: > > On Wed, Apr 05, 2017 at 04:54:33PM +0800, Cao jin wrote: > >> Apparently, I don't have experience to induce non-fatal error, device > >> error is more of a chance

Re: [Qemu-devel] [PATCH v8 0/9] VT-d: vfio enablement and misc enhances

2017-04-06 Thread Peter Xu
On Thu, Apr 06, 2017 at 03:00:28PM +0300, Michael S. Tsirkin wrote: > On Thu, Apr 06, 2017 at 03:08:35PM +0800, Peter Xu wrote: > > This is v8 of vt-d vfio enablement series. > > > > v8 > > - remove patches 1-9 since merged already > > - add David's r-b for all the patches > > - add Aviv's s-o-b

Re: [Qemu-devel] [PATCH v8 0/9] VT-d: vfio enablement and misc enhances

2017-04-06 Thread Peter Xu
On Thu, Apr 06, 2017 at 02:53:46PM +0300, Michael S. Tsirkin wrote: > On Thu, Apr 06, 2017 at 03:08:35PM +0800, Peter Xu wrote: > > This is v8 of vt-d vfio enablement series. > > > > v8 > > - remove patches 1-9 since merged already > > - add David's r-b for all the patches > > - add Aviv's s-o-b

Re: [Qemu-devel] [PATCH 2/3] move xen-hvm.c to hw/i386/xen/

2017-04-06 Thread Sahid Orentino Ferdjaoui
On Wed, Apr 05, 2017 at 04:21:30PM -0700, Anthony Xu wrote: > move xen-hvm.c to hw/i386/xen/ > > > Signed-off -by: Anthony Xu > > > > --- > Makefile.target| 3 +-- > hw/i386/xen/Makefile.objs | 2 +- > hw/i386/xen/trace-events |

Re: [Qemu-devel] [PATCH 1/2] parallels: create parallels_inactivate() callback of block driver state

2017-04-06 Thread Denis V. Lunev
On 04/06/2017 06:14 PM, Stefan Hajnoczi wrote: > On Wed, Apr 05, 2017 at 06:12:05PM +0300, Denis V. Lunev wrote: >> We should avoid to image file at migration end when BDRV_O_INACTIVE > s/avoid to image/avoid writing to the image/ ? yes >> is set on the block driver state. All modifications

Re: [Qemu-devel] [PATCH 1/3] move xen-common.c to hw/xen/

2017-04-06 Thread Eric Blake
On 04/06/2017 10:10 AM, Sahid Orentino Ferdjaoui wrote: > On Wed, Apr 05, 2017 at 04:21:29PM -0700, Anthony Xu wrote: >> move xen-common.c to hw/xen/ >> >> Signed-off -by: Anthony Xu > > nit: s/Signed-off -by/Signed-off-by, not sure if it's really important > or not. Some

Re: [Qemu-devel] [PATCH for-2.9 3/5] block: Quiesce old aio context during bdrv_set_aio_context

2017-04-06 Thread Kevin Wolf
Am 06.04.2017 um 16:25 hat Fam Zheng geschrieben: > The fact that the bs->aio_context is changing can confuse the dataplane > iothread, because of the now fine granularity aio context lock. > bdrv_drain should rather be a bdrv_drained_begin/end pair, but since > bs->aio_context is changing, we can

Re: [Qemu-devel] [PATCH 1/2] parallels: create parallels_inactivate() callback of block driver state

2017-04-06 Thread Stefan Hajnoczi
On Wed, Apr 05, 2017 at 06:12:05PM +0300, Denis V. Lunev wrote: > We should avoid to image file at migration end when BDRV_O_INACTIVE s/avoid to image/avoid writing to the image/ ? > is set on the block driver state. All modifications should be done > in advance, i.e. in bdrv_inactivate. > >

Re: [Qemu-devel] [PATCH for-2.9 4/5] block: Drain BH in bdrv_drained_begin

2017-04-06 Thread Eric Blake
On 04/06/2017 09:25 AM, Fam Zheng wrote: > During block job completion, nothing is preventing > block_job_defer_to_main_loop_bh from being called in a nested > aio_poll(), which is a trouble, such as in this code path: > > qmp_block_commit > commit_active_start > bdrv_reopen >

Re: [Qemu-devel] [PATCH v8 1/9] memory: add section range info for IOMMU notifier

2017-04-06 Thread Alex Williamson
On Thu, 6 Apr 2017 15:08:36 +0800 Peter Xu wrote: > In this patch, IOMMUNotifier.{start|end} are introduced to store section > information for a specific notifier. When notification occurs, we not > only check the notification type (MAP|UNMAP), but also check whether the >

Re: [Qemu-devel] [PATCH 1/3] move xen-common.c to hw/xen/

2017-04-06 Thread Sahid Orentino Ferdjaoui
On Wed, Apr 05, 2017 at 04:21:29PM -0700, Anthony Xu wrote: > move xen-common.c to hw/xen/ > > Signed-off -by: Anthony Xu nit: s/Signed-off -by/Signed-off-by, not sure if it's really important or not. Reviewed-By: Sahid Orentino Ferdjaoui >

[Qemu-devel] [RFC] Proposed qcow2 extension: subcluster allocation

2017-04-06 Thread Alberto Garcia
Hi all, over the past couple of months I discussed with some of you the possibility to extend the qcow2 format in order to improve its performance and reduce its memory requirements (particularly with very large images). After some discussion in the mailing list and the #qemu IRC channel I

Re: [Qemu-devel] [PATCH for-2.9 3/5] block: Quiesce old aio context during bdrv_set_aio_context

2017-04-06 Thread Eric Blake
On 04/06/2017 09:25 AM, Fam Zheng wrote: > The fact that the bs->aio_context is changing can confuse the dataplane > iothread, because of the now fine granularity aio context lock. > bdrv_drain should rather be a bdrv_drained_begin/end pair, but since > bs->aio_context is changing, we can just use

Re: [Qemu-devel] [PATCH v5] Allow setting NUMA distance for different NUMA nodes

2017-04-06 Thread Andrew Jones
On Thu, Apr 06, 2017 at 10:18:53AM +0800, He Chen wrote: > This patch is going to add SLIT table support in QEMU, and provides > additional option `dist` for command `-numa` to allow user set vNUMA > distance by QEMU command. > > With this patch, when a user wants to create a guest that contains

Re: [Qemu-devel] [RFC PATCH 0/4] nvdimm: enable flush hint address structure

2017-04-06 Thread Xiao Guangrong
On 31/03/2017 4:41 PM, Haozhong Zhang wrote: This patch series constructs the flush hint address structures for nvdimm devices in QEMU. It's of course not for 2.9. I send it out early in order to get comments on one point I'm uncertain (see the detailed explanation below). Thanks for any

Re: [Qemu-devel] [RFC PATCH 2/4] nvdimm: add functions to initialize and perform flush on back store

2017-04-06 Thread Xiao Guangrong
On 03/31/2017 04:41 PM, Haozhong Zhang wrote: fsync() is used to persist modifications to the back store. If the host NVDIMM is used as the back store, fsync() on Linux will trigger the write to the host flush hint address. Signed-off-by: Haozhong Zhang ---

Re: [Qemu-devel] [RFC PATCH 0/4] nvdimm: enable flush hint address structure

2017-04-06 Thread Xiao Guangrong
On 04/06/2017 05:43 PM, Stefan Hajnoczi wrote: On Fri, Mar 31, 2017 at 04:41:43PM +0800, Haozhong Zhang wrote: This patch series constructs the flush hint address structures for nvdimm devices in QEMU. It's of course not for 2.9. I send it out early in order to get comments on one point I'm

Re: [Qemu-devel] [PATCH] Put all trace.o into libqemuutil.a

2017-04-06 Thread Stefan Hajnoczi
On Tue, Apr 04, 2017 at 09:39:39PM +, Xu, Anthony wrote: Thanks, applied to my tracing-next tree: https://github.com/stefanha/qemu/commits/tracing-next I fixed up the patch when applying it. Comments below: > Put all trace.o into libqemuutil.a Please use the "trace: " prefix for tracing

Re: [Qemu-devel] [RFC PATCH 1/4] pc-dimm: add 'reserved-size' to reserve address range after the ending address

2017-04-06 Thread Xiao Guangrong
On 03/31/2017 04:41 PM, Haozhong Zhang wrote: If option 'reserved-size=RSVD' is present, QEMU will reserve an address range of size 'RSVD' after the ending address of pc-dimm device. For the following example, -object memory-backend-file,id=mem0,size=4G,... -device

Re: [Qemu-devel] [RFC PATCH 0/4] nvdimm: enable flush hint address structure

2017-04-06 Thread Xiao Guangrong
On 04/06/2017 05:58 PM, Haozhong Zhang wrote: On 04/06/17 17:39 +0800, Xiao Guangrong wrote: On 31/03/2017 4:41 PM, Haozhong Zhang wrote: This patch series constructs the flush hint address structures for nvdimm devices in QEMU. It's of course not for 2.9. I send it out early in order to

Re: [Qemu-devel] [PATCH for-2.9 2/5] mirror: Fix aio context of mirror_top_bs

2017-04-06 Thread Eric Blake
On 04/06/2017 09:25 AM, Fam Zheng wrote: > It should be moved to the same context as source, before inserting to the > graph. > > Signed-off-by: Fam Zheng > --- > block/mirror.c | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Eric Blake > > diff

Re: [Qemu-devel] [PATCH for-2.9 2/5] mirror: Fix aio context of mirror_top_bs

2017-04-06 Thread Kevin Wolf
Am 06.04.2017 um 16:25 hat Fam Zheng geschrieben: > It should be moved to the same context as source, before inserting to the > graph. > > Signed-off-by: Fam Zheng Reviewed-by: Kevin Wolf

Re: [Qemu-devel] [PATCH for-2.9 1/5] block: Fix unpaired aio_disable_external in external snapshot

2017-04-06 Thread Kevin Wolf
Am 06.04.2017 um 16:25 hat Fam Zheng geschrieben: > bdrv_replace_child_noperm tries to hand over the quiesce_counter state > from old bs to the new one, but if they are not on the same aio context > this causes unbalance. > > Fix this by forcing callers to move the aio context first, and assert >

Re: [Qemu-devel] [PATCH for-2.9 1/5] block: Fix unpaired aio_disable_external in external snapshot

2017-04-06 Thread Eric Blake
On 04/06/2017 09:25 AM, Fam Zheng wrote: > bdrv_replace_child_noperm tries to hand over the quiesce_counter state > from old bs to the new one, but if they are not on the same aio context > this causes unbalance. > > Fix this by forcing callers to move the aio context first, and assert > it. > >

  1   2   3   4   >