[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-3.4-testing] VT-d: fix off-by-one error in RMRR validation



# HG changeset patch
# User Keith Coleman <keith.coleman@xxxxxxxxxxxxx>
# Date 1325654147 18000
# Node ID 0a06336fd9f857778b6666aacd5258c83c6f7574
# Parent  46f133149343e8b280c9fa687ec65ddd5da83718
VT-d: fix off-by-one error in RMRR validation

(base_addr,end_addr) is an inclusive range, and hence there shouldn't
be a subtraction of 1 in the second invocation of page_is_ram_type().
For RMRRs covering a single page that actually resulted in the
immediately preceding page to get checked (which could have resulted
in a false warning).

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
xen-unstable changeset: 23868:28147fd781af
xen-unstable date: Thu Sep 22 18:32:34 2011 +0100
---


diff -r 46f133149343 -r 0a06336fd9f8 xen/drivers/passthrough/vtd/dmar.c
--- a/xen/drivers/passthrough/vtd/dmar.c        Wed Jan 04 00:05:17 2012 -0500
+++ b/xen/drivers/passthrough/vtd/dmar.c        Wed Jan 04 00:15:47 2012 -0500
@@ -393,7 +393,7 @@
     /* This check is here simply to detect when RMRR values are not properly 
represented in the 
        system memory map and inform the user */
     if ( (!page_is_ram_type(paddr_to_pfn(rmrr->base_address), 
RAM_TYPE_RESERVED))||
-         (!page_is_ram_type(paddr_to_pfn(rmrr->end_address) - 1, 
RAM_TYPE_RESERVED)) )
+         (!page_is_ram_type(paddr_to_pfn(rmrr->end_address), 
RAM_TYPE_RESERVED)) )
     {
         dprintk(XENLOG_WARNING VTDPREFIX,
                 "RMRR address range not in reserved memory base = %"PRIx64" 
end = %"PRIx64"; " \

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.