From: "Chen, Tiejun" <tiejun.chen@intel.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: yang.z.zhang@intel.com, kevin.tian@intel.com, xen-devel@lists.xen.org
Subject: Re: [v6][PATCH 2/2] xen:vtd: missing RMRR mapping while share EPT
Date: Fri, 19 Sep 2014 16:30:15 +0800 [thread overview]
Message-ID: <541BE997.7080808@intel.com> (raw)
In-Reply-To: <541C00210200007800036716@mail.emea.novell.com>
On 2014/9/19 16:06, Jan Beulich wrote:
>>>> On 19.09.14 at 09:40, <tiejun.chen@intel.com> wrote:
>> On 2014/9/19 15:10, Jan Beulich wrote:
>>>>>> On 19.09.14 at 08:50, <tiejun.chen@intel.com> wrote:
>>>> On 2014/9/19 14:26, Jan Beulich wrote:
>>>>>>>> On 19.09.14 at 03:20, <tiejun.chen@intel.com> wrote:
>>>>>> (XEN) [VT-D]dmar.c:807: found ACPI_DMAR_RMRR:
>>>>>> (XEN) [VT-D]dmar.c:383: endpoint: 0000:00:14.0
>>>>>> (XEN) [VT-D]dmar.c:676: RMRR region: base_addr ab805000 end_address
>>>>>> ab818fff
>>>>>> (XEN) [VT-D]dmar.c:807: found ACPI_DMAR_RMRR:
>>>>>> (XEN) [VT-D]dmar.c:383: endpoint: 0000:00:02.0
>>>>>> (XEN) [VT-D]dmar.c:676: RMRR region: base_addr ad000000 end_address
>>>>>> af7fffff
>>>>>
>>>>> So how does passing through either of these work for a guest with
>>>>> 4Gb or more of memory assigned with just the original 2 patches
>>>>> (and with shared page tables)? There ought to be a collision detected
>>>>> when trying to do the identity mapping.
>>>>
>>>> Do you mean this point, mfn_valid(mfn)? If yes, I remember we made
>>>> agreement previously about how to cover three cases including this scenario:
>>>>
>>>> "
>>>> #1: !mfn_valid(mfn)
>>>>
>>>> We can create those mapping safely.
>>>>
>>>> #2: mfn_x(mfn) == gfn && p2mt == p2m_mmio_direct && a == p2m_access_rw
>>>>
>>>> We already have these matched mappings.
>>>>
>>>> #3: Others
>>>>
>>>> Return with that waring message: "Cannot identity map d%d:%lx, already
>>>> mapped to %lx but mismatch.\n"
>>>> "
>>>> And this is just as we did in patch #1:
>>>>
>>>> +
>>>> + if ( !mfn_valid(mfn) )
>>>> + ret = p2m_set_entry(p2m, gfn, _mfn(gfn), PAGE_ORDER_4K,
>>>> p2m_mmio_direct,
>>>> + p2m_access_rw);
>>>> + else if ( mfn_x(mfn) == gfn &&
>>>> + p2mt == p2m_mmio_direct &&
>>>> + a == p2m_access_rw )
>>>> + ret = 0;
>>>> + else
>>>> + printk(XENLOG_G_WARNING
>>>> + "Cannot identity map d%d:%lx, already mapped to %lx.\n",
>>>> + d->domain_id, gfn, mfn_x(mfn));
>>>
>>> Right, but the important point is that when the warning gets printed
>>> -EBUSY gets returned, i.e. in the end the device assignment is to fail.
>>> Are you seeing the warning when creating a large enough guest? If
>>
>> My platform just own 4G memory, so after I try to set 'memory=15360' in
>> domu.cfg, I can't boot such a VM:
>>
>> # xl cr domu.cfg
>> Parsing config from domu.cfg
>> libxl: error: libxl.c:4202:libxl_set_memory_target: new target 0 for
>> dom0 is below the minimum threshhold
>> ...
>> failed to free memory for the domain
>>
>>> not - can you explain why you don't see it (as I can't)?
>>
>> Do you know exactly how to test this case as you expect here? Then I can
>> take a further look to step on your question. Or I guess you are hinting
>> something wrong should be happened but I never realize that previously.
>
> It should suffice to give 3 Gb (or event slightly less) of memory to
> the DomU (if your Dom0 can hopefully tolerate running with just 1Gb).
Yes. So I can't produce that real case of conflict with those existing
RMRR in my platform.
I will have to try seeking a appropriate machine.
Thanks
Tiejun
>
> Jan
>
>
>
next prev parent reply other threads:[~2014-09-19 8:30 UTC|newest]
Thread overview: 83+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-30 1:36 [v6][PATCH 1/2] xen:x86:mm:p2m: introduce set_identity_p2m_entry Tiejun Chen
2014-07-30 1:36 ` [v6][PATCH 2/2] xen:vtd: missing RMRR mapping while share EPT Tiejun Chen
2014-07-30 8:36 ` Jan Beulich
2014-07-30 8:59 ` Chen, Tiejun
2014-07-30 9:23 ` Jan Beulich
2014-07-30 9:40 ` Chen, Tiejun
2014-07-30 10:25 ` Jan Beulich
2014-07-30 10:40 ` Chen, Tiejun
2014-07-30 10:47 ` Jan Beulich
2014-07-31 9:45 ` Chen, Tiejun
2014-07-31 22:44 ` Tian, Kevin
2014-08-01 2:07 ` Chen, Tiejun
2014-08-01 6:51 ` Jan Beulich
2014-08-01 7:10 ` Chen, Tiejun
2014-08-01 7:21 ` Jan Beulich
2014-08-01 9:50 ` Chen, Tiejun
2014-08-01 13:47 ` Jan Beulich
2014-08-01 23:22 ` Tian, Kevin
2014-08-04 7:23 ` Jan Beulich
2014-08-03 8:04 ` Chen, Tiejun
2014-08-04 7:31 ` Jan Beulich
2014-08-07 10:59 ` Chen, Tiejun
2014-09-03 9:41 ` Chen, Tiejun
2014-09-03 9:54 ` Jan Beulich
2014-09-12 6:38 ` Chen, Tiejun
2014-09-12 7:19 ` Jan Beulich
2014-09-12 8:27 ` Chen, Tiejun
2014-09-12 16:59 ` Lars Kurth
2014-09-12 21:26 ` Tim Deegan
2014-09-16 1:24 ` Chen, Tiejun
2014-09-17 1:01 ` Chen, Tiejun
2014-09-17 2:42 ` Tian, Kevin
2014-09-17 9:21 ` Jan Beulich
2014-09-18 2:02 ` Zhang, Yang Z
2014-09-18 7:24 ` Jan Beulich
2014-09-18 7:41 ` Zhang, Yang Z
2014-09-18 8:12 ` Jan Beulich
2014-09-17 9:18 ` Jan Beulich
2014-09-18 9:09 ` Jan Beulich
2014-09-19 1:20 ` Chen, Tiejun
2014-09-19 6:26 ` Jan Beulich
2014-09-19 6:50 ` Chen, Tiejun
2014-09-19 7:10 ` Jan Beulich
2014-09-19 7:40 ` Chen, Tiejun
2014-09-19 8:06 ` Jan Beulich
2014-09-19 8:30 ` Chen, Tiejun [this message]
2014-09-19 9:26 ` Jan Beulich
2014-09-19 2:43 ` Zhang, Yang Z
2014-09-19 6:33 ` Jan Beulich
2014-07-31 22:29 ` [v6][PATCH 1/2] xen:x86:mm:p2m: introduce set_identity_p2m_entry Tian, Kevin
2014-08-01 2:25 ` Chen, Tiejun
2014-08-01 6:43 ` Jan Beulich
2014-08-01 6:42 ` Jan Beulich
2014-08-01 15:56 ` Tian, Kevin
[not found] <541FB087.4080008@intel.com>
2014-09-22 5:46 ` [v6][PATCH 2/2] xen:vtd: missing RMRR mapping while share EPT Chen, Tiejun
2014-09-22 8:53 ` Jan Beulich
2014-09-22 9:05 ` Chen, Tiejun
2014-09-22 10:36 ` Jan Beulich
2014-09-23 1:56 ` Chen, Tiejun
2014-09-23 12:14 ` Jan Beulich
2014-09-24 0:28 ` Tian, Kevin
2014-09-24 7:54 ` Jan Beulich
2014-09-24 8:23 ` Zhang, Yang Z
2014-09-24 8:35 ` Chen, Tiejun
2014-09-24 8:47 ` Jan Beulich
2014-09-24 8:53 ` Chen, Tiejun
2014-09-24 9:13 ` Jan Beulich
2014-09-25 2:30 ` Zhang, Yang Z
2014-09-25 8:11 ` Jan Beulich
2014-09-26 1:24 ` Zhang, Yang Z
2014-09-26 6:38 ` Jan Beulich
2014-09-30 3:49 ` Zhang, Yang Z
2014-09-30 7:07 ` Jan Beulich
2014-10-02 10:29 ` Tim Deegan
2014-10-03 21:15 ` Tian, Kevin
2014-09-24 8:44 ` Jan Beulich
2014-09-25 1:53 ` Zhang, Yang Z
2014-09-25 8:08 ` Jan Beulich
2014-09-25 14:12 ` Konrad Rzeszutek Wilk
2014-09-25 15:14 ` Jan Beulich
2014-09-28 3:11 ` Chen, Tiejun
2014-09-30 3:51 ` Zhang, Yang Z
2014-09-30 7:09 ` Jan Beulich
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=541BE997.7080808@intel.com \
--to=tiejun.chen@intel.com \
--cc=JBeulich@suse.com \
--cc=kevin.tian@intel.com \
--cc=xen-devel@lists.xen.org \
--cc=yang.z.zhang@intel.com \
/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).