[Qemu-devel] [PATCH V4 RESEND 13/22] tap: support enabling or disabling a queue

2013-02-01 Thread Jason Wang
This patch introduce a new bit - enabled in TAPState which tracks whether a specific queue/fd is enabled. The tap/fd is enabled during initialization and could be enabled/disabled by tap_enalbe() and tap_disable() which calls platform specific helpers to do the real work. Polling of a tap fd can on

[Qemu-devel] [PATCH V4 RESEND 21/22] virtio-net: migration support for multiqueue

2013-02-01 Thread Jason Wang
This patch add migration support for multiqueue virtio-net. Instead of bumping the version, we conditionally send the info of multiqueue only when the device support more than one queue to maintain the backward compatibility. Signed-off-by: Jason Wang Signed-off-by: Michael S. Tsirkin --- hw/vi

[Qemu-devel] [PATCH V4 RESEND 12/22] tap: add Linux multiqueue support

2013-02-01 Thread Jason Wang
This patch add basic multiqueue support for Linux. When multiqueue is needed, we will first check whether kernel support multiqueue tap before creating more queues. Two new functions tap_fd_enable() and tap_fd_disable() were introduced to enable and disable a specific queue. Since the multiqueue is

[Qemu-devel] [PATCH V4 RESEND 22/22] virtio-net: compat multiqueue support

2013-02-01 Thread Jason Wang
Disable multiqueue support for pre 1.4. Signed-off-by: Jason Wang Signed-off-by: Michael S. Tsirkin --- hw/pc_piix.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index ba09714..0af436c 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c @@ -31

[Qemu-devel] [PATCH V4 RESEND 09/22] net: multiqueue support

2013-02-01 Thread Jason Wang
This patch adds basic multiqueue support for qemu. The idea is simple, an array of NetClientStates were introduced in NICState, parse_netdev() were extended to find and match all NetClientStates belongs to the backend and place their pointers in NICConf. Then qemu_new_nic can setup a N:N mapping be

[Qemu-devel] [PATCH V4 RESEND 06/22] net: introduce qemu_find_net_clients_except()

2013-02-01 Thread Jason Wang
In multiqueue, all NetClientState that belongs to the same netdev or nic has the same id. So this patches introduces an helper qemu_find_net_clients_except() which finds all NetClientState with the same id. This will be used by multiqueue networking. Signed-off-by: Jason Wang Signed-off-by: Micha

[Qemu-devel] [PULL 0/5] migration queue

2013-02-01 Thread Juan Quintela
Hi This includes xbzrle fixes. They are just: - refactor xbzrle into its own file - tests for xbzrle - fix documentanion - bugfix - fix error message please pull The following changes since commit 8a55ebf01507ab73cc458cfcd5b9cb856aba0b9e: Merge remote-tracking branch 'afaerber/qom-cpu'

[Qemu-devel] [PATCH V4 RESEND 05/22] net: intorduce qemu_del_nic()

2013-02-01 Thread Jason Wang
To support multiqueue nic, this patch separate the nic destructor from qemu_del_net_client() to a new helper qemu_del_nic() since the mapping bettween NiCState and NetClientState were not 1:1 in multiqueue. The following patches would refactor this function to support multiqueue nic. Signed-off-by

Re: [Qemu-devel] Char flow control patches

2013-02-01 Thread Amit Shah
On (Wed) 30 Jan 2013 [08:38:50], Anthony Liguori wrote: > Amit Shah writes: > > > Hi Anthony, > > > > I did some basic testing of the char flow control patches from your > > char-flow.2 branch. With the following patch applied, things seem to > > be working fine. I tested the isa-serial and vir

Re: [Qemu-devel] [PATCH V4 RESEND 00/22] Multiqueue virtio-net

2013-02-01 Thread Jason Wang
On 02/01/2013 03:39 PM, Jason Wang wrote: > Hello all: > > This seires is an update of last version of multiqueue virtio-net support. Hi Anthony: This series is not applied cleanly on master, could you please pick those for 1.4? Thanks

Re: [Qemu-devel] [PULL 0/3] ppc patch queue 2013-02-01

2013-02-01 Thread Andreas Färber
Am 01.02.2013 01:53, schrieb Alexander Graf: > Hi Blue / Aurelien, > > This is my final pre-hard-freeze patch queue for ppc. Please pull. Hi Alex, was there something wrong with my format fix v2? Oversight? Andreas > > Alex > > > The following changes since commit 6b2578d678497dbce44ed7999d

Re: [Qemu-devel] [PATCH for-1.4?] ppc405_uc: Pass PowerPCCPU to ppc40x_{core, chip, system}_reset()

2013-02-01 Thread Andreas Färber
Hi Alex, Am 31.01.2013 00:29, schrieb Andreas Färber: > Prepares for changing cpu_interrupt() argument to CPUState. > > Signed-off-by: Andreas Färber > --- > Extracted from my qom-cpu-8 queue - could accompany my debug output fixes. :) > > hw/ppc.c | 12 ++-- > hw/ppc.h

Re: [Qemu-devel] [PATCH for-1.4?] ppc405_uc: Pass PowerPCCPU to ppc40x_{core, chip, system}_reset()

2013-02-01 Thread Alexander Graf
On 01.02.2013, at 09:41, Andreas Färber wrote: > Hi Alex, > > Am 31.01.2013 00:29, schrieb Andreas Färber: >> Prepares for changing cpu_interrupt() argument to CPUState. >> >> Signed-off-by: Andreas Färber >> --- >> Extracted from my qom-cpu-8 queue - could accompany my debug output fixes. :)

Re: [Qemu-devel] [PULL 0/3] ppc patch queue 2013-02-01

2013-02-01 Thread Alexander Graf
On 01.02.2013, at 09:15, Andreas Färber wrote: > Am 01.02.2013 01:53, schrieb Alexander Graf: >> Hi Blue / Aurelien, >> >> This is my final pre-hard-freeze patch queue for ppc. Please pull. > > Hi Alex, was there something wrong with my format fix v2? Oversight? Let's fix it after rc0. Alex

[Qemu-devel] [PATCH V4 RESEND 02/22] net: tap: use abort() instead of assert(0)

2013-02-01 Thread Jason Wang
Signed-off-by: Jason Wang Signed-off-by: Michael S. Tsirkin --- net/tap-linux.c |4 ++-- net/tap-win32.c |2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/net/tap-linux.c b/net/tap-linux.c index 059f5f3..0a6acc7 100644 --- a/net/tap-linux.c +++ b/net/tap-linux.c @@ -1

[Qemu-devel] [PATCH V4 RESEND 01/22] net: tap: using bool instead of bitfield

2013-02-01 Thread Jason Wang
Signed-off-by: Jason Wang Signed-off-by: Michael S. Tsirkin --- hw/virtio-net.c |2 +- include/net/tap.h |4 ++-- net/tap-win32.c |6 +++--- net/tap.c | 38 ++ 4 files changed, 24 insertions(+), 26 deletions(-) diff --git a/hw/virtio

[Qemu-devel] [PATCH V4 RESEND 20/22] virtio-net: multiqueue support

2013-02-01 Thread Jason Wang
This patch implements both userspace and vhost support for multiple queue virtio-net (VIRTIO_NET_F_MQ). This is done by introducing an array of VirtIONetQueue to VirtIONet. Signed-off-by: Jason Wang Signed-off-by: Michael S. Tsirkin --- hw/virtio-net.c | 301 +++

Re: [Qemu-devel] [PATCH for-1.4?] ppc405_uc: Pass PowerPCCPU to ppc40x_{core, chip, system}_reset()

2013-02-01 Thread Andreas Färber
Am 01.02.2013 09:42, schrieb Alexander Graf: > > On 01.02.2013, at 09:41, Andreas Färber wrote: > >> Am 31.01.2013 00:29, schrieb Andreas Färber: >>> Prepares for changing cpu_interrupt() argument to CPUState. >>> >>> Signed-off-by: Andreas Färber >>> --- >>> Extracted from my qom-cpu-8 queue -

Re: [Qemu-devel] [PATCH v2 01/20] arm: add Faraday a36x SoC platform support

2013-02-01 Thread Kuo-Jung Su
Hi Andreas: Thanks for the information, and sorry for the mess I've done. I'll one-by-one re-send all the patches. However because most of my patches are new files, should I send-out the patches with detail change log? For example: [PATCH] dumb timer ... [PATCH v2 0/2] dumb timer (Cover letter)

Re: [Qemu-devel] [PATCH v2 01/20] arm: add Faraday a36x SoC platform support

2013-02-01 Thread Andreas Färber
Hi, Am 01.02.2013 02:39, schrieb Kuo-Jung Su: > 2013/2/1 Igor Mitsyanko >> >> On 01/25/2013 12:19 PM, Kuo-Jung Su wrote: >>> >>> +/* Board init. */ >>> +static void >>> +a360_device_init(a360_state *s) >>> +{ >>> +qemu_irq *pic; >>> +qemu_irq ack, req; >>> +qemu_irq cs_line; >>> +

Re: [Qemu-devel] [PATCH for-1.4?] isa: QOM'ify isa_bus_from_device()

2013-02-01 Thread Andreas Färber
Am 20.01.2013 19:16, schrieb Andreas Färber: > Am 20.01.2013 18:56, schrieb Andreas Färber: >> DeviceState::parent_bus is document as private and should be accessed > > "documented" - please fix when applying. > >> through qdev_get_parent_bus(). Use a DEVICE() cast instead of accessing >> ISADevi

[Qemu-devel] [PATCH V4 RESEND 10/22] tap: import linux multiqueue constants

2013-02-01 Thread Jason Wang
Import multiqueue constants from if_tun.h from 3.8-rc3. A new ifr flag IFF_MULTI_QUEUE were introduced to create a multiqueue backend by calling TUNSETIFF with the this flag and with the same interface name many times. A new ioctl TUNSETQUEUE were introduced. When doing this ioctl with IFF_DETACH_

[Qemu-devel] [PATCH V4 RESEND 11/22] tap: factor out common tap initialization

2013-02-01 Thread Jason Wang
This patch factors out the common initialization of tap into a new helper net_init_tap_one(). This will be used by multiqueue tap patches. Signed-off-by: Jason Wang Signed-off-by: Michael S. Tsirkin --- net/tap.c | 130 ++--- 1 files chan

[Qemu-devel] [PATCH V4 RESEND 18/22] virtio: add a queue_index to VirtQueue

2013-02-01 Thread Jason Wang
Add a queue_index to VirtQueue and a helper to fetch it, this could be used by multiqueue supported device. Signed-off-by: Jason Wang Signed-off-by: Michael S. Tsirkin --- hw/virtio.c |8 hw/virtio.h |1 + 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/hw/virtio

[Qemu-devel] [PATCH V4 RESEND 04/22] net: introduce qemu_get_nic()

2013-02-01 Thread Jason Wang
To support multiqueue, this patch introduces a helper qemu_get_nic() to get NICState from a NetClientState. The following patches would refactor this helper to support multiqueue. Signed-off-by: Jason Wang Signed-off-by: Michael S. Tsirkin --- hw/cadence_gem.c|8 hw/dp8393x

Re: [Qemu-devel] [PATCH for-1.4?] i2c: Drop I2C_SLAVE_FROM_QDEV() macro

2013-02-01 Thread Andreas Färber
Am 25.01.2013 09:12, schrieb Andreas Färber: > It is not being used in hot paths and is obsoleted by I2C_SLAVE() > QOM cast macro. Clean it up using a scripted conversion, so that it > doesn't get used in new code. > > Some of its callers were combining it with FROM_I2C_SLAVE() macro, which > is e

Re: [Qemu-devel] [PATCH v2 01/20] arm: add Faraday a36x SoC platform support

2013-02-01 Thread Andreas Färber
嗨 國榮, Am 01.02.2013 09:57, schrieb Kuo-Jung Su: > Thanks for the information, and sorry for the mess I've done. You don't need to apologize for every review comment you get. It's meant for improvements of results, not personal. :) > I'll one-by-one re-send all the patches. > > However because m

Re: [Qemu-devel] [PATCH] configure: Undefine _FORTIFY_SOURCE prior using it

2013-02-01 Thread Andreas Färber
Am 31.01.2013 11:15, schrieb Michal Privoznik: > Currently, we are enforcing the _FORTIFY_SOURCE=2 without any > previous detection if the macro has been already defined, e.g. > by environment, or is just enabled by compiler by default. > > Signed-off-by: Michal Privoznik > --- > configure | 2 +

[Qemu-devel] scp during migration with vhost fails

2013-02-01 Thread Jason Wang
Hello all: During testing, I find doing scp during migration with vhost fails with warnings in guest like: Corrupted MAC on input. Disconnecting: Packet corrupt. lost connection Here's the bisect result: Commit a01672d3968cf91208666d371784110bfde9d4f8 kvm: convert to MemoryListener API is the

Re: [Qemu-devel] [PATCH v2 2/3] VFIO-AER: Vfio-pci driver changes for supporting AER

2013-02-01 Thread Pandarathil, Vijaymohan R
> -Original Message- > From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Tuesday, January 29, 2013 5:25 AM > To: Pandarathil, Vijaymohan R > Cc: Gleb Natapov; Bjorn Helgaas; Blue Swirl; Ortiz, Lance E; > k...@vger.kernel.org; qemu-devel@nongnu.org; linux-...@vger.kernel.or

[Qemu-devel] [PATCH 1/4] usb: fix endpoint descriptor ordering

2013-02-01 Thread Gerd Hoffmann
Fix the ordering of the endpoint descriptors for superspeed endpoints: The superspeed companion must come first, possible additional descriptors for the endpoint after that. Signed-off-by: Gerd Hoffmann --- hw/usb/desc.c |9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --g

[Qemu-devel] [PATCH 0/4] sneak preview: usb3 streams

2013-02-01 Thread Gerd Hoffmann
Hi, Early patches to add support for usb3 streams to qemu. Covered are the subsystem core, xhci emulation and usb attached scsi emulation. It's good enougth to trigger bugs in the linux xhci driver's stream handling. enjoy, Gerd Gerd Hoffmann (4): usb: fix endpoint descriptor ordering

[Qemu-devel] [PATCH 2/4] [wip] core: usb3 streams

2013-02-01 Thread Gerd Hoffmann
--- hw/usb.h | 10 ++ hw/usb/core.c | 10 ++ hw/usb/dev-bluetooth.c|2 +- hw/usb/dev-hid.c |2 +- hw/usb/dev-hub.c | 10 +- hw/usb/dev-network.c |2 +- hw/usb/dev-smartcard-rea

[Qemu-devel] [PATCH 3/4] [wip] xhci: usb3 streams

2013-02-01 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-xhci.c | 266 +++-- trace-events |6 +- 2 files changed, 220 insertions(+), 52 deletions(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index 5fb0c48..ce17e2a 100644 --- a/hw/usb/hcd-xhci

[Qemu-devel] [PATCH 4/4] [wip] uas: usb3 streams

2013-02-01 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/usb/dev-uas.c | 247 -- 1 file changed, 205 insertions(+), 42 deletions(-) diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c index d904d1a..1ac5117 100644 --- a/hw/usb/dev-uas.c +++ b/hw/usb/dev-uas.c @@ -99,

Re: [Qemu-devel] [PATCH v3] tools/libxl: Improve videoram setting

2013-02-01 Thread Fabio Fantoni
Il 14/01/2013 19:21, Stefano Stabellini ha scritto: I did a quick test and it seems that it should be possible to change the amount of videoram for stdvga too using the same command line option, however at the moment it just errors out. Therefore I am OK with this patch only taking care of Cirr

[Qemu-devel] [PATCH 0/4] usb: make devices configurable

2013-02-01 Thread Gerd Hoffmann
Hi, This patch series makes usb devices configurable. cheers, Gerd Gerd Hoffmann (4): usb: Makefile cleanup fix scripts/make_device_config.sh make usb devices configurable allow disabling usb smartcard support default-configs/alpha-softmmu.mak|1 + default-configs/arm-softm

[Qemu-devel] [PATCH 1/4] usb: Makefile cleanup

2013-02-01 Thread Gerd Hoffmann
Group files, sprinkle in some comments. Signed-off-by: Gerd Hoffmann --- hw/usb/Makefile.objs | 27 --- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/hw/usb/Makefile.objs b/hw/usb/Makefile.objs index d1bbbc0..bfe5e5f 100644 --- a/hw/usb/Makefile.objs ++

[Qemu-devel] [PATCH 3/4] make usb devices configurable

2013-02-01 Thread Gerd Hoffmann
Leave the core usb devices (usb hub, tablet, mouse, keyboard) enabled unconditionally. Make the other ones configurable. Exceptions: - bluetooth: not qdevified yet, has a vl.c dependency because of that, thus disabling isn't as easy as not linking the object file. - smardcard: ccid-ca

[Qemu-devel] [PATCH 2/4] fix scripts/make_device_config.sh

2013-02-01 Thread Gerd Hoffmann
Make it handle multiple include statements in a file. Signed-off-by: Gerd Hoffmann --- scripts/make_device_config.sh |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/make_device_config.sh b/scripts/make_device_config.sh index 0778fe2..81fe942 100644 --- a/scripts/ma

[Qemu-devel] [PATCH 4/4] allow disabling usb smartcard support

2013-02-01 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/Makefile.objs |2 ++ hw/usb/Makefile.objs |1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/Makefile.objs b/hw/Makefile.objs index 447e32a..a1f3a80 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -38,8 +38,10 @@ common-o

Re: [Qemu-devel] [PATCH for-1.4] configure: Keep -Werror enabled for Release Candidates

2013-02-01 Thread Andreas Färber
Am 27.01.2013 16:20, schrieb Andreas Färber: > Am 27.01.2013 16:16, schrieb Andreas Färber: >> The automatic drop of -Werror during the RC phases has in the past led >> to warnings creeping into submaintainer trees. >> >> Last QEMU Summit it was concluded that -Werror should stay on and >> enabled

[Qemu-devel] [PATCH qom-cpu-next 0/6] QOM CPUState, part 8: CPU_COMMON continued

2013-02-01 Thread Andreas Färber
Hello, This series moves more fields from CPU_COMMON / CPU*State to CPUState, allowing access from target-independent code. The final patch in this series will help solve some issues (in particular avoid a dependency on CPU_COMMON TLB refactoring for now) but opens a can of worms: Since it is ini

[Qemu-devel] [PATCH qom-cpu-next 2/6] cpu: Move running field to CPUState

2013-02-01 Thread Andreas Färber
Pass CPUState to cpu_exec_{start,end}() functions. Signed-off-by: Andreas Färber --- include/exec/cpu-defs.h |1 - include/qom/cpu.h |2 ++ linux-user/main.c | 37 ++--- 3 Dateien geändert, 24 Zeilen hinzugefügt(+), 16 Zeilen entfernt(-) dif

[Qemu-devel] [PATCH qom-cpu-next 5/6] cputlb: Pass CPUState to cpu_unlink_tb()

2013-02-01 Thread Andreas Färber
CPUArchState is no longer needed. Signed-off-by: Andreas Färber --- exec.c |2 +- translate-all.c |9 + translate-all.h |2 +- 3 Dateien geändert, 7 Zeilen hinzugefügt(+), 6 Zeilen entfernt(-) diff --git a/exec.c b/exec.c index dbb893a..a41bcb8 100644 --- a/exec.c +

[Qemu-devel] [PATCH qom-cpu-next 3/6] cpu: Move exit_request field to CPUState

2013-02-01 Thread Andreas Färber
Since it was located before breakpoints field, it needs to be reset. Signed-off-by: Andreas Färber --- cpu-exec.c |8 exec.c |4 +++- hw/spapr_hcall.c|5 +++-- include/exec/cpu-defs.h |2 -- include/qom/cpu.h |2 ++ kvm-all

Re: [Qemu-devel] [RFC PATCH RDMA support v1: 5/5] send memory over RDMA as blocks are iterated

2013-02-01 Thread Orit Wasserman
On 01/31/2013 09:10 PM, Michael R. hines wrote: > Sorry, I didn't go into enough detail about the problem I'm having in the > loop: > > The loop that's not breaking is inside qemu_loadvm_state(), not > ram_save_block(). I understand now, ram_load always read the addr in the begining of the while

[Qemu-devel] [PATCH qom-cpu-next 6/6] cpu: Add CPUArchState pointer to CPUState

2013-02-01 Thread Andreas Färber
The target-specific ENV_GET_CPU() macros have allowed us to navigate from CPUArchState to CPUState. The reverse direction was not supported. Avoid introducing CPU_GET_ENV() macros by initializing an untyped pointer that is initialized in derived instance_init functions. The field may not be called

Re: [Qemu-devel] [PATCH v2] vmware_vga: fix out of bounds and invalid rects updating

2013-02-01 Thread Michael Tokarev
26.01.2013 19:09, Blue Swirl wrote: Thanks, applied. Now when I've comments from BALATON Zoltan, I asked Serge to try out the current qemu in the environment where this buh was easy to trigger (ubuntu guest with unity desktop) - and he says he can't reproduce the issue anymore (this does not me

Re: [Qemu-devel] [PATCH v2] vmware_vga: fix out of bounds and invalid rects updating

2013-02-01 Thread Marek Vasut
Dear Michael Tokarev, > 26.01.2013 19:09, Blue Swirl wrote: > > Thanks, applied. > > Now when I've comments from BALATON Zoltan, I asked Serge to try > out the current qemu in the environment where this buh was easy > to trigger (ubuntu guest with unity desktop) - and he says he > can't reproduce

[Qemu-devel] [PATCH 4/4] migration: calculate expected_downtime

2013-02-01 Thread Juan Quintela
We removed the calculation in commit e4ed1541ac9413eac494a03532e34beaf8a7d1c5 Now we add it back. We need to create dirty_bytes_rate because we can't include cpu-all.h from migration.c, and there is no other way to include TARGET_PAGE_SIZE. Signed-off-by: Juan Quintela --- arch_init.c

[Qemu-devel] [PATCH 2/4] migration: calculate end time after we have sent the data

2013-02-01 Thread Juan Quintela
Signed-off-by: Juan Quintela --- migration.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/migration.c b/migration.c index d86946e..67abd12 100644 --- a/migration.c +++ b/migration.c @@ -681,7 +681,7 @@ static void *buffered_file_thread(void *opaque) qemu_mutex_unlock

[Qemu-devel] [PATCH 3/4] migration: don't account sleep time for calculating bandwidth

2013-02-01 Thread Juan Quintela
While we are sleeping we are not sending, so we should not use that time to estimate our bandwidth. Signed-off-by: Juan Quintela --- migration.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/migration.c b/migration.c index 67abd12..64e75ca 100644 --- a/migration.c +++ b

[Qemu-devel] [PATCH qom-cpu-next 4/6] cpu: Move current_tb field to CPUState

2013-02-01 Thread Andreas Färber
Explictly NULL it on CPU reset since it was located before breakpoints. Change vapic_report_tpr_access() argument to CPUState. This also resolves the use of void* for cpu.h independence. Change vAPIC patch_instruction() argument to X86CPU. Signed-off-by: Andreas Färber --- cpu-exec.c

[Qemu-devel] [PATCH 1/4] migration: change initial value of expected_downtime

2013-02-01 Thread Juan Quintela
0 is a very bad initial value, what we are trying to get is max_downtime, so that is a much better estimation. Signed-off-by: Juan Quintela --- migration.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/migration.c b/migration.c index 77c1971..d86946e 100644 --- a/migration.c +++ b/migrat

[Qemu-devel] [PATCH 0/4] migration stats fixes

2013-02-01 Thread Juan Quintela
Hi migration expected_downtime calculation was removed on commit e4ed1541ac9413eac494a03532e34beaf8a7d1c5. We add the calculation back. Before doing the calculation we do: - expected_downtime intial value is max_downtime. Much, much better intial value than 0. - we move when we measure the

[Qemu-devel] [PATCH qom-cpu-next 1/6] cpu: Move host_tid field to CPUState

2013-02-01 Thread Andreas Färber
Change gdbstub's cpu_index() argument to CPUState now that CPUArchState is no longer used. Signed-off-by: Andreas Färber --- dump.c |8 ++-- gdbstub.c | 14 +- include/exec/cpu-defs.h |1 - include/exec/gdbstub.h |5 ++--- include/qom

Re: [Qemu-devel] [PATCH 2/4] fix scripts/make_device_config.sh

2013-02-01 Thread Andreas Färber
Am 01.02.2013 13:00, schrieb Gerd Hoffmann: > Make it handle multiple include statements in a file. > > Signed-off-by: Gerd Hoffmann > --- > scripts/make_device_config.sh |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/make_device_config.sh b/scripts/make_dev

Re: [Qemu-devel] [PATCH V17 07/10] libqblock: libqblock API design and type defines

2013-02-01 Thread Stefan Hajnoczi
On Fri, Feb 01, 2013 at 01:51:21PM +0800, Wenchao Xia wrote: > >>+typedef enum QBlockProtocol { > >>+QB_PROTO_NONE = 0, > >>+QB_PROTO_FILE, > >>+QB_PROTO_MAX > >>+} QBlockProtocol; > > > >What prevents libqblock from supporting all protocols? > > > I think no problem exist in supporti

[Qemu-devel] [PATCH v2 0/9] main-loop: switch to g_poll(3) on POSIX hosts

2013-02-01 Thread Stefan Hajnoczi
Amos Kong reported that file descriptors numbered higher than 1024 could crash QEMU. This is due to the fixed size of the fd_set type used for select(2) event polling. This series converts the main-loop.c and aio-posix.c select(2) calls to g_poll(3). This eliminates the fd_set type and allows Q

[Qemu-devel] [PATCH v2 7/9] aio: extract aio_dispatch() from aio_poll()

2013-02-01 Thread Stefan Hajnoczi
We will need to loop over AioHandlers calling ->io_read()/->io_write() when aio_poll() is converted from select(2) to g_poll(2). Luckily the code for this already exists, extract it into the new aio_dispatch() function. Two small changes: * aio_poll() checks !node->deleted to avoid calling hand

[Qemu-devel] [PATCH v2 5/9] iohandler: switch to GPollFD

2013-02-01 Thread Stefan Hajnoczi
Convert iohandler_select_fill() and iohandler_select_poll() to use GPollFD instead of rfds/wfds/xfds. Signed-off-by: Stefan Hajnoczi --- include/qemu/main-loop.h | 4 ++-- iohandler.c | 40 ++-- main-loop.c | 4 ++-- 3 files changed

[Qemu-devel] [PATCH v2 9/9] aio: support G_IO_HUP and G_IO_ERR

2013-02-01 Thread Stefan Hajnoczi
aio-posix.c could not take advantage of G_IO_HUP and G_IO_ERR because select(2) does not have equivalent events. Now that g_poll(3) is used we can support G_IO_HUP and G_IO_ERR. Signed-off-by: Stefan Hajnoczi --- aio-posix.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) d

[Qemu-devel] [PATCH v2 6/9] main-loop: drop rfds/wfds/xfds for good

2013-02-01 Thread Stefan Hajnoczi
Now that all *_fill() and *_poll() functions use GPollFD we no longer need rfds/wfds/xfds or pollfds_from_select()/pollfds_to_select(). >From now on everything uses GPollFD. Signed-off-by: Stefan Hajnoczi --- main-loop.c | 77 ++--- 1 file

Re: [Qemu-devel] [RFC 2/2] qbus_find_recursive(): the "free slots" constraint needs a dedicated error

2013-02-01 Thread Laszlo Ersek
On 01/31/13 19:24, Peter Maydell wrote: > We should only be reporting one error: > "we failed because you asked for this bus and it's full" should > override the default "we failed to find this bus". We can fix > that by having the recursion stop as soon as we get an error. > I think the QMP call

[Qemu-devel] [QEMU]Installed qemu-img and qemu/qemu-img have different size

2013-02-01 Thread harryxiyou
Hi all, I did following operations to install QEMU to my PC. 1. git clone git://git.qemu.org/qemu.git 2. cd qemu 3, git reset --hard v1.3.0 4, ./configure 5, make 6, sudo make install After step 6, i did following jobs. a: see size of qemu-img bin in qemu package jiawei@jiawei-laptop:~/workshop

Re: [Qemu-devel] [PATCH for-1.4 v2] block/raw-posix: Build fix for O_ASYNC

2013-02-01 Thread Stefan Hajnoczi
On Thu, Jan 31, 2013 at 03:40:14PM +0100, Andreas Färber wrote: > Commit eeb6b45d48800e96f67ef2a5c80332557fd45ddb (block: raw-posix image > file reopen) broke the build on OpenIndiana. > > illumos has no O_ASYNC. Exclude it from flags to be compared > and instead assert that it is not set where de

[Qemu-devel] [PATCH v2 1/9] main-loop: fix select_ret uninitialized variable warning

2013-02-01 Thread Stefan Hajnoczi
Signed-off-by: Stefan Hajnoczi --- main-loop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main-loop.c b/main-loop.c index 6f52ac3..d0d8fe4 100644 --- a/main-loop.c +++ b/main-loop.c @@ -330,7 +330,8 @@ void qemu_fd_register(int fd) static int os_host_main_loop_wait(uin

[Qemu-devel] [PATCH v2 3/9] main-loop: switch POSIX glib integration to GPollFD

2013-02-01 Thread Stefan Hajnoczi
Convert glib file descriptor polling from rfds/wfds/xfds to GPollFD. The Windows code still needs poll_fds[] and n_poll_fds but they can now become local variables. Signed-off-by: Stefan Hajnoczi --- main-loop.c | 71 +++-- 1 file changed,

[Qemu-devel] [PATCH v2 2/9] main-loop: switch to g_poll() on POSIX hosts

2013-02-01 Thread Stefan Hajnoczi
Use g_poll(3) instead of select(2). Well, this is kind of a cheat. It's true that we're now using g_poll(3) on POSIX hosts but the *_fill() and *_poll() functions are still using rfds/wfds/xfds. We've set the scene to start converting *_fill() and *_poll() functions step-by-step until no more rfd

[Qemu-devel] [PATCH v2 8/9] aio: convert aio_poll() to g_poll(3)

2013-02-01 Thread Stefan Hajnoczi
AioHandler already has a GPollFD so we can directly use its events/revents. Add the int pollfds_idx field to AioContext so we can map g_poll(3) results back to AioHandlers. Reuse aio_dispatch() to invoke handlers after g_poll(3). Signed-off-by: Stefan Hajnoczi --- aio-posix.c | 67

[Qemu-devel] [PULL for-1.4 00/13] Block patches

2013-02-01 Thread Stefan Hajnoczi
The following changes since commit 8a55ebf01507ab73cc458cfcd5b9cb856aba0b9e: Merge remote-tracking branch 'afaerber/qom-cpu' into staging (2013-01-31 19:37:33 -0600) are available in the git repository at: git://github.com/stefanha/qemu.git block for you to fetch changes up to fdf263f63fa

[Qemu-devel] [PATCH 08/13] vpc: Fix bdrv_open() error handling

2013-02-01 Thread Stefan Hajnoczi
From: Kevin Wolf Return -errno instead of -1 on errors. While touching the code, fix a memory leak. Signed-off-by: Kevin Wolf Signed-off-by: Stefan Hajnoczi --- block/vpc.c | 42 ++ 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/block/v

Re: [Qemu-devel] [PATCH for-1.4] Revert "e1000: no need auto-negotiation if link was down"

2013-02-01 Thread mdroth
On Fri, Feb 01, 2013 at 03:20:59PM +0800, Amos Kong wrote: > On Thu, Jan 31, 2013 at 05:43:51PM -0600, Michael Roth wrote: > > This reverts commit 84dd2120247a7d25ff1bb337de21c0e76816ad2d. > > > > I'm not sure what issue the original commit was meant to fix, or if > > the logic is actually wrong,

[Qemu-devel] [PATCH 05/13] sheepdog: pass vdi_id to sheep daemon for sd_close()

2013-02-01 Thread Stefan Hajnoczi
From: Liu Yuan Sheep daemon needs vdi_id to identify which vdi is closed to release resources such as object cache. Cc: MORITA Kazutaka Cc: Kevin Wolf Cc: Stefan Hajnoczi Signed-off-by: Liu Yuan Reviewed-by: MORITA Kazutaka Signed-off-by: Stefan Hajnoczi --- block/sheepdog.c | 5 +++-- 1

[Qemu-devel] [PATCH 12/13] vmdk: Allow space in file name

2013-02-01 Thread Stefan Hajnoczi
From: Philipp Hahn The previous scanf() format string stopped parsing the file name on the first white white space, which seems to be allowed at least by VMware Workstation. Change the format string to collect everything between the first and second quote as the file name, disallowing line break

Re: [Qemu-devel] [PATCH for-1.4] Revert "e1000: no need auto-negotiation if link was down"

2013-02-01 Thread mdroth
On Fri, Feb 01, 2013 at 03:53:22PM +0800, Amos Kong wrote: > On Fri, Feb 01, 2013 at 03:20:59PM +0800, Amos Kong wrote: > > On Thu, Jan 31, 2013 at 05:43:51PM -0600, Michael Roth wrote: > > > This reverts commit 84dd2120247a7d25ff1bb337de21c0e76816ad2d. > > > > > > I'm not sure what issue the orig

Re: [Qemu-devel] [PATCH for-1.4] Revert "e1000: no need auto-negotiation if link was down"

2013-02-01 Thread Anthony Liguori
Michael Roth writes: > This reverts commit 84dd2120247a7d25ff1bb337de21c0e76816ad2d. > > I'm not sure what issue the original commit was meant to fix, or if > the logic is actually wrong, but it causes e1000 to stop working > after a guest issues a reset. > >>From what I can tell a guest with an

[Qemu-devel] [PATCH 09/13] dmg: Fix bdrv_open() error handling

2013-02-01 Thread Stefan Hajnoczi
From: Kevin Wolf Return -errno instead of -1 on errors and add error checks in some places that didn't have one. Passing things by reference requires more correct typing, replaced a few off_ts therefore - with a 32-bit off_t this is even a fix for truncation bugs. While touching the code, fix ev

Re: [Qemu-devel] [PULL 0/4] generic linux-user patches

2013-02-01 Thread Anthony Liguori
Hi Laurent, Laurent Vivier writes: > Hi, > > > Please pull this linux-user patches queue into master. > > All these patches have already been sent and reviewed on the mailing list. > > The following changes since commit 4c37ef022381e777251d7084591978a4dc622efe: > > host-utils: add ffsl (2013-01-

[Qemu-devel] [PATCH for 1.5] virtio: make virtio device's structures public.

2013-02-01 Thread fred . konrad
From: KONRAD Frederic These structures must be made public to avoid two memory allocations for refactored virtio devices. Signed-off-by: KONRAD Frederic --- hw/virtio-balloon.c| 15 --- hw/virtio-balloon.h| 14 ++ hw/virtio-blk.c| 16 hw

[Qemu-devel] [PATCH 07/13] cloop: Fix bdrv_open() error handling

2013-02-01 Thread Stefan Hajnoczi
From: Kevin Wolf Return -errno instead of -1 on errors. While touching the code, fix a memory leak. Signed-off-by: Kevin Wolf Signed-off-by: Stefan Hajnoczi --- block/cloop.c | 29 +++-- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/block/cloop.c b/bl

Re: [Qemu-devel] [PULL 0/4] generic linux-user patches

2013-02-01 Thread Peter Maydell
On 1 February 2013 15:05, Anthony Liguori wrote: > Laurent Vivier writes: >> Please pull this linux-user patches queue into master. >> >> All these patches have already been sent and reviewed on the mailing list. > Did you use git-request-pull to generate this? Perhaps your mailer > munged all

[Qemu-devel] [PATCH 02/13] block: Fix is_allocated_above with resized files

2013-02-01 Thread Stefan Hajnoczi
From: Vishvananda Ishaya In an image chain, if the base image is smaller than the current image, we need to make sure to use the current images count of unallocated blocks once we get to the end of the base image. Without this change the code will return 0 blocks when it gets to the end of the ba

Re: [Qemu-devel] [PATCH] configure: Undefine _FORTIFY_SOURCE prior using it

2013-02-01 Thread Michal Privoznik
On 01.02.2013 10:54, Andreas Färber wrote: > Am 31.01.2013 11:15, schrieb Michal Privoznik: >> Currently, we are enforcing the _FORTIFY_SOURCE=2 without any >> previous detection if the macro has been already defined, e.g. >> by environment, or is just enabled by compiler by default. >> >> Signed-o

Re: [Qemu-devel] [PATCH 2/4] fix scripts/make_device_config.sh

2013-02-01 Thread Gerd Hoffmann
On 02/01/13 14:38, Andreas Färber wrote: > Am 01.02.2013 13:00, schrieb Gerd Hoffmann: >> Make it handle multiple include statements in a file. >> >> Signed-off-by: Gerd Hoffmann >> --- >> scripts/make_device_config.sh |2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a

[Qemu-devel] [PATCH 03/13] block: Adds mirroring tests for resized images

2013-02-01 Thread Stefan Hajnoczi
From: Vishvananda Ishaya This test verifies two mirroring issues are fixed with resized images: * sync='top' creates an image that is the proper size * sync='full' doesn't cause an assertion failure and crash qemu Reviewed-by: Paolo Bonzini Signed-off-by: Stefan Hajnoczi --- tests/qemu-iot

Re: [Qemu-devel] [PATCH V20 1/8] Support for TPM command line options

2013-02-01 Thread Corey Bryant
Thanks for the fixes since the last version. I have a few comments below. Apologies for not catching some of these the first time through. On 01/18/2013 11:02 AM, Stefan Berger wrote: This patch adds support for TPM command line options. The command line options supported here are ./qemu-...

[Qemu-devel] [PATCH 04/13] vmdk: Allow selecting SCSI adapter in image creation

2013-02-01 Thread Stefan Hajnoczi
From: Othmar Pasteka Introduce a new option "adapter_type" when converting to vmdk images. It can be one of the following: ide (default), buslogic, lsilogic or legacyESX (according to the vmdk spec from vmware). In case of a non-ide adapter, heads is set to 255 instead of the 16. The latter is u

[Qemu-devel] [PATCH 13/13] block/raw-posix: Build fix for O_ASYNC

2013-02-01 Thread Stefan Hajnoczi
From: Andreas Färber Commit eeb6b45d48800e96f67ef2a5c80332557fd45ddb (block: raw-posix image file reopen) broke the build on OpenIndiana. illumos has no O_ASYNC. Exclude it from flags to be compared and instead assert that it is not set where defined. Cf. e61ab1da7e98357da47c54d8f893b9bd6ff2f7f

[Qemu-devel] [buildbot patch 6/6] add log tail to failure reports

2013-02-01 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- qemu-master.cfg | 27 +++ 1 file changed, 27 insertions(+) diff --git a/qemu-master.cfg b/qemu-master.cfg index 04d26bf..b54ceb4 100644 --- a/qemu-master.cfg +++ b/qemu-master.cfg @@ -45,6 +45,32 @@ emailAddressesNotify = ["gol...@b1-sys

[Qemu-devel] [PATCH 01/13] qemu-iotests: Add regression test for b7ab0fea

2013-02-01 Thread Stefan Hajnoczi
From: Kevin Wolf It turned out that the change in b7ab0fea was actually a real qcow2 corruption fix. This is a reproducer for the bug. Signed-off-by: Kevin Wolf Signed-off-by: Stefan Hajnoczi --- tests/qemu-iotests/047 | 75 ++ tests/qemu-iotest

[Qemu-devel] [buildbot patch 5/6] save config.log

2013-02-01 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- qemu-master.cfg |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qemu-master.cfg b/qemu-master.cfg index 2502ced..04d26bf 100644 --- a/qemu-master.cfg +++ b/qemu-master.cfg @@ -699,7 +699,9 @@ def create_build_factory(repourl, branch="HEAD

[Qemu-devel] [PATCH 06/13] bochs: Fix bdrv_open() error handling

2013-02-01 Thread Stefan Hajnoczi
From: Kevin Wolf Return -errno instead of -1 on errors. While touching the code, fix a memory leak. Signed-off-by: Kevin Wolf Signed-off-by: Stefan Hajnoczi --- block/bochs.c | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/block/bochs.c b/block/boch

Re: [Qemu-devel] [PATCH 4/7 v2] KVM regsync: Add register bitmap parameter to do_kvm_cpu_synchronize_state

2013-02-01 Thread Jason J. Herne
On 01/24/2013 07:40 AM, Alexander Graf wrote: I think for now the best choice for get_regs() would be to ignore the FULL/RESET bits and always keep the syncing as it happens today under the RUNTIME umbrella only. So all of get_regs() only checks for RUNTIME. Whenever get_xxx() happens, a bit g

[Qemu-devel] [PATCH 11/13] parallels: Fix bdrv_open() error handling

2013-02-01 Thread Stefan Hajnoczi
From: Kevin Wolf Return -errno instead of -1 on errors. Hey, no memory leak to fix here while we're touching it! Signed-off-by: Kevin Wolf Signed-off-by: Stefan Hajnoczi --- block/parallels.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/block/pa

[Qemu-devel] [buildbot patch 1/6] add linebreaks to make create_build_factory more readable

2013-02-01 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- qemu-master.cfg | 24 ++-- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/qemu-master.cfg b/qemu-master.cfg index 03db6ee..2f793c1 100644 --- a/qemu-master.cfg +++ b/qemu-master.cfg @@ -681,17 +681,29 @@ from buildbot.steps.sh

[Qemu-devel] [buildbot patch 0/6] buildbot update

2013-02-01 Thread Gerd Hoffmann
Hi, Goes on top of stefans update. Untested. Shoveling over some goodies from my local buildbot config. https://github.com/kraxel/buildbot/tree/kraxel (will create a pull req in a moment) One question on the buildslave config (which isn't in the tree for security reasons): Do you have max_b

Re: [Qemu-devel] [PATCH for-1.4] Revert "e1000: no need auto-negotiation if link was down"

2013-02-01 Thread Amos Kong
On Fri, Feb 01, 2013 at 08:49:00AM -0600, mdroth wrote: > On Fri, Feb 01, 2013 at 03:53:22PM +0800, Amos Kong wrote: > > On Fri, Feb 01, 2013 at 03:20:59PM +0800, Amos Kong wrote: > > > On Thu, Jan 31, 2013 at 05:43:51PM -0600, Michael Roth wrote: > > > > This reverts commit 84dd2120247a7d25ff1bb33

[Qemu-devel] [PATCH v2 4/9] slirp: switch to GPollFD

2013-02-01 Thread Stefan Hajnoczi
Slirp uses rfds/wfds/xfds more extensively than other QEMU components. The rarely-used out-of-band TCP data feature is used. That means we need the full table of select(2) to g_poll(3) events: rfds -> G_IO_IN | G_IO_HUP | G_IO_ERR wfds -> G_IO_OUT | G_IO_ERR xfds -> G_IO_PRI I came up wit

  1   2   >