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-ia64-devel

[Xen-ia64-devel] [PATCH] implemented vcpu_ptc_l()

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-ia64-devel] [PATCH] implemented vcpu_ptc_l()
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Tue, 6 Dec 2005 12:20:48 +0900
Delivery-date: Tue, 06 Dec 2005 03:20:59 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
Hi.
I implemented vcpu_ptc_l() which is needed to boot dom0 on ski.
Is there any reason why it hasn't been implemented?
I didn't see difficulties to implement it. Do I miss anything?

Signed-off-by Isaku Yamahata <yamahata@xxxxxxxxxxxxx>

--
diff -r c4a86ad93e49 xen/arch/ia64/linux-xen/tlb.c
--- a/xen/arch/ia64/linux-xen/tlb.c     Thu Dec  1 18:21:59 2005 +0900
+++ b/xen/arch/ia64/linux-xen/tlb.c     Tue Dec  6 12:13:48 2005 +0900
@@ -110,6 +110,15 @@
 }
 
 void
+ia64_local_tlb_purge (unsigned long start, unsigned long end, unsigned long 
nbits)
+{
+       do {
+               ia64_ptcl(start, (nbits << 2));
+               start += (1UL << nbits);
+       } while (start < end);
+}
+
+void
 local_flush_tlb_all (void)
 {
        unsigned long i, j, flags, count0, count1, stride0, stride1, addr;
diff -r c4a86ad93e49 xen/arch/ia64/xen/vcpu.c
--- a/xen/arch/ia64/xen/vcpu.c  Thu Dec  1 18:21:59 2005 +0900
+++ b/xen/arch/ia64/xen/vcpu.c  Tue Dec  6 12:13:48 2005 +0900
@@ -1827,8 +1827,20 @@
 
 IA64FAULT vcpu_ptc_l(VCPU *vcpu, UINT64 vadr, UINT64 addr_range)
 {
-       printk("vcpu_ptc_l: called, not implemented yet\n");
-       return IA64_ILLOP_FAULT;
+       extern void ia64_local_tlb_purge (unsigned long start, unsigned long 
end, unsigned long nbits);
+
+       //XXX FIXME: validate not flushing Xen addresses
+       if (IS_VMM_ADDRESS(vadr)) {
+               return IA64_ILLOP_FAULT;
+       }
+       
+#ifdef VHPT_GLOBAL
+       vhpt_flush_address(vadr, addr_range);
+#endif
+       ia64_local_tlb_purge(vadr, vadr + addr_range, PAGE_SHIFT);
+       vcpu_purge_tr_entry(&PSCBX(vcpu,dtlb));
+       vcpu_purge_tr_entry(&PSCBX(vcpu,itlb));
+       return IA64_NO_FAULT;
 }
 
 // At privlvl=0, fc performs no access rights or protection key checks, while



-- 
yamahata

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel