Re: [Qemu-devel] [RFC 9/9] vhost-scsi: add -vhost-scsi host device

2012-07-24 Thread Paolo Bonzini
Il 25/07/2012 00:34, Nicholas A. Bellinger ha scritto: > From: Stefan Hajnoczi > > This patch adds a new type of host device that drives the vhost_scsi > device. The syntax to add vhost-scsi is: > > qemu -vhost-scsi id=vhost-scsi0,wwpn=...,tpgt=123 > > The virtio-scsi emulated device will ma

Re: [Qemu-devel] [PATCH 7/7] s390: make sclp ascii console the default

2012-07-24 Thread Christian Borntraeger
On 24/07/12 21:35, Blue Swirl wrote: [...] > Braces [...] > Braces, also below two times. a generic question. We did it that way because the other code in vl.c is like that. So we should make new code follow the CodingStyle even if the surrounding code looks different, but we dont touch that su

Re: [Qemu-devel] [RFC 1/9] notifier: add validity check and notify function

2012-07-24 Thread Paolo Bonzini
Il 25/07/2012 00:33, Nicholas A. Bellinger ha scritto: > +int event_notifier_notify(EventNotifier *e) > +{ > +uint64_t value = 1; > +int r; > + > +assert(event_notifier_valid(e)); > +r = write(e->fd, &value, sizeof(value)); > +if (r < 0) { > +return -errno; > +} > +

Re: [Qemu-devel] [RFC 2/9] virtio-pci: support host notifiers in TCG mode

2012-07-24 Thread Paolo Bonzini
Il 25/07/2012 00:33, Nicholas A. Bellinger ha scritto: > From: Stefan Hajnoczi > > Normally host notifiers are only used together with vhost-net in KVM > mode. It is occassionally useful to use vhost with TCG mode, mainly for > testing and development. This isn't hard to achieve, simply fall ba

Re: [Qemu-devel] [PATCH] target-arm: kvm: use KVM_SET_SREGS to set target to Cortex A15

2012-07-24 Thread Rusty Russell
On Tue, 17 Jul 2012 19:19:16 +0100, Peter Maydell wrote: > So I can't see anything better than "complain and return failure > from kvm_arch_init_vcpu() if the guest CPU isn't going to work". OK, here's what I have for kvm. It matches the kernel patches I just sent out, with the updated API. I

[Qemu-devel] [PATCH v3 2/2] block: Support GlusterFS as a QEMU block backend

2012-07-24 Thread Bharata B Rao
block: Support GlusterFS as a QEMU block backend. From: Bharata B Rao This patch adds gluster as the new block backend in QEMU. This gives QEMU the ability to boot VM images from gluster volumes. Its already possible to boot from VM images on gluster volumes, but this patchset provides the abili

[Qemu-devel] [PATCH v3 1/2] qemu: Add a config option for GlusterFS as block backend

2012-07-24 Thread Bharata B Rao
qemu: Add a config option for GlusterFS as block backend From: Bharata B Rao GlusterFS support in QEMU depends on libgfapi, libgfrpc and libgfxdr provided by GlusterFS. Signed-off-by: Bharata B Rao --- configure | 34 ++ 1 files changed, 34 insertions(+), 0

[Qemu-devel] [PATCH v3 0/2] GlusterFS support in QEMU - v3

2012-07-24 Thread Bharata B Rao
Hi, This is the v3 of the patchset to support GlusterFS backend from QEMU. Apart from cleanups, the major change in this version is to expose all the gluster configuration options to QEMU user. With this, the gluster specification looks like this: -drive file=gluster:server:[port]:[transport]:vo

Re: [Qemu-devel] [PATCH v4 5/6] qapi: convert sendkey

2012-07-24 Thread Amos Kong
- Original Message - > On Thu, 5 Jul 2012 20:48:44 +0800 > Amos Kong wrote: > > > Convert 'sendkey' to use QAPI. do_sendkey() depends on some > > variables/functions in monitor.c, so reserve qmp_sendkey() > > to monitor.c > > > > key_defs[] in console.h is the mapping of key name to k

[Qemu-devel] vga-pci and MMIO BAR

2012-07-24 Thread Benjamin Herrenschmidt
Hi folks ! Would there be any objection to adding a second MMIO BAR to qemu-vga which mirrors the bochs magic VBE ports ? Support for IO space is optional in PCIe and can be problematic on some architectures, it would be nice to be able to program the card entirely using mmio. Once done, I'd lik

[Qemu-devel] [PATCH 4/5] qom: delay DeviceState's reclaim to main-loop

2012-07-24 Thread Liu Ping Fan
From: Liu Ping Fan iohandler/bh/timer may use DeviceState when its refcnt=0, postpone the reclaimer till they have done with it. Signed-off-by: Liu Ping Fan --- include/qemu/object.h |2 +- main-loop.c |4 main-loop.h |2 ++ qemu-tool.c |4 +++

Re: [Qemu-devel] [PATCH v5 0/6] file descriptor passing using fd sets

2012-07-24 Thread Corey Bryant
On 07/24/2012 08:09 AM, Kevin Wolf wrote: Am 23.07.2012 15:07, schrieb Corey Bryant: Corey Bryant (6): qemu-char: Add MSG_CMSG_CLOEXEC flag to recvmsg qapi: Introduce add-fd, remove-fd, query-fdsets monitor: Clean up fd sets on monitor disconnect block: Convert open calls to qemu_o

Re: [Qemu-devel] [PATCH v5 6/6] block: Enable qemu_open/close to work with fd sets

2012-07-24 Thread Corey Bryant
On 07/24/2012 08:07 AM, Kevin Wolf wrote: Am 23.07.2012 15:08, schrieb Corey Bryant: When qemu_open is passed a filename of the "/dev/fdset/nnn" format (where nnn is the fdset ID), an fd with matching access mode flags will be searched for within the specified monitor fd set. If the fd is fou

[Qemu-devel] [PATCH 5/5] e1000: using new interface--unmap to unplug

2012-07-24 Thread Liu Ping Fan
From: Liu Ping Fan Signed-off-by: Liu Ping Fan --- hw/e1000.c | 15 +-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/hw/e1000.c b/hw/e1000.c index 4573f13..4c1e141 100644 --- a/hw/e1000.c +++ b/hw/e1000.c @@ -1192,6 +1192,18 @@ e1000_cleanup(VLANClientState *nc)

[Qemu-devel] [PATCH 3/5] hotplug: introduce qdev_unplug_ack() to remove device from views

2012-07-24 Thread Liu Ping Fan
From: Liu Ping Fan When guest confirm the removal of device, we should --unmap from MemoryRegion view --isolated from device tree view Signed-off-by: Liu Ping Fan --- hw/acpi_piix4.c |4 ++-- hw/qdev.c | 28 hw/qdev.h |3 ++- 3 files changed,

[Qemu-devel] [PATCH 2/5] exec.c: use refcnt to protect device during dispatching

2012-07-24 Thread Liu Ping Fan
From: Liu Ping Fan acquire device's refcnt with qemu_device_tree_mutex rwlock, so we can safely handle it when mmio dispatch. If in radix-tree, leaf is subpage, then move further step to acquire opaque which is the type --DeiveState. Signed-off-by: Liu Ping Fan --- exec.c | 38 +++

[Qemu-devel] [PATCH 1/5] qom: adopt rwlock to protect accessing dev from removing it

2012-07-24 Thread Liu Ping Fan
From: Liu Ping Fan rwlock: qemu_device_tree_mutex rd side: --device_del(destruction of device will be postphoned until unplug ack from guest), --pci hot-unplug --iteration (qdev_reset_all) wr side: --device_add Signed-off-by: Liu Ping Fan --- hw/pci-hotplug.c |4 hw/q

[Qemu-devel] [PATCH 0/5] prepare unplug out of protection of global lock

2012-07-24 Thread Liu Ping Fan
refer to orignal plan posted by Marcelo Tosatti, http://lists.gnu.org/archive/html/qemu-devel/2012-06/msg04315.html These patches protect DeviceState's rd from reclaimer. It is neccessary when no qemu_global_lock protects between them.

Re: [Qemu-devel] Synchronize issue and lost character when using serial as pipe type

2012-07-24 Thread Wei Xu
Thanks, I'll try it and update later. On Tue, Jul 24, 2012 at 7:36 PM, 陳韋任 (Wei-Ren Chen) < che...@iis.sinica.edu.tw> wrote: > On Tue, Jul 24, 2012 at 07:32:44PM +0800, Wei Xu wrote: > > Hi Folks, > > I am trying to install FreeBSD9.0 with xen4.0.2 and qemu 0.10.2, and try > to set > > up a kerne

Re: [Qemu-devel] [PATCH v10 00/15] QEMU OpenRISC support

2012-07-24 Thread Jia Liu
ping On Fri, Jul 20, 2012 at 3:50 PM, Jia Liu wrote: > This is the OpenCores OpenRISC 1200 support for QEMU. > Full implementation of the system-model and linux-user-model support. > > OpenRISC 1200 is a OpenCores open source CPU, > its architecture manual can be found at > http://opencores.org/s

Re: [Qemu-devel] [RFC 0/9] vhost-scsi: Add support for host virtualized target

2012-07-24 Thread Zhi Yong Wu
On Wed, Jul 25, 2012 at 6:33 AM, Nicholas A. Bellinger wrote: > From: Nicholas Bellinger > > Hi Anthony + QEMU storage folks, > > The following is a reviewable RFC series of vhost-scsi against yesterday's > QEMU.git/master @ commit 401a66357d. > > The series is available directly from: > > git:

[Qemu-devel] Possible bug in cirrus_vga.c vs. HDR handling

2012-07-24 Thread Benjamin Herrenschmidt
Hi folks ! I was debugging a problem with 16bpp support, when I found out that my attempts at writing to the Hidden DAC Register were not working. The reason was that I (well, cirrusdrmfb really) was doing the sequence READ, READ, READ, READ, WRITE (to the DAC mask register), which should have wo

Re: [Qemu-devel] [PULL] pci,msi,virtio

2012-07-24 Thread Alexey Kardashevskiy
On 24/07/12 21:32, Andreas Färber wrote: Am 23.07.2012 20:29, schrieb Alex Williamson: On Mon, 2012-07-23 at 13:16 -0500, Anthony Liguori wrote: On 07/23/2012 12:05 PM, Alex Williamson wrote: Looks like it merged ok for me, but you'll need this to complete the PCIUnregisterFunc conversion. No

Re: [Qemu-devel] [PATCH v2 00/16] net: Move legacy QEMU VLAN code into net/hub.c

2012-07-24 Thread Laszlo Ersek
I'd like to review v2 tomorrow (ahem, today), ie. not right now, but this catches my eye: On 07/24/12 17:35, Stefan Hajnoczi wrote: > * Drop spurious closesocket(fd), probably merge conflict [Stefan] I saw it last time and I thought you had fixed a leak with it on the side. The function looks a

Re: [Qemu-devel] [PATCH 18/22] qidl: qidl.h

2012-07-24 Thread Michael Roth
On Tue, Jul 24, 2012 at 08:47:44PM +, Blue Swirl wrote: > On Tue, Jul 24, 2012 at 5:20 PM, Michael Roth > wrote: > > > > Signed-off-by: Michael Roth > > --- > > qidl.h | 58 ++ > > 1 file changed, 58 insertions(+) > > create mode 10

[Qemu-devel] [PATCH v2 2/2] get_fw_dev_path() impls should allocate memory with glib functions

2012-07-24 Thread Laszlo Ersek
Signed-off-by: Laszlo Ersek --- hw/ide/qdev.c |2 +- hw/isa-bus.c |2 +- hw/pci.c |2 +- hw/scsi-bus.c |2 +- hw/sysbus.c |2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c index 22e58df..4f15070 100644 --- a/hw/ide/qde

[Qemu-devel] [PATCH v2 1/2] accomodate OpenFirmware device paths in sufficient storage

2012-07-24 Thread Laszlo Ersek
Signed-off-by: Laszlo Ersek --- hw/qdev.c | 54 +++--- 1 files changed, 43 insertions(+), 11 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.c index af54467..59cc0c2 100644 --- a/hw/qdev.c +++ b/hw/qdev.c @@ -25,6 +25,8 @@ inherit from a parti

[Qemu-devel] [PATCH v2 0/2] assorted device path formatting cleanups

2012-07-24 Thread Laszlo Ersek
As long as "two" qualifies as "assorted". v1->v2: - abandon original "idea", allocate sufficient memory for OFW device path formatting [Markus] - all bus formatters should rely on glib for dynamic allocation [Peter] Tested with an OVMF debug patch that grabs and logs the "bootorder" fw_cfg file

Re: [Qemu-devel] [PATCH 01/22] qapi: qapi-visit.py -> qapi_visit.py so we can import

2012-07-24 Thread Anthony Liguori
Michael Roth writes: Reviewed-by: Anthony Liguori Regards, Anthony Liguori > Python doesn't allow "-" in module names, so we need to rename the file > so we can re-use bits of the codegen > > Signed-off-by: Michael Roth > --- > Makefile |4 +- > scripts/qapi-visit.py | 35

[Qemu-devel] [RFC 4/9] vhost: Pass device path to vhost_dev_init()

2012-07-24 Thread Nicholas A. Bellinger
From: Stefan Hajnoczi The path to /dev/vhost-net is currently hardcoded in vhost_dev_init(). This needs to be changed so that /dev/vhost-scsi can be used. Pass in the device path instead of hardcoding it. Signed-off-by: Stefan Hajnoczi Cc: Paolo Bonzini Cc: Michael S. Tsirkin Signed-off-by:

[Qemu-devel] [RFC 6/9] virtio-scsi: Open and initialize /dev/vhost-scsi

2012-07-24 Thread Nicholas A. Bellinger
From: Stefan Hajnoczi Begin adding vhost support by opening /dev/vhost-scsi. (v2: Drop legacy ->vhost_vqs[] usage) Signed-off-by: Stefan Hajnoczi Signed-off-by: Zhi Yong Wu Cc: Michael S. Tsirkin Cc: Paolo Bonzini Signed-off-by: Nicholas Bellinger --- hw/virtio-scsi.c | 12

[Qemu-devel] [RFC 7/9] virtio-scsi: Start/stop vhost

2012-07-24 Thread Nicholas A. Bellinger
From: Stefan Hajnoczi This patch starts and stops vhost as the virtio device transitions through its status phases. Vhost can only be started once the guest reports its driver has successfully initialized, which means the virtqueues have been set up by the guest. (v2: Squash virtio-scsi: use th

[Qemu-devel] [RFC 2/9] virtio-pci: support host notifiers in TCG mode

2012-07-24 Thread Nicholas A. Bellinger
From: Stefan Hajnoczi Normally host notifiers are only used together with vhost-net in KVM mode. It is occassionally useful to use vhost with TCG mode, mainly for testing and development. This isn't hard to achieve, simply fall back to notifying the host notifier manually from qemu if KVM mode

[Qemu-devel] [RFC 1/9] notifier: add validity check and notify function

2012-07-24 Thread Nicholas A. Bellinger
From: Stefan Hajnoczi Event notifiers that have not had the event_notifier_init() function called on them are invalid. The event_notifier_valid() function checks whether or not an event notifier is valild. This can be used to check whether a notifier is in use or not. It sometimes useful to no

[Qemu-devel] [RFC 3/9] virtio-pci: check that event notification worked

2012-07-24 Thread Nicholas A. Bellinger
From: Stefan Hajnoczi For sanity assert that event notification succeeds. Signed-off-by: Stefan Hajnoczi Cc: Anthony Liguori Cc: Paolo Bonzini Signed-off-by: Nicholas Bellinger --- hw/virtio-pci.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/hw/virtio-pci.c b

[Qemu-devel] [RFC 0/9] vhost-scsi: Add support for host virtualized target

2012-07-24 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Hi Anthony + QEMU storage folks, The following is a reviewable RFC series of vhost-scsi against yesterday's QEMU.git/master @ commit 401a66357d. The series is available directly from: git://git.kernel.org/pub/scm/virt/kvm/nab/qemu-kvm.git vhost-scsi-merge It contain

Re: [Qemu-devel] [PATCH 10/22] qapi: qapi.py, make json parser more robust

2012-07-24 Thread Michael Roth
On Tue, Jul 24, 2012 at 05:23:33PM -0500, Anthony Liguori wrote: > Michael Roth writes: > > > Currently the QAPI JSON parser expects a very particular style of code > > indentation, the major one being that terminating curly/square brackets are > > not on placed on a seperate line. This is incomp

[Qemu-devel] [RFC 5/9] virtio-scsi: Add wwpn and tgpt properties

2012-07-24 Thread Nicholas A. Bellinger
From: Stefan Hajnoczi A vhost-scsi device must be bound to a tcm_vhost target port. This will be done by issuing an ioctl to the device with the wwpn and tgpt. This patch adds these properties to the virtio-scsi-pci device: qemu -device virtio-scsi-pci,wwpn=$TARGET_WWN,tgpt=$TPGT Future pat

[Qemu-devel] [RFC 9/9] vhost-scsi: add -vhost-scsi host device

2012-07-24 Thread Nicholas A. Bellinger
From: Stefan Hajnoczi This patch adds a new type of host device that drives the vhost_scsi device. The syntax to add vhost-scsi is: qemu -vhost-scsi id=vhost-scsi0,wwpn=...,tpgt=123 The virtio-scsi emulated device will make use of vhost-scsi to process virtio-scsi requests inside the kernel

[Qemu-devel] [RFC 8/9] virtio-scsi: Set max_target=0 during vhost-scsi operation

2012-07-24 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This QEMU patch sets VirtIOSCSIConfig->max_target=0 for vhost-scsi operation to restrict virtio-scsi LLD guest scanning to max_id=0 (a single target ID instance) when connected to individual tcm_vhost endpoints. This ensures that virtio-scsi LLD only attempts to scan tar

Re: [Qemu-devel] [PATCH 11/22] qapi: add open-coded visitor for struct tm types

2012-07-24 Thread Anthony Liguori
Michael Roth writes: Reviewed-by: Anthony Liguori Regards, Anthony Liguori > Signed-off-by: Michael Roth > --- > qapi/Makefile.objs |1 + > qapi/misc-qapi-visit.c | 14 ++ > qapi/qapi-visit-core.h |3 +++ > 3 files changed, 18 insertions(+) > create mode 100644 qa

Re: [Qemu-devel] [PATCH 10/22] qapi: qapi.py, make json parser more robust

2012-07-24 Thread Anthony Liguori
Michael Roth writes: > Currently the QAPI JSON parser expects a very particular style of code > indentation, the major one being that terminating curly/square brackets are > not on placed on a seperate line. This is incompatible with most > pretty-print formats, so make it a little more robust by

Re: [Qemu-devel] [PATCH 14/22] qdev: move Property-related declarations to qdev-properties.h

2012-07-24 Thread Anthony Liguori
Michael Roth writes: License please. Regards, Anthony Liguori > Signed-off-by: Michael Roth > --- > hw/qdev-properties.h | 130 > ++ > hw/qdev.h| 126 +--- > 2 files changed, 131 insert

Re: [Qemu-devel] [PATCH 12/22] qom-fuse: workaround for truncated properties > 4096

2012-07-24 Thread Anthony Liguori
Michael Roth writes: I don't think this is the most correct solution but I think it's good enough in practice so Reviewed-by: Anthony Liguori Regards, Anthony Liguori > We currently hard-code property size at 4096 for the purposes of > getattr()/stat()/etc. For 'state' properties we can exce

Re: [Qemu-devel] [PATCH 08/22] qapi: qapi_visit.py, support for visiting non-pointer/embedded structs

2012-07-24 Thread Anthony Liguori
Michael Roth writes: Reviewed-by: Anthony Liguori Regards, Anthony Liguori > Signed-off-by: Michael Roth > --- > scripts/qapi_visit.py |9 + > 1 file changed, 9 insertions(+) > > diff --git a/scripts/qapi_visit.py b/scripts/qapi_visit.py > index 864acb2..8f8cdca 100644 > --- a/s

Re: [Qemu-devel] [PATCH 06/22] qapi: add visitor interfaces for arrays

2012-07-24 Thread Anthony Liguori
Michael Roth writes: > Signed-off-by: Michael Roth > --- > qapi/qapi-visit-core.c | 25 + > qapi/qapi-visit-core.h |8 > scripts/qapi_visit.py | 28 > 3 files changed, 61 insertions(+) > > diff --git a/qapi/qapi-visit-core.c

Re: [Qemu-devel] [PATCH 07/22] qapi: qapi_visit.py, support generating static functions

2012-07-24 Thread Anthony Liguori
Michael Roth writes: Reviewed-by: Anthony Liguori Regards, Anthony Liguori > qidl embeds visitor code into object files rather than linking against > seperate files, so allow for static declarations when we're using > qapi_visit.py as a library as we do with qidl.py > > Signed-off-by: Michael

Re: [Qemu-devel] [PATCH 05/22] qapi: qapi_visit.py, support arrays and complex qapi definitions

2012-07-24 Thread Anthony Liguori
Michael Roth writes: Reviewed-by: Anthony Liguori Regards, Anthony Liguori > Add support for arrays in the code generators. > > Complex field descriptions can now be used to provide additional > information to the visitor generators, such as the max size of an array, > or the field within a s

Re: [Qemu-devel] [PATCH 04/22] qapi: qapi_visit.py, make code useable as module

2012-07-24 Thread Anthony Liguori
Michael Roth writes: Reviewed-by: Anthony Liguori Regards, Anthony Liguori > Signed-off-by: Michael Roth > --- > scripts/qapi_visit.py | 143 > + > 1 file changed, 74 insertions(+), 69 deletions(-) > > diff --git a/scripts/qapi_visit.py b/s

Re: [Qemu-devel] vhost-scsi port to v1.1.0 + MSI-X performance regression

2012-07-24 Thread Nicholas A. Bellinger
On Tue, 2012-07-24 at 13:20 -0700, Nicholas A. Bellinger wrote: > On Tue, 2012-07-24 at 09:57 +0200, Jan Kiszka wrote: > > On 2012-07-24 09:42, Nicholas A. Bellinger wrote: > > > Hi Anthony, Stefan & QEMU folks, > > > > > > > > > However, thus far I've not been able to get virtio-scsi <-> tcm_v

Re: [Qemu-devel] [PATCH 18/22] qidl: qidl.h

2012-07-24 Thread Blue Swirl
On Tue, Jul 24, 2012 at 5:20 PM, Michael Roth wrote: > > Signed-off-by: Michael Roth > --- > qidl.h | 58 ++ > 1 file changed, 58 insertions(+) > create mode 100644 qidl.h > > diff --git a/qidl.h b/qidl.h > new file mode 100644 > index 0

Re: [Qemu-devel] [PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION

2012-07-24 Thread Nicholas A. Bellinger
On Mon, 2012-07-23 at 18:56 -0700, Greg Kroah-Hartman wrote: > On Tue, Jul 24, 2012 at 01:26:20AM +, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > As requested by Anthony, here is a patch against > > target-pending/for-next-merge > > to expose an ABI version to userspace

Re: [Qemu-devel] [RFC PATCH 0/6] virtio-trace: Support virtio-trace

2012-07-24 Thread Blue Swirl
On Tue, Jul 24, 2012 at 2:36 AM, Yoshihiro YUNOMAE wrote: > Hi All, > > The following patch set provides a low-overhead system for collecting kernel > tracing data of guests by a host in a virtualization environment. > > A guest OS generally shares some devices with other guests or a host, so > re

Re: [Qemu-devel] vhost-scsi port to v1.1.0 + MSI-X performance regression

2012-07-24 Thread Nicholas A. Bellinger
On Tue, 2012-07-24 at 09:57 +0200, Jan Kiszka wrote: > On 2012-07-24 09:42, Nicholas A. Bellinger wrote: > > Hi Anthony, Stefan & QEMU folks, > > > > However, thus far I've not been able to get virtio-scsi <-> tcm_vhost > > I/O to actually work against the latest qemu.git/master.. > > > > So

Re: [Qemu-devel] [PATCH 15/47] blkdebug: process all set_state rules in the old state

2012-07-24 Thread Blue Swirl
On Tue, Jul 24, 2012 at 11:03 AM, Paolo Bonzini wrote: > Currently it is impossible to write a blkdebug script that ping-pongs > between two states, because the second set-state rule will use the > state that is set in the first. If you have > > [set-state] > event = "..." > state = "

Re: [Qemu-devel] [PATCH 2/2] fdc-test: Check RELATIVE SEEK beyond track 0/80

2012-07-24 Thread Blue Swirl
On Tue, Jul 24, 2012 at 9:35 AM, Kevin Wolf wrote: > Am 23.07.2012 19:09, schrieb Blue Swirl: >> On Tue, Jul 17, 2012 at 9:03 AM, Pavel Hrdina wrote: >>> I tested it on the real floppy and the behavior is more complicated. >> >> This reminds me of an idea: it could be interesting to make qtest te

Re: [Qemu-devel] [PATCH v3 2/2] bitops: fix types

2012-07-24 Thread Blue Swirl
On Tue, Jul 24, 2012 at 9:26 AM, Markus Armbruster wrote: > Peter Maydell writes: > >> On 23 July 2012 18:33, Blue Swirl wrote: >>> I'm getting a strong feeling that it's a bad idea to reuse any Linux >>> kernel sources since they are seen as divine and untouchable, unlike >>> for example BSD qu

Re: [Qemu-devel] [PATCH 6/7] s390: sclp ascii console support

2012-07-24 Thread Blue Swirl
On Tue, Jul 24, 2012 at 7:37 AM, Christian Borntraeger wrote: > From: Heinz Graalfs > > This code adds console support by implementing SCLP's ASCII Console > Data event. This is the same console as LPARs ASCII console or z/VMs > sysascii. > > The console can be specified manually with something

[Qemu-devel] [PATCH 11/27] BufferedFile: append, then flush

2012-07-24 Thread Juan Quintela
From: Paolo Bonzini Simplify the logic for pushing data from the buffer to the output pipe/socket. This also matches more closely what will be the operation of the migration thread. Signed-off-by: Paolo Bonzini Signed-off-by: Juan Quintela --- buffered_file.c | 50 +++--

Re: [Qemu-devel] [PATCH 7/7] s390: make sclp ascii console the default

2012-07-24 Thread Blue Swirl
On Tue, Jul 24, 2012 at 7:37 AM, Christian Borntraeger wrote: > This patch makes the sclp ascii default for S390. > > Signed-off-by: Christian Borntraeger > --- > hw/s390-virtio.c |1 - > vl.c | 44 > 2 files changed, 44 insertions(+

[Qemu-devel] [PATCH 04/27] add a version number to ram_list

2012-07-24 Thread Juan Quintela
From: Umesh Deshpande This will be used to detect if last_block might have become invalid across different calls to ram_save_live. Signed-off-by: Paolo Bonzini Signed-off-by: Umesh Deshpande Signed-off-by: Juan Quintela --- arch_init.c |6 ++ cpu-all.h |1 + exec.c |4

[Qemu-devel] [RFC 00/27] Migration thread (WIP)

2012-07-24 Thread Juan Quintela
Hi This series are on top of the migration-next-v5 series just posted. First of all, this is an RFC/Work in progress. Just a lot of people asked for it, and I would like review of the design. It does: - get a new bitmap for migration, and that bitmap uses 1 bit by page - it unfolds migration_bu

[Qemu-devel] [PATCH 12/27] buffered_file: rename opaque to migration_state

2012-07-24 Thread Juan Quintela
Signed-off-by: Juan Quintela --- buffered_file.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/buffered_file.c b/buffered_file.c index 7155800..33b700b 100644 --- a/buffered_file.c +++ b/buffered_file.c @@ -27,7 +27,7 @@ typedef struct QEMUFileBuffered Bu

[Qemu-devel] [PATCH 17/27] buffered_file: unfold migrate_fd_put_buffer

2012-07-24 Thread Juan Quintela
We only used it once, just remove the callback indirection. Signed-off-by: Juan Quintela --- buffered_file.c |7 ++- buffered_file.h |5 + migration.c |8 ++-- migration.h |1 + 4 files changed, 6 insertions(+), 15 deletions(-) diff --git a/buffered_file.c b/

[Qemu-devel] [PATCH 07/27] ram: Introduce migration_bitmap_test_and_reset_dirty()

2012-07-24 Thread Juan Quintela
It just test if the dirty bit is set, and clears it. Signed-off-by: Juan Quintela --- arch_init.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/arch_init.c b/arch_init.c index b47bf05..c49c321 100644 --- a/arch_init.c +++ b/arch_init.c @@ -342,6 +342,

[Qemu-devel] [PATCH 06/22] qapi: add visitor interfaces for arrays

2012-07-24 Thread Michael Roth
Signed-off-by: Michael Roth --- qapi/qapi-visit-core.c | 25 + qapi/qapi-visit-core.h |8 scripts/qapi_visit.py | 28 3 files changed, 61 insertions(+) diff --git a/qapi/qapi-visit-core.c b/qapi/qapi-visit-core.c index 7a82b

[Qemu-devel] [PATCH 09/27] ram: introduce migration_bitmap_sync()

2012-07-24 Thread Juan Quintela
Helper that we use each time that we need to syncronize the migration bitmap with the other dirty bitmaps. Signed-off-by: Juan Quintela --- arch_init.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/arch_init.c b/arch_init.c index c49c321..d21b2a3 100644 --- a/a

[Qemu-devel] [PATCH 22/27] migration: make writes blocking

2012-07-24 Thread Juan Quintela
Move all the writes to the migration_thread, and make writings blocking. Notice that are still using the iothread for everything that we do. Signed-off-by: Juan Quintela --- migration-exec.c |2 -- migration-fd.c |6 -- migration-tcp.c |2 +- migration-unix.c |2 -- migra

[Qemu-devel] [PATCH 26/27] buffered_file: don't flush on put buffer

2012-07-24 Thread Juan Quintela
We call buffered_put_buffer with iothread held, and buffered_flush() does synchronous writes. We only want to do the synchronous writes outside. Signed-off-by: Juan Quintela --- buffered_file.c |2 -- 1 file changed, 2 deletions(-) diff --git a/buffered_file.c b/buffered_file.c index ac232

[Qemu-devel] [PATCH 01/27] buffered_file: g_realloc() can't fail

2012-07-24 Thread Juan Quintela
Signed-off-by: Juan Quintela --- buffered_file.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/buffered_file.c b/buffered_file.c index f170aa0..4148abb 100644 --- a/buffered_file.c +++ b/buffered_file.c @@ -50,20 +50,12 @@ static void buffered_append(QEMUFileBuff

[Qemu-devel] [PATCH 20/22] qemu-timer: add visit_type_QEMUTimer

2012-07-24 Thread Michael Roth
Signed-off-by: Michael Roth --- Makefile |3 ++- qemu-timer.c | 25 + qemu-timer.h |4 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0711f14..c545ebd 100644 --- a/Makefile +++ b/Makefile @@ -157,7 +157,8 @@ qem

[Qemu-devel] [PATCH 03/11] Add XBZRLE documentation

2012-07-24 Thread Juan Quintela
From: Orit Wasserman Signed-off-by: Orit Wasserman Signed-off-by: Juan Quintela --- docs/xbzrle.txt | 136 +++ 1 file changed, 136 insertions(+) create mode 100644 docs/xbzrle.txt diff --git a/docs/xbzrle.txt b/docs/xbzrle.txt new file mod

Re: [Qemu-devel] [QEMU RFC PATCH 6/7] i386: topology & APIC ID utility functions

2012-07-24 Thread Blue Swirl
On Mon, Jul 23, 2012 at 8:14 PM, Eduardo Habkost wrote: > On Mon, Jul 23, 2012 at 07:44:44PM +, Blue Swirl wrote: >> On Mon, Jul 23, 2012 at 7:28 PM, Eduardo Habkost wrote: >> > On Mon, Jul 23, 2012 at 07:11:11PM +, Blue Swirl wrote: >> >> On Mon, Jul 23, 2012 at 6:59 PM, Eduardo Habkost

[Qemu-devel] [PATCH 05/11] Add uleb encoding/decoding functions

2012-07-24 Thread Juan Quintela
From: Orit Wasserman Implement Unsigned Little Endian Base 128. Signed-off-by: Orit Wasserman Signed-off-by: Juan Quintela --- cutils.c | 33 + qemu-common.h |8 2 files changed, 41 insertions(+) diff --git a/cutils.c b/cutils.c index b0bdd

[Qemu-devel] [PATCH 13/22] module additions for schema registration

2012-07-24 Thread Michael Roth
Signed-off-by: Michael Roth --- module.h |2 ++ vl.c |1 + 2 files changed, 3 insertions(+) diff --git a/module.h b/module.h index c4ccd57..cb81aa2 100644 --- a/module.h +++ b/module.h @@ -25,6 +25,7 @@ typedef enum { MODULE_INIT_MACHINE, MODULE_INIT_QAPI, MODULE_INIT

[Qemu-devel] [PATCH 27/27] buffered_file: unfold buffered_append in buffered_put_buffer

2012-07-24 Thread Juan Quintela
It was the only user, and now buffered_put_buffer just do the append Signed-off-by: Juan Quintela --- buffered_file.c | 33 ++--- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/buffered_file.c b/buffered_file.c index d3bed86..f1a21fa 100644 --- a/bu

[Qemu-devel] [PATCH 24/27] migration: take finer locking

2012-07-24 Thread Juan Quintela
Instead of locking the whole migration_thread inside loop, just lock migration_fd_put_notify, that is what interacts with the rest of the world. Signed-off-by: Juan Quintela --- buffered_file.c |2 -- migration.c |5 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git

[Qemu-devel] [PATCH 10/11] Add XBZRLE statistics

2012-07-24 Thread Juan Quintela
From: Orit Wasserman Signed-off-by: Benoit Hudzia Signed-off-by: Petter Svard Signed-off-by: Aidan Shribman Signed-off-by: Orit Wasserman Signed-off-by: Juan Quintela --- arch_init.c | 28 hmp.c| 21 + migration.c |

[Qemu-devel] [PATCH 05/27] protect the ramlist with a separate mutex

2012-07-24 Thread Juan Quintela
From: Umesh Deshpande Add the new mutex that protects shared state between ram_save_live and the iothread. If the iothread mutex has to be taken together with the ramlist mutex, the iothread shall always be _outside_. Signed-off-by: Paolo Bonzini Signed-off-by: Umesh Deshpande Signed-off-by:

[Qemu-devel] [PATCH 21/27] migration: stop all cpus correctly

2012-07-24 Thread Juan Quintela
You can only stop all cpus from the iothread or an vcpu. As we want to do it from the migration_thread, we need to do this dance with the botton handlers. This patch is a request for ideas. I can move this function to cpus.c, but wondered if there is an easy way of doing this? Signed-off-by: Ju

[Qemu-devel] [PATCH 02/27] split MRU ram list

2012-07-24 Thread Juan Quintela
From: Paolo Bonzini Outside the execution threads the normal, non-MRU-ized order of the RAM blocks should always be enough. So manage two separate lists, which will have separate locking rules. Signed-off-by: Paolo Bonzini Signed-off-by: Juan Quintela --- cpu-all.h |4 +++- exec.c|

[Qemu-devel] [PATCH 08/27] ram: Export last_ram_offset()

2012-07-24 Thread Juan Quintela
Is the only way of knowing the RAM size. Signed-off-by: Juan Quintela --- cpu-all.h |2 ++ exec.c|2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cpu-all.h b/cpu-all.h index 0ff452f..45290b7 100644 --- a/cpu-all.h +++ b/cpu-all.h @@ -518,6 +518,8 @@ void dump_exec

Re: [Qemu-devel] [Qemu-discuss] qemu-kvm: -netdev user: Parameter 'id' is missing

2012-07-24 Thread anatoly techtonik
On Tue, Jul 24, 2012 at 1:23 PM, Stefan Hajnoczi wrote: > On Mon, Jul 23, 2012 at 10:41 PM, anatoly techtonik > wrote: >> Forwarding per discussion in qemu-discuss. >> Please CC. >> >> -- Forwarded message -- >> From: Mike Lovell >> Date: Mon, Jul 23, 2012 at 10:58 PM >> Subject

[Qemu-devel] [PATCH 04/11] Add cache handling functions

2012-07-24 Thread Juan Quintela
From: Orit Wasserman Add LRU page cache mechanism. The page are accessed by their address. Signed-off-by: Benoit Hudzia Signed-off-by: Petter Svard Signed-off-by: Aidan Shribman Signed-off-by: Orit Wasserman Signed-off-by: Juan Quintela --- Makefile.objs |1 + cutils.c

[Qemu-devel] [PATCH 06/27] ram: introduce migration_bitmap_set_dirty()

2012-07-24 Thread Juan Quintela
It just marks a region of memory as dirty. Signed-off-by: Juan Quintela --- arch_init.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/arch_init.c b/arch_init.c index 5a97710..b47bf05 100644 --- a/arch_init.c +++ b/arch_init.c @@ -342,6 +342,18 @@ sta

[Qemu-devel] [PATCH 03/27] savevm: Factorize ram globals reset in its own function

2012-07-24 Thread Juan Quintela
Signed-off-by: Juan Quintela --- arch_init.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/arch_init.c b/arch_init.c index f555c27..02d36ce 100644 --- a/arch_init.c +++ b/arch_init.c @@ -491,6 +491,14 @@ static void ram_migration_cancel(void *opaque) migr

[Qemu-devel] [PATCH 10/27] Separate migration bitmap

2012-07-24 Thread Juan Quintela
This patch creates a migration bitmap, which is periodically kept in sync with the qemu bitmap. A separate copy of the dirty bitmap for the migration limits the amount of concurrent access to the qemu bitmap from iothread and migration thread (which requires taking the big lock). We use the qemu b

[Qemu-devel] [PATCH 20/27] migration: make qemu_fopen_ops_buffered() return void

2012-07-24 Thread Juan Quintela
We want the file assignment to happen before the thread is created to avoid locking, so we just do it before creating the thread. Signed-off-by: Juan Quintela --- buffered_file.c | 13 ++--- buffered_file.h |2 +- migration.c |2 +- migration.h |1 + 4 files changed

[Qemu-devel] [PATCH 09/11] Add migration accounting for normal and duplicate pages

2012-07-24 Thread Juan Quintela
From: Orit Wasserman Signed-off-by: Benoit Hudzia Signed-off-by: Petter Svard Signed-off-by: Aidan Shribman Signed-off-by: Orit Wasserman Signed-off-by: Juan Quintela --- arch_init.c | 38 ++ migration.c | 10 ++ migration.h |

[Qemu-devel] [PATCH 07/22] qapi: qapi_visit.py, support generating static functions

2012-07-24 Thread Michael Roth
qidl embeds visitor code into object files rather than linking against seperate files, so allow for static declarations when we're using qapi_visit.py as a library as we do with qidl.py Signed-off-by: Michael Roth --- scripts/qapi_visit.py | 51 -

[Qemu-devel] [PATCH 04/22] qapi: qapi_visit.py, make code useable as module

2012-07-24 Thread Michael Roth
Signed-off-by: Michael Roth --- scripts/qapi_visit.py | 143 + 1 file changed, 74 insertions(+), 69 deletions(-) diff --git a/scripts/qapi_visit.py b/scripts/qapi_visit.py index 04ef7c4..25707f5 100644 --- a/scripts/qapi_visit.py +++ b/scripts/qa

[Qemu-devel] [PATCH 00/11] Migration next v5

2012-07-24 Thread Juan Quintela
Hi This series include back xbrle. In addressed all the review comments addressed by luiz. Please, review. Thanks, Juan. Juan Quintela (1): Restart optimization on stage3 update version Orit Wasserman (10): Add migration capabilities Add migrate_set_parameter command Add XBZRLE docume

[Qemu-devel] [PATCH 25/27] buffered_file: Unfold the trick to restart generating migration data

2012-07-24 Thread Juan Quintela
This was needed before due to the way that the callbacks worked. Signed-off-by: Juan Quintela --- buffered_file.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/buffered_file.c b/buffered_file.c index de07a05..ac2327b 100644 --- a/buffered_file.c +++ b/bu

[Qemu-devel] [PATCH 18/27] buffered_file: We can access directly to bandwidth_limit

2012-07-24 Thread Juan Quintela
Signed-off-by: Juan Quintela --- buffered_file.c |5 ++--- buffered_file.h |3 +-- migration.c |2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/buffered_file.c b/buffered_file.c index 4fca774..43e68b6 100644 --- a/buffered_file.c +++ b/buffered_file.c @@ -222,

[Qemu-devel] [PATCH 14/27] buffered_file: unfold migrate_fd_put_buffer

2012-07-24 Thread Juan Quintela
We only used it once, just remove the callback indirection Signed-off-by: Juan Quintela --- buffered_file.c |7 ++- buffered_file.h |2 -- migration.c |6 ++ migration.h |3 +++ 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/buffered_file.c b/buff

[Qemu-devel] [PATCH 15/27] buffered_file: unfold migrate_fd_put_ready

2012-07-24 Thread Juan Quintela
We only use it once, just remove the callback indirection. Signed-off-by: Juan Quintela --- buffered_file.c |5 + buffered_file.h |2 -- migration.c |4 +--- migration.h |1 + 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/buffered_file.c b/buffered_fi

[Qemu-devel] [PATCH 14/22] qdev: move Property-related declarations to qdev-properties.h

2012-07-24 Thread Michael Roth
Signed-off-by: Michael Roth --- hw/qdev-properties.h | 130 ++ hw/qdev.h| 126 +--- 2 files changed, 131 insertions(+), 125 deletions(-) create mode 100644 hw/qdev-properties.h diff --git

[Qemu-devel] [PATCH 16/27] buffered_file: unfold migrate_fd_put_buffer

2012-07-24 Thread Juan Quintela
We only used it once, just remove the callback indirection. Signed-off-by: Juan Quintela --- buffered_file.c |5 + buffered_file.h |2 -- migration.c |4 +--- migration.h |1 + 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/buffered_file.c b/buffered_f

[Qemu-devel] [PATCH 13/27] buffered_file: opaque is MigrationState

2012-07-24 Thread Juan Quintela
It always have that type, just change it. Signed-off-by: Juan Quintela --- buffered_file.c |6 +++--- buffered_file.h |4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/buffered_file.c b/buffered_file.c index 33b700b..59d952d 100644 --- a/buffered_file.c +++ b/buffer

[Qemu-devel] [PATCH 02/11] Add migrate_set_parameter command

2012-07-24 Thread Juan Quintela
From: Orit Wasserman The management can enable/disable a capability for the next migration by using migrate_set_parameter command. Signed-off-by: Orit Wasserman Signed-off-by: Juan Quintela --- hmp-commands.hx | 14 ++ hmp.c| 45 +++

  1   2   3   >