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

Re: [Xen-devel] [PATCH] vm_event: Implement ARM SMC events



On 4/13/2016 1:52 PM, Julien Grall wrote:
Hello Corneliu,

On 13/04/16 09:55, Corneliu ZUZU wrote:
On 4/12/2016 8:24 PM, Tamas K Lengyel wrote:
Another issue came to my mind: "HVC #imm", if handled through the
hvm-ops code, currently requires setting other registers to predefined
values before the HVC is actually issued. That would imply additional
effort to save/restore those registers if an external privileged domain
would want to set guest breakpoints. Given that, if we were to use HVC
for sw-bkpts, IMO it would be nice if the hvm-ops code architecture
would be slightly changed such that -lone- "HVM #imm" calls would be
achievable for some use cases, such as this.

That is not true. All the hypercalls are using the same #imm (XEN_HYPERCALL_TAG = 0xEA1), which indeed requires specific value in various registers to differentiate the HVM-ops.

It's up to us to define the requirements for the other #imm. For instance there are some #imm allocated for debugging (see do_debug_trap) that will dump the content of the registers.


That's nice, I wonder why we didn't do that for guest-request vm-events...



So what I will do instead of issuing a software_breakpoint vm_event
for SMCs, I'll introduce a new type, say
VM_EVENT_REASON_PRIVILEGED_CALL, that can be used to forward both
hypercalls and SMCs to a monitoring guest. This would also allow us to
use the software_breakpoint type for the actual software breakpoint
events in the future.

Tamas

Isn't the HVC-part already achieved by guest-request vm-events? Maybe
tying this vm-event specifically to SMC (in which case the name could be
something like VM_EVENT_REASON_SECURE_CALL) and thus making it
ARM-specific would avoid that redundancy?

I would create 2 distinct events for HVC and SMC. It would make easier to differentiate them in userspace.

Regards,


As stated, HVC events are already implemented as guest-request vm-events (hence the redundancy that a VM_EVENT_REASON_PRIVILEGED_CALL would add). So indeed, that would leave us with the option of simply creating another event for SMC.

Corneliu.

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