[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC 3/4] HVM x86 deprivileged mode: Code for switching into/out of deprivileged mode
On Thu, 2015-08-06 at 21:55 +0100, Andrew Cooper wrote: > On 06/08/15 17:45, Ben Catterall wrote: > > The process to switch into and out of deprivileged mode can be likened > > to > > setjmp/longjmp. > > > > To enter deprivileged mode, we take a copy of the stack from the > > guest's > > registers up to the current stack pointer. This allows us to restore > > the stack > > when we have finished the deprivileged mode operation, meaning we can > > continue > > execution from that point. This is similar to if a context switch had > > happened. > > > > To exit deprivileged mode, we copy the stack back, replacing the > > current stack. > > We can then continue execution from where we left off, which will > > unwind the > > stack and free up resources. This method means that we do not need to > > change any other code paths and its invocation will be transparent to > > callers. > > This should allow the feature to be more easily deployed to different > > parts > > of Xen. > > > > Note that this copy of the stack is per-vcpu but, it will contain per > > -pcpu data. > > Extra work is needed to properly migrate vcpus between pcpus. > > Under what circumstances do you see there being persistent state in the > depriv area between calls, given that the calls are synchronous from VM > actions? Would we not want to keep (some of) the device model's state in a depriv area? e.g. anything which is purely internal to the DM which is therefore only accessed from depriv-land? Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |