* [PATCH v2] xen/public: arch-arm: Restrict the visibility of struct vcpu_guest_core_regs
@ 2019-06-03 16:11 ` Julien Grall
0 siblings, 0 replies; 6+ messages in thread
From: Julien Grall @ 2019-06-03 16:11 UTC (permalink / raw)
To: xen-devel
Cc: Stefano Stabellini, wl, andrew.cooper3, ian.jackson,
Julien Grall, jbeulich
Currently, the structure vcpu_guest_core_regs is part of the public API.
This implies that any change in the structure should be backward
compatible.
However, the structure is only needed by the tools and Xen. It is also
not expected to be ever used outside of that context. So we could save us
some headache by only declaring the structure for Xen and tools.
Suggested-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Julien Grall <julien.grall@arm.com>
---
This is a follow-up of the discussion [1].
As this is now Xen and tools only, I am wondering whether the check on
GNU_C is still necessary. I am happy to send a follow-up patch (or fold
in this one) if it can be removed.
[1] <3c245c5b-51c6-1d0e-ad6c-42414573166f@arm.com>
---
xen/include/public/arch-arm.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/xen/include/public/arch-arm.h b/xen/include/public/arch-arm.h
index eb424e8286..e9a86d8eb8 100644
--- a/xen/include/public/arch-arm.h
+++ b/xen/include/public/arch-arm.h
@@ -197,6 +197,7 @@
} while ( 0 )
#define set_xen_guest_handle(hnd, val) set_xen_guest_handle_raw(hnd, val)
+#if defined(__XEN__) || defined(__XEN_TOOLS__)
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
/* Anonymous union includes both 32- and 64-bit names (e.g., r0/x0). */
# define __DECL_REG(n64, n32) union { \
@@ -272,6 +273,8 @@ DEFINE_XEN_GUEST_HANDLE(vcpu_guest_core_regs_t);
#undef __DECL_REG
+#endif
+
typedef uint64_t xen_pfn_t;
#define PRI_xen_pfn PRIx64
#define PRIu_xen_pfn PRIu64
--
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
* [Xen-devel] [PATCH v2] xen/public: arch-arm: Restrict the visibility of struct vcpu_guest_core_regs
@ 2019-06-03 16:11 ` Julien Grall
0 siblings, 0 replies; 6+ messages in thread
From: Julien Grall @ 2019-06-03 16:11 UTC (permalink / raw)
To: xen-devel
Cc: Stefano Stabellini, wl, andrew.cooper3, ian.jackson,
Julien Grall, jbeulich
Currently, the structure vcpu_guest_core_regs is part of the public API.
This implies that any change in the structure should be backward
compatible.
However, the structure is only needed by the tools and Xen. It is also
not expected to be ever used outside of that context. So we could save us
some headache by only declaring the structure for Xen and tools.
Suggested-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Julien Grall <julien.grall@arm.com>
---
This is a follow-up of the discussion [1].
As this is now Xen and tools only, I am wondering whether the check on
GNU_C is still necessary. I am happy to send a follow-up patch (or fold
in this one) if it can be removed.
[1] <3c245c5b-51c6-1d0e-ad6c-42414573166f@arm.com>
---
xen/include/public/arch-arm.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/xen/include/public/arch-arm.h b/xen/include/public/arch-arm.h
index eb424e8286..e9a86d8eb8 100644
--- a/xen/include/public/arch-arm.h
+++ b/xen/include/public/arch-arm.h
@@ -197,6 +197,7 @@
} while ( 0 )
#define set_xen_guest_handle(hnd, val) set_xen_guest_handle_raw(hnd, val)
+#if defined(__XEN__) || defined(__XEN_TOOLS__)
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
/* Anonymous union includes both 32- and 64-bit names (e.g., r0/x0). */
# define __DECL_REG(n64, n32) union { \
@@ -272,6 +273,8 @@ DEFINE_XEN_GUEST_HANDLE(vcpu_guest_core_regs_t);
#undef __DECL_REG
+#endif
+
typedef uint64_t xen_pfn_t;
#define PRI_xen_pfn PRIx64
#define PRIu_xen_pfn PRIu64
--
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 v2] xen/public: arch-arm: Restrict the visibility of struct vcpu_guest_core_regs
@ 2019-06-04 7:15 ` Jan Beulich
0 siblings, 0 replies; 6+ messages in thread
From: Jan Beulich @ 2019-06-04 7:15 UTC (permalink / raw)
To: Julien Grall
Cc: Andrew Cooper, Stefano Stabellini, Ian Jackson, WeiLiu, xen-devel
>>> On 03.06.19 at 18:11, <julien.grall@arm.com> wrote:
> --- a/xen/include/public/arch-arm.h
> +++ b/xen/include/public/arch-arm.h
> @@ -197,6 +197,7 @@
> } while ( 0 )
> #define set_xen_guest_handle(hnd, val) set_xen_guest_handle_raw(hnd, val)
>
> +#if defined(__XEN__) || defined(__XEN_TOOLS__)
> #if defined(__GNUC__) && !defined(__STRICT_ANSI__)
> /* Anonymous union includes both 32- and 64-bit names (e.g., r0/x0). */
> # define __DECL_REG(n64, n32) union { \
> @@ -272,6 +273,8 @@ DEFINE_XEN_GUEST_HANDLE(vcpu_guest_core_regs_t);
>
> #undef __DECL_REG
>
> +#endif
> +
> typedef uint64_t xen_pfn_t;
> #define PRI_xen_pfn PRIx64
> #define PRIu_xen_pfn PRIu64
I'm puzzled by you still adding another #if, rather than moving the
block down into the existing one. You said you'd wait for Stefano's
opinion, and he asked that you follow my suggestion. Did I miss
some further part of the discussion?
Jan
_______________________________________________
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: [Xen-devel] [PATCH v2] xen/public: arch-arm: Restrict the visibility of struct vcpu_guest_core_regs
@ 2019-06-04 7:15 ` Jan Beulich
0 siblings, 0 replies; 6+ messages in thread
From: Jan Beulich @ 2019-06-04 7:15 UTC (permalink / raw)
To: Julien Grall
Cc: Andrew Cooper, Stefano Stabellini, Ian Jackson, WeiLiu, xen-devel
>>> On 03.06.19 at 18:11, <julien.grall@arm.com> wrote:
> --- a/xen/include/public/arch-arm.h
> +++ b/xen/include/public/arch-arm.h
> @@ -197,6 +197,7 @@
> } while ( 0 )
> #define set_xen_guest_handle(hnd, val) set_xen_guest_handle_raw(hnd, val)
>
> +#if defined(__XEN__) || defined(__XEN_TOOLS__)
> #if defined(__GNUC__) && !defined(__STRICT_ANSI__)
> /* Anonymous union includes both 32- and 64-bit names (e.g., r0/x0). */
> # define __DECL_REG(n64, n32) union { \
> @@ -272,6 +273,8 @@ DEFINE_XEN_GUEST_HANDLE(vcpu_guest_core_regs_t);
>
> #undef __DECL_REG
>
> +#endif
> +
> typedef uint64_t xen_pfn_t;
> #define PRI_xen_pfn PRIx64
> #define PRIu_xen_pfn PRIu64
I'm puzzled by you still adding another #if, rather than moving the
block down into the existing one. You said you'd wait for Stefano's
opinion, and he asked that you follow my suggestion. Did I miss
some further part of the discussion?
Jan
_______________________________________________
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 v2] xen/public: arch-arm: Restrict the visibility of struct vcpu_guest_core_regs
@ 2019-06-04 8:46 ` Julien Grall
0 siblings, 0 replies; 6+ messages in thread
From: Julien Grall @ 2019-06-04 8:46 UTC (permalink / raw)
To: Jan Beulich
Cc: Andrew Cooper, Stefano Stabellini, Ian Jackson, WeiLiu, xen-devel
Hi Jan,
On 6/4/19 8:15 AM, Jan Beulich wrote:
>>>> On 03.06.19 at 18:11, <julien.grall@arm.com> wrote:
>> --- a/xen/include/public/arch-arm.h
>> +++ b/xen/include/public/arch-arm.h
>> @@ -197,6 +197,7 @@
>> } while ( 0 )
>> #define set_xen_guest_handle(hnd, val) set_xen_guest_handle_raw(hnd, val)
>>
>> +#if defined(__XEN__) || defined(__XEN_TOOLS__)
>> #if defined(__GNUC__) && !defined(__STRICT_ANSI__)
>> /* Anonymous union includes both 32- and 64-bit names (e.g., r0/x0). */
>> # define __DECL_REG(n64, n32) union { \
>> @@ -272,6 +273,8 @@ DEFINE_XEN_GUEST_HANDLE(vcpu_guest_core_regs_t);
>>
>> #undef __DECL_REG
>>
>> +#endif
>> +
>> typedef uint64_t xen_pfn_t;
>> #define PRI_xen_pfn PRIx64
>> #define PRIu_xen_pfn PRIu64
>
> I'm puzzled by you still adding another #if, rather than moving the
> block down into the existing one. You said you'd wait for Stefano's
> opinion, and he asked that you follow my suggestion. Did I miss
> some further part of the discussion?
No I have sent the wrong version. Not sure how because the changes are
correct in the branch I am using.
Sorry for the inconvenience, I will resend the patch.
Cheers,
--
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: [Xen-devel] [PATCH v2] xen/public: arch-arm: Restrict the visibility of struct vcpu_guest_core_regs
@ 2019-06-04 8:46 ` Julien Grall
0 siblings, 0 replies; 6+ messages in thread
From: Julien Grall @ 2019-06-04 8:46 UTC (permalink / raw)
To: Jan Beulich
Cc: Andrew Cooper, Stefano Stabellini, Ian Jackson, WeiLiu, xen-devel
Hi Jan,
On 6/4/19 8:15 AM, Jan Beulich wrote:
>>>> On 03.06.19 at 18:11, <julien.grall@arm.com> wrote:
>> --- a/xen/include/public/arch-arm.h
>> +++ b/xen/include/public/arch-arm.h
>> @@ -197,6 +197,7 @@
>> } while ( 0 )
>> #define set_xen_guest_handle(hnd, val) set_xen_guest_handle_raw(hnd, val)
>>
>> +#if defined(__XEN__) || defined(__XEN_TOOLS__)
>> #if defined(__GNUC__) && !defined(__STRICT_ANSI__)
>> /* Anonymous union includes both 32- and 64-bit names (e.g., r0/x0). */
>> # define __DECL_REG(n64, n32) union { \
>> @@ -272,6 +273,8 @@ DEFINE_XEN_GUEST_HANDLE(vcpu_guest_core_regs_t);
>>
>> #undef __DECL_REG
>>
>> +#endif
>> +
>> typedef uint64_t xen_pfn_t;
>> #define PRI_xen_pfn PRIx64
>> #define PRIu_xen_pfn PRIu64
>
> I'm puzzled by you still adding another #if, rather than moving the
> block down into the existing one. You said you'd wait for Stefano's
> opinion, and he asked that you follow my suggestion. Did I miss
> some further part of the discussion?
No I have sent the wrong version. Not sure how because the changes are
correct in the branch I am using.
Sorry for the inconvenience, I will resend the patch.
Cheers,
--
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
end of thread, other threads:[~2019-06-04 8:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-03 16:11 [PATCH v2] xen/public: arch-arm: Restrict the visibility of struct vcpu_guest_core_regs Julien Grall
2019-06-03 16:11 ` [Xen-devel] " Julien Grall
2019-06-04 7:15 ` Jan Beulich
2019-06-04 7:15 ` [Xen-devel] " Jan Beulich
2019-06-04 8:46 ` Julien Grall
2019-06-04 8:46 ` [Xen-devel] " Julien Grall
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.