Hi,

1. How should we allocate extra memory to guest other than memory allocated 
through "qemu_alloc_physram"??
2. How to register the extra allocated memory with KVM?

I have tried to allocate an extra one page to Guest but couldn't succeed; 
probably somebody had already done this exercise.

1. In Qemu/vl.c, I allocate a page for guest
        a. virt_addr = mmap(NULL, size, PROT_READ | PROT_WRITE,MAP_PRIVATE |    
        MAP_ANON, -1, 0);

2. In "machine->init"
        a. ram_addr = qemu_ram_alloc(PAGE_SIZE);
        b.cpu_register_physical_memory(below_4g_mem_size,PAGE_SIZE,ram_addr+of  
fset); (offset is the difference between the qemu's virtual address     got 
from mmap and qemu's last virtual address allocated through         
"qemu_alloc_physram"

3. Increase "phys_ram_size" and "ram_size" by one page.

Did I miss something here?

Thx,

Venkat


--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to