* [PATCH] tools/libxc: Fix ARM build broken by XEN_DOMCTL_getvcpuextstate commit
@ 2017-03-15 9:20 Razvan Cojocaru
2017-03-15 9:59 ` Wei Liu
0 siblings, 1 reply; 3+ messages in thread
From: Razvan Cojocaru @ 2017-03-15 9:20 UTC (permalink / raw)
To: xen-devel; +Cc: wei.liu2, ian.jackson, Razvan Cojocaru, JBeulich
The previous "tools/libxc: Exposed XEN_DOMCTL_getvcpuextstate" broke
the ARM build (the hypercall does not have a corresponding DOMCTL
ARM struct). This patch fixes the build by returning -ENODEV for
ARM from xc_vcpu_get_extstate().
Signed-off-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
---
tools/libxc/xc_domain.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c
index 71e5d93..c7e8065 100644
--- a/tools/libxc/xc_domain.c
+++ b/tools/libxc/xc_domain.c
@@ -560,7 +560,8 @@ int xc_vcpu_get_extstate(xc_interface *xch,
uint32_t vcpu,
xc_vcpu_extstate_t *extstate)
{
- int rc;
+ int rc = -ENODEV;
+#if defined (__i386) || defined(__x86_64__)
DECLARE_DOMCTL;
DECLARE_HYPERCALL_BUFFER(void, buffer);
bool get_state;
@@ -610,6 +611,7 @@ int xc_vcpu_get_extstate(xc_interface *xch,
out:
if ( get_state )
xc_hypercall_buffer_free(xch, buffer);
+#endif
return rc;
}
--
1.9.1
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] tools/libxc: Fix ARM build broken by XEN_DOMCTL_getvcpuextstate commit
2017-03-15 9:20 [PATCH] tools/libxc: Fix ARM build broken by XEN_DOMCTL_getvcpuextstate commit Razvan Cojocaru
@ 2017-03-15 9:59 ` Wei Liu
2017-03-15 10:01 ` Razvan Cojocaru
0 siblings, 1 reply; 3+ messages in thread
From: Wei Liu @ 2017-03-15 9:59 UTC (permalink / raw)
To: Razvan Cojocaru; +Cc: wei.liu2, ian.jackson, JBeulich, xen-devel
On Wed, Mar 15, 2017 at 11:20:30AM +0200, Razvan Cojocaru wrote:
> The previous "tools/libxc: Exposed XEN_DOMCTL_getvcpuextstate" broke
> the ARM build (the hypercall does not have a corresponding DOMCTL
> ARM struct). This patch fixes the build by returning -ENODEV for
> ARM from xc_vcpu_get_extstate().
>
> Signed-off-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
> ---
> tools/libxc/xc_domain.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c
> index 71e5d93..c7e8065 100644
> --- a/tools/libxc/xc_domain.c
> +++ b/tools/libxc/xc_domain.c
> @@ -560,7 +560,8 @@ int xc_vcpu_get_extstate(xc_interface *xch,
> uint32_t vcpu,
> xc_vcpu_extstate_t *extstate)
> {
> - int rc;
> + int rc = -ENODEV;
> +#if defined (__i386) || defined(__x86_64__)
This should be __i386__ for consistency.
Assuming you've tested ARM build, I will fix this up while committing.
> DECLARE_DOMCTL;
> DECLARE_HYPERCALL_BUFFER(void, buffer);
> bool get_state;
> @@ -610,6 +611,7 @@ int xc_vcpu_get_extstate(xc_interface *xch,
> out:
> if ( get_state )
> xc_hypercall_buffer_free(xch, buffer);
> +#endif
>
> return rc;
> }
> --
> 1.9.1
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] tools/libxc: Fix ARM build broken by XEN_DOMCTL_getvcpuextstate commit
2017-03-15 9:59 ` Wei Liu
@ 2017-03-15 10:01 ` Razvan Cojocaru
0 siblings, 0 replies; 3+ messages in thread
From: Razvan Cojocaru @ 2017-03-15 10:01 UTC (permalink / raw)
To: Wei Liu; +Cc: ian.jackson, JBeulich, xen-devel
On 03/15/2017 11:59 AM, Wei Liu wrote:
> On Wed, Mar 15, 2017 at 11:20:30AM +0200, Razvan Cojocaru wrote:
>> The previous "tools/libxc: Exposed XEN_DOMCTL_getvcpuextstate" broke
>> the ARM build (the hypercall does not have a corresponding DOMCTL
>> ARM struct). This patch fixes the build by returning -ENODEV for
>> ARM from xc_vcpu_get_extstate().
>>
>> Signed-off-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
>
> Acked-by: Wei Liu <wei.liu2@citrix.com>
>
>> ---
>> tools/libxc/xc_domain.c | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c
>> index 71e5d93..c7e8065 100644
>> --- a/tools/libxc/xc_domain.c
>> +++ b/tools/libxc/xc_domain.c
>> @@ -560,7 +560,8 @@ int xc_vcpu_get_extstate(xc_interface *xch,
>> uint32_t vcpu,
>> xc_vcpu_extstate_t *extstate)
>> {
>> - int rc;
>> + int rc = -ENODEV;
>> +#if defined (__i386) || defined(__x86_64__)
>
> This should be __i386__ for consistency.
>
> Assuming you've tested ARM build, I will fix this up while committing.
Thank you. I did test it (I've cross-compiled in an ARM chroot).
Thanks,
Razvan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-03-15 10:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-15 9:20 [PATCH] tools/libxc: Fix ARM build broken by XEN_DOMCTL_getvcpuextstate commit Razvan Cojocaru
2017-03-15 9:59 ` Wei Liu
2017-03-15 10:01 ` Razvan Cojocaru
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.