RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2153376 - [SEV][virtio-net-pci] vhost vring error in virtqueue 1: Invalid argument (22)
Summary: [SEV][virtio-net-pci] vhost vring error in virtqueue 1: Invalid argument (22)
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: qemu-kvm
Version: 9.2
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Virtualization Maintenance
QA Contact: Yanghang Liu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-12-14 13:41 UTC by Yanghang Liu
Modified: 2023-03-30 12:33 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-02-15 10:48:03 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-142238 0 None None None 2022-12-14 13:56:12 UTC

Description Yanghang Liu 2022-12-14 13:41:40 UTC
Description of problem:
The sev domain which has a virtio-net-pci interface can not be started.
the related qemu-kvm error info : qemu-kvm: vhost vring error in virtqueue 1: Invalid argument (22)


Version-Release number of selected component (if applicable):
host:
qemu-kvm-7.1.0-6.el9.x86_64
libvirt-8.10.0-2.el9.x86_64
5.14.0-210.el9.x86_64
edk2-ovmf-20220826gitba0e0e4c6a-2.el9.noarch

How reproducible:
100%

Steps to Reproduce:
1. setup the sev test env on a amd eypc-milan host

# cat /proc/cmdline
iommu=pt mem_encrypt=on kvm_amd.sev=1 amd_iommu=on default_hugepagesz=1G

# virsh domcapabilities
...
    <sev supported='yes'>

2. import a sev domain with a virtio-net-pci interface
# virt-install --name rhel92 --machine=q35 --memory 4096 --memtune hard_limit=4718592 --vcpus=4 --boot uefi --disk path=/home/kvm_autotest_root/images/rhel920-64-virtio-scsi.qcow2,bus=scsi,cache=none,format=qcow2,io=threads,size=20 --controller type=scsi,model=virtio-scsi,driver.iommu=on --graphics type=vnc,port=5992,listen=0.0.0.0 --video virtio,driver.iommu=on --controller type=virtio-serial,driver.iommu=on --rng type=/dev/random,driver.iommu=on --memballoon driver.iommu=on --launchSecurity sev --network bridge=switch,model=virtio,mac=52:54:00:00:92:92,driver.iommu=on --serial pty --console pty --import --noreboot --noautoconsole --os-variant rhel9.2


3. start the sev domain
# virsh start rhel92

4. check the related info
4.1 the host dmesg
# dmesg 
[ 1768.381376] switch: port 2(vnet3) entered blocking state
[ 1768.386691] switch: port 2(vnet3) entered disabled state
[ 1768.392042] device vnet3 entered promiscuous mode
[ 1768.396961] switch: port 2(vnet3) entered blocking state
[ 1768.402277] switch: port 2(vnet3) entered forwarding state
[ 1769.210697] 00 00 93 00 ff ff 00 00 00 00 00 00 00 00 00 00
[ 1769.216274] 00 f0 9b 00 ff ff 00 00 00 00 ff ff 00 00 00 00
[ 1769.221847] 00 00 93 00 ff ff 00 00 00 00 00 00 00 00 00 00
[ 1769.227420] 00 00 93 00 ff ff 00 00 00 00 00 00 00 00 00 00
[ 1769.232993] 00 00 93 00 ff ff 00 00 00 00 00 00 00 00 00 00
[ 1769.238564] 00 00 93 00 ff ff 00 00 00 00 00 00 00 00 00 00
[ 1769.244135] 00 00 00 00 ff ff 00 00 00 00 00 00 00 00 00 00
[ 1769.249709] 00 00 82 00 ff ff 00 00 00 00 00 00 00 00 00 00
[ 1769.255280] 00 00 00 00 ff ff 00 00 00 00 00 00 00 00 00 00
[ 1769.260854] 00 00 8b 00 ff ff 00 00 00 00 00 00 00 00 00 00
[ 1769.266428] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.272001] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.277572] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.283144] 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.288717] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.294292] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.299863] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.305438] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.311008] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.316583] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.322155] 00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00
[ 1769.327727] 00 00 00 00 00 00 00 00 10 00 00 00 00 00 00 00
[ 1769.333300] 00 04 00 00 00 00 00 00 f0 0f ff ff 00 00 00 00
[ 1769.338874] 02 00 00 00 00 00 00 00 f0 ff 00 00 00 00 00 00
[ 1769.344446] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.350019] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.355591] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.361165] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.366737] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.372310] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.377883] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.383456] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.389029] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.394602] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.400173] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.405751] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.411320] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.416893] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.422465] 00 00 00 00 00 00 00 00 06 04 07 00 06 04 07 00
[ 1769.428039] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.433610] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.439182] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.444757] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.450328] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.455903] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.461476] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.467045] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.472622] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.478191] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.483766] 11 0f a0 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.489338] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.494910] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.500483] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.506057] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.511630] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.517202] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.522775] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.528348] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.533921] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.539494] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.545067] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.550637] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.556213] 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00
[ 1769.561783] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.567357] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.572931] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.578503] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.584075] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.589648] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.595220] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.600794] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.606369] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.611940] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.617512] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.623085] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.628657] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.634230] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.639801] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.645375] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.650948] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.656522] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.662094] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.667666] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.673240] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.678812] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.684386] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.689959] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.695529] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.701104] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.706677] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.712252] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.717824] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.723397] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.728970] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.734543] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.740118] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.745696] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.751269] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.756842] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.762415] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.767986] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.773561] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.779131] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.788038] 00 00 93 00 ff ff 00 00 00 00 00 00 00 00 00 00
[ 1769.793613] 00 f0 9b 00 ff ff 00 00 00 00 80 00 00 00 00 00
[ 1769.799187] 00 00 93 00 ff ff 00 00 00 00 00 00 00 00 00 00
[ 1769.804759] 00 00 93 00 ff ff 00 00 00 00 00 00 00 00 00 00
[ 1769.810329] 00 00 93 00 ff ff 00 00 00 00 00 00 00 00 00 00
[ 1769.815903] 00 00 93 00 ff ff 00 00 00 00 00 00 00 00 00 00
[ 1769.821477] 00 00 00 00 ff ff 00 00 00 00 00 00 00 00 00 00
[ 1769.827048] 00 00 82 00 ff ff 00 00 00 00 00 00 00 00 00 00
[ 1769.832621] 00 00 00 00 ff ff 00 00 00 00 00 00 00 00 00 00
[ 1769.838196] 00 00 8b 00 ff ff 00 00 00 00 00 00 00 00 00 00
[ 1769.843767] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.849342] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.854913] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.860486] 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.866060] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.871630] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.877205] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.882777] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.888349] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.893921] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.899494] 00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00
[ 1769.905068] 00 00 00 00 00 00 00 00 10 00 00 00 00 00 00 00
[ 1769.910641] 00 04 00 00 00 00 00 00 f0 0f ff ff 00 00 00 00
[ 1769.916215] 02 00 00 00 00 00 00 00 04 b0 00 00 00 00 00 00
[ 1769.921786] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.927360] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.932932] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.938503] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.944078] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.949650] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.955221] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.960797] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.966367] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.971940] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.977513] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.983087] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.988660] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.994231] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1769.999804] 00 00 00 00 00 00 00 00 06 04 07 00 06 04 07 00
[ 1770.005376] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.010951] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.016523] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.022095] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.027668] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.033240] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.038815] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.044386] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.049960] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.055533] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.061106] 11 0f a0 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.066679] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.072250] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.077822] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.083396] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.088969] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.094542] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.100113] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.105687] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.111261] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.116833] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.122408] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.127978] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.133553] 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00
[ 1770.139125] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.144696] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.150271] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.155841] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.161415] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.166987] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.172559] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.178134] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.183707] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.189279] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.194852] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.200427] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.205999] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.211571] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.217143] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.222716] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.228289] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.233863] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.239435] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.245009] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.250582] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.256152] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.261726] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.267298] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.272870] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.278444] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.284018] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.289591] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.295162] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.300736] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.306307] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.311880] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.317455] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.323027] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.328600] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.334171] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.339744] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.345319] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.350890] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.356462] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.365371] 00 00 93 00 ff ff 00 00 00 00 00 00 00 00 00 00
[ 1770.370946] 00 f0 9b 00 ff ff 00 00 00 00 80 00 00 00 00 00
[ 1770.376520] 00 00 93 00 ff ff 00 00 00 00 00 00 00 00 00 00
[ 1770.382091] 00 00 93 00 ff ff 00 00 00 00 00 00 00 00 00 00
[ 1770.387665] 00 00 93 00 ff ff 00 00 00 00 00 00 00 00 00 00
[ 1770.393237] 00 00 93 00 ff ff 00 00 00 00 00 00 00 00 00 00
[ 1770.398811] 00 00 00 00 ff ff 00 00 00 00 00 00 00 00 00 00
[ 1770.404383] 00 00 82 00 ff ff 00 00 00 00 00 00 00 00 00 00
[ 1770.409955] 00 00 00 00 ff ff 00 00 00 00 00 00 00 00 00 00
[ 1770.415527] 00 00 8b 00 ff ff 00 00 00 00 00 00 00 00 00 00
[ 1770.421100] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.426672] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.432245] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.437819] 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.443392] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.448966] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.454539] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.460109] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.465682] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.471254] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.476829] 00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00
[ 1770.482402] 00 00 00 00 00 00 00 00 10 00 00 00 00 00 00 00
[ 1770.487973] 00 04 00 00 00 00 00 00 f0 0f ff ff 00 00 00 00
[ 1770.493548] 02 00 00 00 00 00 00 00 04 b0 00 00 00 00 00 00
[ 1770.499120] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.504692] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.510265] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.515838] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.521411] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.526984] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.532557] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.538131] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.543704] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.549273] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.554847] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.560420] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.565992] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.571566] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.577140] 00 00 00 00 00 00 00 00 06 04 07 00 06 04 07 00
[ 1770.582711] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.588286] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.593857] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.599429] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.605000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.610575] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.616148] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.621721] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.627294] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.632866] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.638440] 11 0f a0 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.644011] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.649585] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.655158] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.660730] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.666301] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.671876] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.677449] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.683021] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.688595] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.694166] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.699741] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.705312] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.710883] 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00
[ 1770.716456] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.722032] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.727604] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.733176] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.738749] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.744321] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.749893] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.755468] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.761041] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.766614] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.772186] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.777757] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.783329] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.788903] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.794476] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.800049] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.805623] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.811195] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.816767] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.822339] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.827912] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.833486] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.839058] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.844631] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.850203] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.855779] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.861350] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.866923] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.872496] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.878067] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.883639] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.889213] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.894786] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.900358] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.905931] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.911506] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.917076] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.922652] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.928225] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.933795] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1770.943024] 00 00 93 00 ff ff 00 00 00 00 00 00 00 00 00 00
[ 1770.948599] 00 f0 9b 00 ff ff 00 00 00 00 80 00 00 00 00 00
[ 1770.954171] 00 00 93 00 ff ff 00 00 00 00 00 00 00 00 00 00
[ 1770.959744] 00 00 93 00 ff ff 00 00 00 00 00 00 00 00 00 00
[ 1770.965316] 00 00 93 00 ff ff 00 00 00 00 00 00 00 00 00 00
[ 1770.970890] 00 00 93 00 ff ff 00 00 00 00 00 00 00 00 00 00
[ 1770.976461] 00 00 00 00 ff ff 00 00 00 00 00 00 00 00 00 00
[ 1770.982034] 00 00 82 00 ff ff 00 00 00 00 00 00 00 00 00 00
[ 1770.987608] 00 00 00 00 ff ff 00 00 00 00 00 00 00 00 00 00
[ 1770.993180] 00 00 8b 00 ff ff 00 00 00 00 00 00 00 00 00 00
[ 1770.998753] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.004328] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.009898] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.015471] 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.021043] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.026616] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.032190] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.037764] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.043335] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.048910] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.054480] 00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00
[ 1771.060052] 00 00 00 00 00 00 00 00 10 00 00 00 00 00 00 00
[ 1771.065626] 00 04 00 00 00 00 00 00 f0 0f ff ff 00 00 00 00
[ 1771.071199] 02 00 00 00 00 00 00 00 04 b0 00 00 00 00 00 00
[ 1771.076774] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.082346] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.087919] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.093492] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.099063] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.104637] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.110208] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.115781] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.121353] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.126926] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.132501] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.138072] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.143645] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.149218] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.154792] 00 00 00 00 00 00 00 00 06 04 07 00 06 04 07 00
[ 1771.160364] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.165935] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.171511] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.177082] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.182656] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.188229] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.193801] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.199372] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.204948] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.210519] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.216090] 11 0f a0 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.221663] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.227238] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.232809] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.238382] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.243955] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.249528] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.255102] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.260674] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.266245] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.271821] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.277390] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.282966] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.288538] 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00
[ 1771.294109] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.299683] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.305256] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.310830] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.316401] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.321973] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.327546] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.333119] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.338694] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.344264] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.349837] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.355412] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.360983] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.366558] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.372128] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.377702] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.383276] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.388846] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.394419] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.399992] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.405566] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.411139] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.416711] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.422285] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.427855] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.433428] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.439001] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.444575] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.450148] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.455719] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.461294] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.466869] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.472441] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.478011] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.483584] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.489156] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.494729] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.500301] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.505875] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1771.511448] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

4.2 check the qemu-kvm log
# cat /var/log/libvirt/qemu/rhel92.log 
2022-12-14T13:23:08.702582Z qemu-kvm: vhost vring error in virtqueue 1: Invalid argument (22)
2022-12-14T13:23:08.702748Z qemu-kvm: vhost vring error in virtqueue 0: Invalid argument (22)



Actual results:
The sev domain which has a virtio-net-pci interface can not be started.

Expected results:
The sev domain which has a virtio-net-pci interface can be started.

Additional info:
(1) # virsh capabilities 
  <host>
    <uuid>4c4c4544-004a-5810-8042-c4c04f594c33</uuid>
    <cpu>
      <arch>x86_64</arch>
      <model>EPYC-Milan</model>
      <vendor>AMD</vendor>
      <microcode version='167776680'/>
      <signature family='25' model='1' stepping='1'/>
      <counter name='tsc' frequency='2994369000' scaling='yes'/>
      <topology sockets='1' dies='1' cores='16' threads='2'/>
      <maxphysaddr mode='emulate' bits='43'/>
      <feature name='ht'/>
      <feature name='monitor'/>
      <feature name='x2apic'/>
      <feature name='osxsave'/>
      <feature name='cmt'/>
      <feature name='ospke'/>
      <feature name='vaes'/>
      <feature name='vpclmulqdq'/>
      <feature name='mbm_total'/>
      <feature name='mbm_local'/>
      <feature name='cmp_legacy'/>
      <feature name='extapic'/>
      <feature name='ibs'/>
      <feature name='skinit'/>
      <feature name='wdt'/>
      <feature name='tce'/>
      <feature name='topoext'/>
      <feature name='perfctr_nb'/>
      <feature name='invtsc'/>
      <feature name='lbrv'/>
      <feature name='svm-lock'/>
      <feature name='tsc-scale'/>
      <feature name='vmcb-clean'/>
      <feature name='flushbyasid'/>
      <feature name='decodeassists'/>
      <feature name='pause-filter'/>
      <feature name='pfthreshold'/>
      <feature name='v-vmsave-vmload'/>
      <feature name='vgif'/>
      <pages unit='KiB' size='4'/>
      <pages unit='KiB' size='2048'/>
      <pages unit='KiB' size='1048576'/>
    </cpu>
    <power_management>
      <suspend_mem/>
      <suspend_disk/>
      <suspend_hybrid/>
    </power_management>
    <iommu support='yes'/>
    <migration_features>
      <live/>
      <uri_transports>
        <uri_transport>tcp</uri_transport>
        <uri_transport>rdma</uri_transport>
      </uri_transports>
    </migration_features>
    <topology>
      <cells num='1'>
        <cell id='0'>
          <memory unit='KiB'>15716024</memory>
          <pages unit='KiB' size='4'>3929006</pages>
          <pages unit='KiB' size='2048'>0</pages>
          <pages unit='KiB' size='1048576'>0</pages>
          <distances>
            <sibling id='0' value='10'/>
          </distances>
          <cpus num='32'>
            <cpu id='0' socket_id='0' die_id='0' core_id='0' siblings='0,16'/>
            <cpu id='1' socket_id='0' die_id='0' core_id='1' siblings='1,17'/>
            <cpu id='2' socket_id='0' die_id='0' core_id='2' siblings='2,18'/>
            <cpu id='3' socket_id='0' die_id='0' core_id='3' siblings='3,19'/>
            <cpu id='4' socket_id='0' die_id='0' core_id='4' siblings='4,20'/>
            <cpu id='5' socket_id='0' die_id='0' core_id='5' siblings='5,21'/>
            <cpu id='6' socket_id='0' die_id='0' core_id='6' siblings='6,22'/>
            <cpu id='7' socket_id='0' die_id='0' core_id='7' siblings='7,23'/>
            <cpu id='8' socket_id='0' die_id='0' core_id='8' siblings='8,24'/>
            <cpu id='9' socket_id='0' die_id='0' core_id='9' siblings='9,25'/>
            <cpu id='10' socket_id='0' die_id='0' core_id='10' siblings='10,26'/>
            <cpu id='11' socket_id='0' die_id='0' core_id='11' siblings='11,27'/>
            <cpu id='12' socket_id='0' die_id='0' core_id='12' siblings='12,28'/>
            <cpu id='13' socket_id='0' die_id='0' core_id='13' siblings='13,29'/>
            <cpu id='14' socket_id='0' die_id='0' core_id='14' siblings='14,30'/>
            <cpu id='15' socket_id='0' die_id='0' core_id='15' siblings='15,31'/>
            <cpu id='16' socket_id='0' die_id='0' core_id='0' siblings='0,16'/>
            <cpu id='17' socket_id='0' die_id='0' core_id='1' siblings='1,17'/>
            <cpu id='18' socket_id='0' die_id='0' core_id='2' siblings='2,18'/>
            <cpu id='19' socket_id='0' die_id='0' core_id='3' siblings='3,19'/>
            <cpu id='20' socket_id='0' die_id='0' core_id='4' siblings='4,20'/>
            <cpu id='21' socket_id='0' die_id='0' core_id='5' siblings='5,21'/>
            <cpu id='22' socket_id='0' die_id='0' core_id='6' siblings='6,22'/>
            <cpu id='23' socket_id='0' die_id='0' core_id='7' siblings='7,23'/>
            <cpu id='24' socket_id='0' die_id='0' core_id='8' siblings='8,24'/>
            <cpu id='25' socket_id='0' die_id='0' core_id='9' siblings='9,25'/>
            <cpu id='26' socket_id='0' die_id='0' core_id='10' siblings='10,26'/>
            <cpu id='27' socket_id='0' die_id='0' core_id='11' siblings='11,27'/>
            <cpu id='28' socket_id='0' die_id='0' core_id='12' siblings='12,28'/>
            <cpu id='29' socket_id='0' die_id='0' core_id='13' siblings='13,29'/>
            <cpu id='30' socket_id='0' die_id='0' core_id='14' siblings='14,30'/>
            <cpu id='31' socket_id='0' die_id='0' core_id='15' siblings='15,31'/>
          </cpus>
        </cell>
      </cells>
    </topology>
    <cache>
      <bank id='0' level='3' type='both' size='32' unit='MiB' cpus='0-3,16-19'/>
      <bank id='1' level='3' type='both' size='32' unit='MiB' cpus='4-7,20-23'/>
      <bank id='2' level='3' type='both' size='32' unit='MiB' cpus='8-11,24-27'/>
      <bank id='3' level='3' type='both' size='32' unit='MiB' cpus='12-15,28-31'/>
    </cache>
    <secmodel>
      <model>selinux</model>
      <doi>0</doi>
      <baselabel type='kvm'>system_u:system_r:svirt_t:s0</baselabel>
      <baselabel type='qemu'>system_u:system_r:svirt_tcg_t:s0</baselabel>
    </secmodel>
    <secmodel>
      <model>dac</model>
      <doi>0</doi>
      <baselabel type='kvm'>+107:+107</baselabel>
      <baselabel type='qemu'>+107:+107</baselabel>
    </secmodel>
  </host>

(2) The domain's qemu-kvm cmd line
/usr/libexec/qemu-kvm \
-name guest=rhel92,debug-threads=on \
-S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain-6-rhel92/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/edk2/ovmf/OVMF_CODE.cc.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/rhel92_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \
-machine pc-q35-rhel9.0.0,usb=off,dump-guest-core=off,memory-backend=pc.ram,confidential-guest-support=lsec0,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format \
-accel kvm \
-cpu host,migratable=on \
-m 4096 \
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":4294967296}' \
-overcommit mem-lock=off \
-smp 4,sockets=4,cores=1,threads=1 \
-uuid 2c42bf09-da31-45b5-8d82-9dea41c96661 \
-no-user-config \
-nodefaults \
-chardev socket,id=charmonitor,fd=23,server=on,wait=off \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc,driftfix=slew \
-global kvm-pit.lost_tick_policy=delay \
-no-hpet \
-no-shutdown \
-global ICH9-LPC.disable_s3=1 \
-global ICH9-LPC.disable_s4=1 \
-boot strict=on \
-device '{"driver":"pcie-root-port","port":16,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x2"}' \
-device '{"driver":"pcie-root-port","port":17,"chassis":2,"id":"pci.2","bus":"pcie.0","addr":"0x2.0x1"}' \
-device '{"driver":"pcie-root-port","port":18,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x2.0x2"}' \
-device '{"driver":"pcie-root-port","port":19,"chassis":4,"id":"pci.4","bus":"pcie.0","addr":"0x2.0x3"}' \
-device '{"driver":"pcie-root-port","port":20,"chassis":5,"id":"pci.5","bus":"pcie.0","addr":"0x2.0x4"}' \
-device '{"driver":"pcie-root-port","port":21,"chassis":6,"id":"pci.6","bus":"pcie.0","addr":"0x2.0x5"}' \
-device '{"driver":"pcie-root-port","port":22,"chassis":7,"id":"pci.7","bus":"pcie.0","addr":"0x2.0x6"}' \
-device '{"driver":"pcie-root-port","port":23,"chassis":8,"id":"pci.8","bus":"pcie.0","addr":"0x2.0x7"}' \
-device '{"driver":"pcie-root-port","port":24,"chassis":9,"id":"pci.9","bus":"pcie.0","multifunction":true,"addr":"0x3"}' \
-device '{"driver":"pcie-root-port","port":25,"chassis":10,"id":"pci.10","bus":"pcie.0","addr":"0x3.0x1"}' \
-device '{"driver":"pcie-root-port","port":26,"chassis":11,"id":"pci.11","bus":"pcie.0","addr":"0x3.0x2"}' \
-device '{"driver":"pcie-root-port","port":27,"chassis":12,"id":"pci.12","bus":"pcie.0","addr":"0x3.0x3"}' \
-device '{"driver":"pcie-root-port","port":28,"chassis":13,"id":"pci.13","bus":"pcie.0","addr":"0x3.0x4"}' \
-device '{"driver":"pcie-root-port","port":29,"chassis":14,"id":"pci.14","bus":"pcie.0","addr":"0x3.0x5"}' \
-device '{"driver":"qemu-xhci","p2":15,"p3":15,"id":"usb","bus":"pci.4","addr":"0x0"}' \
-device '{"driver":"virtio-scsi-pci","iommu_platform":true,"id":"scsi0","bus":"pci.2","addr":"0x0"}' \
-device '{"driver":"virtio-serial-pci","iommu_platform":true,"id":"virtio-serial0","bus":"pci.3","addr":"0x0"}' \
-blockdev '{"driver":"file","filename":"/home/kvm_autotest_root/images/rhel920-64-virtio-scsi.qcow2","aio":"threads","node-name":"libvirt-1-storage","cache":{"direct":true,"no-flush":false},"auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-1-format","read-only":false,"cache":{"direct":true,"no-flush":false},"driver":"qcow2","file":"libvirt-1-storage","backing":null}' \
-device '{"driver":"scsi-hd","bus":"scsi0.0","channel":0,"scsi-id":0,"lun":0,"device_id":"drive-scsi0-0-0-0","drive":"libvirt-1-format","id":"scsi0-0-0-0","bootindex":1,"write-cache":"on"}' \
-netdev tap,fd=24,vhost=on,vhostfd=26,id=hostnet0 \
-device '{"driver":"virtio-net-pci","iommu_platform":true,"netdev":"hostnet0","id":"net0","mac":"52:54:00:00:92:92","bus":"pci.1","addr":"0x0"}' \
-chardev pty,id=charserial0 \
-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
-chardev socket,id=charchannel0,fd=22,server=on,wait=off \
-device '{"driver":"virtserialport","bus":"virtio-serial0.0","nr":1,"chardev":"charchannel0","id":"channel0","name":"org.qemu.guest_agent.0"}' \
-chardev socket,id=chrtpm,path=/run/libvirt/qemu/swtpm/6-rhel92-swtpm.sock \
-tpmdev emulator,id=tpm-tpm0,chardev=chrtpm \
-device '{"driver":"tpm-crb","tpmdev":"tpm-tpm0","id":"tpm0"}' \
-device '{"driver":"usb-tablet","id":"input0","bus":"usb.0","port":"1"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-vnc 0.0.0.0:92,audiodev=audio1 \
-device '{"driver":"virtio-vga","iommu_platform":true,"id":"video0","max_outputs":1,"bus":"pcie.0","addr":"0x1"}' \
-device '{"driver":"virtio-balloon-pci","iommu_platform":true,"id":"balloon0","bus":"pci.5","addr":"0x0"}' \
-object '{"qom-type":"rng-random","id":"objrng0","filename":"/dev/random"}' \
-device '{"driver":"virtio-rng-pci","iommu_platform":true,"rng":"objrng0","id":"rng0","bus":"pci.6","addr":"0x0"}' \
-object '{"qom-type":"sev-guest","id":"lsec0","cbitpos":51,"reduced-phys-bits":1,"policy":7}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on

(3) We can check the host's BIOS setup about SEV from https://dell-per7525-15-idrac.lab.eng.pek2.redhat.com/  
related idrac's username/password: root/calvin

(4)
The domain can be started successfully after removing the virtio-net-pci interface.

(5)
The key domain xml:
  <os>
    <type arch='x86_64' machine='pc-q35-rhel9.0.0'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/edk2/ovmf/OVMF_CODE.cc.fd</loader>
    <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.fd'>/var/lib/libvirt/qemu/nvram/rhel92_VARS.fd</nvram>
    <boot dev='hd'/>
   </os>
     <interface type='bridge'>
      <mac address='52:54:00:00:92:92'/>
      <source bridge='switch'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <driver iommu='on'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
    </interface>
   <launchSecurity type='sev'>
    <cbitpos>51</cbitpos>
    <reducedPhysBits>1</reducedPhysBits>
    <policy>0x0007</policy>
  </launchSecurity>

Comment 1 Lei Yang 2022-12-14 14:08:20 UTC
Hi YangHang

Could you please help test the scenario without sev?

Thanks
Lei

Comment 2 zixchen 2022-12-15 06:02:20 UTC
Hi Yanghang, could you please check the following steps to see if these fix your issue? My test on sev guest works well with virtio-net-pci interface.
1. Please check if you add <rom enabled='no'/> in sev guest XML, as disable the iPXE option ROM as iPXE is not aware of SEV. 
2. Enabling sev doesn't need to add iommu=on option for every device, sev guest will turn on this option automatically. 
3. --launchSecurity sev will enable sev-es guest by default, but in kernel option you just enable kvm_amd.sev, you may also need to add kvm_amd.sev-es=1. After this, if your host dmesg doesn't have msg like 'SEV-ES supported: 99 ASIDs', then you need to check if BIOs enabled SEV-ES or not. 

Example XML:
<domain type='kvm' id='12'>
  <name>rhel91_vm</name>
  <uuid>7fc4c112-c7e5-4199-80d2-b90da6be15d8</uuid>
  <metadata>
    <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
      <libosinfo:os id="http://redhat.com/rhel/9.0"/>
    </libosinfo:libosinfo>
  </metadata>
  <memory unit='KiB'>4194304</memory>
  <currentMemory unit='KiB'>4194304</currentMemory>
  <memtune>
    <hard_limit unit='KiB'>4718592</hard_limit>
  </memtune>
  <vcpu placement='static'>4</vcpu>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-q35-rhel9.0.0'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/edk2/ovmf/OVMF_CODE.cc.fd</loader>
    <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.fd'>/var/lib/libvirt/qemu/nvram/rhel91_vm_VARS.fd</nvram>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='custom' match='exact' check='full'>
    <model fallback='forbid'>EPYC-Milan</model>
    <vendor>AMD</vendor>
    <topology sockets='1' dies='1' cores='4' threads='1'/>
    <feature policy='require' name='x2apic'/>
    <feature policy='require' name='tsc-deadline'/>
    <feature policy='require' name='hypervisor'/>
    <feature policy='require' name='tsc_adjust'/>
    <feature policy='require' name='vaes'/>
    <feature policy='require' name='vpclmulqdq'/>
    <feature policy='require' name='spec-ctrl'/>
    <feature policy='require' name='stibp'/>
    <feature policy='require' name='arch-capabilities'/>
    <feature policy='require' name='ssbd'/>
    <feature policy='require' name='cmp_legacy'/>
    <feature policy='require' name='virt-ssbd'/>
    <feature policy='disable' name='lbrv'/>
    <feature policy='disable' name='tsc-scale'/>
    <feature policy='disable' name='vmcb-clean'/>
    <feature policy='disable' name='pause-filter'/>
    <feature policy='disable' name='pfthreshold'/>
    <feature policy='disable' name='v-vmsave-vmload'/>
    <feature policy='disable' name='vgif'/>
    <feature policy='require' name='rdctl-no'/>
    <feature policy='require' name='skip-l1dfl-vmentry'/>
    <feature policy='require' name='mds-no'/>
    <feature policy='require' name='pschange-mc-no'/>
    <feature policy='disable' name='svm'/>
    <feature policy='require' name='topoext'/>
    <feature policy='disable' name='npt'/>
    <feature policy='disable' name='nrip-save'/>
    <feature policy='disable' name='svme-addr-chk'/>
  </cpu>
  <clock offset='utc'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <pm>
    <suspend-to-mem enabled='no'/>
    <suspend-to-disk enabled='no'/>
  </pm>
  <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='none'/>
      <source file='/home/rhel91_vm.qcow2' index='1'/>
      <backingStore/>
      <target dev='sda' bus='scsi'/>
      <alias name='scsi0-0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <controller type='scsi' index='0' model='virtio-scsi'>
      <alias name='scsi0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    </controller>
    <controller type='usb' index='0' model='qemu-xhci' ports='15'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
    </controller>
    <controller type='pci' index='0' model='pcie-root'>
      <alias name='pcie.0'/>
    </controller>
    <controller type='pci' index='1' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='1' port='0x10'/>
      <alias name='pci.1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/>
    </controller>
    <controller type='pci' index='2' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='2' port='0x11'/>
      <alias name='pci.2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
    </controller>
    <controller type='pci' index='3' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='3' port='0x12'/>
      <alias name='pci.3'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>
    </controller>
    <controller type='pci' index='4' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='4' port='0x13'/>
      <alias name='pci.4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
    </controller>
    <controller type='pci' index='5' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='5' port='0x14'/>
      <alias name='pci.5'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x4'/>
    </controller>
    <controller type='pci' index='6' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='6' port='0x15'/>
      <alias name='pci.6'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x5'/>
    </controller>
    <controller type='pci' index='7' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='7' port='0x16'/>
      <alias name='pci.7'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x6'/>
    </controller>
    <controller type='pci' index='8' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='8' port='0x17'/>
      <alias name='pci.8'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x7'/>
    </controller>
    <controller type='pci' index='9' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='9' port='0x18'/>
      <alias name='pci.9'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0' multifunction='on'/>
    </controller>
    <controller type='pci' index='10' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='10' port='0x19'/>
      <alias name='pci.10'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x1'/>
    </controller>
    <controller type='pci' index='11' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='11' port='0x1a'/>
      <alias name='pci.11'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x2'/>
    </controller>
    <controller type='pci' index='12' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='12' port='0x1b'/>
      <alias name='pci.12'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x3'/>
    </controller>
    <controller type='pci' index='13' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='13' port='0x1c'/>
      <alias name='pci.13'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x4'/>
    </controller>
    <controller type='pci' index='14' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='14' port='0x1d'/>
      <alias name='pci.14'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x5'/>
    </controller>
    <controller type='sata' index='0'>
      <alias name='ide'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:56:00:00:00:02'/>
      <source bridge='br3'/>
      <target dev='vnet10'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <rom enabled='no'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
    </interface>
    <serial type='file'>
      <source path='/mnt/tests/distribution/virt/install/guests/rhel91_vm/logs/rhel91_vm_console.log'/>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
      </target>
      <alias name='serial0'/>
    </serial>
    <serial type='pty'>
      <source path='/dev/pts/0'/>
      <target type='isa-serial' port='1'>
        <model name='isa-serial'/>
      </target>
      <alias name='serial1'/>
    </serial>
    <console type='file'>
      <source path='/mnt/tests/distribution/virt/install/guests/rhel91_vm/logs/rhel91_vm_console.log'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-12-rhel91_vm/org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0' state='connected'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='tablet' bus='usb'>
      <alias name='input0'/>
      <address type='usb' bus='0' port='1'/>
    </input>
    <input type='mouse' bus='ps2'>
      <alias name='input1'/>
    </input>
    <input type='keyboard' bus='ps2'>
      <alias name='input2'/>
    </input>
    <tpm model='tpm-crb'>
      <backend type='emulator' version='2.0'/>
      <alias name='tpm0'/>
    </tpm>
    <graphics type='vnc' port='5900' autoport='yes' listen='0.0.0.0'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
    <audio id='1' type='none'/>
    <video>
      <model type='virtio' heads='1' primary='yes'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
    </memballoon>
    <rng model='virtio'>
      <backend model='random'>/dev/random</backend>
      <alias name='rng0'/>
      <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
    </rng>
  </devices>
  <seclabel type='dynamic' model='selinux' relabel='yes'>
    <label>system_u:system_r:svirt_t:s0:c160,c303</label>
    <imagelabel>system_u:object_r:svirt_image_t:s0:c160,c303</imagelabel>
  </seclabel>
  <seclabel type='dynamic' model='dac' relabel='yes'>
    <label>+107:+107</label>
    <imagelabel>+107:+107</imagelabel>
  </seclabel>
  <launchSecurity type='sev'>
    <cbitpos>51</cbitpos>
    <reducedPhysBits>1</reducedPhysBits>
    <policy>0x0007</policy>
  </launchSecurity>
</domain>

Comment 3 Yanghang Liu 2023-01-05 08:11:04 UTC
> The sev domain which has a virtio-net-pci interface can not be started.
> the related qemu-kvm error info : qemu-kvm: vhost vring error in virtqueue 1: Invalid argument (22)

I saw there is a new similar bug opened by Lei but I am not sure if the root cause is the same: 
Bug 2156876 - [virtual network][rhel7.9_guest] qemu-kvm: vhost vring error in virtqueue 1: Invalid argument (22)

Comment 5 Yanghang Liu 2023-01-05 10:49:02 UTC

> 1. Please check if you add <rom enabled='no'/> in sev guest XML, as disable the iPXE option ROM as iPXE is not aware of SEV. 

No. The related interface xml is as following:

   <interface type='bridge'>
      <mac address='52:54:00:00:92:92'/>
      <source bridge='switch'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <driver iommu='on'/>
      <alias name='net0'/>
    </interface>

Just as the full qemu-kvm cmd line we can see in the commnet 0, I do not enable any rombar cfg.

> 2. Enabling sev doesn't need to add iommu=on option for every device, sev guest will turn on this option automatically. 

I think the SEV domain should be started successfully ,regardless of whether I manually add iommu for each device or not.

From Bug 2156876, I notice that Lei have used iommu device and enable iommu for virtio-net-pci interface in his domain.

We need to further confirm whether it is a problem with virtio-net-pci + iommu 

> 3. --launchSecurity sev will enable sev-es guest by default, but in kernel option you just enable kvm_amd.sev, you may also need to add kvm_amd.sev-es=1. After this, if your host dmesg doesn't have msg like 'SEV-ES supported: 99 ASIDs', then you need to check if BIOs enabled SEV-ES or not. 


I think when I got <sev supported='yes'> , I should have met the prerequisites to start a SEV domain.

I have tried to add kvm_amd.sev-es=1 into my kernel option, but I still can reproduce this problem.


The detailed test step is as following:
[1] setup the sev test env on a amd eypc-milan host

# cat /proc/cmdline 
 iommu=pt mem_encrypt=on kvm_amd.sev=1 kvm_amd.sev-es=1 amd_iommu=on default_hugepagesz=1G

# dmesg | grep -i sev
[    7.428664] ccp 0000:44:00.1: sev enabled
[    7.532033] ccp 0000:44:00.1: SEV API:1.52 build:4
[   23.799273] SEV supported: 508 ASIDs
[   23.802849] SEV-ES supported: 1 ASIDs

# virsh domcapabilities
...
    <sev supported='yes'>

[2] import a SEV domain with a virtio-net-pci interface
# virt-install --name rhel92 --machine=q35 --memory 4096 --memtune hard_limit=4718592 --vcpus=4 --boot uefi --disk path=/home/kvm_autotest_root/images/rhel920-64-virtio-scsi.qcow2,bus=scsi,cache=none,format=qcow2,io=threads,size=20 --controller type=scsi,model=virtio-scsi,driver.iommu=on --graphics type=vnc,port=5992,listen=0.0.0.0 --video virtio,driver.iommu=on --controller type=virtio-serial,driver.iommu=on --rng type=/dev/random,driver.iommu=on --memballoon driver.iommu=on --launchSecurity sev --network bridge=switch,model=virtio,mac=52:54:00:00:92:92,driver.iommu=on --serial pty --console pty --import --noreboot --noautoconsole --os-variant rhel9.2


[3] start the SEV domain 
# virsh start rhel92  <-- The domain can not be started successfully

[4] check the related info
4.1 the host dmesg
4.2 check the qemu-kvm log
# cat /var/log/libvirt/qemu/rhel92.log 
2023-01-05T10:13:37.629405Z qemu-kvm: vhost vring error in virtqueue 1: Invalid argument (22)
2023-01-05T10:13:37.629501Z qemu-kvm: vhost vring error in virtqueue 0: Invalid argument (22)
2023-01-05T10:13:37.629520Z qemu-kvm: vhost vring error in virtqueue 0: Invalid argument (22)
2023-01-05T10:13:37.629557Z qemu-kvm: vhost vring error in virtqueue 0: Invalid argument (22)
2023-01-05T10:13:37.629597Z qemu-kvm: vhost vring error in virtqueue 0: Invalid argument (22)
2023-01-05T10:13:37.629639Z qemu-kvm: vhost vring error in virtqueue 0: Invalid argument (22)
2023-01-05T10:13:37.629681Z qemu-kvm: vhost vring error in virtqueue 0: Invalid argument (22)
2023-01-05T10:13:37.629722Z qemu-kvm: vhost vring error in virtqueue 0: Invalid argument (22)

Comment 6 zixchen 2023-01-09 12:36:29 UTC
Thanks Yanghang for sharing his testing environment with me, with the correct sev config as below, VM can boot ok with sev-es enabled.
# virt-install --name rhel92 --machine=q35 --memory 4096 --memtune hard_limit=4718592 --vcpus=4 --boot loader=/usr/share/edk2/ovmf/OVMF_CODE.cc.fd,loader_ro=yes,loader_type=pflash,nvram.template=/usr/share/edk2/ovmf/OVMF_VARS.fd --disk path=/home/kvm_autotest_root/images/rhel920-64-virtio-scsi.qcow2,bus=scsi,cache=none,format=qcow2,io=threads,size=20 --controller type=scsi,model=virtio-scsi,driver.iommu=on --graphics type=vnc,port=5992,listen=0.0.0.0 --video virtio,driver.iommu=on --controller type=virtio-serial,driver.iommu=on --rng type=/dev/random,driver.iommu=on --memballoon driver.iommu=on --launchSecurity sev --network bridge=switch,model=virtio,mac=52:54:00:00:92:92,driver.iommu=on --serial pty --console pty --import --noreboot --noautoconsole --os-variant rhel9.2

Version:
qemu-kvm-7.1.0-6.el9.x86_64
libvirt-8.10.0-2.el9.x86_64
5.14.0-210.el9.x86_64
edk2-ovmf-20220826gitba0e0e4c6a-2.el9.noarch


1. --launchSecurity sev, this will enable sev-es guest. 2. With the reported qemu-kvm and edk2 versions, sev-es guest can't use --boot uefi, as this will use OVMF binary /usr/share/edk2/ovmf/OVMF_CODE.secboot.fd and /usr/share/edk2/ovmf/OVMF_CODE.secboot.fd. Check below OVMF json file, it only supports amd-sev. 
# cat /usr/share/qemu/firmware/40-edk2-ovmf-sb.json 
{
    "description": "OVMF with SB+SMM, SB enabled, MS certs enrolled",
    "interface-types": [
        "uefi"
    ],
    "mapping": {
        "device": "flash",
        "executable": {
            "filename": "/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd",
            "format": "raw"
        },
        "nvram-template": {
            "filename": "/usr/share/edk2/ovmf/OVMF_VARS.secboot.fd",
            "format": "raw"
        }
    },
    "targets": [
        {
            "architecture": "x86_64",
            "machines": [
                "pc-q35-*"
            ]
        }
    ],
    "features": [
        "acpi-s3",
        "amd-sev",
        "enrolled-keys",
        "requires-smm",
        "secure-boot",
        "verbose-dynamic"
    ],
    "tags": [

    ]
}

To support amd-sev-es it should use /usr/share/edk2/ovmf/OVMF_CODE.cc.fd.
# cat /usr/share/qemu/firmware/50-edk2-ovmf-cc.json 
{
    "description": "OVMF with SEV-ES support",
    "interface-types": [
        "uefi"
    ],
    "mapping": {
        "device": "flash",
        "executable": {
            "filename": "/usr/share/edk2/ovmf/OVMF_CODE.cc.fd",
            "format": "raw"
        },
        "nvram-template": {
            "filename": "/usr/share/edk2/ovmf/OVMF_VARS.fd",
            "format": "raw"
        }
    },
    "targets": [
        {
            "architecture": "x86_64",
            "machines": [
                "pc-q35-rhel8.5.0",
                "pc-q35-rhel8.6.0",
                "pc-q35-rhel9.*"
            ]
        }
    ],
    "features": [
        "amd-sev",
        "amd-sev-es",
        "verbose-dynamic"
    ],
    "tags": [

    ]
}

Comment 9 Yanghang Liu 2023-01-10 04:22:04 UTC
(In reply to zixchen from comment #6)
Hi Zixi,

> virt-install --name rhel92 --machine=q35 --memory 4096 --memtune hard_limit=4718592 --vcpus=4 --boot 
> loader=/usr/share/edk2/ovmf/OVMF_CODE.cc.fd,loader_ro=yes,loader_type=pflash,nvram.template=/usr/share/edk2/ovmf/OVMF_VARS.fd --disk path=/home/kvm_autotest_root/images/rhel920-64-virtio- 
> scsi.qcow2,bus=scsi,cache=none,format=qcow2,io=threads,size=20 --controller type=scsi,model=virtio-scsi,driver.iommu=on --graphics type=vnc,port=5992,listen=0.0.0.0 --video virtio,driver.iommu=on --controller 
> type=virtio-serial,driver.iommu=on --rng type=/dev/random,driver.iommu=on --memballoon driver.iommu=on --launchSecurity sev --network bridge=switch,model=virtio,mac=52:54:00:00:92:92,driver.iommu=on --serial pty > --console pty --import --noreboot --noautoconsole --os-variant rhel9.2

The diff between my virt-install cmd and Zixi's one is:
[1]--boot loader=/usr/share/edk2/ovmf/OVMF_CODE.cc.fd,loader_ro=yes,loader_type=pflash,nvram.template=/usr/share/edk2/ovmf/OVMF_VARS.fd
[2]--boot uefi

> Version:
> qemu-kvm-7.1.0-6.el9.x86_64
> libvirt-8.10.0-2.el9.x86_64
> 5.14.0-210.el9.x86_64
> edk2-ovmf-20220826gitba0e0e4c6a-2.el9.noarch
> 
> 
> 1. --launchSecurity sev, this will enable sev-es guest. 
> 2. With the reported qemu-kvm and edk2 versions, sev-es guest can't use --boot uefi, as this will use OVMF binary /usr/share/edk2/ovmf/OVMF_CODE.secboot.fd and /usr/share/edk2/ovmf/OVMF_CODE.secboot.fd. 
> Check below OVMF json file, it only supports amd-sev. 

The comment0 show the OVMF binary I used is always /usr/share/edk2/ovmf/OVMF_CODE.cc.fd, which supports both amd-sev and amd-sev-es.

Comment 10 zixchen 2023-01-10 07:47:13 UTC
Ynaghang you are right about the OVMF binary. 
In comment0, there are two issues, the first is 
# cat /var/log/libvirt/qemu/rhel92.log 
2022-12-14T13:23:08.702582Z qemu-kvm: vhost vring error in virtqueue 1: Invalid argument (22)
2022-12-14T13:23:08.702748Z qemu-kvm: vhost vring error in virtqueue 0: Invalid argument (22)
According to https://libvirt.org/kbase/launch_security_sev.html#virtio-net, it should add "<rom enabled='no'/>". The issue is gone.

The second issue is host kernel msg, reports:
[ 1769.210697] 00 00 93 00 ff ff 00 00 00 00 00 00 00 00 00 00
[ 1769.216274] 00 f0 9b 00 ff ff 00 00 00 00 ff ff 00 00 00 00
[ 1769.221847] 00 00 93 00 ff ff 00 00 00 00 00 00 00 00 00 00
...
This is because in your test server, TSME is turned on, according to dell-r7525 bios guide(https://www.dell.com/support/manuals/en-sg/poweredge-r7525/r7525_bios_ism_pub/processor-settings?guid=guid-ec36d324-4f45-4bc1-bb51-de2db7cc5cd9&lang=en-us), this should be disabled if SEV enabled. I disabled TSME in your test server, the kernel msg issue no longer exists.

The 2 issues are not product bugs, suggests close it as NOTABUG.

Comment 11 Yanghang Liu 2023-01-11 04:07:33 UTC
(In reply to zixchen from comment #10)
Thanks Zixi for the info, which is helpful for narrowing down my issue.

However I still have following things need to be confirmed:

> In comment0, there are two issues, the first is 
> # cat /var/log/libvirt/qemu/rhel92.log 
> 2022-12-14T13:23:08.702582Z qemu-kvm: vhost vring error in virtqueue 1:
> Invalid argument (22)
> 2022-12-14T13:23:08.702748Z qemu-kvm: vhost vring error in virtqueue 0:
> Invalid argument (22)
> According to https://libvirt.org/kbase/launch_security_sev.html#virtio-net,
> it should add "<rom enabled='no'/>". The issue is gone.

The test result in the current test environment(edk2-ovmf-20220826gitba0e0e4c6a-2.el9.noarch):
  [1.1] start a SEV domain with a virtio interface(using the default rombar value) --- FAIL
  [1.2] start a SEV domain with a <rom enabled='no'/> virtio interface --- PASS

The test result after I updated the edk2-ovmf to edk2-ovmf-20221207gitfff6d81270b5-1.el9.noarch
  [2.1] start a SEV domain with a virtio interface(using the default rombar value) --- PASS
  [2.2] start a SEV domain with a <rom enabled='no'/> virtio interface --- PASS

The test result I runned before RHEL9.2:
  [3.1] start a SEV domain with a virtio interface(using the default rombar value) --- PASS

As we can see among test result [1.1] [2.1] [3.1], it seems to me that there should be code changes/bug fixes about my issue.

It should be better to decide what resolution this bug can be closed as after the developer help confirm about that.

> The second issue is host kernel msg, reports:
> [ 1769.210697] 00 00 93 00 ff ff 00 00 00 00 00 00 00 00 00 00
> [ 1769.216274] 00 f0 9b 00 ff ff 00 00 00 00 ff ff 00 00 00 00
> [ 1769.221847] 00 00 93 00 ff ff 00 00 00 00 00 00 00 00 00 00
> ...
> This is because in your test server, TSME is turned on, according to
> dell-r7525 bios
> guide(https://www.dell.com/support/manuals/en-sg/poweredge-r7525/
> r7525_bios_ism_pub/processor-settings?guid=guid-ec36d324-4f45-4bc1-bb51-
> de2db7cc5cd9&lang=en-us), this should be disabled if SEV enabled. I disabled
> TSME in your test server, the kernel msg issue no longer exists.

I have rebooted my test machine and repeated the reproducer again, but my test result shows the above kernel msg issue still exists.

Current Transparent Secure Memory Encryption Settings : Disabled

# dmesg
[  824.809780] 00 00 93 00 ff ff 00 00 00 00 00 00 00 00 00 00
[  824.815360] 00 f0 9b 00 ff ff 00 00 00 00 ff ff 00 00 00 00
[  824.820934] 00 00 93 00 ff ff 00 00 00 00 00 00 00 00 00 00
[  824.826504] 00 00 93 00 ff ff 00 00 00 00 00 00 00 00 00 00
[  824.832079] 00 00 93 00 ff ff 00 00 00 00 00 00 00 00 00 00
[  824.837649] 00 00 93 00 ff ff 00 00 00 00 00 00 00 00 00 00
...

Comment 12 zixchen 2023-01-11 10:27:19 UTC
Kernel dmesg error is another issue, create a new bug to track
Bug 2160005 - Host kernel dmesg reports numbers 00 00 93 00 ff ff 00 00 00 00 00 00 00 00 00 00 when boot sev-es guest

Comment 13 Laurent Vivier 2023-02-06 17:58:09 UTC
According to comment #10 I think this BZ should be closed as the virtio-net ROM didn't support SEV.

As it seems fixed in edk2-ovmf-20221207gitfff6d81270b5-1 perhaps it can be closed as CURRENTRELEASE?

Perhaps Gerd can give us more details about SEV support in edk2?

Comment 14 zixchen 2023-02-07 01:36:33 UTC
(In reply to Laurent Vivier from comment #13)
> According to comment #10 I think this BZ should be closed as the virtio-net
> ROM didn't support SEV.
> 
> As it seems fixed in edk2-ovmf-20221207gitfff6d81270b5-1 perhaps it can be
> closed as CURRENTRELEASE?
> 

> Perhaps Gerd can give us more details about SEV support in edk2?

Thanks Laurent, I agree, 'romfile=""' is a known workaround to enable SEV with virtio-net and this should be fixed with qemu7.2, on the reported qemu7.1 version, ROM option must be added to enable SEV, so this should be closed as NOTABUG.

Comment 15 Yanghang Liu 2023-02-07 02:04:43 UTC
This issue can be reproduced in the qemu-kvm-7.2.0-5.el9.x86_64 + edk2-ovmf-20221207gitfff6d81270b5-1.

And the same test case runs normally before the RHEL9.1 and RHEL9.0 tests. 

I think it's a high + regression + blocker issue for my part at my test time.

Why we close it before getting the confirmation ?

Comment 17 Yanghang Liu 2023-02-07 02:25:14 UTC
After getting the agreement with Zixi, I will take this bug first before getting the confirmation from developer.

Comment 18 Yanghang Liu 2023-02-07 04:22:18 UTC
(In reply to Laurent Vivier from comment #13)

> According to comment #10 I think this BZ should be closed as the virtio-net ROM didn't support SEV.
> According to https://libvirt.org/kbase/launch_security_sev.html#virtio-net, it should add "<rom enabled='no'/>"

libvirt.org is facing the upstream community and I am not sure if the doc here is updated timely and can be applied to downstream.

The section which indicates the virtio-net-pci needs <rom enabled='no'/> was added more than two years ago, 

but my previous test result in RHEL9.1/RHEL8.7 shows the domain works well without <rom enabled='no'/> actually. 

Just waiting for the confirmation from developer before we make a decision to this bug.

> As it seems fixed in edk2-ovmf-20221207gitfff6d81270b5-1 perhaps it can be closed as CURRENTRELEASE?

> Perhaps Gerd can give us more details about SEV support in edk2?

Comment 19 Laurent Vivier 2023-02-07 08:16:43 UTC
(In reply to Yanghang Liu from comment #15)
> This issue can be reproduced in the qemu-kvm-7.2.0-5.el9.x86_64 +
> edk2-ovmf-20221207gitfff6d81270b5-1.
> 

I don't understand, in comment #11, you say edk2-ovmf-20221207gitfff6d81270b5-1.el9.noarch works well.
Could you explain?

Comment 20 Yanghang Liu 2023-02-07 08:26:16 UTC
(In reply to Laurent Vivier from comment #19)
> (In reply to Yanghang Liu from comment #15)
> > This issue can be reproduced in the qemu-kvm-7.2.0-5.el9.x86_64 +
> > edk2-ovmf-20221207gitfff6d81270b5-1.
> > 
> 
> I don't understand, in comment #11, you say
> edk2-ovmf-20221207gitfff6d81270b5-1.el9.noarch works well.
> Could you explain?

Oh Sorry,

Thanks for point this out.

It is typo.  I copy the wrong edk2-ovmf version here.

It should be  "This bug can still be reproduce in qemu-kvm-7.2.0-5.el9.x86_64 + *edk2-ovmf-20220826gitba0e0e4c6a-2.el9*"

This issue is always gone with *edk2-ovmf-20221207gitfff6d81270b5-1.el9*

Comment 21 Laurent Vivier 2023-02-07 08:52:28 UTC
So what I understand:

1- RHEL 9.2.0: it works well, no regression, no test blocker

2- previous revisions: works well if used with romfile="" or <rom enabled='no'/>

Perhaps Daniel or Dave can help to say if this BZ could be closed or not.

Comment 22 Yanghang Liu 2023-02-07 09:06:12 UTC
(In reply to Laurent Vivier from comment #21)
> So what I understand:
> 
> 1- RHEL 9.2.0: it works well, no regression, no test blocker
> 
> 2- previous revisions: works well if used with romfile="" or <rom
> enabled='no'/>


Just highlight my test result again: 

The test result in RHEL9.2 + qemu-kvm 7.2 + edk2-ovmf-20220826gitba0e0e4c6a-2.el9:
  [1.1] start a SEV domain with a virtio interface (without <rom enabled='no'/> setting) --- FAIL
  [1.2] start a SEV domain with a <rom enabled='no'/> virtio interface --- PASS

The test result after I updated the edk2-ovmf to edk2-ovmf-20221207gitfff6d81270b5-1.el9
  [2.1] start a SEV domain with a virtio interface (without <rom enabled='no'/> setting) --- PASS
  [2.2] start a SEV domain with a <rom enabled='no'/> virtio interface --- PASS

The test result I runned before RHEL9.2:
  [3.1] start a SEV domain with a virtio interface (without <rom enabled='no'/> setting) --- PASS


> Perhaps Daniel or Dave can help to say if this BZ could be closed or not.

Comment 23 Dr. David Alan Gilbert 2023-02-07 10:42:47 UTC
I'm not seeing any obvious patch that would have fixed it.

Comment 24 zixchen 2023-02-10 02:59:29 UTC
Hi Laszlo, could you help to check romfile="" usage on Yanghang mentioned # comment 22?

Comment 25 Laszlo Ersek 2023-02-13 10:04:40 UTC
Is your question why <rom enabled='no'/> became *temporarily requried* in the middle?

I don't know. I don't know of anything that would make <rom enabled='no'/> *superfluous* for a SEV domain, in any case. AFAICT, <rom enabled='no'/> remains necessary to this day.

In other words, I don't understand results [2.1] and [3.1] from comment 22. To my understanding, iPXE has no support for SEV, so you still need to disable it.

In cases [2.1] and [3.1], perhaps something *other* than <rom enabled='no'/> prevented OVMF from launching the iPXE EFI oprom. I suggest comparing the OVMF debug logs. And/or, it should always be possible to use (reverse) bisection on OVMF to find a commit that perhaps lifted the requirement for <rom enabled='no'/>.

Comment 26 Laszlo Ersek 2023-02-13 10:16:06 UTC
Also my last memories have been that vhost does not work in this context, i.e. that <driver name='qemu' iommu='on'/> is necessary too, for forcing the QEMU-provided device model.

Comment 27 Gerd Hoffmann 2023-02-13 10:41:22 UTC
(In reply to Dr. David Alan Gilbert from comment #23)
> I'm not seeing any obvious patch that would have fixed it.

Latest OVMF will not load option rpms in case confidential computing is enabled.

https://github.com/tianocore/edk2/commit/c477b2783f6d95b62266f4fff9b0c286ac1d7bb8
implements it for TDX.

https://github.com/tianocore/edk2/commit/18b5b14932d1a90bceb928ca553851078bd19ca1
expands it to also cover SEV.

Comment 28 Gerd Hoffmann 2023-02-13 10:42:14 UTC
s/rpms/roms/

Comment 29 Laszlo Ersek 2023-02-13 16:05:20 UTC
(In reply to Gerd Hoffmann from comment #27)
> (In reply to Dr. David Alan Gilbert from comment #23)
> > I'm not seeing any obvious patch that would have fixed it.
> 
> Latest OVMF will not load option rpms in case confidential computing is
> enabled.
> 
> https://github.com/tianocore/edk2/commit/
> c477b2783f6d95b62266f4fff9b0c286ac1d7bb8
> implements it for TDX.
> 
> https://github.com/tianocore/edk2/commit/
> 18b5b14932d1a90bceb928ca553851078bd19ca1
> expands it to also cover SEV.

That explains it, thanks.

... I agree this is a practical solution for now, but for the long-term, I'd say it's a bit heavy-handed. Option ROMs can be covered by both Secure Boot and TPM measurements, so the guest firmware should be able to decide with finer granularity whether the option ROM is welcome or not. Cf. commit 6041ac65ae87 (and then 1958124a6cb0, which is unrelated to SEV, but still relevant for completing 6041ac65ae87). I do agree though that until/unless the varstore is exclusively controlled by the guest owner, SB is insufficient for deciding about option ROMs.

Either way this should be NOTABUG.

Comment 30 Laurent Vivier 2023-02-15 10:48:03 UTC
Closing as NOTABUG


Note You need to log in before you can comment on or make changes to this bug.