tools/libs/guest/xg_dom_boot.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Declarations of xc_dom_console_init() and
xc_dom_console_set_disconnected() in libxenguest.h don't match their
implementation in the library.
Use xen_pfn_t for PFNs in the library to fix that.
Fixes: b6fc307b0b00 ("libs/guest: Set console as disconnected on resume")
Fixes: 971b7d5ecbcd ("libs/guest: Set console page to disconnected")
Reported-by: Luca Fancellu <luca.fancellu@arm.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
---
tools/libs/guest/xg_dom_boot.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/libs/guest/xg_dom_boot.c b/tools/libs/guest/xg_dom_boot.c
index f51b6a78c8..beeb4a7255 100644
--- a/tools/libs/guest/xg_dom_boot.c
+++ b/tools/libs/guest/xg_dom_boot.c
@@ -430,7 +430,7 @@ int xc_dom_gnttab_init(struct xc_dom_image *dom)
static int dom_console_init(xc_interface *xch,
uint32_t domid,
- unsigned long dst_pfn,
+ xen_pfn_t dst_pfn,
bool clear)
{
const size_t size = PAGE_SIZE;
@@ -451,14 +451,14 @@ static int dom_console_init(xc_interface *xch,
int xc_dom_console_init(xc_interface *xch,
uint32_t domid,
- unsigned long dst_pfn)
+ xen_pfn_t dst_pfn)
{
return dom_console_init(xch, domid, dst_pfn, true);
}
int xc_dom_console_set_disconnected(xc_interface *xch,
uint32_t domid,
- unsigned long dst_pfn)
+ xen_pfn_t dst_pfn)
{
return dom_console_init(xch, domid, dst_pfn, false);
}
--
2.51.0
Hi Jurgen,
> On 5 Oct 2025, at 10:18, Juergen Gross <jgross@suse.com> wrote:
>
> Declarations of xc_dom_console_init() and
> xc_dom_console_set_disconnected() in libxenguest.h don't match their
> implementation in the library.
>
> Use xen_pfn_t for PFNs in the library to fix that.
>
> Fixes: b6fc307b0b00 ("libs/guest: Set console as disconnected on resume")
> Fixes: 971b7d5ecbcd ("libs/guest: Set console page to disconnected")
> Reported-by: Luca Fancellu <luca.fancellu@arm.com>
> Signed-off-by: Juergen Gross <jgross@suse.com>
Thanks for the quick patch, I’ve built the arm32 configuration and this solves the compilation issue.
Tested-by: Luca Fancellu <luca.fancellu@arm.com <mailto:luca.fancellu@arm.com>>
Cheers,
Luca
On 05/10/2025 10:18 am, Juergen Gross wrote:
> Declarations of xc_dom_console_init() and
> xc_dom_console_set_disconnected() in libxenguest.h don't match their
> implementation in the library.
"Under arm32, xen_pfn_t is a uint64_t and wider than unsigned long."
>
> Use xen_pfn_t for PFNs in the library to fix that.
>
> Fixes: b6fc307b0b00 ("libs/guest: Set console as disconnected on resume")
> Fixes: 971b7d5ecbcd ("libs/guest: Set console page to disconnected")
> Reported-by: Luca Fancellu <luca.fancellu@arm.com>
> Signed-off-by: Juergen Gross <jgross@suse.com>
For this patch, Reveiwed-by: Andrew Cooper <andrew.cooper3@citrix.com>
However, another bug in these patches is the use of pfn. gfn is the
correct term to be using.
~Andrew
© 2016 - 2025 Red Hat, Inc.