]> git.baikalelectronics.ru Git - kernel.git/commit
Xen/gnttab: introduce common INVALID_GRANT_{HANDLE,REF}
authorJan Beulich <jbeulich@suse.com>
Wed, 10 Mar 2021 10:45:26 +0000 (11:45 +0100)
committerBoris Ostrovsky <boris.ostrovsky@oracle.com>
Wed, 10 Mar 2021 22:39:29 +0000 (16:39 -0600)
commita778b1cf2bf6c59a856bef75af95de8f08c2ac41
tree08be73916964bc77f11d9860b30041b797fa1ce3
parenta7708ed69f6298847c89f11b1d0bea874f60cc61
Xen/gnttab: introduce common INVALID_GRANT_{HANDLE,REF}

It's not helpful if every driver has to cook its own. Generalize
xenbus'es INVALID_GRANT_HANDLE and pcifront's INVALID_GRANT_REF (which
shouldn't have expanded to zero to begin with). Use the constants in
p2m.c and gntdev.c right away, and update field types where necessary so
they would match with the constants' types (albeit without touching
struct ioctl_gntdev_grant_ref's ref field, as that's part of the public
interface of the kernel and would require introducing a dependency on
Xen's grant_table.h public header).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Link: https://lore.kernel.org/r/db7c38a5-0d75-d5d1-19de-e5fe9f0b9c48@suse.com
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
arch/arm/xen/p2m.c
arch/x86/xen/p2m.c
drivers/pci/xen-pcifront.c
drivers/xen/gntdev.c
include/xen/grant_table.h
include/xen/xenbus.h