aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xc_physdev.c
diff options
context:
space:
mode:
authormjw@wray-m-3.hpl.hp.com <mjw@wray-m-3.hpl.hp.com>2004-06-29 18:10:39 +0000
committermjw@wray-m-3.hpl.hp.com <mjw@wray-m-3.hpl.hp.com>2004-06-29 18:10:39 +0000
commit48e9a9c636cfbf00a1468f3a3dffe932e3e01a19 (patch)
treed0dc3b91c0fa176b1afe4bb22c8a37a34850f6c3 /tools/libxc/xc_physdev.c
parent4db27a4b7ac9a8b0a3f2aa25a7795ff8731281b3 (diff)
downloadxen-48e9a9c636cfbf00a1468f3a3dffe932e3e01a19.tar.gz
xen-48e9a9c636cfbf00a1468f3a3dffe932e3e01a19.tar.bz2
xen-48e9a9c636cfbf00a1468f3a3dffe932e3e01a19.zip
bitkeeper revision 1.1026.1.8 (40e1b09foCFBM0EuIgrSA1uLJrWuzA)
Restructuring the python code and libs - first stage.
Diffstat (limited to 'tools/libxc/xc_physdev.c')
-rw-r--r--tools/libxc/xc_physdev.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/tools/libxc/xc_physdev.c b/tools/libxc/xc_physdev.c
new file mode 100644
index 0000000000..ba5dd9ccdc
--- /dev/null
+++ b/tools/libxc/xc_physdev.c
@@ -0,0 +1,29 @@
+/******************************************************************************
+ * xc_physdev.c
+ *
+ * API for manipulating physical-device access permissions.
+ *
+ * Copyright (c) 2004, Rolf Neugebauer (Intel Research Cambridge)
+ * Copyright (c) 2004, K A Fraser (University of Cambridge)
+ */
+
+#include "xc_private.h"
+
+int xc_physdev_pci_access_modify(int xc_handle,
+ u32 domid,
+ int bus,
+ int dev,
+ int func,
+ int enable)
+{
+ dom0_op_t op;
+
+ op.cmd = DOM0_PCIDEV_ACCESS;
+ op.u.pcidev_access.domain = (domid_t)domid;
+ op.u.pcidev_access.bus = bus;
+ op.u.pcidev_access.dev = dev;
+ op.u.pcidev_access.func = func;
+ op.u.pcidev_access.enable = enable;
+
+ return do_dom0_op(xc_handle, &op);
+}