Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 2012385

Summary: virt-host-validate: Detetion results of AMD SEV is not expected
Product: Red Hat Enterprise Linux 8 Reporter: Han Han <hhan>
Component: libvirtAssignee: Andrea Bolognani <abologna>
Status: CLOSED ERRATA QA Contact: Luyao Huang <lhuang>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 8.5CC: coli, jdenemar, jferlan, jsuchane, lmen, virt-maint, xuzhang, yafu, yalzhang, zixchen
Target Milestone: rcKeywords: Regression
Target Release: 8.6Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-7.9.0-1.module+el8.6.0+13150+28339563 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2012386 (view as bug list) Environment:
Last Closed: 2022-05-10 13:21:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version: 7.9.0
Embargoed:
Bug Depends On:    
Bug Blocks: 2012386    

Description Han Han 2021-10-09 02:28:45 UTC
Description of problem:
As subject

Version-Release number of selected component (if applicable):
kernel-4.18.0-341.el8.x86_64
libvirt-7.6.0-3.module+el8.5.0+12510+80564ecf.x86_64

How reproducible:
100%

Steps to Reproduce:
On a AMD host.
1. Enable sev:
➜  ~ modprobe -r kvm_amd    
➜  ~ modprobe kvm_amd sev=1
➜  ~ cat /sys/module/kvm_amd/parameters/sev
Y


2. Run virt-host-validate:
➜  ~ virt-host-validate    
  QEMU: Checking for hardware virtualization                                 : PASS
  QEMU: Checking if device /dev/kvm exists                                   : PASS
  QEMU: Checking if device /dev/kvm is accessible                            : PASS
  QEMU: Checking if device /dev/vhost-net exists                             : PASS
  QEMU: Checking if device /dev/net/tun exists                               : PASS
  QEMU: Checking for cgroup 'cpu' controller support                         : PASS
  QEMU: Checking for cgroup 'cpuacct' controller support                     : PASS
  QEMU: Checking for cgroup 'cpuset' controller support                      : PASS
  QEMU: Checking for cgroup 'memory' controller support                      : PASS
  QEMU: Checking for cgroup 'devices' controller support                     : PASS
  QEMU: Checking for cgroup 'blkio' controller support                       : PASS
  QEMU: Checking for device assignment IOMMU support                         : PASS
  QEMU: Checking if IOMMU is enabled by kernel                               : PASS
  QEMU: Checking for secure guest support                                    : WARN (AMD Secure Encrypted Virtualization appears to be disabled in kernel. Add kvm_amd.sev=1 to the kernel cmdline arguments)

Actual results:
As above

Expected results:
  QEMU: Checking for secure guest support     : PASS

Additional info:
It is fixed on upstream:
commit 3f9c1a4bb8
Author: Jim Fehlig <jfehlig>
Date:   Tue Oct 5 22:34:57 2021 -0600

    tools: Fix virt-host-validate SEV detection
    
    virt-host-validate checks if AMD SEV is enabled by verifying
    /sys/module/kvm_amd/parameters/sev is set to '1'. On a system
    running kernel 5.13, the parameter is reported as 'Y'. To be
    extra paranoid, add a check for 'y' along with 'Y' to complement
    the existing check for '1'.
    
    Fixes: https://bugzilla.opensuse.org/show_bug.cgi?id=1188715
    
    Signed-off-by: Jim Fehlig <jfehlig>
    Reviewed-by: Andrea Bolognani <abologna>

Comment 8 Luyao Huang 2021-11-09 09:27:18 UTC
Verify this bug with libvirt-daemon-7.9.0-1.module+el8.6.0+13150+28339563.x86_64:

# modprobe -r kvm_amd
# modprobe kvm_amd sev=1
# cat /sys/module/kvm_amd/parameters/sev
Y
# virt-host-validate 
  QEMU: Checking for hardware virtualization                                 : PASS
  QEMU: Checking if device /dev/kvm exists                                   : PASS
  QEMU: Checking if device /dev/kvm is accessible                            : PASS
  QEMU: Checking if device /dev/vhost-net exists                             : PASS
  QEMU: Checking if device /dev/net/tun exists                               : PASS
  QEMU: Checking for cgroup 'cpu' controller support                         : PASS
  QEMU: Checking for cgroup 'cpuacct' controller support                     : PASS
  QEMU: Checking for cgroup 'cpuset' controller support                      : PASS
  QEMU: Checking for cgroup 'memory' controller support                      : PASS
  QEMU: Checking for cgroup 'devices' controller support                     : PASS
  QEMU: Checking for cgroup 'blkio' controller support                       : PASS
  QEMU: Checking for device assignment IOMMU support                         : PASS
  QEMU: Checking if IOMMU is enabled by kernel                               : PASS
  QEMU: Checking for secure guest support                                    : PASS

Comment 10 errata-xmlrpc 2022-05-10 13:21:40 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: virt:rhel and virt-devel:rhel security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:1759