drm/xen-front: fix pointer casts
Subsystems (3)
PATCH 1/1 drm/xen-front: fix pointer casts
From: Oleksandr Andrushchenko <[email protected]>
Building for a 32-bit target results in warnings from casting between a 32-bit pointer and a 64-bit integer. Fix the warnings by casting those pointers to uintptr_t first.
--- drivers/gpu/drm/xen/xen_drm_front.h | 4 ++-- drivers/gpu/drm/xen/xen_drm_front_shbuf.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/xen/xen_drm_front.h +2 -2
@@ -126,12 +126,12 @@ struct xen_drm_front_drm_info {static inline u64 xen_drm_front_fb_to_cookie (struct drm_framebuffer *fb) { -return (u64 )fb; +return (u64 )(uintptr_t )fb; }static inline u64 xen_drm_front_dbuf_to_cookie (struct drm_gem_object *gem_obj) { -return (u64 )gem_obj; +return (u64 )(uintptr_t )gem_obj; } int xen_drm_front_mode_set(struct xen_drm_front_drm_pipeline *pipeline,
drivers/gpu/drm/xen/xen_drm_front_shbuf.c +1 -1
@@ -122,7 +122,7 @@ static void guest_calc_num_grefs(struct xen_drm_front_shbuf *buf) }#define xen_page_to_vaddr (page) \ - ((phys_addr_t)pfn_to_kaddr(page_to_xen_pfn(page))) + ((phys_addr_t)(uintptr_t)pfn_to_kaddr(page_to_xen_pfn(page)))static int backend_unmap (struct xen_drm_front_shbuf *buf) {
Signature · 6 lines
2.17.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 17 lines · Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <[email protected]>
Building for a 32-bit target results in warnings from casting between a 32-bit pointer and a 64-bit integer. Fix the warnings by casting those pointers to
uintptr_tfirst.Signed-off-by Oleksandr Andrushchenko <[email protected]>--- drivers/gpu/drm/xen/xen_drm_front.h | 4 ++-- drivers/gpu/drm/xen/xen_drm_front_shbuf.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/xen/xen_drm_front.h +0
-0
drivers/gpu/drm/xen/xen_drm_front.h struct xen_drm_front_drm_info { · line 129
Quoted 5 lines
drivers/gpu/drm/xen/xen_drm_front.h +1
-1@@ -126,12 +126,12 @@ struct xen_drm_front_drm_info {static inline u64 xen_drm_front_fb_to_cookie (struct drm_framebuffer *fb) { -return (u64 )fb; +return (u64 )(uintptr_t )fb;
Do you really still need the cast to u64?
Quoted 14 lines
drivers/gpu/drm/xen/xen_drm_front.h +1
-1}static inline u64 xen_drm_front_dbuf_to_cookie (struct drm_gem_object *gem_obj) { -return (u64 )gem_obj; +return (u64 )(uintptr_t )gem_obj; } int xen_drm_front_mode_set(struct xen_drm_front_drm_pipeline *pipeline,drivers/gpu/drm/xen/xen_drm_front_shbuf.c +0
-0
drivers/gpu/drm/xen/xen_drm_front_shbuf.c static void guest_calc_num_grefs(struct xen_drm_front_shbuf *buf) · line 125
Quoted 5 lines
drivers/gpu/drm/xen/xen_drm_front_shbuf.c +1
-1@@ -122,7 +122,7 @@ static void guest_calc_num_grefs(struct xen_drm_front_shbuf *buf) }#define xen_page_to_vaddr (page) \ - ((phys_addr_t)pfn_to_kaddr(page_to_xen_pfn(page))) + ((phys_addr_t)(uintptr_t)pfn_to_kaddr(page_to_xen_pfn(page)))
phys_addr_t for a virtual address?
Juergen
Quoted 19 lines · Juergen Gross
Quoted 18 lines · Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <[email protected]>
Building for a 32-bit target results in warnings from casting between a 32-bit pointer and a 64-bit integer. Fix the warnings by casting those pointers to
uintptr_tfirst.Signed-off-by Oleksandr Andrushchenko <[email protected]>--- drivers/gpu/drm/xen/xen_drm_front.h | 4 ++-- drivers/gpu/drm/xen/xen_drm_front_shbuf.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/xen/xen_drm_front.h +0
-0@@ -126,12 +126,12 @@ struct xen_drm_front_drm_info {
Quoted 5 lines
drivers/gpu/drm/xen/xen_drm_front.h struct xen_drm_front_drm_info { · line 129
Quoted 4 lines
drivers/gpu/drm/xen/xen_drm_front.h +1
-1static inline u64 xen_drm_front_fb_to_cookie (struct drm_framebuffer *fb) { -return (u64 )fb; +return (u64 )(uintptr_t )fb;Do you really still need the cast to u64?
Indeed, I can remove (u64) now, thank you
Quoted 17 lines
Quoted 17 lines
drivers/gpu/drm/xen/xen_drm_front.h +1
-1}static inline u64 xen_drm_front_dbuf_to_cookie (struct drm_gem_object *gem_obj) { -return (u64 )gem_obj; +return (u64 )(uintptr_t )gem_obj; } int xen_drm_front_mode_set(struct xen_drm_front_drm_pipeline *pipeline,drivers/gpu/drm/xen/xen_drm_front_shbuf.c +0
-0@@ -122,7 +122,7 @@ static void guest_calc_num_grefs(struct xen_drm_front_shbuf *buf) }
Quoted 4 lines
drivers/gpu/drm/xen/xen_drm_front_shbuf.c static void guest_calc_num_grefs(struct xen_drm_front_shbuf *buf) · line 125
Quoted 3 lines
drivers/gpu/drm/xen/xen_drm_front_shbuf.c +1
-1#define xen_page_to_vaddr (page) \ - ((phys_addr_t)pfn_to_kaddr(page_to_xen_pfn(page))) + ((phys_addr_t)(uintptr_t)pfn_to_kaddr(page_to_xen_pfn(page)))
phys_addr_tfor a virtual address?
This is because the resulting value is then passed to gnttab_set_map_op/ gnttab_set_unmap_op which expects host address to be passed as phys_addr_t addr :(
Please see [1], [2]: regardless of the fact that xen_page_to_vaddr does produce host address I have to convert it to phys_addr_t then to pass to [1] and [2]. Please also see [3], [4], [5] which either cast to phys_addr_t or unsigned long or u64.
Quoted 2 lines
Juergen
[1] https://elixir.bootlin.com/linux/v4.17-rc6/source/include/xen/grant_table.h#L147
[2] https://elixir.bootlin.com/linux/v4.17-rc6/source/include/xen/grant_table.h#L163
[3] https://elixir.bootlin.com/linux/v4.17-rc6/source/drivers/block/xen-blkback/blkback.c#L845
[4] https://elixir.bootlin.com/linux/v4.17-rc6/source/drivers/net/xen-netback/netback.c#L334
[5] https://elixir.bootlin.com/linux/v4.17-rc6/source/drivers/xen/xenbus/xenbus_client.c#L478
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 50 lines · Oleksandr Andrushchenko
Quoted 14 lines · Juergen Gross
Quoted 13 lines · Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <[email protected]>
Building for a 32-bit target results in warnings from casting between a 32-bit pointer and a 64-bit integer. Fix the warnings by casting those pointers to
uintptr_tfirst.Signed-off-by: Oleksandr Andrushchenko <[email protected]>
---
drivers/gpu/drm/xen/xen_drm_front.h | 4 ++--drivers/gpu/drm/xen/xen_drm_front_shbuf.c| 2 +-2 files changed, 3 insertions(+), 3 deletions(-)Quoted 12 lines
Quoted 11 lines
drivers/gpu/drm/xen/xen_drm_front.h +0
-0@@ -126,12 +126,12 @@ struct xen_drm_front_drm_info {static inline u64
xen_drm_front_fb_to_cookie(struct drm_framebuffer *fb)
{
- return (u64)fb;
+ return (u64)(uintptr_t)fb;Do you really still need the cast to u64?
Indeed, I can remove (u64) now, thank you
Quoted 14 lines
Quoted 14 lines
}
static inline u64xen_drm_front_dbuf_to_cookie(struct drm_gem_object *gem_obj)
{
- return (u64)gem_obj;
+ return (u64)(uintptr_t)gem_obj;
}
int xen_drm_front_mode_set(structxen_drm_front_drm_pipeline*pipeline,drivers/gpu/drm/xen/xen_drm_front_shbuf.c +0
-1--- a/drivers/gpu/drm/xen/xen_drm_front_shbuf.cQuoted 8 lines
drivers/gpu/drm/xen/xen_drm_front_shbuf.c static void guest_calc_num_grefs(struct · line 125
Quoted 7 lines
+++
b/drivers/gpu/drm/xen/xen_drm_front_shbuf.cdrivers/gpu/drm/xen/xen_drm_front_shbuf.c +1
-1@@ -122,7 +122,7 @@ static void guest_calc_num_grefs(struct xen_drm_front_shbuf *buf) } #define xen_page_to_vaddr(page) \ - ((phys_addr_t)pfn_to_kaddr(page_to_xen_pfn(page))) + ((phys_addr_t)(uintptr_t)pfn_to_kaddr(page_to_xen_pfn(page)))
phys_addr_tfor a virtual address?
Quoted 3 lines
This is because the resulting value is then passed to gnttab_set_map_op/
gnttab_set_unmap_opwhich expects host address to be passed asphys_addr_taddr :(
Okay, but this means the compiler should do the necessary cast when you drop the cast to phys_addr_t in xen_page_to_vaddr(), as the cast to uintptr_t is already producing an unsigned integer value which can easily be promoted to more bits, right?
Juergen
Quoted 50 lines · Juergen Gross
Quoted 49 lines · Oleksandr Andrushchenko
Quoted 14 lines · Juergen Gross
Quoted 13 lines · Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <[email protected]>
Building for a 32-bit target results in warnings from casting between a 32-bit pointer and a 64-bit integer. Fix the warnings by casting those pointers to
uintptr_tfirst.Signed-off-by: Oleksandr Andrushchenko
<[email protected]>--- drivers/gpu/drm/xen/xen_drm_front.h | 4 ++-- drivers/gpu/drm/xen/xen_drm_front_shbuf.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)Quoted 12 lines
drivers/gpu/drm/xen/xen_drm_front.h struct xen_drm_front_drm_info { · line 129
Quoted 11 lines
drivers/gpu/drm/xen/xen_drm_front.h +1
-1@@ -126,12 +126,12 @@ struct xen_drm_front_drm_info { static inline u64 xen_drm_front_fb_to_cookie(structdrm_framebuffer *fb) { - return (u64)fb; + return (u64)(uintptr_t)fb;Do you really still need the cast to u64?
Indeed, I can remove (u64) now, thank you
Quoted 21 lines
Quoted 15 lines
drivers/gpu/drm/xen/xen_drm_front.h +1
-1} static inline u64 xen_drm_front_dbuf_to_cookie(structdrm_gem_object *gem_obj) { - return (u64)gem_obj; + return (u64)(uintptr_t)gem_obj; } int xen_drm_front_mode_set(struct xen_drm_front_drm_pipeline *pipeline,drivers/gpu/drm/xen/xen_drm_front_shbuf.c +0
-0drivers/gpu/drm/xen/xen_drm_front_shbuf.c static void guest_calc_num_grefs(struct · line 125
Quoted 5 lines
drivers/gpu/drm/xen/xen_drm_front_shbuf.c +1
-1@@ -122,7 +122,7 @@ static void guest_calc_num_grefs(struct xen_drm_front_shbuf *buf) } #define xen_page_to_vaddr(page) \ - ((phys_addr_t)pfn_to_kaddr(page_to_xen_pfn(page))) + ((phys_addr_t)(uintptr_t)pfn_to_kaddr(page_to_xen_pfn(page)))
phys_addr_tfor a virtual address?
Quoted 7 lines
Quoted 3 lines
This is because the resulting value is then passed to gnttab_set_map_op/
gnttab_set_unmap_opwhich expects host address to be passed asphys_addr_taddr :(Okay, but this means the compiler should do the necessary cast when you drop the cast to
phys_addr_tinxen_page_to_vaddr(), as the cast touintptr_tis already producing an unsigned integer value which can easily be promoted to more bits, right?
Right, so I can safely use:
#define xen_page_to_vaddr(page) \
- ((phys_addr_t)(uintptr_t)pfn_to_kaddr(page_to_xen_pfn(page))) + ((uintptr_t)pfn_to_kaddr(page_to_xen_pfn(page)))
Quoted 2 lines
Juergen
Thank you for your time and comments,
Oleksandr
Quoted 50 lines · Juergen Gross
Quoted 49 lines · Oleksandr Andrushchenko
Quoted 14 lines · Juergen Gross
Quoted 13 lines · Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <[email protected]>
Building for a 32-bit target results in warnings from casting between a 32-bit pointer and a 64-bit integer. Fix the warnings by casting those pointers to
uintptr_tfirst.Signed-off-by: Oleksandr Andrushchenko
<[email protected]>--- drivers/gpu/drm/xen/xen_drm_front.h | 4 ++-- drivers/gpu/drm/xen/xen_drm_front_shbuf.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)Quoted 12 lines
drivers/gpu/drm/xen/xen_drm_front.h struct xen_drm_front_drm_info { · line 129
Quoted 11 lines
drivers/gpu/drm/xen/xen_drm_front.h +1
-1@@ -126,12 +126,12 @@ struct xen_drm_front_drm_info { static inline u64 xen_drm_front_fb_to_cookie(structdrm_framebuffer *fb) { - return (u64)fb; + return (u64)(uintptr_t)fb;Do you really still need the cast to u64?
Indeed, I can remove (u64) now, thank you
Quoted 21 lines
Quoted 15 lines
drivers/gpu/drm/xen/xen_drm_front.h +1
-1} static inline u64 xen_drm_front_dbuf_to_cookie(structdrm_gem_object *gem_obj) { - return (u64)gem_obj; + return (u64)(uintptr_t)gem_obj; } int xen_drm_front_mode_set(struct xen_drm_front_drm_pipeline *pipeline,drivers/gpu/drm/xen/xen_drm_front_shbuf.c +0
-0drivers/gpu/drm/xen/xen_drm_front_shbuf.c static void guest_calc_num_grefs(struct · line 125
Quoted 5 lines
drivers/gpu/drm/xen/xen_drm_front_shbuf.c +1
-1@@ -122,7 +122,7 @@ static void guest_calc_num_grefs(struct xen_drm_front_shbuf *buf) } #define xen_page_to_vaddr(page) \ - ((phys_addr_t)pfn_to_kaddr(page_to_xen_pfn(page))) + ((phys_addr_t)(uintptr_t)pfn_to_kaddr(page_to_xen_pfn(page)))
phys_addr_tfor a virtual address?
Quoted 7 lines
Quoted 3 lines
This is because the resulting value is then passed to gnttab_set_map_op/
gnttab_set_unmap_opwhich expects host address to be passed asphys_addr_taddr :(Okay, but this means the compiler should do the necessary cast when you drop the cast to
phys_addr_tinxen_page_to_vaddr(), as the cast touintptr_tis already producing an unsigned integer value which can easily be promoted to more bits, right?
Right, so I can safely use:
#define xen_page_to_vaddr(page) \
- ((phys_addr_t)(uintptr_t)pfn_to_kaddr(page_to_xen_pfn(page))) + ((uintptr_t)pfn_to_kaddr(page_to_xen_pfn(page)))
Quoted 2 lines
Juergen
Thank you for your time and comments,
Oleksandr
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 50 lines · Oleksandr Andrushchenko
Quoted 14 lines · Juergen Gross
Quoted 13 lines · Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <[email protected]>
Building for a 32-bit target results in warnings from casting between a 32-bit pointer and a 64-bit integer. Fix the warnings by casting those pointers to
uintptr_tfirst.Signed-off-by: Oleksandr Andrushchenko <[email protected]>
---
drivers/gpu/drm/xen/xen_drm_front.h | 4 ++--drivers/gpu/drm/xen/xen_drm_front_shbuf.c| 2 +-2 files changed, 3 insertions(+), 3 deletions(-)Quoted 12 lines
Quoted 11 lines
drivers/gpu/drm/xen/xen_drm_front.h +0
-0@@ -126,12 +126,12 @@ struct xen_drm_front_drm_info {static inline u64
xen_drm_front_fb_to_cookie(struct drm_framebuffer *fb)
{
- return (u64)fb;
+ return (u64)(uintptr_t)fb;Do you really still need the cast to u64?
Indeed, I can remove (u64) now, thank you
Quoted 14 lines
Quoted 14 lines
}
static inline u64xen_drm_front_dbuf_to_cookie(struct drm_gem_object *gem_obj)
{
- return (u64)gem_obj;
+ return (u64)(uintptr_t)gem_obj;
}
int xen_drm_front_mode_set(structxen_drm_front_drm_pipeline*pipeline,drivers/gpu/drm/xen/xen_drm_front_shbuf.c +0
-1--- a/drivers/gpu/drm/xen/xen_drm_front_shbuf.cQuoted 8 lines
drivers/gpu/drm/xen/xen_drm_front_shbuf.c static void guest_calc_num_grefs(struct · line 125
Quoted 7 lines
+++
b/drivers/gpu/drm/xen/xen_drm_front_shbuf.cdrivers/gpu/drm/xen/xen_drm_front_shbuf.c +1
-1@@ -122,7 +122,7 @@ static void guest_calc_num_grefs(struct xen_drm_front_shbuf *buf) } #define xen_page_to_vaddr(page) \ - ((phys_addr_t)pfn_to_kaddr(page_to_xen_pfn(page))) + ((phys_addr_t)(uintptr_t)pfn_to_kaddr(page_to_xen_pfn(page)))
phys_addr_tfor a virtual address?
Quoted 3 lines
This is because the resulting value is then passed to gnttab_set_map_op/
gnttab_set_unmap_opwhich expects host address to be passed asphys_addr_taddr :(
Okay, but this means the compiler should do the necessary cast when you drop the cast to phys_addr_t in xen_page_to_vaddr(), as the cast to uintptr_t is already producing an unsigned integer value which can easily be promoted to more bits, right?
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 19 lines · Juergen Gross
Quoted 18 lines · Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <[email protected]>
Building for a 32-bit target results in warnings from casting between a 32-bit pointer and a 64-bit integer. Fix the warnings by casting those pointers to
uintptr_tfirst.Signed-off-by Oleksandr Andrushchenko <[email protected]>--- drivers/gpu/drm/xen/xen_drm_front.h | 4 ++-- drivers/gpu/drm/xen/xen_drm_front_shbuf.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/xen/xen_drm_front.h +0
-0@@ -126,12 +126,12 @@ struct xen_drm_front_drm_info {
Quoted 5 lines
drivers/gpu/drm/xen/xen_drm_front.h struct xen_drm_front_drm_info { · line 129
Quoted 4 lines
drivers/gpu/drm/xen/xen_drm_front.h +1
-1static inline u64 xen_drm_front_fb_to_cookie (struct drm_framebuffer *fb) { -return (u64 )fb; +return (u64 )(uintptr_t )fb;Do you really still need the cast to u64?
Indeed, I can remove (u64) now, thank you
Quoted 17 lines
Quoted 17 lines
drivers/gpu/drm/xen/xen_drm_front.h +1
-1}static inline u64 xen_drm_front_dbuf_to_cookie (struct drm_gem_object *gem_obj) { -return (u64 )gem_obj; +return (u64 )(uintptr_t )gem_obj; } int xen_drm_front_mode_set(struct xen_drm_front_drm_pipeline *pipeline,drivers/gpu/drm/xen/xen_drm_front_shbuf.c +0
-0@@ -122,7 +122,7 @@ static void guest_calc_num_grefs(struct xen_drm_front_shbuf *buf) }
Quoted 4 lines
drivers/gpu/drm/xen/xen_drm_front_shbuf.c static void guest_calc_num_grefs(struct xen_drm_front_shbuf *buf) · line 125
Quoted 3 lines
drivers/gpu/drm/xen/xen_drm_front_shbuf.c +1
-1#define xen_page_to_vaddr (page) \ - ((phys_addr_t)pfn_to_kaddr(page_to_xen_pfn(page))) + ((phys_addr_t)(uintptr_t)pfn_to_kaddr(page_to_xen_pfn(page)))
phys_addr_tfor a virtual address?
This is because the resulting value is then passed to gnttab_set_map_op/ gnttab_set_unmap_op which expects host address to be passed as phys_addr_t addr :(
Please see [1], [2]: regardless of the fact that xen_page_to_vaddr does produce host address I have to convert it to phys_addr_t then to pass to [1] and [2]. Please also see [3], [4], [5] which either cast to phys_addr_t or unsigned long or u64.
Quoted 2 lines
Juergen
[1] https://elixir.bootlin.com/linux/v4.17-rc6/source/include/xen/grant_table.h#L147
[2] https://elixir.bootlin.com/linux/v4.17-rc6/source/include/xen/grant_table.h#L163
[3] https://elixir.bootlin.com/linux/v4.17-rc6/source/drivers/block/xen-blkback/blkback.c#L845
[4] https://elixir.bootlin.com/linux/v4.17-rc6/source/drivers/net/xen-netback/netback.c#L334
[5] https://elixir.bootlin.com/linux/v4.17-rc6/source/drivers/xen/xenbus/xenbus_client.c#L478
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 17 lines · Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <[email protected]>
Building for a 32-bit target results in warnings from casting between a 32-bit pointer and a 64-bit integer. Fix the warnings by casting those pointers to
uintptr_tfirst.Signed-off-by Oleksandr Andrushchenko <[email protected]>--- drivers/gpu/drm/xen/xen_drm_front.h | 4 ++-- drivers/gpu/drm/xen/xen_drm_front_shbuf.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/xen/xen_drm_front.h +0
-0
drivers/gpu/drm/xen/xen_drm_front.h struct xen_drm_front_drm_info { · line 129
Quoted 5 lines
drivers/gpu/drm/xen/xen_drm_front.h +1
-1@@ -126,12 +126,12 @@ struct xen_drm_front_drm_info {static inline u64 xen_drm_front_fb_to_cookie (struct drm_framebuffer *fb) { -return (u64 )fb; +return (u64 )(uintptr_t )fb;
Do you really still need the cast to u64?
Quoted 14 lines
drivers/gpu/drm/xen/xen_drm_front.h +1
-1}static inline u64 xen_drm_front_dbuf_to_cookie (struct drm_gem_object *gem_obj) { -return (u64 )gem_obj; +return (u64 )(uintptr_t )gem_obj; } int xen_drm_front_mode_set(struct xen_drm_front_drm_pipeline *pipeline,drivers/gpu/drm/xen/xen_drm_front_shbuf.c +0
-0
drivers/gpu/drm/xen/xen_drm_front_shbuf.c static void guest_calc_num_grefs(struct xen_drm_front_shbuf *buf) · line 125
Quoted 5 lines
drivers/gpu/drm/xen/xen_drm_front_shbuf.c +1
-1@@ -122,7 +122,7 @@ static void guest_calc_num_grefs(struct xen_drm_front_shbuf *buf) }#define xen_page_to_vaddr (page) \ - ((phys_addr_t)pfn_to_kaddr(page_to_xen_pfn(page))) + ((phys_addr_t)(uintptr_t)pfn_to_kaddr(page_to_xen_pfn(page)))
phys_addr_t for a virtual address?
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel