diff options
author | Wei Liu <wei.liu2@citrix.com> | 2012-01-24 14:16:04 +0000 |
---|---|---|
committer | Wei Liu <wei.liu2@citrix.com> | 2012-01-24 14:16:04 +0000 |
commit | 04b9829949d79e753c8047f4ef620a82b1743349 (patch) | |
tree | bbf692fac5b4fdf15a367ba68a9aa7b0f9bac4a6 /xen/common/compat | |
parent | f67b958f103337ba173feaf015eae7c43e35a7a8 (diff) | |
download | xen-04b9829949d79e753c8047f4ef620a82b1743349.tar.gz xen-04b9829949d79e753c8047f4ef620a82b1743349.tar.bz2 xen-04b9829949d79e753c8047f4ef620a82b1743349.zip |
Add a GNTTABOP to swap the content of two grant references under lock
provided that they are not currently active.
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/common/compat')
-rw-r--r-- | xen/common/compat/grant_table.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/xen/common/compat/grant_table.c b/xen/common/compat/grant_table.c index ca60395f0a..edd20c6bd3 100644 --- a/xen/common/compat/grant_table.c +++ b/xen/common/compat/grant_table.c @@ -47,6 +47,10 @@ DEFINE_XEN_GUEST_HANDLE(gnttab_get_status_frames_compat_t); CHECK_gnttab_get_version; #undef xen_gnttab_get_version +#define xen_gnttab_swap_grant_ref gnttab_swap_grant_ref +CHECK_gnttab_swap_grant_ref; +#undef xen_gnttab_swap_grant_ref + int compat_grant_table_op(unsigned int cmd, XEN_GUEST_HANDLE(void) cmp_uop, unsigned int count) @@ -98,6 +102,10 @@ int compat_grant_table_op(unsigned int cmd, CASE(get_status_frames); #endif +#ifndef CHECK_gnttab_swap_grant_ref + CASE(swap_grant_ref); +#endif + #undef CASE default: return do_grant_table_op(cmd, cmp_uop, count); |