Re: [Qemu-devel] [PATCH 0/4] SPARC64: Implement sparcv9 ldfa/stfa instructions

2011-07-14 Thread tsnsaito
At Thu, 14 Jul 2011 18:31:52 +0300, Blue Swirl wrote: > On Thu, Jul 14, 2011 at 12:13 PM, wrote: > > The softmmu version of current implementation is incorrect. > > Nonfaulting loads should generate exceptions in the same way as > > normal loads.  The CPU hardware should not return zero automatic

Re: [Qemu-devel] [QAPI+QGA 3/3] QEMU Guest Agent (virtagent) v7

2011-07-14 Thread Zhi Yong Wu
On Fri, Jul 15, 2011 at 4:00 AM, Michael Roth wrote: > This is Set 3/3 of the QAPI+QGA patchsets. > > These patches apply on top of qapi-backport-set2-v6, and can also be obtained > from: > git://repo.or.cz/qemu/mdroth.git qapi-backport-set3-v7 > > (Set1+2 are a backport of some of the QAPI-relat

Re: [Qemu-devel] [PATCH v2 6/8] SPARC64: Add UA2007 ASI_BLK_AIU[PS]L? ASIs for stfa

2011-07-14 Thread tsnsaito
At Thu, 14 Jul 2011 22:46:30 +0200, Artyom Tarasenko wrote: > On Thu, Jul 14, 2011 at 11:41 AM, Tsuneo Saito wrote: > > Support UA2007 block store ASIs for stfa instructions. > > > > Signed-off-by: Tsuneo Saito > > --- > >  target-sparc/op_helper.c |    6 +- > >  1 files changed, 5 insertions

Re: [Qemu-devel] [PATCH] Avoid CPU endian memory accesses in devices

2011-07-14 Thread Alexander Graf
Am 14.07.2011 um 21:34 schrieb Blue Swirl : > Don't compile virtio.c in hwlib, it depends on memory accesses > performed in CPU endianness. > > Make loads and stores in CPU endianness unavailable to devices > and poison them to avoid further bugs. Very nice :). Couldn't test execute it, but:

[Qemu-devel] [PATCH 2/2] Error: Fix build when qemu-common.h is not included

2011-07-14 Thread Luiz Capitulino
From: Luiz Capitulino Commit e4ea5e2d0e0e4c5188ab45b66f3195062ae059dc added the use of the macro GCC_FMT_ATTR to error.h, however compiler.h is not included by error.h This will cause a build error when files including error.h don't include qemu-common.h (or compiler.h). Not an issue today becau

[Qemu-devel] [PATCH 1/2] Introduce compiler.h header file

2011-07-14 Thread Luiz Capitulino
From: Luiz Capitulino This moves compiler related macros from qemu-common.h to compiler.h. The reason for this change is that there are simple header files that depend only on the compiler macros, so including qemu-common.h is overkill. Besides, qemu-common.h is bloated and will benefit from so

[Qemu-devel] [PATCH v4 0/3]: Fix build issue with error.h saga

2011-07-14 Thread Luiz Capitulino
A .c file including error.h and not including qemu-common.h will break the build, because error.h uses a macro defined in qemu-common.h. The simple and obvious fix would be to change error.h to include qemu-common.h. But this is overkill, so this series does some splitting in qemu-common.h and cha

Re: [Qemu-devel] [PATCH v2 6/8] SPARC64: Add UA2007 ASI_BLK_AIU[PS]L? ASIs for stfa

2011-07-14 Thread Artyom Tarasenko
On Thu, Jul 14, 2011 at 11:41 AM, Tsuneo Saito wrote: > Support UA2007 block store ASIs for stfa instructions. > > Signed-off-by: Tsuneo Saito > --- >  target-sparc/op_helper.c |    6 +- >  1 files changed, 5 insertions(+), 1 deletions(-) > > diff --git a/target-sparc/op_helper.c b/target-spa

[Qemu-devel] [PATCH v7 3/4] guest agent: qemu-ga daemon

2011-07-14 Thread Michael Roth
This is the actual guest daemon, it listens for requests over a virtio-serial/isa-serial/unix socket channel and routes them through to dispatch routines, and writes the results back to the channel in a manner similar to QMP. A shorthand invocation: qemu-ga -d Is equivalent to: qemu-ga -m v

[Qemu-devel] [QAPI+QGA 3/3] QEMU Guest Agent (virtagent) v7

2011-07-14 Thread Michael Roth
This is Set 3/3 of the QAPI+QGA patchsets. These patches apply on top of qapi-backport-set2-v6, and can also be obtained from: git://repo.or.cz/qemu/mdroth.git qapi-backport-set3-v7 (Set1+2 are a backport of some of the QAPI-related work from Anthony's glib tree. The main goal is to get the basi

[Qemu-devel] [PATCH] Avoid CPU endian memory accesses in devices

2011-07-14 Thread Blue Swirl
Don't compile virtio.c in hwlib, it depends on memory accesses performed in CPU endianness. Make loads and stores in CPU endianness unavailable to devices and poison them to avoid further bugs. Signed-off-by: Blue Swirl --- Makefile.objs |2 +- Makefile.target |2 +- cpu-common.h|

[Qemu-devel] [PATCH v7 2/4] guest agent: command state class

2011-07-14 Thread Michael Roth
Signed-off-by: Michael Roth --- Makefile|4 ++- configure |1 + qga/guest-agent-command-state.c | 73 +++ qga/guest-agent-core.h | 25 + 4 files changed, 102 insertions(+), 1 deleti

[Qemu-devel] [PATCH v7 4/4] guest agent: add guest agent RPCs/commands

2011-07-14 Thread Michael Roth
This adds the initial set of QMP/QAPI commands provided by the guest agent: guest-sync guest-ping guest-info guest-shutdown guest-file-open guest-file-read guest-file-write guest-file-seek guest-file-flush guest-file-close guest-fsfreeze-freeze guest-fsfreeze-thaw guest-fsfreeze-status The input/

[Qemu-devel] [PATCH v7 1/4] qerror: add QERR_JSON_PARSE_ERROR to qerror.c

2011-07-14 Thread Michael Roth
Missing from previous addition of error to qerror.h. Needed for qerror_format() and friends. Signed-off-by: Michael Roth --- qerror.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/qerror.c b/qerror.c index d7fcd93..c92adfc 100644 --- a/qerror.c +++ b/qerror.c @@ -1

[Qemu-devel] [PATCHv5 10/12] qxl: add QXL_IO_FLUSH_{SURFACES, RELEASE} for guest S3&S4 support

2011-07-14 Thread Alon Levy
Add two new IOs. QXL_IO_FLUSH_SURFACES - equivalent to update area for all surfaces, used to reduce vmexits from NumSurfaces to 1 on guest S3, S4 and resolution change (windows driver implementation is such that this is done on each of those occasions). QXL_IO_FLUSH_RELEASE - used to ensure

[Qemu-devel] [PATCHv5 11/12] qxl: bump pci rev

2011-07-14 Thread Alon Levy
From: Gerd Hoffmann Inform guest drivers about the new features I/O commands we have now (async commands, S3 support) if building with newer spice, i.e. if SPICE_INTERFACE_QXL_MINOR >= 1. Signed-off-by: Gerd Hoffmann --- hw/qxl.c | 25 ++--- hw/qxl.h |6 ++ 2 file

[Qemu-devel] [PATCHv5 09/12] qxl: async io support using new spice api

2011-07-14 Thread Alon Levy
Some of the QXL port i/o commands are waiting for the spice server to complete certain actions. Add async versions for these commands, so we don't block the vcpu while the spice server processses the command. Instead the qxl device will raise an IRQ when done. The async command processing relies

[Qemu-devel] [PATCHv5 07/12] qxl: make qxl_guest_bug take variable arguments

2011-07-14 Thread Alon Levy
Signed-off-by: Alon Levy --- hw/qxl.c |9 +++-- hw/qxl.h |2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/hw/qxl.c b/hw/qxl.c index e51851a5..09382f5 100644 --- a/hw/qxl.c +++ b/hw/qxl.c @@ -125,13 +125,18 @@ static void qxl_reset_memslots(PCIQXLDevice *d); stati

[Qemu-devel] [PATCHv5 03/12] spice/qxl: move worker wrappers

2011-07-14 Thread Alon Levy
From: Gerd Hoffmann Move the wrapper functions which are used by qxl only to qxl.c. Rename them from qemu_spice_* to qxl_spice_*. Also pass in a qxl state pointer instead of a SimpleSpiceDisplay pointer. Signed-off-by: Gerd Hoffmann --- hw/qxl-render.c|4 +- hw/qxl.c | 67

[Qemu-devel] [PATCHv5 08/12] qxl: only disallow specific io's in vga mode

2011-07-14 Thread Alon Levy
Since the driver is still in operation even after moving to UNDEFINED, i.e. by destroying primary in any way. Signed-off-by: Alon Levy --- hw/qxl.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/hw/qxl.c b/hw/qxl.c index 09382f5..27eee4b 100644 --- a/hw/qxl.c +++ b/hw

[Qemu-devel] [PATCHv5 06/12] qxl: error handling fixes and cleanups.

2011-07-14 Thread Alon Levy
From: Gerd Hoffmann Add qxl_guest_bug() function which is supposed to be called in case sanity checks of guest requests fail. It raises an error IRQ and logs a message in case guest debugging is enabled. Make PANIC_ON() abort instead of exit. That macro should be used for qemu bugs only, any g

[Qemu-devel] [PATCHv5 12/12] qxl: use QXL_REVISION_*

2011-07-14 Thread Alon Levy
Signed-off-by: Alon Levy --- hw/qxl.c | 27 ++- 1 files changed, 14 insertions(+), 13 deletions(-) diff --git a/hw/qxl.c b/hw/qxl.c index 5052206..b9d27b9 100644 --- a/hw/qxl.c +++ b/hw/qxl.c @@ -1579,7 +1579,6 @@ static DisplayChangeListener display_listener = { stati

[Qemu-devel] [PATCHv5 05/12] qxl: add io_port_to_string

2011-07-14 Thread Alon Levy
Signed-off-by: Alon Levy --- hw/qxl.c | 63 +- 1 files changed, 62 insertions(+), 1 deletions(-) diff --git a/hw/qxl.c b/hw/qxl.c index e832d00..c998e9b 100644 --- a/hw/qxl.c +++ b/hw/qxl.c @@ -409,6 +409,66 @@ static const char *qxl_

[Qemu-devel] [PATCHv5 04/12] qxl: fix surface tracking & locking

2011-07-14 Thread Alon Levy
From: Gerd Hoffmann Surface tracking needs proper locking since it is used from vcpu and spice worker threads, add it. Also reset the surface counter when zapping all surfaces. Signed-off-by: Gerd Hoffmann --- hw/qxl.c | 13 - hw/qxl.h |2 ++ 2 files changed, 14 insertions(+

[Qemu-devel] [PATCHv5 00/12] async + suspend reworked

2011-07-14 Thread Alon Levy
v4->v5: * build with SPICE_INTERFACE_QXL_MINOR in {0,1} * particularily, I've taken Gerd's suggestion: * spice 0.8.2 (or the next with QXL_MINOR 1) will depend on spice-protocol 0.8.1 (or the next with the IO_*_ASYNC) * qemu continues to check only spice version, and still >= 0.6.0

[Qemu-devel] [PATCHv5 01/12] spice: add worker wrapper functions.

2011-07-14 Thread Alon Levy
From: Gerd Hoffmann Add wrapper functions for all spice worker calls. Signed-off-by: Gerd Hoffmann --- hw/qxl-render.c|4 +- hw/qxl.c | 32 +- ui/spice-display.c | 95 --- ui/spice-display.h | 22 ++

[Qemu-devel] [PATCHv5 02/12] spice: add qemu_spice_display_init_common

2011-07-14 Thread Alon Levy
From: Gerd Hoffmann Factor out SimpleSpiceDisplay initialization into qemu_spice_display_init_common() and call it from both qxl.c (for vga mode) and spice-display.c Signed-off-by: Gerd Hoffmann --- hw/qxl.c |7 +-- ui/spice-display.c | 17 +++-- ui/spice-displa

Re: [Qemu-devel] [PATCH v2 4/8] SPARC64: fp_disabled checks on stfa/stdfa/stqfa

2011-07-14 Thread Blue Swirl
On Thu, Jul 14, 2011 at 1:39 PM, Peter Maydell wrote: > On 14 July 2011 10:41, Tsuneo Saito wrote: >> stfa/stdfa/stqfa instructions should raise fp_disabled exceptions >> if %pstate.PEF==0 or %fprs.FEF==0. > > Not really related to this patch but I happened to notice it: > we generate a trap if d

Re: [Qemu-devel] [PATCH][linux-user] set ELF_HWCAP for SPARC and SPARC64

2011-07-14 Thread Blue Swirl
Thanks, applied. On Thu, Jul 14, 2011 at 8:37 PM, Artyom Tarasenko wrote: > setting ELF_HWCAP fixes dynamic library loading for Linux/sparc64 > This patch allows loading busybox from Debian 6 initrd > > Signed-off-by: Artyom Tarasenko > --- >  linux-user/elfload.c |    6 -- >  1 files change

[Qemu-devel] [PATCH][linux-user] set ELF_HWCAP for SPARC and SPARC64

2011-07-14 Thread Artyom Tarasenko
setting ELF_HWCAP fixes dynamic library loading for Linux/sparc64 This patch allows loading busybox from Debian 6 initrd Signed-off-by: Artyom Tarasenko --- linux-user/elfload.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/linux-user/elfload.c b/linux-user/elfloa

[Qemu-devel] [Bug 810588] [NEW] Unexpected crash of qemu-kvm with SCSI disk emulation.

2011-07-14 Thread Constantine Chernov
Public bug reported: Virual machine with MS windows 2003 installed on the virtual scsi disk (-drive file=/my/path/myimage.qcow2.img,boot=on,if=scsi,media=disk,bus=0,unit=1) unexpectedly crashes without core dump. When the image is connected as an ide disk (-hda ) vm flies normally. Qemu-kvm ve

Re: [Qemu-devel] [RFC] New thread for the VM migration

2011-07-14 Thread Anthony Liguori
On 07/14/2011 07:32 AM, Avi Kivity wrote: On 07/14/2011 03:30 PM, Anthony Liguori wrote: Does this mean that the following code is sometimes executed without qemu_mutex? I don't think any of it is thread safe. That was my reaction too. I think the most rational thing to do is have a separate

Re: [Qemu-devel] [RFC] New thread for the VM migration

2011-07-14 Thread Avi Kivity
On 07/14/2011 07:49 PM, Anthony Liguori wrote: I think a reference count based approach is really the only sane thing to do and if we did that, it wouldn't be a problem since the reference would be owned by the I/O thread and would live until the migration thread is done with the VA. I wa

Re: [Qemu-devel] [RFC] New thread for the VM migration

2011-07-14 Thread Avi Kivity
On 07/14/2011 06:52 PM, Juan Quintela wrote: > >> Notice that hotplug/unplug during >> migration don't make a lot of sense anyways. > > That's completely wrong. Hotplug is a guest/end-user operation; > migration is a host/admin operation. The two don't talk to each other > at all - if the

Re: [Qemu-devel] [Bug 807893] Re: qemu privilege escalation

2011-07-14 Thread Stefan Hajnoczi
On Thu, Jul 14, 2011 at 2:00 PM, Andrew Griffiths <807...@bugs.launchpad.net> wrote: > with some grepping of parent callers, looks like the cpu is probably my > issue The -runas processing doesn't happen until os_setup_post() right before entering the main loop. It is too late at that point becau

Re: [Qemu-devel] [PATCH v2 0/8] SPARC64: Implement sparcv9 ldfa/stfa instructions

2011-07-14 Thread Blue Swirl
Thanks, applied all. On Thu, Jul 14, 2011 at 12:41 PM, Tsuneo Saito wrote: > This patch series implements sparcv9 stfa/ldfa instructions that > implementations seem to be left unfinished. > This patch also adds fp_disabled exception checks on stfa/ldfa > as they are FP instructions. > > v2: >  *

Re: [Qemu-devel] [RFC] New thread for the VM migration

2011-07-14 Thread Juan Quintela
Avi Kivity wrote: >> Disabling hotplug should be enough? > > So is powering down the destination host. O:-) You see that I explained that later O:-) > >> Notice that hotplug/unplug during >> migration don't make a lot of sense anyways. > > That's completely wrong. Hotplug is a guest/end-user

Re: [Qemu-devel] [PATCH v2 4/8] SPARC64: fp_disabled checks on stfa/stdfa/stqfa

2011-07-14 Thread Blue Swirl
On Thu, Jul 14, 2011 at 1:39 PM, Peter Maydell wrote: > On 14 July 2011 10:41, Tsuneo Saito wrote: >> stfa/stdfa/stqfa instructions should raise fp_disabled exceptions >> if %pstate.PEF==0 or %fprs.FEF==0. > > Not really related to this patch but I happened to notice it: > we generate a trap if d

Re: [Qemu-devel] [RFC] New thread for the VM migration

2011-07-14 Thread Avi Kivity
On 07/14/2011 06:30 PM, Juan Quintela wrote: Avi Kivity wrote: > On 07/14/2011 03:30 PM, Anthony Liguori wrote: >>> Does this mean that the following code is sometimes executed without >>> qemu_mutex? I don't think any of it is thread safe. >> >> >> That was my reaction too. >> >> I think t

Re: [Qemu-devel] [PATCH 0/4] SPARC64: Implement sparcv9 ldfa/stfa instructions

2011-07-14 Thread Blue Swirl
On Thu, Jul 14, 2011 at 12:13 PM, wrote: > At Thu, 14 Jul 2011 09:38:18 +0200, > Artyom Tarasenko wrote: >> On Thu, Jul 14, 2011 at 5:13 AM,   wrote: >> > At Wed, 13 Jul 2011 19:34:10 +0300, >> > Blue Swirl wrote: >> >> On Wed, Jul 13, 2011 at 3:48 PM,   wrote: >> >> > At Wed, 13 Jul 2011 13:09:2

Re: [Qemu-devel] [RFC] New thread for the VM migration

2011-07-14 Thread Juan Quintela
Avi Kivity wrote: > On 07/14/2011 03:30 PM, Anthony Liguori wrote: >>> Does this mean that the following code is sometimes executed without >>> qemu_mutex? I don't think any of it is thread safe. >> >> >> That was my reaction too. >> >> I think the most rational thing to do is have a separate thre

Re: [Qemu-devel] [PATCH 1/2] Introduce compiler.h header file

2011-07-14 Thread malc
On Thu, 14 Jul 2011, Luiz Capitulino wrote: > On Thu, 14 Jul 2011 18:15:57 +0400 (MSD) > malc wrote: > > > On Thu, 14 Jul 2011, Luiz Capitulino wrote: > > > > > On Wed, 13 Jul 2011 22:39:07 +0200 > > > Stefan Weil wrote: > > > > > > > Am 13.07.2011 18:27, schrieb Luiz Capitulino: > > > > > On

Re: [Qemu-devel] [PATCH 1/2] Introduce compiler.h header file

2011-07-14 Thread Luiz Capitulino
On Thu, 14 Jul 2011 18:15:57 +0400 (MSD) malc wrote: > On Thu, 14 Jul 2011, Luiz Capitulino wrote: > > > On Wed, 13 Jul 2011 22:39:07 +0200 > > Stefan Weil wrote: > > > > > Am 13.07.2011 18:27, schrieb Luiz Capitulino: > > > > On Wed, 13 Jul 2011 16:04:52 +0100 > > > > Peter Maydell wrote: >

Re: [Qemu-devel] [PATCH v3 1/6] block: add basic conversion api

2011-07-14 Thread Kevin Wolf
Am 13.07.2011 14:57, schrieb Devin Nakamura: > add functions to block driver interface to support inplace image conversion > > Signed-off-by: Devin Nakamura > --- > block_int.h | 70 > +++ > 1 files changed, 70 insertions(+), 0 deletions

Re: [Qemu-devel] [PATCH 1/2] Introduce compiler.h header file

2011-07-14 Thread malc
On Thu, 14 Jul 2011, Luiz Capitulino wrote: > On Wed, 13 Jul 2011 22:39:07 +0200 > Stefan Weil wrote: > > > Am 13.07.2011 18:27, schrieb Luiz Capitulino: > > > On Wed, 13 Jul 2011 16:04:52 +0100 > > > Peter Maydell wrote: > > > > > >> On 13 July 2011 15:23, Luiz Capitulino wrote: > > >>> diff

Re: [Qemu-devel] [QAPI+QGA 3/3] QEMU Guest Agent (virtagent) v6

2011-07-14 Thread Zhi Yong Wu
On Thu, Jul 14, 2011 at 8:55 PM, Luiz Capitulino wrote: > On Thu, 14 Jul 2011 10:53:51 +0800 > Zhi Yong Wu wrote: > >> HI, Michael, >> >> On Tue, Jul 5, 2011 at 9:21 PM, Michael Roth >> wrote: >> > This is Set 3/3 of the QAPI+QGA patchsets. >> > >> > These patches apply on top of qapi-backport-

Re: [Qemu-devel] [QAPI+QGA 3/3] QEMU Guest Agent (virtagent) v6

2011-07-14 Thread Michael Roth
On 07/14/2011 08:53 AM, Zhi Yong Wu wrote: On Thu, Jul 14, 2011 at 8:55 PM, Luiz Capitulino wrote: On Thu, 14 Jul 2011 10:53:51 +0800 Zhi Yong Wu wrote: HI, Michael, On Tue, Jul 5, 2011 at 9:21 PM, Michael Roth wrote: This is Set 3/3 of the QAPI+QGA patchsets. These patches apply on top

[Qemu-devel] [Bug 807893] Re: qemu privilege escalation

2011-07-14 Thread Andrew Griffiths
with some grepping of parent callers, looks like the cpu is probably my issue static void qemu_kvm_start_vcpu(CPUState *env) { env->thread = qemu_mallocz(sizeof(QemuThread)); env->halt_cond = qemu_mallocz(sizeof(QemuCond)); qemu_cond_init(env->halt_cond); qemu_thread_create(env->th

[Qemu-devel] [Bug 807893] Re: qemu privilege escalation

2011-07-14 Thread Andrew Griffiths
It does create threads before chroot/setgid/setuid, see https://bugs.launchpad.net/qemu/+bug/807893/comments/10. That process was created with following options: -enable-kvm -runas -chroot -m -kernel -append -drive -net nic,model=virtio, -net tap,ifname=xxx -serial none -serial unix:.. -serial

Re: [Qemu-devel] [QAPI+QGA 3/3] QEMU Guest Agent (virtagent) v6

2011-07-14 Thread Luiz Capitulino
On Thu, 14 Jul 2011 10:53:51 +0800 Zhi Yong Wu wrote: > HI, Michael, > > On Tue, Jul 5, 2011 at 9:21 PM, Michael Roth > wrote: > > This is Set 3/3 of the QAPI+QGA patchsets. > > > > These patches apply on top of qapi-backport-set2-v5, and can also be > > obtained from: > > git://repo.or.cz/qe

Re: [Qemu-devel] [PATCH 1/2] Introduce compiler.h header file

2011-07-14 Thread Luiz Capitulino
On Wed, 13 Jul 2011 22:39:07 +0200 Stefan Weil wrote: > Am 13.07.2011 18:27, schrieb Luiz Capitulino: > > On Wed, 13 Jul 2011 16:04:52 +0100 > > Peter Maydell wrote: > > > >> On 13 July 2011 15:23, Luiz Capitulino wrote: > >>> diff --git a/compiler.h b/compiler.h > >>> new file mode 100644 > >>

Re: [Qemu-devel] [Bug 807893] Re: qemu privilege escalation

2011-07-14 Thread Stefan Hajnoczi
On Thu, Jul 14, 2011 at 12:46 PM, Andrew Griffiths <807...@bugs.launchpad.net> wrote: > Actually, from a quick google perhaps ensuring all threads run after > chroot / dropping privileges might be a good idea. > > - http://wiki.freebsd.org/Per-Thread%20Credentials > - http://www.cocoabuilder.com/ar

[Qemu-devel] Frühbucher-Special für Ihre Veranstaltungen

2011-07-14 Thread fruehbuc...@dinnerkrimi.de
*** Mit Bitte um Weiterleitung an die Veranstaltungsabteilung *** Für eine Vollbild-Darstellung geben Sie bitte folgenden Link in Ihr Browserfenster ein: http://www.dinnerkrimi.de/newsletter/nl234.html Wenn Sie keine Post mehr von DinnerKrimi erhalten möchten, kopieren Sie bitte folgenden Link

Re: [Qemu-devel] [RFC] New thread for the VM migration

2011-07-14 Thread Avi Kivity
On 07/14/2011 03:30 PM, Anthony Liguori wrote: Does this mean that the following code is sometimes executed without qemu_mutex? I don't think any of it is thread safe. That was my reaction too. I think the most rational thing to do is have a separate thread and a pair of producer/consumer qu

Re: [Qemu-devel] [RFC] New thread for the VM migration

2011-07-14 Thread Anthony Liguori
On 07/14/2011 03:36 AM, Avi Kivity wrote: On 07/14/2011 10:14 AM, Umesh Deshpande wrote: Following patch is implemented to deal with the VCPU and iothread starvation during the migration of a guest. Currently iothread is responsible for performing the migration. It holds the qemu_mutex during th

Re: [Qemu-devel] [PATCH 3/4] Add generic drive hotplugging

2011-07-14 Thread Kevin Wolf
Am 12.07.2011 09:21, schrieb Alexander Graf: > The monitor command for hotplugging is in i386 specific code. This is just > plain wrong, as S390 just learned how to do hotplugging too and needs to > get drives for that. > > So let's add a generic copy to generic code that handles drive_add in a >

[Qemu-devel] [Bug 807893] Re: qemu privilege escalation

2011-07-14 Thread Andrew Griffiths
Actually, from a quick google perhaps ensuring all threads run after chroot / dropping privileges might be a good idea. - http://wiki.freebsd.org/Per-Thread%20Credentials - http://www.cocoabuilder.com/archive/cocoa/33107-cthread-fork.html though it looks like you might need to put in effort into

Re: [Qemu-devel] [Bug 807893] Re: qemu privilege escalation

2011-07-14 Thread Stefan Hajnoczi
On Thu, Jul 14, 2011 at 11:37 AM, Andrew Griffiths <807...@bugs.launchpad.net> wrote: > Regarding the threads having different privilege level, I have isolated > that to being related to my grsecurity configuration (more specifically, > chroot_findtask will block it). > > While it's still an issue

Re: [Qemu-devel] [PATCH 1/2] Introduce compiler.h header file

2011-07-14 Thread Peter Maydell
On 13 July 2011 17:27, Luiz Capitulino wrote: > he asked me to remove the license text altogether (which makes this > public domain?) Saying nothing is definitely not putting something into the public domain, it's just leaving the recipient to guess (and for safety you generally have to assume th

[Qemu-devel] Run realview-pbx-a9 with > 256MB memory

2011-07-14 Thread Anna Fischer
I'm running qemu-system-arm 0.14.1, and I'm emulating the Realview PBX board for the Cortex-A9. When I configure the memory to be 256MB or lower, it all works fine. When I configure -m 512MB, then the emulator crashes. Here some of the errors I'm seeing, depending on what exactly I run. I'm tryin

[Qemu-devel] [Bug 807893] Re: qemu privilege escalation

2011-07-14 Thread Andrew Griffiths
Regarding the threads having different privilege level, I have isolated that to being related to my grsecurity configuration (more specifically, chroot_findtask will block it). While it's still an issue on older glibc where the setuid/setgid code does not enforce it across all threads, it may not

Re: [Qemu-devel] [PATCH] Introduce "info migrate-times" monitor command

2011-07-14 Thread Paolo Bonzini
On 07/14/2011 12:05 PM, Michal Novotny wrote: What do you mean by removing migration.c from the list? Do you mean doing no modifications to this file? No usage of the time variables in migration.c. it's about milliseconds It's noise anyway. The arch_init.c to include savevm-related code d

Re: [Qemu-devel] [PATCH v2] Introduce "info migrate-times" monitor command

2011-07-14 Thread Paolo Bonzini
On 07/14/2011 11:55 AM, Michal Novotny wrote: +/* Time measuring facility */ +extern int time_measurement_type; +extern uint64_t time_saveram1; +extern uint64_t time_saveram2; +extern uint64_t time_saveram3; +extern uint64_t time_savedisk1; +extern uint64_t time_savedisk2; +extern uint64_t time_s

Re: [Qemu-devel] live block copy/stream/snapshot discussion

2011-07-14 Thread Kevin Wolf
Am 14.07.2011 12:00, schrieb Stefan Hajnoczi: > On Thu, Jul 14, 2011 at 10:55 AM, Kevin Wolf wrote: >> Am 14.07.2011 11:39, schrieb Stefan Hajnoczi: >>> Events: >>> >>> On completion the BLOCK_STREAM_COMPLETED event is raised with the following >>> fields: >>> >>> - device: device name (json-s

Re: [Qemu-devel] [PATCH] Introduce "info migrate-times" monitor command

2011-07-14 Thread Michal Novotny
On 07/14/2011 12:15 PM, Paolo Bonzini wrote: > On 07/14/2011 12:05 PM, Michal Novotny wrote: >> What do you mean by removing migration.c from the list? Do you mean >> doing no modifications to this file? > No usage of the time variables in migration.c. > >> it's about milliseconds > It's noise anyw

Re: [Qemu-devel] [PATCHv4 09/11] qxl: use QXL_REVISION_*

2011-07-14 Thread Alon Levy
On Thu, Jul 14, 2011 at 10:46:03AM +0200, Gerd Hoffmann wrote: > patch description doesn't match content at all ... My bad, did a bad rebase, fixing. > > cheers, > Gerd >

Re: [Qemu-devel] [PATCH v2 4/8] SPARC64: fp_disabled checks on stfa/stdfa/stqfa

2011-07-14 Thread Peter Maydell
On 14 July 2011 10:41, Tsuneo Saito wrote: > stfa/stdfa/stqfa instructions should raise fp_disabled exceptions > if %pstate.PEF==0 or %fprs.FEF==0. Not really related to this patch but I happened to notice it: we generate a trap if dc->fpu_enabled is clear. That flag is set with: dc->fpu_

Re: [Qemu-devel] live block copy/stream/snapshot discussion

2011-07-14 Thread Stefan Hajnoczi
On Thu, Jul 14, 2011 at 10:55 AM, Kevin Wolf wrote: > Am 14.07.2011 11:39, schrieb Stefan Hajnoczi: >>  Events: >> >>  On completion the BLOCK_STREAM_COMPLETED event is raised with the following >>  fields: >> >>  - device: device name (json-string) >>  - len:    size of the device, in bytes (json

[Qemu-devel] [PATCH 1/5] s390x: add ldeb instruction

2011-07-14 Thread Alexander Graf
While running perl, we encountered the ldeb instruction to be used, so we implement it :). Signed-off-by: Alexander Graf --- target-s390x/helpers.h |1 + target-s390x/op_helper.c |9 + target-s390x/translate.c |4 3 files changed, 14 insertions(+), 0 deletions(-) diff

Re: [Qemu-devel] [PATCH] Introduce "info migrate-times" monitor command

2011-07-14 Thread Michal Novotny
On 07/14/2011 11:44 AM, Paolo Bonzini wrote: > On 07/14/2011 10:45 AM, Michal Novotny wrote: >>> Please inline all these instead of adding new functions. >> Do you mean to implement as macros? I'm trying since yesterday and it's >> not that simple because the variable has to be accessible from 3 f

[Qemu-devel] [PATCH v2 6/8] SPARC64: Add UA2007 ASI_BLK_AIU[PS]L? ASIs for stfa

2011-07-14 Thread Tsuneo Saito
Support UA2007 block store ASIs for stfa instructions. Signed-off-by: Tsuneo Saito --- target-sparc/op_helper.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c index b76ffb6..4faa709 100644 --- a/target-sparc/op_he

[Qemu-devel] [PATCH 0/5] s390x: Random emulation fixes

2011-07-14 Thread Alexander Graf
While trying to use the s390x emulation target in a real world use case, we stumbled over a number of shortcomings. These patches fell out there, giving us comparable functionality to a real KVM virtual machine on s390x. Alex Alexander Graf (5): s390x: add ldeb instruction s390x: make ipte 3

[Qemu-devel] [PATCH v2] Introduce "info migrate-times" monitor command

2011-07-14 Thread Michal Novotny
Hi, this is the implementation of the "info migrate-times" command I did to get the times for the migration to get times for each migration stage. Based on the fact migration itself is just the vmsave on the source host and vmload on destination host this function can be also useful to get the save

[Qemu-devel] [PATCH v2 4/8] SPARC64: fp_disabled checks on stfa/stdfa/stqfa

2011-07-14 Thread Tsuneo Saito
stfa/stdfa/stqfa instructions should raise fp_disabled exceptions if %pstate.PEF==0 or %fprs.FEF==0. Signed-off-by: Tsuneo Saito --- target-sparc/translate.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/target-sparc/translate.c b/target-sparc/translate.c index

[Qemu-devel] [PATCH 5/5] s390x: implement SIGP restart and shutdown

2011-07-14 Thread Alexander Graf
An s390x OS does reboot and shutdown triggers through hypercalls that we didn't implement on the TCG backend yet. That means that so far we couldn't shut down virtual machines for example, having them hang on shutdown when not using KVM. With this patch, this restriction is gone. We can now shut d

Re: [Qemu-devel] live block copy/stream/snapshot discussion

2011-07-14 Thread Kevin Wolf
Am 14.07.2011 11:39, schrieb Stefan Hajnoczi: > Events: > > On completion the BLOCK_STREAM_COMPLETED event is raised with the following > fields: > > - device: device name (json-string) > - len:size of the device, in bytes (json-int) > - offset: last offset of completed I/O, in bytes (j

[Qemu-devel] [PATCH v2 3/8] SPARC64: Implement stfa/stdfa/stqfa instrcutions properly

2011-07-14 Thread Tsuneo Saito
This patch implements sparcv9 stfa/stdfa/stqfa instructions with non block-store ASIs. Signed-off-by: Tsuneo Saito --- target-sparc/op_helper.c | 15 +++ target-sparc/translate.c |2 -- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/target-sparc/op_helper.c b/t

[Qemu-devel] [PATCH 2/5] s390x: make ipte 31-bit aware

2011-07-14 Thread Alexander Graf
When running 31-bit code we can potentially map the same virtual address twice - once as 0x0yyy and once as 0x8yyy, because the upper bit gets ignored. This also should be reflected in the tlb invalidation path, so we really invalidate also the transparently created tlb entries. Signed-of

[Qemu-devel] [PATCH 3/5] s390x: update R and C bits in storage key

2011-07-14 Thread Alexander Graf
When the s390x maps a page or writes happen to a page, the R and C bits get updated. The easiest way to implement this in qemu is to simply update them whenever we map a TLB translation and act according to the permissions. Signed-off-by: Alexander Graf --- target-s390x/cpu.h |4

Re: [Qemu-devel] [PATCH] Introduce "info migrate-times" monitor command

2011-07-14 Thread Paolo Bonzini
On 07/14/2011 10:45 AM, Michal Novotny wrote: > Please inline all these instead of adding new functions. Do you mean to implement as macros? I'm trying since yesterday and it's not that simple because the variable has to be accessible from 3 files - arch_init.c, savevm.c and migration.c. So I n

[Qemu-devel] [PATCH v2 1/8] SPARC64: Implement ldfa/lddfa/ldqfa instructions properly

2011-07-14 Thread Tsuneo Saito
This patch implements sparcv9 ldfa/lddfa/ldqfa instructions with non block-load ASIs. Signed-off-by: Tsuneo Saito --- target-sparc/op_helper.c | 16 +++- 1 files changed, 11 insertions(+), 5 deletions(-) diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c index fd0cfb

[Qemu-devel] [PATCH 4/5] s390x: implement rrbe instruction properly

2011-07-14 Thread Alexander Graf
The rrbe instruction resets the reference bit in the given storage key. So far, we merely made it a nop and also returned an invalid CC value, so that the kernel never knew if a page actually got accessed. This patch implements it properly, flushing the R bit and returning the correct CC value. S

[Qemu-devel] [PATCH v2 7/8] SPARC64: Add JPS1 ASI_BLK_AIU[PS]L ASIs for ldfa and stfa

2011-07-14 Thread Tsuneo Saito
Support JPS1 little endian block transfer ASIs. Signed-off-by: Tsuneo Saito --- target-sparc/op_helper.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c index 4faa709..2a28d5f 100644 --- a/target-sparc/op_helper.c ++

[Qemu-devel] [PATCH v2 8/8] SPARC64: C99 comment fix for block-transfer ASIs

2011-07-14 Thread Tsuneo Saito
Fixed C99 comments on block-tranfer ASIs. Signed-off-by: Tsuneo Saito --- target-sparc/op_helper.c | 28 ++-- 1 files changed, 14 insertions(+), 14 deletions(-) diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c index 2a28d5f..15af27b 100644 --- a/target-

[Qemu-devel] [PATCH v2 5/8] SPARC64: Add UA2007 ASI_BLK_AIU[PS]L? ASIs for ldfa

2011-07-14 Thread Tsuneo Saito
Support UA2007 block load ASIs for ldfa instructions. Signed-off-by: Tsuneo Saito --- target-sparc/op_helper.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c index fe71829..b76ffb6 100644 --- a/target-sparc/op_hel

Re: [Qemu-devel] live block copy/stream/snapshot discussion

2011-07-14 Thread Stefan Hajnoczi
Here is the latest interface, I'm not updating existing patches to implement and test it (not yet using generic image stream): http://wiki.qemu.org/Features/LiveBlockMigration/ImageStreamingAPI =Changelog= v2: * Remove iteration interface where management tool drives individual copy iterations *

[Qemu-devel] [PATCH v2 0/8] SPARC64: Implement sparcv9 ldfa/stfa instructions

2011-07-14 Thread Tsuneo Saito
This patch series implements sparcv9 stfa/ldfa instructions that implementations seem to be left unfinished. This patch also adds fp_disabled exception checks on stfa/ldfa as they are FP instructions. v2: * checked by checkpatch.pl. * added UA2007 block-transfer ASIs. * added JPS1 little-endian

[Qemu-devel] [PATCH v2 2/8] SPARC64: fp_disabled checks on ldfa/lddfa/ldqfa

2011-07-14 Thread Tsuneo Saito
ldfa/lddfa/ldqfa instructions should raise fp_disabled exceptions if %pstate.PEF==0 or %fprs.FEF==0. Signed-off-by: Tsuneo Saito --- target-sparc/translate.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/target-sparc/translate.c b/target-sparc/translate.c index

Re: [Qemu-devel] [PATCHv4 03/11] qxl: remove qxl_destroy_primary()

2011-07-14 Thread Alon Levy
On Thu, Jul 14, 2011 at 10:33:23AM +0200, Gerd Hoffmann wrote: > On 07/13/11 16:49, Alon Levy wrote: > >From: Gerd Hoffmann > > > >We'll have to move qemu_spice_destroy_primary_surface() out of > >qxl_destroy_primary(). > > Is that still true with the new async libspice api? > Right - dropping i

[Qemu-devel] [PATCH V2] Add "tee" option to qemu char device

2011-07-14 Thread Chunyan Liu
Add "tee" backend to char device. It could be used as follows: -serial tee:filepath,pty -chardev tee,tee_fpath=path,tee_backend=pty,,path=path,,[mux=on|off] With "tee" option, "pty" output would be duplicated to filepath. Related thread: http://lists.nongnu.org/archive/html/qemu-devel/2011-

Re: [Qemu-devel] [PATCHv4 07/11] qxl: make qxl_guest_bug take variable arguments

2011-07-14 Thread Alon Levy
On Thu, Jul 14, 2011 at 10:43:42AM +0200, Gerd Hoffmann wrote: > Hi, > > >-qxl_guest_bug(d, "QXL_IO_MEMSLOT_ADD: val out of range"); > >+qxl_guest_bug(d, "QXL_IO_MEMSLOT_ADD: val out of range\n"); > > Why this change? I'd prefer qxl_guest_bug adding the newline. Just t

Re: [Qemu-devel] [PATCH 0/4] SPARC64: Implement sparcv9 ldfa/stfa instructions

2011-07-14 Thread tsnsaito
At Thu, 14 Jul 2011 09:38:18 +0200, Artyom Tarasenko wrote: > On Thu, Jul 14, 2011 at 5:13 AM, wrote: > > At Wed, 13 Jul 2011 19:34:10 +0300, > > Blue Swirl wrote: > >> On Wed, Jul 13, 2011 at 3:48 PM,   wrote: > >> > At Wed, 13 Jul 2011 13:09:28 +0100, > >> > Mark Cave-Ayland wrote: > >> >> >> N

Re: [Qemu-devel] [PATCHv4 05/11] qxl: add io_port_to_string

2011-07-14 Thread Alon Levy
On Thu, Jul 14, 2011 at 10:37:02AM +0200, Gerd Hoffmann wrote: > On 07/13/11 16:49, Alon Levy wrote: > >Signed-off-by: Alon Levy > >--- > > hw/qxl.c | 61 > > - > > 1 files changed, 60 insertions(+), 1 deletions(-) > > > >diff --git a/

Re: [Qemu-devel] [RFC] New thread for the VM migration

2011-07-14 Thread Stefan Hajnoczi
On Thu, Jul 14, 2011 at 9:36 AM, Avi Kivity wrote: > On 07/14/2011 10:14 AM, Umesh Deshpande wrote: >> @@ -260,10 +260,15 @@ int ram_save_live(Monitor *mon, QEMUFile *f, int >> stage, void *opaque) >>          return 0; >>      } >> >> +    if (stage != 3) >> +        qemu_mutex_lock_iothread(); >

Re: [Qemu-devel] [PATCH] Introduce "info migrate-times" monitor command

2011-07-14 Thread Michal Novotny
On 07/13/2011 04:11 PM, Paolo Bonzini wrote: > On 07/13/2011 03:06 PM, Michal Novotny wrote: >> +uint64_t time_get(const char *name, int stage); >> +void time_set(const char *name, int stage, uint64_t tv); >> +void time_add(const char *name, int stage, uint64_t tv); >> +void time_add2(const char *n

Re: [Qemu-devel] [PATCHv4 07/11] qxl: make qxl_guest_bug take variable arguments

2011-07-14 Thread Gerd Hoffmann
Hi, -qxl_guest_bug(d, "QXL_IO_MEMSLOT_ADD: val out of range"); +qxl_guest_bug(d, "QXL_IO_MEMSLOT_ADD: val out of range\n"); Why this change? I'd prefer qxl_guest_bug adding the newline. cheers, Gerd

Re: [Qemu-devel] [PATCHv4 05/11] qxl: add io_port_to_string

2011-07-14 Thread Gerd Hoffmann
Hi, +case QXL_IO_UPDATE_AREA_ASYNC: +return "QXL_IO_UPDATE_AREA_ASYNC"; Fails to build with old libspice-server (well, old libspice-protocol to be exact). Needs #ifdef. Using SPICE_INTERFACE_QXL_MINOR should work fine as the new libspice-server depends on the new spice-protoc

Re: [Qemu-devel] [PATCHv4 09/11] qxl: use QXL_REVISION_*

2011-07-14 Thread Gerd Hoffmann
patch description doesn't match content at all ... cheers, Gerd

Re: [Qemu-devel] [PATCHv4 06/11] qxl: error handling fixes and cleanups.

2011-07-14 Thread Gerd Hoffmann
+void qxl_guest_bug(PCIQXLDevice *qxl, const char *msg) +{ +qxl_send_events(qxl, QXL_INTERRUPT_ERROR); +if (qxl->guestdebug) { +fprintf(stderr, "qxl-%d: guest bug: %s\n", qxl->id, msg); +} +} One more build failure with old spice-server + spice-protocol (QXL_INTERRUPT_ERROR

Re: [Qemu-devel] [PATCHv4 08/11] qxl: bump pci rev

2011-07-14 Thread Gerd Hoffmann
On 07/13/11 16:49, Alon Levy wrote: From: Gerd Hoffmann Inform guest drivers about the new features I/O commands we have now (async commands, S3 support) if building with newer spice, i.e. if SPICE_INTERFACE_QXL_MINOR>= 1. This needs to be ordered to come *after* the S3+S4 support patch. chee

  1   2   >