qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] e1000 memory corruption in guest OS


From: Paolo Bonzini
Subject: Re: [Qemu-devel] e1000 memory corruption in guest OS
Date: Mon, 03 Mar 2014 12:21:21 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

Il 03/03/2014 11:47, Alexey Kardashevskiy ha scritto:
> > Sorry, I am not following you here. Does KVM map things not page-aligned?
>
> Look in exec.c for xen_enabled().  Xen's implementation of
> address_space_map/unmap is completely different.

Honestly cannot see much difference in the current QEMU...

void *qemu_get_ram_ptr(ram_addr_t addr)
{
    RAMBlock *block = qemu_get_ram_block(addr);

    if (xen_enabled()) {
        /* We need to check if the requested address is in the RAM
         * because we don't want to map the entire memory in QEMU.
         * In that case just map until the end of the page.
         */
        if (block->offset == 0) {
            return xen_map_cache(addr, 0, 0);
        } else if (block->host == NULL) {
            block->host =
                xen_map_cache(block->offset, block->length, 1);
        }
    }
    return block->host + (addr - block->offset);
}

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]