direct-io.hg

changeset 7624:15dc55145e55

Added xc_domain_ioport_permission to libxc, which wraps the dom0 op

Signed-off-by: Jody Belka <knew (at) pimb (dot) org>
author kaf24@firebug.cl.cam.ac.uk
date Sun Nov 06 16:39:55 2005 +0100 (2005-11-06)
parents f41c33671a43
children b67d2d2465aa
files tools/libxc/xc_domain.c tools/libxc/xenctrl.h
line diff
     1.1 --- a/tools/libxc/xc_domain.c	Sun Nov 06 16:39:02 2005 +0100
     1.2 +++ b/tools/libxc/xc_domain.c	Sun Nov 06 16:39:55 2005 +0100
     1.3 @@ -364,6 +364,23 @@ int xc_domain_get_vcpu_info(int xc_handl
     1.4      return rc;
     1.5  }
     1.6  
     1.7 +int xc_domain_ioport_permission(int xc_handle,
     1.8 +                                uint32_t domid,
     1.9 +                                uint16_t first_port,
    1.10 +                                uint16_t nr_ports,
    1.11 +                                uint16_t allow_access)
    1.12 +{
    1.13 +    dom0_op_t op;
    1.14 +
    1.15 +    op.cmd = DOM0_IOPORT_PERMISSION;
    1.16 +    op.u.ioport_permission.domain = (domid_t)domid;
    1.17 +    op.u.ioport_permission.first_port = first_port;
    1.18 +    op.u.ioport_permission.nr_ports = nr_ports;
    1.19 +    op.u.ioport_permission.allow_access = allow_access;
    1.20 +
    1.21 +    return do_dom0_op(xc_handle, &op);
    1.22 +}
    1.23 +
    1.24  /*
    1.25   * Local variables:
    1.26   * mode: C
     2.1 --- a/tools/libxc/xenctrl.h	Sun Nov 06 16:39:02 2005 +0100
     2.2 +++ b/tools/libxc/xenctrl.h	Sun Nov 06 16:39:55 2005 +0100
     2.3 @@ -371,6 +371,12 @@ int xc_domain_memory_decrease_reservatio
     2.4                                            unsigned int extent_order,
     2.5  					  unsigned long *extent_start);
     2.6  
     2.7 +int xc_domain_ioport_permission(int xc_handle,
     2.8 +                                uint32_t domid,
     2.9 +                                uint16_t first_port,
    2.10 +                                uint16_t nr_ports,
    2.11 +                                uint16_t allow_access);
    2.12 +
    2.13  unsigned long xc_make_page_below_4G(int xc_handle, uint32_t domid, 
    2.14  				    unsigned long mfn);
    2.15