[Qemu-devel] [PATCH]virtio: virtqueue_get_avail_bytes: fix desc_pa when loop over the indirect descriptor table

2013-08-21 Thread yinyin
virtqueue_get_avail_bytes: when found a indirect desc, we need loop over it. /* loop over the indirect descriptor table */ indirect = 1; max = vring_desc_len(desc_pa, i) / sizeof(VRingDesc); num_bufs = i = 0; desc_pa = vring_desc_addr(desc_pa,

Re: [Qemu-devel] [PULL 08/11] add "test-int128" and "test-bitops" to .gitignore

2013-08-21 Thread Markus Armbruster
Eric Blake writes: > On 08/21/2013 01:57 AM, Laszlo Ersek wrote: I think we could consolidate everything in tests/.gitignore. But can we do it as an incremental patch? It's a very small cosmetic thing to respin the series and my pull request. >>> >>> Sure, it's not a bug. >> >> Is

Re: [Qemu-devel] [PATCH] block: Fix race in gluster_finish_aiocb

2013-08-21 Thread Bharata B Rao
On Wed, Aug 21, 2013 at 05:40:11PM +0200, Paolo Bonzini wrote: > Il 21/08/2013 17:24, Stefan Hajnoczi ha scritto: > > On Wed, Aug 21, 2013 at 10:02:47AM +0800, Asias He wrote: > >> In block/gluster.c, we have > >> > >> gluster_finish_aiocb > >> { > >>if (retval != sizeof(acb)) { > >> qemu

Re: [Qemu-devel] [PATCH 2/2] vfio: Fix 128 bit handling

2013-08-21 Thread Paolo Bonzini
Il 22/08/2013 04:02, Alexey Kardashevskiy ha scritto: >> Int128 is opaque, please use int128_and. To build the constant you have >> three choices (from my preferred to IMHO worst): >> >> - add a new int128_exts64 function that sign-extends an int64_t > > Like this? I am really scared to screw her

Re: [Qemu-devel] [PATCH V8 01/11] NUMA: add NumaOptions, NumaNodeOptions and NumaMemOptions

2013-08-21 Thread Wanlong Gao
On 08/22/2013 10:29 AM, Eric Blake wrote: > On 08/21/2013 07:12 PM, Wanlong Gao wrote: > + '*mem':'str' }} >>> >>> Why is size passed as a 'str' instead of an integral type? If anything, >>> at the QMP layer, it should be an integer representing size in bytes >>> (the command line and

Re: [Qemu-devel] [PATCH V8 01/11] NUMA: add NumaOptions, NumaNodeOptions and NumaMemOptions

2013-08-21 Thread Eric Blake
On 08/21/2013 07:12 PM, Wanlong Gao wrote: >>> + '*mem':'str' }} >> >> Why is size passed as a 'str' instead of an integral type? If anything, >> at the QMP layer, it should be an integer representing size in bytes >> (the command line and HMP are already capable of converting shorthand >>

Re: [Qemu-devel] [PATCH 2/2] vfio: Fix 128 bit handling

2013-08-21 Thread Alexey Kardashevskiy
On 08/21/2013 08:07 PM, Paolo Bonzini wrote: > Il 21/08/2013 11:28, Alexey Kardashevskiy ha scritto: >> Upcoming VFIO on SPAPR PPC64 support will initialize the IOMMU >> memory region with UINT64_MAX (2^64 bytes) size so int128_get64() >> will assert. >> >> The patch takes care of this check. The e

Re: [Qemu-devel] [PATCH V8 01/11] NUMA: add NumaOptions, NumaNodeOptions and NumaMemOptions

2013-08-21 Thread Wanlong Gao
On 08/22/2013 04:59 AM, Eric Blake wrote: > On 08/19/2013 07:07 PM, Wanlong Gao wrote: >> Reviewed-by: Laszlo Ersek >> Signed-off-by: Wanlong Gao >> --- >> qapi-schema.json | 47 +++ >> 1 file changed, 47 insertions(+) >> > >> +## >> +# @NumaNodeOptio

Re: [Qemu-devel] [PATCH v3 11/24] cpu/a15mpcore: Embed GICState

2013-08-21 Thread Peter Maydell
On 20 August 2013 16:21, Andreas Färber wrote: > From: Andreas Färber > > This covers both emulated and KVM GIC. > @@ -35,40 +36,48 @@ typedef struct A15MPPrivState { > uint32_t num_cpu; > uint32_t num_irq; > MemoryRegion container; > -DeviceState *gic; > + > +GICState gic

Re: [Qemu-devel] [PATCH v3 00/24] arm: ARM11MPCore+A9MPCore+A15MPCore QOM'ification

2013-08-21 Thread Peter Maydell
On 20 August 2013 16:20, Andreas Färber wrote: > From: Andreas Färber > > Hello Peter, > > This series fully QOM'ifies A9MPCore so that it can be embedded for Tegra2. > It goes on to do the same for A15MPCore, which had previously been taken as > template for Cortex-A57 by John Rigby, and in v3 A

Re: [Qemu-devel] [PATCH V8 01/11] NUMA: add NumaOptions, NumaNodeOptions and NumaMemOptions

2013-08-21 Thread Eric Blake
On 08/19/2013 07:07 PM, Wanlong Gao wrote: > Reviewed-by: Laszlo Ersek > Signed-off-by: Wanlong Gao > --- > qapi-schema.json | 47 +++ > 1 file changed, 47 insertions(+) > > +## > +# @NumaNodeOptions > +# > +# Create a guest NUMA node. > +# > +# @nod

Re: [Qemu-devel] [PULL 08/11] add "test-int128" and "test-bitops" to .gitignore

2013-08-21 Thread Eric Blake
On 08/21/2013 01:57 AM, Laszlo Ersek wrote: >>> I think we could consolidate everything in tests/.gitignore. But can we >>> do it as an incremental patch? It's a very small cosmetic thing to respin >>> the series and my pull request. >> >> Sure, it's not a bug. > > Is it OK if I submit a patch mov

Re: [Qemu-devel] [pci PATCH v2 6/6] pc_piix: Kill pc_init1() memory region args

2013-08-21 Thread Michael S. Tsirkin
On Wed, Aug 21, 2013 at 03:14:45PM -0300, Eduardo Habkost wrote: > All callers always use the same values (get_system_memory(), > get_system_io()), so the parameters are pointless. > > If one day we decide to eliminate get_system_memory() and > get_system_io(), we will be able to do that more easi

Re: [Qemu-devel] [pci PATCH v2 0/6] pc init & compat function cleanup

2013-08-21 Thread Michael S. Tsirkin
On Wed, Aug 21, 2013 at 03:14:39PM -0300, Eduardo Habkost wrote: > Now sending the same series based on Michael's pci tree, to avoid conflicts, > and including 2 "don't prematurely explode QEMUMachineInitArgs" patches > from Markus. Looks good to me. Applied, thanks. > Eduardo Habkost (4): > pc

Re: [Qemu-devel] [PATCH v4 0/6] Clean up bogus default boot order

2013-08-21 Thread Michael S. Tsirkin
On Fri, Aug 16, 2013 at 01:13:44PM +0200, arm...@redhat.com wrote: > From: Markus Armbruster > > The first five patches are admittedly related to the stated purpose of > this series pretty much only by "I can't stand perpetuating this > stupid crap". Max Filippov and Peter Maydell already cleane

Re: [Qemu-devel] [PATCH v4 0/6] Clean up bogus default boot order

2013-08-21 Thread Michael S. Tsirkin
On Wed, Aug 21, 2013 at 11:28:33PM +0300, Michael S. Tsirkin wrote: > On Fri, Aug 16, 2013 at 01:13:44PM +0200, arm...@redhat.com wrote: > > From: Markus Armbruster > > > > The first five patches are admittedly related to the stated purpose of > > this series pretty much only by "I can't stand pe

Re: [Qemu-devel] TCG jumping inside translation block

2013-08-21 Thread Richard Henderson
On 08/21/2013 06:02 AM, Schrober wrote: > Is qemu just recompiling the block again when it encounters a different entry > point to an already translated block? I am currently starring at the code in > translate-all.c and cpu-exec.c and don't seem to find the right part of the > code which would

Re: [Qemu-devel] [PATCH v2 2/2] osdep: warn if opening a file O_DIRECT on tmpfs fails

2013-08-21 Thread Doug Goldstein
On Wed, Aug 21, 2013 at 9:08 AM, Markus Armbruster wrote: > Stefan Hajnoczi writes: > > > Print a warning when opening a file O_DIRECT on tmpfs fails. This saves > > Only when it fails with EINVAL, actually. Suggest "on tmpfs fails with > EINVAL." > > > users a lot of time trying to figure out

Re: [Qemu-devel] VNC key presses not correct

2013-08-21 Thread Erik Rull
Markus Armbruster wrote: Erik Rull writes: Hi all, I'm struggling with the QEMU VNC on qemu-kvm-1.2.0 a bit, the following two things are not working properly: Have you tried to reproduce on a current version? Hello Markus, yes, I was able to reproduce this with the released qemu-1.6.0

Re: [Qemu-devel] [PATCH v2 2/2] osdep: warn if opening a file O_DIRECT on tmpfs fails

2013-08-21 Thread Eric Blake
On 08/21/2013 07:16 AM, Stefan Hajnoczi wrote: > Print a warning when opening a file O_DIRECT on tmpfs fails. This saves > users a lot of time trying to figure out the EINVAL error. > > Daniel P. Berrange suggested opening the file > without O_DIRECT as a portable way to check whether the file s

Re: [Qemu-devel] [PATCH] sun4m: Add FCode ROM for TCX framebuffer

2013-08-21 Thread Mark Cave-Ayland
On 21/08/13 18:54, Andreas Färber wrote: Shouldn't this blob come in the same patch as an update to some git module, so that we keep track of the sources used to build the blob? I concur. Independent of how to order the .gitmodules update, this patch is missing Makefile support to actually cop

Re: [Qemu-devel] Cross-Platform KVM

2013-08-21 Thread Andreas Färber
Hi, Am 16.08.2013 09:41, schrieb Wincy Van: > Hi,there: > >I have implemented a version of cross-platform KVM. Now, it can > works on Linux and Windows(kernel version 7600-9200, amd64). Is it > useful? If so, I want make it as a branch of current KVM. Here are some > screenshots: Let's C

Re: [Qemu-devel] [RFC PATCH 3/4] qmp: Add "snapshot=" option to nbd-server-add

2013-08-21 Thread Eric Blake
On 07/28/2013 10:25 PM, Fam Zheng wrote: > With drive-backup block job, we can have a point-in-time snapshot of a > device. With snapshot=on, a backup block job is started on the device to > do CoW to a temporary image and this image is exported to nbd. The image > is deleted after nbd server stops

Re: [Qemu-devel] [RFC PATCH 3/4] qmp: Add "snapshot=" option to nbd-server-add

2013-08-21 Thread Eric Blake
On 08/21/2013 07:02 AM, Stefan Hajnoczi wrote: >> + >> +ret = bdrv_create(drv, filename, options); > > This is handy but only works if the QEMU process has permission to > create temporary files. And in the case of libvirt driving qemu under sVirt, qemu does NOT have permission to create tem

Re: [Qemu-devel] [RFC PATCH 1/4] block/backup: delete target after completion callback

2013-08-21 Thread Eric Blake
On 07/28/2013 10:25 PM, Fam Zheng wrote: > Move bdrv_delete(target) one line down to give block job caller a chance > to handle target on completion before deleting it. > > Signed-off-by: Fam Zheng > --- > block/backup.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Eric

Re: [Qemu-devel] [RFC PATCH v2 0/3] Start fixing the pvpanic mess

2013-08-21 Thread Daniel P. Berrange
On Wed, Aug 21, 2013 at 06:51:11PM +0200, Paolo Bonzini wrote: > Il 21/08/2013 18:48, Daniel P. Berrange ha scritto: > > No, is the right thing to be using for this from > > libvirt's pov & I don't think we should invent something new. > > The element has always been intended to represent > > han

[Qemu-devel] [pci PATCH v2 3/6] pc: Kill pc_init_pci_1_0()

2013-08-21 Thread Eduardo Habkost
The pc_init_pci_1_2()/pc_init_pci_1_0() split was made on commit 6fd028f64f662c801fd5a54d0e3a1d2baeee93ea, in preparation for commit 9953f8822cc316eec9962f0a2858c3439a80adec. The latter was reverted, so there's no reason to keep two separate functions that do exactly the same, anymore. Signed-off-

[Qemu-devel] [pci PATCH v2 6/6] pc_piix: Kill pc_init1() memory region args

2013-08-21 Thread Eduardo Habkost
All callers always use the same values (get_system_memory(), get_system_io()), so the parameters are pointless. If one day we decide to eliminate get_system_memory() and get_system_io(), we will be able to do that more easily by adding the values to struct QEMUMachineInitArgs. Signed-off-by: Edua

[Qemu-devel] [pci PATCH v2 4/6] pc: Create pc_compat_*() functions

2013-08-21 Thread Eduardo Habkost
Making the older compat functions call the newer compat functions at the beginning allows the older functions undo what's done by newer compat functions. e.g.: pc_compat_1_4() will be able to call pc_compat_1_5() and then set has_pvpanic=false. Signed-off-by: Eduardo Habkost --- hw/i386/pc_piix.

[Qemu-devel] [pci PATCH v2 1/6] pc: Don't prematurely explode QEMUMachineInitArgs

2013-08-21 Thread Eduardo Habkost
From: Markus Armbruster Don't explode QEMUMachineInitArgs before passing it to pc_init1(). Signed-off-by: Markus Armbruster Reviewed-by: Laszlo Ersek Reviewed-by: Eduardo Habkost --- hw/i386/pc_piix.c | 65 ++- 1 file changed, 16 insertions

[Qemu-devel] [pci PATCH v2 5/6] pc: pc_compat_1_4() now can call pc_compat_1_5()

2013-08-21 Thread Eduardo Habkost
It just needs to set has_pvpanic=false after calling it. This way, it won't be a special case anymore. Signed-off-by: Eduardo Habkost --- hw/i386/pc_piix.c | 4 ++-- hw/i386/pc_q35.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c i

[Qemu-devel] [pci PATCH v2 0/6] pc init & compat function cleanup

2013-08-21 Thread Eduardo Habkost
Now sending the same series based on Michael's pci tree, to avoid conflicts, and including 2 "don't prematurely explode QEMUMachineInitArgs" patches from Markus. Eduardo Habkost (4): pc: Kill pc_init_pci_1_0() pc: Create pc_compat_*() functions pc: pc_compat_1_4() now can call pc_compat_1_5(

[Qemu-devel] [pci PATCH v2 2/6] pc: Don't explode QEMUMachineInitArgs into local variables needlessly

2013-08-21 Thread Eduardo Habkost
From: Markus Armbruster Don't explode when the variable is used just a few times, and never changed. Signed-off-by: Markus Armbruster Reviewed-by: Laszlo Ersek Reviewed-by: Eduardo Habkost --- hw/i386/pc_q35.c | 22 +- 1 file changed, 9 insertions(+), 13 deletions(-) dif

Re: [Qemu-devel] [PATCH v4 2/6] pc: Don't explode QEMUMachineInitArgs into local variables needlessly

2013-08-21 Thread Eduardo Habkost
On Fri, Aug 16, 2013 at 01:13:46PM +0200, arm...@redhat.com wrote: > From: Markus Armbruster > > Don't explode when the variable is used just a few times, and never > changed. > > Signed-off-by: Markus Armbruster Reviewed-by: Eduardo Habkost -- Eduardo

Re: [Qemu-devel] [PATCH v4 1/6] pc: Don't prematurely explode QEMUMachineInitArgs

2013-08-21 Thread Eduardo Habkost
On Fri, Aug 16, 2013 at 01:13:45PM +0200, arm...@redhat.com wrote: > From: Markus Armbruster > > Don't explode QEMUMachineInitArgs before passing it to pc_init1(). > > Signed-off-by: Markus Armbruster Reviewed-by: Eduardo Habkost -- Eduardo

Re: [Qemu-devel] [PULL 06/18] aio: stop using .io_flush()

2013-08-21 Thread Stefan Weil
Hi Stefan, this patch was committed yesterday. It breaks MinGW builds: aio-win32.c: In function ‘aio_poll’: aio-win32.c:128:21: error: ‘AioHandler’ has no member named ‘opaque’ aio-win32.c:191:25: error: ‘AioHandler’ has no member named ‘opaque’ Regards, Stefan Am 19.08.2013 16:17, schrieb Ste

Re: [Qemu-devel] [PATCH] sun4m: Add FCode ROM for TCX framebuffer

2013-08-21 Thread Andreas Färber
Am 21.08.2013 00:41, schrieb Peter Maydell: > On 20 August 2013 23:25, Mark Cave-Ayland > wrote: >> Upstream OpenBIOS now implements SBus probing in order to determine the >> contents of a physical bus slot, which is required to allow OpenBIOS to >> identify the framebuffer without help from the

Re: [Qemu-devel] [PATCH 3/3] pvpanic: rename to isa-pvpanic

2013-08-21 Thread Paolo Bonzini
Il 21/08/2013 19:35, Andreas Färber ha scritto: > Am 21.08.2013 19:01, schrieb Michael S. Tsirkin: >> On Wed, Aug 21, 2013 at 06:43:16PM +0200, Paolo Bonzini wrote: >>> The pvpanic situation is already messed up enough. Let us give our >>> libvirt friends an easy indication that we have untied our

Re: [Qemu-devel] [PATCH v3 6/6] hw: Clean up bogus default boot order

2013-08-21 Thread Michael S. Tsirkin
On Wed, Aug 21, 2013 at 06:01:45PM +0200, Markus Armbruster wrote: > "Michael S. Tsirkin" writes: > > > On Wed, Aug 21, 2013 at 05:10:56PM +0200, Markus Armbruster wrote: > >> "Michael S. Tsirkin" writes: > >> > >> > On Mon, Jul 22, 2013 at 01:38:47PM +0200, Markus Armbruster wrote: > >> >> We

Re: [Qemu-devel] [PATCH 2/3] pc: get rid of builtin pvpanic

2013-08-21 Thread Michael S. Tsirkin
On Wed, Aug 21, 2013 at 06:43:15PM +0200, Paolo Bonzini wrote: > It is a source of pain, and the previous patch anyway changed the > behavior of "-M pc-1.5" compared to the real 1.5. > > This also makes it clear that "-device pvpanic" is not enough: > it will not expose pvpanic in fw_cfg properly.

Re: [Qemu-devel] [PATCH 3/3] pvpanic: rename to isa-pvpanic

2013-08-21 Thread Andreas Färber
Am 21.08.2013 19:01, schrieb Michael S. Tsirkin: > On Wed, Aug 21, 2013 at 06:43:16PM +0200, Paolo Bonzini wrote: >> The pvpanic situation is already messed up enough. Let us give our >> libvirt friends an easy indication that we have untied our side. >> >> Not-yet-signed-off-by: Paolo Bonzini >>

Re: [Qemu-devel] [RFC PATCH v2 0/3] Start fixing the pvpanic mess

2013-08-21 Thread Paolo Bonzini
Il 21/08/2013 19:26, Michael S. Tsirkin ha scritto: > This is a QEMU bug that you happened to be Cc'd on. Michael, this is bullshit and you know. I know you're more intelligent than this. Stop it, please. Paolo

Re: [Qemu-devel] [PATCH 3/3] pvpanic: rename to isa-pvpanic

2013-08-21 Thread Michael S. Tsirkin
On Wed, Aug 21, 2013 at 07:06:21PM +0200, Paolo Bonzini wrote: > Il 21/08/2013 19:07, Michael S. Tsirkin ha scritto: > > On Wed, Aug 21, 2013 at 07:01:39PM +0200, Paolo Bonzini wrote: > >> Il 21/08/2013 19:01, Michael S. Tsirkin ha scritto: > > The pvpanic situation is already messed up enough.

Re: [Qemu-devel] [RFC PATCH v2 0/3] Start fixing the pvpanic mess

2013-08-21 Thread Michael S. Tsirkin
On Wed, Aug 21, 2013 at 11:02:56AM -0600, Eric Blake wrote: > On 08/21/2013 10:51 AM, Paolo Bonzini wrote: > > Il 21/08/2013 18:48, Daniel P. Berrange ha scritto: > >> No, is the right thing to be using for this from > >> libvirt's pov & I don't think we should invent something new. > >> The elem

Re: [Qemu-devel] [RFC PATCH v2 0/3] Start fixing the pvpanic mess

2013-08-21 Thread Paolo Bonzini
Il 21/08/2013 18:55, Daniel P. Berrange ha scritto: > On Wed, Aug 21, 2013 at 06:51:11PM +0200, Paolo Bonzini wrote: >> Il 21/08/2013 18:48, Daniel P. Berrange ha scritto: >>> No, is the right thing to be using for this from >>> libvirt's pov & I don't think we should invent something new. >>> The

Re: [Qemu-devel] [RFC PATCH v2 0/3] Start fixing the pvpanic mess

2013-08-21 Thread Paolo Bonzini
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Il 21/08/2013 19:10, Eric Blake ha scritto: > On 08/21/2013 10:56 AM, Paolo Bonzini wrote: >>> eg it is valid to have present in the XML at all >>> times, even if there's no pvpanic device present. That simply >>> means the actions will never be tri

Re: [Qemu-devel] [RFC PATCH v2 0/3] Start fixing the pvpanic mess

2013-08-21 Thread Paolo Bonzini
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Il 21/08/2013 19:02, Eric Blake ha scritto: > So, this boils down to a question of what SHOULD the valid states > for be? Generically, we want > destroy to not invalidate a guest, but also to > not instantiate a pvpanic device; since that covers the

Re: [Qemu-devel] [RFC PATCH v2 0/3] Start fixing the pvpanic mess

2013-08-21 Thread Eric Blake
On 08/21/2013 10:56 AM, Paolo Bonzini wrote: >> eg it is valid to have present in the XML at all >> times, even if there's no pvpanic device present. That simply >> means the actions will never be triggered. > > So are you suggesting to add a element to ? That > may be fine, but it doesn't seem

Re: [Qemu-devel] [PATCH 2/3] pc: get rid of builtin pvpanic

2013-08-21 Thread Andreas Färber
Am 21.08.2013 19:02, schrieb Paolo Bonzini: > Il 21/08/2013 19:03, Michael S. Tsirkin ha scritto: It is a source of pain, and the previous patch anyway changed the behavior of "-M pc-1.5" compared to the real 1.5. This also makes it clear that "-device pvpanic" is not enough: >>

Re: [Qemu-devel] [PATCH 3/3] pvpanic: rename to isa-pvpanic

2013-08-21 Thread Paolo Bonzini
Il 21/08/2013 19:07, Michael S. Tsirkin ha scritto: > On Wed, Aug 21, 2013 at 07:01:39PM +0200, Paolo Bonzini wrote: >> Il 21/08/2013 19:01, Michael S. Tsirkin ha scritto: > The pvpanic situation is already messed up enough. Let us give our > libvirt friends an easy indication that we have

Re: [Qemu-devel] [PATCH] sun4m: Add FCode ROM for TCX framebuffer

2013-08-21 Thread Peter Maydell
On 21 August 2013 17:29, Mark Cave-Ayland wrote: > On 21/08/13 16:34, Peter Maydell wrote: > >>> Unfortunately the OpenBIOS repository is still based in SVN :( There is >>> a >>> git-svn mirror on git.qemu.org, but currently it needs to be manually >>> updated and so is generally not particularly

Re: [Qemu-devel] [PATCH 3/3] pvpanic: rename to isa-pvpanic

2013-08-21 Thread Michael S. Tsirkin
On Wed, Aug 21, 2013 at 07:01:39PM +0200, Paolo Bonzini wrote: > Il 21/08/2013 19:01, Michael S. Tsirkin ha scritto: > >> > The pvpanic situation is already messed up enough. Let us give our > >> > libvirt friends an easy indication that we have untied our side. > >> > > >> > Not-yet-signed-off-b

Re: [Qemu-devel] [RFC PATCH v2 0/3] Start fixing the pvpanic mess

2013-08-21 Thread Eric Blake
On 08/21/2013 10:51 AM, Paolo Bonzini wrote: > Il 21/08/2013 18:48, Daniel P. Berrange ha scritto: >> No, is the right thing to be using for this from >> libvirt's pov & I don't think we should invent something new. >> The element has always been intended to represent >> handling of guest panics,

Re: [Qemu-devel] [PATCH 2/3] pc: get rid of builtin pvpanic

2013-08-21 Thread Michael S. Tsirkin
On Wed, Aug 21, 2013 at 08:03:58PM +0300, Michael S. Tsirkin wrote: > On Wed, Aug 21, 2013 at 06:43:15PM +0200, Paolo Bonzini wrote: > > It is a source of pain, and the previous patch anyway changed the > > behavior of "-M pc-1.5" compared to the real 1.5. > > > > This also makes it clear that "-d

Re: [Qemu-devel] [PATCH 2/3] pc: get rid of builtin pvpanic

2013-08-21 Thread Paolo Bonzini
Il 21/08/2013 19:03, Michael S. Tsirkin ha scritto: >> > It is a source of pain, and the previous patch anyway changed the >> > behavior of "-M pc-1.5" compared to the real 1.5. >> > >> > This also makes it clear that "-device pvpanic" is not enough: >> > it will not expose pvpanic in fw_cfg prope

Re: [Qemu-devel] [PATCH 3/3] pvpanic: rename to isa-pvpanic

2013-08-21 Thread Paolo Bonzini
Il 21/08/2013 19:01, Michael S. Tsirkin ha scritto: >> > The pvpanic situation is already messed up enough. Let us give our >> > libvirt friends an easy indication that we have untied our side. >> > >> > Not-yet-signed-off-by: Paolo Bonzini >> > ... because we first have to determine how to expo

Re: [Qemu-devel] [PATCH 2/3] pc: get rid of builtin pvpanic

2013-08-21 Thread Michael S. Tsirkin
On Wed, Aug 21, 2013 at 06:43:15PM +0200, Paolo Bonzini wrote: > It is a source of pain, and the previous patch anyway changed the > behavior of "-M pc-1.5" compared to the real 1.5. > > This also makes it clear that "-device pvpanic" is not enough: > it will not expose pvpanic in fw_cfg properly.

Re: [Qemu-devel] [PATCH 3/3] pvpanic: rename to isa-pvpanic

2013-08-21 Thread Michael S. Tsirkin
On Wed, Aug 21, 2013 at 06:43:16PM +0200, Paolo Bonzini wrote: > The pvpanic situation is already messed up enough. Let us give our > libvirt friends an easy indication that we have untied our side. > > Not-yet-signed-off-by: Paolo Bonzini > ... because we first have to determine how to expose t

Re: [Qemu-devel] [RFC PATCH v2 0/3] Start fixing the pvpanic mess

2013-08-21 Thread Paolo Bonzini
Il 21/08/2013 18:48, Daniel P. Berrange ha scritto: > No, is the right thing to be using for this from > libvirt's pov & I don't think we should invent something new. > The element has always been intended to represent > handling of guest panics, not qemu internal errors. Actually for Xen HVM gu

Re: [Qemu-devel] [RFC PATCH v2 0/3] Start fixing the pvpanic mess

2013-08-21 Thread Daniel P. Berrange
On Wed, Aug 21, 2013 at 06:43:13PM +0200, Paolo Bonzini wrote: > The pvpanic mess is even bigger than anticipated. Let's fix the monitor's > behavior (patch 1), get rid of all traces that the broken pvpanic existed > (patch 2), and give it a new name so that libvirt can detect a design > that work

[Qemu-devel] [PATCH 2/3] pc: get rid of builtin pvpanic

2013-08-21 Thread Paolo Bonzini
It is a source of pain, and the previous patch anyway changed the behavior of "-M pc-1.5" compared to the real 1.5. This also makes it clear that "-device pvpanic" is not enough: it will not expose pvpanic in fw_cfg properly. No idea how to fix that. Signed-off-by: Paolo Bonzini --- hw/i386/pc

[Qemu-devel] [PATCH 3/3] pvpanic: rename to isa-pvpanic

2013-08-21 Thread Paolo Bonzini
The pvpanic situation is already messed up enough. Let us give our libvirt friends an easy indication that we have untied our side. Not-yet-signed-off-by: Paolo Bonzini ... because we first have to determine how to expose the device's existence in the ACPI tables or in fw_cfg. Signed-off-by

[Qemu-devel] [PATCH qom-cpu/arm-devs] hw/cpu/a15mpcore: Use qemu_get_cpu() for generic timers

2013-08-21 Thread Andreas Färber
This simplifies the loop and aids with refactoring of CPU list. Requested-by: Peter Maydell Signed-off-by: Andreas Färber --- hw/cpu/a15mpcore.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/cpu/a15mpcore.c b/hw/cpu/a15mpcore.c index af182da..9abba67 100644 --- a/h

[Qemu-devel] [PATCH 1/3] vl: allow "cont" from panicked state

2013-08-21 Thread Paolo Bonzini
After reporting the GUEST_PANICKED monitor event, QEMU stops the VM. The reason for this is that events are edge-triggered, and can be lost if management dies at the wrong time. Stopping a panicked VM lets management know of a panic even if it has crashed; management can learn about the panic when

[Qemu-devel] [RFC PATCH v2 0/3] Start fixing the pvpanic mess

2013-08-21 Thread Paolo Bonzini
The pvpanic mess is even bigger than anticipated. Let's fix the monitor's behavior (patch 1), get rid of all traces that the broken pvpanic existed (patch 2), and give it a new name so that libvirt can detect a design that works (patch 3). All downstreams are urged to apply patches 1+2 as soon as

Re: [Qemu-devel] [PATCH qom-cpu for-next 1/2] cpu: Use QTAILQ for CPU list

2013-08-21 Thread Andreas Färber
Am 21.08.2013 16:36, schrieb Peter Maydell: > On 21 August 2013 15:12, Andreas Färber wrote: > >> -for (i = 0, cpu = first_cpu; i < s->num_cpu; i++, cpu = >> cpu->next_cpu) { >> +i = 0; >> +CPU_FOREACH(cpu) { >> DeviceState *cpudev = DEVICE(cpu); >> int ppibase = s->

Re: [Qemu-devel] [PATCH] sun4m: Add FCode ROM for TCX framebuffer

2013-08-21 Thread Mark Cave-Ayland
On 21/08/13 16:34, Peter Maydell wrote: Unfortunately the OpenBIOS repository is still based in SVN :( There is a git-svn mirror on git.qemu.org, but currently it needs to be manually updated and so is generally not particularly helpful. For the 1.6 release I got Anthony to manually update the

[Qemu-devel] [PATCHv13 20/31] aio / timers: Add documentation and new format calls

2013-08-21 Thread Alex Bligh
Add documentation for existing qemu timer calls. Add new format calls of the format timer_XXX rather than qemu_XXX_timer for consistency. Signed-off-by: Alex Bligh --- include/qemu/timer.h | 206 -- 1 file changed, 184 insertions(+), 22 deletions(

[Qemu-devel] [PATCHv13 09/31] aio / timers: Untangle include files

2013-08-21 Thread Alex Bligh
include/qemu/timer.h has no need to include main-loop.h and doing so causes an issue for the next patch. Unfortunately various files assume including timers.h will pull in main-loop.h. Untangle this mess. Signed-off-by: Alex Bligh --- dma-helpers.c |1 + hw/dma/xilinx_axidma.c

[Qemu-devel] [PATCHv13 22/31] aio / timers: Remove legacy qemu_clock_deadline & qemu_timerlist_deadline

2013-08-21 Thread Alex Bligh
Remove qemu_clock_deadline and qemu_timerlist_deadline now we are using the ns functions throughout. Signed-off-by: Alex Bligh --- include/qemu/timer.h | 16 qemu-timer.c | 20 2 files changed, 36 deletions(-) diff --git a/include/qemu/timer.h b

Re: [Qemu-devel] [PATCH 11/18] migration: introduce capability localhost

2013-08-21 Thread Paolo Bonzini
Il 21/08/2013 09:18, Lei Li ha scritto: > } else if (strstart(uri, "unix:", &p)) { > +if (s->enabled_capabilities[MIGRATION_CAPABILITY_LOCALHOST]) { > +local_start_outgoing_migration(s, p, &local_err); > +} > unix_start_outgoing_migration(s, p, &local_err);

Re: [Qemu-devel] [PATCH v3 6/6] hw: Clean up bogus default boot order

2013-08-21 Thread Markus Armbruster
"Michael S. Tsirkin" writes: > On Wed, Aug 21, 2013 at 05:10:56PM +0200, Markus Armbruster wrote: >> "Michael S. Tsirkin" writes: >> >> > On Mon, Jul 22, 2013 at 01:38:47PM +0200, Markus Armbruster wrote: >> >> We set default boot order "cad" in every single machine definition >> >> except "pse

[Qemu-devel] [PATCHv13 12/31] aio / timers: Add a notify callback to QEMUTimerList

2013-08-21 Thread Alex Bligh
Add a notify pointer to QEMUTimerList so it knows what to notify on a timer change. Signed-off-by: Alex Bligh --- async.c |7 ++- include/qemu/timer.h | 27 +++ qemu-timer.c | 31 --- 3 files changed, 53 inserti

[Qemu-devel] [PATCHv13 17/31] aio / timers: On timer modification, qemu_notify or aio_notify

2013-08-21 Thread Alex Bligh
On qemu_mod_timer_ns, ensure qemu_notify or aio_notify is called to end the appropriate poll(), irrespective of use_icount value. On qemu_clock_enable, ensure qemu_notify or aio_notify is called for all QEMUTimerLists attached to the QEMUClock. Signed-off-by: Alex Bligh --- include/qemu/timer.h

Re: [Qemu-devel] [PATCH] block: Introduce bs->zero_beyond_eof

2013-08-21 Thread Stefan Hajnoczi
On Wed, Aug 21, 2013 at 04:26:04PM +0800, Asias He wrote: > @@ -868,6 +868,7 @@ int bdrv_file_open(BlockDriverState **pbs, const char > *filename, > QDECREF(options); > > bs->growable = 1; > +bs->zero_beyond_eof = true; > *pbs = bs; > return 0; > > @@ -978,6 +979,7 @@ i

Re: [Qemu-devel] [PATCH] vl: allow "cont" from panicked state

2013-08-21 Thread Michael S. Tsirkin
On Wed, Aug 21, 2013 at 05:32:27PM +0200, Paolo Bonzini wrote: > Il 21/08/2013 17:23, Eric Blake ha scritto: > >> Upon learning of a panic, management (if configured to do so) can pick a > >> variety of behaviors: leave the VM paused, reset it, destroy it. In > >> addition to all of these behavior

[Qemu-devel] [PATCHv13 25/31] aio / timers: Remove main_loop_timerlist

2013-08-21 Thread Alex Bligh
Now we have timerlistgroups implemented and main_loop_tlg, we no longer need the concept of a default timer list associated with each clock. Remove it and simplify initialisation of clocks and timer lists. Signed-off-by: Alex Bligh --- include/qemu/timer.h |6 + qemu-timer.c |

Re: [Qemu-devel] [PATCH] block: Fix race in gluster_finish_aiocb

2013-08-21 Thread Paolo Bonzini
Il 21/08/2013 17:24, Stefan Hajnoczi ha scritto: > On Wed, Aug 21, 2013 at 10:02:47AM +0800, Asias He wrote: >> In block/gluster.c, we have >> >> gluster_finish_aiocb >> { >>if (retval != sizeof(acb)) { >> qemu_mutex_lock_iothread(); /* We are in gluster thread context */ >> ... >>

Re: [Qemu-devel] [PATCH v4 07/13] block: vhdx - log parsing, replay, and flush support

2013-08-21 Thread Jeff Cody
On Wed, Aug 21, 2013 at 05:09:30PM +0200, Stefan Hajnoczi wrote: > On Tue, Aug 20, 2013 at 02:01:18AM -0400, Jeff Cody wrote: > > Will require more iterations of review, but here's what I have so far: > Yeah, I assumed it would take a few iterations of review. > > +/* Returns true if the GUID i

Re: [Qemu-devel] [PATCH] sun4m: Add FCode ROM for TCX framebuffer

2013-08-21 Thread Peter Maydell
On 21 August 2013 15:44, Mark Cave-Ayland wrote: > On 20/08/13 23:41, Peter Maydell wrote: >> Shouldn't this blob come in the same patch as an update to some >> git module, so that we keep track of the sources used to build >> the blob? > Unfortunately the OpenBIOS repository is still based in SV

Re: [Qemu-devel] [PATCH] vl: allow "cont" from panicked state

2013-08-21 Thread Paolo Bonzini
Il 21/08/2013 16:58, Michael S. Tsirkin ha scritto: > On Wed, Aug 21, 2013 at 04:37:56PM +0200, Paolo Bonzini wrote: >> Il 21/08/2013 16:30, Michael S. Tsirkin ha scritto: I think the same reasoning went behind the PANICKED state, and for most cases it's going to be disastrous to put the

Re: [Qemu-devel] [PATCH] vl: allow "cont" from panicked state

2013-08-21 Thread Paolo Bonzini
Il 21/08/2013 17:23, Eric Blake ha scritto: >> Upon learning of a panic, management (if configured to do so) can pick a >> variety of behaviors: leave the VM paused, reset it, destroy it. In >> addition to all of these behaviors, it is possible dumping the VM core >> from the host. > > s/possible

Re: [Qemu-devel] TCG jumping inside translation block

2013-08-21 Thread Peter Maydell
On 21 August 2013 14:02, Schrober wrote: > Is qemu just recompiling the block again when it encounters a different entry > point to an already translated block? Yes. We only use a previously translated block if it matches all of: * starts at the PC we want to execute * same flags (CPU-specific,

[Qemu-devel] [PATCHv13 13/31] aio / timers: aio_ctx_prepare sets timeout from AioContext timers

2013-08-21 Thread Alex Bligh
Calculate the timeout in aio_ctx_prepare taking into account the timers attached to the AioContext. Alter aio_ctx_check similarly. Signed-off-by: Alex Bligh --- async.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/async.c b/async.c index cff0ab9..5fb3fa6 1

Re: [Qemu-devel] [PATCH] block: Fix race in gluster_finish_aiocb

2013-08-21 Thread Stefan Hajnoczi
On Wed, Aug 21, 2013 at 10:02:47AM +0800, Asias He wrote: > In block/gluster.c, we have > > gluster_finish_aiocb > { >if (retval != sizeof(acb)) { > qemu_mutex_lock_iothread(); /* We are in gluster thread context */ > ... > qemu_mutex_unlock_iothread(); >} > } > > qemu t

Re: [Qemu-devel] [PATCH] vl: allow "cont" from panicked state

2013-08-21 Thread Eric Blake
On 08/21/2013 06:01 AM, Paolo Bonzini wrote: > After reporting the GUEST_PANICKED monitor event, QEMU stops the VM. > The reason for this is that events are edge-triggered, and can be lost if > management dies at the wrong time. Stopping a panicked VM lets management > know of a panic even if it h

[Qemu-devel] [PATCHv13 16/31] aio / timers: Convert mainloop to use timeout

2013-08-21 Thread Alex Bligh
Convert mainloop to use timeout from default timerlist group (i.e. the current 3 static timers) main-loop.c produces a (possibly spurious) warning about multiple iterations. Adapt the way this works for a signed timeout and make the warning a bit safer. Signed-off-by: Alex Bligh --- main-loop.c

Re: [Qemu-devel] [PATCH v3 6/6] hw: Clean up bogus default boot order

2013-08-21 Thread Michael S. Tsirkin
On Wed, Aug 21, 2013 at 05:10:56PM +0200, Markus Armbruster wrote: > "Michael S. Tsirkin" writes: > > > On Mon, Jul 22, 2013 at 01:38:47PM +0200, Markus Armbruster wrote: > >> We set default boot order "cad" in every single machine definition > >> except "pseries" and "moxiesim", even though very

[Qemu-devel] [PATCHv13 21/31] aio / timers: Remove alarm timers

2013-08-21 Thread Alex Bligh
Remove alarm timers from qemu-timers.c now we use g_poll / ppoll instead. Signed-off-by: Alex Bligh --- include/qemu/timer.h |3 - main-loop.c |4 - qemu-timer.c | 500 +- vl.c |4 +- 4 files changed, 4

Re: [Qemu-devel] [PATCH 11/18] migration: introduce capability localhost

2013-08-21 Thread Eric Blake
On 08/21/2013 01:18 AM, Lei Li wrote: > Introduce migration capability localhost. > > Signed-off-by: Lei Li > --- > include/migration/migration.h |3 +++ > migration.c | 12 > qapi-schema.json |8 +++- > 3 files changed, 22 insertions(+),

[Qemu-devel] [PATCHv13 15/31] aio / timers: Convert aio_poll to use AioContext timers' deadline

2013-08-21 Thread Alex Bligh
Convert aio_poll to use deadline based on AioContext's timers. aio_poll has been changed to return accurately whether progress has occurred. Prior to this commit, aio_poll always returned true if g_poll was entered, whether or not any progress was made. This required a change to tests/test-aio.c w

Re: [Qemu-devel] [PATCH v2 2/2] osdep: warn if opening a file O_DIRECT on tmpfs fails

2013-08-21 Thread Eric Blake
On 08/21/2013 07:16 AM, Stefan Hajnoczi wrote: > Print a warning when opening a file O_DIRECT on tmpfs fails. This saves > users a lot of time trying to figure out the EINVAL error. > > Daniel P. Berrange suggested opening the file > without O_DIRECT as a portable way to check whether the file s

[Qemu-devel] [PATCHv13 24/31] aio / timers: Rearrange timer.h & make legacy functions call non-legacy

2013-08-21 Thread Alex Bligh
Rearrange timer.h so it is in order by function type. Make legacy functions call non-legacy functions rather than vice-versa. Convert cpus.c to use new API. Signed-off-by: Alex Bligh --- cpus.c | 112 - hw/acpi/piix4.c |2 +- hw/input/tsc2005.c |4 +- hw/i

Re: [Qemu-devel] [PATCH v3 6/6] hw: Clean up bogus default boot order

2013-08-21 Thread Markus Armbruster
"Michael S. Tsirkin" writes: > On Mon, Jul 22, 2013 at 01:38:47PM +0200, Markus Armbruster wrote: >> We set default boot order "cad" in every single machine definition >> except "pseries" and "moxiesim", even though very few boards actually >> care for boot order, and "cad" makes sense for even f

[Qemu-devel] [PATCHv13 26/31] aio / timers: Convert rtc_clock to be a QEMUClockType

2013-08-21 Thread Alex Bligh
Convert rtc_clock to be a QEMUClockType Move rtc_clock users to use the new API Signed-off-by: Alex Bligh --- hw/arm/omap1.c|4 ++-- hw/arm/pxa2xx.c | 35 +++ hw/arm/strongarm.c| 10 +- hw/timer/m48t59.c |

[Qemu-devel] [PATCHv13 29/31] aio / timers: Add scripts/switch-timer-api

2013-08-21 Thread Alex Bligh
Add scripts/switch-timer-api to programatically rewrite source files to use the new timer system. Signed-off-by: Alex Bligh --- scripts/switch-timer-api | 178 ++ 1 file changed, 178 insertions(+) diff --git a/scripts/switch-timer-api b/scripts/switc

[Qemu-devel] [PATCHv13 31/31] aio / timers: Remove legacy interface

2013-08-21 Thread Alex Bligh
Remove the legacy interface from include/qemu/timers.h. Ensure struct QEMUClock is not exposed at all. Signed-off-by: Alex Bligh --- include/qemu/timer.h | 214 +- qemu-timer.c | 35 + 2 files changed, 5 insertions(+), 244 delet

[Qemu-devel] [PATCHv13 08/31] aio / timers: Split QEMUClock into QEMUClock and QEMUTimerList

2013-08-21 Thread Alex Bligh
Split QEMUClock into QEMUClock and QEMUTimerList so that we can have more than one QEMUTimerList associated with the same clock. Introduce a main_loop_timerlist concept and make existing qemu_clock_* calls that actually should operate on a QEMUTimerList call the relevant QEMUTimerList implementati

[Qemu-devel] [PATCHv13 18/31] aio / timers: Introduce new API timer_new and friends

2013-08-21 Thread Alex Bligh
Introduce new API for creating timers - timer_new and _ns, _ms, _us derivatives. Signed-off-by: Alex Bligh --- include/qemu/timer.h | 69 ++ 1 file changed, 69 insertions(+) diff --git a/include/qemu/timer.h b/include/qemu/timer.h index 619b7a2.

Re: [Qemu-devel] [PATCH v4 07/13] block: vhdx - log parsing, replay, and flush support

2013-08-21 Thread Stefan Hajnoczi
On Tue, Aug 20, 2013 at 02:01:18AM -0400, Jeff Cody wrote: Will require more iterations of review, but here's what I have so far: > +/* Returns true if the GUID is zero */ > +static bool vhdx_log_guid_is_zero(MSGUID *guid) > +{ > +int i; > +int ret = 0; > + > +/* If either the log gui

  1   2   3   >