All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleksandr <olekstysh@gmail.com>
To: Paul Durrant <Paul.Durrant@citrix.com>,
	'Jan Beulich' <jbeulich@suse.com>
Cc: Petre Pircalabu <ppircalabu@bitdefender.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	Wei Liu <wl@xen.org>,
	KonradRzeszutek Wilk <konrad.wilk@oracle.com>,
	Andrew Cooper <Andrew.Cooper3@citrix.com>,
	"Tim \(Xen.org\)" <tim@xen.org>,
	George Dunlap <George.Dunlap@citrix.com>,
	Julien Grall <julien.grall@arm.com>,
	Tamas K Lengyel <tamas@tklengyel.com>,
	David Scott <dave@recoil.org>,
	Anthony Perard <anthony.perard@citrix.com>,
	Ian Jackson <Ian.Jackson@citrix.com>,
	Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>,
	Roger Pau Monne <roger.pau@citrix.com>
Subject: Re: [Xen-devel] [PATCH v13 0/4] add per-domain IOMMU control
Date: Wed, 25 Sep 2019 19:24:10 +0300	[thread overview]
Message-ID: <5735846b-1a52-3260-39bd-e393c87dfb64@gmail.com> (raw)
In-Reply-To: <94de3adfac564f8e920bd04b3cf54734@AMSPEX02CL03.citrite.net>


On 25.09.19 19:10, Paul Durrant wrote:

Hi Paul

>> -----Original Message-----
>> From: Oleksandr <olekstysh@gmail.com>
>> Sent: 25 September 2019 16:50
>> To: Paul Durrant <Paul.Durrant@citrix.com>; 'Jan Beulich' <jbeulich@suse.com>
>> Cc: Petre Pircalabu <ppircalabu@bitdefender.com>; Stefano Stabellini <sstabellini@kernel.org>; Wei Liu
>> <wl@xen.org>; KonradRzeszutek Wilk <konrad.wilk@oracle.com>; Andrew Cooper
>> <Andrew.Cooper3@citrix.com>; David Scott <dave@recoil.org>; Tim (Xen.org) <tim@xen.org>; George Dunlap
>> <George.Dunlap@citrix.com>; Tamas K Lengyel <tamas@tklengyel.com>; Ian Jackson
>> <Ian.Jackson@citrix.com>; Anthony Perard <anthony.perard@citrix.com>; xen-devel@lists.xenproject.org;
>> Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>; Roger Pau Monne <roger.pau@citrix.com>; Julien Grall
>> <julien.grall@arm.com>
>> Subject: Re: [Xen-devel] [PATCH v13 0/4] add per-domain IOMMU control
>>
>>
>> [CC Julien]
>>
>>
>> Hi Paul
>>
>> I may mistake, but looks like
>>
>> 80ff3d338dc93260b41ffeeebb0f852c2edef9ce iommu: tidy up
>> iommu_use_hap_pt() and need_iommu_pt_sync() macros
>>
>> triggers ASSERT_UNREACHABLE on Arm if no IOMMU has been found (I built
>> with my platform's IOMMU driver disabled: # CONFIG_IPMMU_VMSA is not set) .
>>
>> So, iommu_setup() calls clear_iommu_hap_pt_share() with
>> iommu_hap_pt_share being set (CONFIG_IOMMU_FORCE_PT_SHARE=y) which,
>> actually, triggers ASSERT.
>>
> Here a minimal patch, leaving 'force pt share' in place. Does this avoid the problem?
>
> ---8<---
> diff --git a/xen/common/sysctl.c b/xen/common/sysctl.c
> index e8763c7fdf..f88a285e7f 100644
> --- a/xen/common/sysctl.c
> +++ b/xen/common/sysctl.c
> @@ -268,9 +268,11 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) u_sysctl)
>           pi->max_mfn = get_upper_mfn_bound();
>           arch_do_physinfo(pi);
>           if ( iommu_enabled )
> +        {
>               pi->capabilities |= XEN_SYSCTL_PHYSCAP_directio;
> -        if ( iommu_hap_pt_share )
> -            pi->capabilities |= XEN_SYSCTL_PHYSCAP_iommu_hap_pt_share;
> +            if ( iommu_hap_pt_share )
> +                pi->capabilities |= XEN_SYSCTL_PHYSCAP_iommu_hap_pt_share;
> +        }
>
>           if ( copy_to_guest(u_sysctl, op, 1) )
>               ret = -EFAULT;
> diff --git a/xen/include/xen/iommu.h b/xen/include/xen/iommu.h
> index 7c3003f3f1..6a10a24128 100644
> --- a/xen/include/xen/iommu.h
> +++ b/xen/include/xen/iommu.h
> @@ -68,8 +68,6 @@ static inline void clear_iommu_hap_pt_share(void)
>   {
>   #ifndef iommu_hap_pt_share
>       iommu_hap_pt_share = false;
> -#elif iommu_hap_pt_share
> -    ASSERT_UNREACHABLE();
>   #endif
>   }
> ---8<---
>
>    Paul

Thank you for the patch, but I need some time to check it (now I have 
some troubles with starting guest VM). I will inform you once I check.


-- 
Regards,

Oleksandr Tyshchenko


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

  reply	other threads:[~2019-09-25 16:27 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-18 10:41 [Xen-devel] [PATCH v13 0/4] add per-domain IOMMU control Paul Durrant
2019-09-18 10:41 ` [Xen-devel] [PATCH v13 1/4] remove late (on-demand) construction of IOMMU page tables Paul Durrant
2019-09-25  9:00   ` Paul Durrant
2019-09-25  9:16   ` Wei Liu
2019-09-18 10:41 ` [Xen-devel] [PATCH v13 2/4] iommu: tidy up iommu_use_hap_pt() and need_iommu_pt_sync() macros Paul Durrant
2019-09-18 10:41 ` [Xen-devel] [PATCH v13 3/4] tools/ocaml: abi check: Cope with consecutive relevant enums Paul Durrant
2019-09-18 10:41 ` [Xen-devel] [PATCH v13 4/4] introduce a 'passthrough' configuration option to xl.cfg Paul Durrant
2019-09-18 15:20   ` Anthony PERARD
2019-09-25  8:40 ` [Xen-devel] [PATCH v13 0/4] add per-domain IOMMU control Paul Durrant
2019-09-25  8:50   ` Jan Beulich
2019-09-25  8:56     ` Paul Durrant
2019-09-25 15:49       ` Oleksandr
2019-09-25 15:55         ` Paul Durrant
2019-09-25 16:03         ` Paul Durrant
2019-09-25 16:04           ` Paul Durrant
2019-09-25 16:14           ` Oleksandr
2019-09-25 16:10         ` Paul Durrant
2019-09-25 16:24           ` Oleksandr [this message]
2019-09-25 18:07             ` Oleksandr
2019-09-26  8:32               ` Paul Durrant
2019-09-25 21:34           ` Julien Grall
2019-09-26  8:39             ` Paul Durrant
2019-09-26  9:13               ` Julien Grall
2019-09-26  9:17                 ` Paul Durrant
2019-09-26  9:26                   ` Julien Grall
2019-09-26  9:22               ` Oleksandr

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=5735846b-1a52-3260-39bd-e393c87dfb64@gmail.com \
    --to=olekstysh@gmail.com \
    --cc=Andrew.Cooper3@citrix.com \
    --cc=George.Dunlap@citrix.com \
    --cc=Ian.Jackson@citrix.com \
    --cc=Paul.Durrant@citrix.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=anthony.perard@citrix.com \
    --cc=dave@recoil.org \
    --cc=jbeulich@suse.com \
    --cc=julien.grall@arm.com \
    --cc=konrad.wilk@oracle.com \
    --cc=ppircalabu@bitdefender.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=tamas@tklengyel.com \
    --cc=tim@xen.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.