Re: [Qemu-devel] [PATCH v2] runstate: add more valid transitions

2011-10-13 Thread Paolo Bonzini
On 10/13/2011 10:26 PM, Luiz Capitulino wrote: I'm going to take my word back on this one, I've found the real cause of the problem. Will post the patch right now. Are you keeping the vl.c hunks though? Paolo

Re: [Qemu-devel] [PATCH 1/1 V4] qemu-kvm: fix improper nmi emulation

2011-10-13 Thread Jan Kiszka
On 2011-10-14 08:36, Lai Jiangshan wrote: > On 10/14/2011 01:53 PM, Jan Kiszka wrote: >> On 2011-10-14 02:53, Lai Jiangshan wrote: >>> As explained in some other mail, we could then emulate the missing kernel feature by reading out the current in-kernel APIC state, testing if LI

Re: [Qemu-devel] [Qemu-ppc] [PATCH] ppcr: Avoid decrementer related kvm exits

2011-10-13 Thread David Gibson
On Fri, Oct 14, 2011 at 08:44:06AM +0200, Alexander Graf wrote: > > On 14.10.2011, at 08:36, David Gibson wrote: > > > On Fri, Oct 14, 2011 at 07:30:09AM +0200, Alexander Graf wrote: > >> > >> On 14.10.2011, at 07:19, David Gibson wrote: > >> > >>> In __cpu_ppc_store_decr(), we set up a regular

Re: [Qemu-devel] [PATCH v2 1/2] Introduce QLIST_INSERT_HEAD_RCU and dummy RCU wrappers.

2011-10-13 Thread Paolo Bonzini
On 10/13/2011 10:35 PM, Harsh Prateek Bora wrote: +#define QLIST_INSERT_HEAD_RCU(head, elm, field) do {\ +(elm)->field.le_prev =&(head)->lh_first; \ +smp_wmb(); \ +if (((elm)->f

Re: [Qemu-devel] [Qemu-ppc] [PATCH] ppcr: Avoid decrementer related kvm exits

2011-10-13 Thread Alexander Graf
On 14.10.2011, at 08:36, David Gibson wrote: > On Fri, Oct 14, 2011 at 07:30:09AM +0200, Alexander Graf wrote: >> >> On 14.10.2011, at 07:19, David Gibson wrote: >> >>> In __cpu_ppc_store_decr(), we set up a regular timer used to trigger >>> decrementer interrupts. This is necessary to impleme

Re: [Qemu-devel] [Qemu-ppc] [PATCH] ppcr: Avoid decrementer related kvm exits

2011-10-13 Thread David Gibson
On Fri, Oct 14, 2011 at 07:30:09AM +0200, Alexander Graf wrote: > > On 14.10.2011, at 07:19, David Gibson wrote: > > > In __cpu_ppc_store_decr(), we set up a regular timer used to trigger > > decrementer interrupts. This is necessary to implement the decrementer > > properly under TCG, but is un

[Qemu-devel] [PATCH 1/1 V4] qemu-kvm: fix improper nmi emulation

2011-10-13 Thread Lai Jiangshan
On 10/14/2011 01:53 PM, Jan Kiszka wrote: > On 2011-10-14 02:53, Lai Jiangshan wrote: >> >>> >>> As explained in some other mail, we could then emulate the missing >>> kernel feature by reading out the current in-kernel APIC state, testing >>> if LINT1 is unmasked, and then delivering the NMI direc

Re: [Qemu-devel] [PATCH 2/2 V2] qemu-kvm: fix improper nmi emulation

2011-10-13 Thread Jan Kiszka
On 2011-10-14 02:53, Lai Jiangshan wrote: > >> >> As explained in some other mail, we could then emulate the missing >> kernel feature by reading out the current in-kernel APIC state, testing >> if LINT1 is unmasked, and then delivering the NMI directly. >> > > Only the thread of the VCPU can saf

[Qemu-devel] Debugging of Linux init code

2011-10-13 Thread TusharK
Hi, I would like to debug the head.S code. I compiled the kernel with the debug information and put the breakpoints at start_kernel, __init_begin, decompress_kernel, __start functions. But all these breakpoints except start_kernel were never hit. Always the execution is stopped at start_kernel

Re: [Qemu-devel] [PATCH] ppcr: Avoid decrementer related kvm exits

2011-10-13 Thread Alexander Graf
On 14.10.2011, at 07:19, David Gibson wrote: > In __cpu_ppc_store_decr(), we set up a regular timer used to trigger > decrementer interrupts. This is necessary to implement the decrementer > properly under TCG, but is unnecessary under KVM (true for both Book3S-PR > and Book3S-HV KVM variants),

[Qemu-devel] [PATCH] ppcr: Avoid decrementer related kvm exits

2011-10-13 Thread David Gibson
In __cpu_ppc_store_decr(), we set up a regular timer used to trigger decrementer interrupts. This is necessary to implement the decrementer properly under TCG, but is unnecessary under KVM (true for both Book3S-PR and Book3S-HV KVM variants), because the kernel handles generating and delivering de

[Qemu-devel] [PATCH 3/3] hw/9pfs: Use export flag for indicating security model

2011-10-13 Thread Aneesh Kumar K.V
From: "Aneesh Kumar K.V" This helps to remove some of the structure members Signed-off-by: Aneesh Kumar K.V --- fsdev/file-op-9p.h | 36 ++ fsdev/qemu-fsdev.c | 19 ++- fsdev/qemu-fsdev.h |1 - hw/9pfs/virtio-9p-device.c |

[Qemu-devel] [PATCH 2/3] hw/9pfs: Rename fstype to fsdriver to make it consistent across VirtFS code

2011-10-13 Thread Aneesh Kumar K.V
From: "Aneesh Kumar K.V" Signed-off-by: Aneesh Kumar K.V --- fsdev/qemu-fsdev.c | 32 fsdev/qemu-fsdev.h | 18 +- hw/9pfs/virtio-9p-device.c |2 +- qemu-config.c |8 vl.c |

[Qemu-devel] [PATCH 1/3] hw/9pfs: Use export_flag for indicating whether fs driver use path names.

2011-10-13 Thread Aneesh Kumar K.V
From: "Aneesh Kumar K.V" This allows us to remove another member from the struct Signed-off-by: Aneesh Kumar K.V --- fsdev/file-op-9p.h |7 ++- hw/9pfs/cofs.c |2 +- hw/9pfs/virtio-9p-device.c |1 - hw/9pfs/virtio-9p-local.c |2 +- hw/9pfs/virtio-9p.c

Re: [Qemu-devel] [PATCH v2 2/2] Replace rwlocks with RCU variants of interfaces.

2011-10-13 Thread Aneesh Kumar K.V
On Fri, 14 Oct 2011 02:05:02 +0530, Harsh Prateek Bora wrote: > Use QLIST_INSERT_HEAD_RCU and rcu_read_lock/unlock instead of rwlocks. > Use v9fs_synth_mutex as a write-only mutex to handle concurrent writers. > > Signed-off-by: Harsh Prateek Bora > --- > hw/9pfs/virtio-9p-synth.c | 26 +

Re: [Qemu-devel] [PATCH 1/2] Add opt_set_bool function

2011-10-13 Thread M. Mohan Kumar
Andreas, I will repost the patch with boolean type change. -- Regards, M. Mohan Kumar On Wednesday, October 12, 2011 09:47:48 PM Andreas Färber wrote: > Am 12.10.2011 09:53, schrieb M. Mohan Kumar: > > In addition to qemu_opt_set function, we need a function to set bool > > value also. > > > >

Re: [Qemu-devel] [PATCH] hw/9pfs: Handle Security model parsing

2011-10-13 Thread M. Mohan Kumar
-- Regards, M. Mohan Kumar On Wednesday, October 12, 2011 09:37:23 PM Daniel P. Berrange wrote: > On Wed, Oct 12, 2011 at 09:05:50PM +0530, M. Mohan Kumar wrote: > > > On Wed, Oct 12, 2011 at 01:24:16PM +0530, M. Mohan Kumar wrote: > > > > Security model is needed only for 'local' fs driver. > > >

Re: [Qemu-devel] [PATCH 3/9] eepro100: Use PCI DMA stub functions

2011-10-13 Thread David Gibson
On Sun, Oct 02, 2011 at 01:45:28PM +0200, Michael S. Tsirkin wrote: > On Mon, Sep 05, 2011 at 02:34:58PM +1000, David Gibson wrote: > > From: Eduard - Gabriel Munteanu > > @@ -744,21 +713,22 @@ static void dump_statistics(EEPRO100State * s) > > * values which really matter. > > * Numbe

Re: [Qemu-devel] [PATCH 1/9] Add stub functions for PCI device models to do PCI DMA

2011-10-13 Thread David Gibson
On Mon, Oct 03, 2011 at 08:17:05AM -0500, Anthony Liguori wrote: > On 10/02/2011 07:14 AM, Michael S. Tsirkin wrote: > >On Sun, Oct 02, 2011 at 02:01:10PM +0200, Avi Kivity wrote: > >>>Hmm, not entirely virtio specific, some devices use stX macros to do the > >>>conversion. E.g. stw_be_phys and st

Re: [Qemu-devel] [PATCH 1/6] trace: Make "tracetool" generate a group list

2011-10-13 Thread Sheldon
git apply fails. details as follow: error: patch failed: trace-events:51 error: trace-events: patch does not apply Tested-by ShaoHe Feng On 10/13/2011 01:14 AM, Mark Wu wrote: Each trace events group starts with a line containing "group_start: GroupName" and end with a line containing "group_e

Re: [Qemu-devel] [PATCH] savevm: qemu_savevm_state(): Drop stop VM logic

2011-10-13 Thread Michael Roth
Heh, Anthony and I were puzzling over this just before your patch hit the list. Looks good :) Reviewed-by: Michael Roth On Thu, 13 Oct 2011 17:27:53 -0300, Luiz Capitulino wrote: > qemu_savevm_state() has some logic to stop the VM and to (or not to) > resume it. But this seems to be a big noo

[Qemu-devel] [PATCH 1/1 V3] kernel/kvm: fix improper nmi emulation

2011-10-13 Thread Lai Jiangshan
From: Kenji Kaneshige Currently, NMI interrupt is blindly sent to all the vCPUs when NMI button event happens. This doesn't properly emulate real hardware on which NMI button event triggers LINT1. Because of this, NMI is sent to the processor even when LINT1 is maskied in LVT. For example, this c

[Qemu-devel] [PATCH 1/1 V3] qemu-kvm: fix improper nmi emulation

2011-10-13 Thread Lai Jiangshan
From: Kenji Kaneshige Currently, NMI interrupt is blindly sent to all the vCPUs when NMI button event happens. This doesn't properly emulate real hardware on which NMI button event triggers LINT1. Because of this, NMI is sent to the processor even when LINT1 is maskied in LVT. For example, this c

Re: [Qemu-devel] [PATCH 2/2 V2] qemu-kvm: fix improper nmi emulation

2011-10-13 Thread Lai Jiangshan
> > As explained in some other mail, we could then emulate the missing > kernel feature by reading out the current in-kernel APIC state, testing > if LINT1 is unmasked, and then delivering the NMI directly. > Only the thread of the VCPU can safely get the in-kernel LAPIC states, so this approac

Re: [Qemu-devel] [PATCH 2/2] Drop obsolete nographic timer

2011-10-13 Thread David Gibson
On Fri, Sep 30, 2011 at 12:31:18PM +0200, Jan Kiszka wrote: > We flush coalesced MMIO in the device models now, and VNC - for which > this was once introduced - is also fine without it as it has its own > refresh timer. These don't seem to have gone in yet, any word on their progress? KVM exits a

Re: [Qemu-devel] [PATCH] configure: Detect when glibc implements makecontext() to always fail

2011-10-13 Thread Andreas Färber
Am 13.10.2011 16:26, schrieb Andreas Färber: > Am 12.10.2011 18:21, schrieb Peter Maydell: >> Improve the configure test for presence of ucontext functions by >> making linker warnings fatal; this allows us to detect when we are >> linked with a glibc which implements makecontext() to always return

Re: [Qemu-devel] [PATCH v2 2/2] Replace rwlocks with RCU variants of interfaces.

2011-10-13 Thread Harsh Bora
On 10/14/2011 02:05 AM, Harsh Prateek Bora wrote: Use QLIST_INSERT_HEAD_RCU and rcu_read_lock/unlock instead of rwlocks. Use v9fs_synth_mutex as a write-only mutex to handle concurrent writers. This patch is based on top of: http://repo.or.cz/w/qemu/v9fs.git/commitdiff/d647a2337e6e010c9f733d1ff

Re: [Qemu-devel] balloon driver on winxp guest start failed

2011-10-13 Thread Vadim Rozenfeld
On Thu, 2011-10-13 at 15:47 +0100, Stefan Hajnoczi wrote: > On Thu, Oct 13, 2011 at 5:00 AM, hkran wrote: > > On 10/12/2011 07:09 PM, hkran wrote: > >> I used balloon driver for windows virtio-win-0.1-15.iso (from > >> http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/bin/) > >> > >>

[Qemu-devel] [PATCH 3/7] integratorcp: convert control to memory API

2011-10-13 Thread Benoît Canet
--- hw/integratorcp.c | 35 --- 1 files changed, 16 insertions(+), 19 deletions(-) diff --git a/hw/integratorcp.c b/hw/integratorcp.c index e3a5f24..9bda94e 100644 --- a/hw/integratorcp.c +++ b/hw/integratorcp.c @@ -392,7 +392,9 @@ static int icp_pic_init(SysBusD

[Qemu-devel] [PATCH 5/5] block: drop bdrv_has_async_rw()

2011-10-13 Thread Stefan Hajnoczi
Commit cd74d83345e0e3b708330ab8c4cd9111bb82cda6 ("block: switch bdrv_read()/bdrv_write() to coroutines") removed the bdrv_has_async_rw() callers. This patch removes bdrv_has_async_rw() since it is no longer used. Signed-off-by: Stefan Hajnoczi --- block.c |6 -- 1 files changed, 0 inser

[Qemu-devel] [PATCH 6/7] stellaris: convert adc to memory API

2011-10-13 Thread Benoît Canet
--- hw/stellaris.c | 30 -- 1 files changed, 12 insertions(+), 18 deletions(-) diff --git a/hw/stellaris.c b/hw/stellaris.c index 8061e74..8e1ffc6 100644 --- a/hw/stellaris.c +++ b/hw/stellaris.c @@ -892,6 +892,7 @@ static int stellaris_i2c_init(SysBusDevice * dev)

[Qemu-devel] [PATCH 1/5] block: drop emulation functions that use coroutines

2011-10-13 Thread Stefan Hajnoczi
Block drivers that implement coroutine functions used to get sync and aio wrappers. This is no longer necessary since all request processing now happens in a coroutine. If a block driver implements the coroutine interface then none of the other interfaces will be invoked. Signed-off-by: Stefan H

[Qemu-devel] [PATCH v2 2/2] Replace rwlocks with RCU variants of interfaces.

2011-10-13 Thread Harsh Prateek Bora
Use QLIST_INSERT_HEAD_RCU and rcu_read_lock/unlock instead of rwlocks. Use v9fs_synth_mutex as a write-only mutex to handle concurrent writers. Signed-off-by: Harsh Prateek Bora --- hw/9pfs/virtio-9p-synth.c | 26 -- 1 files changed, 12 insertions(+), 14 deletions(-) d

[Qemu-devel] [PATCH v2 1/2] Introduce QLIST_INSERT_HEAD_RCU and dummy RCU wrappers.

2011-10-13 Thread Harsh Prateek Bora
SynthFS needs a QLIST_INSERT_HEAD_RCU to make sure list instructions are not re-ordered and therefore avoiding a crash. There may be parallel readers which should be allowed for lock-free access and this variant allows us to get rid of rwlocks used by readers. SynthFS is a special case where we d

[Qemu-devel] [PATCH 4/5] block: drop .bdrv_read()/.bdrv_write() emulation

2011-10-13 Thread Stefan Hajnoczi
There is no need to emulate .bdrv_read()/.bdrv_write() since these interfaces are only called if aio and coroutine interfaces are not present. All valid BlockDrivers must implement either sync, aio, or coroutine interfaces. Signed-off-by: Stefan Hajnoczi --- block.c | 75 ++---

[Qemu-devel] [PATCH] savevm: qemu_savevm_state(): Drop stop VM logic

2011-10-13 Thread Luiz Capitulino
qemu_savevm_state() has some logic to stop the VM and to (or not to) resume it. But this seems to be a big noop, as qemu_savevm_state() is only called by do_savevm() when the VM is already stopped. So, let's drop qemu_savevm_state()'s stop VM logic. Signed-off-by: Luiz Capitulino --- savevm.c |

Re: [Qemu-devel] [PATCH v2] runstate: add more valid transitions

2011-10-13 Thread Luiz Capitulino
On Tue, 11 Oct 2011 14:52:48 -0300 Luiz Capitulino wrote: > On Tue, 11 Oct 2011 09:22:42 +0200 > Paolo Bonzini wrote: > > > This patch adds more valid transitions to the table, and avoids > > that the VM remains stuck in RSTATE_SAVEVM state when savevm is > > done on a paused virtual machine. >

[Qemu-devel] [PATCH 4/7] stellaris: convert sys to memory API

2011-10-13 Thread Benoît Canet
--- hw/stellaris.c | 30 -- 1 files changed, 12 insertions(+), 18 deletions(-) diff --git a/hw/stellaris.c b/hw/stellaris.c index 2bf1c23..b6486a3 100644 --- a/hw/stellaris.c +++ b/hw/stellaris.c @@ -327,6 +327,7 @@ static int stellaris_gptm_init(SysBusDevice *dev)

[Qemu-devel] [PATCH 2/5] raw-posix: remove bdrv_read()/bdrv_write()

2011-10-13 Thread Stefan Hajnoczi
Block drivers only need to provide one of sync, aio, or coroutine interfaces. Since raw-posix.c provides aio interfaces, simply drop the synchronous interfaces since they can be emulated using aio and coroutines. Signed-off-by: Stefan Hajnoczi --- block/raw-posix.c | 277 --

[Qemu-devel] [PATCH 3/5] block: use coroutine interface for raw format

2011-10-13 Thread Stefan Hajnoczi
The raw format delegates all operations to bs->file (the protocol). Previously this block driver exposed both sync and aio interfaces. Since the block layer now works in terms of coroutines, expose the coroutine interfaces and drop the others. This avoids unnecessary emulation of sync and aio inte

[Qemu-devel] [PATCH 0/5] block: remove unused emulation and synchronous functions

2011-10-13 Thread Stefan Hajnoczi
Now that the block layer processes requests in coroutine context, some of the emulation wrappers and duplicate code paths can be dropped. Paraphrasing a wise man, Arnold Schwarzenegger, "I will go to the block layer and I will clean house" :). They key thing behind this series is that the block l

[Qemu-devel] [PATCH] finish to convert integratorcp.c and stellaris.c to the new memory API

2011-10-13 Thread Benoît Canet
The following patches apply against akivity queue. They convert the remaining of integratorcp.c and stellaris.c to the new memory API. Integratorcp was booted with http://wiki.qemu.org/download/arm-test-0.2.tar.gz

[Qemu-devel] [PATCH 5/7] stellaris: convert i2c to memory API

2011-10-13 Thread Benoît Canet
--- hw/stellaris.c | 28 +++- 1 files changed, 11 insertions(+), 17 deletions(-) diff --git a/hw/stellaris.c b/hw/stellaris.c index b6486a3..8061e74 100644 --- a/hw/stellaris.c +++ b/hw/stellaris.c @@ -687,6 +687,7 @@ typedef struct { SysBusDevice busdev; i2c_b

[Qemu-devel] [PATCH 7/7] stellaris: convert gptm to memory API

2011-10-13 Thread Benoît Canet
--- hw/stellaris.c | 29 - 1 files changed, 12 insertions(+), 17 deletions(-) diff --git a/hw/stellaris.c b/hw/stellaris.c index 8e1ffc6..503ddb1 100644 --- a/hw/stellaris.c +++ b/hw/stellaris.c @@ -45,6 +45,7 @@ typedef const struct { typedef struct gptm_state {

[Qemu-devel] [PATCH 2/7] integratorcp: convert icp pic to memory API

2011-10-13 Thread Benoît Canet
--- hw/integratorcp.c | 29 +++-- 1 files changed, 11 insertions(+), 18 deletions(-) diff --git a/hw/integratorcp.c b/hw/integratorcp.c index 0dc84c4..e3a5f24 100644 --- a/hw/integratorcp.c +++ b/hw/integratorcp.c @@ -279,6 +279,7 @@ static int integratorcm_init(SysBusDe

[Qemu-devel] [PATCH 1/7] integratorcp: convert core to memory API

2011-10-13 Thread Benoît Canet
--- hw/integratorcp.c | 29 - 1 files changed, 12 insertions(+), 17 deletions(-) diff --git a/hw/integratorcp.c b/hw/integratorcp.c index 9a289b4..0dc84c4 100644 --- a/hw/integratorcp.c +++ b/hw/integratorcp.c @@ -18,6 +18,7 @@ typedef struct { SysBusDevice b

[Qemu-devel] [PATCH] compatfd.c: Don't pass NULL pointer to SYS_signalfd

2011-10-13 Thread Peter Maydell
Don't pass a NULL pointer in to SYS_signalfd in qemu_signalfd_available(): this isn't valid and Valgrind complains about it. Signed-off-by: Peter Maydell --- compatfd.c | 12 ++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/compatfd.c b/compatfd.c index 31654c6..023

[Qemu-devel] [Bug 873460] Re: Likewise no sound

2011-10-13 Thread Marcus Paiva
Sry, posted in the wrong chanel. Can I move it to https://bugs.launchpad.net/ubuntu/+source/likewise-open ? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/873460 Title: Likewise no sound Status in

[Qemu-devel] [Bug 873460] [NEW] Likewise no sound

2011-10-13 Thread Marcus Paiva
Public bug reported: Hi, using fresh Ubuntu 11.10 with Likewise 6 in a MS Domain. Domain users log with no sound. Local users are OK. Thx ** Affects: qemu Importance: Undecided Status: New ** Tags: 11.10 likewise ubuntu -- You received this bug notification because you are a me

[Qemu-devel] [PATCH] KVM: Use -cpu host as default on x86

2011-10-13 Thread Alexander Graf
When running QEMU without -cpu parameter, the user usually wants a sane default. So far, we're using the qemu64/qemu32 CPU type, which basically means "the maximum TCG can emulate". That's a really good default when using TCG, but when running with KVM we much rather want a default saying "the max

Re: [Qemu-devel] [PATCH v3 00/15] NBD improvements

2011-10-13 Thread Paolo Bonzini
On 10/05/2011 09:17 AM, Paolo Bonzini wrote: v2->v3: fix comments from sheepdog maintainer v1->v2: moved coroutine send/recv functions to osdep.c, added support for multiple in-flight requests, added support for co_discard and aio_discard. FWIW, I placed a r

Re: [Qemu-devel] [PATCH] linux-aio: Allow reads beyond the end of growable images

2011-10-13 Thread Stefan Hajnoczi
On Thu, Oct 13, 2011 at 2:49 PM, Kevin Wolf wrote: > This is the linux-aio version of commits 22afa7b5 (raw-posix, synchronous) and > ba1d1afd (posix-aio-compat). Reads now produce zeros after the end of file > instead of failing or resulting in short reads, making linux-aio compatible > with the

Re: [Qemu-devel] balloon driver on winxp guest start failed

2011-10-13 Thread Stefan Hajnoczi
On Thu, Oct 13, 2011 at 5:00 AM, hkran wrote: > On 10/12/2011 07:09 PM, hkran wrote: >> I used balloon driver for windows  virtio-win-0.1-15.iso (from >> http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/bin/) >> >> following the install guard , I installed the balloon driver like this

Re: [Qemu-devel] [PATCH 1/2] hw/9pfs: Add new virtfs option cache=writethrough to skip host page cache

2011-10-13 Thread Stefan Hajnoczi
Reviewed-by: Stefan Hajnoczi

Re: [Qemu-devel] [RFC PATCH v2] Specification for qcow2 version 3

2011-10-13 Thread Stefan Hajnoczi
On Wed, Oct 12, 2011 at 3:58 PM, Kevin Wolf wrote: > Am 12.10.2011 16:37, schrieb Stefan Hajnoczi: >> On Wed, Oct 12, 2011 at 2:31 PM, Kevin Wolf wrote: >>> Am 12.10.2011 14:51, schrieb Stefan Hajnoczi: > Also a bit in l2 offset to say "there is no l2 table" cause all > clusters in l2 are

Re: [Qemu-devel] [PATCH] configure: Detect when glibc implements makecontext() to always fail

2011-10-13 Thread Andreas Färber
Am 12.10.2011 18:21, schrieb Peter Maydell: Improve the configure test for presence of ucontext functions by making linker warnings fatal; this allows us to detect when we are linked with a glibc which implements makecontext() to always return ENOSYS. Signed-off-by: Peter Maydell Tested-by: An

Re: [Qemu-devel] [PATCH v2 0/5] block: do request processing in a coroutine

2011-10-13 Thread Kevin Wolf
Am 13.10.2011 14:08, schrieb Stefan Hajnoczi: > Note: this version applies against Kevin's block tree > > Block layer features like dirty block tracing, I/O throttling, and live block > copy are forced to duplicate code due to the three different interfaces: > synchronous, asynchronous, and corout

[Qemu-devel] [PATCH] linux-aio: Allow reads beyond the end of growable images

2011-10-13 Thread Kevin Wolf
This is the linux-aio version of commits 22afa7b5 (raw-posix, synchronous) and ba1d1afd (posix-aio-compat). Reads now produce zeros after the end of file instead of failing or resulting in short reads, making linux-aio compatible with the behaviour of synchronous raw-posix requests and posix-aio-co

[Qemu-devel] [PATCH 30/35] scsi-disk: small clean up to INQUIRY

2011-10-13 Thread Paolo Bonzini
Set s->removable, s->qdev.blocksize and s->qdev.type in the callers of scsi_initfn. With this in place, s->qdev.type is allowed, and we can just reuse it as the first byte in VPD data (just like we do in standard INQUIRY data). Also set s->removable is set consistently and we can use it. Signed-o

[Qemu-devel] [PATCH 02/35] atapi/scsi: unify definitions for MMC

2011-10-13 Thread Paolo Bonzini
The definitions in ide/internal.h are duplicates, since ATAPI commands actually come from SCSI. Use the ones in scsi-defs.h and move the missing ones there. Two exceptions: - MODE_PAGE_WRITE_PARMS conflicts with the "flexible disk geometry" page in scsi-disk.c. It is unused, so pick the latter.

Re: [Qemu-devel] 2 MiB alignment in qemu_vmalloc()

2011-10-13 Thread Paolo Bonzini
On 10/13/2011 09:56 AM, Gerd Hoffmann wrote: Is there some way for apps to figure they are running in valgrind? Then we could choose a different alignment automagically. Yes, valgrind.h (on RH distros that's in package valgrind-devel; there is a valgrind.pc file to add the correct include pat

[Qemu-devel] [PATCH 14/35] qdev: switch children device list to QTAILQ

2011-10-13 Thread Paolo Bonzini
SCSI buses will need to read the children list first-to-last. This requires using a QTAILQ, because hell breaks loose if you just try inserting at the tail (thus reversing the order of all existing visits from last-to-first to first-to-tail). Signed-off-by: Paolo Bonzini --- hw/acpi_piix4.c

[Qemu-devel] [PATCH 03/11] audio: use a nominal volume of 1^32-1

2011-10-13 Thread Marc-André Lureau
So we can easily fit it into smaller int. We can just >>16 to fit it into a 16bits volume range for example. --- audio/audio.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/audio/audio.c b/audio/audio.c index f830bb2..33b6c23 100644 --- a/audio/audio.c +++ b/audio/au

[Qemu-devel] [PATCH 11/35] scsi-disk: support READ DVD STRUCTURE

2011-10-13 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/scsi-disk.c | 101 +++- 1 files changed, 100 insertions(+), 1 deletions(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index 1786c37..14db6a0 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -576,10 +576

[Qemu-devel] [PATCH 08/11] audio: use full PulseAudio API, largely adapted from pa_simple*

2011-10-13 Thread Marc-André Lureau
Unfortunately, pa_simple is a very limited API which doesn't let us retrieve the associated pa_stream. It is needed to control the volume of the stream. --- audio/paaudio.c | 356 +-- 1 files changed, 318 insertions(+), 38 deletions(-) diff --g

[Qemu-devel] [PATCH 32/35] scsi: make reqops static const

2011-10-13 Thread Paolo Bonzini
Also delete a stale occurrence of SCSIReqOps inside SCSIDeviceInfo. Signed-off-by: Paolo Bonzini --- hw/scsi-bus.c | 10 +- hw/scsi-disk.c|2 +- hw/scsi-generic.c |2 +- hw/scsi.h |7 +++ 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/h

[Qemu-devel] [PATCH 09/11] configure: pa_simple is not needed anymore

2011-10-13 Thread Marc-André Lureau
--- configure |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure b/configure index c3044c7..4278eb1 100755 --- a/configure +++ b/configure @@ -1682,9 +1682,9 @@ for drv in $audio_drv_list; do ;; pa) -audio_drv_probe $drv pulse/simple.h "-lpulse-

[Qemu-devel] [PATCH 11/11] audio: make mixemu mandatory

2011-10-13 Thread Marc-André Lureau
- we need the QEMU_HDA_AMP_CAPS for Spice to handle the volume of HDA - without MIXEMU, volume control on the guest just feels wrong because it has no effect (when it is not applied by the guest) - after all, it's the role of qemu to emulate devices, and volume effect shouldn't be excluded --

[Qemu-devel] [PATCH 26/35] scsi-generic: look at host status

2011-10-13 Thread Paolo Bonzini
Pass down the host status so that failing transport can be detected by the guest. Similar treatment of host status could be done in virtio-blk, too. Signed-off-by: Paolo Bonzini --- hw/scsi-generic.c | 20 1 files changed, 16 insertions(+), 4 deletions(-) diff --git a/hw

[Qemu-devel] [PATCH 5/9] usb-host: handle USBDEVFS_SETCONFIGURATION returning EBUSY

2011-10-13 Thread Gerd Hoffmann
In case the host uses the usb device usbfs will refuse to set the configuration due to the device being busy. Handle this case by disconnection the interfaces, then trying again. Signed-off-by: Gerd Hoffmann --- usb-linux.c | 36 +++- 1 files changed, 35 insert

[Qemu-devel] [PATCH 27/35] scsi-generic: snoop READ CAPACITY commands to get block size

2011-10-13 Thread Paolo Bonzini
Instead of "guessing" the block size when there is no medium in the drive, wait for the guest to send a READ CAPACITY command and retrieve it from there. Signed-off-by: Paolo Bonzini --- hw/scsi-generic.c | 50 +++--- 1 files changed, 11 insertions(+

[Qemu-devel] [PATCH 10/35] scsi-disk: support DVD profile in GET CONFIGURATION

2011-10-13 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/scsi-disk.c | 50 ++ 1 files changed, 42 insertions(+), 8 deletions(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index 837747f..1786c37 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -563,6 +563,19 @@ s

[Qemu-devel] [PATCH 06/35] scsi-disk: report media changed via unit attention sense codes

2011-10-13 Thread Paolo Bonzini
Building on the previous patch, this one adds a media change callback to scsi-disk. Signed-off-by: Paolo Bonzini --- hw/scsi-bus.c |5 + hw/scsi-disk.c | 29 - hw/scsi.h |2 ++ 3 files changed, 35 insertions(+), 1 deletions(-) diff --git a/hw/scsi

[Qemu-devel] [PATCH 17/35] scsi: allow arbitrary LUNs

2011-10-13 Thread Paolo Bonzini
This only requires changes in two places: in SCSIBus, we need to look for a free LUN if somebody creates a device with a pre-existing scsi-id but the default LUN (-1, meaning "search for a free spot"); in vSCSI, we need to actually parse the LUN according to the SCSI spec. Signed-off-by: Paolo Bon

[Qemu-devel] [PATCH 3/9] usb: fix port reset

2011-10-13 Thread Gerd Hoffmann
commit 891fb2cd4592b6fe76106a69e0ca40efbf82726a removed the implicit detach before (re-)attaching in usb_attach(). Some usb host controllers used that behavior though to do a port reset by a detach+attach sequence. This patch establishes old behavior by adding a new usb_reset() function for port

[Qemu-devel] [PATCH 07/35] scsi-disk: add stubs for more MMC commands

2011-10-13 Thread Paolo Bonzini
This patch adds a few stub implementations for MMC commands to scsi-disk, to be filled in later in the series. It also adds to scsi-defs.h constants for commands implemented by ide/atapi.c, when missing. Signed-off-by: Paolo Bonzini --- hw/scsi-defs.h |3 ++ hw/scsi-disk.c | 63 ++

[Qemu-devel] [PATCH 01/11] audio: add VOICE_VOLUME ctl

2011-10-13 Thread Marc-André Lureau
--- audio/audio.c | 12 audio/audio_int.h |1 + 2 files changed, 13 insertions(+), 0 deletions(-) diff --git a/audio/audio.c b/audio/audio.c index 5649075..c759c1f 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -2050,17 +2050,29 @@ void AUD_del_capture (CaptureVoiceOut *

[Qemu-devel] [PATCH 01/35] scsi: pass correct sense code for ENOMEDIUM

2011-10-13 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/scsi-disk.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index 6909578..9c62569 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -231,6 +231,9 @@ static int scsi_handle_rw_error(SCSIDiskReq *r, in

[Qemu-devel] [PATCH 2/9] usb-hub: need to check dev->attached

2011-10-13 Thread Gerd Hoffmann
commit 891fb2cd4592b6fe76106a69e0ca40efbf82726a did that for all host controllers, the usb hub was left out by accident. Signed-off-by: Gerd Hoffmann --- hw/usb-hub.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/usb-hub.c b/hw/usb-hub.c index 286e3ad..39382c7 10

[Qemu-devel] [PATCH 18/35] scsi: add channel to addressing

2011-10-13 Thread Paolo Bonzini
This also requires little more than adding the new argument to scsi_device_find, and the qdev property. All devices by default end up on channel 0. Signed-off-by: Paolo Bonzini --- hw/esp.c |4 ++-- hw/lsi53c895a.c |4 ++-- hw/scsi-bus.c| 24 +++- hw/s

[Qemu-devel] [PATCH 07/11] audio/spice: add support for volume control

2011-10-13 Thread Marc-André Lureau
Changes since v1: - remove #warning since qemu has -Werror by default - do not claim VOICE_VOLUME_CAP if spice doesn't support it --- audio/spiceaudio.c | 41 + 1 files changed, 41 insertions(+), 0 deletions(-) diff --git a/audio/spiceaudio.c b/audio/spic

[Qemu-devel] [PATCH 10/11] audio: allow controlling volume with PulseAudio backend

2011-10-13 Thread Marc-André Lureau
--- audio/paaudio.c | 96 --- 1 files changed, 91 insertions(+), 5 deletions(-) diff --git a/audio/paaudio.c b/audio/paaudio.c index beed434..7ddc16d 100644 --- a/audio/paaudio.c +++ b/audio/paaudio.c @@ -664,15 +664,100 @@ static void qpa_fin

[Qemu-devel] [PATCH 05/11] hw/ac97: the volume mask was not always 0x1f

2011-10-13 Thread Marc-André Lureau
It's a case by case, which will be added appropriately. --- hw/ac97.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/hw/ac97.c b/hw/ac97.c index 4d4a658..ba94835 100644 --- a/hw/ac97.c +++ b/hw/ac97.c @@ -114,7 +114,6 @@ enum { #define EACS_VRA 1 #define EACS_VRM 8 -#

[Qemu-devel] [PATCH 06/11] hw/ac97: new support for volume control

2011-10-13 Thread Marc-André Lureau
--- hw/ac97.c | 79 + 1 files changed, 79 insertions(+), 0 deletions(-) diff --git a/hw/ac97.c b/hw/ac97.c index ba94835..4a7c4ed 100644 --- a/hw/ac97.c +++ b/hw/ac97.c @@ -431,6 +431,63 @@ static void reset_voices (AC97LinkState *s, u

[Qemu-devel] [PATCH 04/11] hw/ac97: remove USE_MIXER code

2011-10-13 Thread Marc-André Lureau
It doesn't compile. The interesting bits for volume control are going to be rewritten. --- hw/ac97.c | 121 - 1 files changed, 0 insertions(+), 121 deletions(-) diff --git a/hw/ac97.c b/hw/ac97.c index 541d9a4..4d4a658 100644 --- a/hw/a

[Qemu-devel] [PATCH 02/11] audio: don't apply volume effect if backend has VOICE_VOLUME_CAP

2011-10-13 Thread Marc-André Lureau
--- audio/audio.c |9 +++-- audio/audio_int.h |5 + audio/audio_template.h |2 ++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/audio/audio.c b/audio/audio.c index c759c1f..f830bb2 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -954,7 +954,9 @

[Qemu-devel] [PULL 00/35] SCSI uber-patch

2011-10-13 Thread Paolo Bonzini
Kevin, the following changes since commit 77d5aa8ade3aac7ee3cec0ab05fb538055e01a48: block: split out bdrv_co_do_readv() and bdrv_co_do_writev() (2011-10-12 14:42:11 +0200) are available in the git repository at: git://github.com/bonzini/qemu.git scsi-for-kevin Patches 1-12 have been sent b

[Qemu-devel] [PATCH 16/35] scsi: implement REPORT LUNS for arbitrary LUNs

2011-10-13 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/scsi-bus.c | 49 +++-- 1 files changed, 39 insertions(+), 10 deletions(-) diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c index 7104e98..a2d57a7 100644 --- a/hw/scsi-bus.c +++ b/hw/scsi-bus.c @@ -170,7 +170,7 @@ typedef

[Qemu-devel] [PATCH 29/35] scsi-disk: remove cluster_size

2011-10-13 Thread Paolo Bonzini
This field is redundant, and its presence makes it more complicated to share reqops between the upcoming scsi-block and scsi-generic. Signed-off-by: Paolo Bonzini --- hw/scsi-disk.c | 45 ++--- 1 files changed, 22 insertions(+), 23 deletions(-) diff --g

[Qemu-devel] [PATCH 03/35] atapi: move GESN definitions to scsi-defs.h

2011-10-13 Thread Paolo Bonzini
As a complement to the previous patch, move definitions for GET EVENT STATUS NOTIFICATION from the two functions to scsi-defs.h. The NCR_* constants are just bit values corresponding to the ENC_* values, with no offsets even, so keep just one copy. Signed-off-by: Paolo Bonzini --- hw/ide/atapi.

[Qemu-devel] [PATCH 7/9] hw/usb-ohci: Honour endpoint maximum packet size

2011-10-13 Thread Gerd Hoffmann
From: Peter Maydell Honour the maximum packet size for endpoints; this applies when sending non-isochronous data and means we transfer only as much as the endpoint allows, leaving the transfer descriptor on the list for another go next time around. This allows usb-net to work when connected to an

[Qemu-devel] [PATCH 23/35] scsi-generic: drop SCSIGenericState

2011-10-13 Thread Paolo Bonzini
It is not needed, because s->bs is already stored in SCSIDevice, and can be reached from the conf.bs member. Signed-off-by: Paolo Bonzini --- hw/scsi-generic.c | 85 +++-- 1 files changed, 37 insertions(+), 48 deletions(-) diff --git a/hw/scsi-g

[Qemu-devel] [PATCH 04/35] atapi: fill in AUDIO_CTL page correctly

2011-10-13 Thread Paolo Bonzini
The page is not anymore in MMC, but at least keep the values sane. Signed-off-by: Paolo Bonzini --- hw/ide/atapi.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c index 347c38d..10f161f 100644 --- a/hw/ide/atapi.c +++ b/hw/ide/atapi.c @@

[Qemu-devel] [PATCH 31/35] scsi: move max_lba to SCSIDevice

2011-10-13 Thread Paolo Bonzini
The field was only in scsi-disk until now. Moving it up to SCSIDevice will make it easier to reuse the scsi-generic reqops elsewhere. In the future, range checking of LBA arguments might also be pushed up to SCSIDevice. At the same time, make scsi-generic get max_lba from the guest's READ CAPACI

[Qemu-devel] [PATCH 6/9] hw/usb-ohci: Fix OHCI_TD_T1 bit position definition

2011-10-13 Thread Gerd Hoffmann
From: Peter Maydell The OHCI Transfer Descriptor T (DataToggle) bits are 24 and 25; fix an error which accidentally overlaid them both on the same bit. Signed-off-by: Peter Maydell Signed-off-by: Gerd Hoffmann --- hw/usb-ohci.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff

[Qemu-devel] [PATCH v2 2/5] block: switch bdrv_read()/bdrv_write() to coroutines

2011-10-13 Thread Stefan Hajnoczi
The bdrv_read()/bdrv_write() functions call .bdrv_read()/.bdrv_write(). They should go through bdrv_co_do_readv() and bdrv_co_do_writev() instead in order to unify request processing code across sync, aio, and coroutine interfaces. This is also an important step towards removing BlockDriverState .

[Qemu-devel] [PATCH v2 1/5] block: directly invoke .bdrv_* from emulation functions

2011-10-13 Thread Stefan Hajnoczi
The emulation functions which supply default BlockDriver .bdrv_*() functions given another implemented .bdrv_*() function should not use public bdrv_*() interfaces. This patch ensures they invoke .bdrv_*() directly to avoid adding an extra layer of coroutine request processing and possibly enterin

[Qemu-devel] [PATCH v2 3/5] block: switch bdrv_aio_readv() to coroutines

2011-10-13 Thread Stefan Hajnoczi
More sync, aio, and coroutine unification. Make bdrv_aio_readv() go through coroutine request processing. Signed-off-by: Stefan Hajnoczi --- block.c | 48 +++- 1 files changed, 35 insertions(+), 13 deletions(-) diff --git a/block.c b/block.c index

[Qemu-devel] [PATCH v2 5/5] block: switch bdrv_aio_writev() to coroutines

2011-10-13 Thread Stefan Hajnoczi
More sync, aio, and coroutine unification. Make bdrv_aio_writev() go through coroutine request processing. Remove the dirty block callback mechanism which was needed only for aio processing and can be done more naturally in coroutine context. Signed-off-by: Stefan Hajnoczi --- block.c | 66 +

[Qemu-devel] [PATCH v2 0/5] block: do request processing in a coroutine

2011-10-13 Thread Stefan Hajnoczi
Note: this version applies against Kevin's block tree Block layer features like dirty block tracing, I/O throttling, and live block copy are forced to duplicate code due to the three different interfaces: synchronous, asynchronous, and coroutines. Since there are bdrv_read(), bdrv_aio_readv(), an

  1   2   >