[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 3/3] Add HVMOP to map guest ram with p2m_ioreq_server to an ioreq server



Thanks, Jan.

On 3/23/2016 5:22 PM, Jan Beulich wrote:
On 22.03.16 at 18:51, <Paul.Durrant@xxxxxxxxxx> wrote:
From: George Dunlap [mailto:george.dunlap@xxxxxxxxxx]
Sent: 22 March 2016 17:27
There's not much documentation in the code about how this is expected to
be used.

For instance, having separate flags seems to imply that you can
independently select either read intercept, write intercept, or both;
but [ept_]p2m_type_to_flags() seems to assume that READ_ACCESS implies
WRITE_ACCESS.  Do you plan to implement them separately in the future?
If not, would it be better to make the interface an enum instead?

At very least it should be documented that READ_ACCESS implies
WRITE_ACCESS.

That's not true. If WRITE_ACCESS has not been requested then writes are
handled directly in Xen rather than being forwarded to the ioreq server. If
h/w were to allow pages to be marked write-only then we wouldn't need to do
that.

At least on EPT iirc you can have write-only pages, due to there
being both an R and a W bit.


Sorry for not having clearly explained the flags parameter in this new
HVMOP. Turning on the P2M_IOREQ_HANDLE_READ_ACCESS or the
P2M_IOREQ_HANDLE_WRITE_ACCESS in flags only suggests that read/write
operations are supposed to be handled by one specific ioreq server,
which means this operation needs trap to the hypervisor, but not the
logic does not hold on the other way round, e.g. depriving the write
access right does not necessarily means write operation will be
forwarded to an ioreq server.

Besides, iiuc, setting the W bit to 1 with R bit cleared in EPT pte is
not really giving the write access right to the guest, and will trigger
ept misconfiguration.

+    p2m_memory_type_changed(d);
+
+    rc = 0;
+
+out:

Btw: label placement.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel




B.R.
Yu

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.