[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[mini-os master] gnttab: remove gnttab_alloc_and_grant() function



commit 682280f28887a6cd7e4ed7d5f88b8e4f7338c7bd
Author:     Juergen Gross <jgross@xxxxxxxx>
AuthorDate: Tue Jul 15 15:29:33 2025 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Jul 16 15:04:52 2025 +0200

    gnttab: remove gnttab_alloc_and_grant() function
    
    The last user of gnttab_alloc_and_grant() is gone.
    
    Remove gnttab_alloc_and_grant() as it is doing more harm than good.
    It is hard coded to only grant access for dom0, which is not really
    clear from looking at the function name. It would be possible to add
    a domid parameter, but given its now 0 users, there doesn't seem to be
    a real demand for that function.
    
    Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
    Reviewed-by: Jason Andryuk <jason.andryuk@xxxxxxx>
---
 gnttab.c         | 13 -------------
 include/gnttab.h |  1 -
 2 files changed, 14 deletions(-)

diff --git a/gnttab.c b/gnttab.c
index 5b04ab0..6bac090 100644
--- a/gnttab.c
+++ b/gnttab.c
@@ -149,19 +149,6 @@ gnttab_end_transfer(grant_ref_t ref)
 }
 EXPORT_SYMBOL(gnttab_end_transfer);
 
-grant_ref_t
-gnttab_alloc_and_grant(void **map)
-{
-    unsigned long mfn;
-    grant_ref_t gref;
-
-    *map = (void *)alloc_page();
-    mfn = virt_to_mfn(*map);
-    gref = gnttab_grant_access(0, mfn, 0);
-    return gref;
-}
-EXPORT_SYMBOL(gnttab_alloc_and_grant);
-
 static const char * const gnttabop_error_msgs[] = GNTTABOP_error_msgs;
 
 const char *
diff --git a/include/gnttab.h b/include/gnttab.h
index 974cb89..108c442 100644
--- a/include/gnttab.h
+++ b/include/gnttab.h
@@ -4,7 +4,6 @@
 #include <xen/grant_table.h>
 
 void init_gnttab(void);
-grant_ref_t gnttab_alloc_and_grant(void **map);
 grant_ref_t gnttab_grant_access(domid_t domid, unsigned long frame,
                                int readonly);
 grant_ref_t gnttab_grant_transfer(domid_t domid, unsigned long pfn);
--
generated by git-patchbot for /home/xen/git/mini-os.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.