From: Wei Xu <xuwei5@hisilicon.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
Julien Grall <julien@xen.org>, Wei Liu <wl@xen.org>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
George Dunlap <George.Dunlap@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Ian Jackson <ian.jackson@eu.citrix.com>,
Linuxarm <linuxarm@huawei.com>,
Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>,
"Zengtao \(B\)" <prime.zeng@hisilicon.com>,
xen-devel@lists.xenproject.org, Volodymyr_Babchuk@epam.com
Subject: Re: [Xen-devel] [PATCH] arm/acpi: Add __acpi_unmap_table function for ARM
Date: Wed, 22 Jan 2020 17:04:28 +0800 [thread overview]
Message-ID: <5E28101C.2030405@hisilicon.com> (raw)
In-Reply-To: <e5082f00-ad1a-ab2b-bc1f-b58714d08a02@suse.com>
Hi Jan,
On 2020/1/22 16:24, Jan Beulich wrote:
> On 22.01.2020 06:57, Wei Xu wrote:
>> On 2020/1/21 19:02, Jan Beulich wrote:
>>> On 21.01.2020 10:49, Wei Xu wrote:
>>>> --- a/xen/drivers/acpi/osl.c
>>>> +++ b/xen/drivers/acpi/osl.c
>>>> @@ -114,6 +114,8 @@ void acpi_os_unmap_memory(void __iomem * virt, acpi_size size)
>>>> return;
>>>> }
>>>>
>>>> + __acpi_unmap_table(virt, size);
>>>> +
>>>> if (system_state >= SYS_STATE_boot)
>>>> vunmap((void *)((unsigned long)virt & PAGE_MASK));
>>>
>>> How can it possibly be correct to call both vunmap() and your new
>>> function? And how is this, having jsut an Arm implementation,
>>> going to compile for x86? Seeing that x86 gets away without this,
>>> may I suggest that you look at the x86 code to see why that is,
>>> and then consider whether the same model makes sense for Arm? And
>>> if it doesn't, check whether the new Arm model would make sense
>>> to also use on x86?
>>>
>>
>> Sorry, I thought acpi_os_unmap_memory is specific for ARM.
>> Just now I checked map_pages_to_xen in arch/x86/mm.c and did not find any place
>> to forbid the modification of a mapping. Maybe clearing mapping before modification
>> is not necessary for X86. Do you think is it OK to add a empty stub function
>> for the other cases except ARM and invoke it after vunmap as following?
>
> No. This is still doing two unmaps when system_state >= SYS_STATE_boot.
> At the very least this need to go in an "else" block to the existing
> if(). There also shouldn't be a blanket empty stub function. Even on
> x86 it would be _better_ (albeit not strictly needed) if the unmap
> indeed zapped the fixmap mappings. And for potential future ports it
> would be outright dangerous to have such an empty stub.
Got it.
I will check how to clear the fixmap on X86.
Thanks!
Best Regards,
Wei
>
> Jan
>
> .
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
prev parent reply other threads:[~2020-01-22 9:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-21 9:49 [Xen-devel] [PATCH] arm/acpi: Add __acpi_unmap_table function for ARM Wei Xu
2020-01-21 10:01 ` Alexandru Stefan ISAILA
2020-01-22 1:51 ` Wei Xu
2020-01-21 11:02 ` Jan Beulich
2020-01-21 11:25 ` Julien Grall
2020-01-22 5:58 ` Wei Xu
2020-01-22 5:57 ` Wei Xu
2020-01-22 8:24 ` Jan Beulich
2020-01-22 9:04 ` Wei Xu [this message]
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=5E28101C.2030405@hisilicon.com \
--to=xuwei5@hisilicon.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=Volodymyr_Babchuk@epam.com \
--cc=andrew.cooper3@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=konrad.wilk@oracle.com \
--cc=linuxarm@huawei.com \
--cc=prime.zeng@hisilicon.com \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=sstabellini@kernel.org \
--cc=wl@xen.org \
--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.