ia64/xen-unstable

changeset 7924:2e74bab1981e

Add (incomplete) dom0_physinfo call to try with xm list and xen-bugtool
author djm@kirby.fc.hp.com
date Wed Nov 30 17:04:48 2005 -0600 (2005-11-30)
parents 0944ee356534
children 64699278c175
files xen/arch/ia64/xen/dom0_ops.c
line diff
     1.1 --- a/xen/arch/ia64/xen/dom0_ops.c	Wed Nov 30 16:17:53 2005 -0600
     1.2 +++ b/xen/arch/ia64/xen/dom0_ops.c	Wed Nov 30 17:04:48 2005 -0600
     1.3 @@ -194,7 +194,29 @@ long arch_do_dom0_op(dom0_op_t *op, dom0
     1.4          }
     1.5      }
     1.6      break;
     1.7 +
     1.8 +    case DOM0_PHYSINFO:
     1.9 +    {
    1.10 +        dom0_physinfo_t *pi = &op->u.physinfo;
    1.11 +
    1.12 +        pi->threads_per_core = smp_num_siblings;
    1.13 +        pi->cores_per_socket = 1; // FIXME
    1.14 +        pi->sockets_per_node = 
    1.15 +            num_online_cpus() / (pi->threads_per_core * pi->cores_per_socket);
    1.16 +        pi->nr_nodes         = 1;
    1.17 +        pi->total_pages      = 99;  // FIXME
    1.18 +        pi->free_pages       = avail_domheap_pages();
    1.19 +        pi->cpu_khz          = 100;  // FIXME cpu_khz;
    1.20 +        memset(pi->hw_cap, 0, sizeof(pi->hw_cap));
    1.21 +        //memcpy(pi->hw_cap, boot_cpu_data.x86_capability, NCAPINTS*4);
    1.22 +        ret = 0;
    1.23 +        if ( copy_to_user(u_dom0_op, op, sizeof(*op)) )
    1.24 +	    ret = -EFAULT;
    1.25 +    }
    1.26 +    break;
    1.27 +
    1.28      default:
    1.29 +printf("arch_do_dom0_op: unrecognized dom0 op: %d!!!\n",op->cmd);
    1.30          ret = -ENOSYS;
    1.31  
    1.32      }