Re: [Qemu-devel] [RFC] alpha qemu arithmetic exceptions

2014-07-02 Thread Al Viro
More bugs: addl/v should sign-extend the result, as addl does. As it is, we have uint64_t helper_addlv(CPUAlphaState *env, uint64_t op1, uint64_t op2) { uint64_t tmp = op1; op1 = (uint32_t)(op1 + op2); if (unlikely((tmp ^ op2 ^ (-1UL)) & (tmp ^ op1) & (1UL << 31))) { ari

Re: [Qemu-devel] [PATCH for 2.1 1/2] memory: introduce memory_region_init_ram_nofail() and memory_region_init_ram_ptr_nofail()

2014-07-02 Thread Michael S. Tsirkin
On Thu, Jul 03, 2014 at 02:10:55PM +0800, Hu Tao wrote: > Introduce memory_region_init_ram_nofail() and > memory_region_init_ram_ptr_nofail(), which are the same as > memory_region_init_ram() and memory_region_init_ram_ptr() > respectively. They will exit qemu if there is an error, this is the > be

Re: [Qemu-devel] [Qemu-ppc] [PATCH v7 1/4] cpus: Define callback for QEMU "nmi" command

2014-07-02 Thread Nikunj A Dadhania
Alexey Kardashevskiy writes: > diff --git a/hw/core/nmi.c b/hw/core/nmi.c > new file mode 100644 > index 000..db1295f > --- /dev/null > +++ b/hw/core/nmi.c > @@ -0,0 +1,84 @@ [...] > + > +static void nmi_children(Object *o, struct do_nmi_s *ns); > + [...] > + > +void nmi_children(Object *o

Re: [Qemu-devel] [Xen-devel] [v5][PATCH 0/5] xen: add Intel IGD passthrough support

2014-07-02 Thread Michael S. Tsirkin
On Thu, Jul 03, 2014 at 01:57:24PM +0800, Chen, Tiejun wrote: > On 2014/7/2 23:27, Michael S. Tsirkin wrote: > >On Wed, Jul 02, 2014 at 03:15:02PM +, Ross Philipson wrote: > >>>-Original Message- > >>>From: Paolo Bonzini [mailto:pbonz...@redhat.com] > >>>Sent: Wednesday, July 02, 2014 7

[Qemu-devel] [Bug 1307473] Re: guest hang due to missing clock interrupt

2014-07-02 Thread Ilya Almametov
I can confirm that it's more kernel issue than qemu. I run kernel 3.11.0-24-generic which is left after upgrade from Saucy and have no issues for at least two days. Before that with current 3.13.0-30-generic kernel my Windows guests crashed every 3-4 hours. -- You received this bug notification b

[Qemu-devel] [PATCH for 2.1 1/2] memory: introduce memory_region_init_ram_nofail() and memory_region_init_ram_ptr_nofail()

2014-07-02 Thread Hu Tao
Introduce memory_region_init_ram_nofail() and memory_region_init_ram_ptr_nofail(), which are the same as memory_region_init_ram() and memory_region_init_ram_ptr() respectively. They will exit qemu if there is an error, this is the behaviour of old memory_region_init_ram() and memory_region_init_ram

[Qemu-devel] [PATCH for 2.1 2/2] memory-backend-file: improve error handling

2014-07-02 Thread Hu Tao
This patch fixes two problems of memory-backend-file: 1. If user adds a memory-backend-file object using object_add command, specifying a non-existing directory for property mem-path, qemu will core dump with message: /nonexistingdir: No such file or directory Bad ram offset f

[Qemu-devel] [PATCH for 2.1 0/2] bug fixs for memory backend

2014-07-02 Thread Hu Tao
This series includes two patches to fix bugs of memory backend. See each patch for the bugs and how to reproduce them. Hu Tao (2): memory: introduce memory_region_init_ram_nofail() and memory_region_init_ram_ptr_nofail() memory-backend-file: improve error handling backends/hostmem-ram.c

[Qemu-devel] [Bug 1307473] Re: guest hang due to missing clock interrupt

2014-07-02 Thread urusha
After installing kernel 3.15.1-031501-generic from kernel-ppa, both machines work without issues from 2014-06-25. Seems it's kernel issue that have already been solved upstream. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://

Re: [Qemu-devel] [Xen-devel] [v5][PATCH 0/5] xen: add Intel IGD passthrough support

2014-07-02 Thread Chen, Tiejun
On 2014/7/2 23:27, Michael S. Tsirkin wrote: On Wed, Jul 02, 2014 at 03:15:02PM +, Ross Philipson wrote: -Original Message- From: Paolo Bonzini [mailto:pbonz...@redhat.com] Sent: Wednesday, July 02, 2014 7:33 AM To: Ross Philipson; Michael S. Tsirkin; Stefano Stabellini Cc: peter.may

Re: [Qemu-devel] [Xen-devel] [RFC PATCH V3 1/2] xen: pass kernel initrd to qemu [and 1 more messages]

2014-07-02 Thread Chun Yan Liu
>>> On 7/2/2014 at 11:17 PM, in message <21428.8829.273127.394...@mariner.uk.xensource.com>, Ian Jackson wrote: > Ian Campbell writes ("Re: [RFC PATCH V3 1/2] xen: pass kernel initrd to > qemu"): > > On Mon, 2014-06-23 at 15:22 +0100, Ian Jackson wrote: > > > If we are going to do this then

Re: [Qemu-devel] [PATCH] memory: introduce memory_region_init_ram_nofail() and memory_region_init_ram_ptr_nofail()

2014-07-02 Thread Hu Tao
Hi, Sorry that I forgot to send a follow-up patch to this one, I'll resend this patch with the follow-up. Regards, Hu

Re: [Qemu-devel] [PATCH v5] ppc: spapr-rtas - implement os-term rtas call

2014-07-02 Thread Nikunj A Dadhania
Alexey Kardashevskiy writes: > On 06/30/2014 06:35 PM, Nikunj A Dadhania wrote: >> PAPR compliant guest calls this in absence of kdump. This finally >> reaches the guest and can be handled according to the policies set by >> higher level tools(like taking dump) for further analysis by tools like

Re: [Qemu-devel] [PATCH v7 3/4] s390x: Migrate to new NMI interface

2014-07-02 Thread Alexey Kardashevskiy
On 06/23/2014 11:32 PM, Alexey Kardashevskiy wrote: > On 06/16/2014 06:37 PM, Alexander Graf wrote: >> >> On 16.06.14 10:33, Alexey Kardashevskiy wrote: >>> On 06/16/2014 05:16 PM, Cornelia Huck wrote: On Sat, 14 Jun 2014 12:41:50 +1000 Alexey Kardashevskiy wrote: > On 06/13/201

Re: [Qemu-devel] [regression] dataplane: throughout -40% by commit 580b6b2aa2

2014-07-02 Thread Ming Lei
On Thu, Jul 3, 2014 at 12:21 AM, Paolo Bonzini wrote: > Il 02/07/2014 17:45, Ming Lei ha scritto: >> The attachment debug patch skips aio_notify() if qemu_bh_schedule >> is running from current aio context, but looks there is still 120K >> writes triggered. (without the patch, 400K can be observed

Re: [Qemu-devel] from which version qemu support clone on rbd

2014-07-02 Thread Brian Jackson
On Wednesday, July 2, 2014 8:12:17 PM CDT, yue wrote: could you tell me why 'Qemu doesn't handle that level of abstraction'? i know qcow2 well, you can tell me the comparation。 Qemu would have to have a lot of extra code (that already exists elsewhere) to support taking snapshots/clones/etc o

Re: [Qemu-devel] [PATCH] qemu-img info: show nocow info

2014-07-02 Thread Chun Yan Liu
>>> On 7/2/2014 at 09:03 PM, in message <53b4031e.3030...@redhat.com>, Eric >>> Blake wrote: > On 07/02/2014 03:50 AM, Chunyan Liu wrote: > > Add nocow info in 'qemu-img info' output to show whether the file > > currently has NOCOW flag set or not. > > > > Signed-off-by: Chunyan Liu > >

Re: [Qemu-devel] [PATCH v5] ppc: spapr-rtas - implement os-term rtas call

2014-07-02 Thread Alexey Kardashevskiy
On 07/03/2014 01:41 PM, Alexey Kardashevskiy wrote: > On 06/30/2014 06:35 PM, Nikunj A Dadhania wrote: >> PAPR compliant guest calls this in absence of kdump. This finally >> reaches the guest and can be handled according to the policies set by >> higher level tools(like taking dump) for further an

Re: [Qemu-devel] [RFC] COLO HA Project proposal

2014-07-02 Thread Hongyang Yang
Hi David, On 07/01/2014 08:12 PM, Dr. David Alan Gilbert wrote: * Hongyang Yang (yan...@cn.fujitsu.com) wrote: Hi Yang, Background: COLO HA project is a high availability solution. Both primary VM (PVM) and secondary VM (SVM) run in parallel. They receive the same request from client, and

Re: [Qemu-devel] [PATCH v5] ppc: spapr-rtas - implement os-term rtas call

2014-07-02 Thread Alexey Kardashevskiy
On 06/30/2014 06:35 PM, Nikunj A Dadhania wrote: > PAPR compliant guest calls this in absence of kdump. This finally > reaches the guest and can be handled according to the policies set by > higher level tools(like taking dump) for further analysis by tools like > crash. > > Linux kernel calls ibm

[Qemu-devel] [PATCH v3 1/6] spapr: Move DT memory node rendering to a helper

2014-07-02 Thread Alexey Kardashevskiy
This moves recurring bits of code related to memory@xxx nodes creation to a helper. This makes use of the new helper for node@0. Signed-off-by: Alexey Kardashevskiy --- hw/ppc/spapr.c | 48 1 file changed, 28 insertions(+), 20 deletions(-) diff

[Qemu-devel] [PATCH v3 5/6] spapr: Add a helper for node0_size calculation

2014-07-02 Thread Alexey Kardashevskiy
In multiple places there is a node0_size variable calculation which assumes that NUMA node #0 and memory node #0 are the same things which they are not. Since we are going to change it and do not want to change it in multiple places, let's make a helper. This adds a spapr_node0_size() helper and m

[Qemu-devel] [PATCH v3 2/6] spapr: Use DT memory node rendering helper for other nodes

2014-07-02 Thread Alexey Kardashevskiy
This finishes refactoring by using the spapr_populate_memory_node helper for all nodes and removing leftovers from spapr_populate_memory(). This is not a part of the previous patch because the patches look nicer apart. Signed-off-by: Alexey Kardashevskiy --- hw/ppc/spapr.c | 19 ++--

[Qemu-devel] [PATCH v3 6/6] spapr: Fix ibm, associativity for memory nodes

2014-07-02 Thread Alexey Kardashevskiy
We want the associtivity lists of memory and CPU nodes to match but memory nodes have incorrect domain#3 which is zero for CPU so they won't match. This clears domain#3 in the list to match CPUs associtivity lists. Signed-off-by: Alexey Kardashevskiy --- hw/ppc/spapr.c | 2 +- 1 file changed, 1

[Qemu-devel] [PATCH v3 4/6] spapr: Split memory nodes to power-of-two blocks

2014-07-02 Thread Alexey Kardashevskiy
Linux kernel expects nodes to have power-of-two size and does WARN_ON if this is not the case: [0.041456] WARNING: at drivers/base/memory.c:115 which is: === /* Validate blk_sz is a power of 2 and not less than section size */ if ((block_sz & (block_sz - 1)) || (block_sz < MIN_M

[Qemu-devel] [PATCH v3 0/6] spapr: rework memory nodes

2014-07-02 Thread Alexey Kardashevskiy
c4177479 "spapr: make sure RMA is in first mode of first memory node" introduced regression which prevents from running guests with memoryless NUMA node#0 which may happen on real POWER8 boxes and which would make sense to debug in QEMU. This patchset aim is to fix that and also fix various code

[Qemu-devel] [PATCH v3 3/6] spapr: Refactor spapr_populate_memory() to allow memoryless nodes

2014-07-02 Thread Alexey Kardashevskiy
Current QEMU does not support memoryless NUMA nodes, however actual hardware may have them so it makes sense to have a way to emulate them in QEMU. This prepares SPAPR for that. This moves 2 calls of spapr_populate_memory_node() into the existing loop over numa nodes so first several nodes may hav

Re: [Qemu-devel] [Xen-devel] [v5][PATCH 0/5] xen: add Intel IGD passthrough support

2014-07-02 Thread Chen, Tiejun
Is that about correct? What are folks timezones and the best days next week to talk about this on either Google Hangout or the phone? UK timezone. Maybe Friday afternoon so that afterwards we can go have enough beers to forget about all this. Is this determined formally? I mean I can ask i

Re: [Qemu-devel] [Xen-devel] [RFC PATCH V4 1/2] xen: pass kernel initrd to qemu

2014-07-02 Thread Chun Yan Liu
>>> On 7/2/2014 at 11:16 PM, in message <1404314181.8137.7.ca...@kazak.uk.xensource.com>, Ian Campbell wrote: > On Tue, 2014-07-01 at 15:06 +0800, Chunyan Liu wrote: > > xen side patch to support xen HVM direct kernel boot: > > support 'kernel', 'ramdisk', 'cmdline' (and 'root', 'extra' as we

Re: [Qemu-devel] [PATCH] ide: fix double free

2014-07-02 Thread ChenLiang
On 2014/7/2 20:19, Paolo Bonzini wrote: > Il 02/07/2014 13:57, ChenLiang ha scritto: Hmm, dbs->in_cancel will be true always. Although this will avoid freeing dbs by dma_comlete. But it maybe a mistake. >>> >>> This was on purpose; I'm doing the free myself in dma_aio_cancel, so I

Re: [Qemu-devel] [PATCH 08/10] userfaultfd: add new syscall to provide memory externalization

2014-07-02 Thread Andy Lutomirski
On 07/02/2014 09:50 AM, Andrea Arcangeli wrote: > Once an userfaultfd is created MADV_USERFAULT regions talks through > the userfaultfd protocol with the thread responsible for doing the > memory externalization of the process. > > The protocol starts by userland writing the requested/preferred >

Re: [Qemu-devel] [PATCH 00/10] RFC: userfault

2014-07-02 Thread Andy Lutomirski
On 07/02/2014 09:50 AM, Andrea Arcangeli wrote: > Hello everyone, > > There's a large CC list for this RFC because this adds two new > syscalls (userfaultfd and remap_anon_pages) and > MADV_USERFAULT/MADV_NOUSERFAULT, so suggestions on changes to the API > or on a completely different API if someb

Re: [Qemu-devel] from which version qemu support clone on rbd

2014-07-02 Thread yue
could you tell me why 'Qemu doesn't handle that level of abstraction'? i know qcow2 well, you can tell me the comparation。 thanks At 2014-07-02 11:36:12, "Brian Jackson" wrote: >Qemu doesn't handle that level of abstraction. The closest approximation >you could probably come up with is

Re: [Qemu-devel] VM id

2014-07-02 Thread Eric Blake
On 07/02/2014 06:29 PM, Gary Jordan wrote: [please don't top-post on technical lists] > If I open two session in a migration operation, how does the qemu know > which one should be accepted? I saw there was a ram_list to check, but no > id of the guest. I suggest using higher level software, lik

Re: [Qemu-devel] VM id

2014-07-02 Thread Gary Jordan
If I open two session in a migration operation, how does the qemu know which one should be accepted? I saw there was a ram_list to check, but no id of the guest. 2014-07-02 17:59 GMT-04:00 Eric Blake : > On 07/02/2014 01:20 PM, Gary Jordan wrote: > > Does Qemu have a VM id allocated for each VM?

Re: [Qemu-devel] e1000 autoneg timing, piix/osx

2014-07-02 Thread Gabriel L. Somlo
On Wed, Jul 02, 2014 at 05:14:26PM -0400, Gabriel L. Somlo wrote: > On Wed, Jul 02, 2014 at 11:02:30PM +0200, Alexander Graf wrote: > > > > On 02.07.14 22:49, Gabriel L. Somlo wrote: > > >So it turns out everything I thought I knew (which was little indeed) > > >was more or less wrong. The problem

Re: [Qemu-devel] VM id

2014-07-02 Thread Eric Blake
On 07/02/2014 01:20 PM, Gary Jordan wrote: > Does Qemu have a VM id allocated for each VM? I did not find this Id in > qemu. HOW deos qemu identify each VM, using thread Id or some other > identifiers? Each qemu process manages exactly one VM, so qemu doesn't care what id a guest has. Higher-lev

Re: [Qemu-devel] e1000 autoneg timing, piix/osx

2014-07-02 Thread Alexander Graf
> Am 02.07.2014 um 23:14 schrieb "Gabriel L. Somlo" : > >> On Wed, Jul 02, 2014 at 11:02:30PM +0200, Alexander Graf wrote: >> >>> On 02.07.14 22:49, Gabriel L. Somlo wrote: >>> So it turns out everything I thought I knew (which was little indeed) >>> was more or less wrong. The problem, as far

Re: [Qemu-devel] [PATCH 2/2 v5] numa: enable sparse node numbering on ppc

2014-07-02 Thread Eduardo Habkost
On Wed, Jul 02, 2014 at 02:02:14PM -0700, Nishanth Aravamudan wrote: > On 02.07.2014 [15:21:38 -0300], Eduardo Habkost wrote: > > On Tue, Jul 01, 2014 at 01:50:06PM -0700, Nishanth Aravamudan wrote: > > > On 01.07.2014 [17:39:57 -0300], Eduardo Habkost wrote: > > > > On Tue, Jul 01, 2014 at 01:13:2

Re: [Qemu-devel] e1000 autoneg timing, piix/osx

2014-07-02 Thread Gabriel L. Somlo
On Wed, Jul 02, 2014 at 11:02:30PM +0200, Alexander Graf wrote: > > On 02.07.14 22:49, Gabriel L. Somlo wrote: > >So it turns out everything I thought I knew (which was little indeed) > >was more or less wrong. The problem, as far as I'm observing it now, > >is that on PIIX, the OS X guest obsessi

Re: [Qemu-devel] [PATCH 2/2 v5] numa: enable sparse node numbering on ppc

2014-07-02 Thread Nishanth Aravamudan
On 02.07.2014 [15:21:38 -0300], Eduardo Habkost wrote: > On Tue, Jul 01, 2014 at 01:50:06PM -0700, Nishanth Aravamudan wrote: > > On 01.07.2014 [17:39:57 -0300], Eduardo Habkost wrote: > > > On Tue, Jul 01, 2014 at 01:13:28PM -0700, Nishanth Aravamudan wrote: > > > [...] > > > > diff --git a/hw/i38

Re: [Qemu-devel] e1000 autoneg timing, piix/osx

2014-07-02 Thread Alexander Graf
On 02.07.14 22:49, Gabriel L. Somlo wrote: On Wed, Jul 02, 2014 at 11:16:52AM +0200, Alexander Graf wrote: Are you sure there's not just simply some irq unmasking event after 5500ms we don't handle properly? I poked around a bit, and the e1000 interrupt mask register is NOT the problem (the LS

Re: [Qemu-devel] [PATCH 5/6] PPC: e500: Support dynamically spawned sysbus devices

2014-07-02 Thread Alexander Graf
On 02.07.14 21:34, Scott Wood wrote: On Wed, 2014-07-02 at 19:59 +0200, Alexander Graf wrote: On 02.07.14 19:52, Scott Wood wrote: On Wed, 2014-07-02 at 19:30 +0200, Alexander Graf wrote: On 02.07.14 19:26, Scott Wood wrote: On Wed, 2014-07-02 at 19:12 +0200, Alexander Graf wrote: On 02.07.

Re: [Qemu-devel] e1000 autoneg timing, piix/osx

2014-07-02 Thread Gabriel L. Somlo
On Wed, Jul 02, 2014 at 11:16:52AM +0200, Alexander Graf wrote: >>> Are you sure there's not just simply some irq unmasking event >>> after 5500ms we don't handle properly? >> I poked around a bit, and the e1000 interrupt mask register is NOT the >> problem (the LSC mask bit is clear at all times).

Re: [Qemu-devel] [PATCH 5/6] PPC: e500: Support dynamically spawned sysbus devices

2014-07-02 Thread Scott Wood
On Wed, 2014-07-02 at 19:59 +0200, Alexander Graf wrote: > On 02.07.14 19:52, Scott Wood wrote: > > On Wed, 2014-07-02 at 19:30 +0200, Alexander Graf wrote: > >> On 02.07.14 19:26, Scott Wood wrote: > >>> On Wed, 2014-07-02 at 19:12 +0200, Alexander Graf wrote: > On 02.07.14 00:50, Scott Wood

Re: [Qemu-devel] ResettRe: [Xen-devel] [v5][PATCH 0/5] xen: add Intel IGD passthrough support

2014-07-02 Thread Alex Williamson
On Wed, 2014-07-02 at 18:12 +0300, Michael S. Tsirkin wrote: > On Wed, Jul 02, 2014 at 04:50:15PM +0200, Paolo Bonzini wrote: > > Il 02/07/2014 16:00, Konrad Rzeszutek Wilk ha scritto: > > >With this long thread I lost a bit context about the challenges > > >that exists. But let me try summarizing

[Qemu-devel] VM id

2014-07-02 Thread Gary Jordan
Does Qemu have a VM id allocated for each VM? I did not find this Id in qemu. HOW deos qemu identify each VM, using thread Id or some other identifiers?

Re: [Qemu-devel] [PATCH 2/2 v5] numa: enable sparse node numbering on ppc

2014-07-02 Thread Eduardo Habkost
On Tue, Jul 01, 2014 at 01:50:06PM -0700, Nishanth Aravamudan wrote: > On 01.07.2014 [17:39:57 -0300], Eduardo Habkost wrote: > > On Tue, Jul 01, 2014 at 01:13:28PM -0700, Nishanth Aravamudan wrote: > > [...] > > > diff --git a/hw/i386/pc.c b/hw/i386/pc.c > > > index 12472c6..cdefafe 100644 > > > -

[Qemu-devel] [PATCH v2 9/9] PPC: Fix default config ordering and add eTSEC for ppc64

2014-07-02 Thread Alexander Graf
We messed up the ordering in our default configs for PPC. The top entries are generic entries, then come sections that indicate that features are only in because of a special feature (such as PReP). Fix the ordering again and while at it add eTSEC support to the ppc64 target so that we can spawn e

[Qemu-devel] [PATCH v2 3/9] qom: Expose property helpers for get/set of integers

2014-07-02 Thread Alexander Graf
We have helper functions to easily expose integers as QOM object properties. However, these are read only. This patch makes the getter function world accessible and adds a generic setter for integer properties. We can use these later with the generic object_property_add to not dupliate simple log

[Qemu-devel] [PATCH v2 5/9] sysbus: Add user map hints

2014-07-02 Thread Alexander Graf
We want to give the user the ability to tell our machine file where he wants to have devices mapped to. This patch adds code to create these hints dynamically and expose them as object properties that can only be modified before device realization. Signed-off-by: Alexander Graf --- v1 -> v2:

[Qemu-devel] [PATCH v2 4/9] qom: Add generic object property g_free helper

2014-07-02 Thread Alexander Graf
A good amount of properties are really just g_new / g_malloc allocated memory. There's no reason we need to have different release helpers for all of those. This patch introduces a new g_free() based helper for property release and replaces existing duplicated code implementations in object.c as w

[Qemu-devel] [PATCH v2 1/9] qom: Move property helpers to own file

2014-07-02 Thread Alexander Graf
We have accumulated a number of friendly helpers that make registration of properties easier. However, their number is only increasing and they start to clutter the core object.c file. So let's move them into a separate C file and thus ensure that we have room to grow :). Signed-off-by: Alexander

[Qemu-devel] [PATCH v2 6/9] sysbus: Make devices spawnable via -device

2014-07-02 Thread Alexander Graf
Now that we can properly map sysbus devices that haven't been connected to something forcefully by C code, we can allow the -device command line option to spawn them. For machines that don't implement dynamic sysbus assignment in their board files we add a new bool "has_dynamic_sysbus" to the mach

[Qemu-devel] [PATCH v2 7/9] PPC: e500: Support dynamically spawned sysbus devices

2014-07-02 Thread Alexander Graf
For e500 our approach to supporting dynamically spawned sysbus devices is to create a simple bus from the guest's point of view within which we map those devices dynamically. We allocate memory regions always within the "platform" hole in address space and map IRQs to predetermined IRQ lines that

[Qemu-devel] [PATCH v2 8/9] e500: Add support for eTSEC in device tree

2014-07-02 Thread Alexander Graf
This patch adds support to expose eTSEC devices in the dynamically created guest facing device tree. This allows us to expose eTSEC devices into guests without changes in the machine file. Because we can now tell the guest about eTSEC devices this patch allows the user to specify eTSEC devices via

[Qemu-devel] [PATCH v2 2/9] qom: macroify integer property helpers

2014-07-02 Thread Alexander Graf
We have a bunch of nice helpers that allow us to easily register an integer field as QOM property. However, we have those duplicated for every integer size available. This is very cumbersome (and prone to bugs) to work with and extend, so let's strip out the only difference there is (the size) and

[Qemu-devel] [PATCH v2 0/9] Dynamic sysbus device allocation support

2014-07-02 Thread Alexander Graf
Platforms without ISA and/or PCI have had a seriously hard time in the dynamic device creation world of QEMU. Devices on these were modeled as SysBus devices which can only be instantiated in machine files, not through -device. Why is that so? For Sysbus devices we didn't know who should be respo

Re: [Qemu-devel] [PATCH 5/6] PPC: e500: Support dynamically spawned sysbus devices

2014-07-02 Thread Alexander Graf
On 02.07.14 19:52, Scott Wood wrote: On Wed, 2014-07-02 at 19:30 +0200, Alexander Graf wrote: On 02.07.14 19:26, Scott Wood wrote: On Wed, 2014-07-02 at 19:12 +0200, Alexander Graf wrote: On 02.07.14 00:50, Scott Wood wrote: Plus, let's please not hardcode any more addresses that are going t

Re: [Qemu-devel] [Xen-devel] [v5][PATCH 0/5] xen: add Intel IGD passthrough support

2014-07-02 Thread Michael S. Tsirkin
On Wed, Jul 02, 2014 at 06:29:23PM +0200, Paolo Bonzini wrote: > Il 02/07/2014 17:27, Michael S. Tsirkin ha scritto: > > At some level, maybe Paolo is right. Ignore existing drivers and ask > > intel developers to update their drivers to do something sane on > > hypervisors, even if they do ugly t

Re: [Qemu-devel] [Xen-devel] [v5][PATCH 0/5] xen: add Intel IGD passthrough support

2014-07-02 Thread Michael S. Tsirkin
On Wed, Jul 02, 2014 at 12:05:27PM -0400, Konrad Rzeszutek Wilk wrote: > On Wed, Jul 02, 2014 at 05:08:43PM +0300, Michael S. Tsirkin wrote: > > On Wed, Jul 02, 2014 at 10:00:33AM -0400, Konrad Rzeszutek Wilk wrote: > > > On Wed, Jul 02, 2014 at 01:33:09PM +0200, Paolo Bonzini wrote: > > > > Il 01/

Re: [Qemu-devel] [PATCH 5/6] PPC: e500: Support dynamically spawned sysbus devices

2014-07-02 Thread Scott Wood
On Wed, 2014-07-02 at 19:30 +0200, Alexander Graf wrote: > On 02.07.14 19:26, Scott Wood wrote: > > On Wed, 2014-07-02 at 19:12 +0200, Alexander Graf wrote: > >> On 02.07.14 00:50, Scott Wood wrote: > >>> Plus, let's please not hardcode any more addresses that are going to be > >>> a problem for gi

Re: [Qemu-devel] [PATCH 6/6] e500: Add support for eTSEC in device tree

2014-07-02 Thread Alexander Graf
On 02.07.14 19:32, Scott Wood wrote: On Wed, 2014-07-02 at 19:24 +0200, Alexander Graf wrote: On 02.07.14 00:56, Scott Wood wrote: On Tue, 2014-07-01 at 23:49 +0200, Alexander Graf wrote: This patch adds support to expose eTSEC devices in the dynamically created guest facing device tree. This

Re: [Qemu-devel] [PATCH 6/6] e500: Add support for eTSEC in device tree

2014-07-02 Thread Scott Wood
On Wed, 2014-07-02 at 19:24 +0200, Alexander Graf wrote: > On 02.07.14 00:56, Scott Wood wrote: > > On Tue, 2014-07-01 at 23:49 +0200, Alexander Graf wrote: > >> This patch adds support to expose eTSEC devices in the dynamically created > >> guest facing device tree. This allows us to expose eTSEC

Re: [Qemu-devel] [PATCH 5/6] PPC: e500: Support dynamically spawned sysbus devices

2014-07-02 Thread Alexander Graf
On 02.07.14 19:26, Scott Wood wrote: On Wed, 2014-07-02 at 19:12 +0200, Alexander Graf wrote: On 02.07.14 00:50, Scott Wood wrote: Plus, let's please not hardcode any more addresses that are going to be a problem for giving guests a large amount of RAM (yes, CCSRBAR is also blocking that, but

Re: [Qemu-devel] [PATCH 5/6] PPC: e500: Support dynamically spawned sysbus devices

2014-07-02 Thread Scott Wood
On Wed, 2014-07-02 at 19:12 +0200, Alexander Graf wrote: > On 02.07.14 00:50, Scott Wood wrote: > > Plus, let's please not hardcode any more addresses that are going to be > > a problem for giving guests a large amount of RAM (yes, CCSRBAR is also > > blocking that, but that has a TODO to parameter

Re: [Qemu-devel] [PATCH 6/6] e500: Add support for eTSEC in device tree

2014-07-02 Thread Alexander Graf
On 02.07.14 00:56, Scott Wood wrote: On Tue, 2014-07-01 at 23:49 +0200, Alexander Graf wrote: This patch adds support to expose eTSEC devices in the dynamically created guest facing device tree. This allows us to expose eTSEC devices into guests without changes in the machine file. Because we

[Qemu-devel] [PATCH 03/10] mm: PT lock: export double_pt_lock/unlock

2014-07-02 Thread Andrea Arcangeli
Those two helpers are needed by remap_anon_pages. Signed-off-by: Andrea Arcangeli --- include/linux/mm.h | 4 mm/fremap.c| 29 + 2 files changed, 33 insertions(+) diff --git a/include/linux/mm.h b/include/linux/mm.h index 00faeda..0a7f0e1 100644 --- a/i

[Qemu-devel] [PATCH for-2.1] PPC: Fix booke206 TLB with phys addrs > 32bit

2014-07-02 Thread Alexander Graf
We were truncating physical addresses to 32bit when using qemu-system-ppc with a booke206 TLB implementation. This patch fixes that and makes the full address space available. Signed-off-by: Alexander Graf --- target-ppc/mmu_helper.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) d

Re: [Qemu-devel] [PATCH 5/6] PPC: e500: Support dynamically spawned sysbus devices

2014-07-02 Thread Alexander Graf
On 02.07.14 00:50, Scott Wood wrote: On Tue, 2014-07-01 at 23:49 +0200, Alexander Graf wrote: For e500 our approach to supporting dynamically spawned sysbus devices is to create a simple bus from the guest's point of view within which we map those devices dynamically. We allocate memory region

[Qemu-devel] [PATCH 06/10] mm: sys_remap_anon_pages

2014-07-02 Thread Andrea Arcangeli
This new syscall will move anon pages across vmas, atomically and without touching the vmas. It only works on non shared anonymous pages because those can be relocated without generating non linear anon_vmas in the rmap code. It is the ideal mechanism to handle userspace page faults. Normally the

[Qemu-devel] [PATCH 08/10] userfaultfd: add new syscall to provide memory externalization

2014-07-02 Thread Andrea Arcangeli
Once an userfaultfd is created MADV_USERFAULT regions talks through the userfaultfd protocol with the thread responsible for doing the memory externalization of the process. The protocol starts by userland writing the requested/preferred USERFAULT_PROTOCOL version into the userfault fd (64bit writ

[Qemu-devel] [PATCH 10/10] userfaultfd: use VM_FAULT_RETRY in handle_userfault()

2014-07-02 Thread Andrea Arcangeli
This optimizes the userfault handler to repeat the fault without returning to userland if it's a page faults and it teaches it to handle FOLL_NOWAIT if it's a nonblocking gup invocation from KVM. The FOLL_NOWAIT part is actually more than an optimization because if FOLL_NOWAIT is set the gup caller

Re: [Qemu-devel] ResettRe: [Xen-devel] [v5][PATCH 0/5] xen: add Intel IGD passthrough support

2014-07-02 Thread Michael S. Tsirkin
On Wed, Jul 02, 2014 at 12:23:37PM -0400, Konrad Rzeszutek Wilk wrote: > On Wed, Jul 02, 2014 at 04:50:15PM +0200, Paolo Bonzini wrote: > > Il 02/07/2014 16:00, Konrad Rzeszutek Wilk ha scritto: > > >With this long thread I lost a bit context about the challenges > > >that exists. But let me try su

[Qemu-devel] [PATCH 00/10] RFC: userfault

2014-07-02 Thread Andrea Arcangeli
Hello everyone, There's a large CC list for this RFC because this adds two new syscalls (userfaultfd and remap_anon_pages) and MADV_USERFAULT/MADV_NOUSERFAULT, so suggestions on changes to the API or on a completely different API if somebody has better ideas are welcome now. The combination of th

[Qemu-devel] [PATCH 05/10] mm: swp_entry_swapcount

2014-07-02 Thread Andrea Arcangeli
Provide a new swapfile method for remap_anon_pages to verify the swap entry is mapped only in one vma before relocating the swap entry in a different virtual address. Otherwise if the swap entry is mapped in multiple vmas, when the page is swapped back in, it could get mapped in a non linear way in

[Qemu-devel] [PATCH 04/10] mm: rmap preparation for remap_anon_pages

2014-07-02 Thread Andrea Arcangeli
remap_anon_pages (unlike remap_file_pages) tries to be non intrusive in the rmap code. As far as the rmap code is concerned, rmap_anon_pages only alters the page->mapping and page->index. It does it while holding the page lock. However there are a few places that in presence of anon pages are allo

[Qemu-devel] [PATCH 09/10] userfaultfd: make userfaultfd_write non blocking

2014-07-02 Thread Andrea Arcangeli
It is generally inefficient to ask the wakeup of userfault ranges where there's not a single userfault address read through userfaultfd_read earlier and in turn waiting a wakeup. However it may come handy to wakeup the same userfault range twice in case of multiple thread faulting on the same addre

[Qemu-devel] [PATCH 07/10] waitqueue: add nr wake parameter to __wake_up_locked_key

2014-07-02 Thread Andrea Arcangeli
Userfaultfd needs to wake all waitqueues (pass 0 as nr parameter), instead of the current hardcoded 1 (that would wake just the first waitqueue in the head list). Signed-off-by: Andrea Arcangeli --- include/linux/wait.h | 5 +++-- kernel/sched/wait.c | 7 --- net/sunrpc/sched.c | 2 +- 3

[Qemu-devel] [PATCH 02/10] mm: madvise MADV_USERFAULT

2014-07-02 Thread Andrea Arcangeli
MADV_USERFAULT is a new madvise flag that will set VM_USERFAULT in the vma flags. Whenever VM_USERFAULT is set in an anonymous vma, if userland touches a still unmapped virtual address, a sigbus signal is sent instead of allocating a new page. The sigbus signal handler will then resolve the page fa

[Qemu-devel] [PATCH 01/10] mm: madvise MADV_USERFAULT: prepare vm_flags to allow more than 32bits

2014-07-02 Thread Andrea Arcangeli
We run out of 32bits in vm_flags, noop change for 64bit archs. Signed-off-by: Andrea Arcangeli --- fs/proc/task_mmu.c | 4 ++-- include/linux/huge_mm.h | 4 ++-- include/linux/ksm.h | 4 ++-- include/linux/mm_types.h | 2 +- mm/huge_memory.c | 2 +- mm/ksm.c |

Re: [Qemu-devel] [Xen-devel] [v5][PATCH 0/5] xen: add Intel IGD passthrough support

2014-07-02 Thread Konrad Rzeszutek Wilk
On Wed, Jul 02, 2014 at 06:29:23PM +0200, Paolo Bonzini wrote: > Il 02/07/2014 17:27, Michael S. Tsirkin ha scritto: > > At some level, maybe Paolo is right. Ignore existing drivers and ask > > intel developers to update their drivers to do something sane on > > hypervisors, even if they do ugly t

Re: [Qemu-devel] [PATCH for-2.1] hw/arm/vexpress: Alias NOR flash at 0 for vexpress-a9

2014-07-02 Thread Greg Bellows
Reviewed-by: Greg Bellows On 2 July 2014 09:07, Peter Maydell wrote: > Make the vexpress-a9 board alias the first NOR flash region at > address zero, like vexpress-a15. This makes "-bios" actually usable > on this board. > > Signed-off-by: Peter Maydell > --- > Looking back through the archiv

Re: [Qemu-devel] [regression] dataplane: throughout -40% by commit 580b6b2aa2

2014-07-02 Thread Ming Lei
On Thu, Jul 3, 2014 at 12:38 AM, Paolo Bonzini wrote: > >> On Thu, Jul 3, 2014 at 12:23 AM, Paolo Bonzini wrote: >> > Il 02/07/2014 18:13, Ming Lei ha scritto: >> > >> >> That must be for generating guest irq, which should have been >> >> processed as batch easily. >> > >> > >> > No, guest irqs a

Re: [Qemu-devel] [libvirt] Not able to run "virsh qemu-agent-command" when socat is working

2014-07-02 Thread Eric Blake
On 07/02/2014 01:13 AM, Puneet Bakshi wrote: > Hi, > > I am running qemu guest agent in Windows 2k8. I am able to execute > "qemu-agent-commands" using socat but not through "virsh > qemu-agent-command". > > *Host CentOS system* > > socat returns response appropriately. > [root@sdsr720-14 ~

Re: [Qemu-devel] [regression] dataplane: throughout -40% by commit 580b6b2aa2

2014-07-02 Thread Paolo Bonzini
> On Thu, Jul 3, 2014 at 12:23 AM, Paolo Bonzini wrote: > > Il 02/07/2014 18:13, Ming Lei ha scritto: > > > >> That must be for generating guest irq, which should have been > >> processed as batch easily. > > > > > > No, guest irqs are generated (with notify_guest) on every I/O completion > > eve

Re: [Qemu-devel] [Xen-devel] [v5][PATCH 0/5] xen: add Intel IGD passthrough support

2014-07-02 Thread Paolo Bonzini
Il 02/07/2014 17:27, Michael S. Tsirkin ha scritto: > At some level, maybe Paolo is right. Ignore existing drivers and ask > intel developers to update their drivers to do something sane on > hypervisors, even if they do ugly things on real hardware. > > A simple proposal since what I wrote earli

Re: [Qemu-devel] ResettRe: [Xen-devel] [v5][PATCH 0/5] xen: add Intel IGD passthrough support

2014-07-02 Thread Paolo Bonzini
Il 02/07/2014 18:23, Konrad Rzeszutek Wilk ha scritto: diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 651e65e..03f2829 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -433,6 +433,8 @@ void intel_detect_pch(struct drm_devi

Re: [Qemu-devel] [regression] dataplane: throughout -40% by commit 580b6b2aa2

2014-07-02 Thread Ming Lei
On Thu, Jul 3, 2014 at 12:23 AM, Paolo Bonzini wrote: > Il 02/07/2014 18:13, Ming Lei ha scritto: > >> That must be for generating guest irq, which should have been >> processed as batch easily. > > > No, guest irqs are generated (with notify_guest) on every I/O completion > even in 2.0. In 2.0,

Re: [Qemu-devel] ResettRe: [Xen-devel] [v5][PATCH 0/5] xen: add Intel IGD passthrough support

2014-07-02 Thread Konrad Rzeszutek Wilk
On Wed, Jul 02, 2014 at 04:50:15PM +0200, Paolo Bonzini wrote: > Il 02/07/2014 16:00, Konrad Rzeszutek Wilk ha scritto: > >With this long thread I lost a bit context about the challenges > >that exists. But let me try summarizing it here - which will hopefully > >get some consensus. > > > >1). Fix

Re: [Qemu-devel] [regression] dataplane: throughout -40% by commit 580b6b2aa2

2014-07-02 Thread Paolo Bonzini
Il 02/07/2014 18:13, Ming Lei ha scritto: That must be for generating guest irq, which should have been processed as batch easily. No, guest irqs are generated (with notify_guest) on every I/O completion even in 2.0. Paolo

Re: [Qemu-devel] [regression] dataplane: throughout -40% by commit 580b6b2aa2

2014-07-02 Thread Paolo Bonzini
Il 02/07/2014 17:45, Ming Lei ha scritto: > The attachment debug patch skips aio_notify() if qemu_bh_schedule > is running from current aio context, but looks there is still 120K > writes triggered. (without the patch, 400K can be observed in > same test) Nice. Another observation is that after a

Re: [Qemu-devel] [regression] dataplane: throughout -40% by commit 580b6b2aa2

2014-07-02 Thread Ming Lei
On Wed, Jul 2, 2014 at 11:45 PM, Ming Lei wrote: > On Wed, Jul 2, 2014 at 4:54 PM, Stefan Hajnoczi wrote: >> On Tue, Jul 01, 2014 at 06:49:30PM +0200, Paolo Bonzini wrote: >>> Il 01/07/2014 16:49, Ming Lei ha scritto: >>> >Let me provide some data when running randread(bs 4k, libaio) >>> >from VM

Re: [Qemu-devel] [Xen-devel] [v5][PATCH 0/5] xen: add Intel IGD passthrough support

2014-07-02 Thread Konrad Rzeszutek Wilk
On Wed, Jul 02, 2014 at 05:08:43PM +0300, Michael S. Tsirkin wrote: > On Wed, Jul 02, 2014 at 10:00:33AM -0400, Konrad Rzeszutek Wilk wrote: > > On Wed, Jul 02, 2014 at 01:33:09PM +0200, Paolo Bonzini wrote: > > > Il 01/07/2014 19:39, Ross Philipson ha scritto: > > > > > > > >We do IGD pass-through

Re: [Qemu-devel] [PATCH v2 2.1 1/3] blockjob: Fix recent BLOCK_JOB_READY regression

2014-07-02 Thread Eric Blake
On 07/02/2014 09:03 AM, Paolo Bonzini wrote: What if an underlying device doesn't support [rw]error=stop? Not all do... >>> >>> Then the "fix" is to add support to the underlying device. IDE, SCSI >>> and virtio-blk (plus virtio-scsi via SCSI of course) are covered; >> >> Where "covere

Re: [Qemu-devel] [RFC] alpha qemu arithmetic exceptions

2014-07-02 Thread Al Viro
On Wed, Jul 02, 2014 at 08:26:53AM -0700, Richard Henderson wrote: > On 07/01/2014 11:17 PM, Al Viro wrote: > > If we don't want FE_INEXACT seen by fetestexcept() after rounding 4.5, we'd > > better not use FPCR.INE - *all* variants of actual hardware (at least from > > 21064A to 21264) set that su

Re: [Qemu-devel] [regression] dataplane: throughout -40% by commit 580b6b2aa2

2014-07-02 Thread Ming Lei
On Wed, Jul 2, 2014 at 4:54 PM, Stefan Hajnoczi wrote: > On Tue, Jul 01, 2014 at 06:49:30PM +0200, Paolo Bonzini wrote: >> Il 01/07/2014 16:49, Ming Lei ha scritto: >> >Let me provide some data when running randread(bs 4k, libaio) >> >from VM for 10sec: >> > >> >1), qemu.git/master >> >- write():

Re: [Qemu-devel] from which version qemu support clone on rbd

2014-07-02 Thread Brian Jackson
Qemu doesn't handle that level of abstraction. The closest approximation you could probably come up with is qemu-img's backing file support for qcow2 images. You should stick to using the rbd tool to create clones of rbd devices. Alternatively, use a higher level tool (like openstack, etc) tha

Re: [Qemu-devel] [PATCH 4/6] sysbus: Make devices spawnable via -device

2014-07-02 Thread Alexander Graf
On 02.07.14 08:32, Paolo Bonzini wrote: Il 01/07/2014 23:49, Alexander Graf ha scritto: + +static void machine_init_notify(Notifier *notifier, void *data) +{ +Object *machine = qdev_get_machine(); +Object *container; + +if (object_property_find(machine, "has-dynamic-sysbus", NULL))

[Qemu-devel] from which version qemu support clone on rbd

2014-07-02 Thread yue
hi,all i now look at qemu 2.0, i do not find rbd-api related to clone. if qemu support this function? and from which version? clone api of rbd is very simple(one api), why qemu does not implement?what is the reason? thanks.

  1   2   3   >