From: Jan Beulich <jbeulich@suse.com>
To: Alessandro Zucchelli <alessandro.zucchelli@bugseng.com>
Cc: consulting@bugseng.com,
Stefano Stabellini <sstabellini@kernel.org>,
Julien Grall <julien@xen.org>,
Bertrand Marquis <bertrand.marquis@arm.com>,
Michal Orzel <michal.orzel@amd.com>,
Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>,
Tamas K Lengyel <tamas@tklengyel.com>,
Alexandru Isaila <aisaila@bitdefender.com>,
Petre Pircalabu <ppircalabu@bitdefender.com>,
xen-devel@lists.xenproject.org
Subject: Re: [XEN PATCH v3] arm/mem_access: add conditional build of mem_access.c
Date: Tue, 14 May 2024 10:10:42 +0200 [thread overview]
Message-ID: <e6b525cb-a1f1-494b-8dfe-c9d86cfc8f9e@suse.com> (raw)
In-Reply-To: <b3f03c4f5a78b86b01750f10bb0cebcdb2fd35cc.1715265720.git.alessandro.zucchelli@bugseng.com>
On 10.05.2024 14:32, Alessandro Zucchelli wrote:
> --- a/xen/arch/arm/include/asm/mem_access.h
> +++ b/xen/arch/arm/include/asm/mem_access.h
> @@ -17,6 +17,8 @@
> #ifndef _ASM_ARM_MEM_ACCESS_H
> #define _ASM_ARM_MEM_ACCESS_H
>
> +#include <xen/types.h>
> +
> static inline
> bool p2m_mem_access_emulate_check(struct vcpu *v,
> const struct vm_event_st *rsp)
> @@ -35,12 +37,28 @@ static inline bool p2m_mem_access_sanity_check(struct domain *d)
> * Send mem event based on the access. Boolean return value indicates if trap
> * needs to be injected into guest.
> */
> +#ifdef CONFIG_MEM_ACCESS
> bool p2m_mem_access_check(paddr_t gpa, vaddr_t gla, const struct npfec npfec);
>
> struct page_info*
> p2m_mem_access_check_and_get_page(vaddr_t gva, unsigned long flag,
> const struct vcpu *v);
> +#else
> +
> +static inline bool
> +p2m_mem_access_check(paddr_t gpa, vaddr_t gla, const struct npfec npfec)
> +{
> + return false;
> +}
> +
> +static inline struct page_info*
> +p2m_mem_access_check_and_get_page(vaddr_t gva, unsigned long flag,
> + const struct vcpu *v)
> +{
> + return NULL;
> +}
>
> +#endif /*CONFIG_MEM_ACCESS*/
Why would each arch need to repeat these stubs? IOW why would they not
live in xen/mem_access.h?
Jan
next prev parent reply other threads:[~2024-05-14 8:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-10 12:32 [XEN PATCH v3] arm/mem_access: add conditional build of mem_access.c Alessandro Zucchelli
2024-05-10 20:59 ` Julien Grall
2024-05-12 13:51 ` Alessandro Zucchelli
2024-05-22 18:05 ` Nicola Vetrini
2024-05-14 8:10 ` Jan Beulich [this message]
2024-05-14 21:03 ` Julien Grall
2024-05-22 18:27 ` Tamas K Lengyel
2024-05-22 20:50 ` [for-4.19] " Julien Grall
2024-05-23 8:04 ` Oleksii K.
2024-05-23 12:38 ` Julien Grall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e6b525cb-a1f1-494b-8dfe-c9d86cfc8f9e@suse.com \
--to=jbeulich@suse.com \
--cc=Volodymyr_Babchuk@epam.com \
--cc=aisaila@bitdefender.com \
--cc=alessandro.zucchelli@bugseng.com \
--cc=bertrand.marquis@arm.com \
--cc=consulting@bugseng.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=ppircalabu@bitdefender.com \
--cc=sstabellini@kernel.org \
--cc=tamas@tklengyel.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.