Re: [PATCH] some optimizations for Virtual Machines

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

 



We have updated the patch to the latest kernel.
It is here:
http://www.cs.unibo.it/~renzo/utrace.

> 1- Order of callbacks
This patch is crucial. Without this change no virtual machines can be
nested if based on utrace.
> 
> 2- Access to traced process vm.
> 
This patch is very important: with this change VM hypervisors can access
their process memory efficiently. 
> 
> I propose a new call:
> int utrace_access_process_vm(struct task_struct *tsk, unsigned long addr, char __user *ubuf, int len, int write, int string);
> which give I-O access to the memory of the process.
I have seen that access_process_vm has been exported to modules: it is a
change included in mainstream 2.6.23 from the first rc.
so I have exported access_process_vm_user too.
access_process_vm_user has two main differences with
access_process_vm:
- it copies a memory area directly from a process vm to the user space
  of current and viceversa (it uses an internal one page buffer, it does
not need extra buffers or extra code loops).
- it supports the "string" flag for reading: no useless copies of data
  after the end of string, no memory errors due to short string read
into large buffers.

utrace_access_process_vm can be kept or not: modules can call it instead
of directly accessing access_process_vm_user when they need to check
that the requesting process has the right to access the other process
vm.
> 
> 3- In the patch I have also implemented the support for PTRACE_MULTI 
> and PTRACE_SYSVM.
This patch is just useful. We'll use it to compare the performance
between umview and kmview. Several ptrace based application could
benefit from these features (e.g. when they need to load chunks of
memory or chunks of registers, burst of ptrace calls could be sent as a
single call reducing the number of mode switches).

That's all for now.


	renzo


[Index of Archives]     [Kernel Discussion]     [Gimp]     [Yosemite News]

  Powered by Linux