Bug 1729399 - SEV guest reboot hang after hot plug 2 VFs
Summary: SEV guest reboot hang after hot plug 2 VFs
Keywords:
Status: CLOSED DUPLICATE of bug 1714978
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: qemu-kvm
Version: 8.1
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Amnon Ilan
QA Contact: Pei Zhang
URL:
Whiteboard:
Depends On: 1714978 1729396
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-12 08:01 UTC by Pei Zhang
Modified: 2019-07-15 01:53 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1729396
Environment:
Last Closed: 2019-07-15 01:53:58 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)

Description Pei Zhang 2019-07-12 08:01:30 UTC
+++ This bug was initially created as a clone of Bug #1729396 +++

Description of problem:
Boot Guest with SEV, then hot plug 2 VF devices, guest will hang after reboot.

Version-Release number of selected component (if applicable):
4.18.0-114.el8.x86_64
qemu-kvm-4.0.0-5.module+el8.1.0+3622+5812d9bf.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Boot guest with SEV

# /usr/libexec/qemu-kvm \
-enable-kvm \
-cpu EPYC \
-smp 4 \
-m 4G \
-smp 4,sockets=1,cores=4,threads=1 \
-object sev-guest,id=sev0,cbitpos=47,reduced-phys-bits=1 \
-machine q35,memory-encryption=sev0 \
-drive if=pflash,format=raw,unit=0,file=/usr/share/edk2/ovmf/sev/OVMF_CODE.secboot.fd,readonly \
-drive if=pflash,format=raw,unit=1,file=/usr/share/edk2/ovmf/sev/OVMF_VARS.fd \
-device pcie-root-port,id=root.1,chassis=1 \
-device pcie-root-port,id=root.2,chassis=2 \
-device pcie-root-port,id=root.3,chassis=3 \
-device pcie-root-port,id=root.4,chassis=4 \
-device pcie-root-port,id=root.5,chassis=5 \
-device virtio-scsi-pci,iommu_platform=on,id=scsi0,bus=root.1,addr=0x0 \
-drive file=/home/sev_guest.qcow2,format=qcow2,if=none,id=drive-scsi0-0-0-0 \
-device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scssi0-0-0-0,bootindex=1 \
-netdev tap,id=hostnet0,vhost=off \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=18:66:da:57:dd:03,bus=root.2,iommu_platform=true \
-vnc :0 \
-monitor stdio \
-serial unix:/tmp/console,server,nowait \

2. Create 2 VFs from 1 PF and bind 2 VFs to vfio-pci driver

# echo 2 > /sys/bus/pci/devices/0000\:e3\:00.0/sriov_numvfs 

2. Hot plug 2 vfio-pci NIC devices

# lspci | grep Eth
...
e3:00.0 Ethernet controller: Intel Corporation Ethernet Controller XXV710 for 25GbE SFP28 (rev 02)
e3:02.0 Ethernet controller: Intel Corporation Ethernet Virtual Function 700 Series (rev 02)
e3:02.1 Ethernet controller: Intel Corporation Ethernet Virtual Function 700 Series (rev 02)

(qemu) device_add vfio-pci,host=0000:e3:02.0,bus=root.3,id=vf1
(qemu) device_add vfio-pci,host=0000:e3:02.1,bus=root.4,id=vf2

3. Reboot guest, guest hang. Qemu terminal still active and host keeps working well.

# reboot
or
(qemu) system_reset


Actual results:
Guest with SEV reboot hang after hot plug 2 VF devices.

Expected results:
Guest with SEV should always reboot successfully.


Additional info:
1. Hot plug only 1 VF, everything works well

2. Hot plug 2 PFs, everything works well.

Comment 1 Pei Zhang 2019-07-12 08:03:46 UTC
Versions:
4.18.0-114.el8.x86_64
qemu-kvm-2.12.0-81.module+el8.1.0+3619+dfe1ae01.x86_64

Comment 3 Alex Williamson 2019-07-12 20:29:17 UTC
I suspect this has nothing to do with SEV and is a duplicate of bug 1714978.  Please retest with the host kernel found there.

Comment 4 Pei Zhang 2019-07-15 01:53:58 UTC
(In reply to Alex Williamson from comment #3)
> I suspect this has nothing to do with SEV and is a duplicate of bug 1714978.
> Please retest with the host kernel found there.

It works well with kernel path fix of bug 1714978. So it's no SEV issue.

Close as Duplicate.

Thanks.

*** This bug has been marked as a duplicate of bug 1714978 ***


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