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

2013-06-21 Thread Wanlong Gao
On 06/21/2013 12:02 AM, Bandan Das wrote: > 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

Re: [Qemu-devel] QEMU Memory subsystem

2013-06-21 Thread Wenchao Xia
于 2013-6-21 9:51, 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 t

[Qemu-devel] [PATCH V2 6/9] NUMA: handle Error in mpol and hostnode parser

2013-06-21 Thread Wanlong Gao
As Paolo pointed out that, handle Error in mpol and hostnode parser will make it easier to be used for example in mem-hotplug in the future. And this will be used later in set-mpol QMP command. Signed-off-by: Wanlong Gao --- include/sysemu/sysemu.h | 4 vl.c| 28 +++

[Qemu-devel] [PATCH V2 2/9] NUMA: Add numa_info structure to contain numa nodes info

2013-06-21 Thread Wanlong Gao
Add the numa_info structure to contain the numa nodes memory, VCPUs information and the future added numa nodes host memory policies. Signed-off-by: Andre Przywara Signed-off-by: Wanlong Gao --- cpus.c | 2 +- hw/i386/pc.c| 4 ++-- hw/net/eepro100.c | 1 -

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

2013-06-21 Thread Alexey Kardashevskiy
On 06/21/2013 04:12 PM, Benjamin Herrenschmidt wrote: > 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_irqc

[Qemu-devel] [PATCH 1/2] monitor: discard global variable in auto completion functions

2013-06-21 Thread Wenchao Xia
In monitor_find_completion() and related functions, Global variable *mon_cmds is not used any more, make them reenterable safely. *cur_mon is also not used now. *info_cmds is still there, but soon will be removed by a new way of sub command completion. Signed-off-by: Wenchao Xia --- include/moni

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

2013-06-21 Thread Gerd Hoffmann
Hi, > +static void spice_chr_fe_event(struct CharDriverState *chr, int event) > +{ > +#if SPICE_SERVER_VERSION >= 0x000c02 > +SpiceCharDriver *s = chr->opaque; > + > +spice_server_port_event(&s->sin, event); > +#endif > +} No way. You are passing an qemu-internal value (event) to an ex

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

2013-06-21 Thread Paolo Bonzini
Il 21/06/2013 06:21, Peter Crosthwaite ha scritto: > diff --git a/hw/timer/xilinx_timer.c b/hw/timer/xilinx_timer.c > index 0c39cff..ae09170 100644 > --- a/hw/timer/xilinx_timer.c > +++ b/hw/timer/xilinx_timer.c > @@ -218,7 +218,7 @@ static int xilinx_timer_init(SysBusDevice *dev) > ptimer

Re: [Qemu-devel] [PATCH 2/9] scsi: VMWare PVSCSI paravirtual device implementation

2013-06-21 Thread Paolo Bonzini
Il 21/06/2013 05:47, Libaiqing ha scritto: > Hi paolo, > The PVSCSI device can be used as boot device? > I tested with fedora17 + kernel 3.6 ,but failed.Qemu commit id is " > 4eda32f588086b6cd0ec2be6a7a6c131f8c2b427". > PVSCSI device used as non-boot device works well.partition,mkfs,mount,dd

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

2013-06-21 Thread Paolo Bonzini
Il 21/06/2013 04:32, Ronnie Sahlberg ha scritto: > 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 overwrit

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

2013-06-21 Thread Peter Crosthwaite
Hi Paolo, On Fri, Jun 21, 2013 at 5:36 PM, Paolo Bonzini wrote: > Il 21/06/2013 06:21, Peter Crosthwaite ha scritto: >> diff --git a/hw/timer/xilinx_timer.c b/hw/timer/xilinx_timer.c >> index 0c39cff..ae09170 100644 >> --- a/hw/timer/xilinx_timer.c >> +++ b/hw/timer/xilinx_timer.c >> @@ -218,7 +2

[Qemu-devel] [PATCH v2] int128: optimize and add test cases

2013-06-21 Thread Paolo Bonzini
For add, the carry only requires checking one of the arguments. For sub and neg, we can similarly optimize computation of the carry. For ge, we can just do lexicographic order. Signed-off-by: Paolo Bonzini --- include/qemu/int128.h | 25 -- tests/Makefile| 6 +- tests/test-int128

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

2013-06-21 Thread Hu Tao
On Fri, Jun 21, 2013 at 09:36:46AM +0200, Paolo Bonzini wrote: > Il 21/06/2013 06:21, Peter Crosthwaite ha scritto: > > diff --git a/hw/timer/xilinx_timer.c b/hw/timer/xilinx_timer.c > > index 0c39cff..ae09170 100644 > > --- a/hw/timer/xilinx_timer.c > > +++ b/hw/timer/xilinx_timer.c > > @@ -218,7

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

2013-06-21 Thread Hu Tao
On Fri, Jun 21, 2013 at 02:21:02PM +1000, Peter Crosthwaite wrote: > 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 > QOM

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

2013-06-21 Thread Marc-André Lureau
Hi On Fri, Jun 21, 2013 at 12:25 AM, Paolo Bonzini wrote: > 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. > Ah, can you point me to some functio

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

2013-06-21 Thread Andreas Färber
Hi, Am 21.06.2013 09:44, schrieb Peter Crosthwaite: > On Fri, Jun 21, 2013 at 5:36 PM, Paolo Bonzini wrote: >> Il 21/06/2013 06:21, Peter Crosthwaite ha scritto: >>> diff --git a/hw/timer/xilinx_timer.c b/hw/timer/xilinx_timer.c >>> index 0c39cff..ae09170 100644 >>> --- a/hw/timer/xilinx_timer.c

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

2013-06-21 Thread Marc-André Lureau
On Fri, Jun 21, 2013 at 9:35 AM, Gerd Hoffmann wrote: > Hi, > > > +static void spice_chr_fe_event(struct CharDriverState *chr, int event) > > +{ > > +#if SPICE_SERVER_VERSION >= 0x000c02 > > +SpiceCharDriver *s = chr->opaque; > > + > > +spice_server_port_event(&s->sin, event); > > +#end

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

2013-06-21 Thread Kevin Wolf
Am 21.06.2013 um 05:27 hat Luiz Capitulino geschrieben: > 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 irre

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

2013-06-21 Thread Kevin Wolf
Am 20.06.2013 um 20:20 hat Peter Lieven geschrieben: > 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/

[Qemu-devel] [PATCH 1/3] spapr pci msi: rework

2013-06-21 Thread Alexey Kardashevskiy
Previously every PCI host bridge implemented its own MSI memory window in order to catch msi_notify()/msix_notify() calls from various QEMU MSI-capable devives such as virtio-pci or vfio and redirect them to the guest via qemu_pulse_irq(). The encoded MSIMessage used to be encoded as: * .addr - ad

[Qemu-devel] [PATCH 0/3] RFCv2 kvm irqfd: add directly mapped MSI IRQ support

2013-06-21 Thread Alexey Kardashevskiy
Thanks for the comments on the previous try. Here is some rework via KVM API rather than via PCI framework. Thanks! Alexey Kardashevskiy (3): spapr pci msi: rework KVM: add kvm_arch_irqchip_add_msi_route KVM: PPC: enable irqfd hw/ppc/spapr.c |2 + hw/ppc/spapr_pci.c

[Qemu-devel] [PATCH 3/3] KVM: PPC: enable irqfd

2013-06-21 Thread Alexey Kardashevskiy
Signed-off-by: Alexey Kardashevskiy --- target-ppc/kvm.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c index d6da146..e72c335 100644 --- a/target-ppc/kvm.c +++ b/target-ppc/kvm.c @@ -1973,6 +1973,8 @@ int kvm_arch_on_sigbus(int code, void *addr) v

[Qemu-devel] [PATCH 2/3] KVM: add kvm_arch_irqchip_add_msi_route

2013-06-21 Thread Alexey Kardashevskiy
At the moment kvm_irqchip_add_msi_route() adds routing entries for every MSI IRQ we want to use with IRQFD. However on PPC64-pSeries no routing is required as QEMU is already doing MSIMessage to IRQ converson. When the guest needs to allocate some MSI vectors, it asks a hypervisor (QEMU) which ret

Re: [Qemu-devel] [PATCH v5 10/11] blockdev: add Abort transaction

2013-06-21 Thread Eric Blake
On 06/19/2013 12:21 PM, Kevin Wolf wrote: > Am 03.06.2013 um 11:21 hat Stefan Hajnoczi geschrieben: >> On Thu, May 30, 2013 at 07:11:25AM -0600, Eric Blake wrote: >>> On 05/30/2013 06:34 AM, Stefan Hajnoczi wrote: The Abort action can be used to test QMP 'transaction' failure. Add it as

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

2013-06-21 Thread Andreas Färber
Hi Peter, Am 21.06.2013 06:21, schrieb Peter Crosthwaite: > 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

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

2013-06-21 Thread Peter Lieven
Am 21.06.2013 11:18, schrieb Kevin Wolf: > Am 20.06.2013 um 20:20 hat Peter Lieven geschrieben: >> Signed-off-by: Peter Lieven >> --- >> block/iscsi.c | 57 >> + >> 1 file changed, 57 insertions(+) >> >> diff --git a/block/iscsi.c b/block

Re: [Qemu-devel] [PATCH 6/9] vhost-scsi: new device supporting the tcm_vhost Linux kernel module

2013-06-21 Thread Libaiqing
Hi Asias, > -Original Message- > From: Asias He [mailto:as...@redhat.com] > Sent: Thursday, June 20, 2013 5:39 PM > To: Libaiqing > Cc: Paolo Bonzini; Wenchao Xia; qemu-devel@nongnu.org; > n...@linux-iscsi.org; Michael S. Tsirkin; Haofeng > Subject: Re: [Qemu-devel] [PATCH 6/9] vhost-scsi:

Re: [Qemu-devel] [PATCH qom-cpu v2 02/29] kvm: Change cpu_synchronize_state() argument to CPUState

2013-06-21 Thread Andreas Färber
Am 18.06.2013 11:39, schrieb Igor Mammedov: > On Sun, 16 Jun 2013 17:57:22 +0200 > Andreas Färber wrote: > >> Change Monitor::mon_cpu to CPUState as well. >> In cpu_synchronize_all_states() use qemu_for_each_cpu() now. >> >> Reviewed-by: liguang >> Signed-off-by: Andreas Färber >> --- [...] >>

Re: [Qemu-devel] [PATCH 2/3] qapi.py: Allow top-level type reference for command definitions

2013-06-21 Thread Eric Blake
On 06/19/2013 05:28 PM, Kevin Wolf wrote: > If 'data' for a command definition isn't a dict, but a string, it is > taken as a (struct) type name and the fields of this struct are directly > used as parameters. I like it! I suspect it may cause conflicts with Amos' work on adding introspection, bu

Re: [Qemu-devel] [PATCH 1/3] spapr pci msi: rework

2013-06-21 Thread Alexander Graf
On 21.06.2013, at 11:22, Alexey Kardashevskiy wrote: > Previously every PCI host bridge implemented its own MSI memory window > in order to catch msi_notify()/msix_notify() calls from various QEMU > MSI-capable devives such as virtio-pci or vfio and redirect them to > the guest via qemu_pulse_irq

Re: [Qemu-devel] [PATCH 3/3] qapi-schema: Use BlockdevSnapshot type for blockdev-snapshot-sync

2013-06-21 Thread Eric Blake
On 06/19/2013 05:28 PM, Kevin Wolf wrote: > We don't have to duplicate the definition any more now that we may refer > to a type instead. > > Signed-off-by: Kevin Wolf > --- > qapi-schema.json | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/qapi-schema.json b/qapi-sch

Re: [Qemu-devel] [PATCH qom-cpu v2 18/29] cpu: Turn cpu_unassigned_access() into a CPUState hook

2013-06-21 Thread Andreas Färber
Am 17.06.2013 22:34, schrieb Richard Henderson: > On 06/16/2013 08:57 AM, Andreas Färber wrote: >> +cpu = CPU(alpha_env_get_cpu(cpu_single_env)); >> +cs = CPU(alpha_env_get_cpu(cpu_single_env)); >> +CPUState *cpu_single_cpu = CPU(alpha_env_get_cpu(cpu_single_env)); >> +c

Re: [Qemu-devel] [PATCH 0/3] qapi: Top-level type reference for command definitions

2013-06-21 Thread Eric Blake
On 06/19/2013 05:28 PM, Kevin Wolf wrote: > Kevin Wolf (3): > qapi.py: Move common code to evaluate() > qapi.py: Allow top-level type reference for command definitions > qapi-schema: Use BlockdevSnapshot type for blockdev-snapshot-sync > > qapi-schema.json | 3 +-- > scripts/qapi.py | 43

Re: [Qemu-devel] [PATCH 2/3] KVM: add kvm_arch_irqchip_add_msi_route

2013-06-21 Thread Alexander Graf
On 21.06.2013, at 11:22, Alexey Kardashevskiy wrote: > At the moment kvm_irqchip_add_msi_route() adds routing entries for every > MSI IRQ we want to use with IRQFD. > > However on PPC64-pSeries no routing is required as QEMU is already doing > MSIMessage to IRQ converson. When the guest needs to

Re: [Qemu-devel] [PATCH qom-cpu v2 19/29] cpu: Replace cpu_single_env with CPUState cpu_single_cpu

2013-06-21 Thread Andreas Färber
Am 17.06.2013 22:40, schrieb Richard Henderson: > On 06/16/2013 08:57 AM, Andreas Färber wrote: >> diff --git a/hw/alpha/typhoon.c b/hw/alpha/typhoon.c >> index 207dcad..f0b1f6f 100644 >> --- a/hw/alpha/typhoon.c >> +++ b/hw/alpha/typhoon.c >> @@ -72,9 +72,8 @@ static void cpu_irq_change(AlphaCPU *

[Qemu-devel] [PATCH 01/13] qemu-socket: zero-initialize SocketAddress

2013-06-21 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- util/qemu-sockets.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c index fdd8dc4..364bd8c 100644 --- a/util/qemu-sockets.c +++ b/util/qemu-sockets.c @@ -855,7 +855,7 @@ SocketAddress *socket_parse(c

[Qemu-devel] [PATCH 00/13] A bunch of little socket + chardev fixes

2013-06-21 Thread Gerd Hoffmann
Hi, Here is a colletion of little bugfixes and minor improvements for the chardev and socket code. cheers, Gerd Gerd Hoffmann (13): qemu-socket: zero-initialize SocketAddress qemu-socket: drop pointless allocation qemu-socket: catch monitor_get_fd failures qemu-char: check optional f

[Qemu-devel] [PATCH 04/13] qemu-char: check optional fields using has_*

2013-06-21 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- qemu-char.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 2c3cfe6..ee7c70e 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -3500,7 +3500,7 @@ static CharDriverState *qmp_chardev_open_file(ChardevFile *fil

[Qemu-devel] [PATCH 03/13] qemu-socket: catch monitor_get_fd failures

2013-06-21 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- util/qemu-sockets.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c index d73c112..7776016 100644 --- a/util/qemu-sockets.c +++ b/util/qemu-sockets.c @@ -908,6 +908,9 @@ int socket_connect(SocketAddress *addr, Er

[Qemu-devel] [PATCH 09/13] qemu-char: use ChardevBackendKind in in CharDriver

2013-06-21 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- qemu-char.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-char.c b/qemu-char.c index 5751391..1c0903f 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -3127,7 +3127,7 @@ typedef struct CharDriver { /* old, pre qapi */ CharDrive

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

2013-06-21 Thread Peter Crosthwaite
Hi Andreas, On Fri, Jun 21, 2013 at 7:33 PM, Andreas Färber wrote: > Hi Peter, > > Am 21.06.2013 06:21, schrieb Peter Crosthwaite: >> 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 P

[Qemu-devel] [PATCH 13/13] qemu-socket: don't leak opts on error

2013-06-21 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- util/qemu-sockets.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c index 7776016..29a3564 100644 --- a/util/qemu-sockets.c +++ b/util/qemu-sockets.c @@ -971,7 +971,7 @@ int socket_dgram(SocketAddres

[Qemu-devel] [PATCH 06/13] qemu-char: print notification to stderr

2013-06-21 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- qemu-char.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index cfc68cd..3e0044b 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2666,8 +2666,8 @@ static CharDriverState *qemu_chr_open_socket_fd(int fd, bool d

[Qemu-devel] [PATCH 12/13] qemu-char: report udb backend errors

2013-06-21 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- qemu-char.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/qemu-char.c b/qemu-char.c index c83ff21..6b4daf3 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2255,6 +2255,8 @@ static CharDriverState *qemu_chr_open_udp(QemuOpts *opts) fd = inet_dgram_

[Qemu-devel] [PATCH 11/13] qemu-char: add -chardev mux support

2013-06-21 Thread Gerd Hoffmann
Allow to explicitly create mux chardevs on the command line, like you can using QMP. Signed-off-by: Gerd Hoffmann --- qemu-char.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/qemu-char.c b/qemu-char.c index 65c0c48..c83ff21 100644 --- a/qemu-char.c +++ b/qemu-char.c

[Qemu-devel] [PATCH 05/13] qemu-char: use more specific error_setg_* variants

2013-06-21 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- qemu-char.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index ee7c70e..cfc68cd 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2604,7 +2604,7 @@ static CharDriverState *qemu_chr_open_socket_fd(int fd, bool d

[Qemu-devel] [PATCH 10/13] qemu-char: minor mux chardev fixes

2013-06-21 Thread Gerd Hoffmann
mux failure path has a memory leak. creating a mux chardev can't fail though, so just assert() that instead of fixing an error path which never ever runs anyway ... Also fix bid being leaked while being at it. Signed-off-by: Gerd Hoffmann --- qemu-char.c |7 +++ 1 file changed, 3 inser

Re: [Qemu-devel] [PATCH 1/3] spapr pci msi: rework

2013-06-21 Thread Alexey Kardashevskiy
On 06/21/2013 08:31 PM, Alexander Graf wrote: > > On 21.06.2013, at 11:22, Alexey Kardashevskiy wrote: > >> Previously every PCI host bridge implemented its own MSI memory window >> in order to catch msi_notify()/msix_notify() calls from various QEMU >> MSI-capable devives such as virtio-pci or v

[Qemu-devel] [PATCH 07/13] qemu-char: fix documentation for telnet+wait socket flags

2013-06-21 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- qapi-schema.json |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/qapi-schema.json b/qapi-schema.json index a80ee40..a29ce57 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -3185,10 +3185,11 @@ # @addr: socket address to liste

[Qemu-devel] [PATCH 02/13] qemu-socket: drop pointless allocation

2013-06-21 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- util/qemu-sockets.c |1 - 1 file changed, 1 deletion(-) diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c index 364bd8c..d73c112 100644 --- a/util/qemu-sockets.c +++ b/util/qemu-sockets.c @@ -876,7 +876,6 @@ SocketAddress *socket_parse(const char *str, E

Re: [Qemu-devel] [PATCH 2/3] qapi.py: Allow top-level type reference for command definitions

2013-06-21 Thread Kevin Wolf
Am 21.06.2013 um 12:30 hat Eric Blake geschrieben: > On 06/19/2013 05:28 PM, Kevin Wolf wrote: > > If 'data' for a command definition isn't a dict, but a string, it is > > taken as a (struct) type name and the fields of this struct are directly > > used as parameters. > > I like it! I suspect it

Re: [Qemu-devel] [PATCH v4 2/9] dump: Add API to manipulate cache_data

2013-06-21 Thread Eric Blake
On 06/19/2013 01:29 PM, Andreas Färber wrote: >> +int init_cache_data(struct cache_data *cd, const char *filename) >> +{ >> +int fd; >> +char *tmpname; >> + >> +/* init the tmp file */ >> +tmpname = getenv("TMPDIR"); >> +if (!tmpname) { >> +tmpname = (char *)P_tmpdir; >

[Qemu-devel] [PATCH 08/13] qemu-char: don't leak opts on error

2013-06-21 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- qemu-char.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-char.c b/qemu-char.c index 3e0044b..5751391 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -3185,7 +3185,7 @@ CharDriverState *qemu_chr_new_from_opts(QemuOpts *opts, if (i

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

2013-06-21 Thread Kevin Wolf
Am 21.06.2013 um 11:45 hat Peter Lieven geschrieben: > Am 21.06.2013 11:18, schrieb Kevin Wolf: > > Am 20.06.2013 um 20:20 hat Peter Lieven geschrieben: > >> Signed-off-by: Peter Lieven > >> --- > >> block/iscsi.c | 57 > >> + > >> 1 file

Re: [Qemu-devel] [PATCH 2/3] qapi.py: Allow top-level type reference for command definitions

2013-06-21 Thread Eric Blake
On 06/21/2013 12:00 PM, Kevin Wolf wrote: >> As the .json file gets larger, I've been wondering if >> enforcing alphabetical ordering would make it easier to manage; but if >> topological sorting is required, alphabetical sorting might not always >> be possible. > > Yeah, possibly. Another thing

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

2013-06-21 Thread Alex Bligh
Sage, --On 20 June 2013 08:58:19 -0700 Sage Weil wrote: I'd like to hear from Ceph folks what their position on kernel rbd vs librados is. Why one do they recommend for QEMU guests and what are the pros/cons? I agree that a flashcache/bcache-like persistent cache would be a big win for qemu

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

2013-06-21 Thread Peter Lieven
Am 21.06.2013 13:07, schrieb Kevin Wolf: > Am 21.06.2013 um 11:45 hat Peter Lieven geschrieben: >> Am 21.06.2013 11:18, schrieb Kevin Wolf: >>> Am 20.06.2013 um 20:20 hat Peter Lieven geschrieben: Signed-off-by: Peter Lieven --- block/iscsi.c | 57 ++

Re: [Qemu-devel] [PATCH 2/9] scsi: VMWare PVSCSI paravirtual device implementation

2013-06-21 Thread Dmitry Fleytman
BTW, Can't we add to QEMU some simplified interface (device) for boot time only, so that system will be able to boot without SeaBIOS support for specific device? Regards, Dmitry On Fri, Jun 21, 2013 at 10:36 AM, Paolo Bonzini wrote: > Il 21/06/2013 05:47, Libaiqing ha scritto: > > Hi paolo,

[Qemu-devel] Suggestion: Qemu extension for Chrome

2013-06-21 Thread Miguel Mayol
It would provide a nice HTML frontend but it can be a must have extension for Chromebooks I have in mind a Chrome Pixel running Android virtualized with VGA Passthrough as one of the fastest hybrids. And of course some GNU/Linux or MS WOS or even OSX running at future hybrid Chromebooks Samsung

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

2013-06-21 Thread Paolo Bonzini
Il 21/06/2013 10:36, Marc-André Lureau ha scritto: > Hi > > > On Fri, Jun 21, 2013 at 12:25 AM, Paolo Bonzini > wrote: > > Il 20/06/2013 19:46, Marc-André Lureau ha scritto: > > This allows the Spice block driver to eject the associated device. > > The c

Re: [Qemu-devel] [PATCH 1/3] spapr pci msi: rework

2013-06-21 Thread Anthony Liguori
Alexey Kardashevskiy writes: > On 06/21/2013 08:31 PM, Alexander Graf wrote: >> >> On 21.06.2013, at 11:22, Alexey Kardashevskiy wrote: >> >>> Previously every PCI host bridge implemented its own MSI memory window >>> in order to catch msi_notify()/msix_notify() calls from various QEMU >>> MSI-

Re: [Qemu-devel] [PATCH 1/3] spapr pci msi: rework

2013-06-21 Thread Alexander Graf
On 21.06.2013, at 13:58, Anthony Liguori wrote: > Alexey Kardashevskiy writes: > >> On 06/21/2013 08:31 PM, Alexander Graf wrote: >>> >>> On 21.06.2013, at 11:22, Alexey Kardashevskiy wrote: >>> Previously every PCI host bridge implemented its own MSI memory window in order to catch

Re: [Qemu-devel] [PATCH 2/9] scsi: VMWare PVSCSI paravirtual device implementation

2013-06-21 Thread Paolo Bonzini
Il 21/06/2013 13:44, Dmitry Fleytman ha scritto: > BTW, > > Can't we add to QEMU some simplified interface (device) for boot time only, > so that system will be able to boot without SeaBIOS support for specific > device? We had it, and we dropped it. :) Writing a SeaBIOS driver is very easy, and

Re: [Qemu-devel] [PATCH 1/3] spapr pci msi: rework

2013-06-21 Thread Benjamin Herrenschmidt
On Fri, 2013-06-21 at 12:31 +0200, Alexander Graf wrote: > On 21.06.2013, at 11:22, Alexey Kardashevskiy wrote: > > > Previously every PCI host bridge implemented its own MSI memory window > > in order to catch msi_notify()/msix_notify() calls from various QEMU > > MSI-capable devives such as virt

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

2013-06-21 Thread Julio Guerra
2013/6/21 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. Th

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

2013-06-21 Thread Alexander Graf
On 21.06.2013, at 14:01, Julio Guerra wrote: > 2013/6/21 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

Re: [Qemu-devel] [PATCH 2/3] KVM: add kvm_arch_irqchip_add_msi_route

2013-06-21 Thread Benjamin Herrenschmidt
On Fri, 2013-06-21 at 12:33 +0200, Alexander Graf wrote: > > +int kvm_arch_irqchip_add_msi_route(KVMState *s, MSIMessage msg) > > +{ > > +if (!kvm_msi_via_irqfd_allowed) > > +return -1; > > + > > +msg.address -= spapr->msi_win_addr; > > +return (msg.address >> 2) + msg.data; >

Re: [Qemu-devel] [PATCH 2/3] KVM: add kvm_arch_irqchip_add_msi_route

2013-06-21 Thread Alexander Graf
On 21.06.2013, at 14:03, Benjamin Herrenschmidt wrote: > On Fri, 2013-06-21 at 12:33 +0200, Alexander Graf wrote: >>> +int kvm_arch_irqchip_add_msi_route(KVMState *s, MSIMessage msg) >>> +{ >>> +if (!kvm_msi_via_irqfd_allowed) >>> +return -1; >>> + >>> +msg.address -= spapr->msi_w

Re: [Qemu-devel] [PATCH 1/3] spapr pci msi: rework

2013-06-21 Thread Benjamin Herrenschmidt
On Fri, 2013-06-21 at 06:58 -0500, Anthony Liguori wrote: > > I do not understand the question, really. Here we are emulating pHyp which > > is not real hardware and never pretended to be. Our guests do not touch MSI > > records in the config space and use RTAS MSI calls instead. > > But RTAS is i

Re: [Qemu-devel] [PATCH 2/3] KVM: add kvm_arch_irqchip_add_msi_route

2013-06-21 Thread Benjamin Herrenschmidt
On Fri, 2013-06-21 at 14:05 +0200, Alexander Graf wrote: > Oh, I thought that was obvious. BookE also has in-kernel emulation and > also does set kvm_msi_via_irqfd_allowed. The code above is spapr > specific and would simply rewrite valid BookE MPIC addresses into > something broken. > > In fact,

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

2013-06-21 Thread Paolo Bonzini
Il 21/06/2013 09:44, Peter Crosthwaite ha scritto: > Hi Paolo, > > On Fri, Jun 21, 2013 at 5:36 PM, Paolo Bonzini wrote: >> Il 21/06/2013 06:21, Peter Crosthwaite ha scritto: >>> diff --git a/hw/timer/xilinx_timer.c b/hw/timer/xilinx_timer.c >>> index 0c39cff..ae09170 100644 >>> --- a/hw/timer/xi

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

2013-06-21 Thread Stefan Hajnoczi
On Thu, Jun 20, 2013 at 4:25 PM, Alex Bligh wrote: > Stefan, > > > --On 20 June 2013 11:46:18 +0200 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 device

[Qemu-devel] [PATCH] Makefile: pass include directives to dtc via CPPFLAGS, not CFLAGS

2013-06-21 Thread Peter Maydell
The dtc submodule's makefile expects -I include directives to be in CPPFLAGS, not CFLAGS. Getting this wrong meant that the include directive would not be applied when generating the dependency .d files. This in turn meant that we couldn't build libfdt when doing an out of tree build with clang. (g

[Qemu-devel] [PATCH] configure: Add signed*signed check to [u]int128_t test

2013-06-21 Thread Peter Maydell
clang 3.8 with -fsanitize=undefined will fail to link code containing an int128_t * int128_t multiply (http://llvm.org/bugs/show_bug.cgi?id=16404) so add this to our configure test for whether [u]int128_t are usable. Signed-off-by: Peter Maydell --- configure |1 + 1 file changed, 1 insertio

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

2013-06-21 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 1/2] iscsi: add support for bdrv_co_is_allocated()

2013-06-21 Thread Kevin Wolf
Am 21.06.2013 um 13:42 hat Peter Lieven geschrieben: > Am 21.06.2013 13:07, schrieb Kevin Wolf: > > Am 21.06.2013 um 11:45 hat Peter Lieven geschrieben: > >> Am 21.06.2013 11:18, schrieb Kevin Wolf: > >>> Am 20.06.2013 um 20:20 hat Peter Lieven geschrieben: > Signed-off-by: Peter Lieven > >>>

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

2013-06-21 Thread Stefan Hajnoczi
On Thu, Jun 20, 2013 at 5:58 PM, Sage Weil wrote: > On Thu, 20 Jun 2013, Stefan Hajnoczi wrote: > I'm not really sure what the best path forward is. Putting the > functionality in qemu would benefit lots of other storage backends, > putting it in librbd would capture various other librbd users (x

[Qemu-devel] [PATCH] [slirp] add nextserver support in slirp's dhcp-server

2013-06-21 Thread Bas van Sisseren
The slirp dhcp-server normally returns its own address as tftp nextserver for netbooting. This patch makes that address configurable, so it is possible to use an external tftp boot- environment. Signed-off-by: Bas van Sisseren --- net/slirp.c | 10 -- qapi-schema.json | 3 +++ qemu

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

2013-06-21 Thread Peter Lieven
Am 21.06.2013 15:14, schrieb Kevin Wolf: > Am 21.06.2013 um 13:42 hat Peter Lieven geschrieben: >> Am 21.06.2013 13:07, schrieb Kevin Wolf: >>> Am 21.06.2013 um 11:45 hat Peter Lieven geschrieben: Am 21.06.2013 11:18, schrieb Kevin Wolf: > Am 20.06.2013 um 20:20 hat Peter Lieven geschriebe

[Qemu-devel] [PATCH V2] PPC: Add dump_mmu() for 6xx

2013-06-21 Thread Fabien Chouteau
"(qemu) info tlb" is a very useful tool for debugging, so I implemented the missing 6xx version. Signed-off-by: Fabien Chouteau --- V2: Now with segment registers and BATs. target-ppc/mmu_helper.c | 92 +++ 1 file changed, 92 insertions(+) diff --

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

2013-06-21 Thread Marc-André Lureau
Hi On Fri, Jun 21, 2013 at 1:57 PM, Paolo Bonzini wrote: > > > > What exactly are you trying to do here (I guess I'll understand more > > when I get to the later patches)? > > > > Getting to the bottom BlockDriverState to be able to eject & change it. > > (it could also be named the "pa

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

2013-06-21 Thread Paolo Bonzini
Il 21/06/2013 15:30, Marc-André Lureau ha scritto: > > Getting to the bottom BlockDriverState to be able to eject & > > change it. (it could also be named the "parent", but other parts > > of the code suggest the "child" name) > > There is already an interface for eject/change, whi

Re: [Qemu-devel] [PATCH 2/3] KVM: add kvm_arch_irqchip_add_msi_route

2013-06-21 Thread Alexander Graf
On 21.06.2013, at 14:10, Benjamin Herrenschmidt wrote: > On Fri, 2013-06-21 at 14:05 +0200, Alexander Graf wrote: >> Oh, I thought that was obvious. BookE also has in-kernel emulation and >> also does set kvm_msi_via_irqfd_allowed. The code above is spapr >> specific and would simply rewrite vali

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

2013-06-21 Thread ronnie sahlberg
I can add the checks and resubmit. On Fri, Jun 21, 2013 at 12:38 AM, Paolo Bonzini wrote: > Il 21/06/2013 04:32, Ronnie Sahlberg ha scritto: >> 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

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

2013-06-21 Thread Alex Bligh
Stefan, --On 21 June 2013 14:55:20 +0200 Stefan Hajnoczi wrote: I understand the limitations with kernel block devices - their setup/teardown is an extra step outside QEMU and privileges need to be managed. That basically means you need to use a management tool like libvirt to make it usable.

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

2013-06-21 Thread Luiz Capitulino
On Fri, 21 Jun 2013 11:07:51 +0200 Kevin Wolf wrote: > Am 21.06.2013 um 05:27 hat Luiz Capitulino geschrieben: > > 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 s

[Qemu-devel] Backport of modern qemu rbd driver to qemu 1.0 + Precise packaging

2013-06-21 Thread Alex Bligh
I've backported the modern (qemu 1.5) rbd driver to qemu 1.0 (for anyone interested). This is designed for people who are conservative in hypervisor version, but like more bleeding edge storage. The main thing this adds is asynchronous flush to rbd, plus automatic control of rbd caching behaviour.

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

2013-06-21 Thread Bandan Das
Wanlong Gao writes: > On 06/21/2013 12:02 AM, Bandan Das wrote: >> 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 th

Re: [Qemu-devel] [PATCH v2] int128: optimize and add test cases

2013-06-21 Thread Richard Henderson
On 06/21/2013 12:48 AM, Paolo Bonzini wrote: > --- /dev/null > +++ b/tests/test-int128.c > @@ -0,0 +1,212 @@ > +/* > + * Test 64x64 -> 128 multiply subroutines Cutnpaste test description. Otherwise, Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH 3/3] qapi-schema: Use BlockdevSnapshot type for blockdev-snapshot-sync

2013-06-21 Thread Luiz Capitulino
On Fri, 21 Jun 2013 11:31:28 +0100 Eric Blake wrote: > On 06/19/2013 05:28 PM, Kevin Wolf wrote: > > We don't have to duplicate the definition any more now that we may refer > > to a type instead. > > > > Signed-off-by: Kevin Wolf > > --- > > qapi-schema.json | 3 +-- > > 1 file changed, 1 ins

Re: [Qemu-devel] [PATCH] configure: Add signed*signed check to [u]int128_t test

2013-06-21 Thread Richard Henderson
On 06/21/2013 06:01 AM, Peter Maydell wrote: > clang 3.8 with -fsanitize=undefined will fail to link code containing an > int128_t * int128_t multiply (http://llvm.org/bugs/show_bug.cgi?id=16404) > so add this to our configure test for whether [u]int128_t are usable. > > Signed-off-by: Peter Mayde

Re: [Qemu-devel] [PATCH] configure: Add signed*signed check to [u]int128_t test

2013-06-21 Thread Peter Maydell
On 21 June 2013 14:01, Peter Maydell wrote: > clang 3.8 with -fsanitize=undefined will fail to link code containing an > int128_t * int128_t multiply (http://llvm.org/bugs/show_bug.cgi?id=16404) > so add this to our configure test for whether [u]int128_t are usable. I meant "clang 3.3" here -- ca

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

2013-06-21 Thread Liu Yuan
On 06/20/2013 11:58 PM, Sage Weil wrote: > 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 >>>

Re: [Qemu-devel] [PATCH 1/2] monitor: discard global variable in auto completion functions

2013-06-21 Thread Luiz Capitulino
On Fri, 21 Jun 2013 14:37:37 +0800 Wenchao Xia wrote: > In monitor_find_completion() and related functions, Global variable > *mon_cmds is not used any more, make them reenterable safely. > *cur_mon is also not used now. *info_cmds is still there, but soon > will be removed by a new way of sub co

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

2013-06-21 Thread Luiz Capitulino
On Fri, 21 Jun 2013 14:37:38 +0800 Wenchao Xia wrote: > 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

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

2013-06-21 Thread Bandan Das
Wanlong Gao writes: > 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

Re: [Qemu-devel] [PATCH v3 00/16] -boot and -no-fd-bootchk fixes

2013-06-21 Thread Anthony Liguori
Applied. Thanks. Regards, Anthony Liguori

Re: [Qemu-devel] [PATCH v2] virtio-rng: Fix crash with non-default backend

2013-06-21 Thread Anthony Liguori
Applied. Thanks. Regards, Anthony Liguori

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

2013-06-21 Thread Sage Weil
On Fri, 21 Jun 2013, Alex Bligh wrote: > Sage, > > --On 20 June 2013 08:58:19 -0700 Sage Weil wrote: > > > > I'd like to hear from Ceph folks what their position on kernel rbd vs > > > librados is. Why one do they recommend for QEMU guests and what are the > > > pros/cons? > > > > I agree that

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

2013-06-21 Thread Anthony Liguori
Kevin Wolf writes: > 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, but not when it's not; display > I/O

  1   2   >