OSDev.org

The Place to Start for Operating System Developers
It is currently Tue May 17, 2022 9:28 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Passing network traffic from macOS 11.5 to QEMU
PostPosted: Sat Jan 22, 2022 11:57 pm 
Offline

Joined: Mon Jul 05, 2021 7:05 am
Posts: 6
Hi:
I develop a custom os use qemu and use macos 11.5.2 as host, I use the net argument '-net nic,model=pcnet -net tap,ifname=tap0,script=no,downscript=no’ when run the qemu-system-i386,then I can get the network device in my custom os:

pci_device_dump: vendor id: 0x1022
pci_device_dump: device id: 0x2000
pci_device_dump: class code: 0x20000
pci_device_dump: revision id: 0x10
pci_device_dump: multi function: 0
pci_device_dump: card bus CIS pointer: 0
pci_device_dump: subsystem vendor id: 0
pci_device_dump: subsystem device id: 0
pci_device_dump: expansion ROM base address: feb80000
pci_device_dump: capability list pointer: 0
pci_device_dump: irq line: 11
pci_device_dump: irq pin: 1
pci_device_dump: min Gnt: 6
pci_device_dump: max Lat: 255
pci_device_dump: bar 0:
pci_device_bar_dump: type: io base address
pci_device_bar_dump: base address: c000
pci_device_bar_dump: len: 20
pci_device_dump: bar 1:
pci_device_bar_dump: type: mem base address
pci_device_bar_dump: base address: febd1000
pci_device_bar_dump: len: 20

I can send a message to the host from my custom os in qemu, but can’t receive a message from the host.

so I rebuild the qemu using this patch https://patchew.org/QEMU/20211207101828.22033-1-yaroshchuk2000@gmail.com/, then I use the argument '-netdev vmnet-bridged,id=vmnet,ifname=en0’ to run the qemu-system-i386 again, this time, I can’t get the network device either and show warning: "qemu-system-i386: warning: netdev vmnet has no peer".

I don’t know why, how to use vmnet-bridged to send message to host from my custom os and receive a message from the host, what should I do? thanks a lot!

I had referenced from https://forum.osdev.org/viewtopic.php?f=1&t=39828, but it's older, when I build the version qemu,I got errors.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: DotBot [Bot], PetalBot [Bot], spotracite and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group