Skip to content

Commit 8e0b253

Browse files
committed
xenctrlext: do not truncate the amount of memory in claims to 32 bits
Int_val truncates values to a 32-bit int. Instead use Long_val, which does not suffer from this. This is a problem when claiming more than ≈ 9706GiBs for a domain. Signed-off-by: Pau Ruiz Safont <[email protected]>
1 parent 29ab6b6 commit 8e0b253

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ocaml/xenopsd/c_stubs/xenctrlext_stubs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ CAMLprim value stub_xenctrlext_domain_claim_pages(value xch_val, value domid_val
678678
int retval, the_errno;
679679
xc_interface* xch = xch_of_val(xch_val);
680680
uint32_t domid = Int_val(domid_val);
681-
unsigned long nr_pages = Int_val(nr_pages_val);
681+
unsigned long nr_pages = Long_val(nr_pages_val);
682682

683683
caml_release_runtime_system();
684684
retval = xc_domain_claim_pages(xch, domid, nr_pages);

0 commit comments

Comments
 (0)