diff options
author | Juergen Gross | 2022-03-11 11:35:00 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2022-03-15 18:39:07 +0100 |
commit | cee03ca3cb44c867b45f9d32601c1d532f66fe7a (patch) | |
tree | ff822f9093f12008fea671c68f872694e89614f4 /drivers/usb/host | |
parent | 61ef1709ee603b1d4677682c643986e817d5c6a4 (diff) |
xen/usb: don't use arbitrary_virt_to_machine()
arbitrary_virt_to_machine() is meant to be used in PV guests only.
Replace its usage with virt_to_gfn().
Signed-off-by: Juergen Gross <jgross@suse.com>
Link: https://lore.kernel.org/r/20220311103500.12885-1-jgross@suse.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r-- | drivers/usb/host/xen-hcd.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/usb/host/xen-hcd.c b/drivers/usb/host/xen-hcd.c index be09fd9bac58..36f7c8a0b500 100644 --- a/drivers/usb/host/xen-hcd.c +++ b/drivers/usb/host/xen-hcd.c @@ -589,14 +589,12 @@ static void xenhcd_gnttab_map(struct xenhcd_info *info, void *addr, int length, int nr_pages, int flags) { grant_ref_t ref; - unsigned long buffer_mfn; unsigned int offset; unsigned int len = length; unsigned int bytes; int i; for (i = 0; i < nr_pages; i++) { - buffer_mfn = PFN_DOWN(arbitrary_virt_to_machine(addr).maddr); offset = offset_in_page(addr); bytes = PAGE_SIZE - offset; @@ -605,7 +603,7 @@ static void xenhcd_gnttab_map(struct xenhcd_info *info, void *addr, int length, ref = gnttab_claim_grant_reference(gref_head); gnttab_grant_foreign_access_ref(ref, info->xbdev->otherend_id, - buffer_mfn, flags); + virt_to_gfn(addr), flags); seg[i].gref = ref; seg[i].offset = (__u16)offset; seg[i].length = (__u16)bytes; |