direct-io.hg

diff tools/libxc/xenctrl.h @ 11257:86d26e6ec89b

Replace dom0_ops hypercall with three new hypercalls:
1. platform_op -- used by dom0 kernel to perform actions on the
hardware platform (e.g., MTRR access, microcode update, platform
quirks, ...)
2. domctl -- used by management tools to control a specified domain
3. sysctl -- used by management tools for system-wide actions

Benefits include more sensible factoring of actions to
hypercalls. Also allows tool compatibility to be tracked separately
from the dom0 kernel. The assumption is that it will be easier to
replace libxenctrl, libxenguest and Xen as a matched set if the
dom0 kernel does not need to be replaced too (e.g., because that
would require vendor revalidation).

From here on we hope to maintain dom0 kernel compatibility. This
promise is not extended to tool compatibility beyond the existing
guarantee that compatibility will not be broken within a three-level
stable release [3.0.2, 3.0.3, etc.].

Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Fri Aug 25 18:39:10 2006 +0100 (2006-08-25)
parents 26b673aeff8b
children fd6c2b5e041f
line diff
     1.1 --- a/tools/libxc/xenctrl.h	Fri Aug 25 10:39:24 2006 +0100
     1.2 +++ b/tools/libxc/xenctrl.h	Fri Aug 25 18:39:10 2006 +0100
     1.3 @@ -13,11 +13,11 @@
     1.4  #include <stdint.h>
     1.5  #include <sys/ptrace.h>
     1.6  #include <xen/xen.h>
     1.7 -#include <xen/dom0_ops.h>
     1.8 +#include <xen/domctl.h>
     1.9 +#include <xen/sysctl.h>
    1.10  #include <xen/version.h>
    1.11  #include <xen/event_channel.h>
    1.12  #include <xen/sched.h>
    1.13 -#include <xen/sched_ctl.h>
    1.14  #include <xen/memory.h>
    1.15  #include <xen/acm.h>
    1.16  #include <xen/acm_ops.h>
    1.17 @@ -139,7 +139,7 @@ typedef struct {
    1.18      xen_domain_handle_t handle;
    1.19  } xc_dominfo_t;
    1.20  
    1.21 -typedef dom0_getdomaininfo_t xc_domaininfo_t;
    1.22 +typedef xen_domctl_getdomaininfo_t xc_domaininfo_t;
    1.23  int xc_domain_create(int xc_handle,
    1.24                       uint32_t ssidref,
    1.25                       xen_domain_handle_t handle,
    1.26 @@ -231,7 +231,11 @@ int xc_domain_shutdown(int xc_handle,
    1.27  int xc_vcpu_setaffinity(int xc_handle,
    1.28                          uint32_t domid,
    1.29                          int vcpu,
    1.30 -                        cpumap_t cpumap);
    1.31 +                        uint64_t cpumap);
    1.32 +int xc_vcpu_getaffinity(int xc_handle,
    1.33 +                        uint32_t domid,
    1.34 +                        int vcpu,
    1.35 +                        uint64_t *cpumap);
    1.36  
    1.37  /**
    1.38   * This function will return information about one or more domains. It is
    1.39 @@ -301,7 +305,7 @@ int xc_vcpu_getcontext(int xc_handle,
    1.40                                 uint32_t vcpu,
    1.41                                 vcpu_guest_context_t *ctxt);
    1.42  
    1.43 -typedef dom0_getvcpuinfo_t xc_vcpuinfo_t;
    1.44 +typedef xen_domctl_getvcpuinfo_t xc_vcpuinfo_t;
    1.45  int xc_vcpu_getinfo(int xc_handle,
    1.46                      uint32_t domid,
    1.47                      uint32_t vcpu,
    1.48 @@ -317,7 +321,7 @@ long long xc_domain_get_cpu_usage(int xc
    1.49  int xc_domain_sethandle(int xc_handle, uint32_t domid,
    1.50                          xen_domain_handle_t handle);
    1.51  
    1.52 -typedef dom0_shadow_control_stats_t xc_shadow_control_stats_t;
    1.53 +typedef xen_domctl_shadow_op_stats_t xc_shadow_op_stats_t;
    1.54  int xc_shadow_control(int xc_handle,
    1.55                        uint32_t domid,
    1.56                        unsigned int sop,
    1.57 @@ -325,7 +329,7 @@ int xc_shadow_control(int xc_handle,
    1.58                        unsigned long pages,
    1.59                        unsigned long *mb,
    1.60                        uint32_t mode,
    1.61 -                      xc_shadow_control_stats_t *stats);
    1.62 +                      xc_shadow_op_stats_t *stats);
    1.63  
    1.64  int xc_sedf_domain_set(int xc_handle,
    1.65                         uint32_t domid,
    1.66 @@ -341,11 +345,11 @@ int xc_sedf_domain_get(int xc_handle,
    1.67  
    1.68  int xc_sched_credit_domain_set(int xc_handle,
    1.69                                 uint32_t domid,
    1.70 -                               struct sched_credit_adjdom *sdom);
    1.71 +                               struct xen_domctl_sched_credit *sdom);
    1.72  
    1.73  int xc_sched_credit_domain_get(int xc_handle,
    1.74                                 uint32_t domid,
    1.75 -                               struct sched_credit_adjdom *sdom);
    1.76 +                               struct xen_domctl_sched_credit *sdom);
    1.77  
    1.78  /*
    1.79   * EVENT CHANNEL FUNCTIONS
    1.80 @@ -377,7 +381,7 @@ int xc_readconsolering(int xc_handle,
    1.81                         unsigned int *pnr_chars,
    1.82                         int clear);
    1.83  
    1.84 -typedef dom0_physinfo_t xc_physinfo_t;
    1.85 +typedef xen_sysctl_physinfo_t xc_physinfo_t;
    1.86  int xc_physinfo(int xc_handle,
    1.87                  xc_physinfo_t *info);
    1.88  
    1.89 @@ -438,8 +442,8 @@ int xc_domain_iomem_permission(int xc_ha
    1.90  unsigned long xc_make_page_below_4G(int xc_handle, uint32_t domid,
    1.91                                      unsigned long mfn);
    1.92  
    1.93 -typedef dom0_perfc_desc_t xc_perfc_desc_t;
    1.94 -typedef dom0_perfc_val_t xc_perfc_val_t;
    1.95 +typedef xen_sysctl_perfc_desc_t xc_perfc_desc_t;
    1.96 +typedef xen_sysctl_perfc_val_t xc_perfc_val_t;
    1.97  /* IMPORTANT: The caller is responsible for mlock()'ing the @desc and @val
    1.98     arrays. */
    1.99  int xc_perfc_control(int xc_handle,
   1.100 @@ -561,8 +565,8 @@ int xc_tbuf_set_cpu_mask(int xc_handle, 
   1.101  
   1.102  int xc_tbuf_set_evt_mask(int xc_handle, uint32_t mask);
   1.103  
   1.104 -/* Execute a privileged dom0 operation. */
   1.105 -int xc_dom0_op(int xc_handle, dom0_op_t *op);
   1.106 +int xc_domctl(int xc_handle, struct xen_domctl *domctl);
   1.107 +int xc_sysctl(int xc_handle, struct xen_sysctl *sysctl);
   1.108  
   1.109  int xc_version(int xc_handle, int cmd, void *arg);
   1.110