From: Paul Durrant <Paul.Durrant@citrix.com>
To: 'Oleksandr' <olekstysh@gmail.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 16:10:11 +0000 [thread overview]
Message-ID: <94de3adfac564f8e920bd04b3cf54734@AMSPEX02CL03.citrite.net> (raw)
In-Reply-To: <7d50ae35-2642-7fe5-89c7-c4ee09f263d0@gmail.com>
> -----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
> ...
>
>
> (XEN) Assertion 'unreachable' failed at
> ...ild-workspace/build/xen/xen/include/xen/iommu.h:72
> (XEN) ----[ Xen-4.13-unstable arm64 debug=y Not tainted ]----
> (XEN) CPU: 0
> (XEN) PC: 00000000002b3ae0 iommu_setup+0xa0/0x18c
> (XEN) LR: 00000000002b3a8c
> (XEN) SP: 00000000002f7dc0
> (XEN) CPSR: a0000249 MODE:64-bit EL2h (Hypervisor, handler)
> (XEN) X0: 00000000002a7000 X1: 0000000000000000 X2: 2c736173656e6572
> (XEN) X3: 0000000000000002 X4: 0000000000000001 X5: 0000000000000000
> (XEN) X6: 0000000000000080 X7: 2b726072646d6471 X8: 7f7f7f7f7f7f7f7f
> (XEN) X9: ff65685e6c6f7275 X10: 7f7f7f7f7f7f7f7f X11: 0101010101010101
> (XEN) X12: 0000000000000038 X13: 0000000000280910 X14: 0000000000000020
> (XEN) X15: 0000000000000000 X16: 00000000002a7000 X17: 00000000002a7000
> (XEN) X18: 00000000002a7000 X19: 0000000000000000 X20: 00000000ffffffed
> (XEN) X21: 00000000002a6380 X22: 0000000000335430 X23: 0000000000000002
> (XEN) X24: 000000000029b1f0 X25: 00000000002d83d0 X26: 0000000048000000
> (XEN) X27: 00000000c0000000 X28: 0000000000000001 FP: 00000000002f7dc0
> (XEN)
> (XEN) VTCR_EL2: 80000000
> (XEN) VTTBR_EL2: 0000000000000000
> (XEN)
> (XEN) SCTLR_EL2: 30cd183d
> (XEN) HCR_EL2: 0000000000000038
> (XEN) TTBR0_EL2: 00000000781b4000
> (XEN)
> (XEN) ESR_EL2: f2000001
> (XEN) HPFAR_EL2: 0000000000000000
> (XEN) FAR_EL2: 0000000000000000
> (XEN)
> (XEN) Xen stack trace from sp=00000000002f7dc0:
> (XEN) 00000000002f7de0 00000000002bdd94 0000000000000002 0000000000000002
> (XEN) 00000000bfe0b660 00000000002001b4 0000000078080000 0000000077e80000
> (XEN) 0000000048000000 0000000000000000 0000000000400000 0000000000000003
> (XEN) 0000000000000001 0000000000000000 0000000078080000 0000000048080040
> (XEN) 0000000000000000 000000000000f080 0000000048000000 0000000078000000
> (XEN) 00000000002d83c0 00000000002aa440 0000000000000000 0000000000000000
> (XEN) 0000000000000000 0000000300000000 0000000000000000 00000040ffffffff
> (XEN) 0000000000000400 0000000000000000 0000000000000000 0000000000000000
> (XEN) 0000000000000000 0000000000000000 0000000000000000 0000000000000000
> (XEN) 0000000000000000 0000000000000000 0000000000000000 0000000000000000
> (XEN) 0000000000000000 0000000000000000 0000000000000000 0000000000000000
> (XEN) 0000000000000000 0000000000000000 0000000000000000 0000000000000000
> (XEN) 0000000000000000 0000000000000000 0000000000000000 0000000000000000
> (XEN) 0000000000000000 0000000000000000 0000000000000000 0000000000000000
> (XEN) 0000000000000000 0000000000000000 0000000000000000 0000000000000000
> (XEN) 0000000000000000 0000000000000000 0000000000000000 0000000000000000
> (XEN) 0000000000000000 0000000000000000 0000000000000000 0000000000000000
> (XEN) 0000000000000000 0000000000000000 0000000000000000 0000000000000000
> (XEN) Xen call trace:
> (XEN) [<00000000002b3ae0>] iommu_setup+0xa0/0x18c (PC)
> (XEN) [<00000000002b3a8c>] iommu_setup+0x4c/0x18c (LR)
> (XEN) [<00000000002bdd94>] start_xen+0xaa0/0xc7c
> (XEN) [<00000000002001b4>] arm64/head.o#primary_switched+0xc/0x2c
> (XEN)
> (XEN)
> (XEN) ****************************************
> (XEN) Panic on CPU 0:
> (XEN) Assertion 'unreachable' failed at
> ...ild-workspace/build/xen/xen/include/xen/iommu.h:72
> (XEN) ****************************************
> (XEN)
>
>
> --
> Regards,
>
> Oleksandr Tyshchenko
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2019-09-25 16:10 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 [this message]
2019-09-25 16:24 ` Oleksandr
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=94de3adfac564f8e920bd04b3cf54734@AMSPEX02CL03.citrite.net \
--to=paul.durrant@citrix.com \
--cc=Andrew.Cooper3@citrix.com \
--cc=George.Dunlap@citrix.com \
--cc=Ian.Jackson@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=olekstysh@gmail.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.