ia64/xen-unstable

changeset 845:2e17f100fafd

bitkeeper revision 1.524 (3f8d60bbWQ4zSOsE99hsVgC8-htjLw)

add hook for pervasive debugging
author ach61@labyrinth.cl.cam.ac.uk
date Wed Oct 15 14:59:07 2003 +0000 (2003-10-15)
parents 2a42f55429a7
children a0dc1607eee5
files xen/common/dom0_ops.c xen/include/hypervisor-ifs/dom0_ops.h
line diff
     1.1 --- a/xen/common/dom0_ops.c	Wed Oct 15 14:20:59 2003 +0000
     1.2 +++ b/xen/common/dom0_ops.c	Wed Oct 15 14:59:07 2003 +0000
     1.3 @@ -308,6 +308,15 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
     1.4      }
     1.5      break;
     1.6  
     1.7 +    case DOM0_DEBUG:
     1.8 +    {
     1.9 +      op.u.debug.out1 = op.u.debug.in2 + 1;
    1.10 +      op.u.debug.out2 = op.u.debug.in1 + 1;
    1.11 +      copy_to_user(u_dom0_op, &op, sizeof(op));
    1.12 +      ret = 0;
    1.13 +    }
    1.14 +    break;
    1.15 +
    1.16  
    1.17      default:
    1.18          ret = -ENOSYS;
     2.1 --- a/xen/include/hypervisor-ifs/dom0_ops.h	Wed Oct 15 14:20:59 2003 +0000
     2.2 +++ b/xen/include/hypervisor-ifs/dom0_ops.h	Wed Oct 15 14:59:07 2003 +0000
     2.3 @@ -21,6 +21,7 @@
     2.4  #define DOM0_BUILDDOMAIN   13
     2.5  #define DOM0_IOPL          14
     2.6  #define DOM0_MSR           15
     2.7 +#define DOM0_DEBUG         16                          /* pervasive debugger */
     2.8  
     2.9  #define MAX_CMD_LEN       256
    2.10  #define MAX_DOMAIN_NAME    16
    2.11 @@ -108,6 +109,15 @@ typedef struct dom0_msr_st
    2.12  
    2.13  } dom0_msr_t;
    2.14  
    2.15 +typedef struct dom0_debug_st
    2.16 +{
    2.17 +    /* IN variables. */
    2.18 +    int in1, in2;
    2.19 +    /* OUT variables. */
    2.20 +    int out1, out2;
    2.21 +
    2.22 +} dom0_debug_t;
    2.23 +
    2.24  typedef struct dom0_op_st
    2.25  {
    2.26      unsigned long cmd;
    2.27 @@ -122,6 +132,7 @@ typedef struct dom0_op_st
    2.28          dom0_getdominfo_t getdominfo;
    2.29          dom0_iopl_t iopl;
    2.30  	dom0_msr_t msr;
    2.31 +	dom0_debug_t debug;
    2.32      }
    2.33      u;
    2.34  } dom0_op_t;