提交 15bfc094 编写于 作者: K Konrad Rzeszutek Wilk

xen/setup: Ignore E820_UNUSABLE when setting 1-1 mappings.

When we parse the raw E820, the Xen hypervisor can set "E820_RAM"
to "E820_UNUSABLE" if the mem=X argument is used. As such we
should _not_ consider the E820_UNUSABLE as an 1-1 identity
mapping, but instead use the same case as for E820_RAM.
Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
上级 693d92a1
...@@ -166,7 +166,7 @@ static unsigned long __init xen_set_identity(const struct e820entry *list, ...@@ -166,7 +166,7 @@ static unsigned long __init xen_set_identity(const struct e820entry *list,
if (last > end) if (last > end)
continue; continue;
if (entry->type == E820_RAM) { if ((entry->type == E820_RAM) || (entry->type == E820_UNUSABLE)) {
if (start > start_pci) if (start > start_pci)
identity += set_phys_range_identity( identity += set_phys_range_identity(
PFN_UP(start_pci), PFN_DOWN(start)); PFN_UP(start_pci), PFN_DOWN(start));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册