Re: [Qemu-devel] hw/arm: add Lego NXT board

2014-07-15 Thread Paolo Bonzini
Il 15/07/2014 00:48, Peter Maydell ha scritto: > My interest is to fake sensor values for the guest and not to connect > anything to real hardware. I think I misinterpreted your "chardev". To > clarify: My guest is a bare metal ARM image, no linux and I don't want to > interact with the host's ha

Re: [Qemu-devel] Claiming virtual machine memory

2014-07-15 Thread Markus Armbruster
Alexei Fedotov writes: > Hello engineers, > > could you please help me locating the place in qemu (qemu-kvm) source > where the memory for virtual machine is requested from operating > system [1]. > > Thank you in advance. > > [1] http://www.linux-kvm.org/page/Memory Search exec.c for phys_mem_

Re: [Qemu-devel] [PATCH] target-i386: Allow execute from user mode when SMEP is enabled.

2014-07-15 Thread Paolo Bonzini
Il 14/07/2014 22:54, Ricky Zhou ha scritto: Previously, execute would be disabled for all pages with SMEP enabled, regardless of what mode the access took place in. Signed-off-by: Ricky Zhou --- target-i386/helper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target-i

Re: [Qemu-devel] Claiming virtual machine memory

2014-07-15 Thread Alexei Fedotov
Thanks, Markus! -- With best regards / с наилучшими пожеланиями, Alexei Fedotov / Алексей Федотов, http://dataved.ru/ +7 916 562 8095 [1] Start using Apache Openmeetings today, http://openmeetings.apache.org/ [2] Join Alexei Fedotov @linkedin, http://ru.linkedin.com/in/dataved/ [3] Join Alexei Fed

Re: [Qemu-devel] [PATCH] serial-pci: remove memory regions from BAR before destroying them

2014-07-15 Thread Gerd Hoffmann
On Mo, 2014-07-14 at 17:25 +0200, Markus Armbruster wrote: > Peter Crosthwaite writes: > > > On Thu, Jun 26, 2014 at 5:32 PM, Markus Armbruster > > wrote: > >> Paolo Bonzini writes: > >> > >>> Otherwise, hot-unplug of pci-serial-2x trips the assertion > >>> in memory_region_destroy: > >>> > >>

Re: [Qemu-devel] [PATCH] serial-pci: remove memory regions from BAR before destroying them

2014-07-15 Thread Paolo Bonzini
Il 15/07/2014 10:35, Gerd Hoffmann ha scritto: On Mo, 2014-07-14 at 17:25 +0200, Markus Armbruster wrote: Peter Crosthwaite writes: On Thu, Jun 26, 2014 at 5:32 PM, Markus Armbruster wrote: Paolo Bonzini writes: Otherwise, hot-unplug of pci-serial-2x trips the assertion in memory_region_

Re: [Qemu-devel] [PATCH] virtio-rng: Add human-readable error message for negative max-bytes parameter

2014-07-15 Thread Stefan Hajnoczi
On Tue, Jul 15, 2014 at 10:21:47AM +0530, Amit Shah wrote: > On (Mon) 14 Jul 2014 [19:14:43], John Snow wrote: > > If a negative integer is used for the max_bytes parameter, QEMU currently > > calls abort() and leaves behind a core dump. This patch adds a simple > > error message to make the reason

Re: [Qemu-devel] [PATCH] virtio-rng: Add human-readable error message for negative max-bytes parameter

2014-07-15 Thread Amit Shah
On (Tue) 15 Jul 2014 [11:18:31], Stefan Hajnoczi wrote: > On Tue, Jul 15, 2014 at 10:21:47AM +0530, Amit Shah wrote: > > On (Mon) 14 Jul 2014 [19:14:43], John Snow wrote: > > > If a negative integer is used for the max_bytes parameter, QEMU currently > > > calls abort() and leaves behind a core dum

[Qemu-devel] [PATCH for-2.1 1/1] virtio-serial-bus: keep port 0 reserved for virtconsole even on unplug

2014-07-15 Thread Amit Shah
We keep port 0 reserved for compat with older guests, where only virtio-console was expected. Even if a system is started without a virtio-console port, port #0 is kept aside. However, after a virtconsole port is unplugged, port id 0 became available, and the next hotplug of a virtserialport caus

Re: [Qemu-devel] [PATCH for-2.1 1/1] virtio-serial-bus: keep port 0 reserved for virtconsole even on unplug

2014-07-15 Thread Paolo Bonzini
Il 15/07/2014 11:23, Amit Shah ha scritto: i = port_id / 32; This can also be moved inside the if. Paolo -vser->ports_map[i] &= ~(1U << (port_id % 32)); +if (port_id) { +/* + * Don't mark port 0 removed -- we explicitly reserve it for + * backward compat

[Qemu-devel] [PATCH v2 for-2.1 1/1] virtio-serial-bus: keep port 0 reserved for virtconsole even on unplug

2014-07-15 Thread Amit Shah
We keep port 0 reserved for compat with older guests, where only virtio-console was expected. Even if a system is started without a virtio-console port, port #0 is kept aside. However, after a virtconsole port is unplugged, port id 0 became available, and the next hotplug of a virtserialport caus

Re: [Qemu-devel] [PATCH v2 for-2.1 1/1] virtio-serial-bus: keep port 0 reserved for virtconsole even on unplug

2014-07-15 Thread Paolo Bonzini
Il 15/07/2014 11:52, Amit Shah ha scritto: We keep port 0 reserved for compat with older guests, where only virtio-console was expected. Even if a system is started without a virtio-console port, port #0 is kept aside. However, after a virtconsole port is unplugged, port id 0 became available,

Re: [Qemu-devel] [PATCH v2 for-2.1 1/1] virtio-serial-bus: keep port 0 reserved for virtconsole even on unplug

2014-07-15 Thread Amit Shah
On (Tue) 15 Jul 2014 [15:22:23], Amit Shah wrote: > v2: > - move calculation of 'i' inside if stmt too (Paolo) > - re-word comment > +/* > + * Don't mark port 0 removed -- we explicitly reserve it for > + * backward compat with older guests, ensure a virtconsole device > + * unp

[Qemu-devel] [PATCH v3 for-2.1 1/1] virtio-serial-bus: keep port 0 reserved for virtconsole even on unplug

2014-07-15 Thread Amit Shah
We keep port 0 reserved for compat with older guests, where only virtio-console was expected. Even if a system is started without a virtio-console port, port #0 is kept aside. However, after a virtconsole port is unplugged, port id 0 became available, and the next hotplug of a virtserialport caus

Re: [Qemu-devel] hw/arm: add Lego NXT board

2014-07-15 Thread Paolo Bonzini
Il 15/07/2014 12:26, Alexander Graf ha scritto: Thanks for the idea. I still don't get why it should be better to fake an I2C device rather than a universal memory IO. Because this would not be fake, the idea was to emulate the actual sensor/actuator outside QEMU. Which makes sense for much m

[Qemu-devel] [PATCH] tcg: add ability to dump /tmp/perf-.map files

2014-07-15 Thread Alex Bennée
This allows the perf tool to map samples to each individual translation block. This could be expanded for user space but currently it gives enough information to find any hotblocks by other means. Signed-off-by: Alex Bennée --- v2: - hoist up into translate-all.c - don't use pointless glib

[Qemu-devel] [PATCH v2 1/3] trace: teach lttng backend to use format strings

2014-07-15 Thread Alex Bennée
This makes the UST backend pay attention to the format string arguments that are defined when defining payload data. With this you can now ensure integers are reported in hex mode if you want. Signed-off-by: Alex Bennée --- v2 - remove silly debug statements v3 - fix spelling - rebase to

[Qemu-devel] [PATCH v2 2/3] trace: add some tcg tracing support

2014-07-15 Thread Alex Bennée
This adds a couple of tcg specific trace-events which are useful for tracing execution though tcg generated blocks. It's been tested with lttng user space tracing but is generic enough for all systems. The tcg events are: * translate_block - when a subject block is translated * exec_tb - when

[Qemu-devel] [PATCH v2 3/3] trace: instrument and trace tcg tb flush activity

2014-07-15 Thread Alex Bennée
The tb_find_fast path is important to quickly moving from one block to the next. However we need to flush it when tlb changes occur so it's important to know how well we are doing with the cache. This patch adds some basic hit/miss profiling to the tb_find_fast tracepoint as well as a number of ot

[Qemu-devel] [PATCH v2 0/3] some TCG related trace patches

2014-07-15 Thread Alex Bennée
The first patch is simply a re-base of the tweaks I made to the lttng backend scripts to deal with additional format strings. The other two are from some basic instrumenting I've been doing to see where the time is going. Depending on workload it seems our tb_find_fast() path doesn't see many hits.

Re: [Qemu-devel] [PATCH v2] linux-user: make binfmt flag O require P

2014-07-15 Thread Alexander Graf
On 07/14/2014 11:37 PM, Joakim Tjernlund wrote: Joakim Tjernlund/Transmode wrote on 2014/07/14 23:04:51: Why do we need to modify argv[] here when we are building a target_argv[] further down anyway? Because parse_opts() will not do it for me and I cannot figure out how to modify parse_opts()

Re: [Qemu-devel] [PATCH v3 1/2] block/quorum: add simple read pattern support

2014-07-15 Thread Eric Blake
On 07/15/2014 12:34 AM, Liu Yuan wrote: > This patch adds single read pattern to quorum driver and quorum vote is > default > pattern. > > For now we do a quorum vote on all the reads, it is designed for unreliable > underlying storage such as non-redundant NFS to make sure data integrity at > t

Re: [Qemu-devel] [PATCH v2 06/15] target-tricore: Add instructions of SRC opcode format

2014-07-15 Thread Bastian Koppelmann
+tcg_gen_addi_tl(cpu_gpr_d[r1], cpu_gpr_d[r1], const4); Are you planning to come back to implement V and AV bits later? Would you recommend implementing this as a helper? It seems rather complex. Especially with half-word and byte arithmetic. On the other hand the instructions using t

Re: [Qemu-devel] [PATCH v2 3/3] trace: instrument and trace tcg tb flush activity

2014-07-15 Thread Andreas Färber
Hi, Am 15.07.2014 13:42, schrieb Alex Bennée: > The tb_find_fast path is important to quickly moving from one block to > the next. However we need to flush it when tlb changes occur so it's > important to know how well we are doing with the cache. > > This patch adds some basic hit/miss profiling

Re: [Qemu-devel] [PATCH v3 2/2] qapi: add read-pattern support for quorum

2014-07-15 Thread Eric Blake
On 07/15/2014 12:34 AM, Liu Yuan wrote: > Cc: Eric Blake > Signed-off-by: Liu Yuan > --- > qapi/block-core.json | 19 ++- > 1 file changed, 18 insertions(+), 1 deletion(-) > > diff --git a/qapi/block-core.json b/qapi/block-core.json > index e378653..22491bc 100644 > --- a/qapi/b

Re: [Qemu-devel] [PATCH v2 3/3] trace: instrument and trace tcg tb flush activity

2014-07-15 Thread Peter Maydell
On 15 July 2014 12:42, Alex Bennée wrote: > +#ifndef CONFIG_TRACE_NOP > +static inline void trace_inc_counter(int *counter) { > +int cnt = *counter; > +cnt++; > +*counter = cnt; > +} ...why isn't this just "*counter++;" ? -- PMM

Re: [Qemu-devel] [Xen-devel] [PATCH v2] libxl: change default QEMU machine to pc-i440fx-1.6

2014-07-15 Thread Don Slutz
On 07/11/14 11:08, Ian Campbell wrote: On Fri, 2014-07-11 at 15:54 +0100, Stefano Stabellini wrote: On Fri, 11 Jul 2014, Ian Campbell wrote: On Fri, 2014-07-11 at 12:14 +0100, Stefano Stabellini wrote: On Thu, 10 Jul 2014, Ian Jackson wrote: Stefano Stabellini writes ("Re: [PATCH v2] libxl:

Re: [Qemu-devel] [PATCH v2 3/3] trace: instrument and trace tcg tb flush activity

2014-07-15 Thread Peter Maydell
On 15 July 2014 13:23, Peter Maydell wrote: > On 15 July 2014 12:42, Alex Bennée wrote: >> +#ifndef CONFIG_TRACE_NOP >> +static inline void trace_inc_counter(int *counter) { >> +int cnt = *counter; >> +cnt++; >> +*counter = cnt; >> +} > > ...why isn't this just "*counter++;" ? Derp.

Re: [Qemu-devel] [PATCH v2 3/3] trace: instrument and trace tcg tb flush activity

2014-07-15 Thread Alex Bennée
Peter Maydell writes: > On 15 July 2014 12:42, Alex Bennée wrote: >> +#ifndef CONFIG_TRACE_NOP >> +static inline void trace_inc_counter(int *counter) { >> +int cnt = *counter; >> +cnt++; >> +*counter = cnt; >> +} > > ...why isn't this just "*counter++;" ? You of course mean: (

[Qemu-devel] [PATCH for-2.1] qtest: new test for wdt_ib700

2014-07-15 Thread Paolo Bonzini
Since the "pause" watchdog action had a regression and it went unnoticed for a while, let's add a test for it. Signed-off-by: Paolo Bonzini --- tests/Makefile | 2 + tests/wdt_ib700-test.c | 134 + 2 files changed, 136 insertions(+) crea

Re: [Qemu-devel] [PULL for-2.1 0/5] Serial + SCSI fixes for 2014-07-14

2014-07-15 Thread Peter Maydell
On 14 July 2014 16:49, Paolo Bonzini wrote: > The following changes since commit ab6d3749c4915cd5692633e321f7745dce06fe77: > > Merge remote-tracking branch 'remotes/kraxel/tags/pull-vga-20140711-1' into > staging (2014-07-11 17:50:38 +0100) > > are available in the git repository at: > > > gi

Re: [Qemu-devel] [PATCH v2 3/3] trace: instrument and trace tcg tb flush activity

2014-07-15 Thread Alex Bennée
Andreas Färber writes: > Hi, > > Am 15.07.2014 13:42, schrieb Alex Bennée: >> index df977c8..8376678 100644 >> --- a/include/qom/cpu.h >> +++ b/include/qom/cpu.h >> @@ -243,6 +243,10 @@ struct CPUState { >> void *env_ptr; /* CPUArchState */ >> struct TranslationBlock *current_tb; >>

Re: [Qemu-devel] [PATCH v2 3/3] trace: instrument and trace tcg tb flush activity

2014-07-15 Thread Paolo Bonzini
Il 15/07/2014 13:42, Alex Bennée ha scritto: +trace_inc_counter(&cpu->tb_jmp_cache_stats.misses); tb = tb_find_slow(env, pc, cs_base, flags); +} else { +trace_inc_counter(&cpu->tb_jmp_cache_stats.hits); } I think this is premature optimization... Paolo

Re: [Qemu-devel] [PATCH v2] linux-user: make binfmt flag O require P

2014-07-15 Thread Riku Voipio
On Mon, Jul 14, 2014 at 11:37:02PM +0200, Joakim Tjernlund wrote: > Joakim Tjernlund/Transmode wrote on 2014/07/14 23:04:51: > > > Why do we need to modify argv[] here when we are building a > > > target_argv[] further down anyway? > > > Because parse_opts() will not do it for me and I cannot figu

Re: [Qemu-devel] [PATCH v2] linux-user: make binfmt flag O require P

2014-07-15 Thread Alexander Graf
> Am 15.07.2014 um 15:20 schrieb Riku Voipio : > >> On Mon, Jul 14, 2014 at 11:37:02PM +0200, Joakim Tjernlund wrote: >> Joakim Tjernlund/Transmode wrote on 2014/07/14 23:04:51: Why do we need to modify argv[] here when we are building a target_argv[] further down anyway? >> >>> Becau

Re: [Qemu-devel] [PATCH] SIOCGIFINDEX: fix typo

2014-07-15 Thread Riku Voipio
On Fri, Jul 11, 2014 at 03:02:02AM +0200, Joakim Tjernlund wrote: > Wrong type was used in ioctl definition. Thanks, Applied to linux-user > Signed-off-by: Joakim Tjernlund > --- > > However, this does not fix my dhcp problem: > > jocke-ppc ~ # busybox udhcpc -v > Adapter index 24 > MAC fe:22:

Re: [Qemu-devel] [PATCH 3/4] alloca one extra byte sockets

2014-07-15 Thread Riku Voipio
On Fri, Jul 11, 2014 at 05:18:03PM +0200, Joakim Tjernlund wrote: > target_to_host_sockaddr() may increase the lenth with 1 byte > for AF_UNIX sockets so allocate 1 extra byte. Thanks, applied to linux-user tree > Signed-off-by: Joakim Tjernlund > --- > linux-user/syscall.c | 6 +++--- > 1 file

Re: [Qemu-devel] [PATCH 1/2 v3] qemu-user: Impl. setsockopt(SO_BINDTODEVICE)

2014-07-15 Thread Riku Voipio
On Sat, Jul 12, 2014 at 03:47:06PM +0200, Joakim Tjernlund wrote: > Signed-off-by: Joakim Tjernlund Thanks, applied to linux-user tree, Riku > --- > linux-user/syscall.c | 19 +++ > 1 file changed, 19 insertions(+) > > diff --git a/linux-user/syscall.c b/linux-user/syscall.c >

Re: [Qemu-devel] [PATCH 2/2 v3] linux-user: handle AF_PACKET sockaddrs in target_to_host_sockaddr

2014-07-15 Thread Riku Voipio
On Sat, Jul 12, 2014 at 03:47:07PM +0200, Joakim Tjernlund wrote: > Implement conversion of the AF_PACKET sockaddr subtype > in target_to_host_sockaddr. Thanks, Applied to linux-user tree, Riku > Signed-off-by: Joakim Tjernlund > --- > linux-user/syscall.c | 7 +++ > linux-user/sysca

Re: [Qemu-devel] [PATCH v2 06/10] linux-user/main.c: __kernel_cmpxchg set env->CF directly

2014-07-15 Thread Riku Voipio
On Thu, Jul 10, 2014 at 04:50:03PM +0100, Alex Bennée wrote: > As we only need to manipulate the single flag do it directly though env. Acked-by: Riku Voipio > Signed-off-by: Alex Bennée > > --- > > v2: > - remove unused cpsr > - the direct flag setting seems a little hacky? > > diff --g

Re: [Qemu-devel] [PATCH v2 04/10] target-arm: replace cpsr/xpsr/pstate_read calls

2014-07-15 Thread Riku Voipio
On Thu, Jul 10, 2014 at 04:50:01PM +0100, Alex Bennée wrote: > Use the unified save_state_to_spsr. I've also updated the interrupt > helpers to restore via the restore_state_from_spsr() functions. In the > aarch32 case this also needs to call switch_mode() to do the appropriate > fiddling. For the

Re: [Qemu-devel] [PATCH v2 05/10] arm/nwfps: replace cpsr_write with set_condition_codes

2014-07-15 Thread Riku Voipio
On Thu, Jul 10, 2014 at 04:50:02PM +0100, Alex Bennée wrote: > This is a pre-cursor to removing the cpsr_write function completely from > the code base. set_condition_codes() only affects the integer condition > flags. Acked-by: Riku Voipio > Signed-off-by: Alex Bennée > > --- > > v2 > - fix

Re: [Qemu-devel] [PATCH v2 07/10] target-arm: remove last users of cpsr_write

2014-07-15 Thread Riku Voipio
On Thu, Jul 10, 2014 at 04:50:04PM +0100, Alex Bennée wrote: > And use the new machinery to to save and restore program state. The old > cpsr_write function did some special handling for mode switches which > has been moved into the helper function. Again for the linux-user part, Acked-by: Riku V

Re: [Qemu-devel] [PATCH v2 08/10] target-arm: remove final users of pstate_write

2014-07-15 Thread Riku Voipio
On Thu, Jul 10, 2014 at 04:50:05PM +0100, Alex Bennée wrote: > This converts all users of pstate_write to use the common state > save/restore functionality. Acked-by: Riku Voipio > Signed-off-by: Alex Bennée > > diff --git a/linux-user/signal.c b/linux-user/signal.c > index b6f9ef4..b1958a5 10

Re: [Qemu-devel] [PATCH v2] linux-user: make binfmt flag O require P

2014-07-15 Thread Joakim Tjernlund
Riku Voipio wrote on 2014/07/15 15:20:35: > > On Mon, Jul 14, 2014 at 11:37:02PM +0200, Joakim Tjernlund wrote: > > Joakim Tjernlund/Transmode wrote on 2014/07/14 23:04:51: > > > > Why do we need to modify argv[] here when we are building a > > > > target_argv[] further down anyway? > > > > > Be

[Qemu-devel] [PATCH v2] linux-user: make binfmt flag O require P

2014-07-15 Thread Joakim Tjernlund
QEMU can autodetect if it is started from Linux binfmt loader when binfmt flag O is on. Use that and require binfmt flag P as well which will enable QEMU to pass in correct argv0 to the application. Signed-off-by: Joakim Tjernlund --- v2 - This one actually works and does not abuse argv0

[Qemu-devel] [Bug 1335444] Re: qemu loses serial console data on EAGAIN

2014-07-15 Thread Andreas Gustafsson
With both patches applied, qemu works as expected. Thank you! -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1335444 Title: qemu loses serial console data on EAGAIN Status in QEMU: New Bug descr

[Qemu-devel] [PULL for-2.1 0/3] Block patches

2014-07-15 Thread Stefan Hajnoczi
The following changes since commit 7a6d04e73fdd571234e05dcad96895fafb3f22f0: Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2014-07-14 13:09:29 +0100) are available in the git repository at: git://github.com/stefanha/qemu.git tags/block-pull-request for you t

[Qemu-devel] [PULL for-2.1 1/3] linux-aio: Fix laio resource leak

2014-07-15 Thread Stefan Hajnoczi
From: Gonglei when hotplug virtio-scsi disks using laio, the aio_nr will increase in laio_init() by io_setup(), we can see the number by # cat /proc/sys/fs/aio-nr 128 if the aio_nr attach the maxnum, which found from # cat /proc/sys/fs/aio-max-nr 65536 the hotplug process will fail becaus

[Qemu-devel] [PULL for-2.1 3/3] virtio-blk: dataplane: notify guest as a batch

2014-07-15 Thread Stefan Hajnoczi
From: Ming Lei Now requests are submitted as a batch, so it is natural to notify guest as a batch too. This may suppress interrupt notification to VM a lot: - in my test, decreased by ~13K/sec Signed-off-by: Ming Lei Signed-off-by: Stefan Hajnoczi --- hw/block/dataplane/virtio-blk.c

[Qemu-devel] [PULL for-2.1 2/3] virtio-blk: data-plane: fix save/set .complete_request in start

2014-07-15 Thread Stefan Hajnoczi
From: Ming Lei The callback has to be saved and reset in virtio_blk_data_plane_start(), otherwise dataplane's requests will be completed in qemu aio context. Reviewed-by: Fam Zheng Signed-off-by: Ming Lei Signed-off-by: Stefan Hajnoczi --- hw/block/dataplane/virtio-blk.c | 7 --- 1 file

[Qemu-devel] [PATCH for-2.1 1/2] module: Simplify module_load()

2014-07-15 Thread Andreas Färber
The file path is not used for error reporting, so we can free it directly after use. Signed-off-by: Andreas Färber --- util/module.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/util/module.c b/util/module.c index 214effb..9fd3030 100644 --- a/util/module.c +++ b/uti

[Qemu-devel] [PATCH for-2.1 2/2] module: Don't complain when a module is absent

2014-07-15 Thread Andreas Färber
The current implementation depends on a configure-time generated list of block modules. When any of them is absent, module_load() emits a warning. This is suboptimal because extracting code to modules was mainly done to allow separate packaging of modules with intrusive dependencies. Absence of op

Re: [Qemu-devel] [PATCH buildfix for-2.1] libqos: Fix PC PCI endianness glitches

2014-07-15 Thread Peter Maydell
On 14 July 2014 16:38, Andreas Färber wrote: > The libqos implementation of io_read{b,w,l} and io_write{b,w,l} hooks > was relying on qtest_mem{read,write}() respectively. With d81d410 (usb: > improve ehci/uhci test) this resulted in assertion failures on ppc hosts: > > ERROR:tests/usb-hcd-ehci-t

Re: [Qemu-devel] latest rc: virtio-blk hangs forever after migration

2014-07-15 Thread Andrey Korolyov
On Tue, Jul 15, 2014 at 10:52 AM, Andrey Korolyov wrote: > On Tue, Jul 15, 2014 at 9:03 AM, Amit Shah wrote: >> On (Sun) 13 Jul 2014 [16:28:56], Andrey Korolyov wrote: >>> Hello, >>> >>> the issue is not specific to the iothread code because generic >>> virtio-blk also hangs up: >> >> Do you know

Re: [Qemu-devel] [PATCH] linux-user: Add binfmt wrapper

2014-07-15 Thread Riku Voipio
On Mon, Jul 14, 2014 at 05:38:49PM +0200, Joakim Tjernlund wrote: > Alexander Graf wrote on 2014/07/14 17:21:33: > > On 14.07.14 16:38, Joakim Tjernlund wrote: > > > The popular binfmt-wrapper patch adds an additional > > > executable which mangle argv suitable for binfmt flag P. > > > In a chroot

[Qemu-devel] [PULL 5/5] sPAPR/IOMMU: Fix TCE entry permission

2014-07-15 Thread Alexander Graf
From: Gavin Shan The permission of TCE entry should exclude physical base address. Otherwise, unmapping TCE entry can be interpreted to mapping TCE entry wrongly for VFIO devices. Signed-off-by: Gavin Shan Acked-by: Alex Williamson Signed-off-by: Alexander Graf --- hw/misc/vfio.c | 2 +

[Qemu-devel] [PULL 1/5] target-ppc: Fix number of threads per core limit

2014-07-15 Thread Alexander Graf
From: Alexey Kardashevskiy The number of threads per core is different for POWER6/7/8 CPUs. Guest systems do not expect to see more threads per core than a specific CPU supports so we need to limit this number. This limit is implemented by ppc_get_compat_smt_threads(). However it has a problem a

[Qemu-devel] [PULL 4/5] spapr: Enable use of huge pages

2014-07-15 Thread Alexander Graf
From: Alexey Kardashevskiy 0b183fc87 "memory: move mem_path handling to memory_region_allocate_system_memory" disabled -mempath use for all machines that do not use memory_region_allocate_system_memory() to register RAM. Since SPAPR uses memory_region_init_ram(), the huge pages support was disabl

[Qemu-devel] [PULL 3/5] spapr: Move RMA memory region registration code

2014-07-15 Thread Alexander Graf
From: Alexey Kardashevskiy PPC970 does not support VRMA (virtual RMA) so real memory required for SLOF to execute must be allocated by the KVM_ALLOCATE_RMA ioctl. Later this memory is used as a part of the guest RAM area. The RMA allocating code also registers a memory region for this piece of RA

[Qemu-devel] [PULL 2/5] ppc: memory: Replace memory_region_init_ram with memory_region_allocate_system_memory

2014-07-15 Thread Alexander Graf
From: "Shreyas B. Prabhu" Commit 0b183fc871:"memory: move mem_path handling to memory_region_allocate_system_memory" split memory_region_init_ram and memory_region_init_ram_from_file. Also it moved mem-path handling a step up from memory_region_init_ram to memory_region_allocate_system_memory. T

[Qemu-devel] [PULL 2.1 0/5] ppc patch queue 2014-07-15

2014-07-15 Thread Alexander Graf
Hi Peter, This is my current patch queue for ppc for 2.1. Please pull. Alex The following changes since commit 0e16297461264b3ea8f7282d1195cf53aa8a707c: libqos: Fix PC PCI endianness glitches (2014-07-15 14:18:15 +0100) are available in the git repository at: git://github.com/agraf/qemu

Re: [Qemu-devel] [PATCH] configure: explicitly state version requirements to devel packages

2014-07-15 Thread Stefan Hajnoczi
On Thu, Jun 26, 2014 at 05:34:50PM +0800, Hu Tao wrote: > Signed-off-by: Hu Tao > --- > configure | 12 +++- > 1 file changed, 7 insertions(+), 5 deletions(-) Thanks, applied to my block-next tree: https://github.com/stefanha/qemu/commits/block-next Stefan pgpLP4zNqrEeZ.pgp Descriptio

Re: [Qemu-devel] [PATCH for-2.1? 2/2] thread-pool: avoid deadlock in nested aio_poll() calls

2014-07-15 Thread Stefan Hajnoczi
On Mon, Jul 14, 2014 at 10:36:21AM +0200, Paolo Bonzini wrote: > Il 11/07/2014 13:20, Stefan Hajnoczi ha scritto: > >The thread pool has a race condition if two elements complete before > >thread_pool_completion_bh() runs: > > > > If element A's callback waits for element B using aio_poll() it wil

Re: [Qemu-devel] [PATCH v2 3/3] trace: instrument and trace tcg tb flush activity

2014-07-15 Thread Alex Bennée
Paolo Bonzini writes: > Il 15/07/2014 13:42, Alex Bennée ha scritto: >> +trace_inc_counter(&cpu->tb_jmp_cache_stats.misses); >> tb = tb_find_slow(env, pc, cs_base, flags); >> +} else { >> +trace_inc_counter(&cpu->tb_jmp_cache_stats.hits); >> } > > I think this is

[Qemu-devel] [PULL for-2.1 0/5] linux-user fixes for 2.1

2014-07-15 Thread riku . voipio
From: Riku Voipio The following changes since commit 0a9934eef166836c8100fce72f7f837cb8b2ed2b: Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2014-07-14 17:01:45 +0100) are available in the git repository at: git://git.linaro.org/people/riku.voipio/qemu.gi

[Qemu-devel] [PULL for-2.1 3/5] linux-user: handle AF_PACKET sockaddrs in target_to_host_sockaddr

2014-07-15 Thread riku . voipio
From: Joakim Tjernlund Implement conversion of the AF_PACKET sockaddr subtype in target_to_host_sockaddr. Signed-off-by: Joakim Tjernlund Reviewed-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 7 +++ linux-user/syscall_defs.h | 10 ++ 2 files chang

[Qemu-devel] [PULL for-2.1 1/5] SIOCGIFINDEX: fix typo

2014-07-15 Thread riku . voipio
From: Joakim Tjernlund Wrong type was used in ioctl definition. Signed-off-by: Joakim Tjernlund Reviewed-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/ioctls.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index 07

[Qemu-devel] [PULL for-2.1 4/5] alloca one extra byte sockets

2014-07-15 Thread riku . voipio
From: Joakim Tjernlund target_to_host_sockaddr() may increase the lenth with 1 byte for AF_UNIX sockets so allocate 1 extra byte. Signed-off-by: Joakim Tjernlund Reviewed-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 6 +++--- 1 file changed, 3 insertions(+), 3 dele

[Qemu-devel] [PULL for-2.1 2/5] qemu-user: Impl. setsockopt(SO_BINDTODEVICE)

2014-07-15 Thread riku . voipio
From: Joakim Tjernlund Signed-off-by: Joakim Tjernlund Reviewed-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 5a272d3..dcf1323 100644 --- a/linux-

Re: [Qemu-devel] [PATCH v2] configure: make libnfs not_found message user friendly

2014-07-15 Thread Stefan Hajnoczi
On Mon, Jul 14, 2014 at 11:06:08AM +0800, Hu Tao wrote: > On Sat, Jul 12, 2014 at 11:17:40AM +0800, Liu Yuan wrote: > > Cc: Kevin Wolf > > Signed-off-by: Liu Yuan > > --- > > configure | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/configure b/configure > > index

[Qemu-devel] [PATCH for-2.1 0/2] Module cleanups

2014-07-15 Thread Andreas Färber
Hello, This mini-series resolves an error message emitted when a module is absent. It was prompted by a downstream user bug report about the new message. Proposing this for rc2 as Peter would like to keep the rc3 delta low. Regards, Andreas Andreas Färber (2): module: Simplify module_load()

[Qemu-devel] [PULL for-2.1 5/5] linux-user: use TARGET_SA_ONSTACK in get_sigframe

2014-07-15 Thread riku . voipio
From: Riku Voipio As reported by Laurent, which should use TARGET_SA_ONSTACK on arm, microblaze and openrisc targets like we do on all others. Practical matter is minimal as for almost all archs SA_ONSTACK is 0x0800: http://lxr.free-electrons.com/ident?i=SA_ONSTACK Reported-by: Laurent Desn

Re: [Qemu-devel] [PATCH] linux-user: Add binfmt wrapper

2014-07-15 Thread Joakim Tjernlund
Riku Voipio wrote on 2014/07/15 16:12:26: > > On Mon, Jul 14, 2014 at 05:38:49PM +0200, Joakim Tjernlund wrote: > > Alexander Graf wrote on 2014/07/14 17:21:33: > > > On 14.07.14 16:38, Joakim Tjernlund wrote: > > > > The popular binfmt-wrapper patch adds an additional > > > > executable which m

[Qemu-devel] [PATCH v2 0/2] thread-pool: avoid fd usage and fix nested aio_poll() deadlock

2014-07-15 Thread Stefan Hajnoczi
v2: * Leave BH scheduled so that the code can be simplified [Paolo] These patches convert thread-pool.c from EventNotifier to QEMUBH. They then solve the deadlock when nested aio_poll() calls are made. Please speak out whether you want this in QEMU 2.1 or not. I'm not aware of the nested aio_p

[Qemu-devel] [PATCH v2 1/2] thread-pool: avoid per-thread-pool EventNotifier

2014-07-15 Thread Stefan Hajnoczi
EventNotifier is implemented using an eventfd or pipe. It therefore consumes file descriptors, which can be limited by rlimits and should therefore be used sparingly. Switch from EventNotifier to QEMUBH in thread-pool.c. Originally EventNotifier was used because qemu_bh_schedule() was not thread

[Qemu-devel] Current State of Block Filter

2014-07-15 Thread Wolfgang Richter
The way I see block filter currently implemented is as a special block device with `is_filter` set to true. Is this a correct characterization of the current incarnation? If so, I was wondering if it is possible to "insert" a block filter layer on top of an existing block device once QEMU is exec

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

2014-07-15 Thread Eric Blake
On 06/12/2014 09:36 PM, Alexey Kardashevskiy wrote: > This introduces an NMI (Non Maskable Interrupt) interface with > a single nmi_monitor_handler() method. A machine or a device can > implement it. This searches for an QOM object with this interface > and if it is implemented, calls it. The callb

Re: [Qemu-devel] [PULL for-2.1 0/3] Block patches

2014-07-15 Thread Peter Maydell
On 15 July 2014 14:55, Stefan Hajnoczi wrote: > The following changes since commit 7a6d04e73fdd571234e05dcad96895fafb3f22f0: > > Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging > (2014-07-14 13:09:29 +0100) > > are available in the git repository at: > > > git://gi

[Qemu-devel] [PATCH v2 2/2] thread-pool: avoid deadlock in nested aio_poll() calls

2014-07-15 Thread Stefan Hajnoczi
The thread pool has a race condition if two elements complete before thread_pool_completion_bh() runs: If element A's callback waits for element B using aio_poll() it will deadlock since pool->completion_bh is not marked scheduled when the nested aio_poll() runs. Fix this by marking the BH

Re: [Qemu-devel] [PATCH] Tap: fix vcpu long time io blocking on tap

2014-07-15 Thread Stefan Hajnoczi
On Mon, Jul 14, 2014 at 10:44:58AM +, Wangkai (Kevin,C) wrote: > Here the detail network: > > ++ > | The host add tap1 and eth10 to bridge 'br1'| ++ > | ++ | | s

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

2014-07-15 Thread Peter Maydell
On 15 July 2014 15:50, Eric Blake wrote: > On 06/12/2014 09:36 PM, Alexey Kardashevskiy wrote: >> This introduces an NMI (Non Maskable Interrupt) interface with >> a single nmi_monitor_handler() method. A machine or a device can >> implement it. This searches for an QOM object with this interface

Re: [Qemu-devel] [PATCH v2 07/15] target-tricore: Add instructions of SRR opcode format

2014-07-15 Thread Richard Henderson
On 07/14/2014 10:41 AM, Bastian Koppelmann wrote: > +if ((arg & 0x8000) | (arg & 0x4000)) { \ > +env->PSW |= MASK_USB_AV;\ > +env->PSW |= MASK_USB_SAV; \ > +} else {\ > +env->PSW &

Re: [Qemu-devel] [PATCH for-2.1? 2/2] thread-pool: avoid deadlock in nested aio_poll() calls

2014-07-15 Thread Stefan Hajnoczi
On Mon, Jul 14, 2014 at 12:49:38PM +0200, Paolo Bonzini wrote: > Il 14/07/2014 10:36, Paolo Bonzini ha scritto: > > > > > >to > > > >/* In case elem->common.cb() makes a nested aio_poll() call, > > * next may become invalid as well. Instead of just > > * restart

Re: [Qemu-devel] [PATCH] linux-user: Add binfmt wrapper

2014-07-15 Thread Joakim Tjernlund
Riku Voipio wrote on 2014/07/15 16:12:26: > On Mon, Jul 14, 2014 at 05:38:49PM +0200, Joakim Tjernlund wrote: > > Alexander Graf wrote on 2014/07/14 17:21:33: > > > On 14.07.14 16:38, Joakim Tjernlund wrote: > > > > The popular binfmt-wrapper patch adds an additional > > > > executable which mang

Re: [Qemu-devel] [PATCH v2 08/15] target-tricore: Add instructions of SSR opcode format

2014-07-15 Thread Richard Henderson
On 07/14/2014 10:41 AM, Bastian Koppelmann wrote: > Add instructions of SSR opcode format. > > Signed-off-by: Bastian Koppelmann > --- > v1 -> v2: > - Remove AND in ST_B and ST_H instructions. > - Load/Store instructions now use new TCGMemOp. > - Move SSR instructions to one decode fu

Re: [Qemu-devel] [PATCH for-2.1? 2/2] thread-pool: avoid deadlock in nested aio_poll() calls

2014-07-15 Thread Paolo Bonzini
Il 15/07/2014 16:37, Stefan Hajnoczi ha scritto: > This is of course missing here: > >break; Let's keep goto restart so we don't use the BH for each completion callback. We just need the BH scheduled once to protect against the deadlock. Ah, I missed this remark. Then you could a

Re: [Qemu-devel] [PATCH v2 09/15] target-tricore: Add instructions of SRRS and SLRO opcode format

2014-07-15 Thread Richard Henderson
On 07/14/2014 10:41 AM, Bastian Koppelmann wrote: > Add instructions of SSRS and SLRO opcode format. > Add micro-op generator functions for offset loads. > > Signed-off-by: Bastian Koppelmann > --- > v1 -> v2: > - Replace OP_MEM_INDIRECT with gen_offset_ld/st functions using TCGMemOp. > -

[Qemu-devel] [PATCH] cadence_uart: check for serial backend before using it.

2014-07-15 Thread fred . konrad
From: KONRAD Frederic This checks that s->chr is not NULL before using it. Signed-off-by: KONRAD Frederic --- hw/char/cadence_uart.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/hw/char/cadence_uart.c b/hw/char/cadence_uart.c index dbbc167..a5736cb 10064

Re: [Qemu-devel] [PATCH v2 2/2] thread-pool: avoid deadlock in nested aio_poll() calls

2014-07-15 Thread Paolo Bonzini
Il 15/07/2014 16:44, Stefan Hajnoczi ha scritto: The thread pool has a race condition if two elements complete before thread_pool_completion_bh() runs: If element A's callback waits for element B using aio_poll() it will deadlock since pool->completion_bh is not marked scheduled when the n

Re: [Qemu-devel] [PATCH v2 0/2] thread-pool: avoid fd usage and fix nested aio_poll() deadlock

2014-07-15 Thread Paolo Bonzini
Il 15/07/2014 16:44, Stefan Hajnoczi ha scritto: v2: * Leave BH scheduled so that the code can be simplified [Paolo] These patches convert thread-pool.c from EventNotifier to QEMUBH. They then solve the deadlock when nested aio_poll() calls are made. Please speak out whether you want this in

Re: [Qemu-devel] [PATCH v2 10/15] target-tricore: Add instructions of SB opcode format

2014-07-15 Thread Richard Henderson
On 07/14/2014 10:41 AM, Bastian Koppelmann wrote: > +static void gen_compute_branch(DisasContext *ctx, uint32_t opc, > + int r1, int r2 , int32_t constant , int32_t offset) > +{ > + > +switch (opc) { Watch whitespace, both vertical and horizontal here. > +/* SB-format jumps

Re: [Qemu-devel] [PATCH v2 11/15] target-tricore: Add instructions of SBC and SBRN opcode format

2014-07-15 Thread Richard Henderson
On 07/14/2014 10:41 AM, Bastian Koppelmann wrote: > Add instructions of SBC and SBRN opcode format. > > Signed-off-by: Bastian Koppelmann > --- > v1 -> v2: > - Change compare to 0 at instructions JZ_T and JNZ_T. > - Group SBC instructions to one case. > - Group SBRN instructions to on

Re: [Qemu-devel] [PATCH for-2.1 0/2] Module cleanups

2014-07-15 Thread Fam Zheng
On Tue, 07/15 16:04, Andreas Färber wrote: > Hello, > > This mini-series resolves an error message emitted when a module is absent. > It was prompted by a downstream user bug report about the new message. > > Proposing this for rc2 as Peter would like to keep the rc3 delta low. > > Regards, > An

Re: [Qemu-devel] [PATCH v2 06/15] target-tricore: Add instructions of SRC opcode format

2014-07-15 Thread Richard Henderson
On 07/15/2014 06:19 AM, Bastian Koppelmann wrote: > >>> +tcg_gen_addi_tl(cpu_gpr_d[r1], cpu_gpr_d[r1], const4); >> Are you planning to come back to implement V and AV bits later? > Would you recommend implementing this as a helper? It seems rather complex. > Especially with half-word and b

Re: [Qemu-devel] [PATCH for-2.1 0/2] Module cleanups

2014-07-15 Thread Paolo Bonzini
Il 15/07/2014 17:39, Fam Zheng ha scritto: On Tue, 07/15 16:04, Andreas Färber wrote: Hello, This mini-series resolves an error message emitted when a module is absent. It was prompted by a downstream user bug report about the new message. Proposing this for rc2 as Peter would like to keep the

Re: [Qemu-devel] [PULL 2.1 0/5] ppc patch queue 2014-07-15

2014-07-15 Thread Peter Maydell
On 15 July 2014 15:15, Alexander Graf wrote: > Hi Peter, > > This is my current patch queue for ppc for 2.1. Please pull. > > Alex > > > The following changes since commit 0e16297461264b3ea8f7282d1195cf53aa8a707c: > > libqos: Fix PC PCI endianness glitches (2014-07-15 14:18:15 +0100) > > are av

Re: [Qemu-devel] [PATCH v2 12/15] target-tricore: Add instructions of SBR opcode format

2014-07-15 Thread Richard Henderson
On 07/14/2014 10:41 AM, Bastian Koppelmann wrote: > Add instructions of SBR opcode format. > Add gen_loop micro-op generator function. > > Signed-off-by: Bastian Koppelmann > --- > v1 -> v2: > - Change gen_loop() to subtract first and then compare to -1. > - Change gen_loop() using next_p

Re: [Qemu-devel] [PATCH v2 13/15] target-tricore: Add instructions of SC opcode format

2014-07-15 Thread Richard Henderson
On 07/14/2014 10:41 AM, Bastian Koppelmann wrote: > Add instructions of SC opcode format. > Add helper for begin interrupt service routine. > > Signed-off-by: Bastian Koppelmann > --- > v1 -> v2: > - Add save_context_lower. (see patch v2 10/15) > - Remove printfs in helper_bisr. > - A

Re: [Qemu-devel] latest rc: virtio-blk hangs forever after migration

2014-07-15 Thread Paolo Bonzini
Il 13/07/2014 17:29, Andrey Korolyov ha scritto: Small follow-up: issue have probabilistic nature, as it looks - by limited number of runs, it is reproducible within three cases: 1) live migration went well, I/O locked up, 2) live migration failed by timeout, I/O locked up, 3) live migration w

  1   2   >