2/3 add one more page to the guest for IDE PIO.
Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
diff -r 2d3ceb082114 tools/libxc/ia64/xc_ia64_hvm_build.c
--- a/tools/libxc/ia64/xc_ia64_hvm_build.c Mon Feb 26 09:13:50 2007 +0000
+++ b/tools/libxc/ia64/xc_ia64_hvm_build.c Tue Feb 27 13:27:24 2007 +0900
@@ -569,6 +569,7 @@ setup_guest(int xc_handle, uint32_t dom,
xen_pfn_t *pfn_list;
shared_iopage_t *sp;
void *ioreq_buffer_page;
+ void *pio_buffer_page;
unsigned long dom_memsize = memsize << 20;
unsigned long nr_pages = memsize << (20 - PAGE_SHIFT);
unsigned long vcpus;
@@ -628,9 +629,10 @@ setup_guest(int xc_handle, uint32_t dom,
pfn_list[0] = IO_PAGE_START >> PAGE_SHIFT;
pfn_list[1] = STORE_PAGE_START >> PAGE_SHIFT;
- pfn_list[2] = BUFFER_IO_PAGE_START >> PAGE_SHIFT;
-
- rc = xc_domain_memory_populate_physmap(xc_handle, dom, 3,
+ pfn_list[2] = BUFFER_IO_PAGE_START >> PAGE_SHIFT;
+ pfn_list[3] = BUFFER_PIO_PAGE_START >> PAGE_SHIFT;
+
+ rc = xc_domain_memory_populate_physmap(xc_handle, dom, 4,
0, 0, &pfn_list[0]);
if (rc != 0) {
PERROR("Could not allocate IO page or store page or buffer io
page.\n");
@@ -684,6 +686,12 @@ setup_guest(int xc_handle, uint32_t dom,
pfn_list[2]);
memset(ioreq_buffer_page,0,PAGE_SIZE);
munmap(ioreq_buffer_page, PAGE_SIZE);
+
+ pio_buffer_page = xc_map_foreign_range(xc_handle, dom, PAGE_SIZE,
+ PROT_READ | PROT_WRITE,
+ pfn_list[3]);
+ memset(pio_buffer_page,0,PAGE_SIZE);
+ munmap(pio_buffer_page, PAGE_SIZE);
free(pfn_list);
return 0;
diff -r 2d3ceb082114 tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py Mon Feb 26 09:13:50 2007 +0000
+++ b/tools/python/xen/xend/image.py Tue Feb 27 13:27:24 2007 +0900
@@ -572,8 +572,8 @@ class IA64_HVM_ImageHandler(HVMImageHand
def getRequiredAvailableMemory(self, mem_kb):
page_kb = 16
- # ROM size for guest firmware, ioreq page and xenstore page
- extra_pages = 1024 + 3
+ # ROM size for guest firmware, ioreq page, pio page and xenstore page
+ extra_pages = 1024 + 4
return mem_kb + extra_pages * page_kb
def getRequiredInitialReservation(self):
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
|