From: "Yu, Zhang" <yu.c.zhang@linux.intel.com>
To: Xen-devel@lists.xen.org, kevin.tian@intel.com, tim@xen.org,
JBeulich@suse.com
Cc: keir@xen.org, ian.campbell@citrix.com,
stefano.stabellini@eu.citrix.com, ian.jackson@eu.citrix.com,
donald.d.dugger@intel.com, Paul.Durrant@citrix.com,
zhiyuan.lv@intel.com, yang.z.zhang@intel.com
Subject: Re: [PATCH v6 0/2] add new p2m type class and new p2m type
Date: Tue, 09 Dec 2014 10:02:08 +0800 [thread overview]
Message-ID: <54865820.2010501@linux.intel.com> (raw)
In-Reply-To: <1417838137-12473-1-git-send-email-yu.c.zhang@linux.intel.com>
Hi Tim & Jan,
Thank you very much for your review.
And could you please also help me about how to get an ACK? I'm not
sure what's the next action I need to take. :-)
B.R.
Yu
On 12/6/2014 11:55 AM, Yu Zhang wrote:
> XenGT (Intel Graphics Virtualization technology, please refer to
> https://01.org/xen/blogs/srclarkx/2013/graphics-virtualization-
> xengt) driver runs inside Dom0 as a virtual graphics device model,
> and needs to trap and emulate the guest's write operations to some
> specific memory pages, like memory pages used by guest graphics
> driver as PPGTT(per-process graphics translation table). We added
> a new p2m type, p2m_mmio_write_dm, to trap and emulate the write
> operations on these graphic page tables.
>
> Handling of this new p2m type are similar with existing p2m_ram_ro
> in most condition checks, with only difference on final policy of
> emulation vs. drop. For p2m_ram_ro types, write operations will not
> trigger the device model, and will be discarded later in __hvm_copy();
> while for the p2m_mmio_write_dm type pages, writes will go to the
> device model via ioreq-server.
>
> Previously, the conclusion in our v3 patch review is to provide a
> more generalized HVMOP_map_io_range_to_ioreq_server hypercall, by
> seperating rangesets inside a ioreq server to read-protected/write-
> protected/both-prtected. Yet, after offline discussion with Paul,
> we believe a more simplified solution may suffice. We can keep the
> existing HVMOP_map_io_range_to_ioreq_server hypercall, and let the
> user decide whether or not a p2m type change is necessary, because
> in most cases the emulator will already use the p2m_mmio_dm type.
>
> Changes from v5:
> - Stricter type checks for p2m type transitions;
> - One code style change.
>
> Changes from v4:
> - A new p2m type class, P2M_DISCARD_WRITE_TYPES, is added;
> - A new predicate, p2m_is_discard_write, is used in __hvm_copy()/
> __hvm_clear()/emulate_gva_to_mfn()/hvm_hap_nested_page_fault(),
> to discard the write operations;
> - The new p2m type, p2m_mmio_write_dm, is added to P2M_RO_TYPES;
> - Coding style changes;
>
> Changes from v3:
> - Use the existing HVMOP_map_io_range_to_ioreq_server hypercall
> to add write protected range;
> - Modify the HVMOP_set_mem_type hypercall to support the new p2m
> type for this range.
>
> Changes from v2:
> - Remove excute attribute of the new p2m type p2m_mmio_write_dm;
> - Use existing rangeset for keeping the write protection page range
> instead of introducing hash table;
> - Some code style fix.
>
> Changes from v1:
> - Changes the new p2m type name from p2m_ram_wp to p2m_mmio_write_dm.
> This means that we treat the pages as a special mmio range instead
> of ram;
> - Move macros to c file since only this file is using them.
> - Address various comments from Jan.
>
> Yu Zhang (2):
> Add a new p2m type class - P2M_DISCARD_WRITE_TYPES
> add a new p2m type - p2m_mmio_write_dm
>
> xen/arch/x86/hvm/hvm.c | 25 ++++++++++---------------
> xen/arch/x86/mm/p2m-ept.c | 1 +
> xen/arch/x86/mm/p2m-pt.c | 1 +
> xen/arch/x86/mm/shadow/multi.c | 2 +-
> xen/include/asm-x86/p2m.h | 9 ++++++++-
> xen/include/public/hvm/hvm_op.h | 1 +
> 6 files changed, 22 insertions(+), 17 deletions(-)
>
next prev parent reply other threads:[~2014-12-09 2:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-06 3:55 [PATCH v6 0/2] add new p2m type class and new p2m type Yu Zhang
2014-12-06 3:55 ` [PATCH v6 1/2] add a new p2m type class - P2M_DISCARD_WRITE_TYPES Yu Zhang
2014-12-06 3:55 ` [PATCH v6 2/2] add a new p2m type - p2m_mmio_write_dm Yu Zhang
2014-12-08 16:20 ` Jan Beulich
2014-12-11 12:04 ` Tim Deegan
2014-12-11 13:23 ` Jan Beulich
2014-12-09 2:02 ` Yu, Zhang [this message]
2014-12-09 8:31 ` [PATCH v6 0/2] add new p2m type class and new p2m type Jan Beulich
2014-12-09 10:13 ` Yu, Zhang
2014-12-09 10:20 ` Tim Deegan
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=54865820.2010501@linux.intel.com \
--to=yu.c.zhang@linux.intel.com \
--cc=JBeulich@suse.com \
--cc=Paul.Durrant@citrix.com \
--cc=Xen-devel@lists.xen.org \
--cc=donald.d.dugger@intel.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=tim@xen.org \
--cc=yang.z.zhang@intel.com \
--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.