[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Fix dcr.pp and psr.pp support (non-VTI) so pfmon --system-wide works
# HG changeset patch # User djm@xxxxxxxxxxxxxxx # Node ID 8906825d5197dcc63112a24830f8c429c0ecf941 # Parent f2309ac2648a7c815948593ac19f361631475948 Fix dcr.pp and psr.pp support (non-VTI) so pfmon --system-wide works Signed-off by: Dan Magenheimer <dan.magenheimer@xxxxxx> diff -r f2309ac2648a -r 8906825d5197 xen/arch/ia64/linux-xen/setup.c --- a/xen/arch/ia64/linux-xen/setup.c Tue Sep 20 19:03:25 2005 +++ b/xen/arch/ia64/linux-xen/setup.c Tue Sep 20 22:11:19 2005 @@ -824,8 +824,13 @@ * shouldn't be affected by this (moral: keep your ia32 locks aligned and you'll * be fine). */ +#ifdef XEN + ia64_setreg(_IA64_REG_CR_DCR, ( IA64_DCR_DP | IA64_DCR_DK | IA64_DCR_DX | IA64_DCR_DR + | IA64_DCR_PP | IA64_DCR_DA | IA64_DCR_DD | IA64_DCR_LC)); +#else ia64_setreg(_IA64_REG_CR_DCR, ( IA64_DCR_DP | IA64_DCR_DK | IA64_DCR_DX | IA64_DCR_DR | IA64_DCR_DA | IA64_DCR_DD | IA64_DCR_LC)); +#endif atomic_inc(&init_mm.mm_count); current->active_mm = &init_mm; #ifdef XEN diff -r f2309ac2648a -r 8906825d5197 xen/arch/ia64/xen/hyperprivop.S --- a/xen/arch/ia64/xen/hyperprivop.S Tue Sep 20 19:03:25 2005 +++ b/xen/arch/ia64/xen/hyperprivop.S Tue Sep 20 22:11:19 2005 @@ -261,7 +261,8 @@ ;; // FOR SSM_I ONLY, also turn on psr.i and psr.ic movl r28=(IA64_PSR_DT|IA64_PSR_IT|IA64_PSR_RT|IA64_PSR_I|IA64_PSR_IC);; - movl r27=~(IA64_PSR_BE|IA64_PSR_PP|IA64_PSR_BN);; +// movl r27=~(IA64_PSR_BE|IA64_PSR_PP|IA64_PSR_BN);; + movl r27=~(IA64_PSR_BE|IA64_PSR_BN);; or r30=r30,r28;; and r30=r30,r27;; adds r21=XSI_IPSR_OFS-XSI_PSR_IC_OFS,r18 ;; diff -r f2309ac2648a -r 8906825d5197 xen/arch/ia64/xen/vcpu.c --- a/xen/arch/ia64/xen/vcpu.c Tue Sep 20 19:03:25 2005 +++ b/xen/arch/ia64/xen/vcpu.c Tue Sep 20 22:11:19 2005 @@ -191,7 +191,12 @@ return (IA64_ILLOP_FAULT); if (imm.dfh) ipsr->dfh = 0; if (imm.dfl) ipsr->dfl = 0; - if (imm.pp) { ipsr->pp = 0; psr.pp = 0; } + if (imm.pp) { + ipsr->pp = 1; + psr.pp = 1; // priv perf ctrs always enabled +// FIXME: need new field in mapped_regs_t for virtual psr.pp (psr.be too?) + PSCB(vcpu,tmp[8]) = 0; // but fool the domain if it gets psr + } if (imm.up) { ipsr->up = 0; psr.up = 0; } if (imm.sp) { ipsr->sp = 0; psr.sp = 0; } if (imm.be) ipsr->be = 0; @@ -233,7 +238,11 @@ if (imm24 & ~mask) return (IA64_ILLOP_FAULT); if (imm.dfh) ipsr->dfh = 1; if (imm.dfl) ipsr->dfl = 1; - if (imm.pp) { ipsr->pp = 1; psr.pp = 1; } + if (imm.pp) { + ipsr->pp = 1; psr.pp = 1; +// FIXME: need new field in mapped_regs_t for virtual psr.pp (psr.be too?) + PSCB(vcpu,tmp[8]) = 1; + } if (imm.sp) { ipsr->sp = 1; psr.sp = 1; } if (imm.i) { if (!PSCB(vcpu,interrupt_delivery_enabled)) { @@ -284,7 +293,15 @@ // however trying to set other bits can't be an error as it is in ssm if (newpsr.dfh) ipsr->dfh = 1; if (newpsr.dfl) ipsr->dfl = 1; - if (newpsr.pp) { ipsr->pp = 1; psr.pp = 1; } + if (newpsr.pp) { + ipsr->pp = 1; psr.pp = 1; +// FIXME: need new field in mapped_regs_t for virtual psr.pp (psr.be too?) + PSCB(vcpu,tmp[8]) = 1; + } + else { + ipsr->pp = 1; psr.pp = 1; + PSCB(vcpu,tmp[8]) = 0; + } if (newpsr.up) { ipsr->up = 1; psr.up = 1; } if (newpsr.sp) { ipsr->sp = 1; psr.sp = 1; } if (newpsr.i) { @@ -331,6 +348,9 @@ else newpsr.i = 0; if (PSCB(vcpu,interrupt_collection_enabled)) newpsr.ic = 1; else newpsr.ic = 0; +// FIXME: need new field in mapped_regs_t for virtual psr.pp (psr.be too?) + if (PSCB(vcpu,tmp[8])) newpsr.pp = 1; + else newpsr.pp = 0; *pval = *(unsigned long *)&newpsr; return IA64_NO_FAULT; } diff -r f2309ac2648a -r 8906825d5197 xen/include/public/arch-ia64.h --- a/xen/include/public/arch-ia64.h Tue Sep 20 19:03:25 2005 +++ b/xen/include/public/arch-ia64.h Tue Sep 20 22:11:19 2005 @@ -229,6 +229,7 @@ unsigned long krs[8]; // kernel registers unsigned long pkrs[8]; // protection key registers unsigned long tmp[8]; // temp registers (e.g. for hyperprivops) + // FIXME: tmp[8] temp'ly being used for virtual psr.pp }; }; #if 0 _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |