Re: [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 Gerd Hoffmann
On Mi, 2016-04-20 at 22:13 +0100, Joe Clifford wrote: > 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 IC

[Qemu-devel] [PATCH v5 1/5] ARM: Virt: Add /distance-map node for NUMA

2016-04-20 Thread Shannon Zhao
From: Shannon Zhao This /distance-map node is used to describe the accessing distance between NUMA nodes. Signed-off-by: Shannon Zhao --- hw/arm/virt.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 56d35c7..814a1eb 10064

[Qemu-devel] [PATCH v5 3/5] ARM: Add numa-node-id for /memory node

2016-04-20 Thread Shannon Zhao
From: Shannon Zhao When specifying NUMA for ARM machine, generate /memory node according to NUMA topology. Signed-off-by: Shannon Zhao --- hw/arm/boot.c | 31 ++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/hw/arm/boot.c b/hw/arm/boot.c index 5975f

[Qemu-devel] [PATCH v5 5/5] hw/arm/virt-acpi-build: Generate SRAT table

2016-04-20 Thread Shannon Zhao
From: Shannon Zhao To support NUMA, it needs to generate SRAT ACPI table. Signed-off-by: Shannon Zhao --- hw/arm/virt-acpi-build.c | 58 1 file changed, 58 insertions(+) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index f51

[Qemu-devel] [PATCH v5 4/5] include/hw/acpi/acpi-defs: Add GICC Affinity Structure

2016-04-20 Thread Shannon Zhao
From: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/i386/acpi-build.c| 2 +- include/hw/acpi/acpi-defs.h | 15 ++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 6477003..9ae4c0d 100644 --- a/hw/i386/acpi-

[Qemu-devel] [PATCH v5 2/5] ARM: Virt: Set numa-node-id for CPUs

2016-04-20 Thread Shannon Zhao
From: Shannon Zhao Add a numa-node-id property to specify NUMA information for CPUs. Signed-off-by: Shannon Zhao --- hw/arm/virt.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 814a1eb..d21e9a0 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -

[Qemu-devel] [PATCH v5 0/5] ARM: Add NUMA support for machine virt

2016-04-20 Thread Shannon Zhao
From: Shannon Zhao Add NUMA support for machine virt. Tested successfully running a guest Linux kernel with the following patch applied: - [PATCH v16 0/6] arm64, numa: Add numa support for arm64 platforms https://lkml.org/lkml/2016/4/8/571 - [PATCH v5 00/14] ACPI NUMA support for ARM64 https://l

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/21/2016 03:52 PM, David Gibson wrote: On Thu, Apr 21, 2016 at 03:14:48PM +1000, Alexey Kardashevskiy wrote: 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 s

Re: [Qemu-devel] [RFC for-2.7 01/11] qdt: IEEE1275-style device tree utility code

2016-04-20 Thread Alexey Kardashevskiy
On 04/20/2016 12:33 PM, David Gibson wrote: A number of guests supported by qemu use IEEE12750 (Open Firmware) style device trees for hardware discovery. In some cases (mac99, pseries) they get this device tree via calls to an in-guest Open Firmware implementation, in others (many ppc and arm em

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

2016-04-20 Thread David Gibson
On Thu, Apr 21, 2016 at 03:14:48PM +1000, Alexey Kardashevskiy wrote: > 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 w

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 t

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 c

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 a

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 Reviewed-by: Alexey Kardashev

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 +++--- include/hw/ppc/spapr.h | 1 - 2 file

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 trivia

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 3954d33

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 pat

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 file changed, 4 i

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 option in addition

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 Kar

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 har

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 sp

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 fix the option co

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 change is desired

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 with the > compat

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 controls for vmwa

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.) > > Signed-off-by: Janne

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 f745c4a..002c2c6 100644 ---

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 directi

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

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 Cc: Jason

[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-doc.texi | 4 ++-- 3 files changed, 13

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

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 i

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 (2013)

[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 which match with curren

[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 the TB resides in. Signe

[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. Signed-off-by: Sergey Fedorov Sig

[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 Signed-off-by: Sergey Fedorov Reviewed-by: Alex Bennée

[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 more suitable place, tho

[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 Reviewed-by: Alex Bennée --- Changes in v2: * Typo fixed in the commit tit

[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 public git repository [1].

[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_' prefix in TranslationBloc

[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 changed, 101 insertions(+), 103 deletions(-) diff --git a/translate-all.c b/translate-all.c ind

[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 Signed-off-by: Sergey Fedorov Reviewed-by: Alex Benn

[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 jmp_list_first. Signed-off

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 t

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 > > Ensure direct jump patching in AArch64 is atomic by using >

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 additional data into the

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 a/scripts/analyze-inclusions b/scripts/analyze-incl

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 o

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 users

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 atomic_read()/atomic_set() for code patching. Signed-off-by: Sergey Fed

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 code patching. >>> >>> Signed-off-by: Sergey Fedor

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 | 1 + > hw/arm/palmetto-bmc.c | 1 +

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() for code patching. >>> >>> Signed-off-by: Sergey Fedorov >>> Signed-

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 changed, 7 insertions(+), 8 del

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 tri

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 e

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: blo

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 test

[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 acquiring the lock with test-and-set instead of test-and-test-and-set.] Signed-off-by: Emilio

[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 a/include/qemu/processor.h b/include/qemu/pro

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 h

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 G. Cota >> >--- >> > include/qemu

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: Paolo Bonzini > >[Emilio's additions: call cpu_relax() while spinning;

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 > > 1 file

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

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 to

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 repository at: > > >

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 --- a/tcg/arm/tcg-target.inc.c +++ b/tcg/

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: > > >> On Tue, Apr 19, 2016 at 1:16 PM, M

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

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 in the git repository at:

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 positives they are cau

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 spinning; optimize for uncontended locks by acquiring the lock with xchg+test instead of

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: > > git://github.com/mdroth/qemu.git tags/qga-pull-2016

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 Signed-off-by: Sergey Fedorov --- tcg/aarch64/tcg-target.inc.c |

[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 remaining two offset

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 chunk encountered is

[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 drive. In that case,

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

[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 --- tests/qemu-iotests/iotests.py | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tests/qemu-iotests/

[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 Reviewed-by: Jeff Cody --- tests/qemu-iotests/152 | 62

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

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: Kevin Wolf > --- > tests/qemu-iotests

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 > Signed-off-by: Kevin Wolf > ---

  1   2   >