diff options
author | Daniel De Graaf <dgdegra@tycho.nsa.gov> | 2013-01-11 10:11:02 +0000 |
---|---|---|
committer | Daniel De Graaf <dgdegra@tycho.nsa.gov> | 2013-01-11 10:11:02 +0000 |
commit | e7dc4bd7684398cb0b4d4140ff36ffdfdde3ce25 (patch) | |
tree | 303faebfcf3a95c50638a427a5498195ce6cb377 /xen/include/xsm | |
parent | 7a1db44b1246bcd320f932e65ae916158a04027a (diff) | |
download | xen-e7dc4bd7684398cb0b4d4140ff36ffdfdde3ce25.tar.gz xen-e7dc4bd7684398cb0b4d4140ff36ffdfdde3ce25.tar.bz2 xen-e7dc4bd7684398cb0b4d4140ff36ffdfdde3ce25.zip |
arch/x86: convert platform_hypercall to use XSM
The newly introduced xsm_platform_op hook addresses new sub-ops, while
most ops already have their own XSM hooks.
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Acked-by: Jan Beulich <jbeulich@suse.com>
Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/include/xsm')
-rw-r--r-- | xen/include/xsm/dummy.h | 7 | ||||
-rw-r--r-- | xen/include/xsm/xsm.h | 6 |
2 files changed, 13 insertions, 0 deletions
diff --git a/xen/include/xsm/dummy.h b/xen/include/xsm/dummy.h index b335bd9565..e42965ce26 100644 --- a/xen/include/xsm/dummy.h +++ b/xen/include/xsm/dummy.h @@ -593,6 +593,13 @@ static XSM_INLINE int xsm_platform_quirk(uint32_t quirk) return 0; } +static XSM_INLINE int xsm_platform_op(uint32_t op) +{ + if ( !IS_PRIV(current->domain) ) + return -EPERM; + return 0; +} + static XSM_INLINE int xsm_firmware_info(void) { return 0; diff --git a/xen/include/xsm/xsm.h b/xen/include/xsm/xsm.h index 75c27bbcb4..470e3c07cd 100644 --- a/xen/include/xsm/xsm.h +++ b/xen/include/xsm/xsm.h @@ -159,6 +159,7 @@ struct xsm_operations { int (*microcode) (void); int (*physinfo) (void); int (*platform_quirk) (uint32_t); + int (*platform_op) (uint32_t cmd); int (*firmware_info) (void); int (*efi_call) (void); int (*acpi_sleep) (void); @@ -704,6 +705,11 @@ static inline int xsm_platform_quirk (uint32_t quirk) return xsm_ops->platform_quirk(quirk); } +static inline int xsm_platform_op (uint32_t op) +{ + return xsm_ops->platform_op(op); +} + static inline int xsm_firmware_info (void) { return xsm_ops->firmware_info(); |