Message ID | 20200330192157.1335-6-julien@xen.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | None | expand |
diff --git a/tools/ocaml/libs/xc/xenctrl_stubs.c b/tools/ocaml/libs/xc/xenctrl_stubs.c index 904da45c4f..0fdbeac158 100644 --- a/tools/ocaml/libs/xc/xenctrl_stubs.c +++ b/tools/ocaml/libs/xc/xenctrl_stubs.c @@ -497,6 +497,8 @@ CAMLprim value stub_xc_vcpu_context_get(value xch, value domid, vcpu_guest_context_any_t ctxt; ret = xc_vcpu_getcontext(_H(xch), _D(domid), Int_val(cpu), &ctxt); + if ( ret < 0 ) + failwith_xc(_H(xch)); context = caml_alloc_string(sizeof(ctxt)); memcpy(String_val(context), (char *) &ctxt.c, sizeof(ctxt.c));