login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
November
»
1
Re: Crash on kvm_iommu_map_pages
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Jan Kiszka
Subject:
Re: Crash on kvm_iommu_map_pages
Date: Monday, November 1, 2010 - 8:29 am
Am 01.11.2010 15:35, Joerg Roedel wrote:
quoted text
> On Mon, Nov 01, 2010 at 03:22:15PM +0100, Jan Kiszka wrote: >> Am 01.11.2010 14:53, Roedel, Joerg wrote: >>> On Mon, Nov 01, 2010 at 09:25:00AM -0400, Jan Kiszka wrote: >>>> Am 01.11.2010 14:21, Roedel, Joerg wrote: >>>>> The registers rax and rbx contain non-canonical addresses (if >>>>> interpreted as pointers). The instruction where this happens is a mov so >>>>> I guess that the #GP is because of an non-canonical address. >>>>> Can you find out the code-line where this happens and the exact >>>>> assembler instruction? (haven't managed to decode the registers used). >>>> >>>> In pfn_to_dma_pte, line 710: >>>> >>>> if (!dma_pte_present(pte)) { >>>> ffffffff8121de8c: f6 03 03 testb __PLACEHOLDER__0_x3,(%rbx) >>>> ffffffff8121de8f: 0f 85 d8 00 00 00 jne ffffffff8121df6d <pfn_to_dma_pte+0x154> >>>> >>>> The first instruction raises the fault. >>> >>> Ok, so it seems that my understanding of the Code: field in the >>> crash-message was wrong :) >>> Anyway, the testb uses rbx as an address which has a non-canonical >>> value. This means the the address of 'pte' is invalid. Since rax also >>> contains a wrong address the 'parent' variable probably already contains >>> the wrong address. Does the attached patch help? >>> >>> diff --git a/include/linux/dma_remapping.h b/include/linux/dma_remapping.h >>> index 5619f85..ca46f24 100644 >>> --- a/include/linux/dma_remapping.h >>> +++ b/include/linux/dma_remapping.h >>> @@ -6,7 +6,7 @@ >>> */ >>> #define VTD_PAGE_SHIFT (12) >>> #define VTD_PAGE_SIZE (1UL << VTD_PAGE_SHIFT) >>> -#define VTD_PAGE_MASK (((u64)-1) << VTD_PAGE_SHIFT) >>> +#define VTD_PAGE_MASK ((((u64)-1) << VTD_PAGE_SHIFT) & ((1ULL << 52) - 1)) >>> #define VTD_PAGE_ALIGN(addr) (((addr) + VTD_PAGE_SIZE - 1) & VTD_PAGE_MASK) >>> >>> #define DMA_PTE_READ (1) >>> >> >> Crashes during early boot while initializing dmar. If you need the >> trace, I could set up some debug console. > > Hmm, no. This was only a guess. The VTD_PAGE_MASK does not mask out the > bits 52-63 of the pte. According to the VT-d spec it is allowed to set > these bits, some are marked as AVL and some have special meanings. If a > pte has one of these bits set the phys_addr calculated will be wrong and > the virt_addr calculated from it too (probably non-canonical, leading to > the GPF). > > Probably masking out these bits in dma_pte_addr helps. >
Nope. But I just noticed a fatal thinko in my fix to intel_iommu_attach_device - probably that was the key. Need to boot the test kernel... Jan
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
Re: Crash on kvm_iommu_map_pages
, Jan Kiszka
, (Mon Nov 1, 5:57 am)
Re: Crash on kvm_iommu_map_pages
, Roedel, Joerg
, (Mon Nov 1, 6:21 am)
Re: Crash on kvm_iommu_map_pages
, Jan Kiszka
, (Mon Nov 1, 6:25 am)
Re: Crash on kvm_iommu_map_pages
, Roedel, Joerg
, (Mon Nov 1, 6:53 am)
Re: Crash on kvm_iommu_map_pages
, Jan Kiszka
, (Mon Nov 1, 7:22 am)
Re: Crash on kvm_iommu_map_pages
, Joerg Roedel
, (Mon Nov 1, 7:35 am)
Re: Crash on kvm_iommu_map_pages
, Jan Kiszka
, (Mon Nov 1, 8:29 am)
Re: Crash on kvm_iommu_map_pages
, Jan Kiszka
, (Mon Nov 1, 9:37 am)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Mel Gorman
Re: [PATCH 1/4] vmstat: remove zone->lock from walk_zones_in_node
Guenter Roeck
Re: [lm-sensors] Location for thermal drivers
David Woodhouse
Re: RFC: Moving firmware blobs out of the kernel.
Siddha, Suresh B
Re: [PATCH 2.6.21 review I] [11/25] x86: default to physical mode on hotplug CPU k...
Peter Zijlstra
Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)
git-commits-head
:
Linux Kernel Mailing List
[MIPS] Fix potential latency problem due to non-atomic cpu_wait.
Linux Kernel Mailing List
USB: rename USB_SPEED_VARIABLE to USB_SPEED_WIRELESS
Linux Kernel Mailing List
lib/vsprintf.c: fix bug omitting minus sign of numbers (module_param)
Linux Kernel Mailing List
[Bluetooth] Initiate authentication during connection establishment
Linux Kernel Mailing List
[POWERPC] 4xx: Add ppc40x_defconfig
linux-netdev
:
MERCEDES
Your mail id has won 950,000.00 in the MERCEDES Benz Online Promo.for claims send:
David Miller
Re: [PATCH] xen/netfront: do not mark packets of length < MSS as GSO
David Miller
Re: skb_segment() questions
Shan Wei
[RFC PATCH net-next 2/5]IPv6:netfilter: Send an ICMPv6 "Fragment Reassembly Timeou...
Stanislaw Gruszka
[PATCH 1/4] bnx2x: use smp_mb() to keep ordering of read write operations
git
:
Nicolas Sebrecht
git-svn died of signal 11 (was "3 failures on test t9100 (svn)")
Junio C Hamano
Re: [PATCH 2/2] Add url.<base>.pushInsteadOf: URL rewriting for push only
Martin Langhoff
Re: [PATCH] GIT commit statistics.
Alexandre Julliard
[PATCH] gitweb: Put back shortlog instead of graphiclog in the project list.
Josh Triplett
[PATCH 2/2] Add url.<base>.pushInsteadOf: URL rewriting for push only
openbsd-misc
:
Taisto Qvist XX
Re: AMD GEODE LX-800 just works with kernel from install42.iso and kernelpanics wi...
Nico Meijer
Re: gOS Develop Kit with VIA pc-1 Processor Platform VIA C7-D
Andreas Bihlmaier
Re: jetway board sensors (Fintek F71805F)
admin
Drive a 2009 car from R799p/m
Antti Harri
Re: how to create a sha256 hash
Colocation donated by:
Syndicate