Skip to contentSkip to conversation

fix QEMU build on Xen/ARM

PATCH Superseded Stefano Stabellini 2 participants 4 messages Jan 22, 2015 – Jan 23, 2015

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix QEMU build on Xen/ARM

xen_get_vmport_regs_pfn should take a xen_pfn_t argument, not an unsigned long argument (in fact xen_pfn_t is defined as uint64_t on ARM).

Also use xc_hvm_param_get instead of the deprecated xc_get_hvm_param.

include/hw/xen/xen_common.h +6 -4
index 519696f..355fbac 100644
@@ -168,14 +168,16 @@ void xen_shutdown_fatal_error(const char *fmt, ...) GCC_FMT_ATTR(1, 2);
 
 #ifdef HVM_PARAM_VMPORT_REGS_PFN
 static inline int xen_get_vmport_regs_pfn(XenXC xc, domid_t dom,
-                                          unsigned long *vmport_regs_pfn)
+                                          xen_pfn_t *vmport_regs_pfn)
 {
-    return xc_get_hvm_param(xc, dom, HVM_PARAM_VMPORT_REGS_PFN,
-                            vmport_regs_pfn);
+    uint64_t value;
+    return xc_hvm_param_get(xc, dom, HVM_PARAM_VMPORT_REGS_PFN,
+                            &value);
+    *vmport_regs_pfn = (xen_pfn_t) value;
 }
 #else
 static inline int xen_get_vmport_regs_pfn(XenXC xc, domid_t dom,
-                                          unsigned long *vmport_regs_pfn)
+                                          xen_pfn_t *vmport_regs_pfn)
 {
     return -ENOSYS;
 }
#1 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 16 lines · Stefano Stabellini

xen_get_vmport_regs_pfn should take a xen_pfn_t argument, not an unsigned long argument (in fact xen_pfn_t is defined as uint64_t on ARM).

Also use xc_hvm_param_get instead of the deprecated xc_get_hvm_param.

Signed-off-by: Stefano Stabellini
<[email protected]>

(quoted diff) +0 -0

b/include/hw/xen/xen_common.h index 519696f..355fbac 100644 --- a/include/hw/xen/xen_common.h +++ b/include/hw/xen/xen_common.h @@ -168,14 +168,16 @@ void xen_shutdown_fatal_error(const char *fmt, ...) GCC_FMT_ATTR(1, 2);

Quoted 8 lines

#ifdef HVM_PARAM_VMPORT_REGS_PFN static inline int xen_get_vmport_regs_pfn(XenXC xc, domid_t dom, - unsigned long *vmport_regs_pfn) +
xen_pfn_t *vmport_regs_pfn) { - return xc_get_hvm_param(xc, dom,
HVM_PARAM_VMPORT_REGS_PFN, -
vmport_regs_pfn); + uint64_t value; + return
xc_hvm_param_get(xc, dom, HVM_PARAM_VMPORT_REGS_PFN, + &value);

This is not going to work. Maybe "int rc =" instead of return?
-Don Slutz

Quoted 6 lines

+ *vmport_regs_pfn = (xen_pfn_t) value; } #else static inline
int xen_get_vmport_regs_pfn(XenXC xc, domid_t dom, - unsigned long *vmport_regs_pfn) +
xen_pfn_t *vmport_regs_pfn) { return -ENOSYS; }

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iQIcBAEBAgAGBQJUwYFeAAoJEHkofi8zcwBkAu4P/R37SxqP3fXx9E+QgNe32hkg Z0lBl7vF6lqJ8MW0sbyVAkT8YUpbA2mTRC6MZdLY+ZNNrUVprn5t0/e8RYdepc7q wjXDs3HD9HSmue27FjSb54ofCiGRwxDlO6JbEaHKE93O9Ctf4zd5jIUAs6+Pbh5s cub3iRLKNTRYfAgtofSo8LIGJCFBhYoofQuFoWnexHnve0OJusQ5zftuQjJwCXQ8 p1xPzR1PUoChsTk3D60vqO4jbRMqMLHrEiASnIaGHo/ytI4nz2OJyMBr+eVc6/SR lUUQYO2QFvx/6tsdtZgKLFTQyhr8OytEr1OFz/D2Tu233YmGP5tn0tDLjyd8g3Na 6hsGMceKHk/Nuehf6wQT0Gv79u84LZxGWiisX4ECdQLmzwnoSMEwnaKDAknk3122 bB/lApre9RWBFe+KyfY4hi7BcMdrguEZE/UrpzVCTYLhsaxEJJwjatPYfLvk3ZMt 8ol8T+nahDPmJ9M4BlaLLVLrO5i64tDK2y7WM2488wGkTWh/0cPIdMzs74qqaP0S Dv3XFJIpJqWTC5FqnqO4eRnWSj0A2v79pL1iradOn4KxINq9M9+Nf/q6Pk/hDh7y 8WtBaGEyoFPq/rQ955W701eRrRERnveih/3wzlFeTBebnRMSQtNHLekHPla/u4Up 05Q1/SKlt21rcJhGz2er
=vsQ2
-----END PGP SIGNATURE-----

#2 lore raw
In reply to Stefano Stabellini
Quoted 14 lines · Stefano Stabellini

xen_get_vmport_regs_pfn should take a xen_pfn_t argument, not an unsigned long argument (in fact xen_pfn_t is defined as uint64_t on ARM).

Also use xc_hvm_param_get instead of the deprecated xc_get_hvm_param.

include/hw/xen/xen_common.h +0 -0
index 519696f..355fbac 100644
@@ -168,14 +168,16 @@ void xen_shutdown_fatal_error(const char *fmt, ...) GCC_FMT_ATTR(1, 2);
 

include/hw/xen/xen_common.h void xen_shutdown_fatal_error(const char *fmt, ...) GCC_FMT_ATTR(1, 2); · line 175

Quoted 10 lines
include/hw/xen/xen_common.h +4 -3
 #ifdef HVM_PARAM_VMPORT_REGS_PFN
 static inline int xen_get_vmport_regs_pfn(XenXC xc, domid_t dom,
-                                          unsigned long *vmport_regs_pfn)
+                                          xen_pfn_t *vmport_regs_pfn)
 {
-    return xc_get_hvm_param(xc, dom, HVM_PARAM_VMPORT_REGS_PFN,
-                            vmport_regs_pfn);
+    uint64_t value;
+    return xc_hvm_param_get(xc, dom, HVM_PARAM_VMPORT_REGS_PFN,
+                            &value);

This is not going to work. Maybe "int rc =" instead of return?

(See if if this time the reply is not a big mess.)
-Don Slutz

Quoted 11 lines
include/hw/xen/xen_common.h +2 -1
+    *vmport_regs_pfn = (xen_pfn_t) value;
 }
 #else
 static inline int xen_get_vmport_regs_pfn(XenXC xc, domid_t dom,
-                                          unsigned long *vmport_regs_pfn)
+                                          xen_pfn_t *vmport_regs_pfn)
 {
     return -ENOSYS;
 }
#3 lore raw
Quoted 28 lines · Don Slutz
Quoted 14 lines · Stefano Stabellini

xen_get_vmport_regs_pfn should take a xen_pfn_t argument, not an unsigned long argument (in fact xen_pfn_t is defined as uint64_t on ARM).

Also use xc_hvm_param_get instead of the deprecated xc_get_hvm_param.

include/hw/xen/xen_common.h +0 -0
index 519696f..355fbac 100644
@@ -168,14 +168,16 @@ void xen_shutdown_fatal_error(const char *fmt, ...) GCC_FMT_ATTR(1, 2);
 

include/hw/xen/xen_common.h void xen_shutdown_fatal_error(const char *fmt, ...) GCC_FMT_ATTR(1, 2); · line 175

Quoted 10 lines
include/hw/xen/xen_common.h +4 -3
 #ifdef HVM_PARAM_VMPORT_REGS_PFN
 static inline int xen_get_vmport_regs_pfn(XenXC xc, domid_t dom,
-                                          unsigned long *vmport_regs_pfn)
+                                          xen_pfn_t *vmport_regs_pfn)
 {
-    return xc_get_hvm_param(xc, dom, HVM_PARAM_VMPORT_REGS_PFN,
-                            vmport_regs_pfn);
+    uint64_t value;
+    return xc_hvm_param_get(xc, dom, HVM_PARAM_VMPORT_REGS_PFN,
+                            &value);

This is not going to work. Maybe "int rc =" instead of return?

Quoted 2 lines

(See if if this time the reply is not a big mess.)
-Don Slutz

/me shakes his heads in shame

You are right, I'll fix it and resend.

Quoted 12 lines
Quoted 11 lines
include/hw/xen/xen_common.h +2 -1
+    *vmport_regs_pfn = (xen_pfn_t) value;
 }
 #else
 static inline int xen_get_vmport_regs_pfn(XenXC xc, domid_t dom,
-                                          unsigned long *vmport_regs_pfn)
+                                          xen_pfn_t *vmport_regs_pfn)
 {
     return -ENOSYS;
 }