[Qemu-devel] [PATCH 1/2] qemu-kvm: Introduce wrapper functions to access phys_ram_dirty.

2010-03-16 Thread Yoshiaki Tamura
Adds wrapper functions to prevent direct access to the phys_ram_dirty bitmap. Signed-off-by: Yoshiaki Tamura Signed-off-by: OHMURA Kei --- cpu-all.h | 25 + 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/cpu-all.h b/cpu-all.h index 9bc01b9..c279c0a 100

[Qemu-devel] [PATCH 2/2] qemu-kvm: Replace direct phys_ram_dirty access with wrapper functions.

2010-03-16 Thread Yoshiaki Tamura
Replaces direct phys_ram_dirty access with wrapper functions to prevent direct access to the phys_ram_dirty bitmap. Signed-off-by: Yoshiaki Tamura Signed-off-by: OHMURA Kei --- exec.c | 45 - 1 files changed, 20 insertions(+), 25 deletions(-) diff

[Qemu-devel] [PATCH 0/2] qemu-kvm: Introduce wrapper functions to access phys_ram_dirty, and replace existing direct accesses to it.

2010-03-16 Thread Yoshiaki Tamura
Before replacing byte-based dirty bitmap with bit-based dirty bitmap, clearing direct accesses to the bitmap first seems to be good point to start with. This patch set is based on the following discussion. http://www.mail-archive.com/k...@vger.kernel.org/msg30724.html Thanks, Yoshi

[Qemu-devel] Re: [PATCHv5 00/11] vhost-net: upstream integration

2010-03-16 Thread Amit Shah
On (Tue) Mar 16 2010 [19:10:30], Michael S. Tsirkin wrote: > Here's a patchset with vhost support for upstream qemu, > rebased to latest bits, and with all comments I'm aware of > addressed. > > Please consider for merging. Anthony, if you are still deliberating > some issues, maybe the series ca

[Qemu-devel] Re: [PATCHv5 04/11] virtio: notifier support + APIs for queue fields

2010-03-16 Thread Amit Shah
On (Tue) Mar 16 2010 [19:10:58], Michael S. Tsirkin wrote: > > diff --git a/hw/virtio.c b/hw/virtio.c > index 7c020a3..f54129f 100644 > --- a/hw/virtio.c > +++ b/hw/virtio.c > @@ -73,6 +73,9 @@ struct VirtQueue > int inuse; > uint16_t vector; > void (*handle_output)(VirtIODevice *vd

[Qemu-devel] Re: [PATCHv4 09/12] vhost: vhost net support

2010-03-16 Thread Amit Shah
On (Tue) Mar 16 2010 [17:37:39], Michael S. Tsirkin wrote: > On Mon, Mar 08, 2010 at 11:50:23AM +0530, Amit Shah wrote: > > On (Sat) Mar 06 2010 [21:06:35], Michael S. Tsirkin wrote: > > > > > > > > +r = vhost_virtqueue_set_addr(dev, vq, idx, dev->log_enabled); > > > > > +if (r < 0) { > >

Re: [Qemu-devel] Re: [PATCH 2/6] qemu-kvm: Modify and introduce wrapper functions to access phys_ram_dirty.

2010-03-16 Thread Avi Kivity
On 03/16/2010 10:10 PM, Blue Swirl wrote: Yes, and is what tlb_protect_code() does and it's called from tb_alloc_page() which is what's code when a TB is created. Just a tangential note: a long time ago, I tried to disable self modifying code detection for Sparc. On most RISC architect

[Qemu-devel] [Applied PATCH] Large page TLB flush

2010-03-16 Thread Paul Brook
QEMU uses a fixed page size for the CPU TLB. If the guest uses large pages then we effectively split these into multiple smaller pages, and populate the corresponding TLB entries on demand. When the guest invalidates the TLB by virtual address we must invalidate all entries covered by the large p

Re: [Qemu-devel] [PATCH 4/4] tcg-hppa: Compute is_write in cpu_signal_handler.

2010-03-16 Thread Stuart Brady
On Wed, Mar 17, 2010 at 02:10:43AM +, Stuart Brady wrote: > Argh. It just seems mind bogglingly silly that is_write doesn't seem to > be included in the siginfo on archs where doing so would make sense... > It's at least something I'd have hoped libc could take care of in the case > where the

Re: [Qemu-devel] [PATCH 4/4] tcg-hppa: Compute is_write in cpu_signal_handler.

2010-03-16 Thread Stuart Brady
On Fri, Mar 12, 2010 at 03:58:08PM +0100, Richard Henderson wrote: > Signed-off-by: Richard Henderson Acked-by: Stuart Brady Argh. It just seems mind bogglingly silly that is_write doesn't seem to be included in the siginfo on archs where doing so would make sense... It's at least something I

Re: [Qemu-devel] [PATCH 3/4] tcg-hppa: Finish the port.

2010-03-16 Thread Stuart Brady
On Sat, Feb 20, 2010 at 11:46:06AM -0800, Richard Henderson wrote: > Delete inline functions from tcg-target.h that don't need to be there, > move the others to tcg-target.c. Add 'Z', 'I', 'J' constraints for > 0, signed 11-bit, and signed 5-bit respectively. Add 'c' constraint > for RET1 registe

Re: [Qemu-devel] [PATCH 2/4] tcg-hppa: Fix 64-bit argument ordering.

2010-03-16 Thread Stuart Brady
On Sat, Feb 20, 2010 at 11:32:23AM -0800, Richard Henderson wrote: > Signed-off-by: Richard Henderson Acked-by: Stuart Brady > --- > tcg/tcg.c | 12 +++- > 1 files changed, 11 insertions(+), 1 deletions(-) > > diff --git a/tcg/tcg.c b/tcg/tcg.c > index 1818868..d753149 100644 > ---

Re: [Qemu-devel] [PATCH 1/4] tcg-hppa: Fix const errors in hppa-dis.c.

2010-03-16 Thread Stuart Brady
On Sat, Feb 20, 2010 at 11:31:31AM -0800, Richard Henderson wrote: > Signed-off-by: Richard Henderson Acked-by: Stuart Brady > --- > hppa-dis.c |4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/hppa-dis.c b/hppa-dis.c > index 9d96d72..49f99c8 100644 > --- a/hppa

Re: [Qemu-devel] Re: [PATCH 2/6] qemu-kvm: Modify and introduce wrapper functions to access phys_ram_dirty.

2010-03-16 Thread Paul Brook
> Where does the translator need access to this original code? I was > just thinking about this problem today, wondering how much overhead > there is with this SMC page protection thing. When an MMU fault occurs qemu re-translates the TB with additional annotations to determine which guest instr

Re: [Qemu-devel] [PATCH QEMU] Transparent Hugepage Support #2

2010-03-16 Thread Paul Brook
> +#if defined(__linux__) && defined(__x86_64__) > +#define MAX_TRANSPARENT_HUGEPAGE_SIZE (2*1024*1024) > + if (size >= MAX_TRANSPARENT_HUGEPAGE_SIZE) I'd prefer something like: #if defined(__linux__) && defined(__x86_64__) /* [...Allow the host to use huge pages easily...]. */ #define PRE

[Qemu-devel] Re: [PATCH 2/6] qemu-kvm: Modify and introduce wrapper functions to access phys_ram_dirty.

2010-03-16 Thread Yoshiaki Tamura
Anthony Liguori wrote: On 03/16/2010 07:45 AM, Avi Kivity wrote: On 03/16/2010 12:53 PM, Yoshiaki Tamura wrote: Modifies wrapper functions for byte-based phys_ram_dirty bitmap to bit-based phys_ram_dirty bitmap, and adds more wrapper functions to prevent direct access to the phys_ram_dirty bitm

Re: [Qemu-devel] Re: [PATCH 2/6] qemu-kvm: Modify and introduce wrapper functions to access phys_ram_dirty.

2010-03-16 Thread Richard Henderson
On 03/16/2010 01:10 PM, Blue Swirl wrote: > Just a tangential note: a long time ago, I tried to disable self > modifying code detection for Sparc. On most RISC architectures, SMC > needs explicit flushing so in theory we need not track code memory > writes. However, during exceptions the translator

Re: [Qemu-devel] [PATCH] pcnet: make subsystem vendor id match hardware

2010-03-16 Thread Stefan Weil
Michael S. Tsirkin schrieb: > Real pcnet device (AT2450) apparently has subsystem > device and vendor id set to 0, this is out of spec > (which requires that vendor id is obtained from PCI SIG) > but windows xp driver seems to need this in order > to associate. > > qemu sets pci subsystem id to qum

[Qemu-devel] Re: [PATCH] [Also for STABLE-0.12] Don't check for bus master for old guests

2010-03-16 Thread Michael S. Tsirkin
On Tue, Mar 16, 2010 at 09:36:14PM +0100, Alexander Graf wrote: > Older Linux guests don't activate the bus master enable bit. So for those we > can just try to be clever and track if they set the DEVICE_OK bit even though > bus mastering is still disabled. > > Under that condition we can disable

[Qemu-devel] [PATCH] [Also for STABLE-0.12] Don't check for bus master for old guests

2010-03-16 Thread Alexander Graf
Older Linux guests don't activate the bus master enable bit. So for those we can just try to be clever and track if they set the DEVICE_OK bit even though bus mastering is still disabled. Under that condition we can disable the windows safety check. With that logic in place both guests should work

[Qemu-devel] Re: [PATCH] [Also for STABLE-0.12] Don't check for bus master for old guests

2010-03-16 Thread Michael S. Tsirkin
On Tue, Mar 16, 2010 at 09:26:53PM +0100, Alexander Graf wrote: > > On 16.03.2010, at 21:21, Michael S. Tsirkin wrote: > > > On Tue, Mar 16, 2010 at 07:18:07PM +0100, Alexander Graf wrote: > >> Older Linux guests don't activate the bus master enable bit. So for those > >> we > >> can just try to

[Qemu-devel] Re: [PATCH] [Also for STABLE-0.12] Don't check for bus master for old guests

2010-03-16 Thread Alexander Graf
On 16.03.2010, at 21:21, Michael S. Tsirkin wrote: > On Tue, Mar 16, 2010 at 07:18:07PM +0100, Alexander Graf wrote: >> Older Linux guests don't activate the bus master enable bit. So for those we >> can just try to be clever and track if they set the DEVICE_OK bit even though >> bus mastering is

[Qemu-devel] Re: [PATCH] [Also for STABLE-0.12] Don't check for bus master for old guests

2010-03-16 Thread Michael S. Tsirkin
On Tue, Mar 16, 2010 at 07:18:07PM +0100, Alexander Graf wrote: > Older Linux guests don't activate the bus master enable bit. So for those we > can just try to be clever and track if they set the DEVICE_OK bit even though > bus mastering is still disabled. > > Under that condition we can disable

Re: [Qemu-devel] Re: [PATCH 2/6] qemu-kvm: Modify and introduce wrapper functions to access phys_ram_dirty.

2010-03-16 Thread Blue Swirl
On 3/16/10, Anthony Liguori wrote: > On 03/16/2010 08:57 AM, Avi Kivity wrote: > > > On 03/16/2010 03:51 PM, Anthony Liguori wrote: > > > > > On 03/16/2010 08:29 AM, Avi Kivity wrote: > > > > > > > On 03/16/2010 03:17 PM, Yoshiaki Tamura wrote: > > > > > > > > > Avi Kivity wrote: > > > > > > > > >

Re: [Qemu-devel] [PATCH 0/3 v5] Live migration without shared storage

2010-03-16 Thread jz4
[Qemu-devel] [PATCH 0/3 v5] Live migration without shared storage I tested the live migration without shared storage for the patch of the block migration. It succeeds for several times but sometimes it fails. I used the qemu-kvm-0.12.3 and the kvm 2.6.33 module on the ubuntu latest version.

[Qemu-devel] Re: [PATCHv5 00/11] vhost-net: upstream integration

2010-03-16 Thread Juan Quintela
"Michael S. Tsirkin" wrote: > Here's a patchset with vhost support for upstream qemu, > rebased to latest bits, and with all comments I'm aware of > addressed. > > Please consider for merging. Anthony, if you are still deliberating > some issues, maybe the series can be merged partially? This wi

[Qemu-devel] Re: [PATCHv5 11/11] virtio-net: vhost net support

2010-03-16 Thread Juan Quintela
"Michael S. Tsirkin" wrote: > This connects virtio-net to vhost net backend. > The code is structured in a way analogous to what we have with vnet > header capability in tap. > > We start/stop backend on driver start/stop as > well as on save and vm start (for migration). > > +uint8_t vhost_s

[Qemu-devel] Re: [PATCHv5 08/11] vhost: vhost net support

2010-03-16 Thread Juan Quintela
"Michael S. Tsirkin" wrote: > This adds vhost net device support in qemu. Will be tied to tap device > and virtio by following patches. Raw backend is currently missing, > will be worked on/submitted separately. > > Signed-off-by: Michael S. Tsirkin > --- > Makefile.target |2 + > configure

[Qemu-devel] [PATCH 9/9] virtio-blk: use QLIST for the list of requests

2010-03-16 Thread Juan Quintela
viltio_blak_dma_restart_bh() was unsafe, it used req->next after having (possible) put req in another list Signed-off-by: Juan Quintela --- hw/virtio-blk.c | 30 +++--- 1 files changed, 15 insertions(+), 15 deletions(-) diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c in

[Qemu-devel] [PATCH 8/9] virtio-blk: change rq type to VirtIOBlockReq

2010-03-16 Thread Juan Quintela
Signed-off-by: Juan Quintela --- hw/virtio-blk.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index 672a07b..c2ee27d 100644 --- a/hw/virtio-blk.c +++ b/hw/virtio-blk.c @@ -19,17 +19,19 @@ # include #endif +typedef struct Vir

[Qemu-devel] [PATCH 4/9] virtio: Teach virtio-net about DO_UPCAST

2010-03-16 Thread Juan Quintela
Signed-off-by: Juan Quintela --- hw/virtio-net.c | 21 - 1 files changed, 8 insertions(+), 13 deletions(-) diff --git a/hw/virtio-net.c b/hw/virtio-net.c index 5c0093e..c0537c8 100644 --- a/hw/virtio-net.c +++ b/hw/virtio-net.c @@ -61,14 +61,9 @@ typedef struct VirtIONet

[Qemu-devel] [PATCH 6/9] virtio-pci: Remove duplicate test

2010-03-16 Thread Juan Quintela
We already do the test for msix on the caller, just use that test Signed-off-by: Juan Quintela --- hw/msix.c |8 hw/virtio-pci.c |7 --- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/hw/msix.c b/hw/msix.c index 2ca0900..867f0b1 100644 --- a/hw/msix.c

[Qemu-devel] [PATCH 7/9] QLIST: Introduce QLIST_COPY_HEAD

2010-03-16 Thread Juan Quintela
This operation copies one head into other. Signed-off-by: Juan Quintela --- qemu-queue.h |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/qemu-queue.h b/qemu-queue.h index 1d07745..bf5cfdc 100644 --- a/qemu-queue.h +++ b/qemu-queue.h @@ -100,6 +100,10 @@ struct {

[Qemu-devel] [PATCH 5/9] virtio: Use DO_UPCAST instead of a cast

2010-03-16 Thread Juan Quintela
virtio_common_init() creates a struct with the right size, DO_UPCAST is the appropiate thing here Signed-off-by: Juan Quintela --- hw/virtio-balloon.c |4 ++-- hw/virtio-blk.c |7 --- hw/virtio-net.c |8 3 files changed, 10 insertions(+), 9 deletions(-) diff --g

[Qemu-devel] [PATCH 3/9] virtio: Teach virtio-blk about DO_UPCAST

2010-03-16 Thread Juan Quintela
Signed-off-by: Juan Quintela --- hw/virtio-blk.c | 11 +++ 1 files changed, 3 insertions(+), 8 deletions(-) diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index 8939bb2..ce8b604 100644 --- a/hw/virtio-blk.c +++ b/hw/virtio-blk.c @@ -29,11 +29,6 @@ typedef struct VirtIOBlock BlockC

[Qemu-devel] [PATCH 2/9] virtio: Teach virtio-balloon about DO_UPCAST

2010-03-16 Thread Juan Quintela
Signed-off-by: Juan Quintela --- hw/virtio-balloon.c | 11 +++ 1 files changed, 3 insertions(+), 8 deletions(-) diff --git a/hw/virtio-balloon.c b/hw/virtio-balloon.c index 086d9d1..71d009f 100644 --- a/hw/virtio-balloon.c +++ b/hw/virtio-balloon.c @@ -41,11 +41,6 @@ typedef struct Vir

[Qemu-devel] [PATCH 1/9] qemu/pci: document msix_entries_nr field

2010-03-16 Thread Juan Quintela
From: Michael S. Tsirkin Document the fact that msix_entries_nr field caches a value from config space. Signed-off-by: Michael S. Tsirkin Signed-off-by: Juan Quintela --- hw/pci.h |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/hw/pci.h b/hw/pci.h index 20c670e..7e

[Qemu-devel] [PATCH 0/9] Virtio cleanups

2010-03-16 Thread Juan Quintela
Hi This series introduces several virtio cleanups: - add comment to pci (mst) - tell virtio about DO_UPCAST - use QLIST instead of one open list - virtio-pci/msix: remove duplicated test Please review and apply. This is split for a series previously sent. Will send the vmstate conversions as a

Re: [Qemu-devel] Re: [PATCH, RFC] Replace assert(0) with abort() or cpu_abort()

2010-03-16 Thread Markus Armbruster
Jamie Lokier writes: > Paolo Bonzini wrote: >> On 03/15/2010 07:36 PM, Markus Armbruster wrote: >> >Please don't tell me that user emulators make abort() return. abort() >> >is declared __noreturn__, and the optimizer may well rely on that. >> >> If the user programs make a "signal (SIGABRT, SI

[Qemu-devel] [PULL v2] Convert device_add to QObject / QError

2010-03-16 Thread Markus Armbruster
Anthony ran into conflicts and asked me to rebase and send out a pull request. Complete list of conflicts: * qdev: Improve diagnostics for bad property values commit 6bf38816df80a3b50529119c5458b151b3e2c728 Adds two new errors to qdev_prop_parse(), which need conversion to QError. Resolut

Re: [Qemu-devel] wake-on-lan & IPMI implementation; real power-off and -no-shutdown

2010-03-16 Thread François Revol
> I use -no-reboot so that when the guest does a reboot during > installation, as they invariably do one or more times, QEMU exits, my > scripts does things eject the CD/floppy, or change it for the next in > sequence, and modify the guest's installed files to add virtio > drivers, install extra fi

[Qemu-devel] [PATCH] [Also for STABLE-0.12] Don't check for bus master for old guests

2010-03-16 Thread Alexander Graf
Older Linux guests don't activate the bus master enable bit. So for those we can just try to be clever and track if they set the DEVICE_OK bit even though bus mastering is still disabled. Under that condition we can disable the windows safety check. With that logic in place both guests should work

[Qemu-devel] [PATCH] qemu-io: fix aio help texts

2010-03-16 Thread Christoph Hellwig
Fix a few typos in the helptexts for the various aio commands. Signed-off-by: Christoph Hellwig Index: qemu/qemu-io.c === --- qemu.orig/qemu-io.c 2010-03-16 19:07:43.089009269 +0100 +++ qemu/qemu-io.c 2010-03-16 19:08:36.597005

Re: [Qemu-devel] Re: [PATCH, RFC] Replace assert(0) with abort() or cpu_abort()

2010-03-16 Thread Jamie Lokier
Markus Armbruster wrote: > Paolo Bonzini writes: > > > On 03/15/2010 07:36 PM, Markus Armbruster wrote: > >> Please don't tell me that user emulators make abort() return. abort() > >> is declared __noreturn__, and the optimizer may well rely on that. > > > > If the user programs make a "signal (

Re: [Qemu-devel] Re: [PATCH, RFC] Replace assert(0) with abort() or cpu_abort()

2010-03-16 Thread Jamie Lokier
Paolo Bonzini wrote: > On 03/15/2010 07:36 PM, Markus Armbruster wrote: > >Please don't tell me that user emulators make abort() return. abort() > >is declared __noreturn__, and the optimizer may well rely on that. > > If the user programs make a "signal (SIGABRT, SIG_IGN)" call, I suppose > abo

Re: [Qemu-devel] wake-on-lan & IPMI implementation; real power-off and -no-shutdown

2010-03-16 Thread Daniel P. Berrange
On Tue, Mar 16, 2010 at 05:28:51PM +, Jamie Lokier wrote: > > The semantics of -no-shutdown are awful. > > > > I'd personally prefer to see the option deprecated and a new set of > > options introduced with clearer semantics. > > > > Currently, -no-shutdown does too many things. It affects

Re: [Qemu-devel] wake-on-lan & IPMI implementation; real power-off and -no-shutdown

2010-03-16 Thread Jamie Lokier
> The semantics of -no-shutdown are awful. > > I'd personally prefer to see the option deprecated and a new set of > options introduced with clearer semantics. > > Currently, -no-shutdown does too many things. It affects reboot > behaviour, shutdown behaviour, the behavior of the SDL close but

[Qemu-devel] [PATCHv5 02/11] kvm: add API to set ioeventfd

2010-03-16 Thread Michael S. Tsirkin
Comment on kvm usage: rather than require users to do if (kvm_enabled()) and/or ifdefs, this patch adds an API that, internally, is defined to stub function on non-kvm build, and checks kvm_enabled for non-kvm run. While rest of qemu code still uses if (kvm_enabled()), I think this approach is cle

[Qemu-devel] [PATCHv5 08/11] vhost: vhost net support

2010-03-16 Thread Michael S. Tsirkin
This adds vhost net device support in qemu. Will be tied to tap device and virtio by following patches. Raw backend is currently missing, will be worked on/submitted separately. Signed-off-by: Michael S. Tsirkin --- Makefile.target |2 + configure | 36 +++ hw/vhost.c | 706 ++

[Qemu-devel] [PATCHv5 11/11] virtio-net: vhost net support

2010-03-16 Thread Michael S. Tsirkin
This connects virtio-net to vhost net backend. The code is structured in a way analogous to what we have with vnet header capability in tap. We start/stop backend on driver start/stop as well as on save and vm start (for migration). Signed-off-by: Michael S. Tsirkin --- hw/virtio-net.c | 71 +

[Qemu-devel] [PATCHv5 10/11] tap: add API to retrieve vhost net header

2010-03-16 Thread Michael S. Tsirkin
will be used by virtio-net for vhost net support Signed-off-by: Michael S. Tsirkin --- net/tap.c |7 +++ net/tap.h |3 +++ 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/net/tap.c b/net/tap.c index 19c4fa2..35c05d7 100644 --- a/net/tap.c +++ b/net/tap.c @@ -487,3 +48

[Qemu-devel] [PATCHv5 09/11] tap: add vhost/vhostfd options

2010-03-16 Thread Michael S. Tsirkin
This adds vhost binary option to tap, to enable vhost net accelerator. Default is off for now, we'll be able to make default on long term when we know it's stable. vhostfd option can be used by management, to pass in the fd. Assigning vhostfd implies vhost=on. Signed-off-by: Michael S. Tsirkin -

[Qemu-devel] [PATCHv5 07/11] virtio-pci: fill in notifier support

2010-03-16 Thread Michael S. Tsirkin
Support host/guest notifiers in virtio-pci. The last one only with kvm, that's okay because vhost relies on kvm anyway. Note on kvm usage: kvm ioeventfd API is implemented on non-kvm systems as well, this is the reason we don't need if (kvm_enabled()) around it. Signed-off-by: Michael S. Tsirkin

[Qemu-devel] [PATCHv5 06/11] virtio: move typedef to qemu-common

2010-03-16 Thread Michael S. Tsirkin
make it possible to use type without header include, simplifying header dependencies. Signed-off-by: Michael S. Tsirkin --- hw/virtio.h |1 - qemu-common.h |1 + 2 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/virtio.h b/hw/virtio.h index 5b07176..4a4131d 100644 --- a

[Qemu-devel] [PATCHv5 05/11] virtio: add set_status callback

2010-03-16 Thread Michael S. Tsirkin
vhost net backend needs to be notified when frontend status changes. Add a callback, similar to set_features. Signed-off-by: Michael S. Tsirkin --- hw/s390-virtio-bus.c |2 +- hw/syborg_virtio.c |2 +- hw/virtio-pci.c |5 +++-- hw/virtio.h |9 + 4 files ch

[Qemu-devel] [PATCHv5 04/11] virtio: notifier support + APIs for queue fields

2010-03-16 Thread Michael S. Tsirkin
vhost needs physical addresses for ring and other queue fields, so add APIs for these. In particular, add binding API to set host/guest notifiers. Will be used by vhost. Signed-off-by: Michael S. Tsirkin --- hw/virtio.c | 80 ++- hw/virt

[Qemu-devel] [PATCHv5 03/11] notifier: event notifier implementation

2010-03-16 Thread Michael S. Tsirkin
event notifiers are slightly generalized eventfd descriptors. Current implementation depends on eventfd because vhost is the only user, and vhost depends on eventfd anyway, but a stub is provided for non-eventfd case. We'll be able to further generalize this when another user comes along and we se

[Qemu-devel] [PATCHv5 01/11] tap: add interface to get device fd

2010-03-16 Thread Michael S. Tsirkin
Will be used by vhost to attach/detach to backend. Signed-off-by: Michael S. Tsirkin --- net/tap.c |7 +++ net/tap.h |2 ++ 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/net/tap.c b/net/tap.c index 7a7320c..fc59fd4 100644 --- a/net/tap.c +++ b/net/tap.c @@ -269,6 +26

[Qemu-devel] [PATCHv5 00/11] vhost-net: upstream integration

2010-03-16 Thread Michael S. Tsirkin
Here's a patchset with vhost support for upstream qemu, rebased to latest bits, and with all comments I'm aware of addressed. Please consider for merging. Anthony, if you are still deliberating some issues, maybe the series can be merged partially? This will at least reduce the amount of noise f

Re: [Qemu-devel] [PATCH QEMU] Transparent Hugepage Support #2

2010-03-16 Thread Jamie Lokier
Andrea Arcangeli wrote: > + * take advantage of hugepages with NPT/EPP or to Spelling: NPT/EPT? -- Jamie

[Qemu-devel] Re: [PATCH] pcnet: make subsystem vendor id match hardware

2010-03-16 Thread Jan Kiszka
Michael S. Tsirkin wrote: > Real pcnet device (AT2450) apparently has subsystem > device and vendor id set to 0, this is out of spec > (which requires that vendor id is obtained from PCI SIG) > but windows xp driver seems to need this in order > to associate. > > qemu sets pci subsystem id to qumr

[Qemu-devel] [PATCH QEMU] Transparent Hugepage Support #2

2010-03-16 Thread Andrea Arcangeli
From: Andrea Arcangeli This will allow proper alignment so NPT/EPT can take advantage of linux host backing the guest memory with hugepages. It also ensures that when KVM isn't used the first 2M of guest physical memory are backed by a large TLB. To complete it, it will also notify the kernel tha

[Qemu-devel] [PATCH 4/4] tcg-hppa: Compute is_write in cpu_signal_handler.

2010-03-16 Thread Richard Henderson
Signed-off-by: Richard Henderson --- cpu-exec.c | 38 +++--- 1 files changed, 31 insertions(+), 7 deletions(-) diff --git a/cpu-exec.c b/cpu-exec.c index bcfcda2..14204f4 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -1193,15 +1193,39 @@ int cpu_signal_handler(int

[Qemu-devel] [PATCH 2/4] tcg-hppa: Fix 64-bit argument ordering.

2010-03-16 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tcg.c | 12 +++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index 1818868..d753149 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -596,7 +596,17 @@ void tcg_gen_callN(TCGContext *s, TCGv_ptr func, unsigned i

[Qemu-devel] [PATCH 1/4] tcg-hppa: Fix const errors in hppa-dis.c.

2010-03-16 Thread Richard Henderson
Signed-off-by: Richard Henderson --- hppa-dis.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hppa-dis.c b/hppa-dis.c index 9d96d72..49f99c8 100644 --- a/hppa-dis.c +++ b/hppa-dis.c @@ -576,7 +576,7 @@ struct pa_opcode const char *name; unsigned long int ma

[Qemu-devel] [PATCH 0/4] tcg-hppa get it working, v2.1

2010-03-16 Thread Richard Henderson
Gah. Left out --thread and -s options to format-patch. Sorry about that. r~ Richard Henderson (4): tcg-hppa: Fix const errors in hppa-dis.c. tcg-hppa: Fix 64-bit argument ordering. tcg-hppa: Finish the port. tcg-hppa: Compute is_write in cpu_signal_handler. configure |

[Qemu-devel] [PATCH 5/5] target-alpha: Implement cvtlq inline.

2010-03-16 Thread Richard Henderson
It's a simple shift and mask sequence. Signed-off-by: Richard Henderson --- target-alpha/helper.h|1 - target-alpha/op_helper.c |7 --- target-alpha/translate.c | 21 - 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/target-alpha/helper.h b/t

[Qemu-devel] [PATCH 3/5] target-alpha: Implement rs/rc properly.

2010-03-16 Thread Richard Henderson
This is a per-cpu flag; there's no need for a spinlock of any kind. We were also failing to manipulate the flag with $31 as a target reg and failing to clear the flag on execution of a return-from-interrupt instruction. Signed-off-by: Richard Henderson --- linux-user/main.c|5 +

[Qemu-devel] [PATCH 4/5] target-alpha: Implement cvtql inline.

2010-03-16 Thread Richard Henderson
It's a simple mask and shift sequence. Also, fix a typo in the actual masks used. Signed-off-by: Richard Henderson --- target-alpha/helper.h|4 target-alpha/op_helper.c | 20 target-alpha/translate.c | 45 +++-- 3 file

[Qemu-devel] [PATCH 2/5] target-alpha: Implement cpys{, n, e} inline.

2010-03-16 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-alpha/helper.h|4 -- target-alpha/op_helper.c | 18 -- target-alpha/translate.c | 78 +++-- 3 files changed, 74 insertions(+), 26 deletions(-) diff --git a/target-alpha/helper.h b/target-alpha

[Qemu-devel] [PATCH 1/5] target-alpha: Add flags markups to helpers.h.

2010-03-16 Thread Richard Henderson
Almost all alpha helpers are at least TCG_CALL_CONST and a fair few are also TCG_CALL_PURE. Signed-off-by: Richard Henderson --- target-alpha/helper.h | 184 1 files changed, 92 insertions(+), 92 deletions(-) diff --git a/target-alpha/helper.h b

[Qemu-devel] [PATCH 0/5] target-alpha improvements

2010-03-16 Thread Richard Henderson
The major thing here is the addition of the CONST/PURE markers to the helper functions. In the process of studying the helper implmentations to see how each ought to get marked, there were several follow-on improvements that caught my eye. r~ Richard Henderson (5): target-alpha: Add flags ma

[Qemu-devel] Re: KVM call agenda for Mar 16

2010-03-16 Thread Anthony Liguori
On 03/16/2010 10:23 AM, Daniel P. Berrange wrote: In the context of the RHEV management application, iSCSI/SCSI Fibre are providing the raw storage, with LVM VGs on top and the carving LVs for the guests. In the common case the admin/app would monitor VG usage& LV rate of increase to ensure extr

[Qemu-devel] [PATCH 2/4] tcg-hppa: Fix 64-bit argument ordering.

2010-03-16 Thread Richard Henderson
--- tcg/tcg.c | 12 +++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index 1818868..d753149 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -596,7 +596,17 @@ void tcg_gen_callN(TCGContext *s, TCGv_ptr func, unsigned int flags, real_ar

[Qemu-devel] [PATCH 4/4] tcg-hppa: Compute is_write in cpu_signal_handler.

2010-03-16 Thread Richard Henderson
--- cpu-exec.c | 38 +++--- 1 files changed, 31 insertions(+), 7 deletions(-) diff --git a/cpu-exec.c b/cpu-exec.c index bcfcda2..14204f4 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -1193,15 +1193,39 @@ int cpu_signal_handler(int host_signum, void *pinfo, {

[Qemu-devel] [PATCH 1/4] tcg-hppa: Fix const errors in hppa-dis.c.

2010-03-16 Thread Richard Henderson
--- hppa-dis.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hppa-dis.c b/hppa-dis.c index 9d96d72..49f99c8 100644 --- a/hppa-dis.c +++ b/hppa-dis.c @@ -576,7 +576,7 @@ struct pa_opcode const char *name; unsigned long int match; /* Bits that must be set...

[Qemu-devel] [PATCH 0/4] tcg-hppa git it working, v2

2010-03-16 Thread Richard Henderson
Changes since v2: * Fix cpu_signal_handler. At this point the port passes all of the integer gcc tests for i386-linux-uclibc. Many of the fp tests fail because target-i386 is horribly confused about how to represent the fpu when not being built on a i386 host. I briefly tried to force the use

[Qemu-devel] Re: [PATCHv4 09/12] vhost: vhost net support

2010-03-16 Thread Michael S. Tsirkin
On Mon, Mar 08, 2010 at 11:50:23AM +0530, Amit Shah wrote: > On (Sat) Mar 06 2010 [21:06:35], Michael S. Tsirkin wrote: > > > > > > +r = vhost_virtqueue_set_addr(dev, vq, idx, dev->log_enabled); > > > > +if (r < 0) { > > > > +r = -errno; > > > > +goto fail_alloc; > > > > +

[Qemu-devel] Re: KVM call agenda for Mar 16

2010-03-16 Thread Daniel P. Berrange
On Tue, Mar 16, 2010 at 10:05:40AM -0500, Anthony Liguori wrote: > On 03/16/2010 05:45 AM, Daniel P. Berrange wrote: > >On Tue, Mar 16, 2010 at 12:38:02PM +0200, Avi Kivity wrote: > > > >>On 03/16/2010 12:31 PM, Daniel P. Berrange wrote: > >> > Polling loops are an indication that somet

[Qemu-devel] Re: KVM call agenda for Mar 16

2010-03-16 Thread Anthony Liguori
On 03/16/2010 05:45 AM, Daniel P. Berrange wrote: On Tue, Mar 16, 2010 at 12:38:02PM +0200, Avi Kivity wrote: On 03/16/2010 12:31 PM, Daniel P. Berrange wrote: Polling loops are an indication that something is wrong. Except when people suggest they are the right answer, qc

[Qemu-devel] [PULL] e100/pci fixes

2010-03-16 Thread Michael S. Tsirkin
The following changes since commit cb66ffcf9e298dc1bfc11682172ff9472bcd4495: Kevin Wolf (1): qemu-img rebase: Document -f option are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mst/qemu.git pci Michael S. Tsirkin (2): eepro100: address pci

[Qemu-devel] Re: [PATCH 2/6] qemu-kvm: Modify and introduce wrapper functions to access phys_ram_dirty.

2010-03-16 Thread Anthony Liguori
On 03/16/2010 08:57 AM, Avi Kivity wrote: On 03/16/2010 03:51 PM, Anthony Liguori wrote: On 03/16/2010 08:29 AM, Avi Kivity wrote: On 03/16/2010 03:17 PM, Yoshiaki Tamura wrote: Avi Kivity wrote: On 03/16/2010 12:53 PM, Yoshiaki Tamura wrote: Modifies wrapper functions for byte-based phys_ra

Re: [Qemu-devel] wake-on-lan & IPMI implementation; real power-off and -no-shutdown

2010-03-16 Thread François Revol
> > > Also, it seems -no-shutdown doesn't actually "stop the emulation" > > > as > > > said in the manual, it actually keeps the vm running (and using > > > cpu), > > > despite the OS trying to shutdown via ACPI. At least I tested so > > > with > > > Haiku (and acpi=true in kernel config), which pr

[Qemu-devel] Re: [PATCH 2/6] qemu-kvm: Modify and introduce wrapper functions to access phys_ram_dirty.

2010-03-16 Thread Avi Kivity
On 03/16/2010 03:51 PM, Anthony Liguori wrote: On 03/16/2010 08:29 AM, Avi Kivity wrote: On 03/16/2010 03:17 PM, Yoshiaki Tamura wrote: Avi Kivity wrote: On 03/16/2010 12:53 PM, Yoshiaki Tamura wrote: Modifies wrapper functions for byte-based phys_ram_dirty bitmap to bit-based phys_ram_dirty

Re: [Qemu-devel] wake-on-lan & IPMI implementation; real power-off and -no-shutdown

2010-03-16 Thread Luiz Capitulino
On Mon, 15 Mar 2010 15:55:26 + "Daniel P. Berrange" wrote: > On Mon, Mar 15, 2010 at 04:01:27PM +0100, Fran?ois Revol wrote: > > Hello, > > while working on a demonstrator for a green-IT project, to show > > scheduled machine shutdown and powering depending on various > > conditions, I wonder

[Qemu-devel] Re: [PATCH 2/6] qemu-kvm: Modify and introduce wrapper functions to access phys_ram_dirty.

2010-03-16 Thread Anthony Liguori
On 03/16/2010 08:29 AM, Avi Kivity wrote: On 03/16/2010 03:17 PM, Yoshiaki Tamura wrote: Avi Kivity wrote: On 03/16/2010 12:53 PM, Yoshiaki Tamura wrote: Modifies wrapper functions for byte-based phys_ram_dirty bitmap to bit-based phys_ram_dirty bitmap, and adds more wrapper functions to preve

[Qemu-devel] Re: [PATCH 2/6] qemu-kvm: Modify and introduce wrapper functions to access phys_ram_dirty.

2010-03-16 Thread Yoshiaki Tamura
Avi Kivity wrote: On 03/16/2010 03:17 PM, Yoshiaki Tamura wrote: Avi Kivity wrote: On 03/16/2010 12:53 PM, Yoshiaki Tamura wrote: Modifies wrapper functions for byte-based phys_ram_dirty bitmap to bit-based phys_ram_dirty bitmap, and adds more wrapper functions to prevent direct access to the

[Qemu-devel] Re: [PATCH 0/6] qemu-kvm: Introduce bit-based phys_ram_dirty, and bit-based dirty page checker.

2010-03-16 Thread Yoshiaki Tamura
Avi Kivity wrote: On 03/16/2010 12:53 PM, Yoshiaki Tamura wrote: Experimental results: Cond1: 1.9 ~ 61 times speed up Cond2: 1.9 ~ 56 times speed up Cond3: 1.9 ~ 59 times speed up Cond4: 1.7 ~ 59 times speed up Impressive results. What's the typical speedup? Closer to 1.9 or 61? To be honest

[Qemu-devel] Re: [PATCH 2/6] qemu-kvm: Modify and introduce wrapper functions to access phys_ram_dirty.

2010-03-16 Thread Anthony Liguori
On 03/16/2010 07:45 AM, Avi Kivity wrote: On 03/16/2010 12:53 PM, Yoshiaki Tamura wrote: Modifies wrapper functions for byte-based phys_ram_dirty bitmap to bit-based phys_ram_dirty bitmap, and adds more wrapper functions to prevent direct access to the phys_ram_dirty bitmap. + +static inlin

[Qemu-devel] Re: [PATCH 2/6] qemu-kvm: Modify and introduce wrapper functions to access phys_ram_dirty.

2010-03-16 Thread Avi Kivity
On 03/16/2010 03:17 PM, Yoshiaki Tamura wrote: Avi Kivity wrote: On 03/16/2010 12:53 PM, Yoshiaki Tamura wrote: Modifies wrapper functions for byte-based phys_ram_dirty bitmap to bit-based phys_ram_dirty bitmap, and adds more wrapper functions to prevent direct access to the phys_ram_dirty bitm

[Qemu-devel] Re: [PATCH 1/7] Add support for generic notifier lists (v2)

2010-03-16 Thread Juan Quintela
Anthony Liguori wrote: > Notifiers are data-less callbacks and a notifier list is a list of registered > notifiers that all are interested in a particular event. > > We'll use this in a few patches to implement mouse change notification. We could use that for migration also. spice just needs to

[Qemu-devel] Re: [PATCH 2/6] qemu-kvm: Modify and introduce wrapper functions to access phys_ram_dirty.

2010-03-16 Thread Yoshiaki Tamura
Avi Kivity wrote: On 03/16/2010 12:53 PM, Yoshiaki Tamura wrote: Modifies wrapper functions for byte-based phys_ram_dirty bitmap to bit-based phys_ram_dirty bitmap, and adds more wrapper functions to prevent direct access to the phys_ram_dirty bitmap. + +static inline int cpu_physical_memory_

[Qemu-devel] Re: [PATCH 0/6] qemu-kvm: Introduce bit-based phys_ram_dirty, and bit-based dirty page checker.

2010-03-16 Thread Avi Kivity
On 03/16/2010 12:53 PM, Yoshiaki Tamura wrote: Experimental results: Cond1: 1.9 ~ 61 times speed up Cond2: 1.9 ~ 56 times speed up Cond3: 1.9 ~ 59 times speed up Cond4: 1.7 ~ 59 times speed up Impressive results. What's the typical speedup? Closer to 1.9 or 61? Note the issue with the ca

[Qemu-devel] Re: [PATCH 1/6] qemu-kvm: Introduce bit-based phys_ram_dirty for VGA, CODE and MIGRATION.

2010-03-16 Thread Avi Kivity
On 03/16/2010 03:01 PM, Yoshiaki Tamura wrote: -uint8_t *phys_ram_dirty; +unsigned long *phys_ram_vga_dirty; +unsigned long *phys_ram_code_dirty; +unsigned long *phys_ram_migration_dirty; Would be nice to make this an array. Thanks for pointing out. I have a question regarding the index of t

[Qemu-devel] Re: [PATCH 1/6] qemu-kvm: Introduce bit-based phys_ram_dirty for VGA, CODE and MIGRATION.

2010-03-16 Thread Yoshiaki Tamura
Avi Kivity wrote: On 03/16/2010 12:53 PM, Yoshiaki Tamura wrote: Replaces byte-based phys_ram_dirty bitmap with three bit-based phys_ram_dirty bitmap. On allocation, it sets all bits in the bitmap. Signed-off-by: Yoshiaki Tamura Signed-off-by: OHMURA Kei --- exec.c | 22 +- 1

[Qemu-devel] Re: [PATCH 4/6] qemu-kvm: Introduce cpu_physical_memory_get_dirty_range().

2010-03-16 Thread Avi Kivity
On 03/16/2010 12:53 PM, Yoshiaki Tamura wrote: Introduces cpu_physical_memory_get_dirty_range(). It checks the first row and puts dirty addr in the array. If the first row is empty, it skips to the first non-dirty row or the end addr, and put the length in the first entry of the array. +/* It

[Qemu-devel] Re: [PATCH 2/6] qemu-kvm: Modify and introduce wrapper functions to access phys_ram_dirty.

2010-03-16 Thread Avi Kivity
On 03/16/2010 12:53 PM, Yoshiaki Tamura wrote: Modifies wrapper functions for byte-based phys_ram_dirty bitmap to bit-based phys_ram_dirty bitmap, and adds more wrapper functions to prevent direct access to the phys_ram_dirty bitmap. + +static inline int cpu_physical_memory_get_dirty_flags

[Qemu-devel] Re: [PATCH 1/6] qemu-kvm: Introduce bit-based phys_ram_dirty for VGA, CODE and MIGRATION.

2010-03-16 Thread Avi Kivity
On 03/16/2010 12:53 PM, Yoshiaki Tamura wrote: Replaces byte-based phys_ram_dirty bitmap with three bit-based phys_ram_dirty bitmap. On allocation, it sets all bits in the bitmap. Signed-off-by: Yoshiaki Tamura Signed-off-by: OHMURA Kei --- exec.c | 22 +- 1 files change

[Qemu-devel] Re: KVM call agenda for Mar 16

2010-03-16 Thread Avi Kivity
On 03/16/2010 12:45 PM, Daniel P. Berrange wrote: On Tue, Mar 16, 2010 at 12:38:02PM +0200, Avi Kivity wrote: On 03/16/2010 12:31 PM, Daniel P. Berrange wrote: Polling loops are an indication that something is wrong. Except when people suggest they are the right answer, qc

[Qemu-devel] [PATCH 4/6] qemu-kvm: Introduce cpu_physical_memory_get_dirty_range().

2010-03-16 Thread Yoshiaki Tamura
Introduces cpu_physical_memory_get_dirty_range(). It checks the first row and puts dirty addr in the array. If the first row is empty, it skips to the first non-dirty row or the end addr, and put the length in the first entry of the array. Signed-off-by: Yoshiaki Tamura Signed-off-by: OHMURA Kei

  1   2   >