[COMMIT master] device-assignment: Cleanup on exit

2010-06-21 Thread Avi Kivity
From: Alex Williamson alex.william...@redhat.com close() the resource fd when we're done with it. Unregister and munmap the anonymous memory for the MSIX table. Signed-off-by: Alex Williamson alex.william...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git

[COMMIT master] test: Add XSAVE unit test

2010-06-21 Thread Avi Kivity
From: Sheng Yang sh...@linux.intel.com Based on IDT test framework. Signed-off-by: Sheng Yang sh...@linux.intel.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/kvm/test/config-x86-common.mak b/kvm/test/config-x86-common.mak index 800b635..0e1ccce 100644 ---

[COMMIT master] qemu: kvm: Enable XSAVE live migration support

2010-06-21 Thread Avi Kivity
From: Sheng Yang sh...@linux.intel.com Signed-off-by: Sheng Yang sh...@linux.intel.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c index 3c33e64..4f0b1d0 100644 --- a/qemu-kvm-x86.c +++ b/qemu-kvm-x86.c @@ -772,10 +772,20 @@ static void

[COMMIT master] Fix compilation with !KVM_CAP_XSAVE

2010-06-21 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c index 4f0b1d0..1232049 100644 --- a/qemu-kvm-x86.c +++ b/qemu-kvm-x86.c @@ -784,8 +784,6 @@ void kvm_arch_load_regs(CPUState *env, int level) { struct

[COMMIT master] test: add test for pusha and popa instructions

2010-06-21 Thread Avi Kivity
From: Wei Yongjun yj...@cn.fujitsu.com This patch add test for pusha and popa instructions. Signed-off-by: Wei Yongjun yj...@cn.fujitsu.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/kvm/test/x86/realmode.c b/kvm/test/x86/realmode.c index 70a1e05..bd79348 100644 ---

[COMMIT master] qemu: kvm: Extend kvm_arch_get_supported_cpuid() to support index

2010-06-21 Thread Avi Kivity
From: Sheng Yang sh...@linux.intel.com Would use it later for XSAVE related CPUID. Signed-off-by: Sheng Yang sh...@linux.intel.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/kvm.h b/kvm.h index aab5118..16b06a4 100644 --- a/kvm.h +++ b/kvm.h @@ -152,7 +152,7 @@ bool

[COMMIT master] qemu: Enable XSAVE related CPUID

2010-06-21 Thread Avi Kivity
From: Sheng Yang sh...@linux.intel.com We can support it in KVM now. The 0xd leaf is queried from KVM. Signed-off-by: Sheng Yang sh...@linux.intel.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/target-i386/cpuid.c b/target-i386/cpuid.c index fb78061..26e4054 100644 ---

[COMMIT master] device-assignment, msi: PBA is long

2010-06-21 Thread Avi Kivity
From: Hidetoshi Seto seto.hideto...@jp.fujitsu.com Accidentally a pci_read_long() was replaced with assigned_dev_pci_read_byte() by the commit: commit a81a1f0a7410976be7dbc9a81524a8640f446ab5 Author: Alex Williamson alex.william...@redhat.com device-assignment: Don't use libpci

[COMMIT master] Synchronize kernel headers

2010-06-21 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/kvm/include/linux/kvm.h b/kvm/include/linux/kvm.h index 6485981..e46729e 100644 --- a/kvm/include/linux/kvm.h +++ b/kvm/include/linux/kvm.h @@ -103,7 +103,7 @@ struct

[COMMIT master] KVM: Fix mov cr4 #GP at wrong instruction

2010-06-21 Thread Avi Kivity
From: Avi Kivity a...@redhat.com On Intel, we call skip_emulated_instruction() even if we injected a #GP, resulting in the #GP pointing at the wrong address. Fix by injecting the exception and skipping the instruction at the same place, so we can do just one or the other. Signed-off-by: Avi

[COMMIT master] KVM: Fix mov cr3 #GP at wrong instruction

2010-06-21 Thread Avi Kivity
From: Avi Kivity a...@redhat.com On Intel, we call skip_emulated_instruction() even if we injected a #GP, resulting in the #GP pointing at the wrong address. Fix by injecting the exception and skipping the instruction at the same place, so we can do just one or the other. Signed-off-by: Avi

[COMMIT master] KVM: x86: XSAVE/XRSTOR live migration support

2010-06-21 Thread Avi Kivity
From: Sheng Yang sh...@linux.intel.com This patch enable save/restore of xsave state. Signed-off-by: Sheng Yang sh...@linux.intel.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt index 159b4ef..ffba03f 100644 ---

[COMMIT master] KVM: MMU: rename 'page' and 'shadow_page' to 'sp'

2010-06-21 Thread Avi Kivity
From: Xiao Guangrong xiaoguangr...@cn.fujitsu.com Rename 'page' and 'shadow_page' to 'sp' to better fit the context Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h

[COMMIT master] KVM: MMU: clear unsync_child_bitmap completely

2010-06-21 Thread Avi Kivity
From: Xiao Guangrong xiaoguangr...@cn.fujitsu.com In current code, some page's unsync_child_bitmap is not cleared completely in mmu_sync_children(), for example, if two PDPEs shard one PDT, one of PDPE's unsync_child_bitmap is not cleared. Currently, it not harm anything just little overload,

[COMMIT master] KVM: MMU: avoid double write protected in sync page path

2010-06-21 Thread Avi Kivity
From: Xiao Guangrong xiaoguangr...@cn.fujitsu.com The sync page is already write protected in mmu_sync_children(), don't write protected it again Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/mmu.c

[COMMIT master] KVM: MMU: cleanup for dirty page judgment

2010-06-21 Thread Avi Kivity
From: Xiao Guangrong xiaoguangr...@cn.fujitsu.com Using wrap function to cleanup page dirty judgment Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h index

[COMMIT master] KVM: MMU: cleanup for __mmu_unsync_walk()

2010-06-21 Thread Avi Kivity
From: Xiao Guangrong xiaoguangr...@cn.fujitsu.com Decrease sp-unsync_children after clear unsync_child_bitmap bit Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index

[COMMIT master] Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6

2010-06-21 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com -- To unsubscribe from this list: send the line unsubscribe kvm-commits in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[COMMIT master] KVM: Fix typos in Documentation/kvm/mmu.txt

2010-06-21 Thread Avi Kivity
From: Jason Wang jasow...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/Documentation/kvm/mmu.txt b/Documentation/kvm/mmu.txt index 8cb42b9..142cc51 100644 --- a/Documentation/kvm/mmu.txt +++ b/Documentation/kvm/mmu.txt

[COMMIT master] KVM: x86 emulator: fix pusha instruction emulation

2010-06-21 Thread Avi Kivity
From: Wei Yongjun yj...@cn.fujitsu.com emulate pusha instruction only writeback the last EDI register, but the other registers which need to be writeback is ignored. This patch fixed it. Signed-off-by: Wei Yongjun yj...@cn.fujitsu.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff

[COMMIT master] KVM: x86 emulator: fix group3 instruction decoding

2010-06-21 Thread Avi Kivity
From: Wei Yongjun yj...@cn.fujitsu.com Group 3 instruction with ModRM reg field as 001 is defined as test instruction under AMD arch, and emulate_grp3() is ready for emulate it, so fix the decoding. static inline int emulate_grp3(...) { ... switch (c-modrm_reg) { case 0

[COMMIT master] KVM: x86: Allow any LAPIC to accept PIC interrupts

2010-06-21 Thread Avi Kivity
From: Chris Lalancette clala...@redhat.com If the guest wants to accept timer interrupts on a CPU other than the BSP, we need to remove this gate. Signed-off-by: Chris Lalancette clala...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/lapic.c

[COMMIT master] net: fix deliver_no_wcard regression on loopback device

2010-06-21 Thread Avi Kivity
From: John Fastabend john.r.fastab...@intel.com deliver_no_wcard is not being set in skb_copy_header. In the skb_cloned case it is not being cleared and may cause the skb to be dropped when the loopback device pushes it back up the stack. Signed-off-by: John Fastabend john.r.fastab...@intel.com

[COMMIT master] KVM: Fix xsave and xcr save/restore memory leak

2010-06-21 Thread Avi Kivity
From: Avi Kivity a...@redhat.com We allocate temporary kernel buffers for these structures, but never free them. Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index d3d008e..d513e57 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@

[COMMIT master] KVM: x86: In DM_LOWEST, only deliver interrupts to vcpus with enabled LAPIC's

2010-06-21 Thread Avi Kivity
From: Chris Lalancette clala...@redhat.com Otherwise we might try to deliver a timer interrupt to a cpu that can't possibly handle it. Signed-off-by: Chris Lalancette clala...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c

[COMMIT master] device-assignment: Don't deassign when the assignment fails

2010-06-21 Thread Avi Kivity
From: Alex Williamson alex.william...@redhat.com The last thing assign_device() does is call into KVM_ASSIGN_PCI_DEVICE. If that fails, the device is not assigned, so we shouldn't then try to deassign it. If you try to assign the same device multiple times, you can get into a nasty

[COMMIT master] test: Add IDT framework

2010-06-21 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Signed-off-by: Sheng Yang sh...@linux.intel.com Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/kvm/test/config-x86-common.mak b/kvm/test/config-x86-common.mak index c97de52..800b635 100644 ---

Re: [PATCH 1/2] Add 'serial' attribute to virtio-blk devices

2010-06-21 Thread john cooper
Rusty Russell wrote: On Sat, 19 Jun 2010 04:08:02 am Ryan Harper wrote: Create a new attribute for virtio-blk devices that will fetch the serial number of the block device. This attribute can be used by udev to create disk/by-id symlinks for devices that don't have a UUID (filesystem)

[PATCH 1/2] KVM: Keep slot ID in memory slot structure

2010-06-21 Thread Avi Kivity
May be used for distinguishing between internal and user slots, or for sorting slots in size order. Signed-off-by: Avi Kivity a...@redhat.com --- include/linux/kvm_host.h |1 + virt/kvm/kvm_main.c |1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git

[PATCH 2/2] KVM: Prevent internal slots from being COWed

2010-06-21 Thread Avi Kivity
If a process with a memory slot is COWed, the page will change its address (despite having an elevated reference count). This breaks internal memory slots which have their physical addresses loaded into vmcs registers (see the APIC access memory slot). Signed-off-by: Avi Kivity a...@redhat.com

[PATCH 0/2] Fix failures caused by fork() interaction with internal slots

2010-06-21 Thread Avi Kivity
fork() has a WONTFIX bug where a page with an elevated reference count will be COWed such that the page address changes even in the process which has taken the reference. This interacts badly with internal memory slots that install pages in vmcs registers, such as the APIC access page. This

Re: [PATCH] Update .gitignore

2010-06-21 Thread Avi Kivity
On 06/21/2010 08:24 AM, Hidetoshi Seto wrote: I think some people have noticed that: $ ./configure $ make $ git status # On branch master # Untracked files: # (use git add file... to include in what will be committed) # # QMP/qmp-commands.txt # libdis-user/ #

Re: kvm-s390: Dont exit SIE on SIGP sense running

2010-06-21 Thread Avi Kivity
On 06/18/2010 12:16 AM, Christian Borntraeger wrote: Avi, Marcello, Newer (guest) kernels use sigp sense running in their spinlock implementation to check if the other cpu is running before yielding the processor. This revealed some wrong guest settings, causing unnecessary exits for every sigp

[PATCH 0/2] July 2010 feature removal

2010-06-21 Thread Avi Kivity
As advertised, two features are scheduled for removal now: aliases and kernel-allocated memory regions. Remove them. Avi Kivity (2): KVM: Remove memory alias support KVM: Remove kernel-allocated memory regions Documentation/feature-removal-schedule.txt | 21

[PATCH 2/2] KVM: Remove kernel-allocated memory regions

2010-06-21 Thread Avi Kivity
Equivalent (and better) functionality is provided by user-allocated memory regions. Signed-off-by: Avi Kivity a...@redhat.com --- Documentation/feature-removal-schedule.txt | 10 -- Documentation/kvm/api.txt | 24 +--- arch/x86/kvm/x86.c

[PATCH 1/2] KVM: Remove memory alias support

2010-06-21 Thread Avi Kivity
As advertised in feature-removal-schedule.txt. Equivalent support is provided by overlapping memory regions. Signed-off-by: Avi Kivity a...@redhat.com --- Documentation/feature-removal-schedule.txt | 11 --- Documentation/kvm/api.txt | 12 +--- arch/ia64/kvm/kvm-ia64.c

[PATCH] do not enter vcpu again if it was stopped during IO

2010-06-21 Thread Gleb Natapov
To prevent reentering vcpu after IO completion it is not enough to set env-stopped since it is checked only in main loop but control will not get there until next non-IO exit since kvm_run() will reenter vcpu to complete IO instruction. Solve this by sending self-signal to request exit after IO

[PATCH] QEMU: Update .gitignore

2010-06-21 Thread Hidetoshi Seto
(2010/06/21 17:19), Avi Kivity wrote: On 06/21/2010 08:24 AM, Hidetoshi Seto wrote: I think some people have noticed that: $ ./configure $ make $ git status # On branch master # Untracked files: # (use git add file... to include in what will be committed) # #

[PATCH V2 1/5] ara virt interface of perf to support kvm guest os statistics collection in guest os

2010-06-21 Thread Zhang, Yanmin
Here is the version 2. ChangeLog since V1: Mostly changes based on Avi's suggestions. 1) Use a id to identify the perf_event between host and guest; 2) Changes lots of codes to deal with malicious guest os; 3) Add a perf_event number limitation per gust os instance;

[PATCH V2 2/5] ara virt interface of perf to support kvm guest os statistics collection in guest os

2010-06-21 Thread Zhang, Yanmin
The 2nd patch is to change the definition of perf_event to facilitate perf attr copy when a hypercall happens. Signed-off-by: Zhang Yanmin yanmin_zh...@linux.intel.com --- --- linux-2.6_tip0620/include/linux/perf_event.h2010-06-21 15:19:52.821999849 +0800 +++

[PATCH V2 3/5] ara virt interface of perf to support kvm guest os statistics collection in guest os

2010-06-21 Thread Zhang, Yanmin
The 3rd patch is to implement para virt perf at host kernel. Signed-off-by: Zhang Yanmin yanmin_zh...@linux.intel.com --- --- linux-2.6_tip0620/arch/x86/include/asm/kvm_para.h 2010-06-21 15:19:38.992999849 +0800 +++ linux-2.6_tip0620perfkvm/arch/x86/include/asm/kvm_para.h2010-06-21

[PATCH V2 5/5] ara virt interface of perf to support kvm guest os statistics collection in guest os

2010-06-21 Thread Zhang, Yanmin
The 5th patch is applied to the latest qemu-kvm tree. Signed-off-by: Zhang Yanmin yanmin_zh...@linux.intel.com --- diff -Nraup qemu-kvm_0621/kvm/include/linux/kvm.h qemu-kvm_0621_perf/kvm/include/linux/kvm.h --- qemu-kvm_0621/kvm/include/linux/kvm.h 2010-06-21 11:00:28.0 +0800

[PATCH V2 4/5] ara virt interface of perf to support kvm guest os statistics collection in guest os

2010-06-21 Thread Zhang, Yanmin
The 4th patch is to implement para virt perf at guest side. Signed-off-by: Zhang Yanmin yanmin_zh...@linux.intel.com --- --- linux-2.6_tip0620/arch/x86/Kconfig 2010-06-21 15:19:39.180999849 +0800 +++ linux-2.6_tip0620perfkvm/arch/x86/Kconfig 2010-06-21 15:21:39.30849 +0800 @@ -552,6

[PATCH] KVM Test: Fix invalid literal bug in ioquit

2010-06-21 Thread Feng Yang
Sometime check_cmd could not finish in setting time. Then o=, so int(o) will cause ValueError: invalid literal for int() with base 10: '' So change to check return status. Signed-off-by: Feng Yang fy...@redhat.com --- client/tests/kvm/tests/ioquit.py |6 +++---

Re: kvm-s390: Dont exit SIE on SIGP sense running

2010-06-21 Thread Christian Borntraeger
Am Montag 21 Juni 2010, 10:27:50 schrieb Avi Kivity: [...] VCPU_EVENT(vcpu, 3, %s, free cpu); + clear_bit(63 - vcpu-vcpu_id, (unsigned long *)vcpu-kvm-arch.sca-mcn); if (vcpu-kvm-arch.sca-cpu[vcpu-vcpu_id].sda == (__u64) vcpu-arch.sie_block)

Re: kvm-s390: Dont exit SIE on SIGP sense running

2010-06-21 Thread Arnd Bergmann
On Monday 21 June 2010, Christian Borntraeger wrote: Hmm, dont know. Currently this calls into a s390 debug tracing facility (arch/s390/kernel/debug.c) which is heavily used by our service folks. There are commands for crash and lcrash to show these s390 debug traces from a dump. Maybe its

Re: [PATCH] KVM Test: Fix invalid literal bug in ioquit

2010-06-21 Thread Michael Goldish
On 06/21/2010 01:07 PM, Feng Yang wrote: Sometime check_cmd could not finish in setting time. Then o=, so int(o) will cause ValueError: invalid literal for int() with base 10: '' So change to check return status. Signed-off-by: Feng Yang fy...@redhat.com ---

[ kvm-Bugs-1858940 ] Kernel panic - not syncing: IO-APIC + timer doesn't work.

2010-06-21 Thread SourceForge.net
Bugs item #1858940, was opened at 2007-12-27 15:08 Message generated for change (Comment added) made by jessorensen You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=1858940group_id=180599 Please note that this message will contain a full copy of the comment

Re: [PATCH V2 1/5] ara virt interface of perf to support kvm guest os statistics collection in guest os

2010-06-21 Thread Avi Kivity
On 06/21/2010 12:31 PM, Zhang, Yanmin wrote: Here is the version 2. ChangeLog since V1: Mostly changes based on Avi's suggestions. 1) Use a id to identify the perf_event between host and guest; 2) Changes lots of codes to deal with malicious guest os; 3) Add a perf_event

Re: [PATCH V2 2/5] ara virt interface of perf to support kvm guest os statistics collection in guest os

2010-06-21 Thread Avi Kivity
On 06/21/2010 12:31 PM, Zhang, Yanmin wrote: The 2nd patch is to change the definition of perf_event to facilitate perf attr copy when a hypercall happens. Signed-off-by: Zhang Yanminyanmin_zh...@linux.intel.com --- --- linux-2.6_tip0620/include/linux/perf_event.h2010-06-21

Re: [PATCH V2 3/5] ara virt interface of perf to support kvm guest os statistics collection in guest os

2010-06-21 Thread Avi Kivity
On 06/21/2010 12:31 PM, Zhang, Yanmin wrote: The 3rd patch is to implement para virt perf at host kernel. @@ -64,6 +73,85 @@ struct kvm_mmu_op_release_pt { #ifdef __KERNEL__ #includeasm/processor.h +/* + * In host kernel, perf_event-host_perf_shadow points to + * host_perf_shadow which

Re: [PATCH V2 5/5] ara virt interface of perf to support kvm guest os statistics collection in guest os

2010-06-21 Thread Avi Kivity
On 06/21/2010 12:31 PM, Zhang, Yanmin wrote: The 5th patch is applied to the latest qemu-kvm tree. --- qemu-kvm_0621/target-i386/kvm.c 2010-06-21 11:00:29.0 +0800 +++ qemu-kvm_0621_perf/target-i386/kvm.c2010-06-21 13:00:14.136999850 +0800 @@ -150,6 +150,9 @@ struct

Re: [Qemu-devel] [PATCH 1/2] Add 'serial' attribute to virtio-blk devices

2010-06-21 Thread Christoph Hellwig
On Fri, Jun 18, 2010 at 01:38:02PM -0500, Ryan Harper wrote: Create a new attribute for virtio-blk devices that will fetch the serial number of the block device. This attribute can be used by udev to create disk/by-id symlinks for devices that don't have a UUID (filesystem) associated with

[ kvm-Bugs-1841658 ] OpenSolaris 64bit panic with kvm-54

2010-06-21 Thread SourceForge.net
Bugs item #1841658, was opened at 2007-11-30 13:11 Message generated for change (Comment added) made by jessorensen You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=1841658group_id=180599 Please note that this message will contain a full copy of the comment

[PATCH] KVM: PPC: Make BAT only guest segments work

2010-06-21 Thread Alexander Graf
When a guest sets its SR entry to invalid, we may still find a corresponding entry in a BAT. So we need to make sure we're not faulting on invalid SR entries, but instead just claim them to be BAT resolved. This resolves breakage experienced when using libogc based guests. Signed-off-by:

[PATCH] KVM: PPC: Use kernel hash function

2010-06-21 Thread Alexander Graf
The linux kernel already provides a hash function. Let's reuse that instead of reinventing the wheel! Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_32_mmu_host.c | 10 ++ arch/powerpc/kvm/book3s_64_mmu_host.c | 11 ++- 2 files changed, 4

[PATCH] KVM: PPC: Remove obsolete kvmppc_mmu_find_pte

2010-06-21 Thread Alexander Graf
Initially we had to search for pte entries to invalidate them. Since the logic has improved since then, we can just get rid of the search function. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/kvm_book3s.h |1 - arch/powerpc/kvm/book3s_32_mmu_host.c | 20

[PATCH 1/2] KVM: PPC: Add generic hpte management functions

2010-06-21 Thread Alexander Graf
Currently the shadow paging code keeps an array of entries it knows about. Whenever the guest invalidates an entry, we loop through that entry, trying to invalidate matching parts. While this is a really simple implementation, it is probably the most ineffective one possible. So instead, let's

[PATCH 2/2] KVM: PPC: Make use of hash based Shadow MMU

2010-06-21 Thread Alexander Graf
We just introduced generic functions to handle shadow pages on PPC. This patch makes the respective backends make use of them, getting rid of a lot of duplicate code along the way. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/kvm_book3s.h |7 ++

[RFC] Getting specific device from qdev structs

2010-06-21 Thread Eduard - Gabriel Munteanu
Hi, I'm working on implementing AMD IOMMU emulation in QEMU/KVM and I'm also creating an API for address translation and access checking. Ideally, this API should work with different kinds of devices and IOMMUs. These operations would typically require specific device information to figure out

Re: [PATCH V2 3/5] ara virt interface of perf to support kvm guest os statistics collection in guest os

2010-06-21 Thread Gleb Natapov
On Mon, Jun 21, 2010 at 05:31:43PM +0800, Zhang, Yanmin wrote: The 3rd patch is to implement para virt perf at host kernel. Signed-off-by: Zhang Yanmin yanmin_zh...@linux.intel.com --- --- linux-2.6_tip0620/arch/x86/include/asm/kvm_para.h 2010-06-21 15:19:38.992999849 +0800 +++

Re: [Qemu-devel] [RFC] Getting specific device from qdev structs

2010-06-21 Thread Paul Brook
So I've been looking for a way to obtain things like a PCIDevice from a more generic structure (say from hw/qdev.h), If you're having to figure out what kind of a device you have then I think you're already doing something else wrong. I'd expect the bits of code that needs to identify devices

Re: [RFC] High availability in KVM

2010-06-21 Thread Luiz Capitulino
On Thu, 17 Jun 2010 12:15:20 +0900 Fernando Luis Vazquez Cao ferna...@oss.ntt.co.jp wrote: * qemu-kvm Currently KVM is only notified about memory errors detected by the MCE subsystem. When running on newer x86 hardware, if MCE detects an error on user-space it signals the

Re: Regarding NAT configuration with KVM

2010-06-21 Thread Charles Duffy
This is the libvirt default network configuration. Please see the libvirt documentation and mailing list for support. As an aside -- you'll probably want to use a bridged configuration rather than the NATted one. If you really do want to stick with the NAT configuration, you'll need to make

Re: [Qemu-devel] [RFC] Getting specific device from qdev structs

2010-06-21 Thread Eduard - Gabriel Munteanu
On Mon, Jun 21, 2010 at 03:07:13PM +0100, Paul Brook wrote: So I've been looking for a way to obtain things like a PCIDevice from a more generic structure (say from hw/qdev.h), If you're having to figure out what kind of a device you have then I think you're already doing something else

Question regarding KVM networking

2010-06-21 Thread Kangkook Jee
hi, all I have a question regarding KVM's networking stack implementation. Does KVM hook into NetFilter to intercept packets destined for the guest, or PF_PACKET? Thanks for your help, in advance Regard, Kangkook-- To unsubscribe from this list: send the line unsubscribe kvm in the body of

Re: [Qemu-devel] [RFC] Getting specific device from qdev structs

2010-06-21 Thread Paul Brook
Thanks for your reply. This isn't about a specific IOMMU. Let me describe the situation better: 1. I'm implementing the AMD IOMMU, which is a PCI IOMMU (not in the CPU). 2. Devices need address translation and checking through this IOMMU. 3. But in the future there might be other IOMMU

Re: Question regarding KVM networking

2010-06-21 Thread Charles Duffy
On 06/21/2010 09:51 AM, Kangkook Jee wrote: Does KVM hook into NetFilter to intercept packets destined for the guest, or PF_PACKET? None of the above. With -net user, KVM uses techniques derived from SLiRP to simulate a network stack with only traditional userspace UNIX socket calls. With

[PATCH] Search the LAPIC's for one that will accept a PIC interrupt.

2010-06-21 Thread Chris Lalancette
Older versions of 32-bit linux have a Checking 'hlt' instruction test where they repeatedly call the 'hlt' instruction, and then expect a timer interrupt to kick the CPU out of halt. This happens before any LAPIC or IOAPIC setup happens, which means that all of the APIC's are in virtual wire mode

[ kvm-Bugs-1899961 ] NIC not working properly with WS2008 RC1 x64

2010-06-21 Thread SourceForge.net
Bugs item #1899961, was opened at 2008-02-22 22:19 Message generated for change (Comment added) made by jessorensen You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=1899961group_id=180599 Please note that this message will contain a full copy of the comment

Re: [PATCH 1/2] Add 'serial' attribute to virtio-blk devices

2010-06-21 Thread Ryan Harper
* john cooper john.coo...@redhat.com [2010-06-21 01:11]: Rusty Russell wrote: On Sat, 19 Jun 2010 04:08:02 am Ryan Harper wrote: Create a new attribute for virtio-blk devices that will fetch the serial number of the block device. This attribute can be used by udev to create

Re: [Qemu-devel] [PATCH 1/2] Add 'serial' attribute to virtio-blk devices

2010-06-21 Thread Ryan Harper
* Christoph Hellwig h...@lst.de [2010-06-21 07:46]: On Fri, Jun 18, 2010 at 01:38:02PM -0500, Ryan Harper wrote: Create a new attribute for virtio-blk devices that will fetch the serial number of the block device. This attribute can be used by udev to create disk/by-id symlinks for

Re: [PATCH 1/2] Add 'serial' attribute to virtio-blk devices

2010-06-21 Thread john cooper
Ryan Harper wrote: * john cooper john.coo...@redhat.com [2010-06-21 01:11]: Rusty Russell wrote: On Sat, 19 Jun 2010 04:08:02 am Ryan Harper wrote: Create a new attribute for virtio-blk devices that will fetch the serial number of the block device. This attribute can be used by udev to

Re: [PATCH 0/4] Preparation for PIC-APIC rewiring

2010-06-21 Thread Marcelo Tosatti
Looks good. On Sun, Jun 20, 2010 at 07:21:54PM +0300, Avi Kivity wrote: These four patches were part of an optimization patchset I've been neglecting, but are equally useful as preparation for fixing the PIC-APIC wiring issues. Avi Kivity (4): KVM: i8259: reduce excessive abstraction for

Re: [PATCH 2/2] KVM: Prevent internal slots from being COWed

2010-06-21 Thread Marcelo Tosatti
On Mon, Jun 21, 2010 at 11:18:13AM +0300, Avi Kivity wrote: If a process with a memory slot is COWed, the page will change its address (despite having an elevated reference count). This breaks internal memory slots which have their physical addresses loaded into vmcs registers (see the APIC

Re: [PATCH 1/2] KVM: Remove memory alias support

2010-06-21 Thread Marcelo Tosatti
On Mon, Jun 21, 2010 at 11:51:58AM +0300, Avi Kivity wrote: As advertised in feature-removal-schedule.txt. Equivalent support is provided by overlapping memory regions. Signed-off-by: Avi Kivity a...@redhat.com --- Documentation/feature-removal-schedule.txt | 11 ---

Re: [PATCH] do not enter vcpu again if it was stopped during IO

2010-06-21 Thread Marcelo Tosatti
On Mon, Jun 21, 2010 at 12:01:52PM +0300, Gleb Natapov wrote: To prevent reentering vcpu after IO completion it is not enough to set env-stopped since it is checked only in main loop but control will not get there until next non-IO exit since kvm_run() will reenter vcpu to complete IO

Re: [PATCH 1/2] Add 'serial' attribute to virtio-blk devices

2010-06-21 Thread Rusty Russell
On Tue, 22 Jun 2010 02:13:21 am Ryan Harper wrote: * john cooper john.coo...@redhat.com [2010-06-21 01:11]: Rusty Russell wrote: On Sat, 19 Jun 2010 04:08:02 am Ryan Harper wrote: Create a new attribute for virtio-blk devices that will fetch the serial number of the block device.

[PATCH] KVM: Remove redundant change of return value

2010-06-21 Thread akong
From: Amos Kong ak...@redhat.com In the following situation, assign zero to 'r' is redundant, just remove them. r = foo(); if (r) goto out; r = 0; ... Signed-off-by: Amos Kong ak...@redhat.com --- arch/x86/kvm/x86.c |7 --- 1 files changed, 0 insertions(+), 7 deletions(-) diff

[KVM-AUTOTEST PATCH] KVM test: kvm_preprocessing.py: test for vm.is_alive() instead of vm.is_dead()

2010-06-21 Thread Michael Goldish
vm.is_alive() verifies that the monitor is responsive, which is required for taking screendumps. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_preprocessing.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

[KVM-AUTOTEST PATCH] KVM test: concentrate image and cdrom filename prefixes in tests.cfg.sample

2010-06-21 Thread Michael Goldish
Don't prefix image_name and cdrom at the end of tests_base.cfg.sample. Instead, do it all in tests.cfg.sample, to make it clearer to users editing the file. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/tests.cfg.sample | 10 --

[KVM-AUTOTEST PATCH] KVM test: scan_results.py: fix handling of empty result list

2010-06-21 Thread Michael Goldish
If there are no test results, max() tries to operate on an empty sequence and throws an exception. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/scan_results.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/scan_results.py

Re: [RFC] High availability in KVM

2010-06-21 Thread Takuya Yoshikawa
(2010/06/21 23:19), Luiz Capitulino wrote: On a different note, in a HA environment the qemu policy described above is not adequate; when a notification of a hardware error that our policy determines to be serious arrives the first thing we want to do is to put the virtual machine in

Re: [PATCH V2 1/5] ara virt interface of perf to support kvm guest os statistics collection in guest os

2010-06-21 Thread Zhang, Yanmin
On Mon, 2010-06-21 at 14:45 +0300, Avi Kivity wrote: On 06/21/2010 12:31 PM, Zhang, Yanmin wrote: Here is the version 2. ChangeLog since V1: Mostly changes based on Avi's suggestions. 1) Use a id to identify the perf_event between host and guest; 2) Changes lots of codes to deal

[PATCH 01/13] KVM test: kvm_utils.py: add a primitive logging mechanism for kvm_subprocess

2010-06-21 Thread Lucas Meneghel Rodrigues
From: Michael Goldish mgold...@redhat.com Add log_line() which logs a single line to a given file. The file's path is given relative to a certain base dir. Add set_log_dir() which sets the base dir. This is useful for logging the output of kvm_subprocess. kvm_subprocess can take a callback

[PATCH 02/13] KVM test: add the auto_close option to all kvm_subprocess classes

2010-06-21 Thread Lucas Meneghel Rodrigues
From: Michael Goldish mgold...@redhat.com Allow all kvm_subprocess classes (kvm_spawn, kvm_tail, kvm_expect, kvm_shell_session) to close automatically if auto_close is given and True. By default auto_close if False for all classes except kvm_shell_session, for which it is True by default.

[PATCH 03/13] KVM test: restructure remote_login() and remote_scp()

2010-06-21 Thread Lucas Meneghel Rodrigues
- Add _remote_login() and _remote_scp() which, instead of taking a command line, take an existing session and operate on it. This is useful for logging into existing always-open sessions, such as serial console sessions. - Merge ssh/telnet/netcat into remote_login(). Signed-off-by:

[PATCH 04/13] KVM test: send username in remote_login()

2010-06-21 Thread Lucas Meneghel Rodrigues
In order to let the serial console work, we must let the remote_login() send the username when met the username prompt. This patch fails the progress if if it met the username prompt twice. Signed-off-by: Jason Wang jasow...@redhat.com Signed-off-by: Michael Goldish mgold...@redhat.com ---

[PATCH 05/13] KVM test: remote_login(): make the login re suitable for serial console

2010-06-21 Thread Lucas Meneghel Rodrigues
From: Michael Goldish mgold...@redhat.com Current matching re ^\s*[Ll]ogin:\s*$ is not suitable for the serial console, so change it to [Ll]ogin:\s*$. Signed-off-by: Jason Wang jasow...@redhat.com Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_utils.py |2 +- 1

[PATCH 06/13] KVM test: kvm_vm.py: redirect the serial console to a unix socket

2010-06-21 Thread Lucas Meneghel Rodrigues
From: Michael Goldish mgold...@redhat.com Based on Jason Wang's patch. Signed-off-by: Jason Wang jasow...@redhat.com Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_vm.py | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git

[PATCH 07/13] KVM test: kvm_vm.py: log serial console output and allow serial login

2010-06-21 Thread Lucas Meneghel Rodrigues
From: Michael Goldish mgold...@redhat.com Log serial console output to files in the debug dir. Also, add VM.serial_login() which attempts to log in via the serial console. Note: - Tests must NOT close() a serial console session, because it needs to remain open for the following tests to use.

[PATCH 08/13] KVM test: kvm.py: set log file dir for kvm_subprocess logging

2010-06-21 Thread Lucas Meneghel Rodrigues
From: Michael Goldish mgold...@redhat.com Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm.py |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/kvm.py b/client/tests/kvm/kvm.py index bab1e6f..0799cff 100644 ---

[PATCH 09/13] KVM test: kvm_subprocess.py: don't sanitize text before passing it to callbacks

2010-06-21 Thread Lucas Meneghel Rodrigues
From: Michael Goldish mgold...@redhat.com Converting the text to utf-8 seems to cause trouble when converting back (e.g. when writing to files). The logging system seems to be fine with unsanitized text, so let's not sanitize it. Signed-off-by: Michael Goldish mgold...@redhat.com ---

[PATCH 10/13] KVM test: log output of all shell sessions and SCP transfers

2010-06-21 Thread Lucas Meneghel Rodrigues
From: Michael Goldish mgold...@redhat.com Use kvm_utils.log_line() to log the output of all shell sessions and SCP transfers. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_utils.py | 33 ++--- client/tests/kvm/kvm_vm.py| 15

[PATCH 11/13] KVM test: Enable the serial console during unattended installation

2010-06-21 Thread Lucas Meneghel Rodrigues
This patch enable the serial console during unattended installation for all linux guests. Signed-off-by: Jason Wang jasow...@redhat.com --- client/tests/kvm/tests_base.cfg.sample |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH 12/13] KVM test: Enable the serial console for all linux guests

2010-06-21 Thread Lucas Meneghel Rodrigues
From: Jason Wang jasow...@redhat.com As we have the ability to dump the content from serial console or use a session through it, we need to redirect the console to serial through unattended files to make use of it. The patch also keep the tty0 accroding to the suggestion of Michael Goldish.

[PATCH 13/13] KVM test: Fix a small bug on timedrift test

2010-06-21 Thread Lucas Meneghel Rodrigues
On timedrift.py, a prefix is added to indicate the kvm subprocess instances of the guest load processes. With the fact the ssh sessions are being logged, that implies in changing the the kvm subprocess callback function. When this happens, the wrong parameters will be passed to the logging system

Re: [PATCH V2 2/5] ara virt interface of perf to support kvm guest os statistics collection in guest os

2010-06-21 Thread Zhang, Yanmin
On Mon, 2010-06-21 at 15:00 +0300, Avi Kivity wrote: On 06/21/2010 12:31 PM, Zhang, Yanmin wrote: The 2nd patch is to change the definition of perf_event to facilitate perf attr copy when a hypercall happens. Signed-off-by: Zhang Yanminyanmin_zh...@linux.intel.com --- ---

Re: [PATCH] KVM Test: Fix invalid literal bug in ioquit

2010-06-21 Thread Feng Yang
- Michael Goldish mgold...@redhat.com wrote: From: Michael Goldish mgold...@redhat.com To: Feng Yang fy...@redhat.com Cc: autot...@test.kernel.org, kvm@vger.kernel.org Sent: Monday, June 21, 2010 7:19:58 PM GMT +08:00 Beijing / Chongqing / Hong Kong / Urumqi Subject: Re: [PATCH] KVM

Re: [PATCH V2 3/5] ara virt interface of perf to support kvm guest os statistics collection in guest os

2010-06-21 Thread Zhang, Yanmin
On Mon, 2010-06-21 at 15:33 +0300, Avi Kivity wrote: On 06/21/2010 12:31 PM, Zhang, Yanmin wrote: The 3rd patch is to implement para virt perf at host kernel. @@ -64,6 +73,85 @@ struct kvm_mmu_op_release_pt { #ifdef __KERNEL__ #includeasm/processor.h +/* + * In host

  1   2   >