[PATCH] kvm: extboot: properly set int 0x13 return value

2008-12-02 Thread Avi Kivity
From: Glauber Costa [EMAIL PROTECTED] Callers of int 0x13 usually rely on the carry flag being clear/set to indicate the status of the interrupt execution. However, our current code clear or set the flags register, which is totally useless. Whichever value it has, will be overwritten by the

[PATCH] KVM: fix handling of ACK from shared guest IRQ

2008-12-02 Thread Mark McLoughlin
If an assigned device shares a guest irq with an emulated device then we currently interpret an ack generated by the emulated device as originating from the assigned device leading to e.g. Unbalanced enable for IRQ 4347 from the enable_irq() in kvm_assigned_dev_ack_irq(). The fix is fairly simple

Re: [BUG] kvm crashes in 2.6.28-rc6-00007-ged31348

2008-12-02 Thread Avi Kivity
Avi Kivity wrote: - something did a read-modify-write cycle on cr4 (which contains the svm enable bit) while kvm enabled that bit Well, there are a couple of code paths that do this. I'll look into it. -- error compiling committee.c: too many arguments to function -- To unsubscribe from

Re: [BUG] kvm crashes in 2.6.28-rc6-00007-ged31348

2008-12-02 Thread Avi Kivity
Avi Kivity wrote: Avi Kivity wrote: - something did a read-modify-write cycle on cr4 (which contains the svm enable bit) while kvm enabled that bit Well, there are a couple of code paths that do this. I'll look into it. Sorry, that's EFER. It could be something doing a read-modify-write

Re: [PATCH] Kvm: Qemu: save nvram

2008-12-02 Thread Avi Kivity
Daniel P. Berrange wrote: On Tue, Dec 02, 2008 at 10:25:49AM +0800, Zhang, Yang wrote: This patch to save the nvram. It save the nvram by specify the arg of -name.And the saved file named by the arg. If do not specify the arg, it will not save the nvram I think we might be better off

[PATCH 04/12] introcude linux/iommu.h for an iommu api

2008-12-02 Thread Joerg Roedel
This patch introduces the API to abstract the exported VT-d functions for KVM into a generic API. This way the AMD IOMMU implementation can plug into this API later. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] --- include/linux/iommu.h | 109 +

[PATCH 05/12] add frontend implementation for the IOMMU API

2008-12-02 Thread Joerg Roedel
Signed-off-by: Joerg Roedel [EMAIL PROTECTED] --- drivers/base/iommu.c | 100 ++ 1 files changed, 100 insertions(+), 0 deletions(-) create mode 100644 drivers/base/iommu.c diff --git a/drivers/base/iommu.c b/drivers/base/iommu.c new file mode

[PATCH 03/12] KVM: rename vtd.c to iommu.c

2008-12-02 Thread Joerg Roedel
Impace: file renamed The code in the vtd.c file can be reused for other IOMMUs as well. So rename it to make it clear that it handle more than VT-d. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] --- arch/ia64/kvm/Makefile |2 +- arch/x86/kvm/Makefile |2 +- virt/kvm/{vtd.c =

Re: [PATCH] Kvm: Qemu: save nvram

2008-12-02 Thread Daniel P. Berrange
On Tue, Dec 02, 2008 at 03:01:20PM +0200, Avi Kivity wrote: Daniel P. Berrange wrote: On Tue, Dec 02, 2008 at 10:25:49AM +0800, Zhang, Yang wrote: This patch to save the nvram. It save the nvram by specify the arg of -name.And the saved file named by the arg. If do not specify the arg,

[ kvm-Bugs-2138166 ] Vista guest fails to start on kvm-76

2008-12-02 Thread SourceForge.net
Bugs item #2138166, was opened at 2008-09-30 15:39 Message generated for change (Comment added) made by technologov You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=2138166group_id=180599 Please note that this message will contain a full copy of the comment

[ kvm-Bugs-2138166 ] Vista guest fails to start on kvm-76

2008-12-02 Thread SourceForge.net
Bugs item #2138166, was opened at 2008-09-30 08:39 Message generated for change (Settings changed) made by johnrrousseau You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=2138166group_id=180599 Please note that this message will contain a full copy of the

[ kvm-Bugs-2353811 ] Solaris 10 guest unstable

2008-12-02 Thread SourceForge.net
Bugs item #2353811, was opened at 2008-11-27 17:44 Message generated for change (Comment added) made by technologov You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=2353811group_id=180599 Please note that this message will contain a full copy of the comment

[ kvm-Bugs-2088475 ] OpenSuse10.2 can not be installed

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

[GIT PULL][RESEND] KVM updates for Linux 2.6.28-rc6

2008-12-02 Thread Avi Kivity
Linus, please pull some kvm fixes from repo and branch at: git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm.git kvm-updates/2.6.28 There are a couple of fixes for the out-of-sync mmu, a fix for a lost irq while injecting an nmi (which causes guests with an nmi watchdog to hang), as

[ kvm-Bugs-2138166 ] Vista guest fails to start on kvm-76

2008-12-02 Thread SourceForge.net
Bugs item #2138166, was opened at 2008-09-30 15:39 Message generated for change (Comment added) made by technologov You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=2138166group_id=180599 Please note that this message will contain a full copy of the comment

[PATCH 01/12] VT-d: Support multiple device assignment for KVM

2008-12-02 Thread Joerg Roedel
From: Weidong Han [EMAIL PROTECTED] In order to support multiple device assignment for KVM, this patch does following main changes: - extend dmar_domain to own multiple devices from different iommus, use a bitmap of iommus to replace iommu pointer in dmar_domain. - implement independent low

Re: [PATCH] extboot: properly set int 0x13 return value

2008-12-02 Thread Avi Kivity
Glauber Costa wrote: Callers of int 0x13 usually rely on the carry flag being clear/set to indicate the status of the interrupt execution. However, our current code clear or set the flags register, which is totally useless. Whichever value it has, will be overwritten by the flags value _before_

Re: [PATCH] extboot: properly set int 0x13 return value

2008-12-02 Thread Anthony Liguori
Avi Kivity wrote: Applied, thanks. -.macro clc -push %ax -pushf -pop %ax -and $(~FLAGS_CF), %ax -push %ax -popf -pop %ax Anthony, any reason you did not use the 'clc' instruction instead of a macro? Propensity for pain? I have no idea. I assume I had a

[PATCH 0/13] [v3] Support VT-d multiple device assignment for KVM

2008-12-02 Thread Han, Weidong
This patchset supports VT-d multiple device assignment for KVM. Main changes from V2 to V3: - change intel iommu APIs, which are consistent with Joerg's generic iommu APIs. - split to a serial smaller patches for easy reviewing. Regards, Weidong-- To unsubscribe from this list: send the line

[PATCH 02/13] move page table handling utility functions

2008-12-02 Thread Han, Weidong
move page table handling utility functions from intel-iommu.c to dma_remapping.h, because some of them will be used in other .c files. Signed-off-by: Weidong Han [EMAIL PROTECTED] --- drivers/pci/intel-iommu.c | 45 include/linux/dma_remapping.h |

[PATCH 01/13] iommu bitmap insteads of iommu pointer in dmar_domain

2008-12-02 Thread Han, Weidong
Support dmar_domain own multiple devices from different iommus, which are set in iommu bitmap. add function domain_get_iommu() to get the only one iommu of domain in native VT-d usage. Signed-off-by: Weidong Han [EMAIL PROTECTED] --- drivers/pci/intel-iommu.c | 102

[PATCH 03/13] set iommu agaw

2008-12-02 Thread Han, Weidong
agaw may be different across iommus. Signed-off-by: Weidong Han [EMAIL PROTECTED] --- drivers/pci/dmar.c| 14 ++ include/linux/dma_remapping.h |2 ++ include/linux/intel-iommu.h |1 + 3 files changed, 17 insertions(+), 0 deletions(-) diff --git

[PATCH 04/13] iommu coherency

2008-12-02 Thread Han, Weidong
in dmar_domain, more than one iommus may be included in iommu_bmp. Due to Coherency capability may be different across iommus, set this variable to indicate iommu access is coherent or not. Only when all related iommus in a dmar_domain are all coherent, iommu access of this domain is coherent.

[PATCH 05/13] add domain flag DOMAIN_FLAG_VIRTUAL_MACHINE

2008-12-02 Thread Han, Weidong
By default, one domain owns one device, like native VT-d usage. For kvm VT-d usage, more than one devices across iommus may be assigned to one domain, flag DOMAIN_FLAG_VIRTUAL_MACHINE is for this usage. Signed-off-by: Weidong Han [EMAIL PROTECTED] --- drivers/pci/intel-iommu.c |3 ++-

[PATCH 06/13] add/remove domain device info for virtual machine VT-d

2008-12-02 Thread Han, Weidong
Separate add/remove domain device info functions for virtual machine VT-d from natvie VT-d. Signed-off-by: Weidong Han [EMAIL PROTECTED] --- drivers/pci/intel-iommu.c | 164 +++- include/linux/dma_remapping.h |1 + 2 files changed, 160

[PATCH 07/13] add domain_flush_cache

2008-12-02 Thread Han, Weidong
For some common low level functions which will be also used by virtual machine usage, use domain_flush_cache instead of __iommu_flush_cache. Signed-off-by: Weidong Han [EMAIL PROTECTED] --- drivers/pci/intel-iommu.c | 40 1 files changed, 24

[PATCH 08/13] allocation and free functions of virtual machine domain

2008-12-02 Thread Han, Weidong
Signed-off-by: Weidong Han [EMAIL PROTECTED] --- drivers/pci/intel-iommu.c | 104 - 1 files changed, 103 insertions(+), 1 deletions(-) diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index b00a8f2..e96b3bc 100644 ---

[PATCH 09/13] change domain_context_mapping_one for virtual machine domain

2008-12-02 Thread Han, Weidong
vm_domid won't be set in context, find available domain id for a device from its iommu. For a virtual machine domain, a default agaw will be set, and skip top levels of page tables for iommu which has less agaw than default. Signed-off-by: Weidong Han [EMAIL PROTECTED] ---

[PATCH 10/13] change intel iommu APIs

2008-12-02 Thread Han, Weidong
These APIs will be used by kvm VT-d. The domain used by these APIs is virtual machine domain (domain flag is DOMAIN_FLAG_VIRTUAL_MACHINE). Signed-off-by: Weidong Han [EMAIL PROTECTED] --- drivers/pci/intel-iommu.c | 128 --- include/linux/intel-iommu.h

[PATCH 13/13] KVM: support device assignment

2008-12-02 Thread Han, Weidong
Support device assignment, it can be used in device hotplug. Signed-off-by: Weidong Han [EMAIL PROTECTED] --- include/linux/kvm.h |5 + include/linux/kvm_host.h |8 virt/kvm/kvm_main.c | 42 ++ virt/kvm/vtd.c |

[PATCH 12/13] KVM: use the new intel iommu APIs

2008-12-02 Thread Han, Weidong
intel iommu APIs are updated, use the new APIs. In addition, change kvm_iommu_map_guest() to just create the domain, let kvm_iommu_assign_device() assign device. Signed-off-by: Weidong Han [EMAIL PROTECTED] --- include/linux/kvm_host.h | 15 +-- virt/kvm/kvm_main.c |7 +++-

[PATCH 2/2] kvm: set owner of cpu and vm file operations

2008-12-02 Thread Christian Borntraeger
There is a race between a close of the file descriptors and module unload in the kvm module. You can easily trigger this problem by applying this debug patch: --- kvm.orig/virt/kvm/kvm_main.c +++ kvm/virt/kvm/kvm_main.c @@ -648,10 +648,14 @@ void kvm_free_physmem(struct kvm *kvm)

Re: Hangs

2008-12-02 Thread xming
The same guest did it again. # uname -a Linux spaceball 2.6.27.6 #1 SMP Fri Nov 14 11:51:10 CET 2008 i686 QEMU Virtual CPU version 0.9.1 AuthenticAMD GNU/Linux # date Thu Dec 19 01:54:27 WET 1912 # uptime 01:54:29 up 14666 days, 21:17, 12 users, load average: 3.99, 3.97, 3.91 What can I do

[PATCH 12/12] VT-d: register functions for the IOMMU API

2008-12-02 Thread Joerg Roedel
Signed-off-by: Joerg Roedel [EMAIL PROTECTED] --- drivers/pci/intel-iommu.c | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index 2e8b102..bb6f771 100644 --- a/drivers/pci/intel-iommu.c +++

[PATCH 11/12] VT-d: adapt domain iova_to_phys function for IOMMU API

2008-12-02 Thread Joerg Roedel
Signed-off-by: Joerg Roedel [EMAIL PROTECTED] --- drivers/pci/intel-iommu.c | 15 --- include/linux/intel-iommu.h |2 -- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index ac22973..2e8b102 100644 ---

[ kvm-Bugs-2318236 ] SCSI debug

2008-12-02 Thread SourceForge.net
Bugs item #2318236, was opened at 2008-11-20 13:41 Message generated for change (Comment added) made by ryandbair You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=2318236group_id=180599 Please note that this message will contain a full copy of the comment

Re: [PATCH 1/5] KVM: remove the IRQ ACK notifier assertions

2008-12-02 Thread Avi Kivity
Mark McLoughlin wrote: We will obviously never pass a NULL struct kvm_irq_ack_notifier* to this functions. They are always embedded in the assigned device structure, so the assertion add nothing. The irqchip_in_kernel() assertion is very out of place - clearly this little abstraction needs to

[PATCH 1/2] anon_inodes: use fops-owner for module refcount

2008-12-02 Thread Christian Borntraeger
There is an imbalance for anonymous inodes. If the fops-owner field is set, the module reference count of owner is decreases on release. (filp_close -- __fput --- fops_put) On the other hand, anon_inode_getfd does not increase the module reference count of owner. This causes two problems: -

[PATCH 0/2] module_refcounting and anonymous inodes

2008-12-02 Thread Christian Borntraeger
Hello Avi, here is the latest respin of my fixes for the kvm module unload problem: [PATCH 1/2] anon_inodes: use fops-owner for module refcount [PATCH 2/2] kvm: set owner of cpu and vm file operations Both patches fix module reference counting problems and only matter for module unload -

[PATCH 10/12] VT-d: adapt domain map and unmap functions for IOMMU API

2008-12-02 Thread Joerg Roedel
Signed-off-by: Joerg Roedel [EMAIL PROTECTED] --- drivers/pci/intel-iommu.c | 22 +++--- include/linux/intel-iommu.h |4 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index 62ae6b1..ac22973

[ kvm-Bugs-2353510 ] Fedora 10 failures

2008-12-02 Thread SourceForge.net
Bugs item #2353510, was opened at 2008-11-27 14:46 Message generated for change (Comment added) made by technologov You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=2353510group_id=180599 Please note that this message will contain a full copy of the comment

RE: STOP error with virtio on KVM-79/2.6.18/Win2k3 x64 guest

2008-12-02 Thread Adrian Schmitz
-Original Message- From: Dor Laor [mailto:[EMAIL PROTECTED] Sent: Monday, December 01, 2008 5:27 PM To: Adrian Schmitz Cc: kvm@vger.kernel.org; Avi Kivity Subject: Re: STOP error with virtio on KVM-79/2.6.18/Win2k3 x64 guest What driver version are you using? Version 2 is

[PATCH 07/12] KVM: change KVM iommu.c to use IOMMU API

2008-12-02 Thread Joerg Roedel
Signed-off-by: Joerg Roedel [EMAIL PROTECTED] --- arch/ia64/kvm/Makefile |2 +- arch/x86/include/asm/kvm_host.h |3 +- arch/x86/kvm/Makefile |2 +- virt/kvm/iommu.c| 68 --- virt/kvm/kvm_main.c |2

[ kvm-Bugs-2088475 ] OpenSuse10.2 can not be installed

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

[PATCH 06/12] select IOMMU_API when DMAR and/or AMD_IOMMU is selected

2008-12-02 Thread Joerg Roedel
These two IOMMUs can implement the current version of this API. So select the API if one or both of these IOMMU drivers is selected. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] --- arch/ia64/Kconfig |3 +++ arch/x86/Kconfig |3 +++ drivers/base/Makefile |1 + 3 files

[PATCH] kvm-userspace: Add missing KVM string in the signature of CPUID

2008-12-02 Thread Guillaume Thouvenin
It adds a missing KVM string in the signature of the CPUID. Without it signature[2] is not well defined. Signed-off-by: Guillaume Thouvenin [EMAIL PROTECTED] --- qemu/qemu-kvm-x86.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/qemu/qemu-kvm-x86.c

[PATCH 08/12] VT-d: adapt domain init and destroy functions for IOMMU API

2008-12-02 Thread Joerg Roedel
Signed-off-by: Joerg Roedel [EMAIL PROTECTED] --- drivers/pci/intel-iommu.c | 30 +- include/linux/intel-iommu.h |2 -- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index 7f12852..59b9cdb

Re: [PATCH] Kvm: Qemu: save nvram

2008-12-02 Thread Daniel P. Berrange
On Tue, Dec 02, 2008 at 10:25:49AM +0800, Zhang, Yang wrote: This patch to save the nvram. It save the nvram by specify the arg of -name.And the saved file named by the arg. If do not specify the arg, it will not save the nvram I think we might be better off having an explicit command line

Re: splice() based interguest networking

2008-12-02 Thread Avi Kivity
Anthony Liguori wrote: 1) On TX, we vmsplice() from the sg buffer to one pipe. This will end up being vmsplice_to_pipe() in the kernel which is zero-copy. That implies we do the MAC address switching in userspace (or that this is a point-to-point protocol, which severely limits its

[PATCH 02/12] KVM: change to use new APIs for kvm vtd

2008-12-02 Thread Joerg Roedel
From: Weidong Han [EMAIL PROTECTED] This patch changes to use new APIs for KVM VT-d, and add device deassignment for hotplug. [Joerg: coding style cleanups] Signed-off-by: Weidong Han [EMAIL PROTECTED] Signed-off-by: Joerg Roedel [EMAIL PROTECTED] --- include/linux/kvm.h |5 ++

[PATCH 2/2] qemu: ppc: fix build warnings

2008-12-02 Thread Hollis Blanchard
Signed-off-by: Hollis Blanchard [EMAIL PROTECTED] --- qemu/hw/device_tree.c | 14 +++--- qemu/hw/device_tree.h | 12 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/qemu/hw/device_tree.c b/qemu/hw/device_tree.c index e73129d..2621ff1 100644 ---

powerpc kvm-userspace build fixes

2008-12-02 Thread Hollis Blanchard
These patches fix the kvm-userspace qemu build after a recent merge with upstream qemu. I'm also seeing a build dependency issue with dyngen-opc.h that I don't see upstream. I haven't sorted that out yet, but make qemu/ppcemb-softmmu/dyngen-opc.h first works around the problem. -Hollis -- To

[PATCH 1/2] qemu: ppc: fix build after qemu upstream changes

2008-12-02 Thread Hollis Blanchard
Signed-off-by: Hollis Blanchard [EMAIL PROTECTED] --- qemu/hw/ppc440_bamboo.c | 37 + 1 files changed, 21 insertions(+), 16 deletions(-) diff --git a/qemu/hw/ppc440_bamboo.c b/qemu/hw/ppc440_bamboo.c index bf42245..79e4ea8 100644 ---

Re: [PATCH 4/5] KVM: add KVM_USERSPACE_IRQ_SOURCE_ID assertions

2008-12-02 Thread Avi Kivity
Mark McLoughlin wrote: Make sure kvm_request_irq_source_id() never returns KVM_USERSPACE_IRQ_SOURCE_ID. Likewise, check that kvm_free_irq_source_id() never accepts KVM_USERSPACE_IRQ_SOURCE_ID. An alternative way to do this is to drop the distinction KVM_USERSPACE_IRQ_SOURCE_ID has, and

Re: [BUG] kvm crashes in 2.6.28-rc6-00007-ged31348

2008-12-02 Thread Avi Kivity
Luis Henriques wrote: On Sun, Nov 30, 2008 at 10:44:55PM +0200, Avi Kivity wrote: Luis Henriques wrote: No, I was not able to reproduce the issue. Please let me know if you need some more information on my system (.config, for instance). Were you using some other

Re: [PATCH] KVM: Qemu: push_nmi should be only used by I386 Arch.

2008-12-02 Thread Avi Kivity
Hollis Blanchard wrote: Well, it happens, but I do wish that more people would use cscope or even grep to find all users of a symbol. That's reasonable. I also wish that Avi would get his PPC box working so he could catch build breaks like these. Cross-compilers would do as well. I

Re: [PATCH 3/4] add ksm kernel shared memory driver.

2008-12-02 Thread Chris Wright
* Alan Cox ([EMAIL PROTECTED]) wrote: + r = !memcmp(old_digest, sha1_item-sha1val, SHA1_DIGEST_SIZE); + mutex_unlock(sha1_lock); + if (r) { + char *old_addr, *new_addr; + old_addr = kmap_atomic(oldpage, KM_USER0); + new_addr = kmap_atomic(newpage,

Re: [PATCH 3/4] add ksm kernel shared memory driver.

2008-12-02 Thread Alan Cox
On Tue, 2 Dec 2008 10:07:24 -0800 Chris Wright [EMAIL PROTECTED] wrote: * Alan Cox ([EMAIL PROTECTED]) wrote: + r = !memcmp(old_digest, sha1_item-sha1val, SHA1_DIGEST_SIZE); + mutex_unlock(sha1_lock); + if (r) { + char *old_addr, *new_addr; + old_addr =

[BUG] virtio-pci queue allocation not page-aligned

2008-12-02 Thread Hollis Blanchard
I just spent a number of hours tracking this one down, and I'm not too thrilled about it. vp_find_vq() does the memory allocation for virtio PCI rings, and it uses kzalloc() to do it. This is bad because the ring memory *must* be page-aligned. According to Anthony, at the time this code was

Re: [BUG] kvm crashes in 2.6.28-rc6-00007-ged31348

2008-12-02 Thread Luis Henriques
On Tue, Dec 02, 2008 at 02:23:52PM +0200, Avi Kivity wrote: Luis Henriques wrote: On Sun, Nov 30, 2008 at 10:44:55PM +0200, Avi Kivity wrote: Luis Henriques wrote: No, I was not able to reproduce the issue. Please let me know if you need some more information on my system

Re: [BUG] virtio-pci queue allocation not page-aligned

2008-12-02 Thread Anthony Liguori
Hollis Blanchard wrote: Finally, we could use the interface intended for exactly this purpose: the page allocator. If there's some problem with high memory, don't allocate it with GFP_HIGHMEM. Can you work up a patch to do this? Regards, Anthony Liguori -- To unsubscribe from this list:

Re: [BUG] kvm crashes in 2.6.28-rc6-00007-ged31348

2008-12-02 Thread Avi Kivity
Luis Henriques wrote: Ok, I am not sure but there is a possibility of having the vboxdrv driver loaded. _But_ I was not using, i.e., I do not use VirtualBox. In my attempts to reproduce the issue, I tried to load this module but, unfortunatly, my distro has this package broken ATM (err... in

Re: [BUG] kvm crashes in 2.6.28-rc6-00007-ged31348

2008-12-02 Thread Avi Kivity
Luis Henriques wrote: Ok, I am not sure but there is a possibility of having the vboxdrv driver loaded. _But_ I was not using, i.e., I do not use VirtualBox. In my attempts to reproduce the issue, I tried to load this module but, unfortunatly, my distro has this package broken ATM (err... in

Re: [BUG] kvm crashes in 2.6.28-rc6-00007-ged31348

2008-12-02 Thread Luis Henriques
(I am CC'ing to Steven Rostedt since he might be interested on this) On Tue, Dec 02, 2008 at 07:09:14PM +, Luis Henriques wrote: On Tue, Dec 02, 2008 at 02:23:52PM +0200, Avi Kivity wrote: Luis Henriques wrote: On Sun, Nov 30, 2008 at 10:44:55PM +0200, Avi Kivity wrote: Luis

Re: [BUG] kvm crashes in 2.6.28-rc6-00007-ged31348

2008-12-02 Thread Steven Rostedt
[ added Ingo too ] On Tue, 2008-12-02 at 19:46 +, Luis Henriques wrote: (I am CC'ing to Steven Rostedt since he might be interested on this) On Tue, Dec 02, 2008 at 07:09:14PM +, Luis Henriques wrote: I have some other information to had to my previous email. However, I do not

Re: [BUG] kvm crashes in 2.6.28-rc6-00007-ged31348

2008-12-02 Thread Avi Kivity
Steven Rostedt wrote: The following must be available without recursion for the function tracer to work: local_irq_save/restore smp_processor_id preempt_enable/disable_notrace atomic_inc/dec In arch/x86/kvm/svm.c, function svm_vcpu_run(), everything between the vmrun instruction

Re: [BUG] kvm crashes in 2.6.28-rc6-00007-ged31348

2008-12-02 Thread Steven Rostedt
On Tue, 2008-12-02 at 22:38 +0200, Avi Kivity wrote: Steven Rostedt wrote: The following must be available without recursion for the function tracer to work: local_irq_save/restore smp_processor_id preempt_enable/disable_notrace atomic_inc/dec In arch/x86/kvm/svm.c,

Re: [BUG] kvm crashes in 2.6.28-rc6-00007-ged31348

2008-12-02 Thread Avi Kivity
Steven Rostedt wrote: In arch/x86/kvm/svm.c, function svm_vcpu_run(), everything between the vmrun instruction and the call to load_host_msrs() is executed without a live pda, so no smp_processor_id(). Could easily be fixed by rearranging things. That would be best, but if you have

Re: Hangs

2008-12-02 Thread chris
On Tue, Dec 02, 2008 at 02:09:39PM +0200, Avi Kivity wrote: xming wrote: The same guest did it again. # uname -a Linux spaceball 2.6.27.6 #1 SMP Fri Nov 14 11:51:10 CET 2008 i686 QEMU Virtual CPU version 0.9.1 AuthenticAMD GNU/Linux # date Thu Dec 19 01:54:27 WET 1912 # uptime

Re: [BUG] kvm crashes in 2.6.28-rc6-00007-ged31348

2008-12-02 Thread Steven Rostedt
On Tue, 2 Dec 2008, Luis Henriques wrote: Unfortunately, I have only my laptop (where the crash is occuring) and no serial port on it (I am not able to get any output from the console). Do you have any suggestion on how to collect information on the crash? I can try to configure Kdump

Re: [PATCH 3/4] add ksm kernel shared memory driver.

2008-12-02 Thread Chris Wright
* Alan Cox ([EMAIL PROTECTED]) wrote: On Tue, 2 Dec 2008 10:07:24 -0800 Chris Wright [EMAIL PROTECTED] wrote: * Alan Cox ([EMAIL PROTECTED]) wrote: + r = !memcmp(old_digest, sha1_item-sha1val, SHA1_DIGEST_SIZE); + mutex_unlock(sha1_lock); + if (r) { +

Re: [PATCH 3/4] add ksm kernel shared memory driver.

2008-12-02 Thread Jonathan Corbet
On Tue, 2 Dec 2008 13:24:11 -0800 Chris Wright [EMAIL PROTECTED] wrote: Using current known techniques. A random collision is just as bad news. And, just to clarify, your concern would extend to any digest based comparison? Or are you specifically concerned about sha1? Wouldn't this

[PATCH 3 of 6] kvm: ppc: directly insert shadow mappings into the hardware TLB

2008-12-02 Thread Hollis Blanchard
Formerly, we used to maintain a per-vcpu shadow TLB and on every entry to the guest would load this array into the hardware TLB. This consumed 1280 bytes of memory (64 entries of 16 bytes plus a struct page pointer each), and also required some assembly to loop over the array on every entry.

[PATCH 4 of 6] kvm: ppc: save and restore guest mappings on context switch

2008-12-02 Thread Hollis Blanchard
Store shadow TLB entries in memory, but only use it on host context switch (instead of every guest entry). This improves performance for most workloads on 440 by reducing the guest TLB miss rate. Signed-off-by: Hollis Blanchard [EMAIL PROTECTED] diff --git a/arch/powerpc/include/asm/kvm_44x.h

[PATCH 2 of 6] powerpc/44x: declare tlb_44x_index for use in C code

2008-12-02 Thread Hollis Blanchard
KVM currently ignores the host's round robin TLB eviction selection, instead maintaining its own TLB state and its own round robin index. However, by participating in the normal 44x TLB selection, we can drop the alternate TLB processing in KVM. This results in a significant performance

[PATCH 1 of 6] kvm: ppc: support large host pages

2008-12-02 Thread Hollis Blanchard
KVM on 440 has always been able to handle large guest mappings with 4K host pages -- we must, since the guest kernel uses 256MB mappings. This patch makes KVM work when the host has large pages too (tested with 64K). Signed-off-by: Hollis Blanchard [EMAIL PROTECTED] diff --git

[PATCH 6 of 6] kvm: ppc: mostly cosmetic updates to the exit timing accounting code

2008-12-02 Thread Hollis Blanchard
The only significant changes were to kvmppc_exit_timing_write() and kvmppc_exit_timing_show(), both of which were dramatically simplified. Signed-off-by: Hollis Blanchard [EMAIL PROTECTED] diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h ---

[PATCH 0 of 6] PowerPC KVM patches for 2.6.29

2008-12-02 Thread Hollis Blanchard
Hi Avi, here's the latest batch of PowerPC kernel patches. The first set dramatically improve performance. Most importantly, we add support for large host pages with KVM (i.e. PAGE_SHIFT 12). (Large *guest* pages have already been supported since day 1, since the guest kernel uses them for the

[PATCH 5 of 6] kvm: ppc: Implement in-kernel exit timing statistics

2008-12-02 Thread Hollis Blanchard
Existing KVM statistics are either just counters (kvm_stat) reported for KVM generally or trace based aproaches like kvm_trace. For KVM on powerpc we had the need to track the timings of the different exit types. While this could be achieved parsing data created with a kvm_trace extension this

Re: [BUG] virtio-pci queue allocation not page-aligned

2008-12-02 Thread Rusty Russell
On Wednesday 03 December 2008 05:38:21 Hollis Blanchard wrote: I just spent a number of hours tracking this one down, and I'm not too thrilled about it. vp_find_vq() does the memory allocation for virtio PCI rings, and it uses kzalloc() to do it. This is bad because the ring memory *must* be

Re: [PATCH 3/4] add ksm kernel shared memory driver.

2008-12-02 Thread Alan Cox
On Tue, 2 Dec 2008 13:24:11 -0800 Chris Wright [EMAIL PROTECTED] wrote: * Alan Cox ([EMAIL PROTECTED]) wrote: On Tue, 2 Dec 2008 10:07:24 -0800 Chris Wright [EMAIL PROTECTED] wrote: * Alan Cox ([EMAIL PROTECTED]) wrote: + r = !memcmp(old_digest, sha1_item-sha1val,

Re: [BUG] virtio-pci queue allocation not page-aligned

2008-12-02 Thread Hollis Blanchard
On Wed, 2008-12-03 at 08:35 +1030, Rusty Russell wrote: On Wednesday 03 December 2008 05:38:21 Hollis Blanchard wrote: I just spent a number of hours tracking this one down, and I'm not too thrilled about it. vp_find_vq() does the memory allocation for virtio PCI rings, and it uses

Re: Hangs

2008-12-02 Thread xming
I have a way to reproduce my instance of the problem easily now. I was trying to build a new kernel on my guest, and found that depmod hangs guests every time. In my case, I only have an amd processor - I don't have an intel host to try it on, right now, but it happens on Ubuntu 8.04

Re: Hangs

2008-12-02 Thread chris
Sounds like your configuration is very similar to mine. I'm also on a vanilla kernel (2.6.27.7 in my case) with kvm-79 and AMD processors. You sparked my curiosity on the depmod -a issue, so I spent some time trying it on different configurations. I have two servers: * 1.8GHz AMD Opteron

Re: [SR-IOV driver example 0/3 resend] introduction

2008-12-02 Thread Jeff Kirsher
On Tue, Dec 2, 2008 at 1:27 AM, Yu Zhao [EMAIL PROTECTED] wrote: SR-IOV drivers of Intel 82576 NIC are available. There are two parts of the drivers: Physical Function driver and Virtual Function driver. The PF driver is based on the IGB driver and is used to control PF to allocate hardware

RE: [PATCH] Kvm: Qemu: save nvram

2008-12-02 Thread Zhang, Xiantao
Daniel P. Berrange wrote: On Tue, Dec 02, 2008 at 03:01:20PM +0200, Avi Kivity wrote: Daniel P. Berrange wrote: On Tue, Dec 02, 2008 at 10:25:49AM +0800, Zhang, Yang wrote: This patch to save the nvram. It save the nvram by specify the arg of -name.And the saved file named by the arg. If do

Re: [PATCH 0/12] Factor VT-d KVM functions into a generic API (with multiple device assignment support)

2008-12-02 Thread Greg KH
On Tue, Dec 02, 2008 at 02:01:11PM +0100, Joerg Roedel wrote: Hi, this patch series makes the current KVM device passthrough code generic enough so that other IOMMU implementation can also plug into this code. It works by factoring the functions Vt-d code exports to KVM into a generic

RE: [PATCH] Kvm: Qemu: save nvram

2008-12-02 Thread Zhang, Yang
Ok, I will save it in current directory and don't read nvram from file, if don't specify -nvram. Best Regards --yang -Original Message- From: Zhang, Xiantao Sent: 2008年12月3日 14:02 To: Daniel P. Berrange; Avi Kivity Cc: Zhang, Yang; [EMAIL PROTECTED]; kvm@vger.kernel.org Subject: RE:

[PATCH] register page alignment memory for MMIO of assigned device

2008-12-02 Thread Han, Weidong
MMIO of assigned device is registered as memory slot. Size of memory slot in KVM must be page size multiple. But MMIO of some devices (e.g. EHCI controller) is not page size mutiple, so it fails to register these MMIOs, thus device assignment fails. In order to solve it, need to register target

Re: [PATCH 0/12] Factor VT-d KVM functions into a generic API (with multiple device assignment support)

2008-12-02 Thread Joerg Roedel
On Tue, Dec 02, 2008 at 07:44:05PM -0800, Greg KH wrote: On Tue, Dec 02, 2008 at 02:01:11PM +0100, Joerg Roedel wrote: Hi, this patch series makes the current KVM device passthrough code generic enough so that other IOMMU implementation can also plug into this code. It works by

Re: [PATCH 0/12] Factor VT-d KVM functions into a generic API (with multiple device assignment support)

2008-12-02 Thread Greg KH
On Wed, Dec 03, 2008 at 08:50:49AM +0100, Joerg Roedel wrote: On Tue, Dec 02, 2008 at 07:44:05PM -0800, Greg KH wrote: On Tue, Dec 02, 2008 at 02:01:11PM +0100, Joerg Roedel wrote: Hi, this patch series makes the current KVM device passthrough code generic enough so that other

[PATCH 2/2] qemu: ppc: fix build warnings

2008-12-02 Thread Hollis Blanchard
Signed-off-by: Hollis Blanchard [EMAIL PROTECTED] --- qemu/hw/device_tree.c | 14 +++--- qemu/hw/device_tree.h | 12 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/qemu/hw/device_tree.c b/qemu/hw/device_tree.c index e73129d..2621ff1 100644 ---

[PATCH 1/2] qemu: ppc: fix build after qemu upstream changes

2008-12-02 Thread Hollis Blanchard
Signed-off-by: Hollis Blanchard [EMAIL PROTECTED] --- qemu/hw/ppc440_bamboo.c | 37 + 1 files changed, 21 insertions(+), 16 deletions(-) diff --git a/qemu/hw/ppc440_bamboo.c b/qemu/hw/ppc440_bamboo.c index bf42245..79e4ea8 100644 ---

powerpc kvm-userspace build fixes

2008-12-02 Thread Hollis Blanchard
These patches fix the kvm-userspace qemu build after a recent merge with upstream qemu. I'm also seeing a build dependency issue with dyngen-opc.h that I don't see upstream. I haven't sorted that out yet, but make qemu/ppcemb-softmmu/dyngen-opc.h first works around the problem. -Hollis -- To