Re: [Qemu-devel] [PATCH v2] gtk: Fix accelerator filtering

2013-07-16 Thread Jan Kiszka
On 2013-05-08 00:42, Jan Kiszka wrote: > On 2013-05-07 23:03, Jordan Justen wrote: >> On Sun, Mar 24, 2013 at 11:06 AM, Jan Kiszka wrote: >>> On 2013-02-25 16:44, Jan Kiszka wrote: On 2013-02-25 16:39, Anthony Liguori wrote: > Jan Kiszka writes: > >> This is in fact very simply:

[Qemu-devel] [PATCH 3/4] xics: rework initialization

2013-07-16 Thread Alexey Kardashevskiy
Currently RTAS and hypercalls are registered in the XICS class init function. The upcoming XICS-KVM will inherit from XICS but will use another API to register RTAS tokens with KVM so registration has to move from the class init function (common for both XICS and XICS-KVM) to the _realize function

[Qemu-devel] [PATCH 4/4] xics: Support for in-kernel XICS interrupt controller

2013-07-16 Thread Alexey Kardashevskiy
From: David Gibson Recent (host) kernels support emulating the PAPR defined "XICS" interrupt controller system within KVM. This patch allows qemu to initialize and configure the in-kernel XICS, and keep its state in sync with qemu's XICS state as necessary. This should give considerable perform

[Qemu-devel] [PATCH 2/4] xics: add pre_save/post_load/cpu_setup dispatchers

2013-07-16 Thread Alexey Kardashevskiy
The upcoming support of in-kernel XICS will redefine migration callbacks for both ICS and ICP so classes and callback pointers are added. This adds a cpu_setup callback to the XICS device class (as XICS-KVM will do it different) and xics_dispatch_cpu_setup(). This also moves the place where xics_d

[Qemu-devel] [PATCH 1/4] target-ppc: Add helper for KVM_PPC_RTAS_DEFINE_TOKEN

2013-07-16 Thread Alexey Kardashevskiy
From: David Gibson Recent PowerKVM allows the kernel to intercept some RTAS calls from the guest directly. This is used to implement the more efficient in-kernel XICS for example. qemu is still responsible for assigning the RTAS token numbers however, and needs to tell the kernel which RTAS fun

[Qemu-devel] RFC: [PATCH 0/4] xics: in-kernel support

2013-07-16 Thread Alexey Kardashevskiy
This is rework of in-kernel XICS on top of "[PATCH 00/11] pseries: migration and QOM support" + compile fix patch + XICS migration fix patch. Migration from XICS to XICS-KVM and vice versa works. In this series, XICS-KVM inherits from XICS. I do not really see the point of adding one more XICS-c

Re: [Qemu-devel] [PATCH] [RFC] aio/async: Add timed bottom-halves

2013-07-16 Thread Stefan Hajnoczi
On Tue, Jul 16, 2013 at 10:24:38PM +0100, Alex Bligh wrote: > --On 16 July 2013 18:55:15 +0200 Paolo Bonzini wrote: > > >>What do you think? In the end I thought the schedule_bh_at stuff > >>was simpler. > > > >It is simpler, but I'm not sure it is the right API. Of course, if > >Kevin and Stefa

Re: [Qemu-devel] [PATCH 2/3] memory: actually set the owner

2013-07-16 Thread Hu Tao
On Tue, Jul 16, 2013 at 05:31:01PM +0200, Paolo Bonzini wrote: > Brown paper bag for me. Commit 2c9b15c added a line setting mr->owner, > but there was already one that initialized it to NULL (added in the > earlier commit 803c0816). What I read from log is the reverse, Commit 2c9b15c added a lin

Re: [Qemu-devel] [PATCH 02/12] trace+libvirt: start trace processing thread in final child process

2013-07-16 Thread Stefan Hajnoczi
On Tue, Jul 16, 2013 at 02:17:28PM +0200, Michael Mueller wrote: > On Tue, 16 Jul 2013 11:05:11 +0800 > Stefan Hajnoczi wrote: > > > On Mon, Jul 15, 2013 at 09:41:19PM +0200, Christian Borntraeger wrote: > > > When running with trace backend e.g. "simple" the writer thread > > > needs to be imple

Re: [Qemu-devel] [PATCH] dataplane: sync virtio.c and vring.c virtqueue state

2013-07-16 Thread Stefan Hajnoczi
On Mon, Jul 01, 2013 at 01:29:17PM +0200, Stefan Hajnoczi wrote: > Load the virtio.c state into vring.c when we start dataplane mode and > vice versa when stopping dataplane mode. This patch makes it possible > to start and stop dataplane any time while the guest is running. > > This will eventua

Re: [Qemu-devel] [PATCH v2 0/2] pkg-config and discard support for gluster driver

2013-07-16 Thread Stefan Hajnoczi
On Tue, Jul 16, 2013 at 09:47:40PM +0530, Bharata B Rao wrote: > Hi, > > This is the v2 of the patchset that changes gluster driver in QEMU > to use pkg-config and adds discard support. > > Changes in v2 > - > - Ensure that gluster libraries don't get linked to linux-user targets. >

Re: [Qemu-devel] [PATCH] memory: Return -1 again on reads from unsigned regions

2013-07-16 Thread Stefan Hajnoczi
On Tue, Jul 16, 2013 at 02:45:16PM +0200, Jan Kiszka wrote: > This restore the behavior prior to b018ddf633 which accidentally changed > the return code to 0. Specifically guests probing for register existence > were affected by this. > > Signed-off-by: Jan Kiszka > --- > memory.c |2 +- > 1

Re: [Qemu-devel] [PATCH 3/4] target-openrisc: Free typename

2013-07-16 Thread Jia Liu
Hi Andreas, On Tue, Jul 16, 2013 at 10:19 PM, Andreas Färber wrote: > Am 16.07.2013 04:00, schrieb Jia Liu: >> We should free typename here. >> >> Signed-off-by: Jia Liu >> --- >> target-openrisc/cpu.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/target-openrisc/cpu.c b/target-op

Re: [Qemu-devel] [PATCH v3 2/8] arm/boot: Use qemu_devtree_setprop_sized_cells()

2013-07-16 Thread Peter Crosthwaite
Hi Peter, On Wed, Jul 17, 2013 at 12:43 AM, Peter Maydell wrote: > On 16 July 2013 15:31, Peter Crosthwaite wrote: >> Hi Peter, >> >> On Tue, Jul 16, 2013 at 10:25 PM, Peter Maydell >> wrote: >>> Replace the opencoded assembly of the reg property array for the >>> /memory node with a call to qe

Re: [Qemu-devel] [Qemu-trivial] [PATCH] block/m25p80: Update Micron entries

2013-07-16 Thread Peter Crosthwaite
Sorry about the delay, Ack. We arent getting the long term fix to this soon, so lets apply the patch. Regards, Peter On Wed, Jul 17, 2013 at 3:56 AM, Michael Tokarev wrote: > Ping^3 ? > > 28.06.2013 14:37, Michael Tokarev wrote: >> 10.06.2013 19:40, Michael Tokarev wrote: >>> 07.06.2013 07:51,

Re: [Qemu-devel] [Qemu-ppc] [PATCH] ppc kvm: fix to compile

2013-07-16 Thread Alexey Kardashevskiy
On 07/17/2013 09:13 AM, Alexander Graf wrote: > > On 17.07.2013, at 01:12, Alexander Graf wrote: > >> >> On 16.07.2013, at 12:00, Alexey Kardashevskiy wrote: >> >>> Signed-off-by: Alexey Kardashevskiy >> >> Why? sPAPRTCE is a typedef struct that's defined in include/hw/ppc/spapr.h >> which is i

Re: [Qemu-devel] [Qemu-ppc] [PATCH] ppc kvm: fix to compile

2013-07-16 Thread Alexander Graf
On 17.07.2013, at 01:12, Alexander Graf wrote: > > On 16.07.2013, at 12:00, Alexey Kardashevskiy wrote: > >> Signed-off-by: Alexey Kardashevskiy > > Why? sPAPRTCE is a typedef struct that's defined in include/hw/ppc/spapr.h > which is included from target-ppc/kvm.c. So it should work just fi

Re: [Qemu-devel] [PATCH] ppc kvm: fix to compile

2013-07-16 Thread Alexander Graf
On 16.07.2013, at 12:00, Alexey Kardashevskiy wrote: > Signed-off-by: Alexey Kardashevskiy Why? sPAPRTCE is a typedef struct that's defined in include/hw/ppc/spapr.h which is included from target-ppc/kvm.c. So it should work just fine. Alex > --- > target-ppc/kvm.c | 4 ++-- > 1 file changed

Re: [Qemu-devel] [RFC V8 01/24] qcow2: Add journal specification.

2013-07-16 Thread Benoît Canet
> > Simple is good. Even for deduplication alone, I think data integrity is > > critical - otherwise we risk stale dedup metadata pointing to clusters > > that are unallocated or do not contain the right data. So the journal > > will probably need to follow techniques for commits/checksums. > I'

Re: [Qemu-devel] [PATCH] [RFC] aio/async: Add timed bottom-halves

2013-07-16 Thread Alex Bligh
Paolo, --On 16 July 2013 18:55:15 +0200 Paolo Bonzini wrote: What do you think? In the end I thought the schedule_bh_at stuff was simpler. It is simpler, but I'm not sure it is the right API. Of course, if Kevin and Stefan says it is, I have no problem with that. For the sake of having so

[Qemu-devel] [PATCHv3] [RFC] aio/async: Add timed bottom-halves

2013-07-16 Thread Alex Bligh
Add timed bottom halves. A timed bottom half is a bottom half that will not execute until a given time has passed (qemu_bh_schedule_at) or a given interval has passed (qemu_bh_schedule_in). Any qemu clock can be used, and times are specified in nanoseconds. Timed bottom halves can be used where ti

Re: [Qemu-devel] [PATCH 1/2] char: io_channel_send: don't lose written bytes

2013-07-16 Thread Anthony Liguori
Laszlo Ersek writes: > On 07/16/13 20:57, Anthony Liguori wrote: >> Laszlo Ersek writes: >> >>> The g_io_channel_write_chars() documentation states, >>> >>> bytes_written: The number of bytes written. This can be nonzero even if >>> the return value is not G_IO_STATUS_NORMAL.

Re: [Qemu-devel] [PATCH] fix guest physical bits to match host, to go beyond 1TB guests

2013-07-16 Thread Eduardo Habkost
On Tue, Jul 16, 2013 at 09:24:30PM +0200, Paolo Bonzini wrote: > Il 16/07/2013 20:11, Eduardo Habkost ha scritto: > > For physical bit size, what about extending it in a backwards-compatible > > way? Something like this: > > > > *eax = 0x0003000; /* 48 bits virtual */ > > if (ram_size < 1T

Re: [Qemu-devel] [PATCH 1/2] char: io_channel_send: don't lose written bytes

2013-07-16 Thread Laszlo Ersek
On 07/16/13 20:57, Anthony Liguori wrote: > Laszlo Ersek writes: > >> The g_io_channel_write_chars() documentation states, >> >> bytes_written: The number of bytes written. This can be nonzero even if >> the return value is not G_IO_STATUS_NORMAL. [...] >> >> io_channel_send()

Re: [Qemu-devel] [PATCH] fix guest physical bits to match host, to go beyond 1TB guests

2013-07-16 Thread Paolo Bonzini
Il 16/07/2013 20:11, Eduardo Habkost ha scritto: > For physical bit size, what about extending it in a backwards-compatible > way? Something like this: > > *eax = 0x0003000; /* 48 bits virtual */ > if (ram_size < 1TB) { > physical_size = 40; /* Keeping backwards compatibility */ >

Re: [Qemu-devel] [PATCH 2/2] seccomp: removing unused syscalls gtom whitelist

2013-07-16 Thread Paolo Bonzini
Il 16/07/2013 20:55, Eduardo Otubo ha scritto: Xen uses getrlimit, not sure what this one is. Perhaps glibc's wrapper calls it? >>> >>> It seems to be a glibc's wrapper, yes. Removing it anyway. >> >> Why if Xen uses it? > > I'm doing virt-test runs since yesterday, it seems it doe

Re: [Qemu-devel] [PATCH 1/2] char: io_channel_send: don't lose written bytes

2013-07-16 Thread Anthony Liguori
Laszlo Ersek writes: > The g_io_channel_write_chars() documentation states, > > bytes_written: The number of bytes written. This can be nonzero even if > the return value is not G_IO_STATUS_NORMAL. [...] > > io_channel_send() could lose such bytes before. > > Furthermore, the (

Re: [Qemu-devel] [PATCH v3 08/13] linux-user: Enable NPTL for m68k

2013-07-16 Thread Laurent Vivier
Le 16/07/2013 19:44, Peter Maydell a écrit : For m68k, per-thread data is a purely kernel construct with no CPU level support. Implement it via a field in the TaskState structure, used by cpu_set_tls() and the set_thread_area/get_thread_area syscalls. This allows us to enable compilation with NPT

Re: [Qemu-devel] [PATCH 2/2] monitor: maintain at most one G_IO_OUT watch

2013-07-16 Thread Anthony Liguori
Laszlo Ersek writes: > When monitor_flush() is invoked repeatedly outside the monitor_unblocked() > callback, for example from tlb_info() -> ... -> print_pte(), several > watches may be added for the same event. > > This is no problem per se because the extra monitor_unblocked() callbacks > are h

Re: [Qemu-devel] [PATCH 2/2] seccomp: removing unused syscalls gtom whitelist

2013-07-16 Thread Eduardo Otubo
On 07/16/2013 02:49 PM, Paolo Bonzini wrote: Il 16/07/2013 19:45, Eduardo Otubo ha scritto: -{ SCMP_SYS(ugetrlimit), 241 }, Xen uses getrlimit, not sure what this one is. Perhaps glibc's wrapper calls it? It seems to be a glibc's wrapper, yes. Removing it anyway. Why if Xen uses it

[Qemu-devel] [PATCH v3 04/13] configure: Enable threading for unicore32-linux-user

2013-07-16 Thread Peter Maydell
unicore32-linux-user provides cpu_set_tls(), so the failure to enable target_nptl was presumably an oversight. Enable it. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- configure |1 - 1 file changed, 1 deletion(-) diff --git a/configure b/configure index 84bcbdc..4a241e0

Re: [Qemu-devel] [PATCH v3 13/13] configure: Make NPTL non-optional

2013-07-16 Thread Richard Henderson
On 07/16/2013 10:45 AM, Peter Maydell wrote: > Now all linux-user targets support building with NPTL, we can make it > mandatory. This is a good idea because: > * NPTL is no longer new and experimental; it is completely standard > * in practice, linux-user without NPTL is nearly useless for >

Re: [Qemu-devel] [PATCH v3 11/13] linux-user: Add i386 TLS setter

2013-07-16 Thread Richard Henderson
On 07/16/2013 10:44 AM, Peter Maydell wrote: > From: Alexander Graf > > We can easily set the TLS on i386. Add code to do so. > > Signed-off-by: Alexander Graf > [PMM: also remove "target_nptl=no" line from configure, for > consistency with other patches in this series] > Signed-off-by: Peter

Re: [Qemu-devel] [PATCH v3 09/13] linux-user: Add missing 'break' in i386 get_thread_area syscall

2013-07-16 Thread Richard Henderson
On 07/16/2013 10:44 AM, Peter Maydell wrote: > The i386 code for the get_thread_area syscall was missing a > 'break' which meant it would have fallen through into the > implementation of the following syscall; add it. > > Signed-off-by: Peter Maydell > --- > linux-user/syscall.c |1 + > 1 fi

Re: [Qemu-devel] [PATCH V1 1/2] Implement sync modes for drive-backup.

2013-07-16 Thread Ian Main
On Mon, Jul 15, 2013 at 10:47:25PM +0200, Paolo Bonzini wrote: > Il 15/07/2013 19:49, Ian Main ha scritto: > > OK well, I'll explain here my understanding. I apologize if I explain > > more than needed but it might be good to get this out there anyway. > > No problem, it's better to be verbose th

[Qemu-devel] [PATCH 1/2] char: io_channel_send: don't lose written bytes

2013-07-16 Thread Laszlo Ersek
The g_io_channel_write_chars() documentation states, bytes_written: The number of bytes written. This can be nonzero even if the return value is not G_IO_STATUS_NORMAL. [...] io_channel_send() could lose such bytes before. Furthermore, the (status == G_IO_STATUS_EOF) condition

[Qemu-devel] [PATCH 2/2] monitor: maintain at most one G_IO_OUT watch

2013-07-16 Thread Laszlo Ersek
When monitor_flush() is invoked repeatedly outside the monitor_unblocked() callback, for example from tlb_info() -> ... -> print_pte(), several watches may be added for the same event. This is no problem per se because the extra monitor_unblocked() callbacks are harmless if mon->outbuf is empty, t

[Qemu-devel] [PATCH 0/2] changes related to monitor flow control

2013-07-16 Thread Laszlo Ersek
When the IO thread calls monitor_flush() repeatedly & quickly in succession, outside of callback context, many redundant G_IO_OUT watches are installed. (One such caller is the "info tlb" / tlb_info() HMP command which produces a lot of monitor output.) While this redundancy is no problem in itsel

[Qemu-devel] [PATCH v3 13/13] configure: Make NPTL non-optional

2013-07-16 Thread Peter Maydell
Now all linux-user targets support building with NPTL, we can make it mandatory. This is a good idea because: * NPTL is no longer new and experimental; it is completely standard * in practice, linux-user without NPTL is nearly useless for binaries built against non-ancient glibc * it allows u

Re: [Qemu-devel] [PATCH] fix guest physical bits to match host, to go beyond 1TB guests

2013-07-16 Thread Eduardo Habkost
On Tue, Jul 16, 2013 at 07:46:14PM +0200, Paolo Bonzini wrote: > Il 16/07/2013 19:38, Eduardo Habkost ha scritto: > > On Tue, Jul 16, 2013 at 07:22:01PM +0200, Andrea Arcangeli wrote: > >> Without this patch the guest physical bits are advertised as 40, not > >> 44 or more depending on the hardware

[Qemu-devel] [PATCHv2 2/2] seccomp: removing unused syscalls from whitelist

2013-07-16 Thread Eduardo Otubo
Signed-off-by: Eduardo Otubo --- qemu-seccomp.c |6 -- 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/qemu-seccomp.c b/qemu-seccomp.c index 1d5fd71..c44f0d8 100644 --- a/qemu-seccomp.c +++ b/qemu-seccomp.c @@ -108,7 +108,6 @@ static const struct QemuSeccompSyscall seccomp_

[Qemu-devel] [PATCHv2 1/2] seccomp: no need to check arch in syscall whitelist

2013-07-16 Thread Eduardo Otubo
v2 update: - set libseccomp 2.1.0 as requirement on configure script. Since libseccomp 2.0 there's no need to check the architecture type anymore. Signed-off-by: Eduardo Otubo --- configure |2 +- qemu-seccomp.c | 13 - 2 files changed, 1 insertions(+), 14 deletions(-) d

Re: [Qemu-devel] [PATCH 2/2] seccomp: removing unused syscalls gtom whitelist

2013-07-16 Thread Paolo Bonzini
Il 16/07/2013 19:45, Eduardo Otubo ha scritto: >>> >>> -{ SCMP_SYS(ugetrlimit), 241 }, >> >> Xen uses getrlimit, not sure what this one is. Perhaps glibc's wrapper >> calls it? > > It seems to be a glibc's wrapper, yes. Removing it anyway. Why if Xen uses it? Paolo

[Qemu-devel] seccomp: remove unused syscalls - for 1.6

2013-07-16 Thread Eduardo Otubo
Hello all, In this small patch series I basically: v2 update: - set libseccomp 2.1.0 as requirement on configure script. - removed setrlimit and added sendfile64 to the whitelist. 1) Remove the ifdef's for the (not so) new libseccomp version that does a best effort and translate

Re: [Qemu-devel] [PATCH] fix guest physical bits to match host, to go beyond 1TB guests

2013-07-16 Thread Andrea Arcangeli
-On Tue, Jul 16, 2013 at 07:48:27PM +0200, Paolo Bonzini wrote: > Il 16/07/2013 19:46, Paolo Bonzini ha scritto: > >>> >> (see PUD with bit >=40 set) > >> > > >> > I am not sure I understand what caused this: if we are advertising 40 > >> > physical bits to the guest, why are we ending up with a P

[Qemu-devel] [PATCH v3 09/13] linux-user: Add missing 'break' in i386 get_thread_area syscall

2013-07-16 Thread Peter Maydell
The i386 code for the get_thread_area syscall was missing a 'break' which meant it would have fallen through into the implementation of the following syscall; add it. Signed-off-by: Peter Maydell --- linux-user/syscall.c |1 + 1 file changed, 1 insertion(+) diff --git a/linux-user/syscall.c

[Qemu-devel] [PATCH v3 07/13] linux-user: Enable NPTL for SPARC targets

2013-07-16 Thread Peter Maydell
Provide the missing cpu_set_tls(), and resolve the FIXME in cpu_clone_regs() by clearing the carry flag for the child. This allows us to turn on building with NPTL for SPARC. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- configure |3 --- linux-user/spa

[Qemu-devel] [PATCH v3 02/13] configure: Don't say target_nptl="no" if there is no linux-user target

2013-07-16 Thread Peter Maydell
For architectures with no linux-user target, don't claim no NPTL support. This has no behavioural change, but it means that we won't accidentally add a new linux-user target without threading support in future (because attempting to do so would be a compile failure rather than a silent lack of supp

Re: [Qemu-devel] [Qemu-trivial] [PATCH] linux-user: declare sys_futex to have 6 arguments

2013-07-16 Thread Michael Tokarev
15.07.2013 17:17, Petar Jovanovic wrote: > From: Petar Jovanovic > > sys_futex has 6 arguments, and all of these need to be copied. Fix incorrect > declaration in the mips_syscall_args array. Thanks, applied to the trivial patches queue. /mjt

Re: [Qemu-devel] [PATCH 2/2] seccomp: removing unused syscalls gtom whitelist

2013-07-16 Thread Eduardo Otubo
On 07/15/2013 05:57 PM, Paolo Bonzini wrote: Il 15/07/2013 19:29, Eduardo Otubo ha scritto: Signed-off-by: Eduardo Otubo --- qemu-seccomp.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/qemu-seccomp.c b/qemu-seccomp.c index 1d5fd71..bfd372a 100644 --- a/qemu-seccomp.c +++ b/qemu

Re: [Qemu-devel] [Qemu-trivial] [PATCH] block/m25p80: Update Micron entries

2013-07-16 Thread Michael Tokarev
Ping^3 ? 28.06.2013 14:37, Michael Tokarev wrote: > 10.06.2013 19:40, Michael Tokarev wrote: >> 07.06.2013 07:51, Peter Crosthwaite wrote: >> [] >>> Id like to give it a few days to see what they say before we merge >>> this. Ideally we have agreement between the two source trees, so we >>> can co

[Qemu-devel] [PATCH v3 10/13] linux-user: Clean up handling of clone() argument order

2013-07-16 Thread Peter Maydell
Linux manages to have three separate orderings of the arguments to the clone() syscall on different architectures. In the kernel these are selected via CONFIG_CLONE_BACKWARDS and CONFIG_CLONE_BACKWARDS2. Clean up our implementation of this to use similar #define names rather than a TARGET_* ifdef l

[Qemu-devel] [PATCH v3 08/13] linux-user: Enable NPTL for m68k

2013-07-16 Thread Peter Maydell
For m68k, per-thread data is a purely kernel construct with no CPU level support. Implement it via a field in the TaskState structure, used by cpu_set_tls() and the set_thread_area/get_thread_area syscalls. This allows us to enable compilation with NPTL. Signed-off-by: Peter Maydell --- configur

Re: [Qemu-devel] [Qemu-trivial] [PATCH] Fix command example in qemu.sasl

2013-07-16 Thread Michael Tokarev
09.07.2013 18:07, Cole Robinson wrote: > sasldblistusers2 doesn't have a '-a' option Thanks, applied to the trivial pathes queue. /mjt

[Qemu-devel] [PATCH v3 11/13] linux-user: Add i386 TLS setter

2013-07-16 Thread Peter Maydell
From: Alexander Graf We can easily set the TLS on i386. Add code to do so. Signed-off-by: Alexander Graf [PMM: also remove "target_nptl=no" line from configure, for consistency with other patches in this series] Signed-off-by: Peter Maydell --- configure|1 - linux-us

Re: [Qemu-devel] [PATCH v3 03/13] configure: Enable threading on all ppc and mips linux-user targets

2013-07-16 Thread Richard Henderson
On 07/16/2013 10:44 AM, Peter Maydell wrote: > Add x86-64 implementation of cpu_set_tls() (like the kernel, we > just have to call do_arch_prctl() to set FS); this allows us to > enable NPTL. > > Signed-off-by: Peter Maydell > --- > configure|1 - > linux-user/i386/target

[Qemu-devel] [PATCH v3 00/13] linux-user: enable NPTL on everything

2013-07-16 Thread Peter Maydell
This patchset enables NPTL on all linux-user targets; this is a change for i386, m68k, mipsn32, mipsn32el, mips64, mips64el, or32, ppc64, ppc46abi32, sparc, sparc32plus, sparc64, unicore32 and x86_64 (but not plain ppc or plain mips). Testing: I've tested with a chroot that or32 and sparc32plus wo

[Qemu-devel] [PATCH v3 05/13] linux-user: Move includes of target-specific headers to end of qemu.h

2013-07-16 Thread Peter Maydell
The target-specific headers (target_cpu.h and target_signal.h) might need to use the target-independent structure and function definitions of qemu.h; so include them only at the bottom of qemu.h, not the top. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- linux-user/qemu.h |

[Qemu-devel] [PATCH v3 01/13] configure: Flip default of target_nptl

2013-07-16 Thread Peter Maydell
Most targets either (a) support threading or (b) don't have a linux-user/bsd-user target, so make it default to 'yes', with those targets that don't support threading having to specifically say so. This is a mechanical no-behaviour-change commit; some of the "no" entries it adds will be taken out

Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/2] Add Enhanced Three-Speed Ethernet Controller (eTSEC)

2013-07-16 Thread Scott Wood
On 07/16/2013 10:28:28 AM, Fabien Chouteau wrote: On 07/16/2013 04:06 AM, Scott Wood wrote: > On 07/10/2013 12:10:02 PM, Fabien Chouteau wrote: >> This implementation doesn't include ring priority, TCP/IP Off-Load, QoS. >> >> Signed-off-by: Fabien Chouteau > > From the code comments I gather

[Qemu-devel] [PATCH v3 06/13] linux-user: Enable NPTL for OpenRISC

2013-07-16 Thread Peter Maydell
The OpenRISC kernel ignores CLONE_SETTLS in its copy_thread() implementation, so a cpu_set_tls() implementation is a no-op. cpu_clone_regs() was setting the syscall return value in the wrong register -- it is gpr[11], not gpr[2]. With these two things fixed, we can compile with NPTL enabled. Signe

[Qemu-devel] [PATCH v3 03/13] configure: Enable threading on all ppc and mips linux-user targets

2013-07-16 Thread Peter Maydell
Though threading (target_nptl) was enabled on the base PPC and MIPS targets, it wasn't enabled for the variants mipsn32, mipsn32el, mips64, mips64el, ppc64 or ppc46abi32 (probably an oversight). Enable threading consistently on all these targets. Signed-off-by: Peter Maydell Reviewed-by: Richard

Re: [Qemu-devel] [PATCH] fix guest physical bits to match host, to go beyond 1TB guests

2013-07-16 Thread Paolo Bonzini
Il 16/07/2013 19:46, Paolo Bonzini ha scritto: >>> >> (see PUD with bit >=40 set) >> > >> > I am not sure I understand what caused this: if we are advertising 40 >> > physical bits to the guest, why are we ending up with a PUD with >> > bit >= 40 set? > Because we create a guest that has bigger me

Re: [Qemu-devel] [PATCH 1/2] seccomp: no need to check arch in syscall whitelist

2013-07-16 Thread Eduardo Otubo
On 07/15/2013 03:55 PM, Paul Moore wrote: On Monday, July 15, 2013 02:29:37 PM Eduardo Otubo wrote: Since libseccomp 2.0 there's no need to check the architecture type anymore. Signed-off-by: Eduardo Otubo --- qemu-seccomp.c | 13 - 1 file changed, 13 deletions(-) Good, this

Re: [Qemu-devel] [PATCH] fix guest physical bits to match host, to go beyond 1TB guests

2013-07-16 Thread Paolo Bonzini
Il 16/07/2013 19:38, Eduardo Habkost ha scritto: > On Tue, Jul 16, 2013 at 07:22:01PM +0200, Andrea Arcangeli wrote: >> Without this patch the guest physical bits are advertised as 40, not >> 44 or more depending on the hardware capability of the host. >> >> That leads to guest kernel crashes with

[Qemu-devel] [PATCH v3 12/13] linux-user: Enable NPTL for x86-64

2013-07-16 Thread Peter Maydell
Add x86-64 implementation of cpu_set_tls() (like the kernel, we just have to call do_arch_prctl() to set FS); this allows us to enable NPTL. Signed-off-by: Peter Maydell --- configure|1 - linux-user/i386/target_cpu.h |7 +++ linux-user/syscall.c |2 +-

Re: [Qemu-devel] [PATCH] fix guest physical bits to match host, to go beyond 1TB guests

2013-07-16 Thread Eduardo Habkost
On Tue, Jul 16, 2013 at 07:22:01PM +0200, Andrea Arcangeli wrote: > Without this patch the guest physical bits are advertised as 40, not > 44 or more depending on the hardware capability of the host. > > That leads to guest kernel crashes with injection of page faults 9 > (see oops: 0009) as bits

[Qemu-devel] [PATCH v2 03/17] cow: do not call bdrv_co_is_allocated

2013-07-16 Thread Paolo Bonzini
As we change bdrv_is_allocated to gather more information from bs and bs->file, it will become a bit slower. It is still appropriate for online jobs, but not for reads/writes. Call the internal function instead. Signed-off-by: Paolo Bonzini --- block/cow.c | 5 - 1 file changed, 4 insertio

[Qemu-devel] [PATCH v2 08/17] block: make bdrv_has_zero_init return false for copy-on-write-images

2013-07-16 Thread Paolo Bonzini
This helps implementing is_allocated on top of get_block_status. Signed-off-by: Paolo Bonzini --- block.c| 5 + qemu-img.c | 9 + 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/block.c b/block.c index ae87cba..0fb409b 100644 --- a/block.c +++ b/block.c @@ -2934,6

[Qemu-devel] [PATCH v2 02/17] cow: make writes go at a less indecent speed

2013-07-16 Thread Paolo Bonzini
Only sync once per write, rather than once per sector. Signed-off-by: Paolo Bonzini --- block/cow.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/block/cow.c b/block/cow.c index fa3d41f..304e4c7 100644 --- a/block/cow.c +++ b/block/cow.c @@ -106,7 +106,

Re: [Qemu-devel] [PATCH] fix guest physical bits to match host, to go beyond 1TB guests

2013-07-16 Thread Paolo Bonzini
Il 16/07/2013 19:22, Andrea Arcangeli ha scritto: > Without this patch the guest physical bits are advertised as 40, not > 44 or more depending on the hardware capability of the host. > > That leads to guest kernel crashes with injection of page faults 9 > (see oops: 0009) as bits above 40 in the

[Qemu-devel] [PATCH v3 resend 1/8] rdma: update documentation to reflect new unpin support

2013-07-16 Thread mrhines
From: "Michael R. Hines" As requested, the protocol now includes memory unpinning support. This has been implemented in a non-optimized manner, in such a way that one could devise an LRU or other workload-specific information on top of the basic mechanism to influence the way unpinning happens du

[Qemu-devel] [PATCH] fix guest physical bits to match host, to go beyond 1TB guests

2013-07-16 Thread Andrea Arcangeli
Without this patch the guest physical bits are advertised as 40, not 44 or more depending on the hardware capability of the host. That leads to guest kernel crashes with injection of page faults 9 (see oops: 0009) as bits above 40 in the guest pagetables are considered reserved. exregion-0206 [32

[Qemu-devel] [PATCH v2 15/17] raw-posix: detect XFS unwritten extents

2013-07-16 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- block/raw-posix.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/raw-posix.c b/block/raw-posix.c index d011cfd..1b41ea3 100644 --- a/block/raw-posix.c +++ b/block/raw-posix.c @@ -1128,6 +1128,9 @@ static int64_t coroutine_fn raw_co_get_block_status(

[Qemu-devel] [PATCH v3 resend 5/8] rdma: send pc.ram

2013-07-16 Thread mrhines
From: "Michael R. Hines" This takes advantages of the previous patches: 1. use the new QEMUFileOps hook 'save_page' 2. call out to the right accessor methods to invoke the iteration hooks defined in QEMUFileOps Reviewed-by: Paolo Bonzini Reviewed-by: Chegu Vinod Tested-by: Chegu Vinod Te

Re: [Qemu-devel] [PATCH v3 11/14] ioport: Switch dispatching to memory core layer

2013-07-16 Thread Paolo Bonzini
Il 16/07/2013 18:59, Hervé Poussineau ha scritto: > Paolo Bonzini a écrit : >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> Il 16/07/2013 09:18, Jan Kiszka ha scritto: >>> Sorry for sending out invitations and then being late to this party >>> - vacation. What is the status now? Do we hav

[Qemu-devel] [PATCH v2 04/17] block: make bdrv_co_is_allocated static

2013-07-16 Thread Paolo Bonzini
bdrv_is_allocated can detect coroutine context and go through a fast path, similar to other block layer functions. Signed-off-by: Paolo Bonzini --- block.c | 24 +++- block/raw.c | 2 +- block/stream.c| 4 ++-- include/block/block.h | 2 --

[Qemu-devel] [PATCH v2 13/17] block: use bdrv_has_zero_init to return BDRV_BLOCK_ZERO

2013-07-16 Thread Paolo Bonzini
Alternatively, this could use a "discard zeroes data" flag returned by bdrv_get_info. Signed-off-by: Paolo Bonzini --- block.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c index 7ff0716..0c867b8 100644 --- a/block.c +++ b/block.c @@ -2977,6 +2977,7

[Qemu-devel] [PATCH v3 resend 2/8] rdma: bugfix: ram_control_save_page()

2013-07-16 Thread mrhines
From: "Michael R. Hines" We were not checking for a valid 'bytes_sent' pointer before accessing it. Reviewed-by: Eric Blake Signed-off-by: Michael R. Hines --- savevm.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/savevm.c b/savevm.c index e0491e7..03fc4d9 100644 ---

Re: [Qemu-devel] [PATCH v3 11/14] ioport: Switch dispatching to memory core layer

2013-07-16 Thread Hervé Poussineau
Paolo Bonzini a écrit : -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Il 16/07/2013 09:18, Jan Kiszka ha scritto: Sorry for sending out invitations and then being late to this party - vacation. What is the status now? Do we have a short-term plan to avoid the regression or is this better solved

[Qemu-devel] [PATCH v3 resend 3/8] rdma: introduce ram_handle_compressed()

2013-07-16 Thread mrhines
From: "Michael R. Hines" This gives RDMA shared access to madvise() on the destination side when an entire chunk is found to be zero. Reviewed-by: Juan Quintela Reviewed-by: Paolo Bonzini Reviewed-by: Chegu Vinod Tested-by: Chegu Vinod Tested-by: Michael R. Hines Signed-off-by: Michael R. H

Re: [Qemu-devel] [PATCH v2 00/17] Add qemu-img subcommand to dump file metadata

2013-07-16 Thread Eric Blake
On 07/16/2013 10:29 AM, Paolo Bonzini wrote: > This series adds a subcommand to "map" that can dump file metadata. > Metadata that is dumped includes: > > - whether blocks are allocated in bs->file and, if so, where > > - whether blocks are zero > > - whether data is read from bs or bs->backing_

Re: [Qemu-devel] [PATCH v2 00/17] Add qemu-img subcommand to dump file metadata

2013-07-16 Thread Paolo Bonzini
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Il 16/07/2013 18:56, Eric Blake ha scritto: > On 07/16/2013 10:29 AM, Paolo Bonzini wrote: >> This series adds a subcommand to "map" that can dump file >> metadata. Metadata that is dumped includes: >> >> - whether blocks are allocated in bs->file and

[Qemu-devel] [PATCH v3 resend 6/8] rdma: allow state transitions between other states besides ACTIVE

2013-07-16 Thread mrhines
From: "Michael R. Hines" This patch is in preparation for the next ones: Until now the MIG_STATE_SETUP state was not really a 'formal' state. It has been used as a 'zero' state and QEMU has been unconditionally transitioning into this state when the QMP migrate command was called. In preparation

[Qemu-devel] [PATCH v3 resend 7/8] rdma: introduce MIG_STATE_NONE and change MIG_STATE_SETUP state transition

2013-07-16 Thread mrhines
From: "Michael R. Hines" As described in the previous patch, until now, the MIG_STATE_SETUP state was not really a 'formal' state. It has been used as a 'zero' state (what we're calling 'NONE' here) and QEMU has been unconditionally transitioning into this state when the QMP migration command was

Re: [Qemu-devel] [PATCH] [RFC] aio/async: Add timed bottom-halves

2013-07-16 Thread Paolo Bonzini
Il 16/07/2013 18:14, Alex Bligh ha scritto: > Paolo, > >>> 3. aio_poll calls aio_bh_poll. If this returns true, this indicates >>> at least one non-idle bh exists, which causes aio_poll not to >>> block. >> >> No, this indicates that at least one scheduled non-idle bh exist*ed*, >> which cause

Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/2] Add Enhanced Three-Speed Ethernet Controller (eTSEC)

2013-07-16 Thread Scott Wood
On 07/16/2013 11:15:51 AM, Fabien Chouteau wrote: On 07/16/2013 05:37 PM, Alexander Graf wrote: > On 07/16/2013 05:28 PM, Fabien Chouteau wrote: >> On 07/16/2013 04:06 AM, Scott Wood wrote: >>> On 07/10/2013 12:10:02 PM, Fabien Chouteau wrote: This implementation doesn't include ring priorit

[Qemu-devel] [PATCH v3 resend 0/8] rdma: core logic

2013-07-16 Thread mrhines
From: "Michael R. Hines" Changes since v2: - trivial bugfix - re-ran checkpatch Michael R. Hines (8): rdma: update documentation to reflect new unpin support rdma: bugfix: ram_control_save_page() rdma: introduce ram_handle_compressed() rdma: core logic rdma: send pc.ram rdma: allow s

[Qemu-devel] [PATCH v3 resend 8/8] rdma: account for the time spent in MIG_STATE_SETUP through QMP

2013-07-16 Thread mrhines
From: "Michael R. Hines" Using the previous patches, we're now able to timestamp the SETUP state. Once we have this time, let the user know about it in the schema. Reviewed-by: Juan Quintela Reviewed-by: Eric Blake Signed-off-by: Michael R. Hines --- hmp.c |4

[Qemu-devel] [PATCH v2 05/17] block: remove bdrv_is_allocated_above/bdrv_co_is_allocated_above distinction

2013-07-16 Thread Paolo Bonzini
Now that bdrv_is_allocated detects coroutine context, the two can use the same code. Signed-off-by: Paolo Bonzini --- block.c | 46 -- block/commit.c| 6 +++--- block/mirror.c| 4 ++-- block/stream.c| 4 ++-- in

[Qemu-devel] [PATCH v2 07/17] qemu-img: always probe the input image for allocated sectors

2013-07-16 Thread Paolo Bonzini
qemu-img convert is assuming "that sectors which are unallocated in the input image are present in both the output's and input's base images", but it is only doing this if the output image is zero initialized. And checking if the output image is zero initialized does not make much sense if the out

[Qemu-devel] [PATCH v2 14/17] raw-posix: return get_block_status data and flags

2013-07-16 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- block/raw-posix.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/block/raw-posix.c b/block/raw-posix.c index dbc65b0..d011cfd 100644 --- a/block/raw-posix.c +++ b/block/raw-posix.c @@ -1089,7 +1089,7 @@ static int64_t corout

[Qemu-devel] [PATCH v2 11/17] block: return get_block_status data and flags for formats

2013-07-16 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- v1->v2: handle extents that are stored in bs->file block/cow.c | 8 +++- block/qcow.c | 9 - block/qcow2.c| 16 ++-- block/qed.c | 35 --- block/sheepdog.c | 2 +- block/vdi.c

[Qemu-devel] [PATCH v2 12/17] qemu-img: add a "map" subcommand

2013-07-16 Thread Paolo Bonzini
This command dumps the metadata of an entire chain, in either tabular or JSON format. Signed-off-by: Paolo Bonzini --- v1->v2: mention encrypted clusters, use PRId64 qemu-img-cmds.hx | 6 ++ qemu-img.c | 185 +++ 2 files change

[Qemu-devel] [PATCH v2 10/17] block: define get_block_status return value

2013-07-16 Thread Paolo Bonzini
Define the return value of get_block_status. Bits 0, 1, 2 and 9-62 are valid; bit 63 (the sign bit) is reserved for errors. Bits 3-7 are left for future extensions. The return code is compatible with the old is_allocated API: returning just 0 or 1 (aka BDRV_BLOCK_DATA) will not cause any behavio

[Qemu-devel] [PATCH v2 09/17] block: introduce bdrv_get_block_status API

2013-07-16 Thread Paolo Bonzini
For now, bdrv_get_block_status is just another name for bdrv_is_allocated. The next patches will add more flags. This also touches all block drivers with a mostly mechanical rename. The sole exception is cow; because it calls cow_co_is_allocated from the read code, we keep that function and make

[Qemu-devel] [PATCH v2 06/17] block: expect errors from bdrv_co_is_allocated

2013-07-16 Thread Paolo Bonzini
Some bdrv_is_allocated callers do not expect errors, but the fallback in qcow2.c might make other callers trip on assertion failures or infinite loops. Fix the callers to always look for errors. Cc: qemu-sta...@nongnu.org Signed-off-by: Paolo Bonzini --- v1->v2: modify error message, add

[Qemu-devel] [PATCH v2 17/17] block: look for zero blocks in bs->file

2013-07-16 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- block.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c index 557ce29..2d7d71f 100644 --- a/block.c +++ b/block.c @@ -2977,7 +2977,7 @@ static int64_t coroutine_fn bdrv_co_get_block_status(BlockDriverState *bs,

[Qemu-devel] [PATCH v2 16/17] block: add default get_block_status implementation for protocols

2013-07-16 Thread Paolo Bonzini
Protocols return raw data, so you can assume the offsets to pass through unchanged. Signed-off-by: Paolo Bonzini --- block.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c index 0c867b8..557ce29 100644 --- a/block.c +++ b/block.c @@ -2991,7 +2991,11 @@

[Qemu-devel] [PATCH v2 01/17] cow: make reads go at a decent speed

2013-07-16 Thread Paolo Bonzini
Do not do two reads for each sector; load each sector of the bitmap and use bitmap operations to process it. Writes are still dog slow! Signed-off-by: Paolo Bonzini --- v1->v2: use BDRV_SECTOR_SIZE, not 512 for bitmap array length block/cow.c | 54 --

  1   2   3   >