direct-io.hg
changeset 9303:cd15ba9aa1cc
[IA64] new hyperprivop
Missing hyperprivop added.
These were privified insn without hyperprivop.
Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
Missing hyperprivop added.
These were privified insn without hyperprivop.
Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
author | awilliam@xenbuild.aw |
---|---|
date | Thu Mar 16 12:19:08 2006 -0700 (2006-03-16) |
parents | f6feefcd1046 |
children | bbfbb9e09b55 |
files | xen/arch/ia64/xen/privop.c |
line diff
1.1 --- a/xen/arch/ia64/xen/privop.c Thu Mar 16 12:13:23 2006 -0700 1.2 +++ b/xen/arch/ia64/xen/privop.c Thu Mar 16 12:19:08 2006 -0700 1.3 @@ -797,12 +797,17 @@ priv_emulate(VCPU *vcpu, REGS *regs, UIN 1.4 #define HYPERPRIVOP_GET_RR 0x10 1.5 #define HYPERPRIVOP_SET_RR 0x11 1.6 #define HYPERPRIVOP_SET_KR 0x12 1.7 -#define HYPERPRIVOP_MAX 0x12 1.8 +#define HYPERPRIVOP_FC 0x13 1.9 +#define HYPERPRIVOP_GET_CPUID 0x14 1.10 +#define HYPERPRIVOP_GET_PMD 0x15 1.11 +#define HYPERPRIVOP_GET_EFLAG 0x16 1.12 +#define HYPERPRIVOP_SET_EFLAG 0x17 1.13 +#define HYPERPRIVOP_MAX 0x17 1.14 1.15 static const char * const hyperpriv_str[HYPERPRIVOP_MAX+1] = { 1.16 0, "rfi", "rsm.dt", "ssm.dt", "cover", "itc.d", "itc.i", "ssm.i", 1.17 "=ivr", "=tpr", "tpr=", "eoi", "itm=", "thash", "ptc.ga", "itr.d", 1.18 - "=rr", "rr=", "kr=" 1.19 + "=rr", "rr=", "kr=", "fc", "=cpuid", "=pmd", "=ar.eflg", "ar.eflg=" 1.20 }; 1.21 1.22 unsigned long slow_hyperpriv_cnt[HYPERPRIVOP_MAX+1] = { 0 }; 1.23 @@ -889,6 +894,24 @@ ia64_hyperprivop(unsigned long iim, REGS 1.24 case HYPERPRIVOP_SET_KR: 1.25 (void)vcpu_set_ar(v,regs->r8,regs->r9); 1.26 return 1; 1.27 + case HYPERPRIVOP_FC: 1.28 + (void)vcpu_fc(v,regs->r8); 1.29 + return 1; 1.30 + case HYPERPRIVOP_GET_CPUID: 1.31 + (void)vcpu_get_cpuid(v,regs->r8,&val); 1.32 + regs->r8 = val; 1.33 + return 1; 1.34 + case HYPERPRIVOP_GET_PMD: 1.35 + (void)vcpu_get_pmd(v,regs->r8,&val); 1.36 + regs->r8 = val; 1.37 + return 1; 1.38 + case HYPERPRIVOP_GET_EFLAG: 1.39 + (void)vcpu_get_ar(v,24,&val); 1.40 + regs->r8 = val; 1.41 + return 1; 1.42 + case HYPERPRIVOP_SET_EFLAG: 1.43 + (void)vcpu_set_ar(v,24,regs->r8); 1.44 + return 1; 1.45 } 1.46 return 0; 1.47 } 1.48 @@ -934,7 +957,7 @@ static const char * const cr_str[128] = 1.49 }; 1.50 1.51 // FIXME: should use snprintf to ensure no buffer overflow 1.52 -int dump_privop_counts(char *buf) 1.53 +static int dump_privop_counts(char *buf) 1.54 { 1.55 int i, j; 1.56 UINT64 sum = 0; 1.57 @@ -1007,7 +1030,7 @@ int dump_privop_counts(char *buf) 1.58 return s - buf; 1.59 } 1.60 1.61 -int zero_privop_counts(char *buf) 1.62 +static int zero_privop_counts(char *buf) 1.63 { 1.64 int i, j; 1.65 char *s = buf; 1.66 @@ -1043,7 +1066,7 @@ void privop_count_addr(unsigned long iip 1.67 v->overflow++;; 1.68 } 1.69 1.70 -int dump_privop_addrs(char *buf) 1.71 +static int dump_privop_addrs(char *buf) 1.72 { 1.73 int i,j; 1.74 char *s = buf; 1.75 @@ -1061,7 +1084,7 @@ int dump_privop_addrs(char *buf) 1.76 return s - buf; 1.77 } 1.78 1.79 -void zero_privop_addrs(void) 1.80 +static void zero_privop_addrs(void) 1.81 { 1.82 int i,j; 1.83 for (i = 0; i < PRIVOP_COUNT_NINSTS; i++) { 1.84 @@ -1085,7 +1108,7 @@ extern unsigned long idle_when_pending; 1.85 extern unsigned long pal_halt_light_count; 1.86 extern unsigned long context_switch_count; 1.87 1.88 -int dump_misc_stats(char *buf) 1.89 +static int dump_misc_stats(char *buf) 1.90 { 1.91 char *s = buf; 1.92 s += sprintf(s,"Virtual TR translations: %ld\n",tr_translate_count); 1.93 @@ -1102,7 +1125,7 @@ int dump_misc_stats(char *buf) 1.94 return s - buf; 1.95 } 1.96 1.97 -void zero_misc_stats(void) 1.98 +static void zero_misc_stats(void) 1.99 { 1.100 dtlb_translate_count = 0; 1.101 tr_translate_count = 0; 1.102 @@ -1117,7 +1140,7 @@ void zero_misc_stats(void) 1.103 context_switch_count = 0; 1.104 } 1.105 1.106 -int dump_hyperprivop_counts(char *buf) 1.107 +static int dump_hyperprivop_counts(char *buf) 1.108 { 1.109 int i; 1.110 char *s = buf; 1.111 @@ -1138,7 +1161,7 @@ int dump_hyperprivop_counts(char *buf) 1.112 return s - buf; 1.113 } 1.114 1.115 -void zero_hyperprivop_counts(void) 1.116 +static void zero_hyperprivop_counts(void) 1.117 { 1.118 int i; 1.119 for (i = 0; i <= HYPERPRIVOP_MAX; i++) slow_hyperpriv_cnt[i] = 0;