Re: [Qemu-devel] [PATCH 4/4] target-arm: add minimal dump-guest-memory support

2012-07-01 Thread Rabin Vincent
On Thu, Jun 28, 2012 at 05:46:02PM +0100, Peter Maydell wrote: On 20 June 2012 18:28, Rabin Vincent ra...@rab.in wrote: Add a minimal dump-guest-memory support for ARM.  The -p option is not supported and we don't add any QEMU-specific notes. So what does this patch give us? This commit

Re: [Qemu-devel] [PATCH 01/12] savevm: Use a struct to pass all handlers

2012-07-01 Thread Orit Wasserman
On 06/28/2012 10:21 PM, Juan Quintela wrote: This would make easier to add more operations in the next patches. Signed-off-by: Juan Quintela quint...@redhat.com --- savevm.c | 54 +- vmstate.h |7 +++ 2 files changed, 32

Re: [Qemu-devel] [PATCH 02/12] savevm: Live migration handlers register the struct directly

2012-07-01 Thread Orit Wasserman
On 06/28/2012 10:22 PM, Juan Quintela wrote: Notice that the live migration users never unregister, so no problem about freeing the ops structure. Signed-off-by: Juan Quintela quint...@redhat.com --- arch_init.c |9 +++-- block-migration.c | 10 -- migration.h

Re: [Qemu-devel] qemu-kvm-1.0.1 - unable to exit if vcpu is in infinite loop

2012-07-01 Thread Avi Kivity
On 06/28/2012 10:27 PM, Peter Lieven wrote: Am 28.06.2012 um 18:32 schrieb Avi Kivity: On 06/28/2012 07:29 PM, Peter Lieven wrote: Yes. A signal is sent, and KVM returns from the guest to userspace on pending signals. is there a description available how this process exactly works? The

Re: [Qemu-devel] Using qemu to profile ARM binaries

2012-07-01 Thread Wei-Ren Chen
I'm trying to edit the qemu source code so I can use qemu as a profiler for a benchmark of ARM programs. A good start would be counting loads, stores, int ops, float ops and branch instructions used by each of the binary files. I have two (related) questions: 1. Where in the qemu

Re: [Qemu-devel] [PATCH 03/12] savevm: remove SaveSetParamsHandler

2012-07-01 Thread Orit Wasserman
On 06/28/2012 10:22 PM, Juan Quintela wrote: It was used only once, just unfold. Signed-off-by: Juan Quintela quint...@redhat.com --- vmstate.h |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vmstate.h b/vmstate.h index 4bce53b..5e1a7cc 100644 --- a/vmstate.h

Re: [Qemu-devel] [PATCH 04/12] savevm: remove SaveLiveStateHandler

2012-07-01 Thread Orit Wasserman
On 06/28/2012 10:22 PM, Juan Quintela wrote: It was used only once, just unfold. Signed-off-by: Juan Quintela quint...@redhat.com --- vmstate.h |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vmstate.h b/vmstate.h index 5e1a7cc..0e24834 100644 --- a/vmstate.h

Re: [Qemu-devel] [RFC V2 PATCH 4/4] virtio-net: add multiqueue support

2012-07-01 Thread Michael S. Tsirkin
On Mon, Jun 25, 2012 at 06:04:49PM +0800, Jason Wang wrote: This patch let the virtio-net can transmit and recevie packets through multiuple VLANClientStates and abstract them as multiple virtqueues to guest. A new parameter 'queues' were introduced to specify the number of queue pairs.

Re: [Qemu-devel] [PATCH 05/12] savevm: Refactor cancel operation in its own operation

2012-07-01 Thread Orit Wasserman
On 06/28/2012 10:22 PM, Juan Quintela wrote: Intead of abusing stage with value -1. Signed-off-by: Juan Quintela quint...@redhat.com --- arch_init.c | 11 ++- block-migration.c | 10 ++ savevm.c |4 ++-- vmstate.h |1 + 4 files changed,

Re: [Qemu-devel] Bad mail header?

2012-07-01 Thread Juan Quintela
Stefan Weil s...@weilnetz.de wrote: Am 28.06.2012 21:21, schrieb Juan Quintela: This would make easier to add more operations in the next patches. Signed-off-by: Juan Quintela quint...@redhat.com --- savevm.c | 54 +- vmstate.h | 7 +++

Re: [Qemu-devel] [PATCH 02/12] savevm: Live migration handlers register the struct directly

2012-07-01 Thread Juan Quintela
Orit Wasserman owass...@redhat.com wrote: On 06/28/2012 10:22 PM, Juan Quintela wrote: Notice that the live migration users never unregister, so no problem about freeing the ops structure. void unregister_savevm(DeviceState *dev, const char *idstr, void *opaque) diff --git a/vl.c b/vl.c

Re: [Qemu-devel] [PATCH 06/12] savevm: introduce is_active method

2012-07-01 Thread Juan Quintela
Igor Mitsyanko i.mitsya...@gmail.com wrote: On 6/28/2012 11:22 PM, Juan Quintela wrote: Enable the creation of a method to tell migration if that section is active and should be migrate. We use it for blk-migration, that is normally not active. We don't create the method for RAM, as setups

Re: [Qemu-devel] Bad mail header?

2012-07-01 Thread Peter Maydell
On 1 July 2012 11:16, Juan Quintela quint...@redhat.com wrote: Stefan Weil s...@weilnetz.de wrote: this mail and the other mails from this patch series trigger an alert in my mail filter: X-Amavis-Alert: BAD HEADER SECTION Duplicate header field: References You are right,  I also have

[Qemu-devel] QEMU question: is eventfd not thread safe?

2012-07-01 Thread Alexey Kardashevskiy
QEMU from qemu.org/master (not qemu-kvm), linux host 3.4, ppc64. Shortly the problem is in the host kernel: closing a file in one thread does not interrupt select() waiting on the same file description in another thread. Longer story is: I'll use VFIO as an example as I hit this when I was

Re: [Qemu-devel] [PATCH 02/12] savevm: Live migration handlers register the struct directly

2012-07-01 Thread Orit Wasserman
On 07/01/2012 01:20 PM, Juan Quintela wrote: Orit Wasserman owass...@redhat.com wrote: On 06/28/2012 10:22 PM, Juan Quintela wrote: Notice that the live migration users never unregister, so no problem about freeing the ops structure. void unregister_savevm(DeviceState *dev, const char

Re: [Qemu-devel] [PATCH 07/12] savevm: split save_live_setup from save_live_state

2012-07-01 Thread Orit Wasserman
On 06/28/2012 10:22 PM, Juan Quintela wrote: This patch splits stage 1 to its own function for both save_live users, ram and block. It is just a copy of the function, removing the parts of the other stages. Optimizations would came later. Signed-off-by: Juan Quintela quint...@redhat.com

Re: [Qemu-devel] [PATCH 11/12] ram: iterate phase

2012-07-01 Thread Igor Mitsyanko
On 6/28/2012 11:22 PM, Juan Quintela wrote: We only need to synchronize the bitmap when the number of dirty pages is low. Not every time that we call the function. Signed-off-by: Juan Quintela quint...@redhat.com --- arch_init.c |9 ++--- 1 file changed, 6 insertions(+), 3

Re: [Qemu-devel] QEMU question: is eventfd not thread safe?

2012-07-01 Thread Michael S. Tsirkin
On Sun, Jul 01, 2012 at 09:06:20PM +1000, Alexey Kardashevskiy wrote: QEMU from qemu.org/master (not qemu-kvm), linux host 3.4, ppc64. Shortly the problem is in the host kernel: closing a file in one thread does not interrupt select() waiting on the same file description in another thread.

Re: [Qemu-devel] QEMU question: is eventfd not thread safe?

2012-07-01 Thread Alexey Kardashevskiy
On 01/07/12 22:43, Michael S. Tsirkin wrote: On Sun, Jul 01, 2012 at 09:06:20PM +1000, Alexey Kardashevskiy wrote: QEMU from qemu.org/master (not qemu-kvm), linux host 3.4, ppc64. Shortly the problem is in the host kernel: closing a file in one thread does not interrupt select() waiting on

Re: [Qemu-devel] [RFC] [PATCHv2 2/2] Adding basic calls to libseccomp in vl.c

2012-07-01 Thread Paolo Bonzini
Il 18/06/2012 23:53, Corey Bryant ha scritto: Can each thread have separate seccomp whitelists? For example CPU threads should not need pretty much anything but the I/O thread needs I/O. No, seccomp filters are defined and enforced at the process level. Perhaps we can add (at the kernel

Re: [Qemu-devel] QEMU question: is eventfd not thread safe?

2012-07-01 Thread Paolo Bonzini
Il 01/07/2012 13:06, Alexey Kardashevskiy ha scritto: Doing MSI init stuff, QEMU-VFIO calls the same event_notifier_init() (returns recycled fd=XX what is correct but confuses) and qemu_set_fd_handler() which adds a handler but select() does not pick it up. This sounds like a missing

Re: [Qemu-devel] [PATCH v2 00/17] introduce OptsVisitor, rebase -net/-netdev parsing

2012-07-01 Thread Paolo Bonzini
Il 13/06/2012 12:54, Paolo Bonzini ha scritto: Il 13/06/2012 10:22, Laszlo Ersek ha scritto: Inspired by [1], the first half of this series attempts to implement a new visitor that should clean up defining and processing command line options. For a more detailed description, please see [PATCH

Re: [Qemu-devel] [PATCH 3/4] usb: add usb attached scsi emulation

2012-07-01 Thread Paolo Bonzini
Il 20/06/2012 14:41, Gerd Hoffmann ha scritto: Special thanks go to Paolo for bringing the qemu scsi emulation into shape, so this can be added nicely without having to touch a single line of scsi code. But we can touch it and make it even better. :) Do you need a release_req SCSIBusInfo

Re: [Qemu-devel] [PATCH] build: introduce target CONFIG_ variables and use them for kvm

2012-07-01 Thread Paolo Bonzini
Il 23/06/2012 12:30, Peter Maydell ha scritto: Can't it go in hw/arm/kvm (mimicking the final desired place, which will be target-arm/hw/kvm)? And hw/kvm can be moved to hw/i386/kvm, or we can leave it there for now until we're ready to move it to target-i386/hw/kvm. Why's the final

Re: [Qemu-devel] QEMU question: is eventfd not thread safe?

2012-07-01 Thread Alexey Kardashevskiy
On 01/07/12 23:32, Paolo Bonzini wrote: Il 01/07/2012 13:06, Alexey Kardashevskiy ha scritto: Doing MSI init stuff, QEMU-VFIO calls the same event_notifier_init() (returns recycled fd=XX what is correct but confuses) and qemu_set_fd_handler() which adds a handler but select() does not pick it

Re: [Qemu-devel] [PATCH] build: introduce target CONFIG_ variables and use them for kvm

2012-07-01 Thread Peter Maydell
On 1 July 2012 14:37, Paolo Bonzini pbonz...@redhat.com wrote: Il 23/06/2012 12:30, Peter Maydell ha scritto: Can't it go in hw/arm/kvm (mimicking the final desired place, which will be target-arm/hw/kvm)? And hw/kvm can be moved to hw/i386/kvm, or we can leave it there for now until we're

Re: [Qemu-devel] [PATCH] build: introduce target CONFIG_ variables and use them for kvm

2012-07-01 Thread Paolo Bonzini
Il 29/06/2012 14:31, Andreas Färber ha scritto: Ping? I can't figure out if this discussion got wedged (in which case, how should it be unwedged?) or if people were eventually happy with this patch... My guess is we're waiting for Paolo to return from vacation and to comment. Basically the

Re: [Qemu-devel] [PATCH] w32: Fix broken build (missing include file)

2012-07-01 Thread Paolo Bonzini
Il 16/06/2012 20:48, Artyom Tarasenko ha scritto: But still, it's not possible for all contributions, right? To sum this up: GPL v2+ are allowed non-GPL contributions are allowed Yes, as long as they are GPLv2- and v3-compatible. So for example no Apache license (just a theoretical case,

Re: [Qemu-devel] QEMU question: is eventfd not thread safe?

2012-07-01 Thread Alexey Kardashevskiy
On 01/07/12 23:40, Alexey Kardashevskiy wrote: On 01/07/12 23:32, Paolo Bonzini wrote: Il 01/07/2012 13:06, Alexey Kardashevskiy ha scritto: Doing MSI init stuff, QEMU-VFIO calls the same event_notifier_init() (returns recycled fd=XX what is correct but confuses) and qemu_set_fd_handler()

Re: [Qemu-devel] [RFC PATCH 3/3] block: gluster as block backend

2012-07-01 Thread Paolo Bonzini
Il 18/06/2012 19:35, Stefan Hajnoczi ha scritto: +/* Use O_DSYNC for write-through caching, no flags for write-back caching, + * and O_DIRECT for no caching. */ +if ((bdrv_flags BDRV_O_NOCACHE)) +s-open_flags |= O_DIRECT; +if (!(bdrv_flags BDRV_O_CACHE_WB))

Re: [Qemu-devel] [RFC PATCH 3/3] block: gluster as block backend

2012-07-01 Thread Paolo Bonzini
Il 19/06/2012 13:05, Stefan Hajnoczi ha scritto: I picked up this logic from block/raw-posix.c:raw_open_common(). Don't see anything related to bs-enable_write_cache there. Will find out more about bs-enable_write_cache. If you fetch the latest qemu.git and check bdrv_open_common() there is

Re: [Qemu-devel] QEMU question: is eventfd not thread safe?

2012-07-01 Thread Paolo Bonzini
Il 01/07/2012 16:46, Alexey Kardashevskiy ha scritto: On 01/07/12 23:40, Alexey Kardashevskiy wrote: On 01/07/12 23:32, Paolo Bonzini wrote: Il 01/07/2012 13:06, Alexey Kardashevskiy ha scritto: Doing MSI init stuff, QEMU-VFIO calls the same event_notifier_init() (returns recycled fd=XX what

[Qemu-devel] [Bug 1019467] Re: Text mode cursor doesn't blink

2012-07-01 Thread Javier Donoso
** Changed in: qemu Assignee: Javier Donoso (jedc375) = (unassigned) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1019467 Title: Text mode cursor doesn't blink Status in QEMU: New Bug

Re: [Qemu-devel] [PATCH] Exynos4: added RTC device

2012-07-01 Thread Paolo Bonzini
Il 29/06/2012 14:26, Andreas Färber ha scritto: Oh, I see. Should we place this device to hw/Makefile.objs in v2? That would've been nice, but I'll do it as a follow-up now. Yes, so we can also use Anthony's new CONFIG_ARCH_ARM (introducing CONFIG_EXYNOS can be done later). Paolo

Re: [Qemu-devel] [PATCH] target-arm: Fix some copy-and-paste errors in cp register names

2012-07-01 Thread Igor Mitsyanko
On 6/28/2012 5:42 PM, Peter Maydell wrote: Fix a couple of cases where cp register names were copy-and-pasted. These are harmless since we don't use the name for anything (except debugging convenience) but could be confusing. Signed-off-by: Peter Maydell peter.mayd...@linaro.org ---

Re: [Qemu-devel] qemu-kvm-1.0.1 - unable to exit if vcpu is in infinite loop

2012-07-01 Thread Peter Lieven
Am 01.07.2012 um 10:19 schrieb Avi Kivity: On 06/28/2012 10:27 PM, Peter Lieven wrote: Am 28.06.2012 um 18:32 schrieb Avi Kivity: On 06/28/2012 07:29 PM, Peter Lieven wrote: Yes. A signal is sent, and KVM returns from the guest to userspace on pending signals. is there a description

[Qemu-devel] [PATCH] eventfd: making it rhread safe

2012-07-01 Thread Alexey Kardashevskiy
QEMU uses IO handlers to run select() in the main loop. The handlers list is managed by qemu_set_fd_handler() helper which works fine when called from the main thread as it is called not when select() is waiting. However sometime we need to update the handlers list from another thread. For

[Qemu-devel] [PATCH] target-arm: Fix CP15 based WFI

2012-07-01 Thread Paul Brook
The coprocessor register rework broke cp15 based WFI instructions. We incorrectly fall through the normal register write case, which incorrectly adds a forced block termination. We've already done a special version of this (DISAS_WFI), so return immediately. Signed-off-by: Paul Brook

Re: [Qemu-devel] SMP for PReP architecture

2012-07-01 Thread Alexander Graf
On 29.06.2012, at 15:55, Eli Lewis wrote: Hi all, I would like to use qemu to emulate a muliticore PowerPC PReP machine but it see that the SMP is not supported for the PReP architecture. In fact, running: qemu-system-ppc -M prep -smp 2 It returns this message: Number

Re: [Qemu-devel] [PATCH] target-arm: Fix CP15 based WFI

2012-07-01 Thread Peter Maydell
On 1 July 2012 20:59, Paul Brook p...@codesourcery.com wrote: The coprocessor register rework broke cp15 based WFI instructions. We incorrectly fall through the normal register write case, which incorrectly adds a forced block termination.  We've already done a special version of this

Re: [Qemu-devel] [RFC PATCH 0/4] virtio-rng and RngBackend infrastructure (v2)

2012-07-01 Thread Paul Brook
This series depends on my QOM -object series that I just posted. In Amit's thread on virtio-rng, danpb mentioned that we really ought to have a proper RNG backend infrastructure and of course he's correct on that. Now that we have QOM, I wanted to demonstrate how we can use QOM to

Re: [Qemu-devel] QEMU question: is eventfd not thread safe?

2012-07-01 Thread Benjamin Herrenschmidt
Doesn't qemu remove an fd handler before closing the fd? If not that's the bug right there. No, it's just marked deleted, removal is deferred. But that doesn't change the fact that you need to wake up select. Ie. What happens is: - eventfd gets you fd #x - thread 1 selects() on it which

Re: [Qemu-devel] QEMU question: is eventfd not thread safe?

2012-07-01 Thread Benjamin Herrenschmidt
diff --git a/iohandler.c b/iohandler.c index 3c74de6..54f4c48 100644 --- a/iohandler.c +++ b/iohandler.c @@ -77,6 +77,7 @@ int qemu_set_fd_handler2(int fd, ioh-fd_write = fd_write; ioh-opaque = opaque; ioh-deleted = 0; +kill(getpid(), SIGUSR2);

Re: [Qemu-devel] QEMU question: is eventfd not thread safe?

2012-07-01 Thread Alexey Kardashevskiy
On 02/07/12 09:07, Benjamin Herrenschmidt wrote: diff --git a/iohandler.c b/iohandler.c index 3c74de6..54f4c48 100644 --- a/iohandler.c +++ b/iohandler.c @@ -77,6 +77,7 @@ int qemu_set_fd_handler2(int fd, ioh-fd_write = fd_write; ioh-opaque = opaque; ioh-deleted

Re: [Qemu-devel] QEMU question: is eventfd not thread safe?

2012-07-01 Thread ronnie sahlberg
Hi, As Paolo said, I hit this with block/iscsi.c a few months back. Then about a month back I recall something that looks alkmost identical to this hit the IDE driver on the KVM list. ( At least the symptoms looked just like my symptoms, and the KVM guys managed to bisect it down to the exact

Re: [Qemu-devel] QEMU question: is eventfd not thread safe?

2012-07-01 Thread Benjamin Herrenschmidt
On Mon, 2012-07-02 at 10:06 +1000, Alexey Kardashevskiy wrote: Won't that conflict with the business in coroutine-sigaltstack.c ? The code which touches SIGUSR2 does not compile on power. Oh, we don't get the altstack coroutine stuff ? interesting... Hrm... looking at it, it looks like it

Re: [Qemu-devel] QEMU question: is eventfd not thread safe?

2012-07-01 Thread Benjamin Herrenschmidt
On Mon, 2012-07-02 at 10:42 +1000, ronnie sahlberg wrote: Would it be possible to change the set-event-handlers functions to automatically call qemu_notify_event() when the descriptos change? To eliminate the need to call this function at all ? That definitely sounds like the right thing to

Re: [Qemu-devel] QEMU question: is eventfd not thread safe?

2012-07-01 Thread Benjamin Herrenschmidt
On Mon, 2012-07-02 at 10:06 +1000, Alexey Kardashevskiy wrote: I already posted another patch with qemu_notify_event() in this mail thread later :) Yup, just saw that, for some reason I got dropped from the CC list. BTW. I told you there must be an existing mechanism for that :-) Cheers, Ben.

Re: [Qemu-devel] Request VFIO inclusion in linux-next

2012-07-01 Thread Alexey Kardashevskiy
On 27/06/12 22:37, Dan Carpenter wrote: On Mon, Jun 25, 2012 at 10:55:52PM -0600, Alex Williamson wrote: Hi, VFIO has been kicking around for well over a year now and has been posted numerous times for review. The pre-requirements are finally available in linux-next (or will be in the

Re: [Qemu-devel] [RFC] [PATCHv2 2/2] Adding basic calls to libseccomp in vl.c

2012-07-01 Thread Will Drewry
On Sun, Jul 1, 2012 at 8:25 AM, Paolo Bonzini pbonz...@redhat.com wrote: Il 18/06/2012 23:53, Corey Bryant ha scritto: Can each thread have separate seccomp whitelists? For example CPU threads should not need pretty much anything but the I/O thread needs I/O. No, seccomp filters are

Re: [Qemu-devel] Request VFIO inclusion in linux-next

2012-07-01 Thread Alex Williamson
On Mon, 2012-07-02 at 13:41 +1000, Alexey Kardashevskiy wrote: On 27/06/12 22:37, Dan Carpenter wrote: On Mon, Jun 25, 2012 at 10:55:52PM -0600, Alex Williamson wrote: Hi, VFIO has been kicking around for well over a year now and has been posted numerous times for review. The

Re: [Qemu-devel] [PATCH] msi/msix: added API to set MSI message address and data

2012-07-01 Thread Alexey Kardashevskiy
Ping? On 22/06/12 11:15, Alexey Kardashevskiy wrote: Added (msi|msix)_set_message() function for whoever might want to use them. Currently msi_notify()/msix_notify() write to these vectors to signal the guest about an interrupt so the correct values have to written there by the guest or

[Qemu-devel] [Qemu-ppc][PATCH v5 2/4] Add one new file vga-pci.h

2012-07-01 Thread zhlcindy
From: Li Zhang zhlci...@linux.vnet.ibm.com Functions pci_vga_init() and pci_cirrus_vga_init() are declared in pc.h. That prevents other platforms (e.g. sPAPR) to use them. This patch is to create one new file vga-pci.h and move the declarations to vga-pci.h, so that they can be shared by all the

[Qemu-devel] [Qemu-ppc][PATCH v5 4/4] spapr: Add support for -vga option

2012-07-01 Thread zhlcindy
From: Li Zhang zhlci...@linux.vnet.ibm.com Also instanciate the USB keyboard and mouse when that option is used (you can still use -device to create individual devices without all the defaults) Signed-off-by: Benjamin Herrenschmidt b...@kernel.crashing.org Signed-off-by: Li Zhang

[Qemu-devel] [Qemu-ppc][PATCH v5 0/4] Add USB option and enable vga on spapr

2012-07-01 Thread zhlcindy
From: Li Zhang zhlci...@linux.vnet.ibm.com v1 - v2: * Convert USB option from char to bool. v2 - v3: * Remove global USB option * Get USB option with qemu_opt_get_bool(). * Send vga patch for sPAPR which requires USB enabled. v3 - v4: * Fix some English grammar and coding

[Qemu-devel] [Qemu-ppc][PATCH v5 3/4] Cleanup pc.h on other platforms

2012-07-01 Thread zhlcindy
From: Li Zhang zhlci...@linux.vnet.ibm.com The declarations of pci_vga_init() and pci_cirrus_vga_init() are moved to vga-pci.h to be called by all the platforms. So it's necessary to cleanup pc.h on the platforms other than PC which include the file and add vga-pci.h on all the plaforms to call

[Qemu-devel] [Qemu-ppc][PATCH v5 1/4] Add usb option in machine options

2012-07-01 Thread zhlcindy
From: Li Zhang zhlci...@linux.vnet.ibm.com pSeries machine needs to enable USB to add a USB keyboard or USB mouse. -usb option won't be used in the future, and machine options are a better way to enable USB. So this patch is to add USB option to machine options (-machine type=pseries,usb=on/off)