xen: remove XEN_GUEST_HANDLE(ulong)

Having both this handle (always unsigned long) and
XEN_GUEST_HANDLE(xen_ulong_t) (unsigned long on x86 and explicit size
of ARM) is confusing and error prone.

Replace the two remaining uses of the ulong handle, in grant set and
x86 set_gdt hypercalls, with xen_ulong_t.

This correctly sizes the grant frame entry as 64 bit on ARM but
leaves it as unsigned long on x86 (therefore no intended change on
x86). Likewise in set_gdt there is no actual change.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
Ian Campbell committed 2012-10-17 16:43:54 +01:00
1 parent abf06ea91d
commit 85cb5df14e
5 files changed
+5 -6

No files matched your search

+2 -1
View File
@@ -4100,7 +4100,8 @@ long set_gdt(struct vcpu *v,
}
long do_set_gdt(XEN_GUEST_HANDLE_PARAM(ulong) frame_list, unsigned int entries)
long do_set_gdt(XEN_GUEST_HANDLE_PARAM(xen_ulong_t) frame_list,
unsigned int entries)
{
int nr_pages = (entries + 511) / 512;
unsigned long frames[16];
+1 -1
View File
@@ -1322,7 +1322,7 @@ gnttab_setup_table(
struct domain *d;
struct grant_table *gt;
int i;
unsigned long gmfn;
xen_pfn_t gmfn;
if ( count != 1 )
return -EINVAL;
+1 -1
View File
@@ -33,7 +33,7 @@ do_mmu_update(
extern long
do_set_gdt(
XEN_GUEST_HANDLE_PARAM(ulong) frame_list,
XEN_GUEST_HANDLE_PARAM(xen_ulong_t) frame_list,
unsigned int entries);
extern long
+1 -1
View File
@@ -385,7 +385,7 @@ struct gnttab_setup_table {
uint32_t nr_frames;
/* OUT parameters. */
int16_t status; /* => enum grant_status */
XEN_GUEST_HANDLE(ulong) frame_list;
XEN_GUEST_HANDLE(xen_pfn_t) frame_list;
};
typedef struct gnttab_setup_table gnttab_setup_table_t;
DEFINE_XEN_GUEST_HANDLE(gnttab_setup_table_t);
-2
View File
@@ -43,8 +43,6 @@ DEFINE_XEN_GUEST_HANDLE(char);
__DEFINE_XEN_GUEST_HANDLE(uchar, unsigned char);
DEFINE_XEN_GUEST_HANDLE(int);
__DEFINE_XEN_GUEST_HANDLE(uint, unsigned int);
DEFINE_XEN_GUEST_HANDLE(long);
__DEFINE_XEN_GUEST_HANDLE(ulong, unsigned long);
DEFINE_XEN_GUEST_HANDLE(void);
DEFINE_XEN_GUEST_HANDLE(uint64_t);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.