public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: julien.grall@linaro•org (Julien Grall)
To: linux-arm-kernel@lists•infradead.org
Subject: [Xen-devel] [PATCH v2 1/3] xen/arm: introduce XENFEAT_grant_map_11
Date: Tue, 08 Jul 2014 17:53:18 +0100	[thread overview]
Message-ID: <53BC21FE.2000705@linaro.org> (raw)
In-Reply-To: <1404835150.25940.9.camel@kazak.uk.xensource.com>

Hi Ian and Stefano,

On 07/08/2014 04:59 PM, Ian Campbell wrote:
> On Tue, 2014-07-08 at 16:54 +0100, Stefano Stabellini wrote:
>> On Tue, 8 Jul 2014, Ian Campbell wrote:
>>> On Tue, 2014-07-08 at 16:42 +0100, Stefano Stabellini wrote:
>>>> The flag tells us that the hypervisor maps a grant page to guest
>>>> physical address == machine address of the page in addition to the
>>>> normal grant mapping address. It is needed to properly issue cache
>>>> maintenance operation at the completion of a DMA operation involving a
>>>> foreign grant.
>>>>
>>>> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu•citrix.com>
>>>> ---
>>>>  arch/arm/xen/enlighten.c         |    6 ++++++
>>>>  include/xen/interface/features.h |    3 +++
>>>>  2 files changed, 9 insertions(+)
>>>>
>>>> diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c
>>>> index b96723e..ee3135a 100644
>>>> --- a/arch/arm/xen/enlighten.c
>>>> +++ b/arch/arm/xen/enlighten.c
>>>> @@ -262,6 +262,12 @@ static int __init xen_guest_init(void)
>>>>  	xen_domain_type = XEN_HVM_DOMAIN;
>>>>  
>>>>  	xen_setup_features();
>>>> +
>>>> +	if (!xen_feature(XENFEAT_grant_map_11)) {
>>>> +		pr_warn("Please upgrade your Xen.\n"
>>>> +				"If your platform has any non-coherent DMA devices, they won't work properly.\n");
>>>> +	}
>>>
>>> Unfortunately this isn't quite complete. On a system where all devices
>>> are behind an SMMU then we would want to be able to disable the 1:1
>>> workaround, which in turn would imply disabling this feature flag too
>>> (since it is no longer necessary and also impossible to implement in
>>> that case).
>>
>> That is true, but in such a system we would have to tell the kernel that
>> DMAing is safe, so this will turn into:
> 
> Oh right, yes. Good then ;-)

FWIW, I've sent a patch series a couple ago to avoid using swiotlb when
the device is protected (see https://patches.linaro.org/25070/).

I should take time to rework properly and send a new version.

Regards,

-- 
Julien Grall

  reply	other threads:[~2014-07-08 16:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-08 15:40 [PATCH v2 0/3] xen/arm: fix "xen_add_mach_to_phys_entry: cannot add" problem Stefano Stabellini
2014-07-08 15:42 ` [PATCH v2 1/3] xen/arm: introduce XENFEAT_grant_map_11 Stefano Stabellini
2014-07-08 15:49   ` Ian Campbell
2014-07-08 15:54     ` Stefano Stabellini
2014-07-08 15:59       ` Ian Campbell
2014-07-08 16:53         ` Julien Grall [this message]
2014-07-08 16:16   ` David Vrabel
2014-07-08 15:42 ` [PATCH v2 2/3] xen/arm: reimplement xen_dma_unmap_page & friends Stefano Stabellini
2014-07-08 15:42 ` [PATCH v2 3/3] xen/arm: remove mach_to_phys rbtree Stefano Stabellini
2014-07-08 16:05 ` [Xen-devel] [PATCH v2 0/3] xen/arm: fix "xen_add_mach_to_phys_entry: cannot add" problem Konrad Rzeszutek Wilk
2014-07-09 10:30   ` Stefano Stabellini
2014-07-09 13:47     ` Konrad Rzeszutek Wilk
2014-07-09 14:14       ` Stefano Stabellini
2014-07-09 14:31 ` Denis Schneider

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=53BC21FE.2000705@linaro.org \
    --to=julien.grall@linaro$(echo .)org \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox