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

Re: [Xen-devel] [PATCH v5 04/10] xen/arm: Store p2m type in each page of the guest





On 12/16/2013 05:49 PM, Ian Campbell wrote:
On Mon, 2013-12-16 at 17:37 +0000, Julien Grall wrote:
Use the field 'avail' to store the type of the page. Rename it to 'type' for
convenience.
The information stored in this field will be retrieved in a future patch to
change the behaviour when the page is removed.

Also introduce guest_physmap_add_entry to map and set a specific p2m type for
a page.

Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx>

---
     Changes in v5:
         - Foreign mapping doesn't need to have execution right

Neither does MMIO for that matter...


+    switch (t)
+    {
+    case p2m_map_foreign:
+    case p2m_grant_map_rw:
+        e.p2m.xn = 1;
+        /* Fallthrough */
+    case p2m_ram_rw:
+    case p2m_mmio_direct:

... so move this up.

Right.


+        e.p2m.write = 1;
+        break;
+
+    case p2m_grant_map_ro:
+        e.p2m.xn = 1;
+        /* Fallthrough */
+    case p2m_invalid:
+    case p2m_ram_ro:
+    default:

You were going to remove the default case IIRC to let the compiler catch
new type additions.

Sorry, I completely forgot. I will do it for the next version.

--
Julien Grall

_______________________________________________
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®.