All of lore.kernel.org
 help / color / mirror / Atom feed
* memaccess: skipping mem_access_send_req
@ 2015-04-10 15:04 Gareth Stockwell
  2015-04-10 15:11 ` Razvan Cojocaru
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Gareth Stockwell @ 2015-04-10 15:04 UTC (permalink / raw)
  To: xen-devel (xen-devel@lists.xen.org)
  Cc: stefano.stabellini@citrix.com, tklengyel@sec.in.tum.de,
	Ian.Campbell@citrix.com


[-- Attachment #1.1: Type: text/plain, Size: 1869 bytes --]

My understanding of memaccess is that it provides the following functionality:

1. Modify permission values in the page table of the target domain.
2. When the domain generates an illegal access, the exception handler delegates to memaccess, which pauses the VCPU and records the event in a ring buffer.
3. Some permission values are special in that they automatically mutate to a different value following the first access; others are persistently applied.

We would like to use memaccess to perform (1) - but rather than pausing the VCPU in (2), instead simply directly inject the exception into the VCPU.  I can see two ways of doing this:

a) Implement an observer of the ring buffer, which triggers injection of the exception and unpausing of the VCPU.
b) Define new xenmem_access_t values which cause the exception handler to reinject rather than adding a message to the ring buffer.

(a) seems cumbersome, and requires multiple context switches in order to handle the exception.
(b) therefore looks preferable, and I think should be fairly simple to implement on top of https://github.com/tklengyel/xen/tree/arm_memaccess15.

Does this sound reasonable?  Or is there a better way of modifying access permissions for a specific pfn range of a target domain?

Gareth


-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No: 2557590
ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No: 2548782

[-- Attachment #1.2: Type: text/html, Size: 4457 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-04-17 10:31 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-10 15:04 memaccess: skipping mem_access_send_req Gareth Stockwell
2015-04-10 15:11 ` Razvan Cojocaru
2015-04-10 15:23   ` Julien Grall
2015-04-15  9:18     ` Ian Campbell
2015-04-10 15:28 ` Tamas K Lengyel
2015-04-10 16:03 ` Andrew Cooper
2015-04-17  9:35   ` Gareth Stockwell
2015-04-15  9:26 ` Ian Campbell
2015-04-17  9:35   ` Gareth Stockwell
2015-04-17 10:31     ` Ian Campbell

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.