[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Having a DOM-U guest with 1:1 mapping in the second stage MMU.


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Andrei Cherechesu <andrei.cherechesu@xxxxxxx>
  • Date: Wed, 12 Feb 2020 13:45:44 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UKmJYmrQev6JPLBLt31ENZtyjojok8ftRYKsGlgRkAg=; b=GHuX00X54cOQNw7DhNjzlHnIqrzAqJF4JdE+BTuaEyxYwrCv/EUIVymHGw7rG5nN+BFUIhpvtZfIb+EA01LWZntBblYVj3NWg43co2tF7XcGxZIr21KMYWcjsAL+WwFLhabZBJL4UPk5KWrpjQ58vDZqA2UUrhKftFEDRN3zR2Mefrex9JRtgPsVLt0Y4Bu2ROFW32Ui47UtYyTzGdRziGPpQ2dAlyUagiqvY84nkBn3hRDUZNdmHYpXeTggIX/6zVtYurl00zyO61DgKk9XKqclcTqgCHd1K0U3bWD/N15o/Ra7FfBfolRBc9NVtIt4rao2KFU+Wc2lMYttoGF4mw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c/EcSMbeBlPI25sC3DTJ6Ddc/V3QmE8jhnmtN0NZsaBb7YjrcEs5/R4FL+nKj6oZ1Vw85rra3t1IVqGAzdGG9ys+ecCD1L5K8aZ/j7X/axpjptsa52AQEHB5lyftuOFCyxtvH1kEENWIXphurcUYjCa5DAyKp1djfc/+AzCtXpnhMpHZvN9KV0aghqadtL9D0eNO54qyjjTToIdUsB2XoYY5J20lW0TPDosF+iVjTp+o5c2wAkkLM8B+fuOnAUmJYoLNdFjuN1ldlYvGzwDBmfvfuIZL0719sRKfXtEeLYc6ma/jsQjKkjvqzN3ACbOfXjpmDxDslCUocUb/kVMRcQ==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=andrei.cherechesu@xxxxxxx;
  • Cc: Jorge Pereira <jorge.pereira@xxxxxxx>, Julien Grall <julien@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 12 Feb 2020 13:45:50 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHV4aq5xQnQHfhMdkCO+1lU3LD8+Q==
  • Thread-topic: [Xen-devel] Having a DOM-U guest with 1:1 mapping in the second stage MMU.

[[ Sorry. Needed to send another mail because I forgot to add xen-devel lists to CC. ]]

 

Hello,

 

I applied your direct-map patch, Stefano, on top of RELEASE-4.13.0

Xen.

 

I also took your advice and used the Imagebuilder tool to setup my

u-boot environment. I modified the tool to allow SDCard booting and

tweaked the parameters a little to fit our platforms, also introducing

support to add “direct-map” parameter in specific /chosen/DomU node

and “xen,passthrough” in the host dts. The tool is very helpful and

allows me to quickly change the u-boot environment without manually

entering all the fdt formatting commands.

 

The dom0less booting is successful, however, when I try to passthrough

any device (I tried with ethernet card and uSDHC) I get a kernel panic

in DomU when it tries to probe the driver, because of an unhandled

fault:

(XEN) DOM1: [    3.883482] sdhci: Secure Digital Host Controller Interface driver

(XEN) DOM1: [    3.891021] sdhci: Copyright(c) Pierre Ossman

(XEN) DOM1: [    3.896389] sdhci-pltfm: SDHCI platform and OF driver helper

(XEN) DOM1: [    3.903298] Unhandled fault at 0xffffff800800d048

(XEN) DOM1: [    3.909021] Mem abort info:

(XEN) DOM1: [    3.912863]   ESR = 0x96000000

(XEN) DOM1: [    3.917019]   Exception class = DABT (current EL), IL = 32 bits

(XEN) DOM1: [    3.924115]   SET = 0, FnV = 0

(XEN) DOM1: [    3.928206]   EA = 0, S1PTW = 0

(XEN) DOM1: [    3.932457] Data abort info:

(XEN) DOM1: [    3.936514]   ISV = 0, ISS = 0x00000000

(XEN) DOM1: [    3.941398]   CM = 0, WnR = 0

(XEN) DOM1: [    3.945481] swapper pgtable: 4k pages, 39-bit VAs, pgdp = (____ptrval____)

(XEN) DOM1: [    3.953532] [ffffff800800d048] pgd=00000000bfffe803, pud=00000000bfffe803, pmd=00000000bfffd803, pte=00e80000402f0f07

(XEN) DOM1: [    3.965278] Internal error: ttbr address size fault: 96000000 [#1] PREEMPT SMP

(XEN) DOM1: [    3.973546] Modules linked in:

(XEN) DOM1: [    3.977709] Process swapper/0 (pid: 1, stack limit = 0x(____ptrval____))

(XEN) DOM1: [    3.985525] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.19.59-rt24+g00334f2 #1

(XEN) DOM1: [    3.993855] pstate: 60000005 (nZCv daif -PAN -UAO)

(XEN) DOM1: [    3.999755] pc : 0xffffff80083ac864

(XEN) DOM1: [    4.004354] lr : 0xffffff80083ac810

(XEN) DOM1: [    4.008955] sp : ffffff800800bba0

(XEN) DOM1: [    4.013382] x29: ffffff800800bba0 x28: 0000000000000000

(XEN) DOM1: [    4.019805] x27: ffffff800864f068 x26: ffffff80086ba000

(XEN) DOM1: [    4.026228] x25: ffffffc031564980 x24: ffffff800856e0c0

(XEN) DOM1: [    4.032651] x23: ffffffc03e8eec00 x22: ffffffc03e8eec10

(XEN) DOM1: [    4.039074] x21: ffffffc03e8bf500 x20: ffffffc03e8bf800

(XEN) DOM1: [    4.045497] x19: 0000000000000000 x18: ffffffffffffffff

(XEN) DOM1: [    4.051921] x17: 0000000000000000 x16: 0000000000000000

(XEN) DOM1: [    4.058344] x15: ffffff8008678548 x14: ffffffffffffffff

(XEN) DOM1: [    4.064767] x13: 0000000000000018 x12: 0101010101010101

(XEN) DOM1: [    4.071190] x11: 0000000000000020 x10: 0101010101010101

(XEN) DOM1: [    4.077613] x9 : 0000000000000000 x8 : ffffffc031564c00

(XEN) DOM1: [    4.084036] x7 : 0000000000000000 x6 : 000000000000003f

(XEN) DOM1: [    4.090459] x5 : 0000000000000002 x4 : ffffffc03e83b4c0

(XEN) DOM1: [    4.096883] x3 : 0000000000000000 x2 : 0000000000000000

(XEN) DOM1: [    4.103306] x1 : ffffffc03e8bf000 x0 : ffffff800800d048

(XEN) DOM1: [    4.109729] Call trace:

(XEN) DOM1: [    4.113290]  0xffffff80083ac864

(XEN) DOM1: [    4.117541]  0xffffff800832e3b8

(XEN) DOM1: [    4.121795]  0xffffff800832c49c

(XEN) DOM1: [    4.126047]  0xffffff800832c6bc

(XEN) DOM1: [    4.130301]  0xffffff800832c808

(XEN) DOM1: [    4.134554]  0xffffff800832a208

(XEN) DOM1: [    4.138807]  0xffffff800832bd38

(XEN) DOM1: [    4.143060]  0xffffff800832b5d8

(XEN) DOM1: [    4.147314]  0xffffff800832d1f0

(XEN) DOM1: [    4.151567]  0xffffff800832e318

(XEN) DOM1: [    4.155820]  0xffffff800861d5f8

(XEN) DOM1: [    4.160073]  0xffffff800808397c

(XEN) DOM1: [    4.164326]  0xffffff8008600db4

(XEN) DOM1: [    4.168580]  0xffffff80085078c0

(XEN) DOM1: [    4.172833]  0xffffff8008084c30

(XEN) DOM1: [    4.177091] Code: b9000ea0 d5033e9f f9400ea0 91012000 (b900001f)

(XEN) DOM1: [    4.184298] ---[ end trace 7dc5f6b878cccbfa ]---

(XEN) DOM1: [    4.191546] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

 

I uploaded on pastebin.com the u-boot env settings [0], my device

passthrough partial dts [1], and the whole log of boot messages

from xen, Dom0 and DomU [2]. I also modified the guest address

layout and mapped the PL011 UART and GICv3 addresses to match

the physical ones, as well as setting the GUEST_GNTTAB_BASE and

GUEST_MAGIC_BASE to addresses before our board's RAM start address.

I updated the GUEST_RAM0_BASE and GUEST_RAM0_SIZE to match the

physical ones.

 

Maybe you could check if I did anything wrong, because I couldn't

figure it out.

 

[0] https://pastebin.com/As6PgVFf

[1] https://pastebin.com/j0NS4x5Z

[2] https://pastebin.com/TaZR8pii

 

Thank you once again for your support,

Andrei

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.