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] More hyperprivops

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] More hyperprivops
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Wed, 15 Jun 2005 23:26:50 +0000
Delivery-date: Sun, 19 Jun 2005 18:03:48 +0000
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1709.1.11, 2005/06/15 17:26:50-06:00, djm@xxxxxxxxxxxxxxx

        More hyperprivops
        Signed-off-by: Dan Magenheimer <dan.magenheimer@xxxxxx>



 arch/ia64/privop.c      |   32 ++++++++++++++++++++++++++++++--
 arch/ia64/vcpu.c        |   13 +++++++++----
 include/asm-ia64/vcpu.h |    4 ++--
 3 files changed, 41 insertions(+), 8 deletions(-)


diff -Nru a/xen/arch/ia64/privop.c b/xen/arch/ia64/privop.c
--- a/xen/arch/ia64/privop.c    2005-06-19 14:04:55 -04:00
+++ b/xen/arch/ia64/privop.c    2005-06-19 14:04:55 -04:00
@@ -753,11 +753,17 @@
 #define HYPERPRIVOP_SET_TPR            0xa
 #define HYPERPRIVOP_EOI                        0xb
 #define HYPERPRIVOP_SET_ITM            0xc
-#define HYPERPRIVOP_MAX                        0xc
+#define HYPERPRIVOP_THASH              0xd
+#define HYPERPRIVOP_PTC_GA             0xe
+#define HYPERPRIVOP_ITR_D              0xf
+#define HYPERPRIVOP_GET_RR             0x10
+#define HYPERPRIVOP_SET_RR             0x11
+#define HYPERPRIVOP_MAX                        0x11
 
 char *hyperpriv_str[HYPERPRIVOP_MAX+1] = {
        0, "rfi", "rsm.dt", "ssm.dt", "cover", "itc.d", "itc.i", "ssm.i",
-       "=ivr", "=tpr", "tpr=", "eoi", "itm=",
+       "=ivr", "=tpr", "tpr=", "eoi", "itm=", "thash", "ptc.ga", "itr.d",
+       "=rr", "rr=",
        0
 };
 
@@ -772,6 +778,7 @@
        struct vcpu *v = (struct domain *) current;
        INST64 inst;
        UINT64 val;
+       UINT64 itir, ifa;
 
 // FIXME: Handle faults appropriately for these
        if (!iim || iim > HYPERPRIVOP_MAX) {
@@ -819,6 +826,27 @@
                return 1;
            case HYPERPRIVOP_SET_ITM:
                (void)vcpu_set_itm(v,regs->r8);
+               return 1;
+           case HYPERPRIVOP_THASH:
+               (void)vcpu_thash(v,regs->r8,&val);
+               regs->r8 = val;
+               return 1;
+           case HYPERPRIVOP_PTC_GA:
+               // FIXME: this doesn't seem to work yet, turned off
+               //(void)vcpu_ptc_ga(v,regs->r8,regs->r9);
+               //return 1;
+               break;
+           case HYPERPRIVOP_ITR_D:
+               (void)vcpu_get_itir(v,&itir);
+               (void)vcpu_get_ifa(v,&ifa);
+               (void)vcpu_itr_d(v,regs->r8,regs->r9,itir,ifa);
+               return 1;
+           case HYPERPRIVOP_GET_RR:
+               (void)vcpu_get_rr(v,regs->r8,&val);
+               regs->r8 = val;
+               return 1;
+           case HYPERPRIVOP_SET_RR:
+               (void)vcpu_set_rr(v,regs->r8,regs->r9);
                return 1;
        }
        return 0;
diff -Nru a/xen/arch/ia64/vcpu.c b/xen/arch/ia64/vcpu.c
--- a/xen/arch/ia64/vcpu.c      2005-06-19 14:04:55 -04:00
+++ b/xen/arch/ia64/vcpu.c      2005-06-19 14:04:55 -04:00
@@ -43,8 +43,9 @@
 
 #ifdef PRIVOP_ADDR_COUNT
 struct privop_addr_count privop_addr_counter[PRIVOP_COUNT_NINSTS] = {
-       { "rsm", { 0 }, { 0 }, 0 },
-       { "ssm", { 0 }, { 0 }, 0 }
+       { "=ifa", { 0 }, { 0 }, 0 },
+       { "thash", { 0 }, { 0 }, 0 },
+       0
 };
 extern void privop_count_addr(unsigned long addr, int inst);
 #define        PRIVOP_COUNT_ADDR(regs,inst) 
privop_count_addr(regs->cr_iip,inst)
@@ -135,7 +136,7 @@
        struct ia64_psr psr, imm, *ipsr;
        REGS *regs = vcpu_regs(vcpu);
 
-       PRIVOP_COUNT_ADDR(regs,_RSM);
+       //PRIVOP_COUNT_ADDR(regs,_RSM);
        // TODO: All of these bits need to be virtualized
        // TODO: Only allowed for current vcpu
        __asm__ __volatile ("mov %0=psr;;" : "=r"(psr) :: "memory");
@@ -183,7 +184,7 @@
        REGS *regs = vcpu_regs(vcpu);
        UINT64 mask, enabling_interrupts = 0;
 
-       PRIVOP_COUNT_ADDR(regs,_SSM);
+       //PRIVOP_COUNT_ADDR(regs,_SSM);
        // TODO: All of these bits need to be virtualized
        __asm__ __volatile ("mov %0=psr;;" : "=r"(psr) :: "memory");
        imm = *(struct ia64_psr *)&imm24;
@@ -369,6 +370,8 @@
 IA64FAULT vcpu_get_ifa(VCPU *vcpu, UINT64 *pval)
 {
        UINT64 val = PSCB(vcpu,ifa);
+       REGS *regs = vcpu_regs(vcpu);
+       PRIVOP_COUNT_ADDR(regs,_GET_IFA);
        *pval = val;
        return (IA64_NO_FAULT);
 }
@@ -422,6 +425,8 @@
 {
        //return vcpu_thash(vcpu,PSCB(vcpu,ifa),pval);
        UINT64 val = PSCB(vcpu,iha);
+       REGS *regs = vcpu_regs(vcpu);
+       PRIVOP_COUNT_ADDR(regs,_THASH);
        *pval = val;
        return (IA64_NO_FAULT);
 }
diff -Nru a/xen/include/asm-ia64/vcpu.h b/xen/include/asm-ia64/vcpu.h
--- a/xen/include/asm-ia64/vcpu.h       2005-06-19 14:04:55 -04:00
+++ b/xen/include/asm-ia64/vcpu.h       2005-06-19 14:04:55 -04:00
@@ -23,8 +23,8 @@
 
 #define PRIVOP_ADDR_COUNT
 #ifdef PRIVOP_ADDR_COUNT
-#define _RSM 0
-#define _SSM 1
+#define _GET_IFA 0
+#define _THASH 1
 #define PRIVOP_COUNT_NINSTS 2
 #define PRIVOP_COUNT_NADDRS 30
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] More hyperprivops, BitKeeper Bot <=