Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-13 Thread Anthony Liguori
Gleb Natapov writes: > On Thu, Sep 13, 2012 at 09:06:29AM -0500, Anthony Liguori wrote: >> "Daniel P. Berrange" writes: >> >> I think it's better for QEMU to talk to qemu-ga. We can tell when a large >> period of time has passed in QEMU because we'll accumulate a large >> number of missed tick

Re: [Qemu-devel] [PATCH 01/22] target-i386: return Error from cpu_x86_find_by_name()

2012-09-13 Thread Eduardo Habkost
On Fri, Sep 07, 2012 at 10:54:50PM +0200, Igor Mammedov wrote: > it will allow to use property setters there later. > > Signed-off-by: Igor Mammedov > -- > v2: > style change, add braces (reqested by Blue Swirl) > --- > target-i386/cpu.c | 19 --- > 1 file changed, 16 inserti

Re: [Qemu-devel] [PATCH 02/22] target-i386: cpu_x86_register(): report error from property setter

2012-09-13 Thread Eduardo Habkost
On Fri, Sep 07, 2012 at 10:54:51PM +0200, Igor Mammedov wrote: > Signed-off-by: Igor Mammedov > --- > target-i386/cpu.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/target-i386/cpu.c b/target-i386/cpu.c > index a89bdc4..3f80069 100644 > --- a/target-i386/cpu.c > +++ b/target-i386/cpu

Re: [Qemu-devel] [PATCH 03/22] target-i386: if x86_cpu_realize() failed report error and do cleanup

2012-09-13 Thread Eduardo Habkost
On Fri, Sep 07, 2012 at 10:54:52PM +0200, Igor Mammedov wrote: > Signed-off-by: Igor Mammedov > Acked-by: Andreas Färber > --- > target-i386/helper.c | 9 +++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/target-i386/helper.c b/target-i386/helper.c > index 8a5da3d..a0

Re: [Qemu-devel] [PATCH 04/22] target-i386: filter out not TCG features if running without kvm at realize time

2012-09-13 Thread Eduardo Habkost
On Fri, Sep 07, 2012 at 10:54:53PM +0200, Igor Mammedov wrote: > Signed-off-by: Igor Mammedov > Reviewed-by: Eduardo Habkost > Signed-off-by: Eduardo Habkost Reviewed-by: Eduardo Habkost (The Reviewed-by line is present above already, but I am just confirming that this refresh looks OK to me)

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-13 Thread Eric Blake
On 09/13/2012 08:34 AM, Avi Kivity wrote: > On 09/13/2012 05:22 PM, Gleb Natapov wrote: >>> >>> It's much easier for us to call into qemu-ga to do the time correction >>> whenever this event occurs than to try and have libvirt figure out when >>> it's necessary. > >> And if guest does not have qem

Re: [Qemu-devel] [PATCH 05/22] target-i386: move out CPU features initialization in separate func

2012-09-13 Thread Eduardo Habkost
On Fri, Sep 07, 2012 at 10:54:54PM +0200, Igor Mammedov wrote: > later it could be used in cpu_x86_find_by_name() to init > CPU from found cpu_def > > Signed-off-by: Igor Mammedov > Reviewed-by: Eduardo Habkost Reviewed-by: Eduardo Habkost (Just confirming that the patch refresh looks OK to m

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-13 Thread Gleb Natapov
On Thu, Sep 13, 2012 at 09:35:18AM -0500, Anthony Liguori wrote: > Gleb Natapov writes: > > > On Thu, Sep 13, 2012 at 09:06:29AM -0500, Anthony Liguori wrote: > >> "Daniel P. Berrange" writes: > >> > >> I think it's better for QEMU to talk to qemu-ga. We can tell when a large > >> period of ti

Re: [Qemu-devel] Enablig DLPAR capacity on QEMU pSeries

2012-09-13 Thread Erlon Cruz
> On Wed, Sep 12, 2012 at 6:48 PM, Benjamin Herrenschmidt > wrote: > On Wed, 2012-09-12 at 17:53 +0200, Alexander Graf wrote: >> On 09/12/2012 04:54 PM, Erlon Cruz wrote: >> > Hi all, >> > >> > We are planning to implement DLPAR capacity on QEMU pSeries. As we >> >> What is DLPAR? Hotplug support

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-13 Thread Avi Kivity
On 09/13/2012 05:42 PM, Eric Blake wrote: > On 09/13/2012 08:34 AM, Avi Kivity wrote: >> On 09/13/2012 05:22 PM, Gleb Natapov wrote: It's much easier for us to call into qemu-ga to do the time correction whenever this event occurs than to try and have libvirt figure out when it'

Re: [Qemu-devel] [PATCH 1/2] KVM: fix i8259 interrupt high to low transition logic

2012-09-13 Thread Maciej W. Rozycki
On Thu, 13 Sep 2012, Jan Kiszka wrote: > > I've also just skimmed parts of the 8254 section of "The Indispensable PC > > Hardware Book", by Hans-Peter Messmer, Copyright 1994 Addison-Wesley, > > although I probably ought to read it more carefully. > > http://download.intel.com/design/archives/per

[Qemu-devel] [PATCH v2 00/16] block: bdrv_reopen() patches

2012-09-13 Thread Jeff Cody
These patches are based off Supriya Kannery's original bdrv_reopen() patches as part of the hostcache series. This provides support for safe reopen of a single image, or transactional reopening of multiple images atomically. Changes from v1 -> v2: Patch 01/16: None Patch 02/16: New patch Patch

[Qemu-devel] [PATCH v2 01/16] block: correctly set the keep_read_only flag

2012-09-13 Thread Jeff Cody
I believe the bs->keep_read_only flag is supposed to reflect the initial open state of the device. If the device is initially opened R/O, then commit operations, or reopen operations changing to R/W, are prohibited. Currently, the keep_read_only flag is only accurate for the active layer, and its

[Qemu-devel] [PATCH v2 11/16] block: qcow2 image file reopen

2012-09-13 Thread Jeff Cody
These are the stubs for the file reopen drivers for the qcow2 format. There is currently nothing that needs to be done by the qcow2 driver in reopen. Signed-off-by: Jeff Cody --- block/qcow2.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/block/qcow2.c b/block/qcow

[Qemu-devel] [PATCH v2 16/16] block: remove keep_read_only flag from BlockDriverState struct

2012-09-13 Thread Jeff Cody
The keep_read_only flag is no longer used, in favor of the bdrv flag BDRV_O_ALLOW_RDWR. Signed-off-by: Jeff Cody --- block.c | 2 -- block_int.h | 1 - 2 files changed, 3 deletions(-) diff --git a/block.c b/block.c index 1f24949..bc994df 100644 --- a/block.c +++ b/block.c @@ -808,8 +808,6 @

Re: [Qemu-devel] [PATCH 01/22] target-i386: return Error from cpu_x86_find_by_name()

2012-09-13 Thread Igor Mammedov
On Thu, 13 Sep 2012 11:38:08 -0300 Eduardo Habkost wrote: > On Fri, Sep 07, 2012 at 10:54:50PM +0200, Igor Mammedov wrote: > > it will allow to use property setters there later. > > > > Signed-off-by: Igor Mammedov > > -- > > v2: > > style change, add braces (reqested by Blue Swirl) > > ---

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-13 Thread Avi Kivity
On 09/13/2012 06:50 PM, Anthony Liguori wrote: >>> This may not work for really old server oriented guests. >>> >>> S3 requires guest cooperation, period. But so does qemu-ga. It's >>> better than nothing, and we can't get perfection without guest cooperation. >> >> qemu-ga requires either

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-13 Thread Anthony Liguori
Gleb Natapov writes: > On Thu, Sep 13, 2012 at 09:35:18AM -0500, Anthony Liguori wrote: >> Gleb Natapov writes: >> >> > On Thu, Sep 13, 2012 at 09:06:29AM -0500, Anthony Liguori wrote: >> >> "Daniel P. Berrange" writes: >> >> >> >> I think it's better for QEMU to talk to qemu-ga. We can tell

[Qemu-devel] [PATCH v2 08/16] block: raw-posix image file reopen

2012-09-13 Thread Jeff Cody
This is derived from the Supriya Kannery's reopen patches. This contains the raw-posix driver changes for the bdrv_reopen_* functions. All changes are staged into a temporary scratch buffer during the prepare() stage, and copied over to the live structure during commit(). Upon abort(), all chang

Re: [Qemu-devel] [PATCH v2 08/16] block: raw-posix image file reopen

2012-09-13 Thread Paolo Bonzini
Il 13/09/2012 17:49, Jeff Cody ha scritto: > + > +/* > + * If we didn't have BDRV_O_NOCACHE set before, we may not have allocated > + * aligned_buf > + */ > +ret = raw_allocate_aligned_buf(&raw_s->aligned_buf, > + &raw_s->aligned_buf_size, state

Re: [Qemu-devel] [PATCH v2 09/16] block: raw image file reopen

2012-09-13 Thread Paolo Bonzini
Il 13/09/2012 17:49, Jeff Cody ha scritto: > +/* We have nothing to do for raw reopen, stubs just return > + * success */ > +static int raw_reopen_prepare(BDRVReopenState *state, Error **errp) > +{ > +return 0; > +} > + > +static void raw_reopen_commit(BDRVReopenState *state) > +{ > +return

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-13 Thread Gleb Natapov
On Thu, Sep 13, 2012 at 10:56:56AM -0500, Anthony Liguori wrote: > Gleb Natapov writes: > > > On Thu, Sep 13, 2012 at 09:35:18AM -0500, Anthony Liguori wrote: > >> Gleb Natapov writes: > >> > >> > On Thu, Sep 13, 2012 at 09:06:29AM -0500, Anthony Liguori wrote: > >> >> "Daniel P. Berrange" wri

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-13 Thread Avi Kivity
On 09/13/2012 06:56 PM, Anthony Liguori wrote: >>> >> Hmm, true. What about hooking into suspend and doing vmstop during >> suspend. > > Is suspend the only foreseeable way for this problem to happen? I don't > think it is which is what concerns me about any approach that relies on > "hooking s

Re: [Qemu-devel] [PATCH v2 06/16] block: do not parse BDRV_O_CACHE_WB in raw block drivers

2012-09-13 Thread Paolo Bonzini
Il 13/09/2012 17:49, Jeff Cody ha scritto: > Block drivers should always open the files in writeback mode (see commit > e1e9b0ac), so raw-posix/raw-win32 should not parse the BDRV_O_CACHE_WB > flag. > > Signed-off-by: Jeff Cody > --- > block/raw-posix.c | 3 --- > block/raw-win32.c | 3 --- > 2

[Qemu-devel] [PATCH v2 05/16] block: move open flag parsing in raw block drivers to helper functions

2012-09-13 Thread Jeff Cody
Code motion, to move parsing of open flags into a helper function. Signed-off-by: Jeff Cody --- block/raw-posix.c | 38 -- block/raw-win32.c | 43 +++ 2 files changed, 47 insertions(+), 34 deletions(-) diff --git a/bloc

[Qemu-devel] [PATCH v2 04/16] block: move aio initialization into a helper function

2012-09-13 Thread Jeff Cody
Move AIO initialization for raw-posix block driver into a helper function. In addition to just code motion, the aio_ctx pointer is checked for NULL, prior to calling laio_init(), to make sure laio_init() is only run once. Signed-off-by: Jeff Cody --- block/raw-posix.c | 55 ++

Re: [Qemu-devel] [PATCH v2 5/9] fbdev: add monitor command to enable/disable

2012-09-13 Thread Markus Armbruster
Gerd Hoffmann writes: > This patch adds a fbdev monitor command to enable/disable > the fbdev display at runtime to both qmp and hmp. > > qmp: fbdev enable=on|off > hmp: fbdev on|off > > Signed-off-by: Gerd Hoffmann > --- > hmp-commands.hx | 15 +++ > hmp.c|9

[Qemu-devel] Selective block migration (still on 0.13)

2012-09-13 Thread Christian Theune
Hi, we're currently still on 0.13, looking forward to a large update soon. :) We haven't been using live migration up until now, but are investigating it to multiple downtimes (restarting updated hosts and restarting updated guests) when doing system updates. So, we're trying to find out whet

Re: [Qemu-devel] [PATCH v2 03/16] block: Framework for reopening files safely

2012-09-13 Thread Paolo Bonzini
Il 13/09/2012 17:49, Jeff Cody ha scritto: > +reopen_state->bs->open_flags = reopen_state->flags; > +reopen_state->bs->enable_write_cache = !!(reopen_state->flags & > + BDRV_O_CACHE_WB); I think setting enable_write_cache is wrong here b

Re: [Qemu-devel] [PATCH v2 4/9] fbdev: add linux framebuffer display driver.

2012-09-13 Thread Markus Armbruster
Gerd Hoffmann writes: > Display works, requires truecolor framebuffer with 16 or 32 bpp on the > host. 32bpp is recommended. The framebuffer is used as-is, qemu > doesn't try to switch modes. With LCD displays mode switching is pretty > pointless IMHO, also it wouldn't work anyway with the mos

[Qemu-devel] [PATCH v2 15/16] block: convert bdrv_commit() to use bdrv_reopen()

2012-09-13 Thread Jeff Cody
Currently, bdrv_commit() reopens images r/w itself, via bdrv_delete() and bdrv_open() calls. Use the new safe method for drive reopen. Signed-off-by: Jeff Cody --- block.c | 48 +--- 1 file changed, 5 insertions(+), 43 deletions(-) diff --git a/block.

[Qemu-devel] [PATCH v2 14/16] block: raw-win32 driver reopen support

2012-09-13 Thread Jeff Cody
This is the support for reopen, for win32. Note that there is a key difference in the win32 reopen, namely that it is not guaranteed safe like all the other drivers. Attempts are made to reopen the file, or open the file in a new handle prior to closing the old handle. However, this is not alway

[Qemu-devel] [PATCH v2 03/16] block: Framework for reopening files safely

2012-09-13 Thread Jeff Cody
This is based on Supriya Kannery's bdrv_reopen() patch series. This provides a transactional method to reopen multiple images files safely. Image files are queue for reopen via bdrv_reopen_queue(), and the reopen occurs when bdrv_reopen_multiple() is called. Changes are staged in bdrv_reopen_pre

Re: [Qemu-devel] [PATCH v2 2/3] Separate inet_connect into inet_connect (blocking) and inet_nonblocking_connect

2012-09-13 Thread Orit Wasserman
On 09/13/2012 03:44 PM, Markus Armbruster wrote: > Orit Wasserman writes: > >> No need to add non blocking parameters to the blocking inet_connect >> >> Signed-off-by: Orit Wasserman >> --- >> migration-tcp.c |2 +- >> nbd.c |2 +- >> qemu-sockets.c | 24 +++

[Qemu-devel] [PATCH v2 02/16] block: make bdrv_set_enable_write_cache() modify open_flags

2012-09-13 Thread Jeff Cody
bdrv_set_enable_write_cache() sets the bs->enable_write_cache flag, but without the flag recorded in bs->open_flags, then next time a reopen() is performed the enable_write_cache setting may be inadvertently lost. This will set the flag in open_flags, so it is preserved across reopens. Signed-off

[Qemu-devel] [PATCH v2 10/16] block: qed image file reopen

2012-09-13 Thread Jeff Cody
These are the stubs for the file reopen drivers for the qed format. There is currently nothing that needs to be done by the qed driver in reopen. Signed-off-by: Jeff Cody --- block/qed.c | 20 1 file changed, 20 insertions(+) diff --git a/block/qed.c b/block/qed.c index 21

[Qemu-devel] [PATCH v2 09/16] block: raw image file reopen

2012-09-13 Thread Jeff Cody
These are the stubs for the file reopen drivers for the raw format. There is currently nothing that needs to be done by the raw driver in reopen. Signed-off-by: Jeff Cody --- block/raw.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/block/raw.c b/block/raw.c index

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-13 Thread Avi Kivity
On 09/13/2012 05:48 PM, Gleb Natapov wrote: > On Thu, Sep 13, 2012 at 09:35:18AM -0500, Anthony Liguori wrote: >> Gleb Natapov writes: >> >> > On Thu, Sep 13, 2012 at 09:06:29AM -0500, Anthony Liguori wrote: >> >> "Daniel P. Berrange" writes: >> >> >> >> I think it's better for QEMU to talk to

Re: [Qemu-devel] [PATCH v2 1/3] Refactor inet_connect_opts function

2012-09-13 Thread Orit Wasserman
On 09/13/2012 03:35 PM, Markus Armbruster wrote: > Orit Wasserman writes: > >> From: Michael S. Tsirkin >> >> refactor address resolution code to fix nonblocking connect >> >> Signed-off-by: Michael S. Tsirkin >> Signed-off-by: Amos Kong >> Signed-off-by: Orit Wasserman >> --- >> qemu-socket

Re: [Qemu-devel] [PATCH v2 1/3] Refactor inet_connect_opts function

2012-09-13 Thread Orit Wasserman
On 09/13/2012 04:14 PM, Markus Armbruster wrote: > One more... > > Orit Wasserman writes: > > [...] >> +static int inet_connect_addr(struct addrinfo *addr, bool block, >> + bool *in_progress, Error **errp) > > Parameter errp is unused. > >> +{ >> +char uaddr[INE

[Qemu-devel] [PATCH v2 06/16] block: do not parse BDRV_O_CACHE_WB in raw block drivers

2012-09-13 Thread Jeff Cody
Block drivers should always open the files in writeback mode (see commit e1e9b0ac), so raw-posix/raw-win32 should not parse the BDRV_O_CACHE_WB flag. Signed-off-by: Jeff Cody --- block/raw-posix.c | 3 --- block/raw-win32.c | 3 --- 2 files changed, 6 deletions(-) diff --git a/block/raw-posix.c

[Qemu-devel] [PATCH v2 12/16] block: qcow image file reopen

2012-09-13 Thread Jeff Cody
These are the stubs for the file reopen drivers for the qcow format. There is currently nothing that needs to be done by the qcow driver in reopen. Signed-off-by: Jeff Cody --- block/qcow.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/block/qcow.c b/block/qcow.c

[Qemu-devel] [PATCH v2 13/16] block: vmdk image file reopen

2012-09-13 Thread Jeff Cody
This patch supports reopen for VMDK image files. VMDK extents are added to the existing reopen queue, so that the transactional model of reopen is maintained with multiple image files. Signed-off-by: Jeff Cody --- block/vmdk.c | 47 +++ 1 file changed

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-13 Thread Anthony Liguori
Avi Kivity writes: > On 09/13/2012 05:42 PM, Eric Blake wrote: >> On 09/13/2012 08:34 AM, Avi Kivity wrote: >>> On 09/13/2012 05:22 PM, Gleb Natapov wrote: > > It's much easier for us to call into qemu-ga to do the time correction > whenever this event occurs than to try and have libv

[Qemu-devel] [PATCH v2 07/16] block: move allocating aligned_buf into a helper function in raw_posix.c

2012-09-13 Thread Jeff Cody
Code motion, to move allocating aligned_buf and setting aligned_buf_size into a helper function. Signed-off-by: Jeff Cody --- block/raw-posix.c | 31 ++- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/block/raw-posix.c b/block/raw-posix.c index 4a1047c

Re: [Qemu-devel] [PATCH v2 1/3] Refactor inet_connect_opts function

2012-09-13 Thread Orit Wasserman
On 09/13/2012 03:35 PM, Markus Armbruster wrote: > Orit Wasserman writes: > >> From: Michael S. Tsirkin >> >> refactor address resolution code to fix nonblocking connect >> >> Signed-off-by: Michael S. Tsirkin >> Signed-off-by: Amos Kong >> Signed-off-by: Orit Wasserman >> --- >> qemu-socket

Re: [Qemu-devel] [PATCH v2 08/16] block: raw-posix image file reopen

2012-09-13 Thread Jeff Cody
On 09/13/2012 12:02 PM, Paolo Bonzini wrote: > Il 13/09/2012 17:49, Jeff Cody ha scritto: >> + >> +/* >> + * If we didn't have BDRV_O_NOCACHE set before, we may not have >> allocated >> + * aligned_buf >> + */ >> +ret = raw_allocate_aligned_buf(&raw_s->aligned_buf, >> +

Re: [Qemu-devel] [PATCH v2 09/16] block: raw image file reopen

2012-09-13 Thread Jeff Cody
On 09/13/2012 12:05 PM, Paolo Bonzini wrote: > Il 13/09/2012 17:49, Jeff Cody ha scritto: >> +/* We have nothing to do for raw reopen, stubs just return >> + * success */ >> +static int raw_reopen_prepare(BDRVReopenState *state, Error **errp) >> +{ >> +return 0; >> +} >> + >> +static void raw_r

Re: [Qemu-devel] [PATCH] hw: Add support for new LSI Logic devices.

2012-09-13 Thread Don Slutz
On 09/12/12 02:58, Gerhard Wiesinger wrote: On 11.09.2012 19:00, Don Slutz wrote: Add LSI53C1030, SAS1068, SAS1068e. Based on code from "VirtualBox Open Source Edition". Based on QEMU MegaRAID SAS 8708EM2. This is a common VMware disk controller. SEABIOS change for booting is in the works.

Re: [Qemu-devel] Selective block migration (still on 0.13)

2012-09-13 Thread Eric Blake
On 09/13/2012 08:58 AM, Christian Theune wrote: > I saw that 0.13 does have block migration available. However, looking at > the code, it's an "either or" situation: migrate all block devices or none. Migrating disks during live migration has proven to be hard to get right; the current code is mo

Re: [Qemu-devel] [PATCH v2 06/16] block: do not parse BDRV_O_CACHE_WB in raw block drivers

2012-09-13 Thread Jeff Cody
On 09/13/2012 12:12 PM, Paolo Bonzini wrote: > Il 13/09/2012 17:49, Jeff Cody ha scritto: >> Block drivers should always open the files in writeback mode (see commit >> e1e9b0ac), so raw-posix/raw-win32 should not parse the BDRV_O_CACHE_WB >> flag. >> >> Signed-off-by: Jeff Cody >> --- >> block/r

Re: [Qemu-devel] [PATCH v2 3/3] Fix address handling in inet_nonblocking_connect

2012-09-13 Thread Orit Wasserman
On 09/13/2012 04:22 PM, Markus Armbruster wrote: > Orit Wasserman writes: > >> getaddrinfo can give us a list of addresses, but we only try to >> connect to the first one. If that fails we never proceed to >> the next one. This is common on desktop setups that often have ipv6 >> configured but n

Re: [Qemu-devel] [PATCH v2 07/16] block: move allocating aligned_buf into a helper function in raw_posix.c

2012-09-13 Thread Eric Blake
On 09/13/2012 09:49 AM, Jeff Cody wrote: > Code motion, to move allocating aligned_buf and setting aligned_buf_size > into a helper function. > > Signed-off-by: Jeff Cody > --- > block/raw-posix.c | 31 ++- > 1 file changed, 22 insertions(+), 9 deletions(-) > > +

Re: [Qemu-devel] [PATCH] m68k: implement move to/from usp register instruction

2012-09-13 Thread Richard Henderson
On 09/12/2012 11:33 PM, g...@snapgear.com wrote: > +uint32_t HELPER(move_from_usp)(CPUM68KState * env) > +{ > +return env->sp[M68K_USP]; > +} You don't need helpers for these. > DISAS_INSN(move_from_usp) > { > +TCGv reg; > if (IS_USER(s)) { > gen_exception(s, s->pc - 2, EX

[Qemu-devel] [PATCH v2 0/4] Fix and clean tcg_target_get_call_iarg_regs_count

2012-09-13 Thread Stefan Weil
These patches replace the 4 patches which I sent yesterday. Thanks to Aurelien, Peter and Richard for their feedback. Function tcg_target_get_call_iarg_regs_count was wrong for w64 hosts and can be removed completely (no more implementations for each TCG target): [PATCH 1/4] w64: Fix TCG helper

[Qemu-devel] [PATCH 3/4] tcg/i386: Remove unused registers from tcg_target_call_iarg_regs

2012-09-13 Thread Stefan Weil
32 bit x86 hosts don't need registers for helper function arguments because they use the default stack based calling convention. Removing the registers allows simpler code for function tcg_target_get_call_iarg_regs_count. Signed-off-by: Stefan Weil --- tcg/i386/tcg-target.c | 10 ++ 1

[Qemu-devel] [PATCH 1/4] w64: Fix TCG helper functions with 5 arguments

2012-09-13 Thread Stefan Weil
TCG uses 6 registers for function arguments on 64 bit Linux hosts, but only 4 registers on W64 hosts. Commit 2999a0b20074a7e4a58f56572bb1436749368f59 increased the number of arguments for some important helper functions from 4 to 5 which triggered a bug for W64 hosts: QEMU aborts when executing he

[Qemu-devel] [PATCH 2/4] tcg/i386: Add shortcuts for registers used in L constraint

2012-09-13 Thread Stefan Weil
While 64 bit hosts use the first three registers which are also used as function input parameters, 32 bit hosts use TCG_REG_EAX and TCG_REG_EDX which are not used in parameter passing. After defining new register macros for the registers used in L constraint, the patch replaces most occurrences of

[Qemu-devel] [PATCH 4/4] tcg: Remove tcg_target_get_call_iarg_regs_count

2012-09-13 Thread Stefan Weil
The TCG targets no longer need individual implementations. Since commit 6a18ae2d2947532d5c26439548afa0481c4529f9, 'flags' is no longer used in tcg_target_get_call_iarg_regs_count. The remaining tcg_target_get_call_iarg_regs_count is trivial and only called once. Therefore the patch eliminates it

Re: [Qemu-devel] [PATCH v2 0/4] Fix and clean tcg_target_get_call_iarg_regs_count

2012-09-13 Thread Richard Henderson
On 09/13/2012 10:37 AM, Stefan Weil wrote: > [PATCH 1/4] w64: Fix TCG helper functions with 5 arguments (unchanged) > [PATCH 2/4] tcg/i386: Add shortcuts for registers used in L (new) > [PATCH 3/4] tcg/i386: Remove unused registers from (unchanged) > [PATCH 4/4] tcg: Remove tcg_target_get_call_iarg

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-13 Thread Anthony Liguori
Avi Kivity writes: > On 09/13/2012 06:50 PM, Anthony Liguori wrote: > This may not work for really old server oriented guests. S3 requires guest cooperation, period. But so does qemu-ga. It's better than nothing, and we can't get perfection without guest cooperation. >

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-13 Thread Anthony Liguori
Gleb Natapov writes: > On Thu, Sep 13, 2012 at 10:56:56AM -0500, Anthony Liguori wrote: >> Gleb Natapov writes: >> >> > On Thu, Sep 13, 2012 at 09:35:18AM -0500, Anthony Liguori wrote: >> >> Gleb Natapov writes: >> >> >> >> > On Thu, Sep 13, 2012 at 09:06:29AM -0500, Anthony Liguori wrote: >>

Re: [Qemu-devel] [PATCH v2 3/4] target-i386: Allow changing of Hypervisor CPUIDs.

2012-09-13 Thread Don Slutz
On 09/12/12 13:55, Marcelo Tosatti wrote: The problem with integrating this is that it has little or no assurance from documentation. The Linux kernel source is a good source, then say "accordingly to VMWare guest support code in version xyz" in the changelog. I will work on getting a list of the

Re: [Qemu-devel] [PATCH v2 09/16] block: raw image file reopen

2012-09-13 Thread Paolo Bonzini
Il 13/09/2012 19:02, Jeff Cody ha scritto: > I kept the stubs for them for completeness, > however (I can remove them if that causes heartburn for others). The point of making them optional is to avoid stubs, isn't it? ;) Paolo

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-13 Thread Gleb Natapov
On Thu, Sep 13, 2012 at 01:33:31PM -0500, Anthony Liguori wrote: > Gleb Natapov writes: > > > On Thu, Sep 13, 2012 at 10:56:56AM -0500, Anthony Liguori wrote: > >> Gleb Natapov writes: > >> > >> > On Thu, Sep 13, 2012 at 09:35:18AM -0500, Anthony Liguori wrote: > >> >> Gleb Natapov writes: > >

Re: [Qemu-devel] [PATCH v2 06/16] block: do not parse BDRV_O_CACHE_WB in raw block drivers

2012-09-13 Thread Paolo Bonzini
Il 13/09/2012 19:17, Jeff Cody ha scritto: >> > >> > Why does this matter? If raw-posix was opened directly (i.e. without >> > the bs->file indirection) this would cause a writethrough file to be >> > incorrectly opened as writeback. >> > >> > Paolo >> > > The problem this patch was trying to w

[Qemu-devel] [PATCH v3 1/3] Refactor inet_connect_opts function

2012-09-13 Thread Orit Wasserman
From: "Michael S. Tsirkin" refactor address resolution code to fix nonblocking connect remove getnameinfo call Signed-off-by: Michael S. Tsirkin Signed-off-by: Amos Kong Signed-off-by: Orit Wasserman --- qemu-sockets.c | 144 +++ 1 files c

[Qemu-devel] [PATCH v3 3/3] Fix address handling in inet_nonblocking_connect

2012-09-13 Thread Orit Wasserman
getaddrinfo can give us a list of addresses, but we only try to connect to the first one. If that fails we never proceed to the next one. This is common on desktop setups that often have ipv6 configured but not actually working. To fix this make inet_connect_nonblocking retry connection with a di

[Qemu-devel] [PATCH v3 2/3] Separate inet_connect into inet_connect (blocking) and inet_nonblocking_connect

2012-09-13 Thread Orit Wasserman
No need to add non blocking parameters to the blocking inet_connect add block parameter for inet_connect_opts instead of using QemuOpt "block". Signed-off-by: Orit Wasserman --- migration-tcp.c |2 +- nbd.c |2 +- qemu-char.c |2 +- qemu-sockets.c | 28 ++

[Qemu-devel] [PATCH v3 0/3] nonblocking connect address handling cleanup

2012-09-13 Thread Orit Wasserman
Changes from v2: - remove the use of getnameinfo - remove errp for inet_connect_addr - remove QemuOpt "block" - fix errors in wait_for_connect - pass ConnectState as a parameter to allow concurrent connect ops getaddrinfo can give us a list of addresses, bu

Re: [Qemu-devel] [PATCH v2 06/16] block: do not parse BDRV_O_CACHE_WB in raw block drivers

2012-09-13 Thread Jeff Cody
On 09/13/2012 02:56 PM, Paolo Bonzini wrote: > Il 13/09/2012 19:17, Jeff Cody ha scritto: Why does this matter? If raw-posix was opened directly (i.e. without the bs->file indirection) this would cause a writethrough file to be incorrectly opened as writeback. Paolo >

Re: [Qemu-devel] [PATCH v2 09/16] block: raw image file reopen

2012-09-13 Thread Jeff Cody
On 09/13/2012 02:53 PM, Paolo Bonzini wrote: > Il 13/09/2012 19:02, Jeff Cody ha scritto: >> I kept the stubs for them for completeness, >> however (I can remove them if that causes heartburn for others). > > The point of making them optional is to avoid stubs, isn't it? ;) > > Paolo > Fair poi

Re: [Qemu-devel] [PATCH v2 06/16] block: do not parse BDRV_O_CACHE_WB in raw block drivers

2012-09-13 Thread Paolo Bonzini
Il 13/09/2012 21:04, Jeff Cody ha scritto: >> > Perhaps we _should_ preserve that in bs->open_flags, while still using >> > the initial value of BDRV_O_CACHE_WB to initialize bs->enable_write_cache. > That would work. Part of the problem is that BDRV_O_CACHE_WB seems > overloaded; maybe bdrv_parse

[Qemu-devel] [PATCH 2/2] make the compaction "skip ahead" logic robust

2012-09-13 Thread Rik van Riel
Make the "skip ahead" logic in compaction resistant to compaction wrapping around to the end of the zone. This can lead to less efficient compaction when one thread has wrapped around to the end of the zone, and another simultaneous compactor has not done so yet. However, it should ensure that we

[Qemu-devel] [PATCH 1/2] Revert "mm: have order > 0 compaction start near a pageblock with free pages"

2012-09-13 Thread Rik van Riel
On Wed, 12 Sep 2012 17:46:15 +0100 Richard Davies wrote: > Mel Gorman wrote: > > I see that this is an old-ish bug but I did not read the full history. > > Is it now booting faster than 3.5.0 was? I'm asking because I'm > > interested to see if commit c67fe375 helped your particular case. > > Yes

[Qemu-devel] [PATCH -v2 2/2] make the compaction "skip ahead" logic robust

2012-09-13 Thread Rik van Riel
Argh. And of course I send out the version from _before_ the compile test, instead of the one after! I am not used to caffeine any more and have had way too much tea... ---8<--- Make the "skip ahead" logic in compaction resistant to compaction wrapping around to the end of the zone. This can lea

Re: [Qemu-devel] [PATCH v3 2/2] slirp: Implement TFTP Blocksize option

2012-09-13 Thread Hervé Poussineau
Jan Kiszka a écrit : On 2012-09-13 07:55, Hervé Poussineau wrote: This option is described in RFC 1783. As this is only an optional field, we may ignore it in some situations and handle it in some others. However, MS Windows 2003 PXE boot client requests a block size of the MTU (most of the tim

Re: [Qemu-devel] Rethinking missed tick catchup

2012-09-13 Thread Anthony Liguori
Gleb Natapov writes: >> That's a bug. >> >> The next period calculation should not be based on the last period + >> length of period but rather on the current time + delta to next period >> boundary. >> > I disagree that this is a bug. This is by design to account for timer > signals that was d

[Qemu-devel] [PATCH v4 0/4] VFIO-based PCI device assignment

2012-09-13 Thread Alex Williamson
Here's an updated version of the VFIO PCI device assignment series. Now that we're targetting QEMU 1.3, I've opened up support so that vfio-pci is added to all softmmu targets supporting PCI on Linux hosts. Only some printf format changes were required to make this build. I also added a workaroun

[Qemu-devel] [PATCH v4 1/4] Update kernel header script to include vfio

2012-09-13 Thread Alex Williamson
Signed-off-by: Alex Williamson --- scripts/update-linux-headers.sh |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh index a639c5b..605102f 100755 --- a/scripts/update-linux-headers.sh +++ b/scripts/update-lin

[Qemu-devel] [PATCH v4 2/4] Update Linux kernel headers

2012-09-13 Thread Alex Williamson
Based on Linux as of 1a95620. Signed-off-by: Alex Williamson --- linux-headers/linux/vfio.h | 368 1 file changed, 368 insertions(+) create mode 100644 linux-headers/linux/vfio.h diff --git a/linux-headers/linux/vfio.h b/linux-headers/linux/vfio.h

[Qemu-devel] [PATCH v4 4/4] vfio: Enable vfio-pci and mark supported

2012-09-13 Thread Alex Williamson
Enabled for all softmmu guests supporting PCI on Linux hosts. Note that currently only x86 hosts have the kernel side VFIO IOMMU support for this. PPC (g3beige) is the only non-x86 guest known to work. ARM (veratile) hangs in firmware, others untested. Signed-off-by: Alex Williamson --- MAINT

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

2012-09-13 Thread Nicholas A. Bellinger
On Tue, 2012-09-11 at 12:36 +0800, Asias He wrote: > Hello Nicholas, > Hello Asias! > On 09/07/2012 02:48 PM, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > Hello Anthony & Co, > > > > This is the fourth installment to add host virtualized target support for > > the mainlin

[Qemu-devel] [PATCH 09/25] pcie: pass pcie window size to pcie_host_mmcfg_update()

2012-09-13 Thread Jason Baron
This allows q35 to pass/set the size of the pcie window in its update routine. Signed-off-by: Jason Baron --- hw/pcie_host.c | 21 - hw/pcie_host.h |8 +--- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/hw/pcie_host.c b/hw/pcie_host.c index 28bbe7

[Qemu-devel] [PATCH 14/25] q35: Fix non-PCI IRQ processing in ich9_lpc_update_apic

2012-09-13 Thread Jason Baron
From: Jan Kiszka Avoid passing a non-PCI IRQ to ich9_gsi_to_pirq. It's wrong and triggers an assertion. Signed-off-by: Jan Kiszka Signed-off-by: Jason Baron --- hw/q35.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/q35.c b/hw/q35.c index 09e8bd7..8b6a2e5 10

[Qemu-devel] [PATCH 20/25] pcie: drop version_id field for live migration

2012-09-13 Thread Jason Baron
While testing q35 live migration, I found that the migration would abort with the following error: "Unknown savevm section type 76". The error is due to this check failing in 'vmstate_load_state()': while(field->name) { if ((field->field_exists && field->field_exists(opaq

[Qemu-devel] [PATCH 25/25] q35: automatically load the q35 dsdt table

2012-09-13 Thread Jason Baron
Automatically, locate the required q35 dsdt table on load. Otherwise we error out. This could be done in the bios, but its harder to produce a good error message. Signed-off-by: Jason Baron --- hw/pc_q35.c | 26 ++ 1 files changed, 26 insertions(+), 0 deletions(-) diff

Re: [Qemu-devel] [PATCH v2 03/16] block: Framework for reopening files safely

2012-09-13 Thread Paolo Bonzini
Il 13/09/2012 17:49, Jeff Cody ha scritto: > +typedef QSIMPLEQ_HEAD(BlockReopenQueue, BlockReopenQueueEntry) > BlockReopenQueue; > + > +typedef struct BDRVReopenState { > +BlockDriverState *bs; > +int flags; > +void *opaque; > +BlockReopenQueue *queue; Do we need the queue pointer

Re: [Qemu-devel] [PATCH v2 06/16] block: do not parse BDRV_O_CACHE_WB in raw block drivers

2012-09-13 Thread Paolo Bonzini
Il 13/09/2012 21:44, Paolo Bonzini ha scritto: > Il 13/09/2012 21:04, Jeff Cody ha scritto: Perhaps we _should_ preserve that in bs->open_flags, while still using the initial value of BDRV_O_CACHE_WB to initialize bs->enable_write_cache. >> That would work. Part of the problem is that BD

[Qemu-devel] [PATCH 13/25] q35: Suppress SMM BIOS initialization under KVM

2012-09-13 Thread Jason Baron
From: Jan Kiszka Same as for i44fx: KVM does not support SMM yet. Signal it initialized to Seabios to avoid failures. Signed-off-by: Jan Kiszka Signed-off-by: Jason Baron --- hw/acpi_ich9.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/hw/acpi_ich9.c b/hw/acpi

[Qemu-devel] [PATCH 22/25] ahci: properly reset PxCMD on HBA reset

2012-09-13 Thread Jason Baron
While testing q35, I found that windows 7 (specifically, windows 7 ultimate with sp1 x64), wouldn't install because it can't find the cdrom or disk drive. The failure message is: 'A required cd/dvd device driver is missing. If you have a driver floppy disk, CD, DVD, or USB flash drive, please inser

[Qemu-devel] [PATCH 10/25] pcie: Convert PCIExpressHost to use the QOM.

2012-09-13 Thread Jason Baron
Let's use PCIExpressHost with QOM. Signed-off-by: Jason Baron --- hw/pcie_host.c | 14 ++ hw/pcie_host.h |4 2 files changed, 18 insertions(+), 0 deletions(-) diff --git a/hw/pcie_host.c b/hw/pcie_host.c index e2fd276..027ba05 100644 --- a/hw/pcie_host.c +++ b/hw/pcie_hos

[Qemu-devel] [PATCH 00/25] q35 series take #1

2012-09-13 Thread Jason Baron
Hi, Qemu bits for q35 support, I'm posting the seabios changes separately. The patches require '-M pc_q35' and -L 'seabios dir with q35 changes' on the qemu command line. Hopefully, we can make it the default for x86 at some future point when we feel comfortable with it. Since q35 patches have be

Re: [Qemu-devel] [PATCH v2 03/16] block: Framework for reopening files safely

2012-09-13 Thread Jeff Cody
On 09/13/2012 04:35 PM, Paolo Bonzini wrote: > Il 13/09/2012 17:49, Jeff Cody ha scritto: >> +typedef QSIMPLEQ_HEAD(BlockReopenQueue, BlockReopenQueueEntry) >> BlockReopenQueue; >> + >> +typedef struct BDRVReopenState { >> +BlockDriverState *bs; >> +int flags; >> +void *opaque; >> +

[Qemu-devel] [PATCH 15/25] q35: smbus: Remove PCI_STATUS_SIG_SYSTEM_ERROR and PCI_STATUS_DETECTED_PARITY from w1cmask

2012-09-13 Thread Jason Baron
From: Jan Kiszka Both bits are added to the write-1-to-clear mask by default. As the smbus device does not allow writes at all, we have to remove it from that mask, also to avoid triggering a runtime assertion. Signed-off-by: Jan Kiszka Signed-off-by: Jason Baron --- hw/q35_smbus.c |4 +++

[Qemu-devel] [PATCH 05/25] pc, pc_piix: split out pc nic initialization

2012-09-13 Thread Jason Baron
From: Isaku Yamahata Factor out pc nic initialization. This simplifies the pc initialization and will reduce the code duplication of q35 pc initialization. Signed-off-by: Isaku Yamahata Signed-off-by: Jason Baron --- hw/pc.c | 15 +++ hw/pc.h |1 + hw/pc_piix.c |

[Qemu-devel] [PATCH 01/25] pci: pci capability must be in PCI space

2012-09-13 Thread Jason Baron
From: Isaku Yamahata pci capability must be in PCI space. It can't lay in PCIe extended config space. Signed-off-by: Isaku Yamahata Signed-off-by: Jason Baron --- hw/pci.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 4d95984..b348596 1

[Qemu-devel] [PATCH 19/25] ahci: add migration support

2012-09-13 Thread Jason Baron
Add support for ahci migration. This patch builds upon the patches originally posted by Andreas Färber. These patches have been tested by migrating Windows 7 and Fedora 16 guests on both piix with ahci attached and on q35 (which has a built-in ahci controller). Signed-off-by: Andreas Färber Cc:

[Qemu-devel] [PATCH 21/25] pcie_aer: clear cmask for Advanced Error Interrupt Message Number

2012-09-13 Thread Jason Baron
The Advanced Error Interrupt Message Number (bits 31:27 of the Root Error Status Register) is updated when the number of msi messages assigned to a device changes. Migration of windows 7 on q35 chipset failed because the check in get_pci_config_device() fails due to cmask being set on these bits. I

Re: [Qemu-devel] [PATCH] hw: Add support for new LSI Logic devices.

2012-09-13 Thread Anthony Liguori
"Michael S. Tsirkin" writes: > On Tue, Sep 11, 2012 at 01:00:13PM -0400, Don Slutz wrote: >> +if (next_chain_offset) { >> +MptSGEntryChain sgec; >> +cpu_physical_memory_read(seg_start_pa + next_chain_offset, >> +&sgec, sizeof(Mpt

<    1   2   3   >