[Qemu-devel] [PATCH 12/17] xhci: Call usb_device_alloc/free_streams

2013-11-29 Thread Gerd Hoffmann
From: Hans de Goede hdego...@redhat.com Note this code is not as KISS as I would like, the reason for this is that the Linux kernel interface wants streams on eps belonging to one interface to be allocated in one call. Things will also work if we do this one ep at a time (as long as all eps

[Qemu-devel] [PATCH 13/17] ehci: implement port wakeup

2013-11-29 Thread Gerd Hoffmann
Update portsc register and raise irq in case a suspended port is woken up, so remote wakeup works on our ehci ports. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/usb/hcd-ehci.c | 18 -- trace-events | 3 +++ 2 files changed, 19 insertions(+), 2 deletions(-) diff

[Qemu-devel] [PATCH 14/17] Revert usb-tablet: Don't claim wakeup capability for USB-2 version

2013-11-29 Thread Gerd Hoffmann
This reverts commit aa1c9e971e80d25b92908dce3dec7c38b49480ea. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/usb/dev-hid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb/dev-hid.c b/hw/usb/dev-hid.c index 5956720..5e667f0 100644 --- a/hw/usb/dev-hid.c +++

[Qemu-devel] [PATCH 02/17] xhci: add support for suspend/resume

2013-11-29 Thread Gerd Hoffmann
The OS can ask the xhci controller to save and restore its internal state, which is used by the OS when the system is suspended and resumed. This patch handles writes to the save + restore bits in the command register. Only thing it does is updating the restore error bit in the status register

[Qemu-devel] [PATCH 01/17] xhci: Add a few missing checks for disconnected devices

2013-11-29 Thread Gerd Hoffmann
From: Hans de Goede hdego...@redhat.com One of the reworks of qemu's usb core made changes to usb-port's disconnect handling. Now ports with a device will always have a non 0 dev member, but if the device is not attached (which is possible with usb redirection), dev-attached will be 0. So

[Qemu-devel] [PATCH 08/17] uas: Fix response iu struct definition

2013-11-29 Thread Gerd Hoffmann
From: Hans de Goede hdego...@redhat.com This patch mirrors a patch to the Linux uas kernel driver which I've just submitted. It looks like the qemu uas struct definitions were taken from the Linux kernel driver, and have inherited the same mistake. Besides fixing the response iu struct, the

[Qemu-devel] [PATCH 17/17] usb: move usb_{hi, lo} helpers to header file.

2013-11-29 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/usb/desc.c | 10 -- hw/usb/desc.h | 11 +++ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/hw/usb/desc.c b/hw/usb/desc.c index 5dbe754..f18a043 100644 --- a/hw/usb/desc.c +++ b/hw/usb/desc.c @@ -6,16 +6,6 @@

[Qemu-devel] [PATCH 09/17] uas: s/ui/iu/

2013-11-29 Thread Gerd Hoffmann
From: Hans de Goede hdego...@redhat.com The various uas data structures are called IU-s, which is short for Information Unit, rather then UI-s. Signed-off-by: Hans de Goede hdego...@redhat.com Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/usb/dev-uas.c | 76

[Qemu-devel] [PATCH 04/17] uas: Only use report iu-s for task_mgmt status reporting

2013-11-29 Thread Gerd Hoffmann
From: Hans de Goede hdego...@redhat.com Regular scsi cmds should always report their status using a sense-iu, using the sense code to report any errors. Signed-off-by: Hans de Goede hdego...@redhat.com Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/usb/dev-uas.c | 30

[Qemu-devel] [PATCH 11/17] usb: Add usb_device_alloc/free_streams

2013-11-29 Thread Gerd Hoffmann
From: Hans de Goede hdego...@redhat.com Signed-off-by: Hans de Goede hdego...@redhat.com Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/usb/bus.c | 18 ++ include/hw/usb.h | 12 2 files changed, 30 insertions(+) diff --git a/hw/usb/bus.c b/hw/usb/bus.c

[Qemu-devel] [PATCH 06/17] uas: Streams are numbered 1-y, rather then 0-x

2013-11-29 Thread Gerd Hoffmann
From: Hans de Goede hdego...@redhat.com It is easier to simply make the arrays one larger, rather then substracting one everywhere. Signed-off-by: Hans de Goede hdego...@redhat.com Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/usb/dev-uas.c | 6 +++--- 1 file changed, 3 insertions(+), 3

[Qemu-devel] [PATCH 07/17] uas: Bounds check tags when using streams

2013-11-29 Thread Gerd Hoffmann
From: Hans de Goede hdego...@redhat.com Disallow the guest to cause us to address the data3 and status3 arrays out of bounds. Signed-off-by: Hans de Goede hdego...@redhat.com Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/usb/dev-uas.c | 14 ++ 1 file changed, 14

[Qemu-devel] [PATCH 15/17] trace-events: Clean up after removal of old usb-host code

2013-11-29 Thread Gerd Hoffmann
From: Markus Armbruster arm...@redhat.com Commit b5613fd neglected to drop the trace events along with the code. Signed-off-by: Markus Armbruster arm...@redhat.com Signed-off-by: Gerd Hoffmann kra...@redhat.com --- trace-events | 13 - 1 file changed, 13 deletions(-) diff --git

[Qemu-devel] [PATCH 10/17] usb: Add max_streams attribute to endpoint info

2013-11-29 Thread Gerd Hoffmann
From: Hans de Goede hdego...@redhat.com Signed-off-by: Hans de Goede hdego...@redhat.com Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/usb/core.c| 22 ++ hw/usb/desc.c| 2 ++ include/hw/usb.h | 3 +++ 3 files changed, 27 insertions(+) diff --git

[Qemu-devel] [PATCH 05/17] uas: Fix / cleanup usb_uas_task error handling

2013-11-29 Thread Gerd Hoffmann
From: Hans de Goede hdego...@redhat.com -The correct error if we cannot find the dev is INCORRECT_LUN rather then INVALID_INFO_UNIT -Move the device not found check to the top so we only need to do it once -Remove the dev-lun != lun checks, dev is returned by scsi_device_find which searches by

[Qemu-devel] [PULL 00/17] usb patch queue

2013-11-29 Thread Gerd Hoffmann
Hi, A bunch of usb improvements have been piled up during the freeze. So lets flush the queue and get the goodies in. Also try something new while being at it: signed pull request. please pull, Gerd The following changes since commit 7457fe9541b5162f285454947448d553a5d5a531: Update

[Qemu-devel] [PATCH 16/17] usb: add vendor request defines

2013-11-29 Thread Gerd Hoffmann
Add defines for vendor specific usb control requests. Group defines by Device / Interface / Endpoint while being at it. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- include/hw/usb.h | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/include/hw/usb.h

[Qemu-devel] [PATCH 03/17] scsi: Add 2 new sense codes needed by uas

2013-11-29 Thread Gerd Hoffmann
From: Hans de Goede hdego...@redhat.com Signed-off-by: Hans de Goede hdego...@redhat.com Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/scsi/scsi-bus.c | 10 ++ include/hw/scsi/scsi.h | 4 2 files changed, 14 insertions(+) diff --git a/hw/scsi/scsi-bus.c

Re: [Qemu-devel] [PATCH v4 3/4] hw/arm: add sunxi machine type

2013-11-29 Thread Li Guang
Andreas Färber wrote: Am 29.11.2013 01:46, schrieb Li Guang: Andreas Färber wrote: Am 27.11.2013 10:22, schrieb Andreas Färber: Hi, Am 26.11.2013 10:22, schrieb Peter Crosthwaite: On Tue, Nov 26, 2013 at 5:22 PM, liguanglig.f...@cn.fujitsu.com wrote:

Re: [Qemu-devel] [PATCH arm-devs v2 5/8] arm/highbank: Fix CBAR intialisation

2013-11-29 Thread Peter Maydell
On 28 November 2013 23:55, Peter Crosthwaite peter.crosthwa...@xilinx.com wrote: On Fri, Nov 29, 2013 at 5:34 AM, Peter Maydell peter.mayd...@linaro.org wrote: More significantly, this will break midway, because cortex-a15 doesn't have this property. Fortunately, the actual A15 does have a

Re: [Qemu-devel] [PATCH v4 3/4] hw/arm: add sunxi machine type

2013-11-29 Thread Peter Maydell
On 29 November 2013 08:06, Li Guang lig.f...@cn.fujitsu.com wrote: what I design is: we have a sunxi series as a machine, then for sunx4i, we specify -M sunxi -cpu cortex-a8 -device x1 ... for sunx5i, we specify -M sunxi -cpu cortex-a8 -device x2 ... for sunx7i, we specify -M sunxi -cpu

[Qemu-devel] [PATCH V3 6/9] qapi script: support pre-defined enum type as discriminator in union

2013-11-29 Thread Wenchao Xia
By default, any union will automatically generate a enum type as [UnionName]Kind in C code, and it is duplicated when the discriminator is specified as a pre-defined enum type in schema. After this patch, the pre-defined enum type will be really used as the switch case condition in generated C

[Qemu-devel] [PATCH Resend V3 0/9] qapi script: support enum as discriminator and better enum name

2013-11-29 Thread Wenchao Xia
I forgot to cc the maillist before, so resend it to qemu-devel@nongnu.org. This series address two issues: 1. support using enum as discriminator in union. For example, if we have following define in qapi schema: { 'enum': 'EnumOne', 'data': [ 'value1', 'value2', 'value3' ] } { 'type':

[Qemu-devel] [PATCH V3 4/9] qapi script: code move for generate_enum_name()

2013-11-29 Thread Wenchao Xia
Later both qapi-types.py and qapi-visit.py need a common function for enum name generation. Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com Reviewed-by: Eric Blake ebl...@redhat.com --- scripts/qapi-types.py | 10 -- scripts/qapi.py | 10 ++ 2 files changed, 10

[Qemu-devel] [PATCH V3 3/9] qapi script: check correctness of discriminator values in union

2013-11-29 Thread Wenchao Xia
It will check whether the values specified are written correctly, and whether all enum values are covered, when discriminator is a pre-defined enum type Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com --- scripts/qapi-visit.py | 17 + scripts/qapi.py | 31

[Qemu-devel] [PATCH V3 1/9] qapi script: remember enum values

2013-11-29 Thread Wenchao Xia
Later other scripts will need to check the enum values. Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com Reviewed-by: Eric Blake ebl...@redhat.com --- scripts/qapi.py| 18 ++ tests/qapi-schema/comments.out |2 +-

[Qemu-devel] [PATCH V3 9/9] qapi script: do not add _ for every capitalized char in enum

2013-11-29 Thread Wenchao Xia
Now enum AIOContext will generate AIO_CONTEXT instead of A_I_O_CONTEXT, X86CPU will generate X86_CPU instead of X86_C_P_U. Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com --- include/qapi/qmp/qerror.h |2 +- scripts/qapi.py | 26 +++--- target-i386/cpu.c

[Qemu-devel] [PATCH V3 2/9] qapi script: add check for duplicated key

2013-11-29 Thread Wenchao Xia
It is bad that same key was specified twice, especially when a union have two branches with same condition. This patch can prevent it. Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com --- scripts/qapi.py |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git

[Qemu-devel] [PATCH V3 7/9] tests: add cases for inherited struct and union with discriminator

2013-11-29 Thread Wenchao Xia
Test for inherit and complex union. Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com --- tests/qapi-schema/qapi-schema-test.json | 27 ++ tests/qapi-schema/qapi-schema-test.out | 11 +++ tests/test-qmp-input-visitor.c | 120 +

[Qemu-devel] [PATCH V3 8/9] qapi: convert BlockdevOptions to use enum discriminator

2013-11-29 Thread Wenchao Xia
After this patch, hidden enum type BlockdevOptionsKind will not be generated, and other API can use enum BlockdevDriver. Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com --- qapi-schema.json | 14 +- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git

Re: [Qemu-devel] [PATCH V6 0/6] export internal snapshot by qemu-nbd

2013-11-29 Thread Wenchao Xia
v6: Address Kevin's comments: 1: typo fix, remove device and snapshot info in error message. 2: use strstart(). 3: use _require_command(), limit proto to file, since when proto=nbd it can't work. also changed _require_command() to tip better. 4: use strstart(). 6: new

Re: [Qemu-devel] [PATCH v4 3/4] hw/arm: add sunxi machine type

2013-11-29 Thread Li Guang
Peter Maydell wrote: On 29 November 2013 08:06, Li Guanglig.f...@cn.fujitsu.com wrote: what I design is: we have a sunxi series as a machine, then for sunx4i, we specify -M sunxi -cpu cortex-a8 -device x1 ... for sunx5i, we specify -M sunxi -cpu cortex-a8 -device x2 ... for sunx7i, we

Re: [Qemu-devel] [PATCH v4 3/4] hw/arm: add sunxi machine type

2013-11-29 Thread Li Guang
Bamvor Jian Zhang wrote: Hi, Li Guanglig.f...@cn.fujitsu.com wrote: Andreas Färber wrote: Am 29.11.2013 01:46, schrieb Li Guang: Andreas Färber wrote: Am 27.11.2013 10:22, schrieb Andreas Färber: Hi, Am 26.11.2013 10:22, schrieb Peter

Re: [Qemu-devel] [PATCH v4 3/4] hw/arm: add sunxi machine type

2013-11-29 Thread Peter Maydell
On 29 November 2013 08:56, Li Guang lig.f...@cn.fujitsu.com wrote: why not just say this SoC is a board? and other board like cubieboard are only this SoC + several devices, I think is reasonable, at least in this case. Because it's not in general how we prefer to model things in QEMU. When

Re: [Qemu-devel] [PATCH v2 0/4] tcg/optimize: fixes and improvements

2013-11-29 Thread Paolo Bonzini
Il 09/09/2013 19:27, Aurelien Jarno ha scritto: This patchset first fixes known-zero bits optimization so that it works in more than a few cases, and does some further optimizations for 32-bit ops and unsigned loads. v1 - v2: - swapped patches 1 2 - Cc:ed qemu-stable for patch 1 -

Re: [Qemu-devel] [PATCH v2 0/2] qemu-iotests: Filter out qemu-io in all tests

2013-11-29 Thread Kevin Wolf
Am 28.11.2013 um 18:57 hat Eric Blake geschrieben: On 11/28/2013 07:49 AM, Kevin Wolf wrote: https://github.com/famz/qemu.git 035-filter-qemu-io v2: Rebase to current master. [01] Add Reviewed-by for Eric. [02] Update comment to describe the command for mechanical

[Qemu-devel] [PATCH 0/2] Pointer properties and device_add

2013-11-29 Thread armbru
From: Markus Armbruster arm...@redhat.com Pointer properties can be set only by code, not by device_add. A device with a pointer property can't work with device_add only unless the property may remain null. cannot_instantiate_with_device_add_yet needs to be set then. PATCH 1/2 sets it when

[Qemu-devel] [PATCH 2/2] qdev: Document that pointer properties kill device_add

2013-11-29 Thread armbru
From: Markus Armbruster arm...@redhat.com Ask users of DEFINE_PROP_PTR() to set cannot_instantiate_with_device_add_yet, or explain why it's not needed. Signed-off-by: Markus Armbruster arm...@redhat.com --- include/hw/qdev-properties.h | 17 + 1 file changed, 17 insertions(+)

[Qemu-devel] [PATCH 1/2] hw: cannot_instantiate_with_device_add_yet due to pointer props

2013-11-29 Thread armbru
From: Markus Armbruster arm...@redhat.com Pointer properties can be set only by code, not by device_add. A device with a pointer property can work with device_add only when the property may remain null. This is the case for property interrupt_vector of device etraxfs,pic. Add a comment there.

Re: [Qemu-devel] [PATCH 00/21] RFCv2: add Spice block device

2013-11-29 Thread Gerd Hoffmann
On Fr, 2013-11-22 at 14:28 +0100, Marc-André Lureau wrote: Hi there, Even though there is no rush to review this series, it would be nice to get the first ~10 patches. It would make the next rebase easier, and the review smaller. Can you send the ready-to-go spice bits as separate patch

Re: [Qemu-devel] [PATCH 3/5] osdep: add qemu_set_tty_echo()

2013-11-29 Thread Kevin Wolf
Am 14.11.2013 um 11:54 hat Stefan Hajnoczi geschrieben: Using stdin with readline.c requires disabling echo and line buffering. Add a portable wrapper to set the terminal attributes under Linux and Windows. Signed-off-by: Stefan Hajnoczi stefa...@redhat.com There's already

[Qemu-devel] [PATCH 05/17] migration-local: introduce qemu_fopen_socket_local()

2013-11-29 Thread Lei Li
Add qemu_fopen_socket_local() to open QEMUFileLocal introduced earlier. It will create a pipe in write mode if unix_page_flipping is enabled, adjust qemu_local_close() to close pipe as well. Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- include/migration/qemu-file.h |2 +

[Qemu-devel] [PATCH 01/17] QAPI: introduce migration capability unix_page_flipping

2013-11-29 Thread Lei Li
Introduce unix_page_flipping to MigrationCapability for localhost migration. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- qapi-schema.json | 10 +- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/qapi-schema.json

[Qemu-devel] [PATCH 0/17 v4] Localhost migration with side channel for ram

2013-11-29 Thread Lei Li
This patch series tries to introduce a mechanism using side channel pipe for RAM via SCM_RIGHTS with unix domain socket protocol migration. This side channel is used for the page flipping by vmsplice, which is the internal mechanism for localhost migration that we are trying to add to QEMU. The

[Qemu-devel] [PATCH 03/17] qmp-command.hx: add missing docs for migration capabilites

2013-11-29 Thread Lei Li
Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- qmp-commands.hx |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/qmp-commands.hx b/qmp-commands.hx index fba15cd..dcec433 100644 --- a/qmp-commands.hx +++

[Qemu-devel] [PATCH 02/17] migration: add migrate_unix_page_flipping()

2013-11-29 Thread Lei Li
Add migrate_unix_page_flipping() to check if MIGRATION_CAPABILITY_UNIX_PAGE_FLIPPING is enabled. Reviewed-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- include/migration/migration.h |3 +++ migration.c |9 + 2 files

[Qemu-devel] [PATCH 06/17] migration-local: add send_pipefd()

2013-11-29 Thread Lei Li
This patch adds send_pipefd() to pass the pipe file descriptor to destination process. Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- migration-local.c | 46 ++ 1 files changed, 46 insertions(+), 0 deletions(-) diff --git a/migration-local.c

[Qemu-devel] [PATCH 10/17] add unix_msgfd_lookup() to callback get_buffer

2013-11-29 Thread Lei Li
The control message for exchange of pipe file descriptor should be received by recvmsg, and it might be eaten to stream file by qemu_recv() when receiving by two callbacks. So this patch adds unix_msgfd_lookup() to callback get_buffer as the only one receiver, where the pipe file descriptor would

[Qemu-devel] [PATCH 14/17] add new RanState RAN_STATE_MEMORY_STALE

2013-11-29 Thread Lei Li
Introduce new RanState RAN_STATE_MEMORY_STALE and add it to runstate_needs_reset(). Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- qapi-schema.json |7 +-- vl.c | 13 - 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/qapi-schema.json

[Qemu-devel] [PATCH 07/17] save_page: replace block_offset with a MemoryRegion

2013-11-29 Thread Lei Li
This patch exports MemoryRegion to save_page hook, replacing argument ram_addr_t block_offset with a MemoryRegion suggested by Paolo Bonzini. Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- arch_init.c |4 ++-- include/migration/migration.h |2 +-

[Qemu-devel] [PATCH 11/17] add argument ram_addr_t to hook_ram_load

2013-11-29 Thread Lei Li
Adds argument ram_addr_t to hook_ram_load, and replaces QEMURamHookFunc with QEMURamLoadHookFunc for it. With this new argument, it will allows cut almost half of the data transferred on the Unix socket using by page flipping migraton. Signed-off-by: Lei Li li...@linux.vnet.ibm.com ---

[Qemu-devel] [PATCH 08/17] migration-local: override save_page for page transmit

2013-11-29 Thread Lei Li
This patch implements save_page callback for the outside of page flipping. It will write the address of the page on the Unix socket and flip the page data on pipe by vmsplice(). Every page address would have a header flag RAM_SAVE_FLAG_HOOK, which will trigger the load hook to receive it in

[Qemu-devel] [PATCH 17/17] hmp: better format for info migrate_capabilities

2013-11-29 Thread Lei Li
As there might be more capabilities introduced, better to display it in lines. Reviewed-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- hmp.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hmp.c b/hmp.c index 32ee285..dcfa2f9

[Qemu-devel] [PATCH 09/17] savevm: adjust ram_control_save_page for page flipping

2013-11-29 Thread Lei Li
As callback save_page will always be opened by qemu_fopen_socket_local(), and without unix_page_flipping it will return RAM_SAVE_CONTROL_NOT_SUPP, it leads to a wrong qemu_file_set_error() based on the current logic. So this patch adds RAM_SAVE_CONTROL_NOT_SUPP to the check. Reviewed-by: Paolo

[Qemu-devel] [PATCH 13/17] migration-unix: replace qemu_fopen_socket with qemu_fopen_socket_local

2013-11-29 Thread Lei Li
Relace qemu_fopen_socket with qemu_fopen_socket_local in Unix protocol migration. Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- migration-unix.c | 18 ++ 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/migration-unix.c b/migration-unix.c index

Re: [Qemu-devel] [PATCH 3/5] osdep: add qemu_set_tty_echo()

2013-11-29 Thread Kevin Wolf
Am 29.11.2013 um 11:04 hat Kevin Wolf geschrieben: Am 14.11.2013 um 11:54 hat Stefan Hajnoczi geschrieben: Using stdin with readline.c requires disabling echo and line buffering. Add a portable wrapper to set the terminal attributes under Linux and Windows. Signed-off-by: Stefan

[Qemu-devel] [PATCH 15/17] migration-unix: page flipping support on unix outgoing

2013-11-29 Thread Lei Li
Add page flipping support on unix outgoing part by stopping VM with the new RunState RUN_STATE_MEMORY_STALE before invoking migration if unix_page_flipping enabled. Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- migration-unix.c | 11 +++ 1 files changed, 11 insertions(+), 0

[Qemu-devel] [PATCH 16/17] migration: adjust migration_thread() process for page flipping

2013-11-29 Thread Lei Li
Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- migration.c |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/migration.c b/migration.c index 4ac466b..68b5b02 100644 --- a/migration.c +++ b/migration.c @@ -582,7 +582,7 @@ static void *migration_thread(void *opaque)

[Qemu-devel] [PATCH 01/30] virtio-ccw: move virtio_ccw_stop_ioeventfd to virtio_ccw_busdev_unplug

2013-11-29 Thread Paolo Bonzini
Similar to the PCI bug that prompted these patches, virtio-ccw will segfault after the reworking of hotplug/hot-unplug. Prepare for this by moving virtio_ccw_stop_ioeventfd to before the freeing of the proxy device. A better place for this could be the device_unplugged callback for the

[Qemu-devel] [PATCH 02/30] virtio-bus: remove vdev field

2013-11-29 Thread Paolo Bonzini
The vdev field is complicated to synchronize. Just access the BusState's list of children. Cc: qemu-sta...@nongnu.org Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/virtio/virtio-bus.c | 65 +- hw/virtio/virtio-mmio.c| 9 +++---

[Qemu-devel] [PATCH 04/17] migration-local: add QEMUFileLocal with socket based QEMUFile

2013-11-29 Thread Lei Li
This patch adds QEMUFileLocal with copy of socket based QEMUFile, will be used as the basis code for Unix socket protocol migration and page flipping migration. Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- Makefile.target |1 + migration-local.c | 123

[Qemu-devel] [PATCH 08/30] virtio-net: switch exit callback to VirtioDeviceClass

2013-11-29 Thread Paolo Bonzini
This ensures hot-unplug is handled properly by the proxy. Cc: qemu-sta...@nongnu.org Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/net/virtio-net.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index

[Qemu-devel] [PATCH 11/30] virtio-rng: switch exit callback to VirtioDeviceClass

2013-11-29 Thread Paolo Bonzini
This ensures hot-unplug is handled properly by the proxy. Cc: qemu-sta...@nongnu.org Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/virtio/virtio-rng.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/virtio/virtio-rng.c b/hw/virtio/virtio-rng.c index

[Qemu-devel] [PATCH v4 00/30] virtio: cleanup, fix hot-unplug, move to realize

2013-11-29 Thread Paolo Bonzini
This series fixes hot-unplug of virtio devices, which can crash due to dangling pointer accesses. The current implementation supports guest-initiated hot-unplug via the virtio_bus_destroy_device function, but not hot-unplugging the virtio device by virtue of unplugging its parent container

[Qemu-devel] [PATCH 04/30] virtio-pci: remove vdev field

2013-11-29 Thread Paolo Bonzini
The vdev field is complicated to synchronize. Just access the BusState's list of children. Cc: qemu-sta...@nongnu.org Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/virtio/virtio-pci.c | 110 + hw/virtio/virtio-pci.h | 1 - 2 files

[Qemu-devel] [PATCH 03/30] virtio-ccw: remove vdev field

2013-11-29 Thread Paolo Bonzini
The vdev field is complicated to synchronize. Just access the BusState's list of children. Cc: qemu-sta...@nongnu.org Reviewed-by: Cornelia Huck cornelia.h...@de.ibm.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/s390x/virtio-ccw.c | 80

[Qemu-devel] [PATCH 05/30] virtio-bus: cleanup plug/unplug interface

2013-11-29 Thread Paolo Bonzini
Right now we have these pairs: - virtio_bus_plug_device/virtio_bus_destroy_device. The first takes a VirtIODevice, the second takes a VirtioBusState - device_plugged/device_unplug callbacks in the VirtioBusClass (here it's just the naming that is inconsistent) - virtio_bus_destroy_device

[Qemu-devel] [PATCH 06/30] virtio-blk: switch exit callback to VirtioDeviceClass

2013-11-29 Thread Paolo Bonzini
This ensures hot-unplug is handled properly by the proxy. Cc: qemu-sta...@nongnu.org Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/block/virtio-blk.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index

[Qemu-devel] [PATCH 07/30] virtio-serial: switch exit callback to VirtioDeviceClass

2013-11-29 Thread Paolo Bonzini
This ensures hot-unplug is handled properly by the proxy. Cc: qemu-sta...@nongnu.org Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/char/virtio-serial-bus.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/char/virtio-serial-bus.c

[Qemu-devel] [PATCH 14/30] virtio-9p: QOM realize preparations

2013-11-29 Thread Paolo Bonzini
From: Andreas Färber afaer...@suse.de Avoid unnecessary VIRTIO_DEVICE(). Signed-off-by: Andreas Färber afaer...@suse.de Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/9pfs/virtio-9p-device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/9pfs/virtio-9p-device.c

[Qemu-devel] [PATCH 21/30] virtio: Start converting VirtioDevice to QOM realize

2013-11-29 Thread Paolo Bonzini
From: Andreas Färber afaer...@suse.de Temporarily allow either VirtioDeviceClass::init or VirtioDeviceClass::realize. Introduce VirtioDeviceClass::unrealize for symmetry. Signed-off-by: Andreas Färber afaer...@suse.de Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/virtio/virtio.c

[Qemu-devel] [PATCH 15/30] virtio-blk: QOM realize preparations

2013-11-29 Thread Paolo Bonzini
From: Andreas Färber afaer...@suse.de Rename variable qdev - dev since that's what realize's argument is called by convention. Signed-off-by: Andreas Färber afaer...@suse.de Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/block/virtio-blk.c | 8 1 file changed, 4 insertions(+),

[Qemu-devel] [PATCH 16/30] virtio-serial: QOM realize preparations

2013-11-29 Thread Paolo Bonzini
From: Andreas Färber afaer...@suse.de Signed-off-by: Andreas Färber afaer...@suse.de Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/char/virtio-serial-bus.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/hw/char/virtio-serial-bus.c

[Qemu-devel] [PATCH 26/30] virtio-balloon: Convert to QOM realize

2013-11-29 Thread Paolo Bonzini
From: Andreas Färber afaer...@suse.de Signed-off-by: Andreas Färber afaer...@suse.de Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/virtio/virtio-balloon.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/virtio/virtio-balloon.c

[Qemu-devel] [PATCH 12/30] virtio-pci: add device_unplugged callback

2013-11-29 Thread Paolo Bonzini
This fixes a crash in hot-unplug of virtio-pci devices behind a PCIe switch. The crash happens because the ioeventfd is still set whent the child is destroyed (destruction happens in postorder). Then the proxy tries to unset to ioeventfd, but the virtqueue structure that holds the EventNotifier

[Qemu-devel] [PATCH 25/30] virtio-net: Convert to QOM realize

2013-11-29 Thread Paolo Bonzini
From: Andreas Färber afaer...@suse.de Signed-off-by: Andreas Färber afaer...@suse.de Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/net/virtio-net.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index

[Qemu-devel] [PATCH 18/30] virtio-balloon: QOM realize preparations

2013-11-29 Thread Paolo Bonzini
From: Andreas Färber afaer...@suse.de Rename qdev - dev since that's what realize's argument is called by convention. No need to keep more qdev around than necessary. Avoid duplicate VIRTIO_DEVICE() cast. Signed-off-by: Andreas Färber afaer...@suse.de Signed-off-by: Paolo Bonzini

[Qemu-devel] [PATCH 27/30] virtio-rng: Convert to QOM realize

2013-11-29 Thread Paolo Bonzini
From: Andreas Färber afaer...@suse.de Signed-off-by: Andreas Färber afaer...@suse.de Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/virtio/virtio-rng.c | 24 +++- include/hw/virtio/virtio-rng.h | 2 ++ 2 files changed, 13 insertions(+), 13 deletions(-) diff

[Qemu-devel] [PATCH 28/30] virtio-scsi: Convert to QOM realize

2013-11-29 Thread Paolo Bonzini
From: Andreas Färber afaer...@suse.de Signed-off-by: Andreas Färber afaer...@suse.de Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/scsi/vhost-scsi.c| 33 + hw/scsi/virtio-scsi.c | 32 +++-

[Qemu-devel] [PATCH 20/30] virtio-scsi: QOM realize preparations

2013-11-29 Thread Paolo Bonzini
From: Andreas Färber afaer...@suse.de Rename qdev - dev since that's what realize's argument is called by convention. No need to keep more qdev around than necessary. Avoid duplicate VIRTIO_DEVICE() cast. Signed-off-by: Andreas Färber afaer...@suse.de Signed-off-by: Paolo Bonzini

[Qemu-devel] [PATCH 29/30] virtio: Complete converting VirtioDevice to QOM realize

2013-11-29 Thread Paolo Bonzini
From: Andreas Färber afaer...@suse.de Drop VirtioDeviceClass::init. Signed-off-by: Andreas Färber afaer...@suse.de Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/scsi/virtio-scsi.c | 3 +-- hw/virtio/virtio.c | 6 -- include/hw/virtio/virtio.h | 5 +++-- 3 files

[Qemu-devel] [PATCH 23/30] virtio-blk: Convert to QOM realize

2013-11-29 Thread Paolo Bonzini
From: Andreas Färber afaer...@suse.de Signed-off-by: Andreas Färber afaer...@suse.de Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/block/virtio-blk.c | 24 tests/qdev-monitor-test.c | 4 +--- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git

[Qemu-devel] [PATCH 30/30] virtio: Convert exit to unrealize

2013-11-29 Thread Paolo Bonzini
From: Andreas Färber afaer...@suse.de Signed-off-by: Andreas Färber afaer...@suse.de Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/block/virtio-blk.c | 10 ++ hw/char/virtio-serial-bus.c | 9 + hw/net/virtio-net.c | 9 +

Re: [Qemu-devel] [PATCH 19/21] sysemu: add vm_start_hold/release

2013-11-29 Thread Paolo Bonzini
Il 18/11/2013 13:25, Marc-André Lureau ha scritto: +static int start_hold; + +void vm_start_hold(void) +{ +start_hold++; +} + +void vm_start_release(void) +{ +start_hold--; +vm_start(); +} + void vm_start(void) { +if (start_hold != 0) { +return; +}

[Qemu-devel] [PATCH 24/30] virtio-serial: Convert to QOM realize

2013-11-29 Thread Paolo Bonzini
From: Andreas Färber afaer...@suse.de Signed-off-by: Andreas Färber afaer...@suse.de Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/char/virtio-serial-bus.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/char/virtio-serial-bus.c

Re: [Qemu-devel] [PATCH 1/2] hw: cannot_instantiate_with_device_add_yet due to pointer props

2013-11-29 Thread Edgar E. Iglesias
On Fri, Nov 29, 2013 at 10:43:44AM +0100, arm...@redhat.com wrote: From: Markus Armbruster arm...@redhat.com Pointer properties can be set only by code, not by device_add. A device with a pointer property can work with device_add only when the property may remain null. This is the case

[Qemu-devel] [PATCH 22/30] virtio-9p: Convert to QOM realize

2013-11-29 Thread Paolo Bonzini
From: Andreas Färber afaer...@suse.de Signed-off-by: Andreas Färber afaer...@suse.de Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/9pfs/virtio-9p-device.c | 41 - 1 file changed, 20 insertions(+), 21 deletions(-) diff --git

Re: [Qemu-devel] [PATCH v6 1/5] hw/ptimer: add VMSTATE_PTIMER_ARRAY

2013-11-29 Thread Peter Maydell
On 27 November 2013 08:23, liguang lig.f...@cn.fujitsu.com wrote: Signed-off-by: liguang lig.f...@cn.fujitsu.com --- include/hw/ptimer.h |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/include/hw/ptimer.h b/include/hw/ptimer.h index 28fcaf1..a9b8f1d 100644 ---

[Qemu-devel] [PATCH 19/30] virtio-rng: QOM realize preparations

2013-11-29 Thread Paolo Bonzini
From: Andreas Färber afaer...@suse.de Rename qdev - dev because that's what realize's argument is called by convention. No need to keep more qdev around than necessary. Signed-off-by: Andreas Färber afaer...@suse.de Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/virtio/virtio-rng.c |

Re: [Qemu-devel] [PATCH 0/2] scsi: fix VERIFY command

2013-11-29 Thread Hervé Poussineau
Paolo Bonzini a écrit : Windows executes the VERIFY command if the user forces a disk check at the next startup. QEMU crashes on it; fix it by doing exactly nothing to VERIFY a bunch of sectors. Paolo Bonzini (2): scsi-bus: fix transfer length and direction for VERIFY command scsi-disk:

[Qemu-devel] [PATCH 13/30] virtio-blk-dataplane: Improve error reporting

2013-11-29 Thread Paolo Bonzini
From: Andreas Färber afaer...@suse.de Return an Error so that it can be propagated later. Tested-by: Stefan Hajnoczi stefa...@redhat.com Acked-by: Stefan Hajnoczi stefa...@redhat.com [AF: Rebased] Signed-off-by: Andreas Färber afaer...@suse.de Signed-off-by: Paolo Bonzini pbonz...@redhat.com ---

Re: [Qemu-devel] [fixed-up][PATCH v6 2/5] hw/timer: add sunxi timer device

2013-11-29 Thread Peter Maydell
On 27 November 2013 08:29, liguang lig.f...@cn.fujitsu.com wrote: Signed-off-by: liguang lig.f...@cn.fujitsu.com --- default-configs/arm-softmmu.mak |2 + hw/timer/Makefile.objs |1 + hw/timer/sunxi-pit.c| 254 +++

Re: [Qemu-devel] [PATCH v6 1/5] hw/ptimer: add VMSTATE_PTIMER_ARRAY

2013-11-29 Thread Peter Maydell
On 29 November 2013 11:01, Peter Maydell peter.mayd...@linaro.org wrote: On 27 November 2013 08:23, liguang lig.f...@cn.fujitsu.com wrote: Signed-off-by: liguang lig.f...@cn.fujitsu.com --- include/hw/ptimer.h |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git

Re: [Qemu-devel] [PATCH 06/17] migration-local: add send_pipefd()

2013-11-29 Thread Daniel P. Berrange
On Fri, Nov 29, 2013 at 06:06:13PM +0800, Lei Li wrote: This patch adds send_pipefd() to pass the pipe file descriptor to destination process. Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- migration-local.c | 46 ++ 1 files changed, 46

[Qemu-devel] [PATCH 12/17] migration-local: override hook_ram_load

2013-11-29 Thread Lei Li
Override hook_ram_load to receive the pipe file descriptor passed by source process and page address which will be extracted to vmsplice the page data from pipe. Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- migration-local.c | 59 + 1

Re: [Qemu-devel] [PATCH] hw/intc/sunxi-pic: fix irq status setting

2013-11-29 Thread Peter Maydell
On 27 November 2013 05:47, liguang lig.f...@cn.fujitsu.com wrote: Signed-off-by: liguang lig.f...@cn.fujitsu.com --- hw/intc/sunxi-pic.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) This isn't in mainline, so please don't send patches-to-patches. You should just fold this sort

[Qemu-devel] [PATCH 10/30] virtio-balloon: switch exit callback to VirtioDeviceClass

2013-11-29 Thread Paolo Bonzini
This ensures hot-unplug is handled properly by the proxy. Cc: qemu-sta...@nongnu.org Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/virtio/virtio-balloon.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/virtio/virtio-balloon.c

[Qemu-devel] [PATCH 09/30] virtio-scsi: switch exit callback to VirtioDeviceClass

2013-11-29 Thread Paolo Bonzini
This ensures hot-unplug is handled properly by the proxy. Cc: qemu-sta...@nongnu.org Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/scsi/vhost-scsi.c| 11 +-- hw/scsi/virtio-scsi.c | 15 +++ include/hw/virtio/virtio-scsi.h | 2 +- 3 files

[Qemu-devel] [PATCH 17/30] virtio-net: QOM realize preparations

2013-11-29 Thread Paolo Bonzini
From: Andreas Färber afaer...@suse.de Rename variable qdev - dev since that's what realize's argument is called by convention. Avoid duplicate VIRTIO_DEVICE() cast. Signed-off-by: Andreas Färber afaer...@suse.de Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/net/virtio-net.c | 18

Re: [Qemu-devel] [PATCH v3 3/6] tcg-arm: Use qemu_getauxval

2013-11-29 Thread Peter Maydell
On 17 October 2013 16:29, Richard Henderson r...@twiddle.net wrote: Allow host detection on linux systems without glibc 2.16 or later. Signed-off-by: Richard Henderson r...@twiddle.net Reviewed-by: Peter Maydell peter.mayd...@linaro.org (this is I think the only patch in this series I haven't

  1   2   3   >