[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen stable-4.10] ocaml: fix arm build



commit 20db434e90fd7ecd24cabdbc82b926f41bb04f51
Author:     Wei Liu <wei.liu2@xxxxxxxxxx>
AuthorDate: Wed Jan 17 16:43:54 2018 +0000
Commit:     Wei Liu <wei.liu2@xxxxxxxxxx>
CommitDate: Tue Mar 13 14:09:41 2018 +0000

    ocaml: fix arm build
    
    ARM doesn't have emulation_flags in the arch_domainconfig.
    
    Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
    Reviewed-by: Julien Grall <julien.grall@xxxxxxxxxx>
    (cherry picked from commit 81838c9067ab7f4b89d33f90a71225ffff9800ba)
---
 tools/ocaml/libs/xc/xenctrl_stubs.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/ocaml/libs/xc/xenctrl_stubs.c 
b/tools/ocaml/libs/xc/xenctrl_stubs.c
index 0b5a2361c0..dd6000caa3 100644
--- a/tools/ocaml/libs/xc/xenctrl_stubs.c
+++ b/tools/ocaml/libs/xc/xenctrl_stubs.c
@@ -176,10 +176,14 @@ CAMLprim value stub_xc_domain_create(value xch, value 
ssidref,
                break;
 
        case 1: /* X86 - emulation flags in the block */
+#if defined(__i386__) || defined(__x86_64__)
                for (l = Field(Field(domconfig, 0), 0);
                     l != Val_none;
                     l = Field(l, 1))
                        config.emulation_flags |= 1u << Int_val(Field(l, 0));
+#else
+               caml_failwith("Unhandled: x86");
+#endif
                break;
 
        default:
@@ -320,6 +324,7 @@ static value alloc_domaininfo(xc_domaininfo_t * info)
 
        Store_field(result, 15, tmp);
 
+#if defined(__i386__) || defined(__x86_64__)
        /* emulation_flags: x86_arch_emulation_flags list; */
        tmp = emul_list = Val_emptylist;
        for (i = 0; i < 10; i++) {
@@ -341,6 +346,7 @@ static value alloc_domaininfo(xc_domaininfo_t * info)
        Store_field(arch_config, 0, x86_arch_config);
 
        Store_field(result, 16, arch_config);
+#endif
 
        CAMLreturn(result);
 }
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.10

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.