[Qemu-devel] [PATCH 2/2] monitor: support sub commands in auto completion

2013-06-20 Thread Wenchao Xia
This patch allow auot completion work normal in sub command case, "info block [DEVICE]" can auto complete now, by re-enter the completion function. Also, original "info" is treated as a special case, now it is treated as a sub command group, global variable info_cmds is not used any more. Signed-o

[Qemu-devel] [PATCH V2 8/9] NUMA: add hmp command set-mpol

2013-06-20 Thread Wanlong Gao
Add hmp command set-mpol to set host memory policy for a guest NUMA node. Then we can also set node's memory policy using the monitor command like: (qemu) set-mpol 0 mem-policy=membind,mem-hostnode=0-1 Signed-off-by: Wanlong Gao --- hmp-commands.hx | 16 hmp.c | 35

[Qemu-devel] [PATCH 0/2] support sub command group for auto completion in monitor

2013-06-20 Thread Wenchao Xia
This patch modified auto completion a bit, to make it work when there is a folded sub command group, for example, "info" is a sub command group of root command group. Note that at patch 1, the parameter *mon and *cmd_table is brought until monitor_init() level. If *cmd_table is added also in it, a

[Qemu-devel] [PATCH V2 9/9] NUMA: show host memory policy info in info numa command

2013-06-20 Thread Wanlong Gao
Show host memory policy of nodes in the info numa monitor command. After this patch, the monitor command "info numa" will show the information like following if the host numa support is enabled: (qemu) info numa 2 nodes node 0 cpus: 0 node 0 size: 1024 MB node 0 mempolicy: memb

[Qemu-devel] [PATCH V2 3/9] NUMA: Add Linux libnuma detection

2013-06-20 Thread Wanlong Gao
Add detection of libnuma (mostly contained in the numactl package) to the configure script. Can be enabled or disabled on the command line, default is use if available. Signed-off-by: Andre Przywara Signed-off-by: Wanlong Gao --- configure | 32 1 file changed,

[Qemu-devel] [PATCH V2 7/9] NUMA: add qmp command set-mpol to set memory policy for NUMA node

2013-06-20 Thread Wanlong Gao
The QMP command let it be able to set node's memory policy through the QMP protocol. The qmp-shell command is like: set-mpol nodeid=0 mem-policy=membind mem-hostnode=0-1 Signed-off-by: Wanlong Gao --- cpus.c | 54 ++ qapi-schema.j

[Qemu-devel] [PATCH V2 4/9] NUMA: parse guest numa nodes memory policy

2013-06-20 Thread Wanlong Gao
The memory policy setting format is like: mem-policy={membind|interleave|preferred},mem-hostnode=[+|!]{all|N-N} And we are adding this setting as a suboption of "-numa", the memory policy then can be set like following: -numa node,nodeid=0,mem=1024,cpus=0,mem-policy=membind,mem-hostnode=0-1 -numa

[Qemu-devel] [PATCH V2 5/9] NUMA: set guest numa nodes memory policy

2013-06-20 Thread Wanlong Gao
Set the guest numa nodes memory policies using the mbind(2) system call node by node. After this patch, we are able to set guest nodes memory policies through the QEMU options, this arms to solve the guest cross nodes memory access performance issue. And as you all know, if PCI-passthrough is used,

[Qemu-devel] [PATCH V2 0/9] Add support for binding guest numa nodes to host numa nodes

2013-06-20 Thread Wanlong Gao
As you know, QEMU can't direct it's memory allocation now, this may cause guest cross node access performance regression. And, the worse thing is that if PCI-passthrough is used, direct-attached-device uses DMA transfer between device and qemu process. All pages of the guest will be pinned by get

[Qemu-devel] [PATCH V2 1/9] NUMA: Support multiple CPU ranges on -numa option

2013-06-20 Thread Wanlong Gao
From: Bandan Das This allows us to use the "cpus" property multiple times to specify multiple cpu (ranges) to the -numa option : -numa node,cpus=1,cpus=2,cpus=4 or -numa node,cpus=1-3,cpus=5 Signed-off-by: Bandan Das Signed-off-by: Wanlong Gao --- qemu-options.hx | 3 +- vl.c|

Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-20 Thread Benjamin Herrenschmidt
On Fri, 2013-06-21 at 00:03 -0600, Alex Williamson wrote: > On Fri, 2013-06-21 at 15:12 +1000, Benjamin Herrenschmidt wrote: > > On Thu, 2013-06-20 at 22:46 -0600, Alex Williamson wrote: > > > Maybe you could add a device parameter to kvm_irqchip_add_msi_route so > > > that it can be implemented on

Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-20 Thread Alex Williamson
On Fri, 2013-06-21 at 15:12 +1000, Benjamin Herrenschmidt wrote: > On Thu, 2013-06-20 at 22:46 -0600, Alex Williamson wrote: > > Maybe you could add a device parameter to kvm_irqchip_add_msi_route so > > that it can be implemented on POWER without this pci_bus_map_msi > > interface that seems very

Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-20 Thread Benjamin Herrenschmidt
On Thu, 2013-06-20 at 22:46 -0600, Alex Williamson wrote: > Maybe you could add a device parameter to kvm_irqchip_add_msi_route so > that it can be implemented on POWER without this pci_bus_map_msi > interface that seems very unique to POWER. Thanks, You mean unique to all non-x86 ? :-) I believ

Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-20 Thread Alex Williamson
On Fri, 2013-06-21 at 12:49 +1000, Alexey Kardashevskiy wrote: > On 06/21/2013 12:34 PM, Alex Williamson wrote: > > On Fri, 2013-06-21 at 11:56 +1000, Alexey Kardashevskiy wrote: > >> On 06/21/2013 02:51 AM, Alex Williamson wrote: > >>> On Fri, 2013-06-21 at 00:08 +1000, Alexey Kardashevskiy wrote:

Re: [Qemu-devel] [PATCH v3 2/2] QEMUBH: make AioContext's bh re-entrant

2013-06-20 Thread liu ping fan
[...] >>> >>> qemu_bh_delete is safe as long as you wait for the bottom half to stop >>> before deleting the containing object. Once we have RCU, deletion of >>> QOM objects will be RCU-protected. Hence, a simple way could be to put >>> the first part of aio_bh_poll() within rcu_read_lock/unlock.

[Qemu-devel] Object cast macro change-pattern automation.

2013-06-20 Thread Peter Crosthwaite
Hi Andreas, Hu, I thought Id share with you a little script I made (not very polished) that I used to help with some of my patches creating the QOM cast macros (mainly the PCI ones). May be useful in speeding up the QOMification effort. Andreas, im guessing you may have something similar going if

Re: [Qemu-devel] [PATCH] hmp: Make "info block" output more readable

2013-06-20 Thread Luiz Capitulino
On Wed, 19 Jun 2013 16:10:55 +0200 Kevin Wolf wrote: > HMP is meant for humans and you should notice it. > > This changes the output format to use a bit more space to display the > information more readable and leaves out irrelevant information (e.g. > mention only that an image is encrypted, bu

Re: [Qemu-devel] [PATCH] full introspection support for QMP

2013-06-20 Thread Luiz Capitulino
On Wed, 19 Jun 2013 20:24:37 +0800 Amos Kong wrote: > Introduces new monitor command to query QMP schema information, > the return data is a nested dict/list, it contains the useful > metadata. Thanks for the good work, Amos! When testing this though I actually get qemu-ga's schema, not qmp's.

Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-20 Thread Alexey Kardashevskiy
On 06/21/2013 12:34 PM, Alex Williamson wrote: > On Fri, 2013-06-21 at 11:56 +1000, Alexey Kardashevskiy wrote: >> On 06/21/2013 02:51 AM, Alex Williamson wrote: >>> On Fri, 2013-06-21 at 00:08 +1000, Alexey Kardashevskiy wrote: At the moment QEMU creates a route for every MSI IRQ. N

Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-20 Thread Alex Williamson
On Fri, 2013-06-21 at 11:56 +1000, Alexey Kardashevskiy wrote: > On 06/21/2013 02:51 AM, Alex Williamson wrote: > > On Fri, 2013-06-21 at 00:08 +1000, Alexey Kardashevskiy wrote: > >> At the moment QEMU creates a route for every MSI IRQ. > >> > >> Now we are about to add IRQFD support on PPC64-pser

[Qemu-devel] [PATCH] Fix iSCSI crash on SG_IO with an iovector

2013-06-20 Thread Ronnie Sahlberg
Don't assume that SG_IO is always invoked with a simple buffer, check the iovec_count and if it is > 1 then we need to pass an array of iovectors to libiscsi instead of just a plain buffer. Signed-off-by: Ronnie Sahlberg --- block/iscsi.c | 31 --- 1 files changed,

[Qemu-devel] [PATCH] iSCSI fix crash when using virtio and libiscsi

2013-06-20 Thread Ronnie Sahlberg
Stefan, List Please find a patch that fixes the crashes for using virtio with libiscsi. The problem was that block/iscsi.c always assumed we got a plain buffer to read data into, and when we got an iovector array instead we would overwrite pointers with garbage and crash. Since we can get iovec

Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-20 Thread Alexey Kardashevskiy
On 06/21/2013 02:51 AM, Alex Williamson wrote: > On Fri, 2013-06-21 at 00:08 +1000, Alexey Kardashevskiy wrote: >> At the moment QEMU creates a route for every MSI IRQ. >> >> Now we are about to add IRQFD support on PPC64-pseries platform. >> pSeries already has in-kernel emulated interrupt control

[Qemu-devel] QEMU Memory subsystem

2013-06-20 Thread Basim Baig
Hello, I am currently working on a project where I aim to log every memory access made by a virtual machine running inside of QEMU (for analyzing kernel behavior). My initial approach is to possibly hook into the QEMU mmu implementation and find the place where the guest->host page translation or

Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-20 Thread Alexey Kardashevskiy
On 06/21/2013 02:37 AM, Anthony Liguori wrote: > Alexey Kardashevskiy writes: > >> At the moment QEMU creates a route for every MSI IRQ. >> >> Now we are about to add IRQFD support on PPC64-pseries platform. >> pSeries already has in-kernel emulated interrupt controller with >> 8192 IRQs. Also, p

Re: [Qemu-devel] [PATCH] target-arm: implement ARMv8 VSEL instruction

2013-06-20 Thread Måns Rullgård
Peter Maydell writes: > On 18 June 2013 15:30, Mans Rullgard wrote: >> This adds support for the VSEL instruction introduced in ARMv8. >> It resides along with other new VFP instructions under the CDP2 >> encoding which was previously unused. >> >> Signed-off-by: Mans Rullgard > > So I found th

Re: [Qemu-devel] [PATCH v2] e600 core for MPC86xx processors

2013-06-20 Thread Alexander Graf
On 26.05.2013, at 19:41, Julio Guerra wrote: > MPC86xx processors are based on the e600 core, which is not the case > in qemu where it is based on the 7400 processor. > > This patch creates the e600 core and instantiates the MPC86xx > processors based on it. Therefore, adding the high BATs and t

Re: [Qemu-devel] [PATCH] pseries: Support for in-kernel XICS interrupt controller

2013-06-20 Thread Alexander Graf
On 05.06.2013, at 09:39, Alexey Kardashevskiy wrote: > 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'

Re: [Qemu-devel] [PATCH v4] target-ppc: Introduce unrealizefn for PowerPCCPU

2013-06-20 Thread Alexander Graf
On 09.06.2013, at 22:11, Andreas Färber wrote: > Use it to clean up the opcode table, resolving a former TODO from Jocelyn. > Also switch from malloc() to g_malloc(). > > Signed-off-by: Andreas Färber Thanks, applied to ppc-next. Alex

Re: [Qemu-devel] [PATCH] booke_ppc: limit booke timer to max when timeout overflow

2013-06-20 Thread Alexander Graf
On 12.06.2013, at 14:30, Bharat Bhushan wrote: > Limit watchdog and fit timer to maximum timeout value which > qemu timer can support (INT64_MAX). This maximum timeout will be > hundreds of years, so limiting to max timeout is pretty safe. > > Signed-off-by: Bharat Bhushan Thanks, applied to p

Re: [Qemu-devel] [PATCH 07/12] block: save the associated child in BlockDriverState

2013-06-20 Thread Paolo Bonzini
Il 20/06/2013 19:46, Marc-André Lureau ha scritto: > This allows the Spice block driver to eject the associated device. The child can change when you have for example a streaming operation. What exactly are you trying to do here (I guess I'll understand more when I get to the later patches)? Can

Re: [Qemu-devel] [PATCH 02/12] qtest: add spapr hypercall support

2013-06-20 Thread Alexander Graf
On 20.06.2013, at 20:58, Anthony Liguori wrote: > Alexander Graf writes: > >> Am 20.06.2013 um 17:42 schrieb Anthony Liguori : >> >>> Andreas Färber writes: >>> Am 19.06.2013 22:40, schrieb Anthony Liguori: > Signed-off-by: Anthony Liguori > --- > qtest.c | 29

Re: [Qemu-devel] git tag for 1.4.2

2013-06-20 Thread Peter Feiner
I had this same question. I'm not sure why it wasn't added to the mainline qemu.git. In any case, you can get the commits and tag from git:// git.qemu.org/qemu-stable-1.4.git (git remote add stable-1.4 git:// git.qemu.org/qemu-stable-1.4.git && git fetch stable-1.4). Peter On Fri, May 31, 2013 a

Re: [Qemu-devel] [PATCH] int128: optimize

2013-06-20 Thread Paolo Bonzini
Il 20/06/2013 18:46, Richard Henderson ha scritto: > On 06/20/2013 08:00 AM, Paolo Bonzini wrote: >> static inline Int128 int128_sub(Int128 a, Int128 b) >> { >> -return int128_add(a, int128_neg(b)); >> +uint64_t lo = a.lo - b.lo; >> +return (Int128) { lo, (lo < a.lo) + a.hi - b.hi };

Re: [Qemu-devel] [PULL 00/21] pci,net,misc enhancements

2013-06-20 Thread Anthony Liguori
Gleb Natapov writes: > On Thu, Jun 20, 2013 at 02:02:59PM -0500, Anthony Liguori wrote: >> "Michael S. Tsirkin" writes: >> >> > From: Michael S. Tsirkin >> > >> > The following changes since commit >> > 90a2541b763b31d2b551b07e24aae3de5266d31b: >> > >> > target-i386: fix over 80 chars warni

Re: [Qemu-devel] [PULL 00/21] pci,net,misc enhancements

2013-06-20 Thread Gleb Natapov
On Thu, Jun 20, 2013 at 02:02:59PM -0500, Anthony Liguori wrote: > "Michael S. Tsirkin" writes: > > > From: Michael S. Tsirkin > > > > The following changes since commit 90a2541b763b31d2b551b07e24aae3de5266d31b: > > > > target-i386: fix over 80 chars warnings (2013-06-15 17:50:38 +) > > >

Re: [Qemu-devel] [PATCH 01/12] chardev: ringbuf: add optional save parameter to save state

2013-06-20 Thread Eric Blake
On 06/19/2013 09:40 PM, Anthony Liguori wrote: > It is very useful to use the ringbuf chardev for writing test > cases and even more useful if the state of the ringbuf is migrated > with the guest. Otherwise it's hard to detect data loss in a test > case. > > Signed-off-by: Anthony Liguori > ---

Re: [Qemu-devel] [Qemu-ppc] [PATCH 02/12] qtest: add spapr hypercall support

2013-06-20 Thread Scott Wood
On 06/20/2013 01:58:55 PM, Anthony Liguori wrote: Alexander Graf writes: > Am 20.06.2013 um 17:42 schrieb Anthony Liguori : > >> Andreas Färber writes: >> >>> The functions are called spapr_hcall*() but the protocol uses >>> papr_hypercall? >> >> The discrepancy is inherited in the KVM vs.

Re: [Qemu-devel] [PATCH] target-arm: implement ARMv8 VSEL instruction

2013-06-20 Thread Peter Maydell
On 18 June 2013 15:30, Mans Rullgard wrote: > This adds support for the VSEL instruction introduced in ARMv8. > It resides along with other new VFP instructions under the CDP2 > encoding which was previously unused. > > Signed-off-by: Mans Rullgard So I found this pretty confusing, which I think

Re: [Qemu-devel] qemu-ga behavior on virtio-serial unplug

2013-06-20 Thread Laszlo Ersek
On 06/20/13 15:31, Amit Shah wrote: > On (Wed) 19 Jun 2013 [13:17:57], Laszlo Ersek wrote: >> In any case we'd need a way to tell "host side close" from "port unplug". > > Will POLLHUP|POLLERR help, along with error returns on read() and > write()? I think so: - read() == 0 --> host side discon

[Qemu-devel] [PATCH 1/2] iscsi: add support for bdrv_co_is_allocated()

2013-06-20 Thread Peter Lieven
Signed-off-by: Peter Lieven --- block/iscsi.c | 57 + 1 file changed, 57 insertions(+) diff --git a/block/iscsi.c b/block/iscsi.c index 0bbf0b1..e6b966d 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -49,6 +49,7 @@ typedef struct Iscsi

Re: [Qemu-devel] [PULL 00/21] pci,net,misc enhancements

2013-06-20 Thread Anthony Liguori
"Michael S. Tsirkin" writes: > From: Michael S. Tsirkin > > The following changes since commit 90a2541b763b31d2b551b07e24aae3de5266d31b: > > target-i386: fix over 80 chars warnings (2013-06-15 17:50:38 +) > > are available in the git repository at: > > git://git.kernel.org/pub/scm/virt/k

Re: [Qemu-devel] [PATCH 02/12] qtest: add spapr hypercall support

2013-06-20 Thread Anthony Liguori
Alexander Graf writes: > Am 20.06.2013 um 17:42 schrieb Anthony Liguori : > >> Andreas Färber writes: >> >>> Am 19.06.2013 22:40, schrieb Anthony Liguori: Signed-off-by: Anthony Liguori --- qtest.c | 29 + tests/libqtest.c | 18 ++

[Qemu-devel] [PATCH 0/2] iscsi: support for is_allocated and inproved has_zero_init

2013-06-20 Thread Peter Lieven
These two patches add the possibility for qemu-img convert to reliably skip zero blocks when writing to an iscsi target. Peter Lieven (2): iscsi: add support for bdrv_co_is_allocated() iscsi: add intelligent has_zero_init check block/iscsi.c | 82 ++

[Qemu-devel] [PATCH 2/2] iscsi: add intelligent has_zero_init check

2013-06-20 Thread Peter Lieven
iscsi targets are not created by bdrv_create and thus we cannot blindly assume that a target is empty. to avoid writing and allocating blocks of zeroes we now check if all blocks of an existing target are unallocated and return 1 for bdrv_has_zero_init if the target is completely unalloacted and un

Re: [Qemu-devel] [PATCH 02/12] qtest: add spapr hypercall support

2013-06-20 Thread Alexander Graf
Am 20.06.2013 um 17:42 schrieb Anthony Liguori : > Andreas Färber writes: > >> Am 19.06.2013 22:40, schrieb Anthony Liguori: >>> Signed-off-by: Anthony Liguori >>> --- >>> qtest.c | 29 + >>> tests/libqtest.c | 18 ++ >>> tests/libqtest.h | 4

[Qemu-devel] [PATCH 1/2] iscsi: add support for bdrv_co_is_allocated()

2013-06-20 Thread Peter Lieven
Signed-off-by: Peter Lieven --- block/iscsi.c | 57 + 1 file changed, 57 insertions(+) diff --git a/block/iscsi.c b/block/iscsi.c index 0bbf0b1..e6b966d 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -49,6 +49,7 @@ typedef struct Iscsi

[Qemu-devel] [PATCH 2/2] iscsi: add intelligent has_zero_init check

2013-06-20 Thread Peter Lieven
iscsi targets are not created by bdrv_create and thus we cannot blindly assume that a target is empty. to avoid writing and allocating blocks of zeroes we now check if all blocks of an existing target are unallocated and return 1 for bdrv_has_zero_init if the target is completely unalloacted and un

[Qemu-devel] [PATCH 0/2] iscsi: support for is_allocated and inproved has_zero_init

2013-06-20 Thread Peter Lieven
These two patches add the possibility for qemu-img convert to reliably skip zero blocks when writing to an iscsi target. Peter Lieven (2): iscsi: add support for bdrv_co_is_allocated() iscsi: add intelligent has_zero_init check block/iscsi.c | 82 ++

[Qemu-devel] [PATCH 05/12] nbd: pass export name as init argument

2013-06-20 Thread Marc-André Lureau
There is no need to keep the export name around, and it seems a better fit as an argument in the init() call. Signed-off-by: Marc-André Lureau --- block/nbd-client.c | 8 block/nbd-client.h | 5 ++--- block/nbd.c| 13 - 3 files changed, 14 insertions(+), 12 deletio

[Qemu-devel] [PATCH 09/12] block: add "snapshot.size" option to avoid extra bdrv_open()

2013-06-20 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/block.c b/block.c index 5db8fa1..b421083 100644 --- a/block.c +++ b/block.c @@ -1046,20 +1046,25 @@ int bdrv_open(BlockDriverState *bs, const char *filename, QDict

[Qemu-devel] [PATCH 01/12] include: add missing config-host.h include

2013-06-20 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- include/ui/qemu-spice.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/ui/qemu-spice.h b/include/ui/qemu-spice.h index eba6d77..a92b2cf 100644 --- a/include/ui/qemu-spice.h +++ b/include/ui/qemu-spice.h @@ -18,6 +18,8 @@ #ifndef QEMU_SPICE_H #

[Qemu-devel] [PATCH 02/12] char: add qemu_chr_fe_event()

2013-06-20 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- include/sysemu/char.h | 10 ++ qemu-char.c | 7 +++ spice-qemu-char.c | 10 ++ 3 files changed, 27 insertions(+) diff --git a/include/sysemu/char.h b/include/sysemu/char.h index 066c216..eee70fe 100644 --- a/include/sysemu/c

[Qemu-devel] [PATCH 07/12] block: save the associated child in BlockDriverState

2013-06-20 Thread Marc-André Lureau
This allows the Spice block driver to eject the associated device. Signed-off-by: Marc-André Lureau --- block.c | 46 +- include/block/block_int.h | 1 + 2 files changed, 30 insertions(+), 17 deletions(-) diff --git a/block.c b/bloc

[Qemu-devel] [PATCH 11/12] block: allow to call bdrv_open() with an opaque

2013-06-20 Thread Marc-André Lureau
If the block driver already has a bs->opaque when calling bdrv_open(), pass it down to the file driver. Signed-off-by: Marc-André Lureau --- block.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/block.c b/block.c index bdffb42..ff9cb0b 100644 --- a/block.c +++ b/blo

[Qemu-devel] [PATCH 00/12] RFC: add Spice block device

2013-06-20 Thread Marc-André Lureau
Hi, The following patch series implement a Spice block device, which allows the client to redirect a block device using the NBD protocol, which greatly simplifies the Spice code by reusing an existing protocol, and allows sharing existing qemu NBD implementation. This block device driver is a bit

Re: [Qemu-devel] [PATCH v2] target-arm: implement LDA/STL instructions

2013-06-20 Thread Peter Maydell
On 17 June 2013 17:50, Mans Rullgard wrote: > This adds support for the ARMv8 load acquire/store release instructions. > Since qemu does nothing special for memory barriers, these can be > emulated like their non-acquire/release counterparts. Couple more minor issues, otherwise looks good. >

[Qemu-devel] [PATCH 06/12] nbd: make session_close() idempotent

2013-06-20 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/nbd-client.c | 5 + 1 file changed, 5 insertions(+) diff --git a/block/nbd-client.c b/block/nbd-client.c index b7eea21..c49be30 100644 --- a/block/nbd-client.c +++ b/block/nbd-client.c @@ -352,7 +352,12 @@ static void nbd_teardown_connection(NbdClie

[Qemu-devel] [PATCH 03/12] nbd: don't change socket block during negotiate

2013-06-20 Thread Marc-André Lureau
The caller might handle non-blocking using coroutine. Leave the choice to the caller to use a blocking or non-blocking noegotiate. Signed-off-by: Marc-André Lureau --- nbd.c | 1 - 1 file changed, 1 deletion(-) diff --git a/nbd.c b/nbd.c index 2606403..2f8c946 100644 --- a/nbd.c +++ b/nbd.c @@

Re: [Qemu-devel] Virtio-Balloon : config_set_size

2013-06-20 Thread Luiz Capitulino
On Thu, 20 Jun 2013 12:49:17 +0800 Saptarshi Sen wrote: > Hi all, > > I am experimenting with the Virtio- balloon driver in qemu. > > When I set the balloon size to a arbitrary low value. I see > the actual value of the balloon set is not what I intended > but to a level probab

[Qemu-devel] [PATCH 04/12] Split nbd block client code

2013-06-20 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/Makefile.objs | 2 +- block/nbd-client.c | 386 +++ block/nbd-client.h | 52 +++ block/nbd.c | 387 4 files changed, 469 insertions(+),

[Qemu-devel] [PATCH 12/12] block: add spice block device backend

2013-06-20 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/Makefile.objs | 1 + block/spice.c | 523 2 files changed, 524 insertions(+) create mode 100644 block/spice.c diff --git a/block/Makefile.objs b/block/Makefile.objs index 5890b5c..0170011 100

[Qemu-devel] [PATCH 08/12] block: extract make_snapshot() from bdrv_open()

2013-06-20 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block.c | 107 +--- 1 file changed, 62 insertions(+), 45 deletions(-) diff --git a/block.c b/block.c index f502eed..5db8fa1 100644 --- a/block.c +++ b/block.c @@ -959,6 +959,65 @@ static void extract

[Qemu-devel] [PATCH 10/12] block: learn to open a driver with a given opaque

2013-06-20 Thread Marc-André Lureau
If the block driver is given an opaque data, there is no need to allocate a new one. This allows to pass an existing driver state to the new driver. Signed-off-by: Marc-André Lureau --- block.c | 47 --- 1 file changed, 28 insertions(+), 19 deletions(-

Re: [Qemu-devel] [RFC PATCH 0/4] per-object libraries

2013-06-20 Thread Richard Henderson
On 06/20/2013 02:49 AM, Paolo Bonzini wrote: > This only leaves Darwin. I have no idea about that, and I don't have > anymore a machine to test it. Andreas or Peter, can you shed light? I have an idea that -shared works there as well. r~

Re: [Qemu-devel] [PULL 18/21] pci: Add root bus parameter to pci_nic_init()

2013-06-20 Thread Richard Henderson
On 06/20/2013 06:11 AM, Michael S. Tsirkin wrote: > From: David Gibson > > At present, pci_nic_init() and pci_nic_init_nofail() assume that they will > only create a NIC under the primary PCI root. As we add support for > multiple PCI roots, that may no longer be the case. This patch adds a roo

Re: [Qemu-devel] [PATCH 1/1] tcg/aarch64: Implement tlb lookup fast path

2013-06-20 Thread Richard Henderson
On 06/20/2013 03:53 AM, Jani Kokkonen wrote: > #ifndef _EXEC_ALL_H_ > #define _EXEC_ALL_H_ > - > #include "qemu-common.h" > - Whitespace change? > +/* Load and compare a TLB entry, emitting the conditional jump to the > +slow path for the failure case, which will be patched later when finalizi

Re: [Qemu-devel] [PATCH 1/1] tcg/aarch64: Implement tlb lookup fast path

2013-06-20 Thread Richard Henderson
On 06/20/2013 07:58 AM, Claudio Fontana wrote: >> > +tcg_out_ldst(s, TARGET_LONG_BITS == 64 ? LDST_64 : LDST_32, >> > + LDST_LD, TCG_REG_X0, TCG_REG_X2, tlb_offset & 0xfff); >> > +tcg_out_ldst(s, LDST_64, LDST_LD, TCG_REG_X1, TCG_REG_X2, >> > +(tlb_offset & 0xfff) +

Re: [Qemu-devel] [PATCH 03/12] qtest: return string from QMP commands

2013-06-20 Thread Anthony Liguori
Andreas Färber writes: > Am 19.06.2013 22:40, schrieb Anthony Liguori: >> Signed-off-by: Anthony Liguori >> --- >> tests/libqtest.c | 16 +--- >> tests/libqtest.h | 14 +++--- >> 2 files changed, 24 insertions(+), 6 deletions(-) >> >> diff --git a/tests/libqtest.c b/tests/l

Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-20 Thread Alex Williamson
On Fri, 2013-06-21 at 00:08 +1000, Alexey Kardashevskiy wrote: > At the moment QEMU creates a route for every MSI IRQ. > > Now we are about to add IRQFD support on PPC64-pseries platform. > pSeries already has in-kernel emulated interrupt controller with > 8192 IRQs. Also, pSeries PHB already supp

Re: [Qemu-devel] [PATCH] int128: optimize

2013-06-20 Thread Richard Henderson
On 06/20/2013 08:00 AM, Paolo Bonzini wrote: > static inline Int128 int128_sub(Int128 a, Int128 b) > { > -return int128_add(a, int128_neg(b)); > +uint64_t lo = a.lo - b.lo; > +return (Int128) { lo, (lo < a.lo) + a.hi - b.hi }; This one isn't right. Consider { 2, 0 } - { 2, 0 } lo

Re: [Qemu-devel] Java volatile vs. C11 seq_cst (was Re: [PATCH v2 1/2] add a header file for atomic operations)

2013-06-20 Thread Paul E. McKenney
On Wed, Jun 19, 2013 at 09:11:36AM +0200, Torvald Riegel wrote: > On Tue, 2013-06-18 at 18:53 -0700, Paul E. McKenney wrote: > > On Tue, Jun 18, 2013 at 05:37:42PM +0200, Torvald Riegel wrote: > > > On Tue, 2013-06-18 at 07:50 -0700, Paul E. McKenney wrote: > > > > First, I am not a fan of SC, most

Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-20 Thread Anthony Liguori
Alexey Kardashevskiy writes: > At the moment QEMU creates a route for every MSI IRQ. > > Now we are about to add IRQFD support on PPC64-pseries platform. > pSeries already has in-kernel emulated interrupt controller with > 8192 IRQs. Also, pSeries PHB already supports MSIMessage to IRQ > mapping

Re: [Qemu-devel] [PATCH 07/12] spapr-rtas: add CPU argument to RTAS calls

2013-06-20 Thread Anthony Liguori
Andreas Färber writes: > Am 19.06.2013 22:40, schrieb Anthony Liguori: >> RTAS is a hypervisor provided binary blob that a guest loads and >> calls into to execute certain functions. It's similar to the >> vsyscall page in Linux or the short lived VMCI paravirt interface >> from VMware. >> >> T

Re: [Qemu-devel] [PATCH v3] vl.c: Support multiple CPU ranges on -numa option

2013-06-20 Thread Bandan Das
Paolo Bonzini writes: > Il 20/06/2013 15:26, Eduardo Habkost ha scritto: >> On Thu, Jun 20, 2013 at 11:52:42AM +0200, Paolo Bonzini wrote: >>> Il 20/06/2013 11:30, Igor Mammedov ha scritto: >> So, basically the format seemed easier to work with if we are >> thinking >> o

Re: [Qemu-devel] Adding a persistent writeback cache to qemu

2013-06-20 Thread Sage Weil
On Thu, 20 Jun 2013, Stefan Hajnoczi wrote: > > The concrete problem here is that flashcache/dm-cache/bcache don't > > work with the rbd (librbd) driver, as flashcache/dm-cache/bcache > > cache access to block devices (in the host layer), and with rbd > > (for instance) there is no access to a bloc

[Qemu-devel] [PATCH] linux-user: Fix sys_utimensat (would not compile on old glibc)

2013-06-20 Thread Peter Maydell
Commit c0d472b12e accidentally dropped the definition of __NR_SYS_utimensat even though its use is guarded by CONFIG_UTIMENSAT, not CONFIG_ATFILE. Some older glibc don't have utimensat() (even if they have the other *at() functions). Fix this by correctly cleaning up the sys_utimensat() implementat

Re: [Qemu-devel] [PATCH 07/12] spapr-rtas: add CPU argument to RTAS calls

2013-06-20 Thread Andreas Färber
Am 19.06.2013 22:40, schrieb Anthony Liguori: > RTAS is a hypervisor provided binary blob that a guest loads and > calls into to execute certain functions. It's similar to the > vsyscall page in Linux or the short lived VMCI paravirt interface > from VMware. > > The QEMU implementation of the RTA

Re: [Qemu-devel] [PATCH 0/2] Remove hardcoded xen-platform device initialization (v4)

2013-06-20 Thread Paolo Bonzini
Il 18/06/2013 16:22, Michael S. Tsirkin ha scritto: > On Tue, Jun 18, 2013 at 01:15:57PM +, Paul Durrant wrote: >>> -Original Message- >>> From: Laszlo Ersek [mailto:ler...@redhat.com] >>> Sent: 18 June 2013 14:14 >>> To: Michael S. Tsirkin >>> Cc: Paul Durrant; qemu-devel@nongnu.org >>

Re: [Qemu-devel] [PATCH 06/12] spapr-vty: add copyright and license

2013-06-20 Thread Andreas Färber
Am 19.06.2013 22:40, schrieb Anthony Liguori: > If you are on CC, then please Ack this patch as you touched this > file at some point in time. > > Cc: Alexey Kardashevskiy > Cc: Andreas Färber > Cc: David Gibson > Cc: Michael Ellerman > Cc: Paolo Bonzini > Signed-off-by: Anthony Liguori > --

[Qemu-devel] [RFC V8 20/24] qcow2: Serialize write requests when deduplication is activated.

2013-06-20 Thread Benoît Canet
This fixes the sub cluster sized writes race conditions while waiting for a faster solution. Signed-off-by: Benoit Canet --- block/qcow2.c | 14 ++ block/qcow2.h |1 + 2 files changed, 15 insertions(+) diff --git a/block/qcow2.c b/block/qcow2.c index 8eb63f1..11c115f 100644 --

Re: [Qemu-devel] [Bug 1191606] Re: qemu crashes with iscsi initiator (libiscsi) when using virtio

2013-06-20 Thread Laszlo Ersek
On 06/20/13 17:31, ronnie sahlberg wrote: > On Thu, Jun 20, 2013 at 7:47 AM, Laszlo Ersek wrote: >> First I don't understand how access_len can only be "1". But, in any >> case, if the "req->elem.in_sg[0].iov_base" pointer is stored in >> little-endian order, and the kernel (or iscsi_scsi_command

[Qemu-devel] qemu bug

2013-06-20 Thread jacek burghardt
i had compiled latest qemu master git with xen now i am getting this error $r/include/qemu/int128.h:18: int128_get64: Assertion `!a.hi' failed. i wonder what could be causing this .

Re: [Qemu-devel] [PATCH 02/12] qtest: add spapr hypercall support

2013-06-20 Thread Anthony Liguori
Andreas Färber writes: > Am 19.06.2013 22:40, schrieb Anthony Liguori: >> Signed-off-by: Anthony Liguori >> --- >> qtest.c | 29 + >> tests/libqtest.c | 18 ++ >> tests/libqtest.h | 46 ++ >> 3 file

[Qemu-devel] [RFC V8 18/24] qcow2: Remove hash when cluster is deleted.

2013-06-20 Thread Benoît Canet
Signed-off-by: Benoit Canet --- block/qcow2-dedup.c| 45 + block/qcow2-refcount.c |3 +++ block/qcow2.h |2 ++ 3 files changed, 50 insertions(+) diff --git a/block/qcow2-dedup.c b/block/qcow2-dedup.c index da4ad5c..599cb2e 100644

Re: [Qemu-devel] [PATCH] RFC kvm irqfd: add directly mapped MSI IRQ support

2013-06-20 Thread Michael S. Tsirkin
On Fri, Jun 21, 2013 at 12:08:58AM +1000, Alexey Kardashevskiy wrote: > At the moment QEMU creates a route for every MSI IRQ. > > Now we are about to add IRQFD support on PPC64-pseries platform. > pSeries already has in-kernel emulated interrupt controller with > 8192 IRQs. Also, pSeries PHB alrea

Re: [Qemu-devel] [PATCH 04/12] qtest: add interface to save/restore

2013-06-20 Thread Andreas Färber
Am 19.06.2013 22:40, schrieb Anthony Liguori: > The idea here is pretty simple. We have a synchronous interface > that when called, does a migration to a file, kills the QEMU > instance, and spawns a new one using the saved file state. > > We an then sprinkle calls to qtest_save_restore() thoroug

[Qemu-devel] [PATCH 07/25] exec: return MemoryRegion from address_space_translate

2013-06-20 Thread Paolo Bonzini
Only address_space_translate_for_iotlb needs to return the section. Every caller of address_space_translate now uses only section->mr, return it directly. Signed-off-by: Paolo Bonzini --- exec.c| 150 +- include/exec/memory.h | 8

[Qemu-devel] [PATCH 17/25] spapr: use memory core for iommu support

2013-06-20 Thread Paolo Bonzini
Now we can stop using a "translating" DMAContext, but we do not yet modify the sPAPRTCETable users to get an AddressSpace; they keep using the table via a DMAContext. Acked-by: David Gibson Signed-off-by: Paolo Bonzini --- hw/ppc/spapr_iommu.c | 48 +++-

[Qemu-devel] [PATCH 23/25] memory: Fix comment typo

2013-06-20 Thread Paolo Bonzini
From: Peter Crosthwaite s/ajacent/adjacent Signed-off-by: Peter Crosthwaite Signed-off-by: Paolo Bonzini --- memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/memory.c b/memory.c index 8e99b8a..221b725 100644 --- a/memory.c +++ b/memory.c @@ -282,7 +282,7 @@ static

Re: [Qemu-devel] [Bug 1191606] Re: qemu crashes with iscsi initiator (libiscsi) when using virtio

2013-06-20 Thread ronnie sahlberg
On Thu, Jun 20, 2013 at 7:47 AM, Laszlo Ersek wrote: > On 06/20/13 15:33, ronnie sahlberg wrote: >> http://pastebin.com/EuwZPna1 >> >> Last few thousand lines from the log with your patch. >> >> >> The crash happens immediately after qemu has called out to iscsi_ioctl >> with SG_IO to read the ser

[Qemu-devel] [RFC V8 02/24] qcow2: Add deduplication structures and fields.

2013-06-20 Thread Benoît Canet
Signed-off-by: Benoit Canet --- block/qcow2.h | 203 - 1 file changed, 201 insertions(+), 2 deletions(-) diff --git a/block/qcow2.h b/block/qcow2.h index 9421843..953edfe 100644 --- a/block/qcow2.h +++ b/block/qcow2.h @@ -57,7 +57,182 @@

Re: [Qemu-devel] [PATCH 07/22] memory: add address_space_translate

2013-06-20 Thread Paolo Bonzini
Il 20/06/2013 16:43, Peter Maydell ha scritto: >>> >> There are other places in memory.c which do an int128_get64() >>> >> on mr->size, which also look suspicious... >> > >> > They are all on I/O regions so they are safe > Not entirely sure I understand this. There's no particular > reason I can't

Re: [Qemu-devel] [PATCH 03/12] qtest: return string from QMP commands

2013-06-20 Thread Andreas Färber
Am 19.06.2013 22:40, schrieb Anthony Liguori: > Signed-off-by: Anthony Liguori > --- > tests/libqtest.c | 16 +--- > tests/libqtest.h | 14 +++--- > 2 files changed, 24 insertions(+), 6 deletions(-) > > diff --git a/tests/libqtest.c b/tests/libqtest.c > index 81107cf..235ec62

Re: [Qemu-devel] [PATCH] libqos: include dependencies

2013-06-20 Thread Markus Armbruster
Anthony Liguori writes: > Otherwise rebuilds can fail when libqos is modified. > > Reported-by: Markus Armbruster > Signed-off-by: Anthony Liguori Tested-by: Markus Armbruster > --- > tests/Makefile | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tests/Makefile b/tests/Makefile > i

Re: [Qemu-devel] [PATCH 02/12] qtest: add spapr hypercall support

2013-06-20 Thread Andreas Färber
Am 19.06.2013 22:40, schrieb Anthony Liguori: > Signed-off-by: Anthony Liguori > --- > qtest.c | 29 + > tests/libqtest.c | 18 ++ > tests/libqtest.h | 46 ++ > 3 files changed, 93 insertions(+) > >

Re: [Qemu-devel] qemu-ga behavior on virtio-serial unplug

2013-06-20 Thread mdroth
On Thu, Jun 20, 2013 at 10:12:30AM -0500, mdroth wrote: > On Wed, Jun 19, 2013 at 01:17:57PM +0200, Laszlo Ersek wrote: > > Hello Michael, > > > > this is with reference to > > . > > > > Ever since the initial qemu-ga commit AFAICS an exception

Re: [Qemu-devel] qemu-ga behavior on virtio-serial unplug

2013-06-20 Thread mdroth
On Wed, Jun 19, 2013 at 01:17:57PM +0200, Laszlo Ersek wrote: > Hello Michael, > > this is with reference to > . > > Ever since the initial qemu-ga commit AFAICS an exception for > virtio-serial has existed, when reading EOF from the channel. >

[Qemu-devel] [PATCH] libqos: include dependencies

2013-06-20 Thread Anthony Liguori
Otherwise rebuilds can fail when libqos is modified. Reported-by: Markus Armbruster Signed-off-by: Anthony Liguori --- tests/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/Makefile b/tests/Makefile index 9a3007d..0042cf4 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -2

Re: [Qemu-devel] [PATCH 0/2] Remove hardcoded xen-platform device initialization (v4)

2013-06-20 Thread Michael S. Tsirkin
On Thu, Jun 20, 2013 at 05:02:56PM +0200, Paolo Bonzini wrote: > Il 18/06/2013 16:22, Michael S. Tsirkin ha scritto: > > On Tue, Jun 18, 2013 at 01:15:57PM +, Paul Durrant wrote: > >>> -Original Message- > >>> From: Laszlo Ersek [mailto:ler...@redhat.com] > >>> Sent: 18 June 2013 14:14

  1   2   3   >