diff options
author | Jan Beulich <jbeulich@suse.com> | 2011-10-03 16:31:12 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2011-10-03 16:31:12 +0100 |
commit | 040fd561774ea3c672de080e08e45fcd15766ee2 (patch) | |
tree | f7fd2bfee05a93b7cfb3f965e17fe44f29be0b5e | |
parent | 2699490e04c9e44d67cd242f8da5943a3c40e26e (diff) | |
download | xen-040fd561774ea3c672de080e08e45fcd15766ee2.tar.gz xen-040fd561774ea3c672de080e08e45fcd15766ee2.tar.bz2 xen-040fd561774ea3c672de080e08e45fcd15766ee2.zip |
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
-rw-r--r-- | xen/drivers/passthrough/vtd/dmar.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xen/drivers/passthrough/vtd/dmar.c b/xen/drivers/passthrough/vtd/dmar.c index c9a51e4f7e..5ecade2657 100644 --- a/xen/drivers/passthrough/vtd/dmar.c +++ b/xen/drivers/passthrough/vtd/dmar.c @@ -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 " |