Re: [Qemu-devel] [RFC 1/8] timer: associate alarm_timer with AioContext

2013-07-21 Thread Jan Kiszka
On 2013-07-21 10:42, Liu Ping Fan wrote: > We will arm each AioContext with its own timer stuff. As the first > step, we should make each AioContext with its own alarm_timer, > so they can raise the deadline independent. > Each thread with AioContext will have dedicated signal handler > to trigger

[Qemu-devel] [PATCH 1/2] Fix real mode guest migration

2013-07-21 Thread Orit Wasserman
Older KVM versions save CS dpl value to an invalid value for real mode guests (0x3). This patch detect this situation when loading CPU state and set all the segments dpl to zero. This will allow migration from older KVM on host without unrestricted guest to hosts with restricted guest support. For

[Qemu-devel] [PATCH 2/2] Fix real mode guest segments dpl value in savevm

2013-07-21 Thread Orit Wasserman
Older KVM version put invalid value in the segments registers dpl field for real mode guests (0x3). This breaks migration from those hosts to hosts with unrestricted guest support. We detect it by checking CS dpl value for real mode guest and fix the dpl values of all the segment registers. Signed

Re: [Qemu-devel] [PATCH 1/2] block: allow live commit of active image

2013-07-21 Thread Fam Zheng
On Mon, 07/22 08:34, Paolo Bonzini wrote: > Il 22/07/2013 05:46, Fam Zheng ha scritto: > > This patch eliminates limitation of committing the active device. > > > > bdrv_drop_intermediate is reimplemented to take pointers to > > (BlockDriverState *), so it can modify the caller's local pointers to

Re: [Qemu-devel] [PATCH 0/2] block: allow commit active as top

2013-07-21 Thread Wenchao Xia
于 2013-7-22 11:46, Fam Zheng 写道: > Previously live commit of active block device is not supported, this series > implements it and updates corresponding qemu-iotests cases. > > Please see commit messages for implementation details. > > Fam Zheng (2): >block: allow live commit of active image

Re: [Qemu-devel] [RFC 4/8] timer: protect timers_state with lock

2013-07-21 Thread Jan Kiszka
On 2013-07-21 10:43, Liu Ping Fan wrote: > In kvm mode, vm_clock may be read on AioContexts outside BQL(next > patch). This will make timers_state --the foundation of vm_clock > exposed to race condition. Using private lock to protect it. > Note in tcg mode, vm_clock still read inside BQL, so icoun

Re: [Qemu-devel] [RFC 3/8] timer: make timers_state static

2013-07-21 Thread Jan Kiszka
On 2013-07-21 10:43, Liu Ping Fan wrote: > Signed-off-by: Liu Ping Fan > --- > cpus.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/cpus.c b/cpus.c > index 61e86a8..4254ca9 100644 > --- a/cpus.c > +++ b/cpus.c > @@ -112,7 +112,7 @@ typedef struct TimersState { > i

Re: [Qemu-devel] [RFC PATCH] spapr-vscsi: add task management

2013-07-21 Thread Benjamin Herrenschmidt
On Mon, 2013-07-22 at 08:30 +0200, Paolo Bonzini wrote: > I suggest you check in the relevant part of the vscsi spec how you are > supposed to send back errors ("FUNCTION REJECTED", "INCORRECT LUN"). > Once you do that, implementing the "query" TMFs is trivial. The vscsi spec is just the transport

Re: [Qemu-devel] [PATCH 1/2] block: allow live commit of active image

2013-07-21 Thread Paolo Bonzini
Il 22/07/2013 05:46, Fam Zheng ha scritto: > This patch eliminates limitation of committing the active device. > > bdrv_drop_intermediate is reimplemented to take pointers to > (BlockDriverState *), so it can modify the caller's local pointers to > preserve their semantics, while updating active B

Re: [Qemu-devel] [RFC PATCH] spapr-vscsi: add task management

2013-07-21 Thread Paolo Bonzini
Il 22/07/2013 03:04, Benjamin Herrenschmidt ha scritto: > The free_request callback > is not directly "linked" to task management though it happens to only > be called in that case. It's a pre-requisite to task management, make it > a separate patch. Ben is right, in fact I'm not sure why you need

Re: [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff

2013-07-21 Thread Jan Kiszka
On 2013-07-22 06:38, liu ping fan wrote: > On Sun, Jul 21, 2013 at 5:53 PM, Alex Bligh wrote: >> Liu, >> >> >> --On 21 July 2013 16:42:57 +0800 Liu Ping Fan wrote: >> >>> Currently, the timers run on iothread within BQL, so virtio-block >>> dataplane can not use throttle, as Stefan Hajnoczi point

[Qemu-devel] [PATCH v2] spapr-vscsi: add task management

2013-07-21 Thread Alexey Kardashevskiy
At the moment the guest kernel issues two types of task management requests to the hypervisor - task about and lun reset. This adds handling for these tasks. As spapr-vscsi starts calling scsi_req_cancel(), free_request callback was implemented. As virtio-vscsi, spapr-vscsi does not handle CLEAR_A

Re: [Qemu-devel] [PATCH v2 10/11] block: add option 'backing' to -drive options

2013-07-21 Thread Fam Zheng
On Wed, 07/17 14:36, Paolo Bonzini wrote: > Il 17/07/2013 11:42, Fam Zheng ha scritto: > > This option allows overriding backing hd of drive. If the target drive > > exists, it's referenced as the backing file and refcount incremented. > > > > Example: > > qemu-system-x86_64 -drive \ > >

[Qemu-devel] [PATCH] gdbstub: fix sThreadInfo handler

2013-07-21 Thread Max Filippov
After the commit 182735e cpu: Make first_cpu and next_cpu CPUState we can no longer blindly use cpu->next_cpu->env_ptr to get CPUArchState of the next CPU, as the next_cpu is NULL in the last CPU. This fixes segfault caused by gdb command 'info threads'. Signed-off-by: Max Filippov --- gdbstub.

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

2013-07-21 Thread Wenchao Xia
Eric, I'd like to have a discuss about snapshot and vmbackup in qemu/libvirt with management stack's perspective, what is your time zone? I hope to ping you in IRC. On 07/17/2013 08:03 AM, Wenchao Xia wrote: This series allow user to read internal snapshot's contents without qemu-img convert. A

Re: [Qemu-devel] [PATCH V19 0/8] add-cow file format

2013-07-21 Thread Wenchao Xia
于 2013-5-30 18:00, Dongxu Wang 写道: > It will introduce a new file format: add-cow. > > The add-cow file format makes it possible to perform copy-on-write on top of > a raw disk image. When we know that no backing file clusters remain visible > (e.g. we have streamed the entire image and copied al

Re: [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff

2013-07-21 Thread liu ping fan
On Sun, Jul 21, 2013 at 5:53 PM, Alex Bligh wrote: > Liu, > > > --On 21 July 2013 16:42:57 +0800 Liu Ping Fan wrote: > >> Currently, the timers run on iothread within BQL, so virtio-block >> dataplane can not use throttle, as Stefan Hajnoczi pointed out in his >> patches to port dataplane onto bl

[Qemu-devel] [PATCH 2/2] qemu-iotests: update test cases for commit active

2013-07-21 Thread Fam Zheng
Factor out commit test common logic into super class, and update test of committing the active image. Signed-off-by: Fam Zheng --- tests/qemu-iotests/040 | 68 +++--- 1 file changed, 26 insertions(+), 42 deletions(-) diff --git a/tests/qemu-iotests/04

[Qemu-devel] [PATCH 1/2] block: allow live commit of active image

2013-07-21 Thread Fam Zheng
This patch eliminates limitation of committing the active device. bdrv_drop_intermediate is reimplemented to take pointers to (BlockDriverState *), so it can modify the caller's local pointers to preserve their semantics, while updating active BDS in-place by bdrv_swap active and base: we need dat

[Qemu-devel] [PATCH 0/2] block: allow commit active as top

2013-07-21 Thread Fam Zheng
Previously live commit of active block device is not supported, this series implements it and updates corresponding qemu-iotests cases. Please see commit messages for implementation details. Fam Zheng (2): block: allow live commit of active image qemu-iotests: update test cases for commit act

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

2013-07-21 Thread Wenchao Xia
于 2013-7-22 10:10, Fam Zheng 写道: On Fri, 07/19 17:03, Wenchao Xia wrote: 于 2013-7-18 13:43, Stefan Hajnoczi 写道: On Wed, Jul 17, 2013 at 10:03:51PM +0800, Wenchao Xia wrote: This series allow user to read internal snapshot's contents without qemu-img convert. Another purpose is that, when qemu

Re: [Qemu-devel] [PATCH] Bug Fix:Segmentation fault when use usb-ehci device

2013-07-21 Thread Mike Qiu
于 2013/7/19 22:32, Peter Maydell 写道: On 19 July 2013 15:12, Andreas Färber wrote: No, I don't. There were other segfault avoidance patches like yours over the past months - they're all fixing individual segfault symptoms. Question for Paolo is whether we want to continue to discover them one by

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

2013-07-21 Thread Fam Zheng
On Fri, 07/19 17:03, Wenchao Xia wrote: > 于 2013-7-18 13:43, Stefan Hajnoczi 写道: > >On Wed, Jul 17, 2013 at 10:03:51PM +0800, Wenchao Xia wrote: > >>This series allow user to read internal snapshot's contents without qemu-img > >>convert. Another purpose is that, when qemu is online and have taken

Re: [Qemu-devel] [RFC PATCH] spapr-vscsi: add task management

2013-07-21 Thread Benjamin Herrenschmidt
On Mon, 2013-07-22 at 10:57 +1000, Alexey Kardashevskiy wrote: > On 07/22/2013 10:23 AM, Benjamin Herrenschmidt wrote: > > On Mon, 2013-07-22 at 10:20 +1000, Alexey Kardashevskiy wrote: > >> May be. But there was no way to get this callback called till I started > >> calling scsi_req_cancel in this

Re: [Qemu-devel] [RFC PATCH] spapr-vscsi: add task management

2013-07-21 Thread Alexey Kardashevskiy
On 07/22/2013 10:23 AM, Benjamin Herrenschmidt wrote: > On Mon, 2013-07-22 at 10:20 +1000, Alexey Kardashevskiy wrote: >> May be. But there was no way to get this callback called till I started >> calling scsi_req_cancel in this patch so I would not split. > > You probably still should. The smalle

Re: [Qemu-devel] [RFC PATCH] spapr-vscsi: add task management

2013-07-21 Thread Benjamin Herrenschmidt
On Mon, 2013-07-22 at 10:20 +1000, Alexey Kardashevskiy wrote: > May be. But there was no way to get this callback called till I started > calling scsi_req_cancel in this patch so I would not split. You probably still should. The smaller each individual patch, the better (in part because that make

Re: [Qemu-devel] [RFC PATCH] spapr-vscsi: add task management

2013-07-21 Thread Alexey Kardashevskiy
On 07/22/2013 07:34 AM, Benjamin Herrenschmidt wrote: > On Sun, 2013-07-21 at 20:04 +1000, Alexey Kardashevskiy wrote: >> At the moment the guest kernel issues two types of task management requests >> to the hypervisor - task about and lun reset. This adds handling for >> these tasks. > > My worry

Re: [Qemu-devel] [PATCH qom-next] megasas: Legacy command line handling fix

2013-07-21 Thread Paolo Bonzini
Il 21/07/2013 12:24, Andreas Färber ha scritto: > Only apply legacy command line handling when the device has not been > hot-plugged. Propagate failure of legacy command line handling. > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Andreas Färber > --- > hw/scsi/megasas.c | 5 - > 1 file ch

Re: [Qemu-devel] [RFC PATCH] spapr-vscsi: add task management

2013-07-21 Thread Paolo Bonzini
Il 21/07/2013 23:34, Benjamin Herrenschmidt ha scritto: > On Sun, 2013-07-21 at 20:04 +1000, Alexey Kardashevskiy wrote: >> At the moment the guest kernel issues two types of task management requests >> to the hypervisor - task about and lun reset. This adds handling for >> these tasks. > > My wor

Re: [Qemu-devel] [RFC PATCH] spapr-vscsi: add task management

2013-07-21 Thread Benjamin Herrenschmidt
On Sun, 2013-07-21 at 20:04 +1000, Alexey Kardashevskiy wrote: > At the moment the guest kernel issues two types of task management requests > to the hypervisor - task about and lun reset. This adds handling for > these tasks. My worry is that the specification calls for all of them, and we don't

Re: [Qemu-devel] [PATCH RFC qom-next 0/4] QOM'ification of pci-bridge types

2013-07-21 Thread Michael S. Tsirkin
On Sun, Jul 21, 2013 at 04:09:00PM +0200, Andreas Färber wrote: > Hello Michael et al., > > This series turns PCIBridge, PCIEPort and PCIESlot into abstract QOM types, > so that we can use QOM casts to obtain a pointer. > > Possibly this was prompted by q35's PCIe? What was prompted? What's the

Re: [Qemu-devel] [PATCH RFC qom-next 4/4] pcie_port: Turn PCIEPort and PCIESlot into abstract QOM types

2013-07-21 Thread Michael S. Tsirkin
On Sun, Jul 21, 2013 at 04:09:04PM +0200, Andreas Färber wrote: > Signed-off-by: Andreas Färber > --- > hw/pci-bridge/ioh3420.c| 23 ++- > hw/pci-bridge/xio3130_downstream.c | 23 ++- > hw/pci-bridge/xio3130_upstream.c | 15 +++ >

Re: [Qemu-devel] BUG: Re: [PATCH v3 11/14] ioport: Switch dispatching to memory core layer

2013-07-21 Thread Hervé Poussineau
Paolo Bonzini a écrit : >> oops. I am wrong and VGA works on mac99 in upstream because isa_mmio_ops does the swapping in this case and portio_ops does not swap (in upstream). Uff... I guess we have to look at all cases for big-endian machines, and make sure there is an odd number of exchanges

Re: [Qemu-devel] [PATCH] PPC: dbdma: macio: Fix format specifiers (build regression)

2013-07-21 Thread Stefan Weil
Am 20.07.2013 16:24, schrieb Andreas Färber: > > Anthony recently stated very clearly that in order for him to pick up a > patch it needs to have a Reviewed-by. This one only got an Acked-by. No rule without exception. When I look at the list of patches which were picked up recently, I see lots o

[Qemu-devel] [PATCH] exec: Remove env from list of poisoned names

2013-07-21 Thread Stefan Weil
The global variable env was removed some time ago, so this name may be used without any restriction now. Signed-off-by: Stefan Weil --- include/exec/poison.h |1 - 1 file changed, 1 deletion(-) diff --git a/include/exec/poison.h b/include/exec/poison.h index 2341a75..a4b1eca 100644 --- a/in

[Qemu-devel] [PATCH RFC qom-next 1/4] pci-bridge: Turn into abstract QOM type

2013-07-21 Thread Andreas Färber
Introduce TYPE_PCI_BRIDGE as base type and use PCI_BRIDGE() casts. Signed-off-by: Andreas Färber --- hw/pci-bridge/dec.c| 4 ++-- hw/pci-bridge/i82801b11.c | 6 +++--- hw/pci-bridge/ioh3420.c| 18 - hw/pci-bridge/pci_bridge_dev.c | 10 ++

[Qemu-devel] [PATCH RFC qom-next 4/4] pcie_port: Turn PCIEPort and PCIESlot into abstract QOM types

2013-07-21 Thread Andreas Färber
Signed-off-by: Andreas Färber --- hw/pci-bridge/ioh3420.c| 23 ++- hw/pci-bridge/xio3130_downstream.c | 23 ++- hw/pci-bridge/xio3130_upstream.c | 15 +++ hw/pci/pcie_port.c | 22 ++ include/hw/p

[Qemu-devel] [PATCH RFC qom-next 0/4] QOM'ification of pci-bridge types

2013-07-21 Thread Andreas Färber
Hello Michael et al., This series turns PCIBridge, PCIEPort and PCIESlot into abstract QOM types, so that we can use QOM casts to obtain a pointer. Possibly this was prompted by q35's PCIe? Don't remember ATM... Regards, Andreas Cc: Anthony Liguori Cc: Paolo Bonzini Cc: Michael S. Tsirkin Cc

[Qemu-devel] [PATCH RFC qom-next 3/4] pci-bridge/i82801b11: Rename parent field

2013-07-21 Thread Andreas Färber
Signed-off-by: Andreas Färber --- hw/pci-bridge/i82801b11.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/pci-bridge/i82801b11.c b/hw/pci-bridge/i82801b11.c index 88f489a..90fc91d 100644 --- a/hw/pci-bridge/i82801b11.c +++ b/hw/pci-bridge/i82801b11.c @@ -52,7 +52,9 @@

[Qemu-devel] [PATCH RFC qom-next 2/4] pci-bridge-dev: QOM parent field cleanup

2013-07-21 Thread Andreas Färber
Signed-off-by: Peter Crosthwaite Signed-off-by: Andreas Färber --- hw/pci-bridge/pci_bridge_dev.c | 22 ++ 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/hw/pci-bridge/pci_bridge_dev.c b/hw/pci-bridge/pci_bridge_dev.c index 00d2382..cf3c53c 100644 --- a/hw/pci

Re: [Qemu-devel] [RFC PATCH 1/2] qemu-help: Sort devices by logical functionality

2013-07-21 Thread Ronen Hod
On 07/18/2013 05:28 PM, Anthony Liguori wrote: Marcel Apfelbaum writes: Categorize devices that appear as output to "-device ?" command by logical functionality. Sort the devices by logical categories before showing them to user. Signed-off-by: Marcel Apfelbaum Reviewed-by: Kevin Wolf ---

Re: [Qemu-devel] [ANNOUNCE] We are now in soft freeze for 1.6

2013-07-21 Thread Anthony Liguori
Peter Maydell writes: > On 15 July 2013 16:15, Anthony Liguori wrote: >> Hard freeze is two weeks away. >> >> http://wiki.qemu.org/Planning/1.6 > > I've just noticed that this is still inconsistent. That > page says: > > "Soft feature freeze. Major features should have initial code > committed b

[Qemu-devel] [PATCH] savevm: set right return value for qemu_file_rate_limit

2013-07-21 Thread Lei Li
Commit 1964a397063967acc5ce71a2a24ed26e74824ee1 refactors rate limiting to QEMUFile, but set the return value for qemu_file_rate_limit to 1 in the case of qemu_file_get_error. It is wrong and should be negative compared to the original function buffered_rate_limit and the current logic in ram_save_

Re: [Qemu-devel] [RFC PATCH 0/2] qemu-help: improve -device command line help

2013-07-21 Thread Michael S. Tsirkin
On Sun, Jul 21, 2013 at 02:09:20PM +0200, Andreas Färber wrote: > Hi, > > Am 18.07.2013 10:27, schrieb Marcel Apfelbaum: > > Running qemu with "-device ?" option returns ~145 lines. > > It is hard to manage understanding the output. > > > > Theses patches aim to partially solve the problem by div

Re: [Qemu-devel] [PATCH] kvm: Combine all kvm stubs in a single file and compile it only once

2013-07-21 Thread Stefan Weil
Am 21.07.2013 13:20, schrieb Andreas Färber: > Hi Stefan, > > Am 21.07.2013 12:57, schrieb Stefan Weil: >> The KVM stub variables and functions don't depend on target specific data >> types, so it is possible to compile kvm-stub.c only once. >> >> Integrating the target specific KVM stubs for ARM,

Re: [Qemu-devel] [RFC PATCH 0/2] qemu-help: improve -device command line help

2013-07-21 Thread Andreas Färber
Hi, Am 18.07.2013 10:27, schrieb Marcel Apfelbaum: > Running qemu with "-device ?" option returns ~145 lines. > It is hard to manage understanding the output. > > Theses patches aim to partially solve the problem by dividing the devices > into logical categories like "Network/Display/..." and sor

[Qemu-devel] [PATCH 4/6] tests/tcg/xtensa: Fix out-of-tree build

2013-07-21 Thread Max Filippov
From: Andreas Färber Signed-off-by: Andreas Färber Signed-off-by: Max Filippov --- configure | 5 +++-- tests/tcg/xtensa/Makefile | 20 +++- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/configure b/configure index 9e1cd19..4888c3a 100755 ---

[Qemu-devel] [PATCH 6/6] target-xtensa: check register window inline

2013-07-21 Thread Max Filippov
This lowers time spent in helper_window_check as reported by perf top from ~8% to ~0.15% accelerating register-intensive tests by ~20%. Signed-off-by: Max Filippov --- target-xtensa/translate.c | 33 + 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a

[Qemu-devel] [PATCH 1/6] target-xtensa: add extui unit test

2013-07-21 Thread Max Filippov
Signed-off-by: Max Filippov --- tests/tcg/xtensa/Makefile | 1 + tests/tcg/xtensa/test_extui.S | 26 ++ 2 files changed, 27 insertions(+) create mode 100644 tests/tcg/xtensa/test_extui.S diff --git a/tests/tcg/xtensa/Makefile b/tests/tcg/xtensa/Makefile index 002fd8

[Qemu-devel] [PATCH 3/6] target-xtensa: avoid double-stopping at breakpoints

2013-07-21 Thread Max Filippov
env->exception_taken is set every time an exception is taken. It is used to allow single-stepping to stop at the first exception handler instruction. This however must exclude debug exceptions, as otherwise first step from the instruction where breakpoint was hit stops at that same instruction. Als

[Qemu-devel] [PATCH 5/6] target-xtensa: don't generate dead code to access invalid SRs

2013-07-21 Thread Max Filippov
This fixes the following test failure caused by access to undefined SR: qemu-system-xtensa -M sim -cpu dc232b -nographic -semihosting -kernel ./test_sr.tst QEMU 1.4.50 monitor - type 'help' for more information (qemu) QEMU 1.4.50 monitor - type 'help' for more information (qemu)

[Qemu-devel] [PATCH 0/6] target-xtensa queue

2013-07-21 Thread Max Filippov
are available in the git repository at: git://github.com/OSLL/qemu-xtensa.git tags/20130721-xtensa for you to fetch changes up to fd402139e7575a7d9e210a028c4e3cd640cf4a6a: target-xtensa: check register window inline (2013-07-21 15:35:09

[Qemu-devel] [PATCH 2/6] target-xtensa: add fallthrough markers

2013-07-21 Thread Max Filippov
Explicitly mark cases where we are deliberately falling through to the following code. Signed-off-by: Max Filippov --- target-xtensa/op_helper.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target-xtensa/op_helper.c b/target-xtensa/op_helper.c index 4c41de0..834fe90 100644 --- a/target-

Re: [Qemu-devel] [PATCH] kvm: Combine all kvm stubs in a single file and compile it only once

2013-07-21 Thread Andreas Färber
Hi Stefan, Am 21.07.2013 12:57, schrieb Stefan Weil: > The KVM stub variables and functions don't depend on target specific data > types, so it is possible to compile kvm-stub.c only once. > > Integrating the target specific KVM stubs for ARM, I386 and PPC in the > common kvm-stub.c further simpl

Re: [Qemu-devel] [PATCH v2 00/26] use realizefn for SysBusDevice, part 1

2013-07-21 Thread Andreas Färber
Am 01.07.2013 12:18, schrieb Hu Tao: > Hu Tao (26): > sysbus: document SysBusDeviceClass about @init > ohci: QOM'ify some more > ohci: use realize for ohci > i440fx-pcihost: use realize for i440fx-pcihost > i440fx: use type-safe cast instead of directly access of parent dev > q35: use t

[Qemu-devel] [PATCH] kvm: Combine all kvm stubs in a single file and compile it only once

2013-07-21 Thread Stefan Weil
The KVM stub variables and functions don't depend on target specific data types, so it is possible to compile kvm-stub.c only once. Integrating the target specific KVM stubs for ARM, I386 and PPC in the common kvm-stub.c further simplifies the build environment and allows removing CONFIG_NO_KVM.

Re: [Qemu-devel] [PATCH v2 25/26] ioapic: use realize for ioapic

2013-07-21 Thread Andreas Färber
Am 01.07.2013 12:18, schrieb Hu Tao: > Signed-off-by: Hu Tao > --- > hw/intc/ioapic_common.c | 12 +--- > 1 file changed, 5 insertions(+), 7 deletions(-) > > diff --git a/hw/intc/ioapic_common.c b/hw/intc/ioapic_common.c > index 5c5bb3c..5dc1f1e 100644 > --- a/hw/intc/ioapic_common.c > +

[Qemu-devel] [PATCH qom-next] scsi: Improve error propagation for scsi_bus_legacy_handle_cmdline()

2013-07-21 Thread Andreas Färber
Let scsi_bus_legacy_add_drive() and scsi_bus_legacy_handle_cmdline() return an Error**. Prepare qdev initfns for QOM realize error model. Signed-off-by: Andreas Färber --- hw/pci/pci-hotplug-old.c | 2 +- hw/scsi/esp-pci.c| 7 ++- hw/scsi/esp.c| 6 -- hw/scsi/lsi53

[Qemu-devel] [PATCH qom-next] megasas: Legacy command line handling fix

2013-07-21 Thread Andreas Färber
Only apply legacy command line handling when the device has not been hot-plugged. Propagate failure of legacy command line handling. Cc: qemu-sta...@nongnu.org Signed-off-by: Andreas Färber --- hw/scsi/megasas.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/scsi/mega

[Qemu-devel] [RFC PATCH] spapr-vscsi: add task management

2013-07-21 Thread Alexey Kardashevskiy
At the moment the guest kernel issues two types of task management requests to the hypervisor - task about and lun reset. This adds handling for these tasks. Signed-off-by: Alexey Kardashevskiy --- I still do not have really good test to test the task management, any working ideas? :) This is

Re: [Qemu-devel] [RFC 6/8] timer: run timers on aio_poll

2013-07-21 Thread Alex Bligh
--On 21 July 2013 16:43:03 +0800 Liu Ping Fan wrote: diff --git a/aio-posix.c b/aio-posix.c index b68eccd..29c2769 100644 --- a/aio-posix.c +++ b/aio-posix.c @@ -191,6 +191,8 @@ bool aio_poll(AioContext *ctx, bool blocking) progress = true; } +qemu_run_all_timers(); +

Re: [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff

2013-07-21 Thread Alex Bligh
Liu, --On 21 July 2013 16:42:57 +0800 Liu Ping Fan wrote: Currently, the timers run on iothread within BQL, so virtio-block dataplane can not use throttle, as Stefan Hajnoczi pointed out in his patches to port dataplane onto block layer.(Thanks, Stefan) To enable this feature, I plan to enable

Re: [Qemu-devel] [PATCH v2 19/26] scsi esp: use realize for scsi esp

2013-07-21 Thread Andreas Färber
Am 01.07.2013 12:18, schrieb Hu Tao: > Signed-off-by: Hu Tao > --- > hw/scsi/esp.c | 30 -- > 1 file changed, 20 insertions(+), 10 deletions(-) > > diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c > index f7d6389..714d2fd 100644 > --- a/hw/scsi/esp.c > +++ b/hw/scsi/esp.c >

Re: [Qemu-devel] [PATCH v2 17/26] fwcfg: use realize for fwcfg

2013-07-21 Thread Andreas Färber
Am 01.07.2013 12:18, schrieb Hu Tao: > Signed-off-by: Hu Tao > --- > hw/nvram/fw_cfg.c | 26 -- > 1 file changed, 16 insertions(+), 10 deletions(-) > > diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c > index c8722c2..656ffcc 100644 > --- a/hw/nvram/fw_cfg.c > +++ b/hw/

[Qemu-devel] [PATCH qom-next] fdc: Improve error propagation for QOM realize

2013-07-21 Thread Andreas Färber
Rename fdctrl_init_common() to fdctrl_realize_common() and let fdctrl_connect_drives() propagate an Error through it. Signed-off-by: Andreas Färber --- hw/block/fdc.c | 40 ++-- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/hw/block/fdc.c b/h

Re: [Qemu-devel] [PATCH v2 09/26] fdc: use realize for fdc.

2013-07-21 Thread Andreas Färber
Am 01.07.2013 12:18, schrieb Hu Tao: > Signed-off-by: Hu Tao > --- > hw/block/fdc.c | 62 > ++ > 1 file changed, 41 insertions(+), 21 deletions(-) > > diff --git a/hw/block/fdc.c b/hw/block/fdc.c > index f8270cb..0fe0cf9 100644 > --- a/hw/

Re: [Qemu-devel] [PATCH v2 15/26] ahci: use realize for ahci

2013-07-21 Thread Andreas Färber
Am 01.07.2013 12:18, schrieb Hu Tao: > Signed-off-by: Hu Tao > --- > hw/ide/ahci.c | 12 +--- > 1 file changed, 5 insertions(+), 7 deletions(-) > > diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c > index 5dcd662..d92239b 100644 > --- a/hw/ide/ahci.c > +++ b/hw/ide/ahci.c > @@ -1300,14 +1300,1

[Qemu-devel] [RFC 6/8] timer: run timers on aio_poll

2013-07-21 Thread Liu Ping Fan
Stop call timers in main loop and let each mini event-loop run its own timers. Signed-off-by: Liu Ping Fan --- aio-posix.c | 2 ++ main-loop.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/aio-posix.c b/aio-posix.c index b68eccd..29c2769 100644 --- a/aio-posix.c +++ b/ai

[Qemu-devel] [RFC 8/8] block: enable throttle with aiocontext

2013-07-21 Thread Liu Ping Fan
Signed-off-by: Liu Ping Fan --- block.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c index c6b7b6c..b9e6cc8 100644 --- a/block.c +++ b/block.c @@ -149,7 +149,12 @@ static void bdrv_block_timer(void *opaque) void bdrv_io_limits_enable(BlockDriverStat

[Qemu-devel] [RFC 5/8] timer: associate timer with AioContext

2013-07-21 Thread Liu Ping Fan
Currently, timers run on iothread inside QBL, this limits the usage of timers in some case, e.g. virtio-blk-dataplane. In order to run timers on private thread, we arm AioContext with three lists in according to three QemuClock (and later, run timers in aio_poll). Signed-off-by: Liu Ping Fan ---

[Qemu-devel] [RFC 3/8] timer: make timers_state static

2013-07-21 Thread Liu Ping Fan
Signed-off-by: Liu Ping Fan --- cpus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpus.c b/cpus.c index 61e86a8..4254ca9 100644 --- a/cpus.c +++ b/cpus.c @@ -112,7 +112,7 @@ typedef struct TimersState { int64_t dummy; } TimersState; -TimersState timers_state; +sta

[Qemu-devel] [RFC 7/8] block: associate BlockDriverState with AioContext

2013-07-21 Thread Liu Ping Fan
The default aio for BDS is qemu_aio_context, while for data plane, it will has its own ctx. Relating BDS with AioContext can help block layer to determine its running environment. Some stuff like timers need such info, so that they can run in the correct environment. Signed-off-by: Liu Ping Fan -

[Qemu-devel] [RFC 4/8] timer: protect timers_state with lock

2013-07-21 Thread Liu Ping Fan
In kvm mode, vm_clock may be read on AioContexts outside BQL(next patch). This will make timers_state --the foundation of vm_clock exposed to race condition. Using private lock to protect it. Note in tcg mode, vm_clock still read inside BQL, so icount is left without change. Lock rule: private loc

[Qemu-devel] [RFC 1/8] timer: associate alarm_timer with AioContext

2013-07-21 Thread Liu Ping Fan
We will arm each AioContext with its own timer stuff. As the first step, we should make each AioContext with its own alarm_timer, so they can raise the deadline independent. Each thread with AioContext will have dedicated signal handler to trigger it own alarm_timer. And all of the alarm timers are

[Qemu-devel] [RFC 2/8] timer: pick out timer list info from QemuClock

2013-07-21 Thread Liu Ping Fan
To allow timer to run on the different backend threads, we will arm the thread's AioContext with its own timer list. So separate these kind of info from QemuClock. Signed-off-by: Liu Ping Fan --- qemu-timer.c | 106 ++- 1 file changed, 68 i

[Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff

2013-07-21 Thread Liu Ping Fan
Currently, the timers run on iothread within BQL, so virtio-block dataplane can not use throttle, as Stefan Hajnoczi pointed out in his patches to port dataplane onto block layer.(Thanks, Stefan) To enable this feature, I plan to enable timers to run on AioContext's thread. And maybe in future, h

Re: [Qemu-devel] [RFC PATCH 1/2] qemu-help: Sort devices by logical functionality

2013-07-21 Thread Michael S. Tsirkin
On Thu, Jul 18, 2013 at 09:58:59AM -0500, Anthony Liguori wrote: > Paolo Bonzini writes: > > > Il 18/07/2013 16:42, Marcel Apfelbaum ha scritto: > >> On Thu, 2013-07-18 at 09:28 -0500, Anthony Liguori wrote: > >>> Marcel Apfelbaum writes: > >>> > Categorize devices that appear as output to