* [PATCH] ocaml: fix arm build
@ 2018-01-17 16:43 Wei Liu
2018-01-17 16:51 ` Julien Grall
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Wei Liu @ 2018-01-17 16:43 UTC (permalink / raw)
To: Xen-devel; +Cc: Ian Jackson, Julien Grall, Wei Liu, Andrew Cooper
ARM doesn't have emulation_flags in the arch_domainconfig.
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Julien Grall <julien.grall@arm.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
---
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..fd128778b3 100644
--- a/tools/ocaml/libs/xc/xenctrl_stubs.c
+++ b/tools/ocaml/libs/xc/xenctrl_stubs.c
@@ -175,11 +175,15 @@ CAMLprim value stub_xc_domain_create(value xch, value ssidref,
caml_failwith("Unhandled: ARM");
break;
+#if defined(__i386__) || defined(__x86_64__)
case 1: /* X86 - emulation flags in the block */
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);
}
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] ocaml: fix arm build
2018-01-17 16:43 [PATCH] ocaml: fix arm build Wei Liu
@ 2018-01-17 16:51 ` Julien Grall
2018-01-17 17:00 ` Wei Liu
2018-01-18 10:44 ` Wei Liu
2 siblings, 0 replies; 6+ messages in thread
From: Julien Grall @ 2018-01-17 16:51 UTC (permalink / raw)
To: Wei Liu, Xen-devel; +Cc: Andrew Cooper, Julien Grall, Ian Jackson
Hi Wei,
On 17/01/18 16:43, Wei Liu wrote:
> ARM doesn't have emulation_flags in the arch_domainconfig.
>
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Julien Grall <julien.grall@linaro.org>
Cheers,
> ---
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: Julien Grall <julien.grall@arm.com>
> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> ---
> 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..fd128778b3 100644
> --- a/tools/ocaml/libs/xc/xenctrl_stubs.c
> +++ b/tools/ocaml/libs/xc/xenctrl_stubs.c
> @@ -175,11 +175,15 @@ CAMLprim value stub_xc_domain_create(value xch, value ssidref,
> caml_failwith("Unhandled: ARM");
> break;
>
> +#if defined(__i386__) || defined(__x86_64__)
> case 1: /* X86 - emulation flags in the block */
> 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);
> }
>
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ocaml: fix arm build
2018-01-17 16:43 [PATCH] ocaml: fix arm build Wei Liu
2018-01-17 16:51 ` Julien Grall
@ 2018-01-17 17:00 ` Wei Liu
2018-01-18 13:56 ` Christian Lindig
2018-01-18 10:44 ` Wei Liu
2 siblings, 1 reply; 6+ messages in thread
From: Wei Liu @ 2018-01-17 17:00 UTC (permalink / raw)
To: Xen-devel
Cc: Wei Liu, Andrew Cooper, Jonathan.Ludlam, Ian Jackson,
Julien Grall, christian.lindig
CC Ocaml experts
On Wed, Jan 17, 2018 at 04:43:54PM +0000, Wei Liu wrote:
> ARM doesn't have emulation_flags in the arch_domainconfig.
>
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> ---
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: Julien Grall <julien.grall@arm.com>
> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> ---
> 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..fd128778b3 100644
> --- a/tools/ocaml/libs/xc/xenctrl_stubs.c
> +++ b/tools/ocaml/libs/xc/xenctrl_stubs.c
> @@ -175,11 +175,15 @@ CAMLprim value stub_xc_domain_create(value xch, value ssidref,
> caml_failwith("Unhandled: ARM");
> break;
>
> +#if defined(__i386__) || defined(__x86_64__)
> case 1: /* X86 - emulation flags in the block */
> 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);
> }
> --
> 2.11.0
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ocaml: fix arm build
2018-01-17 16:43 [PATCH] ocaml: fix arm build Wei Liu
2018-01-17 16:51 ` Julien Grall
2018-01-17 17:00 ` Wei Liu
@ 2018-01-18 10:44 ` Wei Liu
2018-01-18 11:10 ` Wei Liu
2 siblings, 1 reply; 6+ messages in thread
From: Wei Liu @ 2018-01-18 10:44 UTC (permalink / raw)
To: Xen-devel; +Cc: Ian Jackson, Julien Grall, Wei Liu, Andrew Cooper
On Wed, Jan 17, 2018 at 04:43:54PM +0000, Wei Liu wrote:
> ARM doesn't have emulation_flags in the arch_domainconfig.
>
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> ---
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: Julien Grall <julien.grall@arm.com>
> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> ---
> 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..fd128778b3 100644
> --- a/tools/ocaml/libs/xc/xenctrl_stubs.c
> +++ b/tools/ocaml/libs/xc/xenctrl_stubs.c
> @@ -175,11 +175,15 @@ CAMLprim value stub_xc_domain_create(value xch, value ssidref,
> caml_failwith("Unhandled: ARM");
> break;
>
> +#if defined(__i386__) || defined(__x86_64__)
> case 1: /* X86 - emulation flags in the block */
The label will be moved outside of the #ifdef.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ocaml: fix arm build
2018-01-18 10:44 ` Wei Liu
@ 2018-01-18 11:10 ` Wei Liu
0 siblings, 0 replies; 6+ messages in thread
From: Wei Liu @ 2018-01-18 11:10 UTC (permalink / raw)
To: Xen-devel; +Cc: Ian Jackson, Julien Grall, Wei Liu, Andrew Cooper
On Thu, Jan 18, 2018 at 10:44:58AM +0000, Wei Liu wrote:
> On Wed, Jan 17, 2018 at 04:43:54PM +0000, Wei Liu wrote:
> > ARM doesn't have emulation_flags in the arch_domainconfig.
> >
> > Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> > ---
> > Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> > Cc: Julien Grall <julien.grall@arm.com>
> > Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> > ---
> > 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..fd128778b3 100644
> > --- a/tools/ocaml/libs/xc/xenctrl_stubs.c
> > +++ b/tools/ocaml/libs/xc/xenctrl_stubs.c
> > @@ -175,11 +175,15 @@ CAMLprim value stub_xc_domain_create(value xch, value ssidref,
> > caml_failwith("Unhandled: ARM");
> > break;
> >
> > +#if defined(__i386__) || defined(__x86_64__)
> > case 1: /* X86 - emulation flags in the block */
>
> The label will be moved outside of the #ifdef.
In the interest of unblocking things I have pushed a version of this
patch to staging.
Wei.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ocaml: fix arm build
2018-01-17 17:00 ` Wei Liu
@ 2018-01-18 13:56 ` Christian Lindig
0 siblings, 0 replies; 6+ messages in thread
From: Christian Lindig @ 2018-01-18 13:56 UTC (permalink / raw)
To: Wei Liu
Cc: Xen-devel, Julien Grall, Andrew Cooper, Jonathan Ludlam, Ian Jackson
This looks good to me. I don't think conditional compilation can be avoided here.
-- Christian
> On 17. Jan 2018, at 17:00, Wei Liu <wei.liu2@citrix.com> wrote:
>
> CC Ocaml experts
>
> On Wed, Jan 17, 2018 at 04:43:54PM +0000, Wei Liu wrote:
>> ARM doesn't have emulation_flags in the arch_domainconfig.
>>
>> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
>> ---
>> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
>> Cc: Julien Grall <julien.grall@arm.com>
>> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
>> ---
>> 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..fd128778b3 100644
>> --- a/tools/ocaml/libs/xc/xenctrl_stubs.c
>> +++ b/tools/ocaml/libs/xc/xenctrl_stubs.c
>> @@ -175,11 +175,15 @@ CAMLprim value stub_xc_domain_create(value xch, value ssidref,
>> caml_failwith("Unhandled: ARM");
>> break;
>>
>> +#if defined(__i386__) || defined(__x86_64__)
>> case 1: /* X86 - emulation flags in the block */
>> 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);
>> }
>> --
>> 2.11.0
>>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-01-18 13:56 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-17 16:43 [PATCH] ocaml: fix arm build Wei Liu
2018-01-17 16:51 ` Julien Grall
2018-01-17 17:00 ` Wei Liu
2018-01-18 13:56 ` Christian Lindig
2018-01-18 10:44 ` Wei Liu
2018-01-18 11:10 ` Wei Liu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.