[IA64] Fix qemu memory access on IA64

- Correct a parameter to xc_map_foreign_batch(). skipping vga hole.
- sync_icache() might overrun a page boundary. qemu-dm will die.

This re-enables HVM support after cset
99478ffd81ee8685e6376210a1bd654c3790bf8d in linux-2.6.18-xen.hg

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
This commit is contained in:
Alex Williamson committed 2008-02-22 08:40:32 -07:00
1 parent bfe9584683
commit 89224a0296
2 files changed
+13 -6

No files matched your search

+8 -2
View File
@@ -246,14 +246,20 @@ static void xen_init_fv(uint64_t ram_size, int vga_ram_size, char *boot_device,
for (i = 0; i < nr_pages; i++)
page_array[i] = i;
/* VTI will not use memory between 3G~4G, so we just pass a legal pfn
to make QEMU map continuous virtual memory space */
if (ram_size > MMIO_START) {
if (ram_size > MMIO_START) {
for (i = 0 ; i < (MEM_G >> XC_PAGE_SHIFT); i++)
page_array[(MMIO_START >> XC_PAGE_SHIFT) + i] =
(STORE_PAGE_START >> XC_PAGE_SHIFT);
}
/* skipping VGA hole, same as above */
if (ram_size > VGA_IO_START) {
for (i = 0 ; i < (VGA_IO_SIZE >> XC_PAGE_SHIFT); i++)
page_array[(VGA_IO_START >> XC_PAGE_SHIFT) + i] =
(STORE_PAGE_START >> XC_PAGE_SHIFT);
}
phys_ram_base = xc_map_foreign_batch(xc_handle, domid,
PROT_READ|PROT_WRITE,
+5 -4
View File
@@ -350,12 +350,13 @@ CPUReadMemoryFunc **cpu_get_io_memory_read(int io_index)
* So to emulate right behavior that guest OS is assumed, we need to flush
* I/D cache here.
*/
static void sync_icache(unsigned long address, int len)
static void sync_icache(uint8_t *address, int len)
{
int l;
unsigned long addr = (unsigned long)address;
unsigned long end = addr + len;
for(l = 0; l < (len + 32); l += 32)
__ia64_fc(address + l);
for (addr &= ~(32UL-1); addr < end; addr += 32UL)
__ia64_fc(addr);
ia64_sync_i();
ia64_srlz_i();
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.