All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Xu <xuwei5@hisilicon.com>
To: Julien Grall <julien@xen.org>, Jan Beulich <jbeulich@suse.com>
Cc: Stefano Stabellini <sstabellini@kernel.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 13:58:46 +0800	[thread overview]
Message-ID: <5E27E496.5080102@hisilicon.com> (raw)
In-Reply-To: <6a003f33-f5ff-c027-f09b-85b80c6accdb@xen.org>

Hi Julien,

On 2020/1/21 19:25, Julien Grall wrote:
> Hi Jan,
> 
> On 21/01/2020 11:02, Jan Beulich wrote:
>> On 21.01.2020 10:49, Wei Xu wrote:
>>> Add __acpi_unmap_table function for ARM and invoke it at acpi_os_unmap_memory
>>> to make sure the related fixmap has been cleared before using it for a
>>> different mapping.
>>
>> How can it possibly be that this is needed for Arm only?
> 
> Let me give some background (I will let Wei dealing with the rest of the patches). On Arm, I made the decision to forbid a mapping replacement in the page-tables code. This means that if you want to re-use the same fixmap, then you need to clear it first.
> 
> The reason for the requirement is quite simple. On Arm, you need to use a break-before-make sequence any time you replace a valid entry by another valid entry (there is a couple of case where it is not needed).
> 
> As the sequence name suggests it, we will have a small window where the virtual address will point to nothing. This may result to an abort if another CPU is accessing the address at the same time.
> 
> In the fixmap case below, this should never happen. But now imagine shattering a superpage...
> 
> So rather than trying to allow in some cases the modification of a mapping, we just forbid for everything but permission changes. This is much simpler to reason and a much saner interface.
> 
> Similarly, I think this is much saner to call have a clear_fixmap() for each set_fixmap().

Thanks to explain!

Best Regards,
Wei

> 
> Cheers,
> 


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2020-01-22  5:59 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 [this message]
2020-01-22  5:57   ` Wei Xu
2020-01-22  8:24     ` Jan Beulich
2020-01-22  9:04       ` Wei Xu

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=5E27E496.5080102@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.