|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 1/2] x86: add p2m_mmio_write_dm
>>> On 22.08.14 at 21:18, <wei.ye@xxxxxxxxx> wrote:
> --- a/xen/arch/x86/mm/p2m-ept.c
> +++ b/xen/arch/x86/mm/p2m-ept.c
> @@ -127,6 +127,7 @@ static void ept_p2m_type_to_flags(ept_entry_t *entry,
> p2m_type_t type, p2m_acces
> case p2m_ram_logdirty:
> case p2m_ram_ro:
> case p2m_ram_shared:
> + case p2m_mmio_write_dm:
> entry->r = entry->x = 1;
> entry->w = 0;
> break;
Is that really what you want? I.e. should such pages be executable?
> --- a/xen/arch/x86/mm/p2m-pt.c
> +++ b/xen/arch/x86/mm/p2m-pt.c
> @@ -98,6 +98,7 @@ static unsigned long p2m_type_to_flags(p2m_type_t t, mfn_t
> mfn)
> case p2m_ram_ro:
> case p2m_ram_logdirty:
> case p2m_ram_shared:
> + case p2m_mmio_write_dm:
> return flags | P2M_BASE_FLAGS;
Same here - this would likely better be grouped with
p2m_grant_map_ro.
> --- a/xen/include/asm-x86/p2m.h
> +++ b/xen/include/asm-x86/p2m.h
> @@ -71,6 +71,7 @@ typedef enum {
> p2m_ram_shared = 12, /* Shared or sharable memory */
> p2m_ram_broken = 13, /* Broken page, access cause domain crash
> */
> p2m_map_foreign = 14, /* ram pages from foreign domain */
> + p2m_mmio_write_dm = 15, /* Read-only; write go to the device model
> */
> } p2m_type_t;
I'm still not really convinced introducing a new p2m type is the right
approach here, but I'll leave the final decision to Tim.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |