From: "Yang, Xiaowei" <xiaowei.yang@intel.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] Fix 17725:c0c0f4fa8850: use type paddr_t instead of unsigned long for physcial memory address
Date: Tue, 27 May 2008 16:08:25 +0800 [thread overview]
Message-ID: <1211875705.5907.14.camel@ip6-localhost> (raw)
[-- Attachment #1: Type: text/plain, Size: 142 bytes --]
Otherwise, the address overflows on PAE system with memory size > 4G.
Signed-off-by: Yang, Xiaowei <xiaowei.yang@intel.com>
Thanks,
Xiaowei
[-- Attachment #2: paddr.patch --]
[-- Type: text/x-patch, Size: 2427 bytes --]
diff -r eafb252f1412 xen/arch/x86/setup.c
--- a/xen/arch/x86/setup.c Mon May 26 08:53:25 2008 +0100
+++ b/xen/arch/x86/setup.c Tue May 27 15:20:20 2008 +0800
@@ -1100,10 +1100,10 @@ void arch_get_xen_caps(xen_capabilities_
#endif
}
-int xen_in_range(unsigned long start, unsigned long end)
-{
- start = max_t(unsigned long, start, xenheap_phys_start);
- end = min_t(unsigned long, end, xenheap_phys_end);
+int xen_in_range(paddr_t start, paddr_t end)
+{
+ start = max_t(paddr_t, start, xenheap_phys_start);
+ end = min_t(paddr_t, end, xenheap_phys_end);
return start < end;
}
diff -r eafb252f1412 xen/arch/x86/tboot.c
--- a/xen/arch/x86/tboot.c Mon May 26 08:53:25 2008 +0100
+++ b/xen/arch/x86/tboot.c Tue May 27 15:20:20 2008 +0800
@@ -96,13 +96,13 @@ int tboot_in_measured_env(void)
return (g_tboot_shared != NULL);
}
-int tboot_in_range(unsigned long start, unsigned long end)
+int tboot_in_range(paddr_t start, paddr_t end)
{
if ( g_tboot_shared == NULL || g_tboot_shared->version < 0x02 )
return 0;
- start = max_t(unsigned long, start, g_tboot_shared->tboot_base);
- end = min_t(unsigned long, end,
+ start = max_t(paddr_t, start, g_tboot_shared->tboot_base);
+ end = min_t(paddr_t, end,
g_tboot_shared->tboot_base + g_tboot_shared->tboot_size);
return start < end;
diff -r eafb252f1412 xen/drivers/passthrough/vtd/iommu.c
--- a/xen/drivers/passthrough/vtd/iommu.c Mon May 26 08:53:25 2008 +0100
+++ b/xen/drivers/passthrough/vtd/iommu.c Tue May 27 15:55:52 2008 +0800
@@ -1074,7 +1074,8 @@ static int intel_iommu_domain_init(struc
struct hvm_iommu *hd = domain_hvm_iommu(d);
struct iommu *iommu = NULL;
int guest_width = DEFAULT_DOMAIN_ADDRESS_WIDTH;
- int i, adjust_width, agaw;
+ int adjust_width, agaw;
+ u64 i;
unsigned long sagaw;
struct acpi_drhd_unit *drhd;
@@ -1102,8 +1103,8 @@ static int intel_iommu_domain_init(struc
if ( d->domain_id == 0 )
{
- extern int xen_in_range(unsigned long start, unsigned long end);
- extern int tboot_in_range(unsigned long start, unsigned long end);
+ extern int xen_in_range(paddr_t start, paddr_t end);
+ extern int tboot_in_range(paddr_t start, paddr_t end);
/*
* Set up 1:1 page table for dom0 except the critical segments
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
reply other threads:[~2008-05-27 8:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1211875705.5907.14.camel@ip6-localhost \
--to=xiaowei.yang@intel.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.