Skip to content

Conversation

@jackschefer-msft
Copy link
Contributor

This change adds CLI/openvmm_entry support for configuring the in-box MANA emulator to get enumerated over emulated PCI Express as opposed to VPCI. This is somewhat cumbersome to test with at the moment (need MANA drivers and to configure the guest networking stack) but is functional form the PCI perspective.

cargo run -- --uefi --disk memdiff:file:/home/jackschefer/ubuntu_mana.raw \
    --pcie-root-complex rc0 --pcie-root-port rc0:rp0 --mana pcie_port=rp0:consomme


vmlocaladmin@ubuntu2004-server:~$ lspci && ip a && networkctl status enp1s0
00:00.0 PCI bridge: Microsoft Corporation Device c030
01:00.0 Ethernet controller: Microsoft Corporation Device 00ba (rev 01)
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:15:5d:08:16:dd brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.2/24 brd 10.0.0.255 scope global dynamic enp1s0
       valid_lft 86072sec preferred_lft 86072sec
● 2: enp1s0                                                      
             Link File: /usr/lib/systemd/network/99-default.link 
          Network File: n/a                                      
                  Type: ether                                    
                 State: routable (unmanaged)        
                  Path: pci-0000:01:00.0                         
                Driver: mana                                     
                Vendor: Microsoft Corporation                    
            HW Address: 00:15:5d:08:16:dd (Microsoft Corporation)
                   MTU: 1500 (min: 68, max: 4294967282)          
  Queue Length (Tx/Rx): 1/1                                      
               Address: 10.0.0.2                                 
               Gateway: 10.0.0.1                                 
     Activation Policy: up                                       
   Required For Online: yes                                      

Oct 23 17:02:56 ubuntu2004-server systemd-networkd[572]: enp1s0: Link UP
Oct 23 17:02:56 ubuntu2004-server systemd-networkd[572]: enp1s0: Gained carrier

@jackschefer-msft jackschefer-msft requested a review from a team as a code owner October 23, 2025 17:28
Copilot AI review requested due to automatic review settings October 23, 2025 17:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for configuring MANA network emulators to be enumerated over emulated PCIe instead of only VPCI. The change introduces a new pcie_port CLI parameter that allows users to specify a PCIe root port for MANA devices.

Key changes:

  • Added pcie_port parameter to NIC configuration CLI parsing with validation
  • Extended internal NIC configuration handling to support both VPCI and PCIe MANA devices
  • Added comprehensive test coverage for the new PCIe port configuration option

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
openvmm/openvmm_entry/src/lib.rs Added PCIe device configuration support for MANA NICs, including separation of VPCI and PCIe MANA NICs with appropriate validation
openvmm/openvmm_entry/src/cli_args.rs Added pcie_port parameter to NicConfigCli with parsing logic, validation rules, and comprehensive unit tests

@jackschefer-msft
Copy link
Contributor Author

@sunilmut / @Brian-Perkins are you the right folks to review this?

@chris-oo
Copy link
Member

should we add a follow up issue to track onboarding a vmm_test for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants