From: Yu Zhang <yu.c.zhang@linux.intel.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Kevin Tian <kevin.tian@intel.com>,
George Dunlap <george.dunlap@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
xen-devel@lists.xen.org, Paul Durrant <paul.durrant@citrix.com>,
zhiyuan.lv@intel.com, Jun Nakajima <jun.nakajima@intel.com>
Subject: Re: [PATCH v7 4/5] ix86/ioreq server: Asynchronously reset outstanding p2m_ioreq_server entries.
Date: Sat, 11 Mar 2017 16:42:12 +0800 [thread overview]
Message-ID: <58C3B864.40101@linux.intel.com> (raw)
In-Reply-To: <58C2DC7D0200007800142097@prv-mh.provo.novell.com>
On 3/11/2017 12:03 AM, Jan Beulich wrote:
>>>> On 08.03.17 at 16:33, <yu.c.zhang@linux.intel.com> wrote:
>> --- a/xen/arch/x86/mm/p2m.c
>> +++ b/xen/arch/x86/mm/p2m.c
>> @@ -954,6 +954,26 @@ int p2m_change_type_one(struct domain *d, unsigned long gfn,
>> p2m->default_access)
>> : -EBUSY;
>>
>> + if ( !rc )
>> + {
>> + switch ( nt )
>> + {
>> + case p2m_ram_rw:
>> + if ( ot == p2m_ioreq_server )
>> + {
>> + p2m->ioreq.entry_count--;
>> + ASSERT(p2m->ioreq.entry_count >= 0);
>> + }
>> + break;
>> + case p2m_ioreq_server:
>> + if ( ot == p2m_ram_rw )
>> + p2m->ioreq.entry_count++;
> I don't think the conditional is needed here. If anything it should be
> an ASSERT() imo, as other transitions to p2m_ioreq_server should
> not be allowed.
Thanks, Jan. I'll use ASSERT.
> But there's a wider understanding issue I'm having here: What is
> an "entry" here? Commonly I would assume this to refer to an
> individual (4k) page, but it looks like you really mean table entry,
> i.e. possibly representing a 2M or 1G page.
Well, it should be an entry pointing to a 4K page(only).
For p2m_ioreq_server, we shall not meet huge page. Because they are
changed from p2m_ram_rw pages
in set_mem_type() -> p2m_change_type_one(), which calls p2m_set_entry()
with PAGE_ORDER_4K specified.
Thanks
Yu
> Jan
>
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-03-11 8:42 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-08 15:33 [PATCH v7 0/5] x86/ioreq server: Introduce HVMMEM_ioreq_server mem type Yu Zhang
2017-03-08 15:33 ` [PATCH v7 1/5] x86/ioreq server: Release the p2m lock after mmio is handled Yu Zhang
2017-03-08 15:33 ` [PATCH v7 2/5] x86/ioreq server: Add DMOP to map guest ram with p2m_ioreq_server to an ioreq server Yu Zhang
2017-03-10 15:29 ` Jan Beulich
2017-03-11 8:42 ` Yu Zhang
2017-03-13 11:20 ` Jan Beulich
2017-03-14 7:28 ` Yu Zhang
2017-03-14 9:40 ` Paul Durrant
2017-03-14 9:52 ` Yu Zhang
2017-03-14 10:40 ` Paul Durrant
2017-03-14 12:03 ` Yu Zhang
2017-03-14 13:10 ` Jan Beulich
2017-03-14 13:28 ` Yu Zhang
2017-03-14 10:26 ` Jan Beulich
2017-03-08 15:33 ` [PATCH v7 3/5] x86/ioreq server: Handle read-modify-write cases for p2m_ioreq_server pages Yu Zhang
2017-03-10 15:33 ` Jan Beulich
2017-03-11 8:42 ` Yu Zhang
2017-03-13 11:22 ` Jan Beulich
2017-03-14 7:28 ` Yu Zhang
2017-03-08 15:33 ` [PATCH v7 4/5] ix86/ioreq server: Asynchronously reset outstanding p2m_ioreq_server entries Yu Zhang
2017-03-10 16:03 ` Jan Beulich
2017-03-11 8:42 ` Yu Zhang [this message]
2017-03-13 11:24 ` Jan Beulich
2017-03-14 7:42 ` Yu Zhang
2017-03-14 10:49 ` Jan Beulich
2017-03-14 12:18 ` Yu Zhang
2017-03-14 13:11 ` Jan Beulich
2017-03-14 13:29 ` Yu Zhang
2017-03-08 15:33 ` [PATCH v7 5/5] x86/ioreq server: Synchronously reset outstanding p2m_ioreq_server entries when an ioreq server unmaps Yu Zhang
2017-03-10 16:17 ` Jan Beulich
2017-03-11 8:42 ` Yu Zhang
2017-03-13 11:24 ` Jan Beulich
2017-03-10 16:59 ` Andrew Cooper
2017-03-11 8:42 ` Yu Zhang
2017-03-13 11:32 ` Jan Beulich
2017-03-14 7:42 ` Yu Zhang
2017-03-14 10:51 ` Jan Beulich
2017-03-14 12:22 ` Yu Zhang
2017-03-14 13:12 ` Jan Beulich
2017-03-14 13:29 ` Yu Zhang
-- strict thread matches above, loose matches on Subject: below --
2017-03-08 13:32 [PATCH v7 0/5] x86/ioreq server: Introduce HVMMEM_ioreq_server mem type Yu Zhang
2017-03-08 13:32 ` [PATCH v7 4/5] ix86/ioreq server: Asynchronously reset outstanding p2m_ioreq_server entries Yu Zhang
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=58C3B864.40101@linux.intel.com \
--to=yu.c.zhang@linux.intel.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=george.dunlap@eu.citrix.com \
--cc=jun.nakajima@intel.com \
--cc=kevin.tian@intel.com \
--cc=paul.durrant@citrix.com \
--cc=xen-devel@lists.xen.org \
--cc=zhiyuan.lv@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 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.