Kevin Lawton wrote:

[ Sorry for the late reply; I've been off-line for the last
  two weeks ... ]

> Quick question; what is the nature of the helper routines
> zero_memory() and copy_memory() in kernel/monitor.c?
> 
> I'm guessing files other than host-linux.c didn't have
> access to the header files needed for memset() and memcpy().
> 
> I added a host.h file to include/ so that we can include
> host specific convience functions like this.  They are
> far more optimized than ones we can write in C.
> 
> Are these functions offered on other kernel architectures?

Well, I've removed the host dependency from the monitor source
files because it appeared to be more of a burden than a help;
you have to include various host OS headers into the source files,
which might cause namespace collisions, and then you are not 
even sure whether the routines are in fact present on other OSes ...

Implementing those helper routines allows the monitor source
files to be implemented completely independently of the host OS, 
and the routines can even be used from inside the guest context, 
which host OS routines certainly can't.

If there should indeed be performance problems (currently, the
helper routines are only used at non-performance-critical places),
we can always replace them by optimized assembler routines (as
we support only one architecture anyway, this shouldn't be a
problem ...).

[ B.t.w. for memset and memcpy specifically, we might rely on the
  fact that those are gcc intrinsic routines, i.e. gcc creates 
  inline code instead of function calls for those anyway, unless
  optimization is disabled.  This would tie us to gcc, of course. ]


Bye,
Ulrich

-- 
  Ulrich Weigand,
  IMMD 1, Universitaet Erlangen-Nuernberg,
  Martensstr. 3, D-91058 Erlangen, Phone: +49 9131 85-27688

Reply via email to