diff mbox series

[v4,2/2] xen: move arm/include/asm/vm_event.h to asm-generic

Message ID 0d273a71bb3caca894485a33970a81ec9a9f44e5.1693583721.git.oleksii.kurochko@gmail.com (mailing list archive)
State Superseded
Headers show
Series introduce stub directory to storing empty/stub headers | expand

Commit Message

Oleksii Kurochko Sept. 1, 2023, 4:02 p.m. UTC
asm/vm_event.h is common for ARM and RISC-V so it will be moved to
asm-generic dir.

Original asm/vm_event.h from ARM was updated:
 * use SPDX-License-Identifier.
 * update comment messages of stubs.
 * update #ifdef.
 * change public/domctl.h to public/vm_event.h.

Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
---
Changes in V4:
 - update path of vm_event.h from include/asm-generic/asm to include/asm-generic
---
Changes in V3:
 - add Acked-by: Stefano Stabellini <sstabellini@kernel.org> for "xen: move arm/include/asm/vm_event.h to asm-generic"
 - update SPDX tag.
 - move asm/vm_event.h to asm-generic.
---
Changes in V2:
 - change public/domctl.h to public/vm_event.h.
 - update commit message of [PATCH v2 2/2] xen: move arm/include/asm/vm_event.h to stubs
---
 xen/include/asm-generic/vm_event.h | 55 ++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)
 create mode 100644 xen/include/asm-generic/vm_event.h

Comments

Oleksii Kurochko Sept. 1, 2023, 5:14 p.m. UTC | #1
The change which adds generic-y += vm_event.h to ARM's Kbuild was lost
during creation of the patch. Should be added in the next patch version

On Fri, Sep 1, 2023, 18:02 Oleksii Kurochko <oleksii.kurochko@gmail.com>
wrote:

> asm/vm_event.h is common for ARM and RISC-V so it will be moved to
> asm-generic dir.
>
> Original asm/vm_event.h from ARM was updated:
>  * use SPDX-License-Identifier.
>  * update comment messages of stubs.
>  * update #ifdef.
>  * change public/domctl.h to public/vm_event.h.
>
> Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
> Acked-by: Stefano Stabellini <sstabellini@kernel.org>
> ---
> Changes in V4:
>  - update path of vm_event.h from include/asm-generic/asm to
> include/asm-generic
> ---
> Changes in V3:
>  - add Acked-by: Stefano Stabellini <sstabellini@kernel.org> for "xen:
> move arm/include/asm/vm_event.h to asm-generic"
>  - update SPDX tag.
>  - move asm/vm_event.h to asm-generic.
> ---
> Changes in V2:
>  - change public/domctl.h to public/vm_event.h.
>  - update commit message of [PATCH v2 2/2] xen: move
> arm/include/asm/vm_event.h to stubs
> ---
>  xen/include/asm-generic/vm_event.h | 55 ++++++++++++++++++++++++++++++
>  1 file changed, 55 insertions(+)
>  create mode 100644 xen/include/asm-generic/vm_event.h
>
> diff --git a/xen/include/asm-generic/vm_event.h
> b/xen/include/asm-generic/vm_event.h
> new file mode 100644
> index 0000000000..620c7b971c
> --- /dev/null
> +++ b/xen/include/asm-generic/vm_event.h
> @@ -0,0 +1,55 @@
> +/* SPDX-License-Identifier:  GPL-2.0-only */
> +/*
> + * vm_event.h: stubs for architecture specific vm_event handling routines
> + *
> + * Copyright (c) 2015 Tamas K Lengyel (tamas@tklengyel.com)
> + */
> +
> +#ifndef __ASM_GENERIC_VM_EVENT_H__
> +#define __ASM_GENERIC_VM_EVENT_H__
> +
> +#include <xen/sched.h>
> +#include <public/vm_event.h>
> +
> +static inline int vm_event_init_domain(struct domain *d)
> +{
> +    /* Nothing to do. */
> +    return 0;
> +}
> +
> +static inline void vm_event_cleanup_domain(struct domain *d)
> +{
> +    memset(&d->monitor, 0, sizeof(d->monitor));
> +}
> +
> +static inline void vm_event_toggle_singlestep(struct domain *d, struct
> vcpu *v,
> +                                              vm_event_response_t *rsp)
> +{
> +    /* Nothing to do. */
> +}
> +
> +static inline
> +void vm_event_register_write_resume(struct vcpu *v, vm_event_response_t
> *rsp)
> +{
> +    /* Nothing to do. */
> +}
> +
> +static inline
> +void vm_event_emulate_check(struct vcpu *v, vm_event_response_t *rsp)
> +{
> +    /* Nothing to do. */
> +}
> +
> +static inline
> +void vm_event_sync_event(struct vcpu *v, bool value)
> +{
> +    /* Nothing to do. */
> +}
> +
> +static inline
> +void vm_event_reset_vmtrace(struct vcpu *v)
> +{
> +    /* Nothing to do. */
> +}
> +
> +#endif /* __ASM_GENERIC_VM_EVENT_H__ */
> --
> 2.41.0
>
>
Jan Beulich Sept. 4, 2023, 6:53 a.m. UTC | #2
On 01.09.2023 19:14, Oleksii Kurochko wrote:
> The change which adds generic-y += vm_event.h to ARM's Kbuild was lost
> during creation of the patch. Should be added in the next patch version

Which I guess is an indication that ...

> On Fri, Sep 1, 2023, 18:02 Oleksii Kurochko <oleksii.kurochko@gmail.com>
> wrote:
> 
>> asm/vm_event.h is common for ARM and RISC-V so it will be moved to
>> asm-generic dir.
>>
>> Original asm/vm_event.h from ARM was updated:
>>  * use SPDX-License-Identifier.
>>  * update comment messages of stubs.
>>  * update #ifdef.
>>  * change public/domctl.h to public/vm_event.h.
>>
>> Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
>> Acked-by: Stefano Stabellini <sstabellini@kernel.org>

... any earlier acks would better have been dropped.

Jan
Jan Beulich Sept. 4, 2023, 6:54 a.m. UTC | #3
On 01.09.2023 18:02, Oleksii Kurochko wrote:
> asm/vm_event.h is common for ARM and RISC-V so it will be moved to
> asm-generic dir.
> 
> Original asm/vm_event.h from ARM was updated:
>  * use SPDX-License-Identifier.
>  * update comment messages of stubs.
>  * update #ifdef.
>  * change public/domctl.h to public/vm_event.h.
> 
> Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
> Acked-by: Stefano Stabellini <sstabellini@kernel.org>
> ---
> Changes in V4:
>  - update path of vm_event.h from include/asm-generic/asm to include/asm-generic
> ---
> Changes in V3:
>  - add Acked-by: Stefano Stabellini <sstabellini@kernel.org> for "xen: move arm/include/asm/vm_event.h to asm-generic"
>  - update SPDX tag.
>  - move asm/vm_event.h to asm-generic.
> ---
> Changes in V2:
>  - change public/domctl.h to public/vm_event.h.
>  - update commit message of [PATCH v2 2/2] xen: move arm/include/asm/vm_event.h to stubs
> ---
>  xen/include/asm-generic/vm_event.h | 55 ++++++++++++++++++++++++++++++
>  1 file changed, 55 insertions(+)
>  create mode 100644 xen/include/asm-generic/vm_event.h

But that's not "move" anymore, as the Arm header isn't being deleted.

Jan
Oleksii Kurochko Sept. 4, 2023, 11:27 a.m. UTC | #4
On Mon, 2023-09-04 at 08:53 +0200, Jan Beulich wrote:
> On 01.09.2023 19:14, Oleksii Kurochko wrote:
> > The change which adds generic-y += vm_event.h to ARM's Kbuild was
> > lost
> > during creation of the patch. Should be added in the next patch
> > version
> 
> Which I guess is an indication that ...
> 
> > On Fri, Sep 1, 2023, 18:02 Oleksii Kurochko
> > <oleksii.kurochko@gmail.com>
> > wrote:
> > 
> > > asm/vm_event.h is common for ARM and RISC-V so it will be moved
> > > to
> > > asm-generic dir.
> > > 
> > > Original asm/vm_event.h from ARM was updated:
> > >  * use SPDX-License-Identifier.
> > >  * update comment messages of stubs.
> > >  * update #ifdef.
> > >  * change public/domctl.h to public/vm_event.h.
> > > 
> > > Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
> > > Acked-by: Stefano Stabellini <sstabellini@kernel.org>
> 
> ... any earlier acks would better have been dropped.
You are right. I will remove acked-by in the next patch series version.

~ Oleksii
Oleksii Kurochko Sept. 4, 2023, 11:29 a.m. UTC | #5
On Mon, 2023-09-04 at 08:54 +0200, Jan Beulich wrote:
> On 01.09.2023 18:02, Oleksii Kurochko wrote:
> > asm/vm_event.h is common for ARM and RISC-V so it will be moved to
> > asm-generic dir.
> > 
> > Original asm/vm_event.h from ARM was updated:
> >  * use SPDX-License-Identifier.
> >  * update comment messages of stubs.
> >  * update #ifdef.
> >  * change public/domctl.h to public/vm_event.h.
> > 
> > Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
> > Acked-by: Stefano Stabellini <sstabellini@kernel.org>
> > ---
> > Changes in V4:
> >  - update path of vm_event.h from include/asm-generic/asm to
> > include/asm-generic
> > ---
> > Changes in V3:
> >  - add Acked-by: Stefano Stabellini <sstabellini@kernel.org> for
> > "xen: move arm/include/asm/vm_event.h to asm-generic"
> >  - update SPDX tag.
> >  - move asm/vm_event.h to asm-generic.
> > ---
> > Changes in V2:
> >  - change public/domctl.h to public/vm_event.h.
> >  - update commit message of [PATCH v2 2/2] xen: move
> > arm/include/asm/vm_event.h to stubs
> > ---
> >  xen/include/asm-generic/vm_event.h | 55
> > ++++++++++++++++++++++++++++++
> >  1 file changed, 55 insertions(+)
> >  create mode 100644 xen/include/asm-generic/vm_event.h
> 
> But that's not "move" anymore, as the Arm header isn't being deleted.
Yes, it is correct.

But I think we still have to remove it as this is not any sense to have
the same file for ARM, PPC and RISC-V.
diff mbox series

Patch

diff --git a/xen/include/asm-generic/vm_event.h b/xen/include/asm-generic/vm_event.h
new file mode 100644
index 0000000000..620c7b971c
--- /dev/null
+++ b/xen/include/asm-generic/vm_event.h
@@ -0,0 +1,55 @@ 
+/* SPDX-License-Identifier:  GPL-2.0-only */
+/*
+ * vm_event.h: stubs for architecture specific vm_event handling routines
+ *
+ * Copyright (c) 2015 Tamas K Lengyel (tamas@tklengyel.com)
+ */
+
+#ifndef __ASM_GENERIC_VM_EVENT_H__
+#define __ASM_GENERIC_VM_EVENT_H__
+
+#include <xen/sched.h>
+#include <public/vm_event.h>
+
+static inline int vm_event_init_domain(struct domain *d)
+{
+    /* Nothing to do. */
+    return 0;
+}
+
+static inline void vm_event_cleanup_domain(struct domain *d)
+{
+    memset(&d->monitor, 0, sizeof(d->monitor));
+}
+
+static inline void vm_event_toggle_singlestep(struct domain *d, struct vcpu *v,
+                                              vm_event_response_t *rsp)
+{
+    /* Nothing to do. */
+}
+
+static inline
+void vm_event_register_write_resume(struct vcpu *v, vm_event_response_t *rsp)
+{
+    /* Nothing to do. */
+}
+
+static inline
+void vm_event_emulate_check(struct vcpu *v, vm_event_response_t *rsp)
+{
+    /* Nothing to do. */
+}
+
+static inline
+void vm_event_sync_event(struct vcpu *v, bool value)
+{
+    /* Nothing to do. */
+}
+
+static inline
+void vm_event_reset_vmtrace(struct vcpu *v)
+{
+    /* Nothing to do. */
+}
+
+#endif /* __ASM_GENERIC_VM_EVENT_H__ */