[COMMIT master] make-release: misc fixes

2010-06-06 Thread Avi Kivity
From: Michael S. Tsirkin m...@redhat.com This fixes /tmp usage in make-release script for security. Also, create output directory if it does not exist. This also adds a 'tarball' optin to specify output file name. Finally, remote output file before gzip to avoid prompt 'do you want to overwrite'.

[COMMIT master] Make get_para_features() similar to upstream

2010-06-06 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Accept a CPUState parameter instead of a kvm_context_t. Signed-off-by: Avi Kivity a...@redhat.com Acked-by: Glauber Costa glom...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c index 95b7aa5..0eb4060

[COMMIT master] Use get_para_features() from upstream

2010-06-06 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com Acked-by: Glauber Costa glom...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c index 0eb4060..3b9be6d 100644 --- a/qemu-kvm-x86.c +++ b/qemu-kvm-x86.c @@

[COMMIT master] msix: fix msix_set/unset_mask_notifier

2010-06-06 Thread Avi Kivity
From: Michael S. Tsirkin m...@redhat.com Sridhar Samudrala reported hitting the following assertions in msix.c when doing a guest reboot or live migration using vhost. qemu-kvm/hw/msix.c:375: msix_mask_all: Assertion `r = 0' failed. qemu-kvm/hw/msix.c:640: msix_unset_mask_notifier: Assertion

[COMMIT master] KVM: MMU: Document large pages

2010-06-06 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/Documentation/kvm/mmu.txt b/Documentation/kvm/mmu.txt index 1e7ecdd..8cb42b9 100644 --- a/Documentation/kvm/mmu.txt +++ b/Documentation/kvm/mmu.txt @@ -317,6

[COMMIT master] KVM: MMU: Don't calculate quadrant if tdp_enabled

2010-06-06 Thread Avi Kivity
From: Gui Jianfeng guijianf...@cn.fujitsu.com There's no need to calculate quadrant if tdp is enabled. Signed-off-by: Gui Jianfeng guijianf...@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 c16c4ca..0e35106 100644 ---

[COMMIT master] KVM: read apic-irr with ioapic lock held

2010-06-06 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com Read ioapic-irr inside ioapic-lock protected section. KVM-Stable-Tag Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c index 3bc4fdb..1149c60 100644 --- a/virt/kvm/ioapic.c +++ b/virt/kvm/ioapic.c @@

[COMMIT master] KVM: VMX: Enforce EPT pagetable level checking

2010-06-06 Thread Avi Kivity
From: Sheng Yang sh...@linux.intel.com We only support 4 levels EPT pagetable now. Signed-off-by: Sheng Yang sh...@linux.intel.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 1b6a3be..3959668 100644 --- a/arch/x86/kvm/vmx.c +++

[COMMIT master] KVM: Add Documentation/kvm/msr.txt

2010-06-06 Thread Avi Kivity
From: Glauber Costa glom...@redhat.com This patch adds a file that documents the usage of KVM-specific MSRs. Signed-off-by: Glauber Costa glom...@redhat.com Reviewed-by: Randy Dunlap randy.dun...@oracle.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git

[COMMIT master] KVM: MMU: reduce remote tlb flush in kvm_mmu_pte_write()

2010-06-06 Thread Avi Kivity
From: Xiao Guangrong xiaoguangr...@cn.fujitsu.com collect remote tlb flush in kvm_mmu_pte_write() path Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index cc5bc25..6b2c644 100644 ---

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

2010-06-06 Thread Avi Kivity
From: Avi Kivity a...@redhat.com * 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6: (1443 commits) Linux 2.6.35-rc2 drm/i915: Move non-phys cursors into the GTT ext4: Fix remaining racy updates of EXT4_I(inode)-i_flags module: fix bne2 gave up waiting for

[COMMIT master] KVM: MMU: split the operations of kvm_mmu_zap_page()

2010-06-06 Thread Avi Kivity
From: Xiao Guangrong xiaoguangr...@cn.fujitsu.com Using kvm_mmu_prepare_zap_page() and kvm_mmu_commit_zap_page() to split kvm_mmu_zap_page() function, then we can: - traverse hlist safely - easily to gather remote tlb flush which occurs during page zapped Those feature can be used in the later

[COMMIT master] KVM: MMU: gather remote tlb flush which occurs during page zapped

2010-06-06 Thread Avi Kivity
From: Xiao Guangrong xiaoguangr...@cn.fujitsu.com Using kvm_mmu_prepare_zap_page() and kvm_mmu_zap_page() instead of kvm_mmu_zap_page() that can reduce remote tlb flush IPI Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com Signed-off-by: Avi Kivity a...@redhat.com diff --git

[KVM-AUTOTEST PATCH] KVM test: kvm_vm.py: don't require pci_assignable to be defined

2010-06-06 Thread Michael Goldish
Currently to disable PCI device assignment pci_assignable must be explicitly set to no. This patch allows it to remain undefined (and adds a warning message and a comment). Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_vm.py | 47

Re: [RFC][PATCH]: kdump on KVM

2010-06-06 Thread Avi Kivity
On 06/04/2010 11:11 PM, Chris Lalancette wrote: Hello, I've gone back to look at the problem with kdump while running as a KVM guest. I'll preface this discussion by noting that all of the problems I describe below only happen when the HPET emulation is shutoff. However, since there

Re: Perf trace event parse errors for KVM events

2010-06-06 Thread Avi Kivity
On 06/04/2010 12:57 AM, Steven Rostedt wrote: On Tue, 2010-06-01 at 15:39 +0300, Avi Kivity wrote: On 06/01/2010 02:59 PM, Steven Rostedt wrote: I meant that viewing would be slowed down. It's an important part of using ftrace! How long does the Python formatter take to process

Re: [PATCHv3 1/2] virtio: support layout with avail ring before idx

2010-06-06 Thread Michael S. Tsirkin
On Sat, Jun 05, 2010 at 01:40:26PM +0930, Rusty Russell wrote: On Fri, 4 Jun 2010 09:12:05 pm Michael S. Tsirkin wrote: On Fri, Jun 04, 2010 at 08:46:49PM +0930, Rusty Russell wrote: I'm uncomfortable with moving a field. We haven't done that before and I wonder what will break with

Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers

2010-06-06 Thread Michael S. Tsirkin
On Thu, Jun 03, 2010 at 02:41:38PM -0700, Tom Lyon wrote: OK, in the interest of making progress, I am about to embark on the following: 1. Create a user-iommu-domain driver - opening it will give a new empty domain. Ultimately this can also populate sysfs with the state of its world,

Re: [PATCH v2 1/7] KVM: MMU: skip invalid sp when unprotect page

2010-06-06 Thread Avi Kivity
On 06/04/2010 04:52 PM, Xiao Guangrong wrote: In kvm_mmu_unprotect_page(), the invalid sp can be skipped Applied all, 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 message to

[PATCH] Print a user-friendly message on failed vmentry

2010-06-06 Thread Mohammed Gamal
This patch address bug report in https://bugs.launchpad.net/qemu/+bug/530077. Failed vmentries were handled with handle_unhandled() which prints a rather unfriendly message to the user. This patch separates handling vmentry failures from unknown exit reasons and prints a friendly message to the

mmu_notifers, pte_dirty questions

2010-06-06 Thread Avi Kivity
Why no notifer when testing and clearing the dirty bit? (*clear_flush_dirty)(...). static int page_mkclean_one(struct page *page, struct vm_area_struct *vma, unsigned long address) { struct mm_struct *mm = vma-vm_mm; pte_t *pte; spinlock_t *ptl; int ret = 0;

[PATCH 2/4] KVM: MMU: Move accessed/dirty bit checks from rmap_remove() to drop_spte()

2010-06-06 Thread Avi Kivity
Since we need to make the check atomic, move it to the place that will set the new spte. Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/mmu.c | 17 + 1 files changed, 9 insertions(+), 8 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index

[PATCH 0/4] Fix accessed bit tracking

2010-06-06 Thread Avi Kivity
The kvm mmu synchronizes shadow ptes using the mmu lock, however the cpu will happily ignore the lock when setting the accessed bit. This can cause the accessed bit to be lost. Luckily this only results in incorrect page selection for swap. This patchset fixes the problem by atomically updating

[PATCH 4/4] KVM: MMU: Don't drop accessed bit while updating an spte

2010-06-06 Thread Avi Kivity
__set_spte() will happily replace an spte with the accessed bit set with one that has the accessed bit clear. Add a helper update_spte() which checks for this condition and updates the page flag if needed. Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/mmu.c | 25

[PATCH 3/4] KVM: MMU: Atomically check for accessed bit when dropping an spte

2010-06-06 Thread Avi Kivity
Currently, in the window between the check for the accessed bit, and actually dropping the spte, a vcpu can access the page through the spte and set the bit, which will be ignored by the mmu. Fix by using an exchange operation to atmoically fetch the spte and drop it. Signed-off-by: Avi Kivity

[PATCH 1/4] KVM: MMU: Introduce drop_spte()

2010-06-06 Thread Avi Kivity
When we call rmap_remove(), we (almost) always immediately follow it by an __set_spte() to a nonpresent pte. Since we need to perform the two operations atomically, to avoid losing the dirty and accessed bits, introduce a helper drop_spte() and convert all call sites. The operation is still

[PATCH qemu-kvm] kvm: rename kvm/test/test/powerpc to kvm/test/powerpc

2010-06-06 Thread Ken CC
To make the directory architecture match the file config file kvm/test/config-powerpc.mk. Signed-off-by: Ken CC cc.5...@gmail.com --- kvm/test/powerpc/44x/tlbsx.S | 33 kvm/test/powerpc/44x/tlbwe.S | 27 +++

Re: [PATCH 0/3][STABLE] KVM: Various issues in virtio_net

2010-06-06 Thread Avi Kivity
On 06/03/2010 10:31 PM, Bruce Rogers wrote: These are patches which we have found useful for our 2.6.32 based SLES 11 SP1 release. The first patch is already upstream, but should be included in stable. The second patch is a subset of another upstream patch. Again, stable material. The third

Re: [PATCH] KVM: mmu: Remove unused local variable

2010-06-06 Thread Avi Kivity
On 06/03/2010 10:08 AM, Jan Kiszka wrote: From: Jan Kiszkajan.kis...@siemens.com Signed-off-by: Jan Kiszkajan.kis...@siemens.com --- No one else checks for new build warnings? My fault, sorry, I updated the patch in place to remove a dangling r = something; and introduced two new

Re: [PATCH qemu-kvm] kvm: rename kvm/test/test/powerpc to kvm/test/powerpc

2010-06-06 Thread Avi Kivity
On 06/06/2010 04:13 PM, Ken CC wrote: To make the directory architecture match the file config file kvm/test/config-powerpc.mk. Can you please resent with 'diff.renames' set in your git configuration? That will make the patch reviewable, as it will convert it to a pattern of moves

Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers

2010-06-06 Thread Avi Kivity
On 06/02/2010 07:53 PM, Chris Wright wrote: * Avi Kivity (a...@redhat.com) wrote: The interface would only work for clients which support it: kvm, vhost, and iommu/devices with restartable dma. BTW, there is no such thing as restartable dma. There is a provision in new specs (read:

Re: [PATCH 1/4] KVM: MMU: Introduce drop_spte()

2010-06-06 Thread Avi Kivity
On 06/06/2010 04:06 PM, Avi Kivity wrote: When we call rmap_remove(), we (almost) always immediately follow it by an __set_spte() to a nonpresent pte. Since we need to perform the two operations atomically, to avoid losing the dirty and accessed bits, introduce a helper drop_spte() and convert

[ kvm-Bugs-2933400 ] virtio-blk io errors / data corruption on raw drives 1 TB

2010-06-06 Thread SourceForge.net
Bugs item #2933400, was opened at 2010-01-16 17:35 Message generated for change (Comment added) made by nevenchannyy You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=2933400group_id=180599 Please note that this message will contain a full copy of the

Re: Perf trace event parse errors for KVM events

2010-06-06 Thread Steven Rostedt
On Sun, 2010-06-06 at 11:08 +0300, Avi Kivity wrote: Also, I kicked this off in kernelshark, and it made no difference that I can see. This is because kernelshark only evaluates the viewable area of the screen. Neat. Can it also search? Where can I find it? googles, finds, gawks

Re: [Qemu-devel] [PATCH v6 5/6] Inter-VM shared memory PCI device

2010-06-06 Thread Avi Kivity
On 06/05/2010 12:44 PM, Blue Swirl wrote: On Fri, Jun 4, 2010 at 9:45 PM, Cam Macdonellc...@cs.ualberta.ca wrote: Support an inter-vm shared memory device that maps a shared-memory object as a PCI device in the guest. This patch also supports interrupts between guest by communicating over

Re: porting fixes regarding kvm-clock and lost irqs to stable qemu-kvm 0.12.4

2010-06-06 Thread Faidon Liambotis
Peter Lieven wrote: i was looking for a generic way to disable it in the hypervisor without the need to touch every guests kernel commandline. this would be easy revertible once its all working as expected. This is a huge hack but for the same reason I've made an LD_PRELOAD wrapper that wraps

Re: [PATCH] kvm: rework remove-write-access for a slot

2010-06-06 Thread Avi Kivity
On 06/04/2010 11:14 AM, Lai Jiangshan wrote: - I thought of a different approach to write protection: write protect the L4 sptes, on write fault add write permission to the L4 spte and write protect the L3 sptes that it points to, etc. This method can use the slot bitmap to reduce the number

Re: [PATCH] make-release: make mtime, owner, group consistent

2010-06-06 Thread Michael S. Tsirkin
On Fri, Jun 04, 2010 at 01:46:25PM -0300, Marcelo Tosatti wrote: On Wed, Jun 02, 2010 at 06:27:20PM +0300, Michael S. Tsirkin wrote: Files from git have modification time set to one of commit, and owner/group to root. Making it so for generated files as well makes it easier to generate an

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

2010-06-06 Thread Avi Kivity
On 06/06/2010 07:09 PM, Avi Kivity wrote: From: Avi Kivitya...@redhat.com * 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6: (1443 commits) Linux 2.6.35-rc2 drm/i915: Move non-phys cursors into the GTT ext4: Fix remaining racy updates of

Re: Perf trace event parse errors for KVM events

2010-06-06 Thread Avi Kivity
On 06/06/2010 06:02 PM, Steven Rostedt wrote: On Sun, 2010-06-06 at 11:08 +0300, Avi Kivity wrote: Also, I kicked this off in kernelshark, and it made no difference that I can see. This is because kernelshark only evaluates the viewable area of the screen. Neat. Can it also

Re: porting fixes regarding kvm-clock and lost irqs to stable qemu-kvm 0.12.4

2010-06-06 Thread Peter Lieven
Am 06.06.2010 um 16:53 schrieb Faidon Liambotis: Peter Lieven wrote: i was looking for a generic way to disable it in the hypervisor without the need to touch every guests kernel commandline. this would be easy revertible once its all working as expected. This is a huge hack but for the

Re: [RFC PATCH v4 3/3] block: add sheepdog driver for distributed storage support

2010-06-06 Thread MORITA Kazutaka
At Fri, 04 Jun 2010 13:04:00 +0200, Kevin Wolf wrote: Am 03.06.2010 18:23, schrieb MORITA Kazutaka: +static void sd_aio_cancel(BlockDriverAIOCB *blockacb) +{ + SheepdogAIOCB *acb = (SheepdogAIOCB *)blockacb; + + acb-canceled = 1; +} Does this provide the right semantics? You

Re: mmu_notifers, pte_dirty questions

2010-06-06 Thread Andrea Arcangeli
On Sun, Jun 06, 2010 at 03:07:27PM +0300, Avi Kivity wrote: Why no notifer when testing and clearing the dirty bit? (*clear_flush_dirty)(...). static int page_mkclean_one(struct page *page, struct vm_area_struct *vma, unsigned long address) { struct mm_struct *mm

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

2010-06-06 Thread Alexander Graf
On 06.06.2010, at 18:13, Avi Kivity wrote: On 06/06/2010 07:09 PM, Avi Kivity wrote: From: Avi Kivitya...@redhat.com * 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6: (1443 commits) Linux 2.6.35-rc2 drm/i915: Move non-phys cursors into the GTT

Re: [RFC PATCH v7 01/19] Add a new structure for skb buffer from external.

2010-06-06 Thread Stephen Hemminger
Still not sure this is a good idea for a couple of reasons: 1. We already have lots of special cases with skb's (frags and fraglist), and skb's travel through a lot of different parts of the kernel. So any new change like this creates lots of exposed points for new bugs. Look at cases

[PATCH QEMU-KVM v2 diff.renames] kvm: rename kvm/test/test/powerpc to kvm/test/powerpc

2010-06-06 Thread Ken CC
To make the directory architecture match the make config file kvm/test/config-powerpc.mk. Signed-off-by: Ken CC cc.5...@gmail.com --- kvm/test/{ = }/test/powerpc/44x/tlbsx.S |0 kvm/test/{ = }/test/powerpc/44x/tlbwe.S |0 kvm/test/{ = }/test/powerpc/44x/tlbwe_16KB.S |0

Re: [PATCH qemu-kvm] kvm: rename kvm/test/test/powerpc to kvm/test/powerpc

2010-06-06 Thread Ken CC
On Sun, Jun 06, 2010 at 04:22:45PM +0300, Avi Kivity wrote: On 06/06/2010 04:13 PM, Ken CC wrote: To make the directory architecture match the file config file kvm/test/config-powerpc.mk. Can you please resent with 'diff.renames' set in your git configuration? That will make the patch

[PATCH 1/2] KVM VMX: Add all-context INVVPID type support

2010-06-06 Thread Gui Jianfeng
Add all-context INVVPID type support. Signed-off-by: Gui Jianfeng guijianf...@cn.fujitsu.com --- arch/x86/include/asm/vmx.h |1 + arch/x86/kvm/vmx.c | 23 +-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/vmx.h

[PATCH 2/2] KVM VMX: rename vpid_sync_vcpu_all() to vpid_sync_vcpu_single()

2010-06-06 Thread Gui Jianfeng
The name pid_sync_vcpu_all isn't appropriate since it just affect a single vpid, so rename it to vpid_sync_vcpu_single(). Signed-off-by: Gui Jianfeng guijianf...@cn.fujitsu.com --- arch/x86/kvm/vmx.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/vmx.c

Reboot Problem

2010-06-06 Thread Chaitra Gorantla
Hi all, We know that kernel reboots after any panic or crash. I am using 2.6.21 kernel (HOST machine) and KVM-88 package. After inserting kvm-intel.ko , if any kernel crash occurs, the Host halts= . The kernel never reboots. Please suggest regarding this. Thanks in advance, Chaitra This

Re: Reboot Problem

2010-06-06 Thread Sterling Windmill
The Linux kernel does not reboot on panic by default. Read here: http://www.cyberciti.biz/tips/reboot-linux-box-after-a-kernel-panic.html - Original Message - From: Chaitra Gorantla chaitra.goran...@lntinfotech.com To: kvm@vger.kernel.org Sent: Sunday, June 6, 2010 10:59:11 PM Subject:

RE: Reboot Problem

2010-06-06 Thread Chaitra Gorantla
Hi, Yes, Insipte of adding kernel.panic = 10 in sysctl.conf, the kernel does not reboot when kvm-i9ntel.ko is been inserted. Do you have any idea , because, when the kvm-intel.ko is not inserted, kernel reboots. -Original Message- From: Sterling Windmill [mailto:sterl...@ampx.net]

RE: [PATCH] kvm/powerpc: fix a build error in e500_tlb.c

2010-06-06 Thread Liu Yu-B13201
-Original Message- From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf Of Alexander Graf Sent: Friday, June 04, 2010 10:08 PM To: Kevin Hao Cc: Marcelo Tosatti; Kumar Gala; Avi Kivity; kvm@vger.kernel.org list; linuxppc-...@ozlabs.org; Liu Yu-B13201

Re: mmu_notifers, pte_dirty questions

2010-06-06 Thread Avi Kivity
On 06/06/2010 09:36 PM, Andrea Arcangeli wrote: On Sun, Jun 06, 2010 at 03:07:27PM +0300, Avi Kivity wrote: Why no notifer when testing and clearing the dirty bit? (*clear_flush_dirty)(...). static int page_mkclean_one(struct page *page, struct vm_area_struct *vma,

Re: [PATCH] KVM: powerpc: fix init/exit annotation

2010-06-06 Thread Jean Delvare
Hi Avi, On Wed, 19 May 2010 20:16:35 +0300, Avi Kivity wrote: On 05/18/2010 10:34 AM, Jean Delvare wrote: kvmppc_e500_exit() is a module_exit function, so it should be tagged with __exit, not __init. The incorrect annotation was added by commit 2986b8c72c272ea58edd37903b042c6da985627d.