On Mon, Dec 18, 2000 at 10:28:15AM -0800, Colin Davidson wrote:
> Looks like I didn't express myself clearly. Funny, my thoughts were
> perfectly clear to me (:-). I saw a driver in the host talking directly to a
> driver in the guest, with no physical LAN card involved. The host would have
> and own the physical LAN card(s). The Guest would think that the driver that
> talked to the Host was driving an ethernet card and would treat it
> accordingly. The Host would think the the driver that talked to the Guest
> was driving a physical LAN card and would treat it accordingly. The
> Pseudo-device on the Host side would need an IP (could get complicated if
> another machine is doing DHCP resolution, although the Host/Guest linkage
> could always use 192.168 pair of IP addresses with the host configured as a
> router).
>
> If you see what I mean, perhaps you can describe it better. If not, perhaps
> some questions would help clarify. Let's talk some more.
I think I see what you mean now...
In the host, we have a net device, lets say, virt0 with IP 10.86.0.1. In
the guest, we have a net device, virt1 with IP 10.86.0.2. Now, for both
sides, the external API thinks it's a normal network card. However, the way
it acatualy communicates looks somthing like this:
HOST-------------------- MONITOR -----------------GUEST
API Raw packets API
net stack -> virt0 -> plex86 -> virt1 -> net stack
Now, between virt0 and virt1 sits the monitor. Instead of talking between
them as if there was wire there, we remap the area where virt0's to-send
buffer into guest space, and have the guest take an interupt. Then when the
guest is done with it, the guest calls an interupt and we unmap it so virt0
can send another buffer-full of data. (Of course, we could copy instead of
remaping, but since we're playing MMU games anyway, we might as well.)
If this is what you're thinking, it sounds pretty good, except, of course,
that it relies on writing drivers for both sides. You have to do NAT on the
host side if you want to get to the outside world and don't have a IP to do
it, but if you don't, it's pretty simple routing.
-=- James Mastros
--
midendian: She never sleeps.
mousetrout: But I do. I just regret it after I wake up.
AIM: theorbtwo homepage: http://www.rtweb.net/theorb/
ICBM: 40:04:15.100 N, 76:18:53.165 W