Re: [RFC, PATCH 16/24] i386 Vmi io header

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

 



Eric W. Biederman wrote:
Zachary Amsden <[email protected]> writes:

Move I/O instruction building to the sub-arch layer.  Some very crafty
but esoteric macros are used here to get optimized native instructions
for port I/O in Linux be writing raw instruction strings.  Adding a
wrapper layer here is fairly easy, and makes the full range of I/O
instructions available to the VMI interface.

Also, slowing down I/O is not a useful operation in a VM, so there
is a VMI call specifically to allow making it a NOP.  I could find
no place where SLOW_IO_BY_JUMPING is still used, and consider it
obsoleted.  Even on older 386 systems, the I/O delay approximation
by touching the extra page register is likely to better.

This sounds like a prime candidate for the alternate instruction interfaces
and I don't see that being used here.

The problem is that floppy controllers and other crufty hardware actually do need those slowing port operations to work reliably. If you look at the usage of slow_down_io, you get scared pretty quick. If you want your driver to use it, you have the option of defining REALLY_SLOW_IO in your C file, then suffix your I/O calls with _p. The definition of SLOW_DOWN_IO actually used to be raw assembly instructions encapsulated in quotations. I just realized this does actually change the semantics of drivers/net/de600.c, which really is the only driver which defines SLOW_IO_BY_JUMPING.

This usage of predefined macros in the driver causing port I/O semantics to change seems a little strange to try to wrap onto an alternate instruction interfaces, since it is dependent definitions local to each .C file, rather than global processor or derived feature bits.

The VMI call wrappers are very much similar to the alternate instruction interfaces - they just leave the alternative to be defined by the hypervisor.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux