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

Re: [Xen-devel] Question about HVM network



On Mon, 2011-11-07 at 14:29 +0000, cc Luit wrote:
> 
> 
> On Mon, Nov 7, 2011 at 5:57 PM, Ian Campbell <Ian.Campbell@xxxxxxxxxx>
> wrote:
>         On Sun, 2011-11-06 at 14:12 +0000, cc Luit wrote:
>         > Hi, all,
>         >
>         >
>         > I've a question about how network of HVM works,
>         > when hvm startup, I found the qemu register the io port
>         0xc100-0xc1ff
>         > to the function rtl8139_ioport_write, is this means qemu
>         emulate the
>         > rtl8139 NIC to handle network io event?
>         
>         
>         > I think this is the default. You can select a different
>         emulated NIC
>         > using e.g. "model=e1000" in your VIF stanza in the guest
>         configuration
>         > file.
>         
>         > but when I scp a file to the remote machine, I cannot find
>         any write
>         > to these ports, so I'm curious how hvm's network works?
>         
>         
>         > Perhaps you have ended up with PVHVM network driver? This
>         will take
>         > precedence to the emulated NIC if present.
> 
> 
> Thanks, then can you tell me how PVHVM works, and how can I know if I
> use it?

"ethtool -i <device>" should tell you which driver is in use. How to
configure PVHVM is more of a xen-users@ question. You might find
http://wiki.xen.org/xenwiki/XenLinuxPVonHVMdrivers useful though.

> and I digged into the rtl8139's driver codes and emulated one in
> qemu-tools, I found that the hvm use the mmio rather than pio to
> inform the NIC to poll the descriptor, I think that's why there is no
> write to the port io, but I'm still curious why qemu need to register
> the ports to those functions?

Presumably a real rtl8139 has functionality there, so qemu has to
emulate said functionality. The fact that the particular driver in Linux
doesn't use it isn't really relevant. Many cards have multiple ways you
can drive them, often both PIO and MMIO, whole many drivers only use on
or the other.

Ian.

>         
>         Ian.
>         
>         
>         >
>         >
>         > first I'm not using the passthrough, so I think that it will
>         use DMA:
>         > after it write the content to the memory, it will use PIO to
>         write to
>         > one of the port to tell the qemu it need to start DMA, but
>         there is no
>         > write to the port, then how does the rtc8139 emulated by
>         qemu know
>         > when to start the DMA and where is the memory address?
>         >
>         >
>         > hope someone can help me~ thanks in advance.
>         >
>         >
>         > --
>         > - Luit @ Parallel Processing Institute, Fudan University
>         >
>         
>         
>         
> 
> 
> 
> 
> -- 
> - Luit @ Parallel Processing Institute, Fudan University 



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.