[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/5] xen mapcache: Check if a memory space has m
From: |
Stefano Stabellini |
Subject: |
Re: [Qemu-devel] [PATCH 2/5] xen mapcache: Check if a memory space has moved. |
Date: |
Thu, 24 Nov 2011 17:57:58 +0000 |
User-agent: |
Alpine 2.00 (DEB 1167 2008-08-23) |
On Thu, 24 Nov 2011, Anthony PERARD wrote:
> diff --git a/xen-mapcache.c b/xen-mapcache.c
> index 7bcb86e..73927ab 100644
> --- a/xen-mapcache.c
> +++ b/xen-mapcache.c
> @@ -191,10 +191,14 @@ uint8_t *xen_map_cache(target_phys_addr_t phys_addr,
> target_phys_addr_t size,
> uint8_t lock)
> {
> MapCacheEntry *entry, *pentry = NULL;
> - target_phys_addr_t address_index = phys_addr >> MCACHE_BUCKET_SHIFT;
> - target_phys_addr_t address_offset = phys_addr & (MCACHE_BUCKET_SIZE - 1);
> + target_phys_addr_t address_index;
> + target_phys_addr_t address_offset;
> target_phys_addr_t __size = size;
>
> + phys_addr = xen_addr_actually_is(phys_addr, size);
> + address_index = phys_addr >> MCACHE_BUCKET_SHIFT;
> + address_offset = phys_addr & (MCACHE_BUCKET_SIZE - 1);
> +
> trace_xen_map_cache(phys_addr);
>
> if (address_index == mapcache->last_address_index && !lock && !__size) {
it is probably a good idea to call xen_addr_actually_is only in case
the normal mapping failed, for performance reasons
- [Qemu-devel] [PATCH 0/5] Have a working migration with Xen, Anthony PERARD, 2011/11/24
- [Qemu-devel] [PATCH 1/5] vl.c: Do not save RAM state when Xen is used., Anthony PERARD, 2011/11/24
- [Qemu-devel] [PATCH 3/5] Introduce premigrate RunState., Anthony PERARD, 2011/11/24
- [Qemu-devel] [PATCH 2/5] xen mapcache: Check if a memory space has moved., Anthony PERARD, 2011/11/24
- [Qemu-devel] [PATCH 4/5] xen: Change memory access behavior during migration., Anthony PERARD, 2011/11/24
- [Qemu-devel] [PATCH 5/5] vga-cirrus: Workaround during restore when using Xen., Anthony PERARD, 2011/11/24