From: Nicola Vetrini <nicola.vetrini@bugseng.com>
To: Stefano Stabellini <sstabellini@kernel.org>
Cc: xen-devel@lists.xenproject.org, michal.orzel@amd.com,
xenia.ragiadakou@amd.com, ayan.kumar.halder@amd.com,
consulting@bugseng.com, jbeulich@suse.com,
andrew.cooper3@citrix.com, roger.pau@citrix.com,
Henry.Wang@arm.com, Wei Liu <wl@xen.org>
Subject: Re: [XEN PATCH 4/7] x86/grant: switch included header to make declarations visible
Date: Tue, 03 Oct 2023 09:00:44 +0200 [thread overview]
Message-ID: <7dcb6b040d0fab33553dac18e9080465@bugseng.com> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2310021541230.2348112@ubuntu-linux-20-04-desktop>
On 03/10/2023 00:42, Stefano Stabellini wrote:
> On Mon, 2 Oct 2023, Nicola Vetrini wrote:
>> The declarations for {create,replace}_grant_p2m_mapping are
>> not visible when these functions are defined, therefore the right
>> header needs to be included to allow them to be visible.
>>
>> Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
>> ---
>> xen/arch/x86/hvm/grant_table.c | 3 +--
>> xen/arch/x86/include/asm/hvm/grant_table.h | 2 ++
>> 2 files changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/xen/arch/x86/hvm/grant_table.c
>> b/xen/arch/x86/hvm/grant_table.c
>> index 30d51d54a949..afe449d8882c 100644
>> --- a/xen/arch/x86/hvm/grant_table.c
>> +++ b/xen/arch/x86/hvm/grant_table.c
>> @@ -9,8 +9,7 @@
>>
>> #include <xen/types.h>
>>
>> -#include <public/grant_table.h>
>> -
>> +#include <asm/hvm/grant_table.h>
>> #include <asm/p2m.h>
>
> This makes sense...
>
>
>> int create_grant_p2m_mapping(uint64_t addr, mfn_t frame,
>> diff --git a/xen/arch/x86/include/asm/hvm/grant_table.h
>> b/xen/arch/x86/include/asm/hvm/grant_table.h
>> index 33c1da1a25f3..576aeb50adf4 100644
>> --- a/xen/arch/x86/include/asm/hvm/grant_table.h
>> +++ b/xen/arch/x86/include/asm/hvm/grant_table.h
>> @@ -10,6 +10,8 @@
>> #ifndef __X86_HVM_GRANT_TABLE_H__
>> #define __X86_HVM_GRANT_TABLE_H__
>>
>> +#include <asm/paging.h>
>
> ... but I don't understand this one. It doesn't look like
> asm/hvm/grant_table.h actually needs asm/paging.h ? Maybe it should be
> included in xen/arch/x86/hvm/grant_table.c instead ?
>
>
>> #ifdef CONFIG_HVM
>>
>> int create_grant_p2m_mapping(uint64_t addr, mfn_t frame,
>> --
>> 2.34.1
>>
See this thread [1] for more context. There was no response, so I went
for the route that
made more sense to me. I guess you could say that only <xen/mm-frame.h>
is actually needed
to get a definition of mfn_t, but I put <asm/paging.h> as in the
<asm/grant_table.h> header.
[1]
https://lore.kernel.org/xen-devel/a4b6710b66ed05292388ac6882b940ec@bugseng.com/
--
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)
next prev parent reply other threads:[~2023-10-03 7:01 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-02 7:49 [XEN PATCH 0/7] Fix or deviate various instances of missing declarations Nicola Vetrini
2023-10-02 7:49 ` [XEN PATCH 1/7] xen: add declarations for variables where needed Nicola Vetrini
2023-10-02 11:07 ` Roger Pau Monné
2023-10-03 7:05 ` Nicola Vetrini
2023-10-03 7:18 ` Roger Pau Monné
2023-10-03 7:52 ` Nicola Vetrini
2023-10-02 7:49 ` [XEN PATCH 2/7] x86: add deviations for variables only used in asm code Nicola Vetrini
2023-10-02 22:37 ` Stefano Stabellini
2023-10-02 7:49 ` [XEN PATCH 3/7] x86: add deviation comments for asm-only functions Nicola Vetrini
2023-10-02 22:40 ` Stefano Stabellini
2023-10-02 7:49 ` [XEN PATCH 4/7] x86/grant: switch included header to make declarations visible Nicola Vetrini
2023-10-02 22:42 ` Stefano Stabellini
2023-10-03 7:00 ` Nicola Vetrini [this message]
2023-10-03 20:41 ` Stefano Stabellini
2023-10-02 7:49 ` [XEN PATCH 5/7] x86/vm_event: add missing include for hvm_vm_event_do_resume Nicola Vetrini
2023-10-02 7:49 ` [XEN PATCH 6/7] xen/console: make function static inline Nicola Vetrini
2023-10-02 22:42 ` Stefano Stabellini
2023-10-02 7:49 ` [XEN PATCH 7/7] x86/mem_access: make function static Nicola Vetrini
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=7dcb6b040d0fab33553dac18e9080465@bugseng.com \
--to=nicola.vetrini@bugseng.com \
--cc=Henry.Wang@arm.com \
--cc=andrew.cooper3@citrix.com \
--cc=ayan.kumar.halder@amd.com \
--cc=consulting@bugseng.com \
--cc=jbeulich@suse.com \
--cc=michal.orzel@amd.com \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.org \
--cc=xenia.ragiadakou@amd.com \
/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.