summary refs log tree commit diff stats
path: root/hw/i386/kvm/xenstore_impl.h
diff options
context:
space:
mode:
authorPaul Durrant <pdurrant@amazon.com>2023-01-23 16:21:16 +0000
committerDavid Woodhouse <dwmw@amazon.co.uk>2023-03-07 17:04:30 +0000
commitbe1934dfefe74aa1b978c0cda64c2b6282301196 (patch)
tree0a587c459a2f755af62292d77a616d2790b59b4c /hw/i386/kvm/xenstore_impl.h
parent7cabbdb70df64fc7b0ed05f3e6aa4e1990eadc77 (diff)
downloadfocaccia-qemu-be1934dfefe74aa1b978c0cda64c2b6282301196.tar.gz
focaccia-qemu-be1934dfefe74aa1b978c0cda64c2b6282301196.zip
hw/xen: Implement XenStore permissions
Store perms as a GList of strings, check permissions.

Signed-off-by: Paul Durrant <pdurrant@amazon.com>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Paul Durrant <paul@xen.org>
Diffstat (limited to 'hw/i386/kvm/xenstore_impl.h')
-rw-r--r--hw/i386/kvm/xenstore_impl.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/hw/i386/kvm/xenstore_impl.h b/hw/i386/kvm/xenstore_impl.h
index beb7b29ab8..2f81251b5e 100644
--- a/hw/i386/kvm/xenstore_impl.h
+++ b/hw/i386/kvm/xenstore_impl.h
@@ -16,9 +16,15 @@ typedef uint32_t xs_transaction_t;
 
 #define XBT_NULL 0
 
+#define XS_PERM_NONE  0x00
+#define XS_PERM_READ  0x01
+#define XS_PERM_WRITE 0x02
+
 typedef struct XenstoreImplState XenstoreImplState;
 
-XenstoreImplState *xs_impl_create(void);
+XenstoreImplState *xs_impl_create(unsigned int dom_id);
+
+char *xs_perm_as_string(unsigned int perm, unsigned int domid);
 
 /*
  * These functions return *positive* error numbers. This is a little