[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [linux-2.6.18-xen] blktap2: add tlb flush properly.
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1243501466 -3600 # Node ID a4b49dff3387153b990c95b33eb56a04eeefea33 # Parent c7c92f868aa15fd352a3469dbc54b2c90b79724f blktap2: add tlb flush properly. xen_invlpg() flushes tlb on its cpu, but tlb flush is needed on all cpus. So replace xen_invlpg() with more proper ones. Maybe it would be possible to make tlb flush less. this patch also makes blktap2 compile on ia64 because xen_invlpg() is x86 specific. Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx> --- drivers/xen/blktap2/device.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff -r c7c92f868aa1 -r a4b49dff3387 drivers/xen/blktap2/device.c --- a/drivers/xen/blktap2/device.c Thu May 28 10:00:03 2009 +0100 +++ b/drivers/xen/blktap2/device.c Thu May 28 10:04:26 2009 +0100 @@ -3,6 +3,7 @@ #include <linux/cdrom.h> #include <linux/hdreg.h> #include <linux/module.h> +#include <asm/tlbflush.h> #include <scsi/scsi.h> #include <scsi/scsi_ioctl.h> @@ -163,7 +164,6 @@ blktap_map_uaddr_fn(pte_t *ptep, struct BTDBG("ptep %p -> %012llx\n", ptep, pte_val(*pte)); set_pte(ptep, *pte); - xen_invlpg(addr); return 0; } @@ -182,7 +182,6 @@ blktap_umap_uaddr_fn(pte_t *ptep, struct BTDBG("ptep %p\n", ptep); pte_clear(mm, addr, ptep); - xen_invlpg(addr); return 0; } @@ -322,6 +321,7 @@ blktap_unmap(struct blktap *tap, struct if (request->handles[i].kernel == INVALID_GRANT_HANDLE) { kvaddr = request_to_kaddr(request, i); blktap_umap_uaddr(&init_mm, kvaddr); + flush_tlb_kernel_range(kvaddr, kvaddr + PAGE_SIZE); set_phys_to_machine(__pa(kvaddr) >> PAGE_SHIFT, INVALID_P2M_ENTRY); } @@ -551,7 +551,9 @@ blktap_map(struct blktap *tap, pte = mk_pte(page, ring->vma->vm_page_prot); blktap_map_uaddr(ring->vma->vm_mm, uvaddr, pte_mkwrite(pte)); + flush_tlb_mm(ring->vma->vm_mm); blktap_map_uaddr(&init_mm, kvaddr, mk_pte(page, PAGE_KERNEL)); + flush_tlb_kernel_range(kvaddr, kvaddr + PAGE_SIZE); set_phys_to_machine(__pa(kvaddr) >> PAGE_SHIFT, pte_mfn(pte)); request->handles[seg].kernel = INVALID_GRANT_HANDLE; _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |