diff mbox series

arm: Fix arch_initialise_vcpu to be unsupported

Message ID 20210706102853.10251-1-michal.orzel@arm.com (mailing list archive)
State New
Headers show
Series arm: Fix arch_initialise_vcpu to be unsupported | expand

Commit Message

Michal Orzel July 6, 2021, 10:28 a.m. UTC
Function arch_initialise_vcpu is not reachable as the
VCPUOP_initialise is an unsupported operation on arm.
Modify the function by adding ASSERT_UNREACHABLE() and
returning -EOPNOTSUPP.

Suggested-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Michal Orzel <michal.orzel@arm.com>
---
 xen/arch/arm/domain.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Bertrand Marquis July 6, 2021, 5:09 p.m. UTC | #1
Hi Michal,

> On 6 Jul 2021, at 11:28, Michal Orzel <Michal.Orzel@arm.com> wrote:
> 
> Function arch_initialise_vcpu is not reachable as the
> VCPUOP_initialise is an unsupported operation on arm.
> Modify the function by adding ASSERT_UNREACHABLE() and
> returning -EOPNOTSUPP.
> 
> Suggested-by: Jan Beulich <jbeulich@suse.com>
> Signed-off-by: Michal Orzel <michal.orzel@arm.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>

Cheers
Bertrand

> ---
> xen/arch/arm/domain.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
> index c021a03c61..a2aa8b77ad 100644
> --- a/xen/arch/arm/domain.c
> +++ b/xen/arch/arm/domain.c
> @@ -923,7 +923,8 @@ int arch_set_info_guest(
> 
> int arch_initialise_vcpu(struct vcpu *v, XEN_GUEST_HANDLE_PARAM(void) arg)
> {
> -    return default_initialise_vcpu(v, arg);
> +    ASSERT_UNREACHABLE();
> +    return -EOPNOTSUPP;
> }
> 
> int arch_vcpu_reset(struct vcpu *v)
> -- 
> 2.29.0
>
Julien Grall July 7, 2021, 12:53 p.m. UTC | #2
Hi Michal,

On 06/07/2021 11:28, Michal Orzel wrote:
> Function arch_initialise_vcpu is not reachable as the
> VCPUOP_initialise is an unsupported operation on arm.
> Modify the function by adding ASSERT_UNREACHABLE() and
> returning -EOPNOTSUPP.
> 
> Suggested-by: Jan Beulich <jbeulich@suse.com>
> Signed-off-by: Michal Orzel <michal.orzel@arm.com>

Acked-by: Julien Grall <jgrall@amazon.com>

Cheers,
Julien Grall July 7, 2021, 1:06 p.m. UTC | #3
On 07/07/2021 13:53, Julien Grall wrote:
> Hi Michal,
> 
> On 06/07/2021 11:28, Michal Orzel wrote:
>> Function arch_initialise_vcpu is not reachable as the
>> VCPUOP_initialise is an unsupported operation on arm.
>> Modify the function by adding ASSERT_UNREACHABLE() and
>> returning -EOPNOTSUPP.
>>
>> Suggested-by: Jan Beulich <jbeulich@suse.com>
>> Signed-off-by: Michal Orzel <michal.orzel@arm.com>
> 
> Acked-by: Julien Grall <jgrall@amazon.com>

And committed.

Cheers,

> 
> Cheers,
>
diff mbox series

Patch

diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
index c021a03c61..a2aa8b77ad 100644
--- a/xen/arch/arm/domain.c
+++ b/xen/arch/arm/domain.c
@@ -923,7 +923,8 @@  int arch_set_info_guest(
 
 int arch_initialise_vcpu(struct vcpu *v, XEN_GUEST_HANDLE_PARAM(void) arg)
 {
-    return default_initialise_vcpu(v, arg);
+    ASSERT_UNREACHABLE();
+    return -EOPNOTSUPP;
 }
 
 int arch_vcpu_reset(struct vcpu *v)