[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 2/4] xenctx: remove remnants of ia64 support



>>> On 12.04.13 at 15:13, Ian Campbell <ian.campbell@xxxxxxxxxx> wrote:
> Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

> ---
>  tools/xentrace/xenctx.c |  302 
> +----------------------------------------------
>  1 files changed, 1 insertions(+), 301 deletions(-)
> 
> diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
> index 62327f7..70a5455 100644
> --- a/tools/xentrace/xenctx.c
> +++ b/tools/xentrace/xenctx.c
> @@ -49,18 +49,6 @@ int guest_word_size = sizeof (unsigned long);
>  /* Word-length of the context record we get from xen */
>  int ctxt_word_size = sizeof (unsigned long);
>  int guest_protected_mode = 1;
> -#elif defined (__ia64__)
> -/* On ia64, we can't translate virtual address to physical address.  */
> -#define NO_TRANSLATION
> -typedef size_t guest_word_t;
> -
> -/* Which registers should be displayed.  */
> -int disp_cr_regs;
> -int disp_ar_regs;
> -int disp_br_regs;
> -int disp_bank_regs;
> -int disp_tlb;
> -
>  #elif defined(__arm__)
>  #define NO_TRANSLATION
>  typedef uint64_t guest_word_t;
> @@ -442,248 +430,6 @@ static guest_word_t 
> frame_pointer(vcpu_guest_context_any_t *ctx)
>          return ctx->x64.user_regs.rbp;
>  }
>  
> -#elif defined(__ia64__)
> -
> -#define PTE_ED_SHIFT              52
> -#define PTE_ED_MASK                1
> -#define PTE_PPN_SHIFT             12
> -#define PTE_PPN_MASK    0x3fffffffff
> -#define PTE_AR_SHIFT               9
> -#define PTE_AR_MASK                7
> -#define PTE_PL_SHIFT               7
> -#define PTE_PL_MASK                3
> -#define PTE_D_SHIFT                6
> -#define PTE_D_MASK                 1
> -#define PTE_A_SHIFT                5
> -#define PTE_A_MASK                 1
> -#define PTE_MA_SHIFT               2
> -#define PTE_MA_MASK                7
> -#define PTE_P_SHIFT                0
> -#define PTE_P_MASK                 1
> -#define ITIR_KEY_SHIFT             8
> -#define ITIR_KEY_MASK       0xffffff
> -#define ITIR_PS_SHIFT              2
> -#define ITIR_PS_MASK            0x3f
> -#define ITIR_PS_MIN               12
> -#define ITIR_PS_MAX               28
> -#define RR_RID_SHIFT               8
> -#define RR_RID_MASK         0xffffff
> -#define PSR_BN           (1UL << 44)
> -#define CFM_SOF_MASK            0x3f
> -
> -static void print_tr(int i, const struct ia64_tr_entry *tr)
> -{
> -    int ps_val, ma_val;
> -    unsigned long pa;
> -
> -    static const char ps[][5] = {"  4K", "  8K", " 16K", "    ",
> -                                 " 64K", "    ", "256K", "    ",
> -                                 "  1M", "    ", "  4M", "    ",
> -                                 " 16M", "    ", " 64M", "    ",
> -                                 "256M"};
> -    static const char ma[][4] = {"WB ", "   ", "   ", "   ",
> -                                 "UC ", "UCE", "WC ", "Nat"};
> -
> -    ps_val =  tr->itir >> ITIR_PS_SHIFT & ITIR_PS_MASK;
> -    ma_val =  tr->pte  >> PTE_MA_SHIFT  & PTE_MA_MASK;
> -    pa     = (tr->pte  >> PTE_PPN_SHIFT & PTE_PPN_MASK) << PTE_PPN_SHIFT;
> -    pa     = (pa >> ps_val) << ps_val;
> -    printf(" [%d]  %ld %06lx %016lx %013lx %02x %s %ld  %ld  %ld  %ld "
> -           "%ld %d %s %06lx\n", i,
> -           tr->pte  >> PTE_P_SHIFT    & PTE_P_MASK,
> -           tr->rid  >> RR_RID_SHIFT   & RR_RID_MASK,
> -           tr->vadr, pa, ps_val,
> -           ((ps_val >= ITIR_PS_MIN && ps_val <= ITIR_PS_MAX) ?
> -            ps[ps_val - ITIR_PS_MIN] : "    "),
> -           tr->pte  >> PTE_ED_SHIFT   & PTE_ED_MASK,
> -           tr->pte  >> PTE_PL_SHIFT   & PTE_PL_MASK,
> -           tr->pte  >> PTE_AR_SHIFT   & PTE_AR_MASK,
> -           tr->pte  >> PTE_A_SHIFT    & PTE_A_MASK,
> -           tr->pte  >> PTE_D_SHIFT    & PTE_D_MASK,
> -           ma_val, ma[ma_val],
> -           tr->itir >> ITIR_KEY_SHIFT & ITIR_KEY_MASK);
> -}
> -
> -void print_ctx(vcpu_guest_context_any_t *ctx)
> -{
> -    struct vcpu_guest_context_regs *regs = &ctx->c.regs;
> -    struct vcpu_tr_regs *tr = &ctx->c.regs.tr;
> -    int i;
> -    unsigned int rbs_size, cfm_sof;
> -
> -    printf(" ip:  %016lx  ", regs->ip);
> -    print_symbol(regs->ip);
> -    printf("\n");
> -    printf(" psr:  %016lx  ", regs->psr);
> -    printf(" cfm:  %016lx  ", regs->cfm);
> -    printf(" pr:   %016lx\n", regs->pr);
> -
> -    if (disp_br_regs) {
> -        printf(" b0:   %016lx  ", regs->b[0]);
> -        printf(" b1:   %016lx  ", regs->b[1]);
> -        printf(" b2:   %016lx\n", regs->b[2]);
> -        printf(" b3:   %016lx  ", regs->b[3]);
> -        printf(" b4:   %016lx  ", regs->b[4]);
> -        printf(" b5:   %016lx\n", regs->b[5]);
> -        printf(" b6:   %016lx  ", regs->b[6]);
> -        printf(" b7:   %016lx\n", regs->b[7]);
> -    } else {
> -        printf(" b0:   %016lx\n", regs->b[0]);
> -    }
> -
> -    if (disp_cr_regs) {
> -        printf ("\n"
> -                "                                CR:\n");
> -        printf(" dcr:  %016lx  ", regs->cr.dcr);
> -        printf(" itm:  %016lx  ", regs->cr.itm);
> -        printf(" iva:  %016lx\n", regs->cr.iva);
> -        printf(" pta:  %016lx  ", regs->cr.pta);
> -        printf(" ipsr: %016lx  ", regs->cr.ipsr);
> -        printf(" isr:  %016lx\n", regs->cr.isr);
> -        printf(" iip:  %016lx  ", regs->cr.iip);
> -        printf(" ifa:  %016lx  ", regs->cr.ifa);
> -        printf(" itir: %016lx\n", regs->cr.itir);
> -        printf(" iipa: %016lx  ", regs->cr.iipa);
> -        printf(" ifs:  %016lx  ", regs->cr.ifs);
> -        printf(" iim:  %016lx\n", regs->cr.iim);
> -        printf(" iha:  %016lx  ", regs->cr.iha);
> -        printf(" lid:  %016lx  ", regs->cr.lid);
> -        printf(" ivr:  %016lx\n", regs->cr.ivr);
> -        printf(" tpr:  %016lx  ", regs->cr.tpr);
> -        printf(" eoi:  %016lx  ", regs->cr.eoi);
> -        printf(" irr0: %016lx\n", regs->cr.irr[0]);
> -        printf(" irr1: %016lx  ", regs->cr.irr[1]);
> -        printf(" irr2: %016lx  ", regs->cr.irr[2]);
> -        printf(" irr3: %016lx\n", regs->cr.irr[3]);
> -        printf(" itv:  %016lx  ", regs->cr.itv);
> -        printf(" pmv:  %016lx  ", regs->cr.pmv);
> -        printf(" cmcv: %016lx\n", regs->cr.cmcv);
> -        printf(" lrr0: %016lx  ", regs->cr.lrr0);
> -        printf(" lrr1: %016lx  ", regs->cr.lrr1);
> -        printf(" ev_cb:%016lx\n", ctx->c.event_callback_ip);
> -
> -    }
> -    if (disp_ar_regs) {
> -        printf ("\n"
> -                "                                AR:\n");
> -        printf(" kr0:  %016lx  ", regs->ar.kr[0]);
> -        printf(" kr1:  %016lx  ", regs->ar.kr[1]);
> -        printf(" kr2:  %016lx\n", regs->ar.kr[2]);
> -        printf(" kr3:  %016lx  ", regs->ar.kr[3]);
> -        printf(" kr4:  %016lx  ", regs->ar.kr[4]);
> -        printf(" kr5:  %016lx\n", regs->ar.kr[5]);
> -        printf(" kr6:  %016lx  ", regs->ar.kr[6]);
> -        printf(" kr7:  %016lx  ", regs->ar.kr[7]);
> -        printf(" rsc:  %016lx\n", regs->ar.rsc);
> -        printf(" bsp:  %016lx  ", regs->ar.bsp);
> -        printf(" bsps: %016lx  ", regs->ar.bspstore);
> -        printf(" rnat: %016lx\n", regs->ar.rnat);
> -        printf(" csd:  %016lx  ", regs->ar.csd);
> -        printf(" ccv:  %016lx  ", regs->ar.ccv);
> -        printf(" unat: %016lx\n", regs->ar.unat);
> -        printf(" fpsr: %016lx  ", regs->ar.fpsr);
> -        printf(" itc:  %016lx\n", regs->ar.itc);
> -        printf(" pfs:  %016lx  ", regs->ar.pfs);
> -        printf(" lc:   %016lx  ", regs->ar.lc);
> -        printf(" ec:   %016lx\n", regs->ar.ec);
> -    }
> -    printf("\n");
> -    printf(" r1:  %016lx  ", regs->r[1]);
> -    printf(" r2:  %016lx  ", regs->r[2]);
> -    printf(" r3:  %016lx\n", regs->r[3]);
> -    printf(" r4:  %016lx  ", regs->r[4]);
> -    printf(" r5:  %016lx  ", regs->r[5]);
> -    printf(" r6:  %016lx\n", regs->r[6]);
> -    printf(" r7:  %016lx  ", regs->r[7]);
> -    printf(" r8:  %016lx  ", regs->r[8]);
> -    printf(" r9:  %016lx\n", regs->r[9]);
> -    printf(" r10: %016lx  ", regs->r[10]);
> -    printf(" r11: %016lx  ", regs->r[11]);
> -    printf(" sp:  %016lx\n", regs->r[12]);
> -    printf(" tp:  %016lx  ", regs->r[13]);
> -    printf(" r14: %016lx  ", regs->r[14]);
> -    printf(" r15: %016lx\n", regs->r[15]);
> -    if (disp_bank_regs) {
> -        printf("      Bank %d (current)                         Bank %d\n",
> -               (regs->psr & PSR_BN) ? 1 : 0, (regs->psr & PSR_BN) ? 0 : 1);
> -        printf ("16:%016lx ", regs->r[16]);
> -        printf ("17:%016lx ", regs->r[17]);
> -        printf ("16:%016lx ", regs->bank[0]);
> -        printf ("17:%016lx\n", regs->bank[1]);
> -        printf ("18:%016lx ", regs->r[18]);
> -        printf ("19:%016lx ", regs->r[19]);
> -        printf ("18:%016lx ", regs->bank[2]);
> -        printf ("19:%016lx\n", regs->bank[3]);
> -        printf ("20:%016lx ", regs->r[20]);
> -        printf ("21:%016lx ", regs->r[21]);
> -        printf ("20:%016lx ", regs->bank[4]);
> -        printf ("21:%016lx\n", regs->bank[5]);
> -        printf ("22:%016lx ", regs->r[22]);
> -        printf ("23:%016lx ", regs->r[23]);
> -        printf ("22:%016lx ", regs->bank[6]);
> -        printf ("23:%016lx\n", regs->bank[7]);
> -        printf ("24:%016lx ", regs->r[24]);
> -        printf ("25:%016lx ", regs->r[25]);
> -        printf ("24:%016lx ", regs->bank[8]);
> -        printf ("25:%016lx\n", regs->bank[9]);
> -        printf ("26:%016lx ", regs->r[26]);
> -        printf ("27:%016lx ", regs->r[27]);
> -        printf ("26:%016lx ", regs->bank[10]);
> -        printf ("27:%016lx\n", regs->bank[11]);
> -        printf ("28:%016lx ", regs->r[28]);
> -        printf ("29:%016lx ", regs->r[29]);
> -        printf ("28:%016lx ", regs->bank[12]);
> -        printf ("29:%016lx\n", regs->bank[13]);
> -        printf ("30:%016lx ", regs->r[30]);
> -        printf ("31:%016lx ", regs->r[31]);
> -        printf ("30:%016lx ", regs->bank[14]);
> -        printf ("31:%016lx\n", regs->bank[15]);
> -    } else {
> -        printf(" r16: %016lx  ", regs->r[16]);
> -        printf(" r17: %016lx  ", regs->r[17]);
> -        printf(" r18: %016lx\n", regs->r[18]);
> -        printf(" r19: %016lx  ", regs->r[19]);
> -        printf(" r20: %016lx  ", regs->r[20]);
> -        printf(" r21: %016lx\n", regs->r[21]);
> -        printf(" r22: %016lx  ", regs->r[22]);
> -        printf(" r23: %016lx  ", regs->r[23]);
> -        printf(" r24: %016lx\n", regs->r[24]);
> -        printf(" r25: %016lx  ", regs->r[25]);
> -        printf(" r26: %016lx  ", regs->r[26]);
> -        printf(" r27: %016lx\n", regs->r[27]);
> -        printf(" r28: %016lx  ", regs->r[28]);
> -        printf(" r29: %016lx  ", regs->r[29]);
> -        printf(" r30: %016lx\n", regs->r[30]);
> -        printf(" r31: %016lx\n", regs->r[31]);
> -    }
> -
> -    printf("\n");
> -    rbs_size = (regs->ar.bsp - regs->ar.bspstore) / 8;
> -    cfm_sof = (regs->cfm & CFM_SOF_MASK);
> -    for (i = 0; i < cfm_sof; i++) {
> -        int off = cfm_sof - i;
> -        unsigned int rbs_off =
> -            (((62 - ((rbs_size + regs->rbs_voff) % 63) + off)) / 63) + off;
> -        if (rbs_off > rbs_size)
> -            break;
> -        printf(" r%02d: %016lx%s", 32 + i,
> -               regs->rbs[rbs_size - rbs_off],
> -               (i % 3) != 2 ? "  " : "\n");
> -    }
> -    if ((i % 3) != 0)
> -        printf ("\n");
> -
> -    if (disp_tlb) {
> -        printf("\n itr: P rid    va               pa            ps      ed 
> pl "
> -               "ar a d ma    key\n");
> -        for (i = 0; i < 8; i++)
> -            print_tr(i, &tr->itrs[i]);
> -        printf("\n dtr: P rid    va               pa            ps      ed 
> pl "
> -               "ar a d ma    key\n");
> -        for (i = 0; i < 8; i++)
> -            print_tr(i, &tr->dtrs[i]);
> -    }
> -}
>  #elif defined(__arm__)
>  static void print_ctx(vcpu_guest_context_any_t *ctx)
>  {
> @@ -940,12 +686,7 @@ static void usage(void)
>      printf("  -S --stack-trace  print a complete stack trace.\n");
>      printf("  -k, --kernel-start\n");
>      printf("                    set user/kernel split. (default 
> 0xc0000000)\n");
> -#ifdef __ia64__
> -    printf("  -r LIST, --regs=LIST  display more registers.\n");
> -    printf("  -a --all          same as --regs=tlb,cr,ar,br,bk\n");
> -#else
>      printf("  -a --all          display more registers\n");
> -#endif
>      printf("  -C --all-vcpus    print info for all vcpus\n");
>  }
>  
> @@ -953,19 +694,12 @@ int main(int argc, char **argv)
>  {
>      int ch;
>      int ret;
> -    static const char *sopts = "fs:hak:SC"
> -#ifdef __ia64__
> -        "r:"
> -#endif
> -        ;
> +    static const char *sopts = "fs:hak:SC";
>      static const struct option lopts[] = {
>          {"stack-trace", 0, NULL, 'S'},
>          {"symbol-table", 1, NULL, 's'},
>          {"frame-pointers", 0, NULL, 'f'},
>          {"kernel-start", 1, NULL, 'k'},
> -#ifdef __ia64__
> -        {"regs", 1, NULL, 'r'},
> -#endif
>          {"all", 0, NULL, 'a'},
>          {"all-vcpus", 0, NULL, 'C'},
>          {"help", 0, NULL, 'h'},
> @@ -986,43 +720,9 @@ int main(int argc, char **argv)
>          case 'S':
>              xenctx.stack_trace = 1;
>              break;
> -#ifdef __ia64__
> -        case 'r':
> -            {
> -                char *r;
> -
> -                r = strtok(optarg, ",");
> -                while (r) {
> -                    if (strcmp (r, "cr") == 0)
> -                        disp_cr_regs = 1;
> -                    else if (strcmp (r, "ar") == 0)
> -                        disp_ar_regs = 1;
> -                    else if (strcmp (r, "br") == 0)
> -                        disp_br_regs = 1;
> -                    else if (strcmp (r, "bk") == 0)
> -                        disp_bank_regs = 1;
> -                    else if (strcmp (r, "tlb") == 0)
> -                        disp_tlb = 1;
> -                    else {
> -                        fprintf(stderr,"unknown register set %s\n", r);
> -                        exit(-1);
> -                    }
> -                    r = strtok(NULL, "'");
> -                }
> -            }
> -            break;
> -        case 'a':
> -            disp_cr_regs = 1;
> -            disp_ar_regs = 1;
> -            disp_br_regs = 1;
> -            disp_bank_regs = 1;
> -            disp_tlb = 1;
> -            break;
> -#else
>          case 'a':
>              xenctx.disp_all = 1;
>              break;
> -#endif
>          case 'C':
>              xenctx.all_vcpus = 1;
>              break;
> -- 
> 1.7.9.1
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxx 
> http://lists.xen.org/xen-devel 



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.