[Qemu-devel] Re: [patch 02/02] sparc32 use empty_slot for missing RAM

2010-04-16 Thread Blue Swirl
On 4/17/10, Artyom Tarasenko wrote: > use empty_slot device for the RAM which is not installed > > Models without ECC don't trap when missing ram is accessed. > > Signed-off-by: Artyom Tarasenko > --- > Makefile.target |2 +- > hw/sun4m.c |7 ++- > 2 files changed, 7 inser

Re: [Qemu-devel] [Applied PATCH] Split TLB addend and target_phys_addr_t

2010-04-16 Thread malc
On Wed, 7 Apr 2010, malc wrote: > On Wed, 7 Apr 2010, Alexander Graf wrote: > > > Alexander Graf wrote: > > > [2.148288] registered taskstats version 1 > > > [2.148288] Magic number: 6:65:32 > > > [2.148288] rtc_cmos 00:01: setting system clock to 2010-04-07 > > > 15:01:35 UTC (1270

[Qemu-devel] [PATCH 2/2] Add a 'screen' backend to qemu-char.c

2010-04-16 Thread Thomas Bächler
This backend uses the 'pty' backend, but attaches the pseudo tty to a screen. A user can use 'screen:name' as a char device in a qemu options and run 'screen -R name' to attach to it. This is very useful for running headless qemu/qemu-kvm machines, where you can create screen sessions for the qemu

[Qemu-devel] [PATCH 1/2] qemu-char.c: Fix memory leaks in qemu_chr_open_pty when openpty fails

2010-04-16 Thread Thomas Bächler
--- qemu-char.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 05df971..d845572 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -986,6 +986,8 @@ static CharDriverState *qemu_chr_open_pty(QemuOpts *opts) s = qemu_mallocz(sizeof(PtyCharDr

[Qemu-devel] [patch 02/02] sparc32 use empty_slot for missing RAM

2010-04-16 Thread Artyom Tarasenko
use empty_slot device for the RAM which is not installed Models without ECC don't trap when missing ram is accessed. Signed-off-by: Artyom Tarasenko --- Makefile.target |2 +- hw/sun4m.c |7 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile.target b/Ma

[Qemu-devel] [patch 01/02] create empty_slot device

2010-04-16 Thread Artyom Tarasenko
create empty_slot device The empty_slot device emulates known to a bus but not connected devices. Signed-off-by: Artyom Tarasenko --- hw/empty_slot.c | 92 +++ hw/empty_slot.h |2 + 2 files changed, 94 insertions(+), 0 deletions(-) crea

[Qemu-devel] Re: [PATCH] document boot option to -drive parameter

2010-04-16 Thread Bruce Rogers
>>> On 4/16/2010 at 11:11 AM, Bruce Rogers wrote: > The boot option is missing from the documentation for the -drive parameter. > > If there is a better way to descibe it, I'm all ears. > > Signed-off-by: Bruce Rogers > diff --git a/qemu-options.hx b/qemu-options.hx > index f4b3bfe.

Re: [Qemu-devel] [PATCH] flush TB on singlestep command

2010-04-16 Thread Stefan Weil
Jun Koi schrieb: > (Thanks to Jan for comments on the last patch) > > Qemu has a command named singlestep, which reduces the translated code > block to be only one instruction. > However, there is one flaw when this command is triggered via monitor > interface: we do not flush all the current TBs,

[Qemu-devel] [PATCH 0/3] vmdk: Backing file fix and cleanup

2010-04-16 Thread Kevin Wolf
This series applies on top of the format/protocol split RFC and makes the VMDK format driver more regular. While at it, a qemu-iotests failure is fixed. Kevin Wolf (3): vmdk: Fix COW vmdk: Clean up backing file handling vmdk: Convert to bdrv_open block/vmdk.c | 134 +--

[Qemu-devel] [PATCH 1/3] vmdk: Fix COW

2010-04-16 Thread Kevin Wolf
When trying to do COW, VMDK wrote the data back to the backing file. This problem was revealed by the patch that made backing files read-only. This patch does not only fix the problem, but also simplifies the VMDK code a bit. This fixes the backing file qemu-iotests cases for VMDK. Signed-off-by:

[Qemu-devel] [PATCH 3/3] vmdk: Convert to bdrv_open

2010-04-16 Thread Kevin Wolf
It's a format driver, so implement bdrv_open instead of bdrv_file_open. Signed-off-by: Kevin Wolf --- block/vmdk.c | 53 ++--- 1 files changed, 22 insertions(+), 31 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index 781518a..27b6360 100

[Qemu-devel] [PATCH 2/3] vmdk: Clean up backing file handling

2010-04-16 Thread Kevin Wolf
VMDK is doing interesting things when it needs to open a backing file. This patch changes that part to look more like in other drivers. The nice side effect is that the file name isn't needed any more in the open function. Signed-off-by: Kevin Wolf --- block/vmdk.c | 50 +--

[Qemu-devel] [PATCH v2] SCSI: Add disk reset handler

2010-04-16 Thread Jan Kiszka
Ensure that pending requests of an SCSI disk are purged on system reset and also restore max_lba. The latter is no only present in the reset handler as that one is called after init as well. Signed-off-by: Jan Kiszka --- Changes in v2: - cancel associated aio requests as well hw/scsi-disk.c |

[Qemu-devel] [PATCH] document boot option to -drive parameter

2010-04-16 Thread Bruce Rogers
The boot option is missing from the documentation for the -drive parameter. If there is a better way to descibe it, I'm all ears. Signed-off-by: Bruce Rogers

Re: [Qemu-devel] [RfC PATCH 08/11] spice: add qxl device

2010-04-16 Thread Gerd Hoffmann
On 04/15/10 00:21, Alexander Graf wrote: On 14.04.2010, at 11:55, Gerd Hoffmann wrote: +static inline void atomic_or(uint32_t *var, uint32_t add) +{ + __asm__ __volatile__ ("lock; orl %1, %0" : "+m" (*var) : "r" (add) : "memory"); I hope this is going away? I don't see why QXL should be

[Qemu-devel] [FOR 0.12] [PATCH] stash away SCM_RIGHTS fd until a getfd command arrives

2010-04-16 Thread Paolo Bonzini
If there is already a fd in s->msgfd before recvmsg it is closed by parts that this patch does not touch. So, only one descriptor can be "leaked" by attaching it to a command other than getfd. Signed-off-by: Paolo Bonzini --- monitor.c |9 - qemu-char.c |9 +++-- 2 files c

[Qemu-devel] Re: [FOR 0.12][PATCH] monitor: Accept input only byte-wise

2010-04-16 Thread Paolo Bonzini
On 04/16/2010 03:17 PM, Daniel P. Berrange wrote: On Fri, Apr 16, 2010 at 01:14:11PM +0200, Paolo Bonzini wrote: The QEMU code appears to be written to assume that it will recvmsg() a complete monitor command in one go + process that, because it closes the FD the moment the data from any recvm

[Qemu-devel] [PATCH 1/3] target-sparc: Fix TARGET_{PHYS, VIRT}_ADDR_SPACE_BITS.

2010-04-16 Thread Richard Henderson
The 32 and 64-bit definitions were swapped in the ifdef. Signed-off-by: Richard Henderson --- target-sparc/cpu.h | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h index 580f4d4..0e7f390 100644 --- a/target-sparc/cpu.h +++

[Qemu-devel] [PATCH 3/3] Fix --enable-profiler compilation.

2010-04-16 Thread Richard Henderson
There's a header file inclusion ordering problem between cpu-all.h and qemu-timer.h, such that cpu_get_real_ticks is not defined when we attempt to use it in profile_getclock. Signed-off-by: Richard Henderson --- cpu-all.h| 12 qemu-timer.h | 11 +++ tcg/tcg.c|

[Qemu-devel] [PATCH 2/3] target-sparc: Free instruction temporaries.

2010-04-16 Thread Richard Henderson
Rather than creating new temporaries for constants, use the ones created in disas_sparc_insn. Remember the temps created there so that they can be freed at the end of the function. Profile data collected by TCG while booting sparc-test kernel: -avg temps/TB70.61 max=421 +avg temps/TB62.7

[Qemu-devel] Re: sparc32 FPU SP Invalid CEXC Test

2010-04-16 Thread Artyom Tarasenko
2010/4/15 Artyom Tarasenko : > 2010/4/15 Blue Swirl : >> On 4/15/10, Artyom Tarasenko wrote: >>> 2010/4/15 Artyom Tarasenko : >>> >>> > One of LX's tests crashes pretty hard, causing qemu abort. >>>  > I've tried to look how does the execution flow works with -d in_asm. >>>  > Does the address in

[Qemu-devel] Re: [FOR 0.12][PATCH] monitor: Accept input only byte-wise

2010-04-16 Thread Daniel P. Berrange
On Fri, Apr 16, 2010 at 01:14:11PM +0200, Paolo Bonzini wrote: > > >The QEMU code appears to be written to assume that it will recvmsg() a > >complete monitor command in one go + process that, because it closes the > >FD the moment the data from any recvmsg() is dealt with. > > This is buggy anyw

Re: [Qemu-devel] [PATCH 2/2] virtio-console: Notify resize to the guest.

2010-04-16 Thread Amit Shah
On (Fri) Apr 16 2010 [20:42:47], Kusanagi Kouichi wrote: > > Signed-off-by: Kusanagi Kouichi > --- > hw/virtio-console.c|3 +++ > hw/virtio-serial-bus.c |8 > hw/virtio-serial.h |9 +++-- > 3 files changed, 18 insertions(+), 2 deletions(-) Hello, The patches lo

[Qemu-devel] Re: [RfC PATCH 08/11] spice: add qxl device

2010-04-16 Thread Richard Henderson
On 04/16/2010 05:18 AM, Paolo Bonzini wrote: I'd just use __sync_fetch_and_or here. Good idea. I think we can zap the memory barrier and fix a small race while being at it, see the incremental fix below. Not sure about the memory barrier semantics of __sync_* (rth?), but besides that the pat

[Qemu-devel] Re: [RfC PATCH 08/11] spice: add qxl device

2010-04-16 Thread Gerd Hoffmann
On 04/15/10 01:08, Paolo Bonzini wrote: On 04/14/2010 06:52 PM, Blue Swirl wrote: On 4/14/10, Gerd Hoffmann wrote: +static inline void atomic_or(uint32_t *var, uint32_t add) +{ + __asm__ __volatile__ ("lock; orl %1, %0" : "+m" (*var) : "r" (add) : "memory"); +} This will break on non-x86 host

[Qemu-devel] [PATCH 1/2] char: Handle resize.

2010-04-16 Thread Kusanagi Kouichi
Signed-off-by: Kusanagi Kouichi --- qemu-char.c | 34 ++ qemu-char.h |3 +++ 2 files changed, 37 insertions(+), 0 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 05df971..03f9cbd 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -437,6 +437,11 @@ stat

[Qemu-devel] [PATCH 2/2] virtio-console: Notify resize to the guest.

2010-04-16 Thread Kusanagi Kouichi
Signed-off-by: Kusanagi Kouichi --- hw/virtio-console.c|3 +++ hw/virtio-serial-bus.c |8 hw/virtio-serial.h |9 +++-- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/hw/virtio-console.c b/hw/virtio-console.c index bd44ec6..92dd03e 100644 --- a/hw

[Qemu-devel] Re: [FOR 0.12][PATCH] monitor: Accept input only byte-wise

2010-04-16 Thread Paolo Bonzini
The QEMU code appears to be written to assume that it will recvmsg() a complete monitor command in one go + process that, because it closes the FD the moment the data from any recvmsg() is dealt with. This is buggy anyway. This should fix it too: diff --git a/monitor.c b/monitor.c index 5659

Re: [Qemu-devel] [RfC PATCH 11/11] spice: add audio

2010-04-16 Thread Gerd Hoffmann
Hi, c. I have a really hard time following what rt clock (regardless of monotonicity is doing here at all) Accept audio data with the correct rate. When sending directly to the audio device the host hardware controls this. Spice sends the audio data off to the network, so this doesn't work.

Re: [Qemu-devel] [FOR 0.12][PATCH] monitor: Accept input only byte-wise

2010-04-16 Thread Daniel P. Berrange
On Fri, Dec 04, 2009 at 02:05:29PM +0100, Jan Kiszka wrote: > This allows to suspend command interpretation and execution > synchronously, e.g. during migration. > > Signed-off-by: Jan Kiszka > --- > > monitor.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/mon

Re: [Qemu-devel] Re: [RfC PATCH 08/11] spice: add qxl device

2010-04-16 Thread Gerd Hoffmann
On 04/16/10 12:18, Paolo Bonzini wrote: I'd just use __sync_fetch_and_or here. Good idea. I think we can zap the memory barrier and fix a small race while being at it, see the incremental fix below. Not sure about the memory barrier semantics of __sync_* (rth?), but besides that the patch se

[Qemu-devel] Re: [RfC PATCH 08/11] spice: add qxl device

2010-04-16 Thread Paolo Bonzini
> > I'd just use __sync_fetch_and_or here. > > Good idea. I think we can zap the memory barrier and fix a small race > while being at it, see the incremental fix below. Not sure about the memory barrier semantics of __sync_* (rth?), but besides that the patch seems like a good idea. Paolo

[Qemu-devel] dummy field in CPUTLBEntry?

2010-04-16 Thread Jun Koi
Hi, I find the way we calculate the dummy field in CPUTLBEntry funny. What is the point of having: ((-sizeof(target_ulong) * 3) & (sizeof(unsigned long) - 1)) in its size? Why shouldnt it be more simple, like below? uint8_t dummy[(1 << CPU_TLB_ENTRY_BITS) - (sizeof(target

RE: [Qemu-devel] sparc-linux-usermode broken after latest pull

2010-04-16 Thread David Munday
Hi, I will bisect the code and reply back with the last working patch shortly. In the meantime, I'm working on a different machine where the latest pull is working, but am having trouble with pthreads on a sparc32 target. It seems that forking is supported, but when running a pthread based progr

Re: [Qemu-devel] [RfC PATCH 11/11] spice: add audio

2010-04-16 Thread Gerd Hoffmann
On 04/14/10 22:51, malc wrote: On Wed, 14 Apr 2010, Gerd Hoffmann wrote: The code does not follow neither audio(which is passable should it be internally consistent) nor general QEMU code style (braces missing) Will add the missing braces. +static void *spice_audio_init(void) +{ +if (!us

Re: [Qemu-devel] Which functions writes to memory?

2010-04-16 Thread Jun Koi
On Fri, Apr 16, 2010 at 3:17 PM, malc wrote: > On Fri, 16 Apr 2010, Jun Koi wrote: > >> Hi, >> >> I am writing a small tool to trace all the activities that write to an >> area of (virtual) memory in Qemu. >> I am currently doing that by putting my code at the top of the below >> macro in softmmu_

Re: [Qemu-devel] Which functions writes to memory?

2010-04-16 Thread malc
On Fri, 16 Apr 2010, Jun Koi wrote: > On Fri, Apr 16, 2010 at 3:17 PM, malc wrote: > > On Fri, 16 Apr 2010, Jun Koi wrote: > > > >> Hi, > >> > >> I am writing a small tool to trace all the activities that write to an > >> area of (virtual) memory in Qemu. > >> I am currently doing that by putting

Re: [Qemu-devel] Which functions writes to memory?

2010-04-16 Thread malc
On Fri, 16 Apr 2010, Jun Koi wrote: > 2010/4/16 malc : > > On Fri, 16 Apr 2010, Jun Koi wrote: > > > >> On Fri, Apr 16, 2010 at 3:17 PM, malc wrote: > >> > On Fri, 16 Apr 2010, Jun Koi wrote: > >> > > >> >> Hi, > >> >> > >> >> I am writing a small tool to trace all the activities that write to an

Re: [Qemu-devel] Which functions writes to memory?

2010-04-16 Thread Jun Koi
2010/4/16 malc : > On Fri, 16 Apr 2010, Jun Koi wrote: > >> On Fri, Apr 16, 2010 at 3:17 PM, malc wrote: >> > On Fri, 16 Apr 2010, Jun Koi wrote: >> > >> >> Hi, >> >> >> >> I am writing a small tool to trace all the activities that write to an >> >> area of (virtual) memory in Qemu. >> >> I am cur