Hello,
The QEMU manual says that -net nic option creates a new network interface card 
and connect it with vlan 'n'. This sounds like the qemu-system-sparc(my case) 
generates a default emulated nic for me and use it. (am I right?)
I have inserted a nic emulation model myself (for qemu-system-sparc, I inserted 
lan9220 model.) into the qemu source. I setup the tap networking (bridge) and 
ran qemu with
qemu-system-sparc -M ALDEBARAN -serial stdio -kernel sImage.elf -net nic -net 
tap,ifname=tap0
and this seems to work(ALDEBARAN is the sparc core we developed). (With this 
-net tap option, qeme automatically runs /etc/qemu-ifup tap0 to make br0 and 
tap0 interfaces and runs /etc/qemu-ifdown tap0 after pressing ctrl-C). I was 
running linux and I could do ifconfig eth0 .... and route add default gw .... 
and could do ping google.com. I inserted some prints in the linux ethernet card 
ISR to see actually packets are being processed when I setup ip address and add 
gateway and ping to google.com.
But on second thought, this qemu manual sounds like this -net nic option makes 
a default nic for me(not using the emulated nic I inserted). I tested it 
without -net nic and it didn't go through. (paging error while accessing some 
virtual address 0x80000000 which is the location of the nic, so it seems this 
-net nic option really makes my inserted emulated nic envolved in the 
emulation).
Am I using the right emulated nic or qemu-provided default nic? or Do I still 
need -net nic option even though I have explicit emulated NIC instantiated 
inside qemu code?
Any hint would be deeply appreciated.
Best regards,
Chan Kim / ETRI

Reply via email to