Re: BUG: soft lockup - CPU stuck for ...

2009-03-29 Thread Gerrit Slomma
Robert Wimmer r.wimmer at tomorrow-focus.de writes: Hi, does anyone know how to solve the problem with BUG: soft lockup - CPU#0 stuck for ...? Today I got the messages below during compilation of the kernel modules in a guest. Using kvm84 and Kernel 2.6.29 as host kernel and 2.6.28 as

Re: RFC: Add reserved bits check

2009-03-29 Thread Avi Kivity
Dong, Eddie wrote: +static bool is_rsvd_bits_set(struct kvm_vcpu *vcpu, u64 gpte, int level) +{ + int ps = 0; + + if (level == PT_DIRECTORY_LEVEL) + ps = !!(gpte PT_PAGE_SIZE_MASK); No need for this. If you set rsvd_bits_mask[1][0] == rsvd_bits_mask[0][0],

Re: [PATCH] KVM: Defer remote tlb flushes on invlpg (v3)

2009-03-29 Thread Avi Kivity
Marcelo, Andrea? Avi Kivity wrote: KVM currently flushes the tlbs on all cpus when emulating invlpg. This is because at the time of invlpg we lose track of the page, and leaving stale tlb entries could cause the guest to access the page when it is later freed (say after being swapped out).

Re: [PATCH 2/7] kvm mmu: infrastructure changes for multiple huge page support

2009-03-29 Thread Avi Kivity
Joerg Roedel wrote: This patch includes most of the necessary changes to the KVM SoftMMU for supporting more than one huge page size. The changes in this patch include: * introduce 'enum kvm_page_size' which is used to represent the page size used How about the concept of page_level

Re: [PATCH 4/7] kvm mmu: implement necessary data structures for second huge page accounting

2009-03-29 Thread Avi Kivity
Joerg Roedel wrote: This patch adds the necessary data structures to take care of write protections in place within a second huge page sized page. struct kvm_vcpu_arch { diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 9936b45..7d4162d 100644 --- a/arch/x86/kvm/mmu.c +++

Re: [PATCH 5/7] kvm mmu: add support for 1GB pages to direct mapping paths

2009-03-29 Thread Avi Kivity
Joerg Roedel wrote: This patch makes the MMU path for TDP aware of 1GB pages. +#define PT64_MID_BASE_ADDR_MASK (PT64_BASE_ADDR_MASK \ + ~((1ULL (PAGE_SHIFT + (2 * PT64_LEVEL_BITS))) - 1)) +#define PT64_MID_GFN_DELTA_MASK (PT64_BASE_ADDR_MASK (((1ULL \ +

Re: [PATCH 6/7] kvm mmu: enabling 1GB pages by extending backing_size funtion

2009-03-29 Thread Avi Kivity
Joerg Roedel wrote: This patch enables support for 1GB pages in KVM by implementing the support in backing_size(). @@ -490,18 +492,30 @@ static enum kvm_page_size host_page_size(struct kvm *kvm, gfn_t gfn) static enum kvm_page_size backing_size(struct kvm_vcpu *vcpu, gfn_t gfn) {

Re: [PATCH 7/7] kvm x86: report 1GB page support to userspace

2009-03-29 Thread Avi Kivity
Joerg Roedel wrote: If userspace knows that the kernel part supports 1GB pages it can enable the corresponding cpuid bit so that guests actually use GB pages. diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index a1df2a3..6593198 100644 ---

Re: [PATCH] kvm mmu: add support for 1GB pages in shadow paging code

2009-03-29 Thread Avi Kivity
Joerg Roedel wrote: This patch adds support for 1GB pages in the shadow paging code. The guest can map 1GB pages in his page tables and KVM will map the page frame with a 1GB, a 2MB or even a 4kb page size, according to backing host page size and the write protections in place. This is the

Re: [PATCH 0/7] Support for GB pages in KVM

2009-03-29 Thread Avi Kivity
Marcelo Tosatti wrote: On Fri, Mar 27, 2009 at 03:31:52PM +0100, Joerg Roedel wrote: Hi, this patchset extends the KVM MMU implementation to support 1GB pages as supported by AMD family 16 processors. These patches enable support for 1 GB pages with Nested Paging. Support for these pages in

Re: [PATCH 0/7] Support for GB pages in KVM

2009-03-29 Thread Avi Kivity
Joerg Roedel wrote: On Sat, Mar 28, 2009 at 06:40:08PM -0300, Marcelo Tosatti wrote: On Fri, Mar 27, 2009 at 03:31:52PM +0100, Joerg Roedel wrote: Hi, this patchset extends the KVM MMU implementation to support 1GB pages as supported by AMD family 16 processors. These patches enable

mm_pages_next() question

2009-03-29 Thread Avi Kivity
static int mmu_pages_next(struct kvm_mmu_pages *pvec, struct mmu_page_path *parents, int i) { int n; for (n = i+1; n pvec-nr; n++) { struct kvm_mmu_page *sp = pvec-page[n].sp; if (sp-role.level

Re: Live memory allocation?

2009-03-29 Thread Avi Kivity
Nolan wrote: Windows does zero all memory at boot, and also runs a idle-priority thread in the background to zero memory as it is freed. This way it is far less likely to need to zero a page to satisfy a memory allocation request. Whether or not this is still a win now that people care about

Re: [PATCH 7/7] kvm x86: report 1GB page support to userspace

2009-03-29 Thread Joerg Roedel
On Sun, Mar 29, 2009 at 02:54:31PM +0300, Avi Kivity wrote: Joerg Roedel wrote: If userspace knows that the kernel part supports 1GB pages it can enable the corresponding cpuid bit so that guests actually use GB pages. diff --git a/arch/x86/include/asm/kvm_host.h

Re: [PATCH 0/7] Support for GB pages in KVM

2009-03-29 Thread Joerg Roedel
On Sun, Mar 29, 2009 at 03:03:28PM +0300, Avi Kivity wrote: Joerg Roedel wrote: On Sat, Mar 28, 2009 at 06:40:08PM -0300, Marcelo Tosatti wrote: On Fri, Mar 27, 2009 at 03:31:52PM +0100, Joerg Roedel wrote: Hi, this patchset extends the KVM MMU implementation to support 1GB pages

Re: [PATCH 7/7] kvm x86: report 1GB page support to userspace

2009-03-29 Thread Avi Kivity
Joerg Roedel wrote: int (*set_tss_addr)(struct kvm *kvm, unsigned int addr); int (*get_tdp_level)(void); int (*get_mt_mask_shift)(void); + + bool (*gb_page_enable)(void); }; Should enable unconditionally. Of course we need to find the shadow bug first,

Re: [PATCH] kvm mmu: add support for 1GB pages in shadow paging code

2009-03-29 Thread Joerg Roedel
On Sun, Mar 29, 2009 at 02:59:26PM +0300, Avi Kivity wrote: Joerg Roedel wrote: return write_protected; } @@ -789,11 +797,14 @@ static int kvm_handle_hva(struct kvm *kvm, unsigned long hva, if (hva = start hva end) { gfn_t gfn_offset = (hva -

Re: [PATCH 7/7] kvm x86: report 1GB page support to userspace

2009-03-29 Thread Joerg Roedel
On Sun, Mar 29, 2009 at 03:49:11PM +0300, Avi Kivity wrote: Joerg Roedel wrote: int (*set_tss_addr)(struct kvm *kvm, unsigned int addr); int (*get_tdp_level)(void); int (*get_mt_mask_shift)(void); + + bool (*gb_page_enable)(void); }; Should enable unconditionally. Of

Re: [PATCH 7/7] kvm x86: report 1GB page support to userspace

2009-03-29 Thread Avi Kivity
Joerg Roedel wrote: Ok I will change that together with the page_size - page_level chhanges. But I doubt that there will ever be 0.5T pages ;) We're bloating at a rate of 1 bit per 1-2 years, so we have 8-16 years to prepare. -- error compiling committee.c: too many arguments to function

Re: [PATCH 4/7] kvm mmu: implement necessary data structures for second huge page accounting

2009-03-29 Thread Joerg Roedel
On Sun, Mar 29, 2009 at 02:45:44PM +0300, Avi Kivity wrote: Joerg Roedel wrote: This patch adds the necessary data structures to take care of write protections in place within a second huge page sized page. struct kvm_vcpu_arch { diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index

Re: [PATCH 4/7] kvm mmu: implement necessary data structures for second huge page accounting

2009-03-29 Thread Joerg Roedel
On Sun, Mar 29, 2009 at 04:15:07PM +0300, Avi Kivity wrote: Joerg Roedel wrote: +static int has_wrprotected_largepage(struct kvm *kvm, gfn_t gfn) +{ + struct kvm_memory_slot *slot; + int *hugepage_idx; + + gfn = unalias_gfn(kvm, gfn); + slot = gfn_to_memslot_unaliased(kvm, gfn);

Re: [PATCH 4/7] kvm mmu: implement necessary data structures for second huge page accounting

2009-03-29 Thread Avi Kivity
Avi Kivity wrote: Joerg Roedel wrote: This patch adds the necessary data structures to take care of write protections in place within a second huge page sized page. +#ifdef KVM_PAGES_PER_LHPAGE +if (npages !new.hpage_info) { +int hugepages = npages / KVM_PAGES_PER_LHPAGE; +

Re: [PATCH 4/7] kvm mmu: implement necessary data structures for second huge page accounting

2009-03-29 Thread Avi Kivity
Joerg Roedel wrote: This patch adds the necessary data structures to take care of write protections in place within a second huge page sized page. +#ifdef KVM_PAGES_PER_LHPAGE + if (npages !new.hpage_info) { + int hugepages = npages / KVM_PAGES_PER_LHPAGE; +

Re: [PATCH v4 0/6] PCI: support the ATS capability

2009-03-29 Thread Matthew Wilcox
On Thu, Mar 26, 2009 at 04:15:56PM -0700, Jesse Barnes wrote: 2, avoid using pci_find_ext_capability every time when reading ATS Invalidate Queue Depth (Matthew Wilcox) I asked a question about how that was used, and got back a version which changed how it was done. I still don't have

[PATCH 1/4] Fix handling of a fault during NMI unblocked due to IRET

2009-03-29 Thread Gleb Natapov
Bit 12 is undefined in any of the following cases: If the VM exit sets the valid bit in the IDT-vectoring information field. If the VM exit is due to a double fault. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/kvm/vmx.c | 17 +++-- 1 files changed, 11 insertions(+),

[PATCH 2/4] Rewrite twisted maze of if() statements with more straightforward switch()

2009-03-29 Thread Gleb Natapov
Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/kvm/vmx.c | 43 +-- 1 files changed, 25 insertions(+), 18 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 14e3f48..1017544 100644 --- a/arch/x86/kvm/vmx.c +++

Re: IO on guest is 20 times slower than host

2009-03-29 Thread Avi Kivity
Kurt Yoder wrote: slow host cpu information, core 1 of 16: processor : 0 vendor_id : AuthenticAMD cpu family : 16 model : 4 model name : Quad-Core AMD Opteron(tm) Processor 8382 stepping: 2 cpu MHz : 2611.998 cache size : 512 KB physical id

Re: [PATCH 2/2] kvm: qemu: check device assignment command

2009-03-29 Thread Avi Kivity
Han, Weidong wrote: I suggest replacing the parsing code with pci_parse_devaddr() (needs to be extended to support functions) so that all the checking and parsing is done in one place. If use pci_parse_devaddr(), it needs to add domain section to assigning command, and add function

Re: [patch] kvm-userland vl.c compiler warning

2009-03-29 Thread Avi Kivity
Jes Sorensen wrote: Hi, A minor cosmetic fix to tell the compiler to shut up by including the header providing the prototype for dma_helper_init(). I already got this via qemu-svn. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line

After upgrading from F7 kvm-65-15 to F10 kvm-74-10

2009-03-29 Thread Gerry Reno
Hi, We had setup a number of VM's using KVM-65 running on F7 some time ago. We just ocmpleted upgrading a number of hosts to F10 and with that came KVM-74-10. We had some problems after that upgrade. First, none of the VM's would start. After digging around awhile we finally figured out

Re: [PATCH] kvm-autotest: write relative path in html report

2009-03-29 Thread Uri Lublin
Ryan Harper wrote: When generating an html report from make_html_report.py, one needs to supply the full path to the results directory. This value ends up being embedded in the output which breaks relocating the results dir to a different path. This patch adds a new flag that supresses the

Re: BUG: soft lockup - CPU stuck for ...

2009-03-29 Thread Nikola Ciprich
Hi, I was also experiencing this problem a lot for quite a long time (and for wide range of KVM versions..) I might be completely wrong as I'm not sure if it was really the reason, but i THINK it disappeared when I started to use fully preemptible kernel on host.. You might want to try it... BR

Re: IO on guest is 20 times slower than host

2009-03-29 Thread Avi Kivity
Avi Kivity wrote: Kurt Yoder wrote: slow host cpu information, core 1 of 16: processor : 0 vendor_id : AuthenticAMD cpu family : 16 model : 4 model name : Quad-Core AMD Opteron(tm) Processor 8382 stepping: 2 cpu MHz : 2611.998 cache size :

Re: After upgrading from F7 kvm-65-15 to F10 kvm-74-10

2009-03-29 Thread Gerry Reno
Gerry Reno wrote: Hi, We had setup a number of VM's using KVM-65 running on F7 some time ago. We just ocmpleted upgrading a number of hosts to F10 and with that came KVM-74-10. We had some problems after that upgrade. First, none of the VM's would start. After digging around awhile we

Re: After upgrading from F7 kvm-65-15 to F10 kvm-74-10

2009-03-29 Thread Ross McKay
Gerry Reno wrote: [...] After digging around awhile we finally figured out that we had to once again 'chcon -t virt_image_t path_to_image' as we had done back when we first setup the VM's. But what is the proper procedure so that we don't lose the selinux attributes on these image files?

Re: After upgrading from F7 kvm-65-15 to F10 kvm-74-10

2009-03-29 Thread Gerry Reno
Ross McKay wrote: Gerry Reno wrote: [...] After digging around awhile we finally figured out that we had to once again 'chcon -t virt_image_t path_to_image' as we had done back when we first setup the VM's. But what is the proper procedure so that we don't lose the selinux attributes

Re: After upgrading from F7 kvm-65-15 to F10 kvm-74-10

2009-03-29 Thread Gerry Reno
Gerry Reno wrote: Gerry Reno wrote: Hi, We had setup a number of VM's using KVM-65 running on F7 some time ago. We just ocmpleted upgrading a number of hosts to F10 and with that came KVM-74-10. We had some problems after that upgrade. we are having a lot of problems with the dreaded

RE: RFC: Add reserved bits check

2009-03-29 Thread Dong, Eddie
+static bool is_rsvd_bits_set(struct kvm_vcpu *vcpu, u64 gpte, int level) +{ + int ps = 0; + +if (level == PT_DIRECTORY_LEVEL) +ps = !!(gpte PT_PAGE_SIZE_MASK); No need for this. If you set rsvd_bits_mask[1][0] == rsvd_bits_mask[0][0], then you get the same behaviour.

Re: [PATCH v4 0/6] PCI: support the ATS capability

2009-03-29 Thread Yu Zhao
On Sun, Mar 29, 2009 at 09:51:31PM +0800, Matthew Wilcox wrote: On Thu, Mar 26, 2009 at 04:15:56PM -0700, Jesse Barnes wrote: 2, avoid using pci_find_ext_capability every time when reading ATS Invalidate Queue Depth (Matthew Wilcox) I asked a question about how that was used, and

[ kvm-Bugs-2721640 ] perfctr wrmsr warning when booting 64bit RHEl5.3

2009-03-29 Thread SourceForge.net
Bugs item #2721640, was opened at 2009-03-29 19:04 Message generated for change (Tracker Item Submitted) made by jiajun You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=2721640group_id=180599 Please note that this message will contain a full copy of the

Biweekly KVM Test report, kernel 0c7771... userspace 1223a0...

2009-03-29 Thread Xu, Jiajun
Hi All, This is our Weekly KVM Testing Report against lastest kvm.git 0c77713470debc666a07dc40080d728272bb58b9 and kvm-userspace.git 1223a029b36b0d9e73af76bcc274bb770f814886. One New Issue: 1. perfctr wrmsr warning when booting 64bit RHEl5.3

Cleanup to reuse is_long_mode()

2009-03-29 Thread Dong, Eddie
Thanks, Eddie commit 6688a1fbc37330f2c4e16d1a78050b64e1ce5dcc Author: root r...@eddie-wb.localdomain Date: Mon Mar 30 11:31:10 2009 +0800 cleanup to reuse is_long_mode(vcpu) Signed-off-by: Eddie Dong eddie.d...@intel.com diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c

Use rsvd_bits_mask in load_pdptrs for cleanup and considing EXB bit

2009-03-29 Thread Dong, Eddie
This is followup of rsvd_bits emulation. thx, eddie commit 171eb2b2d8282dd913a5d5c6c695fd64e1ddcf4c Author: root r...@eddie-wb.localdomain Date: Mon Mar 30 11:39:50 2009 +0800 Use rsvd_bits_mask in load_pdptrs for cleanup and considing EXB bit. Signed-off-by: Eddie Dong

Re: After upgrading from F7 kvm-65-15 to F10 kvm-74-10

2009-03-29 Thread Gerry Reno
Gerry Reno wrote: So the only problem I'm very concerned about at the moment is the VM that was at the point of first reboot after the successful completion of an F9 install. Any suggestions as to how to get that VM running? In the virtmanager log we see this when we try to start this

Re: RFC: Add reserved bits check

2009-03-29 Thread Avi Kivity
Dong, Eddie wrote: @@ -2183,6 +2197,25 @@ static int paging64_init_context_common(struct kvm_vcpu *vcpu, int level) static int paging64_init_context(struct kvm_vcpu *vcpu) { + struct kvm_mmu *context = vcpu-arch.mmu; + int maxphyaddr = cpuid_maxphyaddr(vcpu); + u64

Re: I/O errors after migration - why?

2009-03-29 Thread Takeshi Sone
Hello, I had similar problem regarding block I/O and migration. And it is worked around by qemu stop command and waiting 1 second before starting migration (and cont after migration). See the Ubuntu bug report I posted. https://bugs.launchpad.net/ubuntu/+source/kvm/+bug/341682 I think Nolan

[PATCH] Merge commit 'qemu-svn/trunk'

2009-03-29 Thread Avi Kivity
From: Avi Kivity a...@redhat.com * commit 'qemu-svn/trunk': (27 commits) gdbstub: Allow re-instantiation (Jan Kiszka) char: Fix closing of various char devices (Jan Kiszka) qemu-img: adding a -F base_fmt option to qemu-img create -b (Uri Lublin) block-qcow2: keep backing file format in a

[PATCH] kvm: fix tsc_khz on older i386

2009-03-29 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Older i386 kernels do not export tsc_khz. Try to make a best effort attempt by looking up tsc_khz, and falling back to a constant if it isn't exported. Signed-off-by: Avi Kivity a...@redhat.com diff --git a/kernel/external-module-compat-comm.h

[PATCH] kvm: qemu: use statfs to determine size of huge pages

2009-03-29 Thread Avi Kivity
From: Joerg Roedel joerg.roe...@amd.com The current method of finding out the size of huge pages does not work reliably anymore. Current Linux supports more than one huge page size but /proc/meminfo only show one of the supported sizes. To find out the real page size used can be found by calling

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

2009-03-29 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Conflicts: arch/ia64/include/asm/kvm_host.h arch/ia64/kvm/kvm-ia64.c arch/x86/include/asm/kvm.h arch/x86/kvm/i8254.c arch/x86/kvm/i8254.h arch/x86/kvm/vmx.c arch/x86/kvm/x86.c include/linux/kvm.h

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

2009-03-29 Thread Avi Kivity
From: Avi Kivity a...@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