From: Oleksandr Andrushchenko <andr2000@gmail.com>
To: ian.jackson@eu.citrix.com, Wei Liu <wei.liu2@citrix.com>
Cc: xen-devel@lists.xenproject.org
Subject: Re: Problem with IOMEM and domain reboot
Date: Thu, 1 Feb 2018 09:19:06 +0200 [thread overview]
Message-ID: <64b45379-6ac7-56cd-fbfe-1319990f07e4@gmail.com> (raw)
In-Reply-To: <ebf78aec-dcfd-72d9-dac2-06b29e4a66ae@gmail.com>
Ian, Wei,
could you please take a look at the below?
Thank you,
Oleksandr
On 12/20/2017 06:27 PM, Oleksandr Andrushchenko wrote:
> Hi, all!
>
> While trying to reboot a domain which has iomem configured
> (we are passing through some devices), I found an issue,
> that after domain reboot those iomem's are incorrectly re-mapped,
> e.g. for the configuration snippet below fe960 -> 0.
>
> Part of the domain config I use:
> iomem=[
> "0xfd010,1@0xfd000",
> "fe960,8",
> ]
>
> During domain creation:
> libxl_create.c:210:libxl__domain_build_info_setdefault: iomem gfn
> fd000 start fd010
> libxl_create.c:210:libxl__domain_build_info_setdefault: iomem gfn
> ffffffffffffffff start fe960
>
> which means that for fe960 initial value was set to LIBXL_INVALID_GFN
> and then on domain configuration,
> tools/libxl/libxl_create.c:libxl__domain_build_info_setdefault:
>
> for (i = 0 ; i < b_info->num_iomem; i++)
> if (b_info->iomem[i].gfn == LIBXL_INVALID_GFN)
> b_info->iomem[i].gfn = b_info->iomem[i].start;
>
> made that GFN for fe960 to be set to the correct value.
>
> But during domain reboot I see that
> tools/xl/xl_vmcontrol.c:reload_domain_config
> tries to replicate configuration from the original domain config
> being rebooted, but that leads to iomem's GFN to be set to 0 (if
> configured
> in form [IOMEM_START,NUM_PAGES], but for [IOMEM_START,NUM_PAGES[@GFN]
> it is ok):
>
> iomem gfn fd000 start fd010
> iomem gfn 0 start fe960
>
> Thus, further domain restart procedure leads to invalid mapping, e.g.
> fe960 -> 0.
>
> I created a patch which allowed me to reboot the domain, but I would love
> to hear comments on what would be the proper fix.
>
> Thank you,
> Oleksandr
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2018-02-01 7:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-20 16:27 Problem with IOMEM and domain reboot Oleksandr Andrushchenko
2018-02-01 7:19 ` Oleksandr Andrushchenko [this message]
2018-02-06 12:36 ` Wei Liu
2018-02-06 12:44 ` Oleksandr Andrushchenko
2018-02-06 12:52 ` Wei Liu
2018-02-07 12:14 ` Oleksandr Andrushchenko
2018-02-12 17:22 ` Oleksandr Grytsov
2018-02-13 12:24 ` Wei Liu
2019-01-23 16:28 ` Andrii Anisov
2019-01-24 16:26 ` Wei Liu
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=64b45379-6ac7-56cd-fbfe-1319990f07e4@gmail.com \
--to=andr2000@gmail.com \
--cc=ian.jackson@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).