xen/gnttab: Remove replace_grant_supported()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 16 Mar 2018 19:16:45 +0000 (19:16 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 23 Jul 2018 10:11:02 +0000 (11:11 +0100)
It is identical on all architecture, and this is a better overall than fixing
it up to have a proper boolean return value.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Julien Grall <julien.grall@arm.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/common/grant_table.c
xen/include/asm-arm/grant_table.h
xen/include/asm-x86/grant_table.h

index d2610e320cd39b8ad3cbd41879a992f3a7540add..51a4a7d20e4f23cbeb5ab07ce120c04f7e16b4e5 100644 (file)
@@ -3467,9 +3467,6 @@ do_grant_table_op(
 
         if ( unlikely(!guest_handle_okay(unmap, count)) )
             goto out;
-        rc = -ENOSYS;
-        if ( unlikely(!replace_grant_supported()) )
-            goto out;
         rc = gnttab_unmap_and_replace(unmap, count);
         if ( rc > 0 )
         {
index e52936c79fc2b7b6ba15d7318a1d865623d6e387..9c2c8155264b2c74d6554465293a59d6ce1e0067 100644 (file)
@@ -22,10 +22,6 @@ int replace_grant_host_mapping(unsigned long gpaddr, mfn_t mfn,
 void gnttab_mark_dirty(struct domain *d, mfn_t mfn);
 #define gnttab_create_status_page(d, t, i) do {} while (0)
 #define gnttab_release_host_mappings(domain) 1
-static inline int replace_grant_supported(void)
-{
-    return 1;
-}
 
 /*
  * The region used by Xen on the memory will never be mapped in DOM0
index e42030936b244e7cabbb5b17a3e96045cc4661b8..76ec5dda2c1acd6c48ddce76c6776532bdb64b43 100644 (file)
@@ -101,9 +101,4 @@ static inline void gnttab_clear_flag(unsigned int nr, uint16_t *st)
 #define gnttab_need_iommu_mapping(d)                \
     (!paging_mode_translate(d) && need_iommu(d))
 
-static inline int replace_grant_supported(void)
-{
-    return 1;
-}
-
 #endif /* __ASM_GRANT_TABLE_H__ */