WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [linux-2.6.18-xen] blktap2: add tlb flush properly.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] blktap2: add tlb flush properly.
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 28 May 2009 02:30:56 -0700
Delivery-date: Thu, 28 May 2009 02:32:07 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] blktap2: add tlb flush properly., Xen patchbot-linux-2.6.18-xen <=