Example #1
0
static void cmd_host_vapool_bitmap(struct vmm_chardev *cdev, int colcnt)
{
    u32 ite, total = vmm_host_vapool_total_page_count();
    virtual_addr_t base = vmm_host_vapool_base();

    vmm_cprintf(cdev, "0 : free\n");
    vmm_cprintf(cdev, "1 : used");
    for (ite = 0; ite < total; ite++) {
        if (umod32(ite, colcnt) == 0) {
            if (sizeof(u64) == sizeof(virtual_addr_t)) {
                vmm_cprintf(cdev, "\n0x%016llx: ",
                            base + ite * VMM_PAGE_SIZE);
            } else {
                vmm_cprintf(cdev, "\n0x%08x: ",
                            base + ite * VMM_PAGE_SIZE);
            }
        }
        if (vmm_host_vapool_page_isfree(base + ite * VMM_PAGE_SIZE)) {
            vmm_cprintf(cdev, "0");
        } else {
            vmm_cprintf(cdev, "1");
        }
    }
    vmm_cprintf(cdev, "\n");
}
Example #2
0
static void cmd_host_vapool_info(struct vmm_chardev *cdev)
{
	u32 free = vmm_host_vapool_free_page_count();
	u32 total = vmm_host_vapool_total_page_count();
	virtual_addr_t base = vmm_host_vapool_base();

	vmm_cprintf(cdev, "Base Address : 0x%"PRIADDR"\n", base);
	vmm_cprintf(cdev, "Page Size    : %lu (0x%08lx)\n",
					VMM_PAGE_SIZE, VMM_PAGE_SIZE);
	vmm_cprintf(cdev, "Free Pages   : %u (0x%08x)\n", free, free);
	vmm_cprintf(cdev, "Total Pages  : %u (0x%08x)\n", total, total);
}
Example #3
0
static void cmd_host_vapool_info(struct vmm_chardev *cdev)
{
	u32 free = vmm_host_vapool_free_page_count();
	u32 total = vmm_host_vapool_total_page_count();
	virtual_addr_t base = vmm_host_vapool_base();
	if (sizeof(u64) == sizeof(virtual_addr_t)) {
		vmm_cprintf(cdev, "Base Address : 0x%016llx\n", base);
	} else {
		vmm_cprintf(cdev, "Base Address : 0x%08x\n", base);
	}
	vmm_cprintf(cdev, "Page Size    : %d (0x%08x)\n", 
					VMM_PAGE_SIZE, VMM_PAGE_SIZE);
	vmm_cprintf(cdev, "Free Pages   : %d (0x%08x)\n", free, free);
	vmm_cprintf(cdev, "Total Pages  : %d (0x%08x)\n", total, total);
}