On Thu, Aug 30, 2007 at 05:45:29PM +0900, Isaku Yamahata wrote:
> # HG changeset patch
> # User yamahata@xxxxxxxxxxxxx
> # Date 1188463197 -32400
> # Node ID d761433c643f2c76a2bfbf4c32417921aee45f0d
> # Parent 6644d848626685f01d6832837fdb4ab2e06fffde
> supress warning of __assign_domain_page().
> On Tiger, the following region trigger the the warning.
> It seems false-positive warning because of the c/s 13123:90db0f68b121.
> so suppress the warning in such a case.
>
> EFI memory descriptor
> (XEN) mem07: type= 5, attr=0x8000000000000009,
> range=[0x00000000000c0000-0x0000000000100000) (0MB)
> type = EFI_RUNTIME_SERVICES_CODE
> attribute = EFI_MEMORY_RUNTIME | EFI_MEMORY_WB | EFI_MEMORY_UC
>
> from /proc/iomem
> 000a0000-000fffff : PCI Bus 0000:00
> 000c0000-000fffff : reserved
> PATCHNAME: supress_warning_of___assign_domain_page
>
> Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
This looks correct to me, and I can verify that it makes the warnings
dissapear.
Acked-by: Simon Horman <horms@xxxxxxxxxxxx>
>
> diff -r 6644d8486266 -r d761433c643f xen/arch/ia64/xen/mm.c
> --- a/xen/arch/ia64/xen/mm.c Fri Aug 24 15:09:14 2007 -0600
> +++ b/xen/arch/ia64/xen/mm.c Thu Aug 30 17:39:57 2007 +0900
> @@ -868,15 +868,41 @@ __assign_domain_page(struct domain *d,
> // dom0 tries to map real machine's I/O region, but failed.
> // It is very likely that dom0 doesn't boot correctly because
> // it can't access I/O. So complain here.
> - if ((flags & ASSIGN_nocache) &&
> - (pte_pfn(ret_pte) != (physaddr >> PAGE_SHIFT) ||
> - !(pte_val(ret_pte) & _PAGE_MA_UC)))
> - printk("%s:%d WARNING can't assign page domain 0x%p id %d\n"
> - "\talready assigned pte_val 0x%016lx\n"
> - "\tmpaddr 0x%016lx physaddr 0x%016lx flags 0x%lx\n",
> - __func__, __LINE__,
> - d, d->domain_id, pte_val(ret_pte),
> - mpaddr, physaddr, flags);
> + if (flags & ASSIGN_nocache) {
> + int warn = 0;
> + if (pte_pfn(ret_pte) != (physaddr >> PAGE_SHIFT))
> + warn = 1;
> + else if (!(pte_val(ret_pte) & _PAGE_MA_UC)) {
> + u32 type;
> + u64 attr;
> + warn = 1;
> +
> + /*
> + * See
> + * complete_dom0_memmap()
> + * case EFI_RUNTIME_SERVICES_CODE:
> + * case EFI_RUNTIME_SERVICES_DATA:
> + * case EFI_ACPI_RECLAIM_MEMORY:
> + * case EFI_ACPI_MEMORY_NVS:
> + * case EFI_RESERVED_TYPE:
> + *
> + * Currently only EFI_RUNTIME_SERVICES_CODE is found
> + * so that we suppress only EFI_RUNTIME_SERVICES_CODE case.
> + */
> + type = efi_mem_type(physaddr);
> + attr = efi_mem_attributes(physaddr);
> + if (type == EFI_RUNTIME_SERVICES_CODE &&
> + (attr & EFI_MEMORY_UC) && (attr & EFI_MEMORY_WB))
> + warn = 0;
> + }
> + if (warn)
> + printk("%s:%d WARNING can't assign page domain 0x%p id %d\n"
> + "\talready assigned pte_val 0x%016lx\n"
> + "\tmpaddr 0x%016lx physaddr 0x%016lx flags 0x%lx\n",
> + __func__, __LINE__,
> + d, d->domain_id, pte_val(ret_pte),
> + mpaddr, physaddr, flags);
> + }
>
> return -EAGAIN;
> }
--
宝曼 西門 (ホウマン・サイモン) | Simon Horman (Horms)
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
|