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

Re: [Xen-devel] memaccess: skipping mem_access_send_req





On Fri, Apr 10, 2015 at 5:04 PM, Gareth Stockwell <Gareth.Stockwell@xxxxxxx> wrote:

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

Hi Gareth,
interesting use-case. It should be possible and I agree that option b is your easiest route to go forward with. FYI my arm_memaccess15 branch is still being worked on so it's not yet safe to branch off of it. I'm planning on submitting it in the very near future (maybe later today) and hopefully it will be merged before the end of the month ;)

Cheers,
Tamas
_______________________________________________
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®.