lkml.org 
[lkml]   [2015]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 05/17] iommu/vt-d: Mark root-entry present in set_root_entry
Date
From: Joerg Roedel <jroedel@suse.de>

When we do no memcpy from the old to the new kernel for the
root entry table, we have to set the present bit ourself.

Tested-by: Baoquan He <bhe@redhat.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
drivers/iommu/intel-iommu.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index d66bec6..cda0901 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -198,8 +198,7 @@ static inline bool root_present(struct root_entry *root)

static inline void set_root_value(struct root_entry *root, unsigned long value)
{
- root->lo &= ~VTD_PAGE_MASK;
- root->lo |= value & VTD_PAGE_MASK;
+ root->lo = (value & VTD_PAGE_MASK) | 1;
}

static inline struct context_entry *
--
1.9.1


\
 
 \ /
  Last update: 2015-06-05 16:41    [W:1.179 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site