[PATCH 1/3 v2] KVM MMU: make kvm_mmu_zap_page() return the number of zapped sp in total.

2010-04-22 Thread Gui Jianfeng
Currently, in kvm_mmu_change_mmu_pages(kvm, page), "used_pages--" is performed after calling kvm_mmu_zap_page() in spite of that whether "page" is actually reclaimed. Because root sp won't be reclaimed by kvm_mmu_zap_page(). So making kvm_mmu_zap_page() return total number of reclaimed sp mak

Re: using ftrace with kvm

2010-04-22 Thread Gleb Natapov
On Thu, Apr 22, 2010 at 02:53:45PM -0600, David S. Ahern wrote: > I have a VM that is spinning (both vcpus at 100%). As I recall kvm_stat > has been deprecated in favor or ftrace. Is there a wiki page or document > that gives suggestions on this? > kvmtrace was depricated in favor of ftrace. kvm_s

Re: [Qemu-devel] [RFC PATCH 00/20] Kemari for KVM v0.1

2010-04-22 Thread Yoshiaki Tamura
Dor Laor wrote: On 04/22/2010 04:16 PM, Yoshiaki Tamura wrote: 2010/4/22 Dor Laor: On 04/22/2010 01:35 PM, Yoshiaki Tamura wrote: Dor Laor wrote: On 04/21/2010 08:57 AM, Yoshiaki Tamura wrote: Hi all, We have been implementing the prototype of Kemari for KVM, and we're sending this messa

Re: [PATCH 1/3] KVM MMU: make kvm_mmu_zap_page() return the number of zapped sp in total.

2010-04-22 Thread Gui Jianfeng
Xiao Guangrong wrote: > > Gui Jianfeng wrote: >> Currently, in kvm_mmu_change_mmu_pages(kvm, page), "used_pages--" is >> performed after calling >> kvm_mmu_zap_page() in spite of that whether "page" is actually reclaimed. >> Because root sp won't be >> reclaimed by kvm_mmu_zap_page(). So makin

Re: [PATCH] KVM: Document mmu

2010-04-22 Thread Marcelo Tosatti
On Wed, Apr 21, 2010 at 04:09:21PM +0300, Avi Kivity wrote: > Signed-off-by: Avi Kivity > --- > Documentation/kvm/mmu.txt | 296 > + > 1 files changed, 296 insertions(+), 0 deletions(-) > create mode 100644 Documentation/kvm/mmu.txt > > diff --git a

Re: [RFC PATCH 19/20] Insert do_event_tap() to virtio-{blk, net}, comment out assert() on cpu_single_env temporally.

2010-04-22 Thread Yoshiaki Tamura
Anthony Liguori wrote: On 04/21/2010 12:57 AM, Yoshiaki Tamura wrote: do_event_tap() is inserted to functions which actually fire outputs. By synchronizing VMs before outputs are fired, we can failover to the receiver upon failure. To save VM continuously, comment out assert() on cpu_single_env

Re: [RFC PATCH 10/20] Introduce skip_header parameter to qemu_loadvm_state() so that it can be called iteratively without reading the header.

2010-04-22 Thread Yoshiaki Tamura
Anthony Liguori wrote: On 04/21/2010 12:57 AM, Yoshiaki Tamura wrote: Signed-off-by: Yoshiaki Tamura I think the more appropriate thing to do is have qemu_savevm_state_complete() not write QEMU_VM_EOF when doing a continuous live migration. You would then want qemu_loadvm_state() to detect re

Re: [RFC PATCH 07/20] Introduce qemu_put_vector() and qemu_put_vector_prepare() to use put_vector() in QEMUFile.

2010-04-22 Thread Yoshiaki Tamura
Anthony Liguori wrote: On 04/21/2010 12:57 AM, Yoshiaki Tamura wrote: For fool proof purpose, qemu_put_vector_parepare should be called before qemu_put_vector. Then, if qemu_put_* functions except this is called after qemu_put_vector_prepare, program will abort(). Signed-off-by: Yoshiaki Tamura

Re: [PATCH 1/3] KVM MMU: make kvm_mmu_zap_page() return the number of zapped sp in total.

2010-04-22 Thread Xiao Guangrong
Gui Jianfeng wrote: > Currently, in kvm_mmu_change_mmu_pages(kvm, page), "used_pages--" is > performed after calling > kvm_mmu_zap_page() in spite of that whether "page" is actually reclaimed. > Because root sp won't be > reclaimed by kvm_mmu_zap_page(). So making kvm_mmu_zap_page() return to

Re: [PATCH 6/10] KVM MMU: don't write-protect if have new mapping to unsync page

2010-04-22 Thread Xiao Guangrong
Marcelo Tosatti wrote: >> role = vcpu->arch.mmu.base_role; >> @@ -1332,12 +1336,16 @@ static struct kvm_mmu_page *kvm_mmu_get_page(struct >> kvm_vcpu *vcpu, >> hlist_for_each_entry_safe(sp, node, tmp, bucket, hash_link) >> if (sp->gfn == gfn) { >> if

Re: [RFC PATCH 05/20] Introduce put_vector() and get_vector to QEMUFile and qemu_fopen_ops().

2010-04-22 Thread Yoshiaki Tamura
Anthony Liguori wrote: On 04/21/2010 12:57 AM, Yoshiaki Tamura wrote: QEMUFile currently doesn't support writev(). For sending multiple data, such as pages, using writev() should be more efficient. Signed-off-by: Yoshiaki Tamura Is there performance data that backs this up? Since QEMUFile use

Re: [RFC PATCH 14/20] Upgrade QEMU_FILE_VERSION from 3 to 4, and introduce qemu_savevm_state_all().

2010-04-22 Thread Yoshiaki Tamura
Anthony Liguori wrote: On 04/21/2010 12:57 AM, Yoshiaki Tamura wrote: Make a 32bit entry after QEMU_VM_FILE_VERSION to recognize whether the transfered data is QEMU_VM_FT_MODE or QEMU_VM_LIVE_MIGRATION_MODE. I'd rather you encapsulate the current protocol as opposed to extending it with a new

Re: [RFC PATCH 15/20] Introduce FT mode support to configure.

2010-04-22 Thread Yoshiaki Tamura
Anthony Liguori wrote: On 04/21/2010 12:57 AM, Yoshiaki Tamura wrote: Signed-off-by: Yoshiaki Tamura No need for this. OK. Regards, Anthony Liguori --- configure | 8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/configure b/configure index 046c591..f0682d4 100

Re: [RFC PATCH 01/20] Modify DIRTY_FLAG value and introduce DIRTY_IDX to use as indexes of bit-based phys_ram_dirty.

2010-04-22 Thread Yoshiaki Tamura
Anthony Liguori wrote: Hi, On 04/21/2010 12:57 AM, Yoshiaki Tamura wrote: Replaces byte-based phys_ram_dirty bitmap with four (MASTER, VGA, CODE, MIGRATION) bit-based phys_ram_dirty bitmap. On allocation, it sets all bits in the bitmap. It uses ffs() to convert DIRTY_FLAG to DIRTY_IDX. Modifie

Re: [Qemu-devel] [RFC PATCH 00/20] Kemari for KVM v0.1

2010-04-22 Thread Yoshiaki Tamura
Anthony Liguori wrote: On 04/22/2010 08:16 AM, Yoshiaki Tamura wrote: 2010/4/22 Dor Laor: On 04/22/2010 01:35 PM, Yoshiaki Tamura wrote: Dor Laor wrote: On 04/21/2010 08:57 AM, Yoshiaki Tamura wrote: Hi all, We have been implementing the prototype of Kemari for KVM, and we're sending this m

[RFC PATCH] asm-generic: bitops: introduce le bit offset macro

2010-04-22 Thread Takuya Yoshikawa
Although we can use *_le_bit() helpers to treat bitmaps le arranged, having le bit offset calculation as a seperate macro gives us more freedom. For example, KVM has le arranged dirty bitmaps for VGA, live-migration, etc. and we use them in user space too. To avoid bitmap copies between kernel and

Re: [PATCH 1/5] Add a global synchronization point for pvclock

2010-04-22 Thread Zachary Amsden
On 04/22/2010 03:11 AM, Glauber Costa wrote: On Tue, Apr 20, 2010 at 12:42:17PM -0700, Jeremy Fitzhardinge wrote: On 04/20/2010 11:54 AM, Avi Kivity wrote: On 04/20/2010 09:23 PM, Jeremy Fitzhardinge wrote: On 04/20/2010 02:31 AM, Avi Kivity wrote: btw, do you wan

PXE Boot Timeout Issue...

2010-04-22 Thread Stuart Sheldon
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi all, Just upgraded to 12.3 user space tools from 11.0, and now when I attempt to netboot a guest, it appears that the pxe rom is timing out on dhcp before the bridge has enough time to come up. Is there a command line switch to set the dhcp time

Re: [RFC PATCH 00/20] Kemari for KVM v0.1

2010-04-22 Thread Yoshiaki Tamura
Anthony Liguori wrote: On 04/21/2010 12:57 AM, Yoshiaki Tamura wrote: Hi all, We have been implementing the prototype of Kemari for KVM, and we're sending this message to share what we have now and TODO lists. Hopefully, we would like to get early feedback to keep us in the right direction. Alt

Re: [Qemu-devel] [RFC PATCH 00/20] Kemari for KVM v0.1

2010-04-22 Thread Yoshiaki Tamura
Jamie Lokier wrote: Yoshiaki Tamura wrote: Dor Laor wrote: On 04/21/2010 08:57 AM, Yoshiaki Tamura wrote: Event tapping is the core component of Kemari, and it decides on which event the primary should synchronize with the secondary. The basic assumption here is that outgoing I/O operations ar

Re: [PATCH RFC v2 6/6] KVM: introduce a new API for getting dirty bitmaps

2010-04-22 Thread Alexander Graf
On 22.04.2010, at 08:09, Fernando Luis Vázquez Cao wrote: > On 04/22/2010 11:45 AM, Fernando Luis Vázquez Cao wrote: >> On 04/21/2010 06:41 PM, Alexander Graf wrote: >>> On 21.04.2010, at 10:29, Fernando Luis Vázquez Cao wrote: >>> On 04/20/2010 08:03 PM, Takuya Yoshikawa wrote: > @@ -3

Re: using ftrace with kvm

2010-04-22 Thread Manish Regmi
On Thu, Apr 22, 2010 at 3:53 PM, David S. Ahern wrote: I have a VM that is spinning (both vcpus at 100%). As I recall kvm_stat has been deprecated in favor or ftrace. Is there a wiki page or document that gives suggestions on this? David Documentation/trace/* is the place to see. but for me fun

[PATCH RFC] KVM MMU: fix hashing for TDP and non-paging modes

2010-04-22 Thread Eric Northup
I've been reading the x86's mmu.c recently and had been wondering about something. Avi's recent mmu documentation (thanks!) seems to have confirmed my understanding of how the shadow paging is supposed to be working. In TDP mode, when mmu_alloc_roots() calls kvm_mmu_get_page(), why does it pass (

using ftrace with kvm

2010-04-22 Thread David S. Ahern
I have a VM that is spinning (both vcpus at 100%). As I recall kvm_stat has been deprecated in favor or ftrace. Is there a wiki page or document that gives suggestions on this? David -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel

Re: [Qemu-devel] [RFC PATCH 00/20] Kemari for KVM v0.1

2010-04-22 Thread Dor Laor
On 04/22/2010 04:16 PM, Yoshiaki Tamura wrote: 2010/4/22 Dor Laor: On 04/22/2010 01:35 PM, Yoshiaki Tamura wrote: Dor Laor wrote: On 04/21/2010 08:57 AM, Yoshiaki Tamura wrote: Hi all, We have been implementing the prototype of Kemari for KVM, and we're sending this message to share what

Re: [Qemu-devel] [RFC PATCH 00/20] Kemari for KVM v0.1

2010-04-22 Thread Anthony Liguori
On 04/22/2010 08:16 AM, Yoshiaki Tamura wrote: 2010/4/22 Dor Laor: On 04/22/2010 01:35 PM, Yoshiaki Tamura wrote: Dor Laor wrote: On 04/21/2010 08:57 AM, Yoshiaki Tamura wrote: Hi all, We have been implementing the prototype of Kemari for KVM, and we're sending th

Re: [UNTESTED] KVM: do not call kvm_set_irq from irq disabled section

2010-04-22 Thread Gleb Natapov
On Thu, Apr 22, 2010 at 04:40:30PM -0300, Marcelo Tosatti wrote: > On Thu, Apr 22, 2010 at 09:11:30PM +0300, Gleb Natapov wrote: > > On Thu, Apr 22, 2010 at 01:40:38PM -0300, Marcelo Tosatti wrote: > > > On Wed, Apr 21, 2010 at 09:38:39PM +0300, Gleb Natapov wrote: > > > > On Wed, Apr 21, 2010 at 0

Re: [RFC PATCH 05/20] Introduce put_vector() and get_vector to QEMUFile and qemu_fopen_ops().

2010-04-22 Thread Anthony Liguori
On 04/21/2010 12:57 AM, Yoshiaki Tamura wrote: QEMUFile currently doesn't support writev(). For sending multiple data, such as pages, using writev() should be more efficient. Signed-off-by: Yoshiaki Tamura Is there performance data that backs this up? Since QEMUFile uses a linear buffer

Re: [RFC PATCH 00/20] Kemari for KVM v0.1

2010-04-22 Thread Anthony Liguori
On 04/21/2010 12:57 AM, Yoshiaki Tamura wrote: Hi all, We have been implementing the prototype of Kemari for KVM, and we're sending this message to share what we have now and TODO lists. Hopefully, we would like to get early feedback to keep us in the right direction. Although advanced approac

Re: [UNTESTED] KVM: do not call kvm_set_irq from irq disabled section

2010-04-22 Thread Marcelo Tosatti
On Thu, Apr 22, 2010 at 09:11:30PM +0300, Gleb Natapov wrote: > On Thu, Apr 22, 2010 at 01:40:38PM -0300, Marcelo Tosatti wrote: > > On Wed, Apr 21, 2010 at 09:38:39PM +0300, Gleb Natapov wrote: > > > On Wed, Apr 21, 2010 at 03:29:11PM -0300, Marcelo Tosatti wrote: > > > > On Wed, Apr 21, 2010 at 0

Re: [RFC PATCH 19/20] Insert do_event_tap() to virtio-{blk, net}, comment out assert() on cpu_single_env temporally.

2010-04-22 Thread Anthony Liguori
On 04/21/2010 12:57 AM, Yoshiaki Tamura wrote: do_event_tap() is inserted to functions which actually fire outputs. By synchronizing VMs before outputs are fired, we can failover to the receiver upon failure. To save VM continuously, comment out assert() on cpu_single_env temporally. Signed-off

Re: [RFC PATCH 15/20] Introduce FT mode support to configure.

2010-04-22 Thread Anthony Liguori
On 04/21/2010 12:57 AM, Yoshiaki Tamura wrote: Signed-off-by: Yoshiaki Tamura No need for this. Regards, Anthony Liguori --- configure |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/configure b/configure index 046c591..f0682d4 100755 --- a/configure +

Re: [RFC PATCH 14/20] Upgrade QEMU_FILE_VERSION from 3 to 4, and introduce qemu_savevm_state_all().

2010-04-22 Thread Anthony Liguori
On 04/21/2010 12:57 AM, Yoshiaki Tamura wrote: Make a 32bit entry after QEMU_VM_FILE_VERSION to recognize whether the transfered data is QEMU_VM_FT_MODE or QEMU_VM_LIVE_MIGRATION_MODE. I'd rather you encapsulate the current protocol as opposed to extending it with a new version. You coul

Re: [RFC PATCH 10/20] Introduce skip_header parameter to qemu_loadvm_state() so that it can be called iteratively without reading the header.

2010-04-22 Thread Anthony Liguori
On 04/21/2010 12:57 AM, Yoshiaki Tamura wrote: Signed-off-by: Yoshiaki Tamura I think the more appropriate thing to do is have qemu_savevm_state_complete() not write QEMU_VM_EOF when doing a continuous live migration. You would then want qemu_loadvm_state() to detect real EOF and treat

Re: [PATCH 6/10] KVM MMU: don't write-protect if have new mapping to unsync page

2010-04-22 Thread Marcelo Tosatti
On Thu, Apr 22, 2010 at 02:13:04PM +0800, Xiao Guangrong wrote: > If have new mapping to the unsync page(i.e, add a new parent), just > update the page from sp->gfn but not write-protect gfn, and if need > create new shadow page form sp->gfn, we should sync it > > Signed-off-by: Xiao Guangrong >

Re: [RFC PATCH 08/20] Introduce RAMSaveIO and use cpu_physical_memory_get_dirty_range() to check multiple dirty pages.

2010-04-22 Thread Anthony Liguori
On 04/21/2010 12:57 AM, Yoshiaki Tamura wrote: Introduce RAMSaveIO to use writev for saving ram blocks, and modifies ram_save_block() and ram_save_remaining() to use cpu_physical_memory_get_dirty_range() to check multiple dirty and non-dirty pages at once. Signed-off-by: Yoshiaki Tamura Signed-o

Re: [RFC PATCH 07/20] Introduce qemu_put_vector() and qemu_put_vector_prepare() to use put_vector() in QEMUFile.

2010-04-22 Thread Anthony Liguori
On 04/21/2010 12:57 AM, Yoshiaki Tamura wrote: For fool proof purpose, qemu_put_vector_parepare should be called before qemu_put_vector. Then, if qemu_put_* functions except this is called after qemu_put_vector_prepare, program will abort(). Signed-off-by: Yoshiaki Tamura I don't get it.

Re: [RFC PATCH 01/20] Modify DIRTY_FLAG value and introduce DIRTY_IDX to use as indexes of bit-based phys_ram_dirty.

2010-04-22 Thread Anthony Liguori
Hi, On 04/21/2010 12:57 AM, Yoshiaki Tamura wrote: Replaces byte-based phys_ram_dirty bitmap with four (MASTER, VGA, CODE, MIGRATION) bit-based phys_ram_dirty bitmap. On allocation, it sets all bits in the bitmap. It uses ffs() to convert DIRTY_FLAG to DIRTY_IDX. Modifies wrapper functions fo

Re: [UNTESTED] KVM: do not call kvm_set_irq from irq disabled section

2010-04-22 Thread Gleb Natapov
On Thu, Apr 22, 2010 at 01:40:38PM -0300, Marcelo Tosatti wrote: > On Wed, Apr 21, 2010 at 09:38:39PM +0300, Gleb Natapov wrote: > > On Wed, Apr 21, 2010 at 03:29:11PM -0300, Marcelo Tosatti wrote: > > > On Wed, Apr 21, 2010 at 08:58:48PM +0300, Gleb Natapov wrote: > > > > On Wed, Apr 21, 2010 at 0

Re: [PATCH v4] Add mergeable RX bufs support to vhost

2010-04-22 Thread Michael S. Tsirkin
On Thu, Apr 22, 2010 at 11:59:55AM -0600, David Stevens wrote: > "Michael S. Tsirkin" wrote on 04/22/2010 10:43:49 AM: > > > On Mon, Apr 19, 2010 at 03:12:19PM -0700, David L Stevens wrote: > > > This patch adds the mergeable RX buffers feature to vhost. > > > > > > Signed-off-by: David L Steven

Re: [PATCH v4] Add mergeable RX bufs support to vhost

2010-04-22 Thread David Stevens
"Michael S. Tsirkin" wrote on 04/22/2010 10:43:49 AM: > On Mon, Apr 19, 2010 at 03:12:19PM -0700, David L Stevens wrote: > > This patch adds the mergeable RX buffers feature to vhost. > > > > Signed-off-by: David L Stevens > > BTW, which userspace should I use for testing this? I use

Re: [PATCH v4] Add mergeable RX bufs support to vhost

2010-04-22 Thread Michael S. Tsirkin
On Thu, Apr 22, 2010 at 11:47:15AM -0600, David Stevens wrote: > "Michael S. Tsirkin" wrote on 04/22/2010 05:02:25 AM: > > > On Mon, Apr 19, 2010 at 03:12:19PM -0700, David L Stevens wrote: > > > This patch adds the mergeable RX buffers feature to vhost. > > > > > > Signed-off-by: David L Steven

Re: [PATCH v4] Add mergeable RX bufs support to vhost

2010-04-22 Thread Michael S. Tsirkin
On Mon, Apr 19, 2010 at 03:12:19PM -0700, David L Stevens wrote: > This patch adds the mergeable RX buffers feature to vhost. > > Signed-off-by: David L Stevens BTW, which userspace should I use for testing this? -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a

Re: [PATCH v4] Add mergeable RX bufs support to vhost

2010-04-22 Thread David Stevens
"Michael S. Tsirkin" wrote on 04/22/2010 05:02:25 AM: > On Mon, Apr 19, 2010 at 03:12:19PM -0700, David L Stevens wrote: > > This patch adds the mergeable RX buffers feature to vhost. > > > > Signed-off-by: David L Stevens > > Looks pretty clean to me. > Could you send a checkpatch-clean versi

[PATCH] Enable pvclock flags in vcpu_time_info structure

2010-04-22 Thread Glauber Costa
This patch removes one padding byte and transform it into a flags field. New versions of guests using pvclock will query these flags upon each read. Flags, however, will only be interpreted when the guest decides to. It uses the pvclock_valid_flags function to signal that a specific set of flags s

KVM_SET_MP_STATE is undocumented

2010-04-22 Thread Pekka Enberg
Hi! I noticed that QEMU uses KVM_SET_MP_STATE but the ioctl() is completely undocumented. I assume it has something to do with multiprocessor but I am unable to work out the details unless I take a peek at arch/x86/kvm. Pekka -- To unsubscribe from this list: send the

Re: [UNTESTED] KVM: do not call kvm_set_irq from irq disabled section

2010-04-22 Thread Marcelo Tosatti
On Wed, Apr 21, 2010 at 09:38:39PM +0300, Gleb Natapov wrote: > On Wed, Apr 21, 2010 at 03:29:11PM -0300, Marcelo Tosatti wrote: > > On Wed, Apr 21, 2010 at 08:58:48PM +0300, Gleb Natapov wrote: > > > On Wed, Apr 21, 2010 at 02:37:34PM -0300, Marcelo Tosatti wrote: > > > > On Wed, Apr 21, 2010 at 0

Re: [Qemu-devel] [RFC PATCH 00/20] Kemari for KVM v0.1

2010-04-22 Thread Jamie Lokier
Yoshiaki Tamura wrote: > Dor Laor wrote: > >On 04/21/2010 08:57 AM, Yoshiaki Tamura wrote: > >>Event tapping is the core component of Kemari, and it decides on which > >>event the > >>primary should synchronize with the secondary. The basic assumption > >>here is > >>that outgoing I/O operations ar

Re: [PATCH] qemu-kvm: Ask kernel about supported svm features

2010-04-22 Thread Avi Kivity
On 04/22/2010 03:28 PM, Joerg Roedel wrote: Yes. -cpu host should take KVM_GET_SUPPORTED_CPUID output and loop it back to the vcpu configuration, others just take the qemu configuration, mask it with supported bits, and pass it back (see check_features_against_host()). Hmm, the plan was

Re: [Qemu-devel] [RFC PATCH 00/20] Kemari for KVM v0.1

2010-04-22 Thread Yoshiaki Tamura
2010/4/22 Dor Laor : > On 04/22/2010 01:35 PM, Yoshiaki Tamura wrote: >> >> Dor Laor wrote: >>> >>> On 04/21/2010 08:57 AM, Yoshiaki Tamura wrote: Hi all, We have been implementing the prototype of Kemari for KVM, and we're sending this message to share what we have no

Re: [PATCH 1/5] Add a global synchronization point for pvclock

2010-04-22 Thread Glauber Costa
On Tue, Apr 20, 2010 at 12:42:17PM -0700, Jeremy Fitzhardinge wrote: > On 04/20/2010 11:54 AM, Avi Kivity wrote: > > On 04/20/2010 09:23 PM, Jeremy Fitzhardinge wrote: > >> On 04/20/2010 02:31 AM, Avi Kivity wrote: > >> > >>> btw, do you want this code in pvclock.c, or shall we keep it kvmclock

Re: [Qemu-devel] [RFC PATCH 00/20] Kemari for KVM v0.1

2010-04-22 Thread Yoshiaki Tamura
2010/4/22 Takuya Yoshikawa : > (2010/04/22 19:35), Yoshiaki Tamura wrote: > >> >>> A trivial one would we to : >>> - do X online snapshots/sec >> >> I currently don't have good numbers that I can share right now. >> Snapshots/sec depends on what kind of workload is running, and if the >> guest was

[qemu-kvm tests 3/3] qemu-kvm tests cleanup: Added printing for passing tests Also typo fix

2010-04-22 Thread Naphtali Sprei
Signed-off-by: Naphtali Sprei --- kvm/user/test/x86/realmode.c | 106 +++-- 1 files changed, 100 insertions(+), 6 deletions(-) diff --git a/kvm/user/test/x86/realmode.c b/kvm/user/test/x86/realmode.c index bfc2942..bc4ed97 100644 --- a/kvm/user/test/x86/real

[qemu-kvm tests 2/3] qemu-kvm tests cleanup: adapt stringio test to kernel-mode run

2010-04-22 Thread Naphtali Sprei
Also use testdev for output, call exit to quit. Currently, test reboots endlessly because of a triple-fault. Need to run test with -no-reboot till issue fixed (in kvm ??) Signed-off-by: Naphtali Sprei --- kvm/user/config-x86-common.mak |2 +- kvm/user/test/x86/stringio.S | 13 +--

[qemu-kvm tests 1/3] qemu-kvm tests cleanup

2010-04-22 Thread Naphtali Sprei
Mainly removed unused/unnecessary files and references to them Signed-off-by: Naphtali Sprei --- kvm/user/README| 23 ++ kvm/user/balloon_ctl.c | 92 -- kvm/user/bootstrap.lds | 15 - kvm/user/config-x86-common.mak | 24 +-- kvm/user/config-x86_64.mak

[qemu-kvm tests 0/3] qemu-kvm tests cleanup

2010-04-22 Thread Naphtali Sprei
Cleanup, mostly x86 oriented. Patches against 'next' branch. Naphtali Sprei (3): qemu-kvm tests cleanup qemu-kvm tests cleanup: adapt stringio test to kernel-mode run qemu-kvm tests cleanup: Added printing for passing tests Also typo fix kvm/user/README| 23 ++ kvm/us

Re: [PATCH] qemu-kvm: Ask kernel about supported svm features

2010-04-22 Thread Joerg Roedel
On Thu, Apr 22, 2010 at 03:13:14PM +0300, Avi Kivity wrote: > On 04/22/2010 03:02 PM, Joerg Roedel wrote: >> We can't just take the host-cpuid >> because most of the additional svm features need special emulation in >> the kernel. Or do you think this should better be handled in >> target-i386/cpu

Re: [Qemu-devel] [RFC PATCH 00/20] Kemari for KVM v0.1

2010-04-22 Thread Dor Laor
On 04/22/2010 01:35 PM, Yoshiaki Tamura wrote: Dor Laor wrote: On 04/21/2010 08:57 AM, Yoshiaki Tamura wrote: Hi all, We have been implementing the prototype of Kemari for KVM, and we're sending this message to share what we have now and TODO lists. Hopefully, we would like to get early feedba

Re: [PATCH] qemu-kvm: Ask kernel about supported svm features

2010-04-22 Thread Avi Kivity
On 04/22/2010 03:02 PM, Joerg Roedel wrote: Signed-off-by: Joerg Roedel --- qemu-kvm-x86.c | 14 -- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c index 748ff69..6eccd69 100644 --- a/qemu-kvm-x86.c +++ b/qemu-kvm-x86.c @@ -1327,8

Re: [PATCH v4] Add mergeable RX bufs support to vhost

2010-04-22 Thread Michael S. Tsirkin
On Mon, Apr 19, 2010 at 03:12:19PM -0700, David L Stevens wrote: > This patch adds the mergeable RX buffers feature to vhost. > > Signed-off-by: David L Stevens Looks pretty clean to me. Could you send a checkpatch-clean version please? We should also check performance implications. Do you have

Re: [PATCH] qemu-kvm: Ask kernel about supported svm features

2010-04-22 Thread Joerg Roedel
On Thu, Apr 22, 2010 at 02:07:14PM +0300, Avi Kivity wrote: > On 04/22/2010 01:57 PM, Joerg Roedel wrote: > >This patch adds code to ask the kernel about the svm > >features it supports for its guests and propagates them to > >the guest. The new capability is necessary because the old > >behavior o

Re: [Qemu-devel] [RFC PATCH 00/20] Kemari for KVM v0.1

2010-04-22 Thread Takuya Yoshikawa
(2010/04/22 19:35), Yoshiaki Tamura wrote: A trivial one would we to : - do X online snapshots/sec I currently don't have good numbers that I can share right now. Snapshots/sec depends on what kind of workload is running, and if the guest was almost idle, there will be no snapshots in 5sec.

Re: [PATCH] kvm vmx: free vpid when fail to create vcpu

2010-04-22 Thread Avi Kivity
On 04/17/2010 11:41 AM, Lai Jiangshan wrote: Fix bug of the exception path, free allocated vpid when fail to create vcpu. Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a mess

Re: [PATCH] qemu-kvm: Ask kernel about supported svm features

2010-04-22 Thread Avi Kivity
On 04/22/2010 01:57 PM, Joerg Roedel wrote: This patch adds code to ask the kernel about the svm features it supports for its guests and propagates them to the guest. The new capability is necessary because the old behavior of the kernel was to just return the host svm features but every svm-feat

Re: [PATCH 0/8] More fixes for nested svm

2010-04-22 Thread Avi Kivity
On 04/22/2010 01:33 PM, Joerg Roedel wrote: Hi Avi, Marcelo, here is another set of nested svm fixes. They fix NMI code to make UP Hyper-V root domain booting. The patches also add better handling for nested entry failures and mce intercepts. Also in this patchset are the fixes for the supported

[PATCH] qemu-kvm: Ask kernel about supported svm features

2010-04-22 Thread Joerg Roedel
This patch adds code to ask the kernel about the svm features it supports for its guests and propagates them to the guest. The new capability is necessary because the old behavior of the kernel was to just return the host svm features but every svm-feature needs emulation in the nested svm kernel c

Re: [Qemu-devel] [RFC PATCH 00/20] Kemari for KVM v0.1

2010-04-22 Thread Yoshiaki Tamura
Dor Laor wrote: On 04/21/2010 08:57 AM, Yoshiaki Tamura wrote: Hi all, We have been implementing the prototype of Kemari for KVM, and we're sending this message to share what we have now and TODO lists. Hopefully, we would like to get early feedback to keep us in the right direction. Although a

[PATCH 2/8] KVM: SVM: Make sure rip is synced to vmcb before nested vmexit

2010-04-22 Thread Joerg Roedel
This patch fixes a bug where a nested guest always went over the same instruction because the rip was not advanced on a nested vmexit. Signed-off-by: Joerg Roedel --- arch/x86/kvm/svm.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/svm.c b/arch/x86/

[PATCH 0/8] More fixes for nested svm

2010-04-22 Thread Joerg Roedel
Hi Avi, Marcelo, here is another set of nested svm fixes. They fix NMI code to make UP Hyper-V root domain booting. The patches also add better handling for nested entry failures and mce intercepts. Also in this patchset are the fixes for the supported cpuid reporting for svm features. These patch

[PATCH 5/8] KVM: X86: Add callback to let modules decide over some supported cpuid bits

2010-04-22 Thread Joerg Roedel
This patch adds the get_supported_cpuid callback to kvm_x86_ops. It will be used in do_cpuid_ent to delegate the decission about some supported cpuid bits to the architecture modules. Cc: sta...@kernel.org Signed-off-by: Joerg Roedel --- arch/x86/include/asm/kvm_host.h |2 ++ arch/x86/kvm/sv

[PATCH 6/8] KVM: SVM: Report emulated SVM features to userspace

2010-04-22 Thread Joerg Roedel
This patch implements the reporting of the emulated SVM features to userspace instead of the real hardware capabilities. Every real hardware capability needs emulation in nested svm so the old behavior was broken. Cc: sta...@kernel.org Signed-off-by: Joerg Roedel --- arch/x86/kvm/svm.c | 10 ++

[PATCH 7/8] KVM: x86: Allow marking an exception as reinjected

2010-04-22 Thread Joerg Roedel
This patch adds logic to kvm/x86 which allows to mark an injected exception as reinjected. This allows to remove an ugly hack from svm_complete_interrupts that prevented exceptions from being reinjected at all in the nested case. The hack was necessary because an reinjected exception into the neste

[PATCH 8/8] KVM: SVM: Handle MCE intercepts always on host level

2010-04-22 Thread Joerg Roedel
This patch prevents MCE intercepts from being propagated into the L1 guest if they happened in an L2 guest. Signed-off-by: Joerg Roedel --- arch/x86/kvm/svm.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 30e49fe..889f660 1

[PATCH 3/8] KVM: SVM: Sync cr0 and cr3 to kvm state before nested handling

2010-04-22 Thread Joerg Roedel
This patch syncs cr0 and cr3 from the vmcb to the kvm state before nested intercept handling is done. This allows to simplify the vmexit path. Signed-off-by: Joerg Roedel --- arch/x86/kvm/svm.c | 15 ++- 1 files changed, 6 insertions(+), 9 deletions(-) diff --git a/arch/x86/kvm/sv

[PATCH 4/8] KVM: SVM: Propagate nested entry failure into guest hypervisor

2010-04-22 Thread Joerg Roedel
This patch implements propagation of a failes guest vmrun back into the guest instead of killing the whole guest. Signed-off-by: Joerg Roedel --- arch/x86/kvm/svm.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 5ad9d80..

[PATCH 1/8] KVM: SVM: Fix nested nmi handling

2010-04-22 Thread Joerg Roedel
The patch introducing nested nmi handling had a bug. The check does not belong to enable_nmi_window but must be in nmi_allowed. This patch fixes this. Signed-off-by: Joerg Roedel --- arch/x86/kvm/svm.c | 16 +--- 1 files changed, 9 insertions(+), 7 deletions(-) diff --git a/arch/x

RE: [PATCH V5 1/3] perf & kvm: Enhance perf to collect KVM guest os statistics from host side

2010-04-22 Thread Liu Yu-B13201
> -Original Message- > From: kvm-ow...@vger.kernel.org > [mailto:kvm-ow...@vger.kernel.org] On Behalf Of Zhang, Yanmin > Sent: Monday, April 19, 2010 1:33 PM > To: Avi Kivity > Cc: Ingo Molnar; Peter Zijlstra; Avi Kivity; Sheng Yang; > linux-ker...@vger.kernel.org; kvm@vger.kernel.org;

32-bit color graphic on KVM virtual machines

2010-04-22 Thread shacky
Hi. Is it possible to have 32-bit color graphic on KVM virtual machines? I installed a Windows virtual machine, but it allows me to configure only 24-bit color display and it does not have any display driver installed. Is there a way to solve this problem? Thank youv very much! Bye. -- To unsubsc

Re: [RFC][PATCH v3 2/3] Provides multiple submits and asynchronous notifications.

2010-04-22 Thread Michael S. Tsirkin
On Thu, Apr 22, 2010 at 04:37:16PM +0800, xiaohui@intel.com wrote: > From: Xin Xiaohui > > The vhost-net backend now only supports synchronous send/recv > operations. The patch provides multiple submits and asynchronous > notifications. This is needed for zero-copy case. > > Signed-off-by: X

[PATCH 3/3] KVM MMU: Take sp level into account when calculating quadran

2010-04-22 Thread Gui Jianfeng
Take sp level into account when calculating quadrant, because only when level == PT_PAGE_TABLE_LEVEL, quadrant is needed. Signed-off-by: Gui Jianfeng --- arch/x86/kvm/mmu.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 64

[PATCH 2/3] KVM MMU: fix sp->unsync type error in trace event definition.

2010-04-22 Thread Gui Jianfeng
sp->unsync is bool now, so update trace event declaration. Signed-off-by: Gui Jianfeng --- arch/x86/kvm/mmutrace.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/mmutrace.h b/arch/x86/kvm/mmutrace.h index 3851f1f..9966e80 100644 --- a/arch/x86/kvm/mmutrace

[PATCH 1/3] KVM MMU: make kvm_mmu_zap_page() return the number of zapped sp in total.

2010-04-22 Thread Gui Jianfeng
Currently, in kvm_mmu_change_mmu_pages(kvm, page), "used_pages--" is performed after calling kvm_mmu_zap_page() in spite of that whether "page" is actually reclaimed. Because root sp won't be reclaimed by kvm_mmu_zap_page(). So making kvm_mmu_zap_page() return total number of reclaimed sp make

Re: [PATCH RFC v2 6/6] KVM: introduce a new API for getting dirty bitmaps

2010-04-22 Thread Takuya Yoshikawa
Thanks, I can know basic rules about kvm/api . (2010/04/21 20:46), Avi Kivity wrote: +Type: vm ioctl +Parameters: struct kvm_dirty_log (in/out) +Returns: 0 on success, -1 on error + +/* for KVM_SWITCH_DIRTY_LOG */ +struct kvm_dirty_log { + __u32 slot; + __u32 padding; Please put a flags fie

Re: [RFC][PATCH v2 0/3] Provide a zero-copy method on KVM virtio-net.

2010-04-22 Thread Michael S. Tsirkin
On Thu, Apr 22, 2010 at 04:57:56PM +0800, Xin, Xiaohui wrote: > Michael, > > >Yes, I think this packet split mode probably maps well to mergeable buffer > >support. Note that > >1. Not all devices support large packets in this way, others might map > > to indirect buffers better > > Do the indi

Re: [PATCH RFC v2 5/6] KVM: moving dirty bitmaps to user space

2010-04-22 Thread Takuya Yoshikawa
(2010/04/21 20:26), Avi Kivity wrote: r = 0; @@ -1858,7 +1866,7 @@ int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm, if (memslot->is_dirty) { kvm_flush_remote_tlbs(kvm); n = kvm_dirty_bitmap_bytes(memslot); - memset(memslot->dirty_bitmap, 0, n); + clear_user(memslot->dirty_bitmap, n); memslot->is_

RE: [RFC][PATCH v2 0/3] Provide a zero-copy method on KVM virtio-net.

2010-04-22 Thread Xin, Xiaohui
Michael, >Yes, I think this packet split mode probably maps well to mergeable buffer >support. Note that >1. Not all devices support large packets in this way, others might map > to indirect buffers better Do the indirect buffers accord to deal with the skb->frag_list? > So we have to figure

Re: [Qemu-devel] [RFC PATCH 00/20] Kemari for KVM v0.1

2010-04-22 Thread Dor Laor
On 04/21/2010 08:57 AM, Yoshiaki Tamura wrote: Hi all, We have been implementing the prototype of Kemari for KVM, and we're sending this message to share what we have now and TODO lists. Hopefully, we would like to get early feedback to keep us in the right direction. Although advanced approac

Re: [PATCH RFC v2 3/6] KVM: introduce a wrapper function to copy dirty bitmaps to user space

2010-04-22 Thread Takuya Yoshikawa
(2010/04/21 20:12), Avi Kivity wrote: On 04/20/2010 01:59 PM, Takuya Yoshikawa wrote: We will replace copy_to_user() to copy_in_user() when we move the dirty bitmaps to user space. But sadly, we have copy_in_user() only for 64 bits architectures. So this function should work as a wrapper to hid

Re: [Qemu-devel] [PATCH][STABLE] block: Free iovec arrays allocated by multiwrite_merge()

2010-04-22 Thread Kevin Wolf
Am 21.04.2010 21:35, schrieb Stefan Hajnoczi: > A new iovec array is allocated when creating a merged write request. > This patch ensures that the iovec array is deleted in addition to its > qiov owner. > > Reported-by: Leszek Urbanski > Signed-off-by: Stefan Hajnoczi Acked-by: Kevin Wolf Pic

Re:[RFC][PATCH v3 2/3] Provides multiple submits and asynchronous notifications.

2010-04-22 Thread xiaohui . xin
From: Xin Xiaohui The vhost-net backend now only supports synchronous send/recv operations. The patch provides multiple submits and asynchronous notifications. This is needed for zero-copy case. Signed-off-by: Xin Xiaohui --- Michael, >Can't vhost supply a kiocb completion callback that will

RE: Re:[RFC][PATCH v3 1/3] A device for zero-copy based on KVM virtio-net.

2010-04-22 Thread Xin, Xiaohui
Michael, Sorry, it's based on the suggestion to hook an iocb completion callback to handle the iocb list in vhost-net. Thanks Xiaohui -Original Message- From: Xin, Xiaohui Sent: Thursday, April 22, 2010 4:24 PM To: m...@redhat.com Cc: a...@arndb.de; net...@vger.kernel.org; kvm@vger.kernel

Re:[RFC][PATCH v3 1/3] A device for zero-copy based on KVM virtio-net.

2010-04-22 Thread xiaohui . xin
From: Xin Xiaohui Add a device to utilize the vhost-net backend driver for copy-less data transfer between guest FE and host NIC. It pins the guest user space to the host memory and provides proto_ops as sendmsg/recvmsg to vhost-net. Signed-off-by: Xin Xiaohui Signed-off-by: Zhao Yu Reviewed-b

Re: Timedrift in KVM guests after livemigration.

2010-04-22 Thread Thomas Treutner
On Sunday 18 April 2010 11:33:44 Espen Berg wrote: > All guest are Debian lenny with latest upstream kernel, hvm/kvm. > > We are using kvm-clock as guest source clock. > > cat /sys/devices/system/clocksource/clocksource0/current_clocksource > kvm-clock I had to deactivate C1E (AMD CPUs) and use ac

Re: [PATCH] KVM: Document mmu

2010-04-22 Thread Avi Kivity
On 04/22/2010 10:13 AM, Karl Vogel wrote: Avi Kivity wrote: +Translation +=== + +The primary job of the mmu is to program the processor's mmu to translate +addresses for the guest. Different translations are required at different +times: + +- when guest paging is disabled, we transla

Re: [PATCH] KVM: Document mmu

2010-04-22 Thread Karl Vogel
Avi Kivity wrote: +Translation +=== + +The primary job of the mmu is to program the processor's mmu to translate +addresses for the guest. Different translations are required at different +times: + +- when guest paging is disabled, we translate guest physical addresses to + host physica

Re: [Qemu-devel] Re: QEMU-KVM and video performance

2010-04-22 Thread Avi Kivity
On 04/22/2010 09:04 AM, Gerhard Wiesinger wrote: On Wed, 21 Apr 2010, Avi Kivity wrote: On 04/21/2010 09:50 PM, Gerhard Wiesinger wrote: I don't think changing VGA window is a problem because there are 500.000-1Mio changes/s possible. 1MB/s, 500k-1M changes/s Coincidence? Is it taking a

Re: [Qemu-devel] Re: QEMU-KVM and video performance

2010-04-22 Thread Avi Kivity
On 04/22/2010 08:37 AM, Gerhard Wiesinger wrote: On Wed, 21 Apr 2010, Avi Kivity wrote: On 04/21/2010 09:14 PM, Gerhard Wiesinger wrote: Can you explain which code files/functions of KVM is involved in handling VGA memory window and page switching through the port write to the VGA window re