Re: [Qemu-devel] [RFC for-2.7 10/11] pseries: Consolidate construction of /rtas device tree node

2016-04-20 Thread Alexey Kardashevskiy
On 04/20/2016 12:33 PM, David Gibson wrote: For historical reasons construction of the /rtas node in the device tree (amongst others) is split into several places. In particular it's split between spapr_build_fdt() and spapr_rtas_device_tree_setup(). In fact, as well as adding the actual RTAS

Re: [Qemu-devel] [RFC for-2.7 06/11] pseries: Consolidate RTAS loading

2016-04-20 Thread Alexey Kardashevskiy
On 04/20/2016 12:33 PM, David Gibson wrote: At each system reset, the pseries machine needs to load RTAS, the run time portion of the guest firmware, into the VM. This means copying the actual RTAS code into guest memory, and also updating the device tree so that the guest OS and boot firmware

Re: [Qemu-devel] [RFC for-2.7 05/11] pseries: Build device tree only at reset time

2016-04-20 Thread Alexey Kardashevskiy
On 04/20/2016 12:33 PM, David Gibson wrote: Currently the pseries code builds a "skeleton" device tree at machine init time, then adds a bunch of stuff to it at reset. Over time, more and more logic has had to be moved from init to reset time, and there's really no advantage to doing any of it

Re: [Qemu-devel] [RFC for-2.7 09/11] pseries: Consolidate construction of /chosen device tree node

2016-04-20 Thread Alexey Kardashevskiy
On 04/20/2016 12:33 PM, David Gibson wrote: For historical reasons construction of the /chosen node in the device tree (amongst others) is split into several places. This patch brings these pieces back together to make things clearer. Signed-off-by: David Gibson

Re: [Qemu-devel] [RFC for-2.7 04/11] pseries: Make spapr_create_fdt_skel() get information from machine state

2016-04-20 Thread Alexey Kardashevskiy
On 04/20/2016 12:33 PM, David Gibson wrote: Currently spapr_create_fdt_skel() takes a bunch of individual parameters for various things it will put in the device tree. Some of these can already be taken directly from sPAPRMachineState. This patch alters it so that all of them can be taken from

Re: [Qemu-devel] [RFC for-2.7 03/11] pseries: Remove rtas_addr and fdt_addr fields from machinestate

2016-04-20 Thread Alexey Kardashevskiy
On 04/20/2016 12:33 PM, David Gibson wrote: These values are used only within ppc_spapr_reset(), so just change them to local variables. Signed-off-by: David Gibson Reviewed-by: Alexey Kardashevskiy --- hw/ppc/spapr.c | 14

Re: [Qemu-devel] [RFC for-2.7 02/11] pseries: Split device tree construction from device tree load

2016-04-20 Thread Alexey Kardashevskiy
On 04/20/2016 12:33 PM, David Gibson wrote: spapr_finalize_fdt() both finishes building the device tree for the guest and loads it into guest memory. For future cleanups, it's going to be more convenient to do these two things separately, so split them apart. The loading portion is pretty

Re: [Qemu-devel] [RFC for-2.7 11/11] pseries: Remove unused callbacks from sPAPR VIO bus state

2016-04-20 Thread Alexey Kardashevskiy
On 04/20/2016 12:33 PM, David Gibson wrote: The VIOsPAPRBus structure has some callback pointers in it which aren't used anywhere in the code. It's not clear exactly why they were there in the first place, but they certainly have no function now. It is clear - incorrect QOM'fication in

Re: [Qemu-devel] [PATCH v3] qemu-img: check block status of backing file when converting.

2016-04-20 Thread Ren Kimura
ping

Re: [Qemu-devel] [RFC for-2.7 07/11] pseries: Move adding of fdt reserve map entries

2016-04-20 Thread Alexey Kardashevskiy
On 04/20/2016 12:33 PM, David Gibson wrote: The flattened device tree passed to pseries guests contains a list of reserved memory areas. Currently we construct this list early in spapr_build_fdt() as we sequentially write out the fdt. This will be inconvenient for upcoming cleanups, so this

Re: [Qemu-devel] [PATCH for-2.6] virtio: Register host notifier handler as external

2016-04-20 Thread Fam Zheng
On Thu, 04/21 10:04, Fam Zheng wrote: > This ensures the bdrv_drained_begin() in block layer is effective and > fixes launchpad bug #1570134. Forgot to add to the subject, but this patch is for 2.6. Fam > > Signed-off-by: Fam Zheng > --- > hw/virtio/virtio.c | 7 --- > 1

Re: [Qemu-devel] [PATCH] Allow users to specify the vmdk virtual hardware version.

2016-04-20 Thread Fam Zheng
On Wed, 04/20 20:22, Janne Karhunen wrote: > On Wed, Apr 20, 2016 at 7:22 PM, Fam Zheng wrote: > > > For backward compatibility reason, we shouldn't remove a pre-existing option > > without solid justification and probably a grace period. I suggest adding > > the > > hwversion

Re: [Qemu-devel] [PATCH qemu v15 14/17] spapr_iommu, vfio, memory: Notify IOMMU about starting/stopping being used by VFIO

2016-04-20 Thread Alexey Kardashevskiy
On 04/21/2016 01:59 PM, David Gibson wrote: On Wed, Apr 20, 2016 at 07:15:15PM +1000, Alexey Kardashevskiy wrote: On 04/07/2016 10:40 AM, David Gibson wrote: On Mon, Apr 04, 2016 at 07:33:43PM +1000, Alexey Kardashevskiy wrote: The sPAPR TCE tables manage 2 copies when VFIO is using an IOMMU

Re: [Qemu-devel] [PATCH qemu v15 16/17] vfio/spapr: Use VFIO_SPAPR_TCE_v2_IOMMU

2016-04-20 Thread David Gibson
On Wed, Apr 20, 2016 at 07:43:41PM +1000, Alexey Kardashevskiy wrote: > On 04/07/2016 11:10 AM, David Gibson wrote: > >Subject doesn't seem quite right, since you added at least minimal > >support for the SPAPRv2 IOMMU in the prereg patch. > > > >On Mon, Apr 04, 2016 at 07:33:45PM +1000, Alexey

Re: [Qemu-devel] [PATCH qemu v15 14/17] spapr_iommu, vfio, memory: Notify IOMMU about starting/stopping being used by VFIO

2016-04-20 Thread David Gibson
On Wed, Apr 20, 2016 at 07:15:15PM +1000, Alexey Kardashevskiy wrote: > On 04/07/2016 10:40 AM, David Gibson wrote: > >On Mon, Apr 04, 2016 at 07:33:43PM +1000, Alexey Kardashevskiy wrote: > >>The sPAPR TCE tables manage 2 copies when VFIO is using an IOMMU - > >>a guest view of the table and a

Re: [Qemu-devel] [RFC for-2.7 08/11] pseries: Start using qdt library for building device tree

2016-04-20 Thread Alexey Kardashevskiy
On 04/20/2016 12:33 PM, David Gibson wrote: This starts the process of converting the pseries machine type to use the qdt library code to build the guest's device tree instead of working directly and awkwardly with the flattened device tree format. For now we just convert the first section of

Re: [Qemu-devel] [PATCH] Allow users to specify the vmdk virtual hardware version.

2016-04-20 Thread Janne Karhunen
On Wed, Apr 20, 2016 at 8:26 PM, Fam Zheng wrote: >> In other words, without the patch not a single qemu-img generated vmdk >> is 'good' for the system I'm using. > > Thanks for the explanation, please add this information into the commit > message > in next submission and also

Re: [Qemu-devel] [PATCH] Allow users to specify the vmdk virtual hardware version.

2016-04-20 Thread Fam Zheng
On Wed, 04/20 20:02, Janne Karhunen wrote: > On Wed, Apr 20, 2016 at 7:22 PM, Fam Zheng wrote: > > >> Replace hardcoded vmdk description file hardware version flag with > >> a user definable version. > > > > Hi Janne, > > > > Since this is a new feature, please explain why this

Re: [Qemu-devel] [PATCH] Allow users to specify the vmdk virtual hardware version.

2016-04-20 Thread Janne Karhunen
On Wed, Apr 20, 2016 at 7:22 PM, Fam Zheng wrote: > For backward compatibility reason, we shouldn't remove a pre-existing option > without solid justification and probably a grace period. I suggest adding the > hwversion option in addition, and document and check it as exclusive

Re: [Qemu-devel] [PATCH] Allow users to specify the vmdk virtual hardware version.

2016-04-20 Thread Janne Karhunen
On Wed, Apr 20, 2016 at 7:22 PM, Fam Zheng wrote: >> Replace hardcoded vmdk description file hardware version flag with >> a user definable version. > > Hi Janne, > > Since this is a new feature, please explain why this change is desired (i.e. > the necessity.) See here what it

Re: [Qemu-devel] [PATCH] Allow users to specify the vmdk virtual hardware version.

2016-04-20 Thread Fam Zheng
On Wed, 04/20 15:27, Janne Karhunen wrote: > From: Janne Karhunen > > Replace hardcoded vmdk description file hardware version flag with > a user definable version. Hi Janne, Since this is a new feature, please explain why this change is desired (i.e. the necessity.)

Re: [Qemu-devel] [PATCH for-2.6 v3 0/3] block: Fix drive-mirror with image size unaligned with granularity

2016-04-20 Thread Fam Zheng
On Wed, 04/20 16:32, Kevin Wolf wrote: > Taking over Fam's series as we're late for -rc3. Much appriciated! Thanks, Kevin. Fam

Re: [Qemu-devel] [Bug 1570134] Re: While committing snapshot qemu crashes with SIGABRT

2016-04-20 Thread Fam Zheng
On Thu, 04/21 08:34, Fam Zheng wrote: > On Wed, 04/20 22:03, Max Reitz wrote: > > On 20.04.2016 20:09, Max Reitz wrote: > > > On 20.04.2016 02:03, Matthew Schumacher wrote: > > >> Max, > > >> > > >> Qemu still crashes for me, but the debug is again very different. When > > >> I attach to the qemu

[Qemu-devel] [PATCH] virtio: Register host notifier handler as external

2016-04-20 Thread Fam Zheng
This ensures the bdrv_drained_begin() in block layer is effective and fixes launchpad bug #1570134. Signed-off-by: Fam Zheng --- hw/virtio/virtio.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index

Re: [Qemu-devel] Persistent Main Memory in QEmu

2016-04-20 Thread Li, Tianyou
Hi Dave, Thanks for your response. Below are my explanations: > Can you explain what you mean by 'persistent' - where do you intend to store > the guests memory? There could be a file or memory region that can survive across guest shutdown/reboot. Seems Artyom has pointed out the right

Re: [Qemu-devel] [Bug 1570134] Re: While committing snapshot qemu crashes with SIGABRT

2016-04-20 Thread Fam Zheng
On Wed, 04/20 22:03, Max Reitz wrote: > On 20.04.2016 20:09, Max Reitz wrote: > > On 20.04.2016 02:03, Matthew Schumacher wrote: > >> Max, > >> > >> Qemu still crashes for me, but the debug is again very different. When > >> I attach to the qemu process from gdb, it is unable to provide a > >>

Re: [Qemu-devel] [PATCH COLO-Frame v16 32/35] net: Add notifier/callback for netdev init

2016-04-20 Thread Hailiang Zhang
ping ... ? Hi Jason, Any comments on the net parts ? Thanks, Hailiang On 2016/4/8 14:26, zhanghailiang wrote: We can register some callback for this notifier, this will be used by COLO to register a callback which will add each netdev a buffer filter. Signed-off-by: zhanghailiang

[Qemu-devel] [PATCH] Allow users to specify the vmdk virtual hardware version.

2016-04-20 Thread Janne Karhunen
From: Janne Karhunen Replace hardcoded vmdk description file hardware version flag with a user definable version. Signed-off-by: Janne Karhunen --- block/vmdk.c | 20 ++-- include/block/block_int.h | 3 +--

[Qemu-devel] Bug (Regression?) in hw/usb/hcd-uhci.c causes failure of ICH9 host controller and attached Xbox 360 Wireless Receiver

2016-04-20 Thread Joe Clifford
Hi folks, I'm not a coder by any stretch of the imagination so I don't have a patch unfortunately however, this commit: https://github.com/qemu/qemu/commit/5f77e06baa84323e5bbc96c2c7f4fe627078b210 causes the failure of the ICH9 Universal Host Controller - 2934 and the attached "Microsoft

Re: [Qemu-devel] RFC: virtio-rng and /dev/urandom

2016-04-20 Thread Steve Grubb
On Friday, April 15, 2016 12:46:46 PM Richard W.M. Jones wrote: > On Fri, Apr 15, 2016 at 06:41:34AM -0400, Cole Robinson wrote: > > Libvirt currently rejects using host /dev/urandom as an input source for a > > virtio-rng device. The only accepted sources are /dev/random and > > /dev/hwrng. This

Re: [Qemu-devel] RFC: virtio-rng and /dev/urandom

2016-04-20 Thread Cole Robinson
On 04/15/2016 06:41 AM, Cole Robinson wrote: > Libvirt currently rejects using host /dev/urandom as an input source for a > virtio-rng device. The only accepted sources are /dev/random and /dev/hwrng. > This is the result of discussions on qemu-devel around when the feature was > first added

[Qemu-devel] [PATCH v4 09/10] tcg: Clean up direct block chaining safety checks

2016-04-20 Thread Sergey Fedorov
From: Sergey Fedorov We don't take care of direct jumps when address mapping changes. Thus we must be sure to generate direct jumps so that they always keep valid even if address mapping changes. Luckily, we can only allow to execute a TB if it was generated from the pages

[Qemu-devel] [PATCH v4 10/10] tcg: Allow goto_tb to any target PC in user mode

2016-04-20 Thread Sergey Fedorov
From: Sergey Fedorov In user mode, there's only a static address translation, TBs are always invalidated properly and direct jumps are reset when mapping change. Thus the destination address is always valid for direct jumps and there's no need to restrict it to the pages

[Qemu-devel] [PATCH v4 06/10] tcg: Rename tb_jmp_remove() to tb_remove_from_jmp_list()

2016-04-20 Thread Sergey Fedorov
From: Sergey Fedorov tb_jmp_remove() was only used to remove the TB from a list of all TBs jumping to the same TB which is n-th jump destination of the given TB. Put a comment briefly describing the function behavior and rename it to better reflect its purpose.

[Qemu-devel] [PATCH v4 07/10] tcg: Extract removing of jumps to TB from tb_phys_invalidate()

2016-04-20 Thread Sergey Fedorov
From: Sergey Fedorov Move the code for removing jumps to a TB out of tb_phys_invalidate() to a separate static inline function tb_jmp_unlink(). This simplifies tb_phys_invalidate() and improves code structure. Signed-off-by: Sergey Fedorov

[Qemu-devel] [PATCH v4 04/10] tcg: Init TB's direct jumps before making it visible

2016-04-20 Thread Sergey Fedorov
From: Sergey Fedorov Initialize TB's direct jump list data fields and reset the jumps before tb_link_page() puts it into the physical hash table and the physical page list. So TB is completely initialized before it becomes visible. This is pure rearrangement of code to a

[Qemu-devel] [PATCH v4 05/10] tcg: Clarify thread safety check in tb_add_jump()

2016-04-20 Thread Sergey Fedorov
From: Sergey Fedorov The check is to make sure that another thread hasn't already done the same while we were outside of tb_lock. Mention this in a comment. Signed-off-by: Sergey Fedorov Signed-off-by: Sergey Fedorov

[Qemu-devel] [PATCH v4 00/10] tcg: Direct block chaining clean-up

2016-04-20 Thread Sergey Fedorov
From: Sergey Fedorov This series combines a set of patches which is meant to improve overall code structure and readability of the direct block chaining mechanism. The other point is to make a step towards thread safety of TB chainig. The series' tree can be found in a

[Qemu-devel] [PATCH v4 01/10] tcg: Clean up direct block chaining data fields

2016-04-20 Thread Sergey Fedorov
From: Sergey Fedorov Briefly describe in a comment how direct block chaining is done. It should help in understanding of the following data fields. Rename some fields in TranslationBlock and TCGContext structures to better reflect their purpose (dropping excessive 'tb_'

[Qemu-devel] [PATCH v4 03/10] tcg: Rearrange tb_link_page() to avoid forward declaration

2016-04-20 Thread Sergey Fedorov
From: Sergey Fedorov Signed-off-by: Sergey Fedorov Signed-off-by: Sergey Fedorov Reviewed-by: Alex Bennée --- translate-all.c | 204 1 file

[Qemu-devel] [PATCH v4 08/10] tcg: Clean up tb_jmp_unlink()

2016-04-20 Thread Sergey Fedorov
From: Sergey Fedorov Unify the code of this function with tb_jmp_remove_from_list(). Making these functions similar improves their readability. Also this could be a step towards making this function thread-safe. Signed-off-by: Sergey Fedorov

[Qemu-devel] [PATCH v4 02/10] tcg: Use uintptr_t type for jmp_list_{next|first} fields of TB

2016-04-20 Thread Sergey Fedorov
From: Sergey Fedorov These fields do not contain pure pointers to a TranslationBlock structure. So uintptr_t is the most appropriate type for them. Also put some asserts to assure that the two least significant bits of the pointer are always zero before assigning it to

Re: [Qemu-devel] [Bug 1570134] Re: While committing snapshot qemu crashes with SIGABRT

2016-04-20 Thread Max Reitz
On 20.04.2016 20:09, Max Reitz wrote: > On 20.04.2016 02:03, Matthew Schumacher wrote: >> Max, >> >> Qemu still crashes for me, but the debug is again very different. When >> I attach to the qemu process from gdb, it is unable to provide a >> backtrace when it crashes. The log file is different

Re: [Qemu-devel] [PATCH 08/11] tcg/aarch64: Make direct jump patching thread-safe

2016-04-20 Thread Alex Bennée
Richard Henderson writes: > On 04/20/2016 11:22 AM, Alex Bennée wrote: >> >> Richard Henderson writes: >> >>> On 04/20/2016 07:01 AM, Alex Bennée wrote: Sergey Fedorov writes: > From: Sergey Fedorov

Re: [Qemu-devel] [RFC v1 06/12] cpus: pass CPUState to run_on_cpu helpers

2016-04-20 Thread Alex Bennée
Eduardo Habkost writes: > On Fri, Apr 15, 2016 at 03:23:45PM +0100, Alex Bennée wrote: >> CPUState is a fairly common pointer to pass to these helpers. This means >> if you need other arguments for the async_run_on_cpu case you end up >> having to do a g_malloc to stuff

Re: [Qemu-devel] [PATCH 01/50] scripts: add script to build QEMU and analyze inclusions

2016-04-20 Thread Alex Bennée
Paolo Bonzini writes: > Signed-off-by: Paolo Bonzini > --- > scripts/analyze-inclusions | 89 > ++ > 1 file changed, 89 insertions(+) > create mode 100644 scripts/analyze-inclusions > > diff --git

Re: [Qemu-devel] [PATCH v3 05/11] qemu-thread: add simple test-and-set spinlock

2016-04-20 Thread Richard Henderson
On 04/20/2016 11:11 AM, Emilio G. Cota wrote: On Wed, Apr 20, 2016 at 10:55:45 -0700, Richard Henderson wrote: On 04/20/2016 10:17 AM, Emilio G. Cota wrote: I've tried to find a GCC intrinsic for test-and-set, and I've only found lock_test_and_set, which is what we use for atomic_xchg (except

Re: [Qemu-devel] [RFC v1 06/12] cpus: pass CPUState to run_on_cpu helpers

2016-04-20 Thread Eduardo Habkost
On Fri, Apr 15, 2016 at 03:23:45PM +0100, Alex Bennée wrote: > CPUState is a fairly common pointer to pass to these helpers. This means > if you need other arguments for the async_run_on_cpu case you end up > having to do a g_malloc to stuff additional data into the routine. For > the current

Re: [Qemu-devel] [PATCH 08/11] tcg/aarch64: Make direct jump patching thread-safe

2016-04-20 Thread Richard Henderson
On 04/20/2016 11:22 AM, Alex Bennée wrote: Richard Henderson writes: On 04/20/2016 07:01 AM, Alex Bennée wrote: Sergey Fedorov writes: From: Sergey Fedorov Ensure direct jump patching in AArch64 is atomic by using

Re: [Qemu-devel] [PATCH 08/11] tcg/aarch64: Make direct jump patching thread-safe

2016-04-20 Thread Sergey Fedorov
On 20/04/16 18:08, Richard Henderson wrote: > On 04/20/2016 07:01 AM, Alex Bennée wrote: >> >> Sergey Fedorov writes: >> >>> From: Sergey Fedorov >>> >>> Ensure direct jump patching in AArch64 is atomic by using >>> atomic_read()/atomic_set() for

Re: [Qemu-devel] [PATCH for-2.6 v2 0/3] Bug fixes for gluster

2016-04-20 Thread Rik van Riel
On Wed, 2016-04-20 at 13:46 +0200, Kevin Wolf wrote: > Am 20.04.2016 um 12:40 hat Ric Wheeler geschrieben: > > > > On 04/20/2016 05:24 AM, Kevin Wolf wrote: > > > > > > Am 20.04.2016 um 03:56 hat Ric Wheeler geschrieben: > > > > > > > > On 04/19/2016 10:09 AM, Jeff Cody wrote: > > > > > > > >

Re: [Qemu-devel] [PATCH for-2.6 v2 0/3] Bug fixes for gluster

2016-04-20 Thread Rik van Riel
On Wed, 2016-04-20 at 06:40 -0400, Ric Wheeler wrote: > On 04/20/2016 05:24 AM, Kevin Wolf wrote: > > > > Am 20.04.2016 um 03:56 hat Ric Wheeler geschrieben: > > > > > > On 04/19/2016 10:09 AM, Jeff Cody wrote: > > > > > > > > On Tue, Apr 19, 2016 at 08:18:39AM -0400, Ric Wheeler wrote: > > > >

Re: [Qemu-devel] [PATCH 46/50] hw: explicitly include qemu/log.h

2016-04-20 Thread Alex Bennée
Paolo Bonzini writes: > Move the inclusion out of hw/hw.h, most files do not need it. This failed when I applied the series to 4113b05 > > Signed-off-by: Paolo Bonzini > --- > hw/arm/ast2400.c | 1 + > hw/arm/nseries.c |

Re: [Qemu-devel] [PATCH 08/11] tcg/aarch64: Make direct jump patching thread-safe

2016-04-20 Thread Alex Bennée
Richard Henderson writes: > On 04/20/2016 07:01 AM, Alex Bennée wrote: >> >> Sergey Fedorov writes: >> >>> From: Sergey Fedorov >>> >>> Ensure direct jump patching in AArch64 is atomic by using >>> atomic_read()/atomic_set()

Re: [Qemu-devel] [RFC for-2.7 03/11] pseries: Remove rtas_addr and fdt_addr fields from machinestate

2016-04-20 Thread Thomas Huth
On 20.04.2016 04:33, David Gibson wrote: > These values are used only within ppc_spapr_reset(), so just change them > to local variables. > > Signed-off-by: David Gibson > --- > hw/ppc/spapr.c | 14 +++--- > include/hw/ppc/spapr.h | 1 - > 2 files

Re: [Qemu-devel] [RFC for-2.7 02/11] pseries: Split device tree construction from device tree load

2016-04-20 Thread Thomas Huth
On 20.04.2016 04:33, David Gibson wrote: > spapr_finalize_fdt() both finishes building the device tree for the guest > and loads it into guest memory. For future cleanups, it's going to be > more convenient to do these two things separately, so split them apart. > The loading portion is pretty

Re: [Qemu-devel] [PATCH v3 05/11] qemu-thread: add simple test-and-set spinlock

2016-04-20 Thread Emilio G. Cota
On Wed, Apr 20, 2016 at 10:55:45 -0700, Richard Henderson wrote: > On 04/20/2016 10:17 AM, Emilio G. Cota wrote: > >I've tried to find a GCC intrinsic for test-and-set, and I've only found > >lock_test_and_set, which is what we use for atomic_xchg (except on ppc) > >because it really is an atomic

Re: [Qemu-devel] [Bug 1570134] Re: While committing snapshot qemu crashes with SIGABRT

2016-04-20 Thread Max Reitz
On 20.04.2016 02:03, Matthew Schumacher wrote: > Max, > > Qemu still crashes for me, but the debug is again very different. When > I attach to the qemu process from gdb, it is unable to provide a > backtrace when it crashes. The log file is different too. Any ideas? > > qemu-system-x86_64:

Re: [Qemu-devel] [PATCH v3 05/11] qemu-thread: add simple test-and-set spinlock

2016-04-20 Thread Richard Henderson
On 04/20/2016 10:17 AM, Emilio G. Cota wrote: I've tried to find a GCC intrinsic for test-and-set, and I've only found lock_test_and_set, which is what we use for atomic_xchg (except on ppc) because it really is an atomic exchange: "This builtin, as described by Intel, is not a traditional

[Qemu-devel] [UPDATED v3 05/11] qemu-thread: add simple test-and-set spinlock

2016-04-20 Thread Emilio G. Cota
From: Guillaume Delbergue Signed-off-by: Guillaume Delbergue [Rewritten. - Paolo] Signed-off-by: Paolo Bonzini [Emilio's additions: call cpu_relax() while spinning; optimize for uncontended locks by

[Qemu-devel] [UPDATED v3 04/11] include/processor.h: define cpu_relax()

2016-04-20 Thread Emilio G. Cota
Taken from the linux kernel. Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- include/qemu/processor.h | 34 ++ 1 file changed, 34 insertions(+) create mode 100644 include/qemu/processor.h diff --git

Re: [Qemu-devel] post-copy is broken?

2016-04-20 Thread Dr. David Alan Gilbert
Hi, Just a follow up with a little more debug; I modified the test so it doesn't quit after the first miscomparison (see diff below), and looking on the failures on real hardware I've seen: /x86_64/postcopy: Memory content inconsistency at 380 first_byte = 30 last_byte = 30 current = 10

Re: [Qemu-devel] [PATCH v3 04/11] include/processor.h: define cpu_relax()

2016-04-20 Thread Peter Maydell
On 20 April 2016 at 18:16, Emilio G. Cota wrote: > On Wed, Apr 20, 2016 at 14:15:41 +0200, KONRAD Frederic wrote: >> Le 20/04/2016 01:07, Emilio G. Cota a écrit : >> >Taken from the linux kernel. >> > >> >Reviewed-by: Richard Henderson >> >Signed-off-by: Emilio

Re: [Qemu-devel] [PATCH v3 05/11] qemu-thread: add simple test-and-set spinlock

2016-04-20 Thread Emilio G. Cota
On Wed, Apr 20, 2016 at 08:18:56 -0700, Richard Henderson wrote: > On 04/19/2016 04:07 PM, Emilio G. Cota wrote: > >From: Guillaume Delbergue > > > >Signed-off-by: Guillaume Delbergue > >[Rewritten. - Paolo] > >Signed-off-by:

Re: [Qemu-devel] [PATCH v3 04/11] include/processor.h: define cpu_relax()

2016-04-20 Thread Emilio G. Cota
On Wed, Apr 20, 2016 at 14:15:41 +0200, KONRAD Frederic wrote: > Le 20/04/2016 01:07, Emilio G. Cota a écrit : > >Taken from the linux kernel. > > > >Reviewed-by: Richard Henderson > >Signed-off-by: Emilio G. Cota > >--- > > include/qemu/processor.h | 28

[Qemu-devel] [Bug 1525676] Re: qemu runas and sandbox option incompatible, process will hang in futex after setgid

2016-04-20 Thread Serge Hallyn
** Also affects: qemu Importance: Undecided Status: New ** Changed in: qemu (Ubuntu) Status: New => Triaged ** Changed in: qemu (Ubuntu) Importance: Undecided => Wishlist -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed

Re: [Qemu-devel] [Nbd] question on ioctl NBD_SET_FLAGS

2016-04-20 Thread Wouter Verhelst
Hi Eric, On Wed, Apr 20, 2016 at 09:42:02AM -0600, Eric Blake wrote: [...] > But in 3.9, the overlap bug was still present, and the set of global > flags had grown to include NBD_FLAG_NO_ZEROS (commit 038e066), which > overlaps with NBD_FLAG_READ_ONLY. Ouch. This means that a client > talking

Re: [Qemu-devel] [PATCH 05/11] tcg/i386: Make direct jump patching thread-safe

2016-04-20 Thread Sergey Fedorov
On 20/04/16 18:04, Richard Henderson wrote: > On 04/20/2016 02:55 AM, Alex Bennée wrote: >>> +static void tcg_out_nopn(TCGContext *s, int n) >>> +{ >>> +static const uint8_t nop1[] = { 0x90 }; >>> +static const uint8_t nop2[] = { 0x66, 0x90 }; >>> +static const uint8_t nop3[] = { 0x8d,

Re: [Qemu-devel] [PULL 0/5] Mirror block job fixes for 2.6.0-rc3

2016-04-20 Thread Peter Maydell
On 20 April 2016 at 16:03, Kevin Wolf wrote: > The following changes since commit 4113b0532da6c448f8e458b413ebde035234d0ea: > > Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2016-04-19-tag' > into staging (2016-04-20 15:05:19 +0100) > > are available in the git

Re: [Qemu-devel] [PATCH 07/11] tcg/arm: Make direct jump patching thread-safe

2016-04-20 Thread Sergey Fedorov
On 20/04/16 17:40, Alex Bennée wrote: > Sergey Fedorov writes: >> On 20/04/16 16:33, Alex Bennée wrote: >>> Sergey Fedorov writes: diff --git a/tcg/arm/tcg-target.inc.c b/tcg/arm/tcg-target.inc.c index 3edf6a6f971c..5c69de20bc69 100644

Re: [Qemu-devel] [PATCH RFC] fixup! virtio: convert to use DMA api

2016-04-20 Thread Andy Lutomirski
On Apr 20, 2016 6:14 AM, "Michael S. Tsirkin" wrote: > > On Tue, Apr 19, 2016 at 02:07:01PM -0700, Andy Lutomirski wrote: > > On Tue, Apr 19, 2016 at 1:54 PM, Michael S. Tsirkin wrote: > > > On Tue, Apr 19, 2016 at 01:27:29PM -0700, Andy Lutomirski wrote: > > >>

[Qemu-devel] question on ioctl NBD_SET_FLAGS

2016-04-20 Thread Eric Blake
NBD commit 39e20207 (2.9.22) introduced the use of the ioctl NBD_SET_FLAGS, and tries to pass the concatenation of the 16-bit global flags in the most significant half + the 16-bit transmission flags in the lower half (during newstyle negotiation). Of course, at that point in time, the global

Re: [Qemu-devel] [RFC 00/13] Multiple fd migration support

2016-04-20 Thread Michael S. Tsirkin
On Wed, Apr 20, 2016 at 04:44:28PM +0200, Juan Quintela wrote: > Hi > > This patch series is "an" initial implementation of multiple fd migration. > This is to get something out for others to comment, it is not finished at all. > > So far: > > - we create threads for each new fd > > - only for

Re: [Qemu-devel] [PULL for-2.6 0/1] tags/xen-2016-04-20

2016-04-20 Thread Peter Maydell
On 20 April 2016 at 12:14, Stefano Stabellini wrote: > The following changes since commit 42bb626f7ebc9197d2943b897a99e127315275ab: > > Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' > into staging (2016-04-12 09:34:52 +0100) > > are available

Re: [Qemu-devel] [PATCH] MAINTAINERS: Avoid using K: for NUMA section

2016-04-20 Thread Peter Maydell
On 20 April 2016 at 15:57, Eduardo Habkost wrote: > On Wed, Apr 20, 2016 at 11:55:30AM -0300, Eduardo Habkost wrote: >> When using K: in MAINTAINERS, false positives makes >> get_maintainer.pl not use git history to find contributors. As >> those patterns cause lots of false

Re: [Qemu-devel] [PATCH v3 11/11] translate-all: add tb hash bucket info to 'info jit' dump

2016-04-20 Thread Richard Henderson
On 04/19/2016 04:07 PM, Emilio G. Cota wrote: Suggested-by: Richard Henderson Signed-off-by: Emilio G. Cota --- translate-all.c | 5 + 1 file changed, 5 insertions(+) Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH v3 06/11] exec: add tb_hash_func5, derived from xxhash

2016-04-20 Thread Richard Henderson
On 04/19/2016 04:07 PM, Emilio G. Cota wrote: This will be used by upcoming changes for hashing the tb hash. Add this into a separate file to include the copyright notice from xxhash. Signed-off-by: Emilio G. Cota --- include/exec/tb-hash-xx.h | 94

Re: [Qemu-devel] [PATCH v3 05/11] qemu-thread: add simple test-and-set spinlock

2016-04-20 Thread Richard Henderson
On 04/19/2016 04:07 PM, Emilio G. Cota wrote: From: Guillaume Delbergue Signed-off-by: Guillaume Delbergue [Rewritten. - Paolo] Signed-off-by: Paolo Bonzini [Emilio's additions: call cpu_relax() while

Re: [Qemu-devel] [PULL for-2.6 0/1] qemu-ga patch queue for 2.6

2016-04-20 Thread Peter Maydell
On 19 April 2016 at 23:34, Michael Roth wrote: > The following changes since commit 1f7685fafa6ba1354731a59822e5cc43323d6989: > > Update language files for QEMU 2.6.0 (2016-04-19 18:41:25 +0100) > > are available in the git repository at: > >

Re: [Qemu-devel] [PATCH 08/11] tcg/aarch64: Make direct jump patching thread-safe

2016-04-20 Thread Richard Henderson
On 04/20/2016 07:01 AM, Alex Bennée wrote: Sergey Fedorov writes: From: Sergey Fedorov Ensure direct jump patching in AArch64 is atomic by using atomic_read()/atomic_set() for code patching. Signed-off-by: Sergey Fedorov

[Qemu-devel] [PULL 3/5] mirror: Don't extend the last sub-chunk

2016-04-20 Thread Kevin Wolf
From: Fam Zheng The last sub-chunk is rounded up to the copy granularity in the target image, resulting in a larger size than the source. Add a function to clip the copied sectors to the end. This undoes the "wrong" changes to tests/qemu-iotests/109.out in e5b43573e28. The

Re: [Qemu-devel] [PATCH 05/11] tcg/i386: Make direct jump patching thread-safe

2016-04-20 Thread Richard Henderson
On 04/20/2016 02:55 AM, Alex Bennée wrote: +static void tcg_out_nopn(TCGContext *s, int n) +{ +static const uint8_t nop1[] = { 0x90 }; +static const uint8_t nop2[] = { 0x66, 0x90 }; +static const uint8_t nop3[] = { 0x8d, 0x76, 0x00 }; +static const uint8_t *const nopn[] = { nop1,

[Qemu-devel] [PULL 1/5] block/mirror: Revive dead yielding code

2016-04-20 Thread Kevin Wolf
From: Max Reitz mirror_iteration() is supposed to wait if the current chunk is subject to a still in-flight mirroring operation. However, it mixed checking this conflict situation with checking the dirty status of a chunk. A simplification for the latter condition (the first

[Qemu-devel] [PULL 2/5] block/mirror: Refresh stale bitmap iterator cache

2016-04-20 Thread Kevin Wolf
From: Max Reitz If the drive's dirty bitmap is dirtied while the mirror operation is running, the cache of the iterator used by the mirror code may become stale and not contain all dirty bits. This only becomes an issue if we are looking for contiguously dirty chunks on the

[Qemu-devel] [PULL 0/5] Mirror block job fixes for 2.6.0-rc3

2016-04-20 Thread Kevin Wolf
The following changes since commit 4113b0532da6c448f8e458b413ebde035234d0ea: Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2016-04-19-tag' into staging (2016-04-20 15:05:19 +0100) are available in the git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for

[Qemu-devel] [PULL 4/5] iotests: Add iotests.image_size

2016-04-20 Thread Kevin Wolf
From: Fam Zheng This retrieves the virtual size of the image out of qemu-img info. Signed-off-by: Fam Zheng Reviewed-by: Max Reitz Reviewed-by: Jeff Cody Signed-off-by: Kevin Wolf ---

[Qemu-devel] [PULL 5/5] iotests: Test case for drive-mirror with unaligned image size

2016-04-20 Thread Kevin Wolf
From: Fam Zheng This is the regression test for the virtual size mismatch issue between target and source images. [ kwolf: Added test_unaligned_with_update ] Signed-off-by: Fam Zheng Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz

[Qemu-devel] [PATCH 13/13] migration: [HACK]Transfer pages over new channels

2016-04-20 Thread Juan Quintela
We switch for sending the page number to send real pages. [HACK] How we calculate the bandwidth is beyond repair, there is a hack there that would work for x86 and archs thta have 4kb pages. If you are having a nice day just go to migration/ram.c and look at acct_update_position(). Now you are

Re: [Qemu-devel] [PATCH for-2.6 v3 3/3] iotests: Test case for drive-mirror with unaligned image size

2016-04-20 Thread Max Reitz
On 20.04.2016 16:32, Kevin Wolf wrote: > From: Fam Zheng > > This is the regression test for the virtual size mismatch issue between > target and source images. > > [ kwolf: Added test_unaligned_with_update ] > > Signed-off-by: Fam Zheng > Signed-off-by:

Re: [Qemu-devel] [PATCH for-2.6 v3 3/3] iotests: Test case for drive-mirror with unaligned image size

2016-04-20 Thread Jeff Cody
On Wed, Apr 20, 2016 at 04:32:46PM +0200, Kevin Wolf wrote: > From: Fam Zheng > > This is the regression test for the virtual size mismatch issue between > target and source images. > > [ kwolf: Added test_unaligned_with_update ] > > Signed-off-by: Fam Zheng

Re: [Qemu-devel] [PATCH for-2.6 v3 0/3] block: Fix drive-mirror with image size unaligned with granularity

2016-04-20 Thread Jeff Cody
On Wed, Apr 20, 2016 at 10:51:04AM -0400, Jeff Cody wrote: > On Wed, Apr 20, 2016 at 04:32:43PM +0200, Kevin Wolf wrote: > > Taking over Fam's series as we're late for -rc3. Original cover letter: > > > > This fixes the bug introduced in e5b43573e28 and lately noticed by > > Kevin. > > > >

Re: [Qemu-devel] [PATCH for-2.6 v3 2/3] iotests: Add iotests.image_size

2016-04-20 Thread Jeff Cody
On Wed, Apr 20, 2016 at 04:32:45PM +0200, Kevin Wolf wrote: > From: Fam Zheng > > This retrieves the virtual size of the image out of qemu-img info. > > Reviewed-by: Max Reitz > Signed-off-by: Fam Zheng > Signed-off-by: Kevin Wolf

Re: [Qemu-devel] [PATCH] MAINTAINERS: Avoid using K: for NUMA section

2016-04-20 Thread Eduardo Habkost
On Wed, Apr 20, 2016 at 11:55:30AM -0300, Eduardo Habkost wrote: > When using K: in MAINTAINERS, false positives makes > get_maintainer.pl not use git history to find contributors. As > those patterns cause lots of false positives they are causing > more harm than good, so remove them. > >

[Qemu-devel] [PATCH] MAINTAINERS: Avoid using K: for NUMA section

2016-04-20 Thread Eduardo Habkost
When using K: in MAINTAINERS, false positives makes get_maintainer.pl not use git history to find contributors. As those patterns cause lots of false positives they are causing more harm than good, so remove them. Reported-by: Markus Armbruster Signed-off-by: Eduardo Habkost

Re: [Qemu-devel] [PATCH] tb: consistently use uint32_t for tb->flags

2016-04-20 Thread Richard Henderson
On 04/19/2016 04:21 PM, Emilio G. Cota wrote: On Thu, Apr 07, 2016 at 13:19:22 -0400, Emilio G. Cota wrote: We are inconsistent with the type of tb->flags: usage varies loosely between int and uint64_t. Settle to uint32_t everywhere, which is superior to both: at least one target (aarch64) uses

Re: [Qemu-devel] [PATCH for-2.6 v3 0/3] block: Fix drive-mirror with image size unaligned with granularity

2016-04-20 Thread Jeff Cody
On Wed, Apr 20, 2016 at 04:32:43PM +0200, Kevin Wolf wrote: > Taking over Fam's series as we're late for -rc3. Original cover letter: > > This fixes the bug introduced in e5b43573e28 and lately noticed by Kevin. > > v2: Move the mirror_clip_sectors() to mirror_iteration. [Max] > v3: Fix

[Qemu-devel] [PATCH 09/13] migration: Create thread infrastructure for multifd send side

2016-04-20 Thread Juan Quintela
We make the locking and the transfer of information specific, even if we are still transmiting things through the main thread. Signed-off-by: Juan Quintela --- migration/ram.c | 53 +++-- 1 file changed, 51 insertions(+), 2

[Qemu-devel] [PATCH 11/13] migration: Create thread infrastructure for multifd recv side

2016-04-20 Thread Juan Quintela
We make the locking and the transfer of information specific, even if we are still receiving things through the main thread. Signed-off-by: Juan Quintela --- migration/ram.c | 51 --- 1 file changed, 44 insertions(+), 7

Re: [Qemu-devel] [PATCH for-2.6 v3 1/3] mirror: Don't extend the last sub-chunk

2016-04-20 Thread Max Reitz
On 20.04.2016 16:32, Kevin Wolf wrote: > From: Fam Zheng > > The last sub-chunk is rounded up to the copy granularity in the target > image, resulting in a larger size than the source. > > Add a function to clip the copied sectors to the end. > > This undoes the "wrong"

[Qemu-devel] [PATCH 08/13] migration: create ram_multifd_page

2016-04-20 Thread Juan Quintela
The function still don't use multifd, but we have simplified ram_save_page, xbzrle and RDMA stuff is gone. We have added a new counter and a new flag for this type of pages. Signed-off-by: Juan Quintela --- hmp.c | 2 ++

  1   2   >