From: "Yu, Zhang" <yu.c.zhang@linux.intel.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: kevin.tian@intel.com, wei.liu2@citrix.com,
ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com,
andrew.cooper3@citrix.com, ian.jackson@eu.citrix.com,
xen-devel@lists.xen.org, Paul.Durrant@citrix.com,
zhiyuan.lv@intel.com, keir@xen.org
Subject: Re: [PATCH v11 2/3] Differentiate IO/mem resources tracked by ioreq server
Date: Tue, 26 Jan 2016 15:59:03 +0800 [thread overview]
Message-ID: <56A72747.1080205@linux.intel.com> (raw)
In-Reply-To: <56A223F902000078000CA036@prv-mh.provo.novell.com>
On 1/22/2016 7:43 PM, Jan Beulich wrote:
>>>> On 22.01.16 at 04:20, <yu.c.zhang@linux.intel.com> wrote:
>> @@ -2601,6 +2605,16 @@ struct hvm_ioreq_server *hvm_select_ioreq_server(struct domain *d,
>> type = (p->type == IOREQ_TYPE_PIO) ?
>> HVMOP_IO_RANGE_PORT : HVMOP_IO_RANGE_MEMORY;
>> addr = p->addr;
>> + if ( type == HVMOP_IO_RANGE_MEMORY )
>> + {
>> + ram_page = get_page_from_gfn(d, p->addr >> PAGE_SHIFT,
>> + &p2mt, P2M_UNSHARE);
>
> It seems to me like I had asked before: Why P2M_UNSHARE instead
> of just P2M_QUERY? (This could surely be fixed up while committing,
> the more that I've already done some cleanup here, but I'd like to
> understand this before it goes in.)
>
Hah, sorry for my bad memory. :)
I did not found P2M_QUERY; only P2M_UNSHARE and P2M_ALLOC are
defined. But after reading the code in ept_get_entry(), I guess the
P2M_UNSHARE is not accurate, maybe I should use 0 here for the
p2m_query_t parameter in get_page_from_gfn()?
>> + if ( p2mt == p2m_mmio_write_dm )
>> + type = HVMOP_IO_RANGE_WP_MEM;
>> +
>> + if ( ram_page )
>> + put_page(ram_page);
>> + }
>> }
>>
>> list_for_each_entry ( s,
>> @@ -2642,6 +2656,11 @@ struct hvm_ioreq_server *hvm_select_ioreq_server(struct domain *d,
>> }
>>
>> break;
>> + case HVMOP_IO_RANGE_WP_MEM:
>> + if ( rangeset_contains_singleton(r, PFN_DOWN(addr)) )
>> + return s;
>
> Considering you've got p2m_mmio_write_dm above - can this
> validly return false here?
Well, if we have multiple ioreq servers defined, it will...
Currently, this p2m type is only used in XenGT, which has only one
ioreq server other than qemu for the vGPU. But suppose there will
be more devices using this type and more ioreq servers introduced
for them, it can return false.
>
> Jan
>
>
B.R.
Yu
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
>
next prev parent reply other threads:[~2016-01-26 7:59 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-22 3:20 [PATCH v11 0/3] Refactor ioreq server for better performance Yu Zhang
2016-01-22 3:20 ` [PATCH v11 1/3] Refactor rangeset structure " Yu Zhang
2016-01-22 3:20 ` [PATCH v11 2/3] Differentiate IO/mem resources tracked by ioreq server Yu Zhang
2016-01-22 11:43 ` Jan Beulich
2016-01-26 7:59 ` Yu, Zhang [this message]
2016-01-26 11:24 ` Jan Beulich
2016-01-27 7:02 ` Yu, Zhang
2016-01-27 10:28 ` Jan Beulich
2016-01-22 3:20 ` [PATCH v2 3/3] tools: introduce parameter max_wp_ram_ranges Yu Zhang
2016-01-22 8:01 ` Jan Beulich
2016-01-26 7:32 ` Yu, Zhang
2016-01-26 11:00 ` Jan Beulich
2016-01-27 7:01 ` Yu, Zhang
2016-01-27 10:27 ` Jan Beulich
2016-01-27 14:13 ` Yu, Zhang
2016-01-27 14:32 ` Jan Beulich
2016-01-27 14:56 ` Yu, Zhang
2016-01-27 15:12 ` Jan Beulich
2016-01-27 15:23 ` Yu, Zhang
2016-01-27 15:58 ` Jan Beulich
2016-01-27 16:12 ` Yu, Zhang
2016-01-26 11:16 ` David Vrabel
2016-01-27 7:03 ` 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=56A72747.1080205@linux.intel.com \
--to=yu.c.zhang@linux.intel.com \
--cc=JBeulich@suse.com \
--cc=Paul.Durrant@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=keir@xen.org \
--cc=kevin.tian@intel.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@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.