Re: [Qemu-devel] [PATCH v10 5/8] module: implement module loading

2013-09-17 Thread Alex Bligh
On 17 Sep 2013, at 06:55, Fam Zheng wrote: I think I'd just have one flat list of modules to load and ditch these MODULE_LOAD_ enums. Question is how to deal with qemu vs. qemu-img then. qemu needs everything and qemu-img needs the block drivers only (and loading something else

Re: [Qemu-devel] [PATCH v10 5/8] module: implement module loading

2013-09-17 Thread Fam Zheng
On Tue, 09/17 07:33, Alex Bligh wrote: On 17 Sep 2013, at 06:55, Fam Zheng wrote: I think I'd just have one flat list of modules to load and ditch these MODULE_LOAD_ enums. Question is how to deal with qemu vs. qemu-img then. qemu needs everything and qemu-img needs the

Re: [Qemu-devel] [PATCH v2 00/38] Delay destruction of memory regions to instance_finalize

2013-09-17 Thread Wenchao Xia
于 2013/9/3 20:32, Paolo Bonzini 写道: QOM splits the destruction of a device in two phases: - unrealize, also known as exit from qdev times, should isolate the device from the guest. After unrealize returns, the guest should not be able to issue new requests. - instance_finalize will

Re: [Qemu-devel] [PATCH v1 4/4] target-arm: Add CP15 VBAR support

2013-09-17 Thread Sebastian Huber
On 2013-07-10 06:23, peter.crosthwa...@xilinx.com wrote: +static int vbar_write(CPUARMState *env, const ARMCPRegInfo *ri, + uint64_t value) +{ +value = (1 31); Is the above correct? +env-cp15.c12_vbar = value ~0x1Ful; +return 0; +} Shouldn't this be {

Re: [Qemu-devel] [PATCH v4 22/33] tcg-aarch64: Use MOVN in tcg_out_movi

2013-09-17 Thread Claudio Fontana
On 16.09.2013 17:50, Richard Henderson wrote: On 09/16/2013 02:16 AM, Claudio Fontana wrote: I agree in general with the approach lets see if it is more convenient to start with MOVN. The existing implementation is, although not easy, leaner. Can we make it a little this one a little bit

Re: [Qemu-devel] [PATCH v4 04/33] tcg-aarch64: Hoist common argument loads in tcg_out_op

2013-09-17 Thread Claudio Fontana
On 16.09.2013 18:20, Richard Henderson wrote: On 09/16/2013 12:42 AM, Claudio Fontana wrote: +/* Hoist the loads of the most common arguments. */ +TCGArg a0 = args[0]; +TCGArg a1 = args[1]; +TCGArg a2 = args[2]; +int c2 = const_args[2]; + Either all or none (add c0,

Re: [Qemu-devel] [PATCH v4 03/33] tcg-aarch64: Don't handle mov/movi in tcg_out_op

2013-09-17 Thread Claudio Fontana
On 16.09.2013 17:07, Richard Henderson wrote: On 09/16/2013 12:45 AM, Claudio Fontana wrote: default: -tcg_abort(); /* opcode not implemented */ +/* Opcode not implemented. */ +tcg_abort(); } } This change above seems unnecessary. Perhaps qemu doesn't

Re: [Qemu-devel] [Bug 1224444] Re: virtio-serial loses writes when used over virtio-mmio

2013-09-17 Thread Peter Maydell
On 16 September 2013 17:13, Laszlo Ersek ler...@redhat.com wrote: H. Normally (as in, virtio-pci), when a VCPU thread (running KVM) executes guest code that sends data to the host via virtio, KVM kicks the host notifier eventfd. What happens in the virtio-pci without eventfd case? (eg

Re: [Qemu-devel] [PATCH v4 08/33] tcg-aarch64: Introduce tcg_fmt_Rdnm and tcg_fmt_Rdnm_lsl

2013-09-17 Thread Claudio Fontana
On 16.09.2013 17:32, Richard Henderson wrote: On 09/16/2013 01:41 AM, Claudio Fontana wrote: On 14.09.2013 23:54, Richard Henderson wrote: Now that we've converted opcode fields to pre-shifted insns, we can merge the implementation of arithmetic and shift insns. Simplify the left/right shift

[Qemu-devel] [Bug 1224444] Re: virtio-serial loses writes when used over virtio-mmio

2013-09-17 Thread Richard Jones
What happens if you add a five second delay to libguestfs, before writing the response? No change. Still hangs in the same place. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/122 Title:

Re: [Qemu-devel] [PATCH v10 5/8] module: implement module loading

2013-09-17 Thread Wenchao Xia
于 2013/9/16 18:38, Paolo Bonzini 写道: Il 16/09/2013 12:24, Alex Bligh ha scritto: At risk of heresy, can I suggest a rather simpler scheme that requires a total of zero infrastructure changes? Here's a patch against qemu 1.0 (sorry) Ubuntu dist (sorry) that uses weak binding to load and compile

Re: [Qemu-devel] [Question] memory: AddressSpace backed by single IO MemoryRegion

2013-09-17 Thread Peter Maydell
On 16 September 2013 18:18, Paolo Bonzini pbonz...@redhat.com wrote: Il 16/09/2013 19:11, Marcel Apfelbaum ha scritto: memory_region_init_io(my_reg, owner, my_ops, my_obj, my region, INT64_MAX); This is 2^63-1, not 2^64-1. You need UINT64_MAX here. So does this mean

Re: [Qemu-devel] [PATCH v1 4/4] target-arm: Add CP15 VBAR support

2013-09-17 Thread Peter Maydell
On 16 September 2013 16:34, Sebastian Huber sebastian.hu...@embedded-brains.de wrote: it would be really nice to get the CP15 VBAR support integrated. This allows unit test suites of single address space real-time systems to catch NULL pointer read/write access for example. I agree it would

[Qemu-devel] Single stepping GDB on ARM

2013-09-17 Thread Emmanuel Blot
Hi, Is there a way to halt the execution of the VM on the *first* unassigned memory access, and let the guest GDB take over to debug the invalid access? I noticed that cpu_unassigned_access() is not implemented on ARM. Is this a missing feature - yet to be implemented, or something that cannot

Re: [Qemu-devel] [PATCH v4 11/33] tcg-aarch64: Handle constant operands to add, sub, and compare

2013-09-17 Thread Claudio Fontana
On 16.09.2013 17:45, Richard Henderson wrote: On 09/16/2013 02:02 AM, Claudio Fontana wrote: -static inline void tcg_out_cmp(TCGContext *s, TCGType ext, TCGReg rn, - TCGReg rm) +static void tcg_out_cmp(TCGContext *s, TCGType ext, TCGReg a, +

Re: [Qemu-devel] [PATCH v10 5/8] module: implement module loading

2013-09-17 Thread Wenchao Xia
于 2013/9/16 19:29, Fam Zheng 写道: On Mon, 09/16 12:30, Paolo Bonzini wrote: Il 16/09/2013 12:21, Daniel P. Berrange ha scritto: On Mon, Sep 16, 2013 at 12:18:54PM +0200, Paolo Bonzini wrote: Il 16/09/2013 12:14, Daniel P. Berrange ha scritto: On Mon, Sep 16, 2013 at 12:09:47PM +0200, Paolo

Re: [Qemu-devel] Single stepping GDB on ARM

2013-09-17 Thread Peter Maydell
On 17 September 2013 09:47, Emmanuel Blot eblot...@gmail.com wrote: I noticed that cpu_unassigned_access() is not implemented on ARM. Is this a missing feature - yet to be implemented, or something that cannot be supported on ARM plartform for some reason? No, it should cause an external abort

Re: [Qemu-devel] [PATCH v4 06/33] tcg-aarch64: Merge enum aarch64_srr_opc with AArch64Insn

2013-09-17 Thread Claudio Fontana
On 16.09.2013 17:06, Richard Henderson wrote: On 09/16/2013 12:56 AM, Claudio Fontana wrote: case INDEX_op_shl_i64: case INDEX_op_shl_i32: -if (c2) {/* LSL / UBFM Wd, Wn, (32 - m) */ +if (c2) { tcg_out_shl(s, ext, a0, a1, a2); -} else {

[Qemu-devel] [PATCH v11 0/8] Shared Library Module Support

2013-09-17 Thread Fam Zheng
This series implements feature of shared object building as described in: http://wiki.qemu.org/Features/Modules The main idea behind modules is to isolate dependencies on third party libraries from qemu executables, such as libglusterfs or librbd, so that the end users can install core qemu

[Qemu-devel] [PATCH v11 1/8] ui/Makefile.objs: delete unnecessary cocoa.o dependency

2013-09-17 Thread Fam Zheng
From: Peter Maydell peter.mayd...@linaro.org Delete an unnecessary dependency for cocoa.o; we already have a general rule that tells Make that we can build a .o file from a .m source using an ObjC compiler, so this specific rule is unnecessary. Further, it is using the dubious construct

[Qemu-devel] [PATCH v11 3/8] rule.mak: allow per object cflags and libs

2013-09-17 Thread Fam Zheng
Adds extract-libs in LINK to expand any per object libs, the syntax to define such a libs options is like: foo.o-libs := $(CURL_LIBS) in block/Makefile.objs. Similarly, foo.o-cflags := $(FOO_CFLAGS) is also supported. foo.o must be listed a nested var (e.g. common-obj-y) to

[Qemu-devel] [PATCH v11 5/8] module: implement module loading

2013-09-17 Thread Fam Zheng
This patch adds loading, stamp checking and initialization of modules. The init function of dynamic module is no longer directly called as __attribute__((constructor)) in static linked version, it is called only after passed the checking of presense of stamp symbol: qemu_stamp_$(date

[Qemu-devel] [PATCH v11 2/8] make.rule: fix $(obj) to a real relative path

2013-09-17 Thread Fam Zheng
Makefile.target includes rule.mak and unnested common-obj-y, then prefix them with '../', this will ignore object specific QEMU_CFLAGS in subdir Makefile.objs: $(obj)/curl.o: QEMU_CFLAGS += $(CURL_CFLAGS) Because $(obj) here is './block', instead of '../block'. This doesn't hurt compiling

[Qemu-devel] [PATCH v11 6/8] Makefile: install modules with make install

2013-09-17 Thread Fam Zheng
Install all the modules to ${MODDIR}. Signed-off-by: Fam Zheng f...@redhat.com --- Makefile | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index e63adeb..4f4d1af 100644 --- a/Makefile +++ b/Makefile @@ -363,6 +363,12 @@ install-datadir install-localstatedir ifneq

[Qemu-devel] [PATCH v11 7/8] .gitignore: ignore module related files (dll, so, mo)

2013-09-17 Thread Fam Zheng
Signed-off-by: Fam Zheng f...@redhat.com --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 8e1b73f..ac679ea 100644 --- a/.gitignore +++ b/.gitignore @@ -63,6 +63,9 @@ fsdev/virtfs-proxy-helper.pod *.cp *.dvi *.exe +*.dll +*.so +*.mo *.fn *.ky

[Qemu-devel] [PATCH v11 8/8] block: convert block drivers linked with libs to modules

2013-09-17 Thread Fam Zheng
The converted block drivers are: curl iscsi rbd ssh glusterfs no longer adds flags and libs for them to global variables, instead create config-host.mak variables like FOO_CFLAGS and FOO_LIBS, which is used as per object cflags and libs. Signed-off-by: Fam Zheng

[Qemu-devel] [PATCH v11 4/8] build-sys: introduce common-obj-m and block-obj-m for DSO

2013-09-17 Thread Fam Zheng
Add necessary rules and flags for shared object generation. $(common-obj-m) will include $(block-obj-m), like $(common-obj-y) does for $(block-obj-y). The new rules introduced here are: 0) For all %.so compiling: QEMU_CFLAGS += -fPIC 1) %.o in $(common-obj-m) is compiled to %.o, then linked

Re: [Qemu-devel] [PATCH 01/38] qdev: document assumption that unrealize is followed by finalize

2013-09-17 Thread Michael S. Tsirkin
On Tue, Sep 03, 2013 at 02:32:52PM +0200, Paolo Bonzini wrote: This becomes important when undoing realize's initializations is split in two places (unrealize and exit). The way to fix this could be to split realize further into alloc (done once) and realize (can be undone). Or alloc + init

Re: [Qemu-devel] cpufreq and QEMU guests

2013-09-17 Thread Gleb Natapov
On Mon, Sep 16, 2013 at 08:42:58PM +0200, Benoît Canet wrote: Le Monday 16 Sep 2013 à 18:58:40 (+0300), Gleb Natapov a écrit : On Mon, Sep 16, 2013 at 05:46:04PM +0200, Benoît Canet wrote: Le Monday 16 Sep 2013 à 18:32:39 (+0300), Gleb Natapov a écrit : On Mon, Sep 16, 2013 at 05:05:45PM

Re: [Qemu-devel] [PATCH 02/38] pci: split exit and finalize

2013-09-17 Thread Michael S. Tsirkin
On Tue, Sep 03, 2013 at 02:32:53PM +0200, Paolo Bonzini wrote: When converting devices to use out-of-BQL memory access, destruction needs to be done in two phases. First, the device is unrealized; at this point, pending memory accesses can still be completed, but no new accesses will be

Re: [Qemu-devel] [PATCH 10/38] msix: split msix_free from msix_uninit

2013-09-17 Thread Michael S. Tsirkin
On Tue, Sep 03, 2013 at 02:33:01PM +0200, Paolo Bonzini wrote: Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/misc/vfio.c | 1 + hw/net/vmxnet3.c | 3 +++ hw/pci/msix.c | 22 -- hw/virtio/virtio-pci.c | 1 + include/hw/pci/msix.h | 1

Re: [Qemu-devel] [PATCH 23/38] shpc: split shpc_free from shpc_cleanup

2013-09-17 Thread Michael S. Tsirkin
On Tue, Sep 03, 2013 at 02:33:14PM +0200, Paolo Bonzini wrote: Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/pci-bridge/pci_bridge_dev.c | 2 ++ hw/pci/shpc.c | 8 +++- include/hw/pci/shpc.h | 1 + 3 files changed, 10 insertions(+), 1 deletion(-)

Re: [Qemu-devel] [PATCH 17/38] e1000: use instance_finalize instead of exit

2013-09-17 Thread Michael S. Tsirkin
On Tue, Sep 03, 2013 at 02:33:08PM +0200, Paolo Bonzini wrote: Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/net/e1000.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/net/e1000.c b/hw/net/e1000.c index f5ebed4..55fb062 100644 --- a/hw/net/e1000.c

Re: [Qemu-devel] [PATCH v2 00/38] Delay destruction of memory regions to instance_finalize

2013-09-17 Thread Michael S. Tsirkin
On Tue, Sep 03, 2013 at 02:32:51PM +0200, Paolo Bonzini wrote: QOM splits the destruction of a device in two phases: - unrealize, also known as exit from qdev times, should isolate the device from the guest. After unrealize returns, the guest should not be able to issue new requests.

Re: [Qemu-devel] [Bug 1224444] Re: virtio-serial loses writes when used over virtio-mmio

2013-09-17 Thread Laszlo Ersek (Red Hat)
On 09/17/13 10:09, Peter Maydell wrote: On 16 September 2013 17:13, Laszlo Ersek ler...@redhat.com wrote: H. Normally (as in, virtio-pci), when a VCPU thread (running KVM) executes guest code that sends data to the host via virtio, KVM kicks the host notifier eventfd. What happens in

Re: [Qemu-devel] [PATCH 02/38] pci: split exit and finalize

2013-09-17 Thread Paolo Bonzini
Il 17/09/2013 11:16, Michael S. Tsirkin ha scritto: On Tue, Sep 03, 2013 at 02:32:53PM +0200, Paolo Bonzini wrote: When converting devices to use out-of-BQL memory access, destruction needs to be done in two phases. First, the device is unrealized; at this point, pending memory accesses can

Re: [Qemu-devel] [PATCH 10/38] msix: split msix_free from msix_uninit

2013-09-17 Thread Paolo Bonzini
Il 17/09/2013 11:21, Michael S. Tsirkin ha scritto: On Tue, Sep 03, 2013 at 02:33:01PM +0200, Paolo Bonzini wrote: Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/misc/vfio.c | 1 + hw/net/vmxnet3.c | 3 +++ hw/pci/msix.c | 22 --

Re: [Qemu-devel] [PATCH 23/38] shpc: split shpc_free from shpc_cleanup

2013-09-17 Thread Paolo Bonzini
Il 17/09/2013 11:24, Michael S. Tsirkin ha scritto: @@ -630,15 +630,21 @@ int shpc_bar_size(PCIDevice *d) void shpc_cleanup(PCIDevice *d, MemoryRegion *bar) { SHPCDevice *shpc = d-shpc; +/* TODO: cleanup config space changes? */ d-cap_present = ~QEMU_PCI_CAP_SHPC;

Re: [Qemu-devel] [PATCH 23/38] shpc: split shpc_free from shpc_cleanup

2013-09-17 Thread Michael S. Tsirkin
On Tue, Sep 17, 2013 at 11:58:12AM +0200, Paolo Bonzini wrote: Il 17/09/2013 11:24, Michael S. Tsirkin ha scritto: @@ -630,15 +630,21 @@ int shpc_bar_size(PCIDevice *d) void shpc_cleanup(PCIDevice *d, MemoryRegion *bar) { SHPCDevice *shpc = d-shpc; +/* TODO: cleanup config

Re: [Qemu-devel] [PATCH v2 00/38] Delay destruction of memory regions to instance_finalize

2013-09-17 Thread Paolo Bonzini
Il 17/09/2013 08:44, Wenchao Xia ha scritto: Just one question: where is the caller of .instance_finalize(), did I missed that patch? It's called by qom/object.c. Paolo

[Qemu-devel] [Bug 1224444] Re: virtio-serial loses writes when used over virtio-mmio

2013-09-17 Thread Richard Jones
There's at least three cases here I guess (KVM + eventfd, KVM without eventfd (enforceable eg. with the ioeventfd property for virtio devices), and TCG). We're probably talking about the third case. To clarify on this point: I have reproduced this bug on two different ARM machines, one using

Re: [Qemu-devel] Single stepping GDB on ARM

2013-09-17 Thread Emmanuel Blot
No, it should cause an external abort exception, really. Ok. It's just nobody's needed it (guest OSes should never do anything that provokes an external abort unless they're buggy) so nobody's bothered doing it yet. Understood. Thanks. I'm using QEMU to debug a platform (ARM7TDMI) + OS

Re: [Qemu-devel] [PATCH 02/38] pci: split exit and finalize

2013-09-17 Thread Michael S. Tsirkin
On Tue, Sep 03, 2013 at 02:32:53PM +0200, Paolo Bonzini wrote: When converting devices to use out-of-BQL memory access, destruction needs to be done in two phases. First, the device is unrealized; at this point, pending memory accesses can still be completed, but no new accesses will be

Re: [Qemu-devel] [PATCH 17/38] e1000: use instance_finalize instead of exit

2013-09-17 Thread Paolo Bonzini
Il 17/09/2013 11:27, Michael S. Tsirkin ha scritto: static void -pci_e1000_uninit(PCIDevice *dev) +pci_e1000_instance_finalize(Object *obj) { -E1000State *d = E1000(dev); +E1000State *d = E1000(obj); timer_del(d-autoneg_timer); timer_free(d-autoneg_timer);

Re: [Qemu-devel] [PATCH 02/38] pci: split exit and finalize

2013-09-17 Thread Paolo Bonzini
Il 17/09/2013 11:56, Paolo Bonzini ha scritto: Yes. do_pci_unregister_device marks the point where the guest will not be able to submit new requests to the device, but there may be previous requests pending. because you could have something like this: Michael pointed out offlist that the

[Qemu-devel] [PATCH 4/4] slirp: clean up slirp_update_timeout

2013-09-17 Thread Jan Kiszka
No need to write out the timeout early, keep it local until we are done. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- slirp/slirp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/slirp/slirp.c b/slirp/slirp.c index fe16367..bad8dad 100644 --- a/slirp/slirp.c +++

[Qemu-devel] [PATCH 0/4] [PULL] slirp: improve timeout management

2013-09-17 Thread Jan Kiszka
The following changes since commit 2d1fe1873a984d1c2c89ffa3d12949cafc718551: Merge remote-tracking branch 'pmaydell/tags/pull-target-arm-20130910' into staging (2013-09-11 14:46:52 -0500) are available in the git repository at: git://git.kiszka.org/qemu.git queues/slirp for you to fetch

[Qemu-devel] [PATCH 1/4] slirp: make timeout local

2013-09-17 Thread Jan Kiszka
From: Liu Ping Fan qemul...@gmail.com Each slirp has its own time to caculate timeout. Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- slirp/slirp.c | 22 ++ slirp/slirp.h | 3 +++ 2 files changed, 13

[Qemu-devel] [PATCH 3/4] slirp: set mainloop timeout with more precise value

2013-09-17 Thread Jan Kiszka
From: Liu Ping Fan qemul...@gmail.com If slirp needs to emulate tcp timeout, then the timeout value for mainloop should be more precise, which is determined by slirp's fasttimo or slowtimo. Achieve this by swap the logic sequence of slirp_pollfds_fill and slirp_update_timeout. Signed-off-by: Liu

[Qemu-devel] [PATCH 2/4] slirp: define timeout as macro

2013-09-17 Thread Jan Kiszka
From: Liu Ping Fan qemul...@gmail.com Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- slirp/slirp.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/slirp/slirp.c b/slirp/slirp.c index

Re: [Qemu-devel] [PATCH 0/4] [PULL] slirp: improve timeout management

2013-09-17 Thread Jan Kiszka
On 2013-09-17 12:50, Jan Kiszka wrote: The following changes since commit 2d1fe1873a984d1c2c89ffa3d12949cafc718551: Merge remote-tracking branch 'pmaydell/tags/pull-target-arm-20130910' into staging (2013-09-11 14:46:52 -0500) are available in the git repository at:

Re: [Qemu-devel] [PATCH v1 4/4] target-arm: Add CP15 VBAR support

2013-09-17 Thread Sebastian Huber
On 2013-09-17 10:37, Peter Maydell wrote: In any case a new arm_features bit is hardly a big deal: the actual question is whether it makes sense to provide this register that shouldn't really exist for the cpu configurations we're modelling. I use Qemu to run unit tests for a real-time

[Qemu-devel] in_asm substitute for accel=kvm:tcg

2013-09-17 Thread Andriy Gapon
It seems that when qemu is run with accel=kvm:tcg then -d in_asm does not produce anything. At least, with the qemu and kvm that I have access to. Is there any way to obtain equivalent logging in such a configuration? A note: a host and a guest are both amd64 (x86_64). Some background. I am

[Qemu-devel] QEMU SD card emulation problem

2013-09-17 Thread Taimoor Mirza
Hi Guys, I have been trying to use SD card emulation of QEMU by providing host directory to QEMU to treat it as SD card. For this I am using option -sd fat:16:rw:/home/taimoor/temp/sdcard. This works fine for me and I can see list of files in guest system. But when I delete some file from guest

Re: [Qemu-devel] [PATCH 00/16 RFC v6] ACPI memory hotplug

2013-09-17 Thread Igor Mammedov
On Wed, 11 Sep 2013 12:01:44 +0800 Hu Tao hu...@cn.fujitsu.com wrote: On Tue, Jul 23, 2013 at 06:22:56PM +0200, Igor Mammedov wrote: As opposed to previous approach, This series allows to hotplug 'arbitrary' DIMM devices specifying size, NUMA node mapping, slot and address where to map it,

Re: [Qemu-devel] in_asm substitute for accel=kvm:tcg

2013-09-17 Thread Andreas Färber
Hi, Am 17.09.2013 13:37, schrieb Andriy Gapon: It seems that when qemu is run with accel=kvm:tcg then -d in_asm does not produce anything. At least, with the qemu and kvm that I have access to. Are you saying that with accel=kvm:tcg when falling back to TCG, -d in_asm does not work? For

[Qemu-devel] Merging the quorum block driver

2013-09-17 Thread Stefan Hajnoczi
Hi Benoit, Kevin and I had a chance to chat face-to-face and we discussed what concrete changes are necessary to merge quorum (without solving all the other block layers problems at once). I think quorum could be merged relatively quickly (and without massive BlockFilter investments) by changing

Re: [Qemu-devel] [PATCH v2 00/38] Delay destruction of memory regions to instance_finalize

2013-09-17 Thread Michael S. Tsirkin
On Tue, Sep 03, 2013 at 02:32:51PM +0200, Paolo Bonzini wrote: QOM splits the destruction of a device in two phases: - unrealize, also known as exit from qdev times, should isolate the device from the guest. After unrealize returns, the guest should not be able to issue new requests.

[Qemu-devel] qemu-nbd segmentation fault

2013-09-17 Thread ing. Mario De Chenno
Hi all. I cannot use qemu-nbd to write files to a qcow2 disk image. It always exit after a while with a segmentation fault. Here's what I'm doing: modprobe nbd max_part=8 qemu-nbd qcow2image.img (in another shell) nbd-client localhost 10809 /dev/nbd0 mount /dev/nbd0p1 /mnt/tmp cd /mnt/tmp tar -xf

Re: [Qemu-devel] [PATCHv2 2/3] seccomp: adding command line support for blacklist

2013-09-17 Thread Eduardo Otubo
On 09/11/2013 01:49 PM, Daniel P. Berrange wrote: On Wed, Sep 11, 2013 at 12:45:54PM -0400, Corey Bryant wrote: On 09/06/2013 03:21 PM, Eduardo Otubo wrote: New command line options for the seccomp blacklist feature: $ qemu -sandbox on[,strict=on|off] The strict parameter will turn on

Re: [Qemu-devel] [PATCHv2 2/3] seccomp: adding command line support for blacklist

2013-09-17 Thread Daniel P. Berrange
On Tue, Sep 17, 2013 at 10:01:23AM -0300, Eduardo Otubo wrote: On 09/11/2013 01:49 PM, Daniel P. Berrange wrote: On Wed, Sep 11, 2013 at 12:45:54PM -0400, Corey Bryant wrote: On 09/06/2013 03:21 PM, Eduardo Otubo wrote: New command line options for the seccomp blacklist feature: $

[Qemu-devel] [PATCH] qdev: fix crash when device_add is called with abstract driver

2013-09-17 Thread Igor Mammedov
user is able to crash running QEMU when following monitor command is called: device_add intel-hda-generic crash is caused by assertion in object_initialize_with_type() when type is abstract. Checking if type is abstract before instance is created in qdev_device_add() allows to prevent crash on

[Qemu-devel] [PATCHv2 01/20] block: make BdrvRequestFlags public

2013-09-17 Thread Peter Lieven
Reviewed-by: Eric Blake ebl...@redhat.com Signed-off-by: Peter Lieven p...@kamp.de --- block.c |5 - include/block/block.h |5 + 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/block.c b/block.c index a325efc..878f365 100644 --- a/block.c +++ b/block.c

[Qemu-devel] [PATCHv2 02/20] block: add flags to bdrv_*_write_zeroes

2013-09-17 Thread Peter Lieven
Reviewed-by: Eric Blake ebl...@redhat.com Signed-off-by: Peter Lieven p...@kamp.de --- block-migration.c |2 +- block.c | 20 +++- block/backup.c|3 ++- block/qcow2.c |2 +- block/qed.c |3 ++-

[Qemu-devel] [PATCHv2 03/20] block: introduce BDRV_REQ_MAY_UNMAP request flag

2013-09-17 Thread Peter Lieven
Signed-off-by: Peter Lieven p...@kamp.de --- block-migration.c |3 ++- block.c |4 block/backup.c|2 +- include/block/block.h |7 +++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/block-migration.c b/block-migration.c index

[Qemu-devel] [PATCHv2 06/20] block: add discard and write_zeroes limits and alignment to BlockDriverState

2013-09-17 Thread Peter Lieven
Signed-off-by: Peter Lieven p...@kamp.de --- include/block/block_int.h | 12 1 file changed, 12 insertions(+) diff --git a/include/block/block_int.h b/include/block/block_int.h index 85c3474..692b9ed 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -280,6

[Qemu-devel] [PATCHv2 00/20] block: logical block provisioning enhancements

2013-09-17 Thread Peter Lieven
this patch adds the ability for targets to stay sparse during block migration (if the zero_blocks capability is set) and qemu-img convert even if the target does not have has_zero_init = 1. the series was especially developed for iSCSI, but it should also work with other drivers with little or no

[Qemu-devel] [PATCHv2 20/20] block/raw: copy block limits and alignment information on raw_open

2013-09-17 Thread Peter Lieven
Signed-off-by: Peter Lieven p...@kamp.de --- block/raw_bsd.c |4 1 file changed, 4 insertions(+) diff --git a/block/raw_bsd.c b/block/raw_bsd.c index 0bfa5fc..dfdb375 100644 --- a/block/raw_bsd.c +++ b/block/raw_bsd.c @@ -149,6 +149,10 @@ static int raw_create(const char *filename,

[Qemu-devel] [PATCHv2 09/20] iscsi: simplify iscsi_co_discard

2013-09-17 Thread Peter Lieven
now that bdrv_co_discard can handle limits we do not need the request split logic here anymore. Signed-off-by: Peter Lieven p...@kamp.de --- block/iscsi.c | 67 + 1 file changed, 25 insertions(+), 42 deletions(-) diff --git

[Qemu-devel] [PATCHv2 10/20] iscsi: set limits in BlockDriverState

2013-09-17 Thread Peter Lieven
Signed-off-by: Peter Lieven p...@kamp.de --- block/iscsi.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/block/iscsi.c b/block/iscsi.c index aabcddb..21b1ecf 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -1362,6 +1362,16 @@ static int iscsi_open(BlockDriverState *bs, QDict

[Qemu-devel] [PATCHv2 17/20] block/get_block_status: fix BDRV_BLOCK_ZERO for unallocated blocks

2013-09-17 Thread Peter Lieven
this patch does 2 things: a) only do additional call outs if BDRV_BLOCK_ZERO is not already set. b) use the newly introduced bdrv_has_discard_zeroes() to return the zero state of an unallocated block. the used callout to bdrv_has_zero_init() is only valid right after bdrv_create.

[Qemu-devel] [PATCHv2 12/20] iscsi: add bdrv_co_write_zeroes

2013-09-17 Thread Peter Lieven
Signed-off-by: Peter Lieven p...@kamp.de --- block/iscsi.c | 59 + 1 file changed, 59 insertions(+) diff --git a/block/iscsi.c b/block/iscsi.c index 46c7c8d..4df33fc 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -56,6 +56,7 @@ typedef

[Qemu-devel] [PATCHv2 08/20] block: honour alignment and limit in bdrv_co_discard

2013-09-17 Thread Peter Lieven
Signed-off-by: Peter Lieven p...@kamp.de --- block.c | 34 +- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c index 74ec342..ecc5be4 100644 --- a/block.c +++ b/block.c @@ -4181,7 +4181,39 @@ int coroutine_fn

[Qemu-devel] [PATCHv2 19/20] qemu-img: conditionally zero out target on convert

2013-09-17 Thread Peter Lieven
if the target has_zero_init = 0, but supports efficiently writing zeroes by unmapping we call bdrv_zeroize to avoid fully allocating the target. this currently is designed especially for iscsi. Signed-off-by: Peter Lieven p...@kamp.de --- qemu-img.c | 10 +- 1 file changed, 9

[Qemu-devel] [PATCHv2 16/20] block/get_block_status: avoid redundant callouts on raw devices

2013-09-17 Thread Peter Lieven
if a raw device like an iscsi target or host device is used the current implementation makes a second call out to get the block status of bs-file. however, the raw driver already has called bdrv_get_block_status on bs-file. Reviewed-by: Eric Blake ebl...@redhat.com Signed-off-by: Peter Lieven

[Qemu-devel] [PATCHv2 14/20] block/get_block_status: set *pnum = 0 on error

2013-09-17 Thread Peter Lieven
if the call is invoked through bdrv_is_allocated the caller might expect *pnum = 0 on error. however, a new implementation of bdrv_get_block_status might only return a negative exit value on error while keeping *pnum untouched. Reviewed-by: Eric Blake ebl...@redhat.com Signed-off-by: Peter Lieven

[Qemu-devel] [PATCHv2 11/20] iscsi: add bdrv_has_discard_zeroes and bdrv_has_discard_write_zeroes

2013-09-17 Thread Peter Lieven
Signed-off-by: Peter Lieven p...@kamp.de --- block/iscsi.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/block/iscsi.c b/block/iscsi.c index 21b1ecf..46c7c8d 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -1440,6 +1440,18 @@ static int

[Qemu-devel] [PATCHv2 18/20] qemu-img: add support for fully allocated images

2013-09-17 Thread Peter Lieven
Signed-off-by: Peter Lieven p...@kamp.de --- qemu-img.c |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 3e5e388..7600b58 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -100,8 +100,10 @@ static void help(void) '-h' with or

[Qemu-devel] [ANNOUNCE] OSv, an new operating system for the cloud, v0.01

2013-09-17 Thread Pekka Enberg
Hello, We're proud to announce release 0.01 of OSv, a new operating system for running applications on virtual machines. OSv is free software, released under the BSD license, and you can find it in https://github.com/cloudius-systems/osv and http://www.osv.io. To build and run OSv under

[Qemu-devel] [Bug 1226531] [NEW] Incorrect logic in ARMv7M interrupt handler

2013-09-17 Thread benno
Public bug reported: On ARMv7M interrupts handlers will be called even if emulated code executes cpsid i instruction. Underlying cause described below: In cpu-exec.c:cpu_exec there is a block of code that determines if an interrupt should be raised or not: /* ARMv7-M

[Qemu-devel] Hibernate and qemu-nbd

2013-09-17 Thread Mark Trumpold
Hello, I have been using 'qemu-nbd' and 'qemu-img' for some time to provide loop filesystems in my environment. Recently I have been experimenting with hibernating (suspend to disk) the physical host on which I have qemu running. I am using the kernel functionality directly with the commands:

[Qemu-devel] [PATCHv2 05/20] block/raw: add bdrv_has_discard_zeroes and bdrv_has_discard_write_zeroes

2013-09-17 Thread Peter Lieven
Signed-off-by: Peter Lieven p...@kamp.de --- block/raw_bsd.c | 56 +-- 1 file changed, 34 insertions(+), 22 deletions(-) diff --git a/block/raw_bsd.c b/block/raw_bsd.c index bd4811b..0bfa5fc 100644 --- a/block/raw_bsd.c +++ b/block/raw_bsd.c

[Qemu-devel] [PATCHv2 07/20] block: honour alignment and limit in bdrv_co_do_write_zeroes

2013-09-17 Thread Peter Lieven
Signed-off-by: Peter Lieven p...@kamp.de --- block.c | 57 + 1 file changed, 41 insertions(+), 16 deletions(-) diff --git a/block.c b/block.c index 177720e..74ec342 100644 --- a/block.c +++ b/block.c @@ -2660,28 +2660,53 @@ static int

[Qemu-devel] [PATCHv2 15/20] block/get_block_status: avoid segfault if there is no backing_hd

2013-09-17 Thread Peter Lieven
Reviewed-by: Eric Blake ebl...@redhat.com Signed-off-by: Peter Lieven p...@kamp.de --- block.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block.c b/block.c index 805ee26..461a1d7 100644 --- a/block.c +++ b/block.c @@ -3195,7 +3195,7 @@ static int64_t coroutine_fn

[Qemu-devel] [PATCHv2 04/20] block: introduce bdrv_has_discard_zeroes and bdrv_has_discard_write_zeroes

2013-09-17 Thread Peter Lieven
Signed-off-by: Peter Lieven p...@kamp.de --- block.c | 29 + include/block/block.h |2 ++ include/block/block_int.h | 13 + 3 files changed, 44 insertions(+) diff --git a/block.c b/block.c index 6f498fc..177720e 100644 ---

[Qemu-devel] [PATCHv2 13/20] block: introduce bdrv_zeroize

2013-09-17 Thread Peter Lieven
this patch adds a call to completely zero out a block device. the operation is sped up by checking the block status and only writing zeroes to the device if they currently do not return zeroes. optionally the zero writing can be sped up by setting the flag BDRV_REQ_MAY_UNMAP to emulate the zero

Re: [Qemu-devel] [PATCH v4 04/33] tcg-aarch64: Hoist common argument loads in tcg_out_op

2013-09-17 Thread Richard Henderson
On 09/17/2013 01:01 AM, Claudio Fontana wrote: I don't have anything against it in principle, but just adding c0 and c1, which iirc should cover all uses, would be fine by me. Not really. There are 6 potential args[] values, 5 of which might be const_args[]. r~

Re: [Qemu-devel] [PATCH] qdev: fix crash when device_add is called with abstract driver

2013-09-17 Thread Paolo Bonzini
Il 17/09/2013 15:32, Igor Mammedov ha scritto: user is able to crash running QEMU when following monitor command is called: device_add intel-hda-generic crash is caused by assertion in object_initialize_with_type() when type is abstract. Checking if type is abstract before instance is

Re: [Qemu-devel] in_asm substitute for accel=kvm:tcg

2013-09-17 Thread Andriy Gapon
on 17/09/2013 15:32 Andreas Färber said the following: Hi, Am 17.09.2013 13:37, schrieb Andriy Gapon: It seems that when qemu is run with accel=kvm:tcg then -d in_asm does not produce anything. At least, with the qemu and kvm that I have access to. Are you saying that with accel=kvm:tcg

Re: [Qemu-devel] [PATCHv2 2/3] seccomp: adding command line support for blacklist

2013-09-17 Thread Paul Moore
On Tuesday, September 17, 2013 02:06:06 PM Daniel P. Berrange wrote: On Tue, Sep 17, 2013 at 10:01:23AM -0300, Eduardo Otubo wrote: Paul, what exactly are you planning to add to libvirt? I'm not a big fan of using qemu command line to pass syscalls for blacklist as arguments, but I can't

Re: [Qemu-devel] [PATCH v2 00/38] Delay destruction of memory regions to instance_finalize

2013-09-17 Thread Paolo Bonzini
Il 17/09/2013 14:47, Michael S. Tsirkin ha scritto: Ergo, to make sure a referenced MR does not get destroyed, we must make sure only finalize calls memory_region_destroy. So I think this patchset should do exactly that, not try to move out more stuff to finalize. Yes, this is the part of

Re: [Qemu-devel] [PATCH v2 00/38] Delay destruction of memory regions to instance_finalize

2013-09-17 Thread Michael S. Tsirkin
On Tue, Sep 17, 2013 at 04:41:45PM +0200, Paolo Bonzini wrote: Il 17/09/2013 14:47, Michael S. Tsirkin ha scritto: Ergo, to make sure a referenced MR does not get destroyed, we must make sure only finalize calls memory_region_destroy. So I think this patchset should do exactly that,

Re: [Qemu-devel] [PATCH v2 0/7] smbios cleanup nicer defaults for type 1

2013-09-17 Thread Michael S. Tsirkin
On Fri, Aug 16, 2013 at 03:18:27PM +0200, arm...@redhat.com wrote: From: Markus Armbruster arm...@redhat.com This gets rid of one of the last get_param_value() users, makes multiple -smbios work sanely, cleans up the gross side effect in qemu_uuid_parse(), and more. Topped off with a little

Re: [Qemu-devel] Q35 FreeBSD install status

2013-09-17 Thread Bret Ketchum
The emulated e1000 uses legacy interrupts. I'm wondering if someone can help me understand the mptable (used by FreeBSD to route interrupts and defined in Intel's MP spec): Bus:Bus ID Type 0 PCI 1 ISA I/O APICs: APIC ID

Re: [Qemu-devel] [PATCH v4 08/33] tcg-aarch64: Introduce tcg_fmt_Rdnm and tcg_fmt_Rdnm_lsl

2013-09-17 Thread Richard Henderson
On 09/17/2013 01:23 AM, Claudio Fontana wrote: It would have been handy if ARM had officially assigned identifiers to the formats, like Power, S390, and ia64 do. Then one can build in the format ids into both the function and enumeration names and use the preprocessor for typechecking (c.f.

Re: [Qemu-devel] [RFC] [PATCHv10 00/31] aio / timers: Add AioContext timers and use ppoll

2013-09-17 Thread Jan Kiszka
On 2013-08-13 16:22, Stefan Hajnoczi wrote: On Tue, Aug 13, 2013 at 03:45:44PM +0200, Jan Kiszka wrote: On 2013-08-13 15:39, Alex Bligh wrote: Jan, On 13 Aug 2013, at 14:25, Jan Kiszka wrote: To my understanding, the use case behind the current behavior is qemu_aio_wait() which is only

Re: [Qemu-devel] Merging the quorum block driver

2013-09-17 Thread Benoît Canet
Le Tuesday 17 Sep 2013 à 14:44:13 (+0200), Stefan Hajnoczi a écrit : Hi Benoit, Kevin and I had a chance to chat face-to-face and we discussed what concrete changes are necessary to merge quorum (without solving all the other block layers problems at once). I think quorum could be merged

Re: [Qemu-devel] [PATCH v4 22/33] tcg-aarch64: Use MOVN in tcg_out_movi

2013-09-17 Thread Richard Henderson
On 09/17/2013 12:55 AM, Claudio Fontana wrote: On 16.09.2013 17:50, Richard Henderson wrote: On 09/16/2013 02:16 AM, Claudio Fontana wrote: I agree in general with the approach lets see if it is more convenient to start with MOVN. The existing implementation is, although not easy, leaner.

[Qemu-devel] [PATCH] qemu_coroutine_yield benchmark

2013-09-17 Thread Gabriel Kerneis
Current coroutine performance benchmarks test only coroutine creation, either directly or in a nested way. This patch adds a benchmark to evaluate the performance of qemu_coroutine_yield. Signed-off-by: Gabriel Kerneis gabr...@kerneis.info --- tests/test-coroutine.c | 33

Re: [Qemu-devel] [PATCH v2 00/38] Delay destruction of memory regions to instance_finalize

2013-09-17 Thread Paolo Bonzini
Il 17/09/2013 16:45, Michael S. Tsirkin ha scritto: On Tue, Sep 17, 2013 at 04:41:45PM +0200, Paolo Bonzini wrote: Il 17/09/2013 14:47, Michael S. Tsirkin ha scritto: Ergo, to make sure a referenced MR does not get destroyed, we must make sure only finalize calls memory_region_destroy. So I

  1   2   >