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@suse.com>
xen-unstable changeset:   23868:28147fd781af
xen-unstable date:        Thu Sep 22 18:32:34 2011 +0100
This commit is contained in:
Jan Beulich committed 2011-10-03 16:31:12 +01:00
1 parent 2699490e04
commit 040fd56177
1 file changed
+1 -1
+1 -1
View File
@@ -519,7 +519,7 @@ acpi_parse_one_rmrr(struct acpi_dmar_entry_header *header)
* inform the user
*/
if ( (!page_is_ram_type(paddr_to_pfn(base_addr), RAM_TYPE_RESERVED)) ||
(!page_is_ram_type(paddr_to_pfn(end_addr) - 1, RAM_TYPE_RESERVED)) )
(!page_is_ram_type(paddr_to_pfn(end_addr), RAM_TYPE_RESERVED)) )
{
dprintk(XENLOG_WARNING VTDPREFIX,
" RMRR address range not in reserved memory "
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.