Bug 2095608

Summary: Please correct the error message when try to start qemu with "-M kernel-irqchip=split"
Product: Red Hat Enterprise Linux 9 Reporter: Yihuang Yu <yihyu>
Component: qemu-kvmAssignee: Cornelia Huck <cohuck>
qemu-kvm sub component: General QA Contact: Yihuang Yu <yihyu>
Status: CLOSED ERRATA Docs Contact:
Severity: low    
Priority: low CC: cohuck, coli, eric.auger, gshan, jinzhao, juzhang, lijin, virt-maint, zhenyzha
Version: 9.1Keywords: Triaged
Target Milestone: rc   
Target Release: 9.1   
Hardware: aarch64   
OS: Linux   
Whiteboard:
Fixed In Version: qemu-kvm-7.0.0-10.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-15 09:54:42 UTC Type: Enhancement
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1924294, 2091421    

Description Yihuang Yu 2022-06-10 01:57:53 UTC
Description of problem:
int kvm_arch_irqchip_create(KVMState *s)
{
    if (kvm_kernel_irqchip_split()) {
        perror("-machine kernel_irqchip=split is not supported on ARM.");
        exit(1);
    }

perror will capture the error context and print it with its own message. But there is no error context here, so the error message becomes "-machine kernel_irqchip=split is not supported on ARM.: Success". I think we should cut out ": Success" from the message, even though this is a negative test.

Version-Release number of selected component (if applicable):
qemu-kvm-7.0.0-5.el9.aarch64

How reproducible:
always

Steps to Reproduce:
1. Start qemu process with "-M kernel-irqchip=split"
# /usr/libexec/qemu-kvm -M kernel-irqchip=split

Actual results:
-machine kernel_irqchip=split is not supported on ARM.: Success

Expected results:
Cut ": Success" out from the error message.
-machine kernel_irqchip=split is not supported on ARM.

Additional info:
Only aarch64 does not support kernel-irqchip=split, so this should be an aarch64-specific issue.
https://gitlab.com/qemu-project/qemu/-/blob/master/target/arm/kvm.c#L959-964

Also can reproduce it using upstream qemu.
./build/aarch64-softmmu/qemu-system-aarch64 -version
QEMU emulator version 7.0.50 (v7.0.0-1512-gca127b3fc2)
Copyright (c) 2003-2022 Fabrice Bellard and the QEMU Project developers

./build/aarch64-softmmu/qemu-system-aarch64 -accel kvm -M virt,kernel-irqchip=split
-machine kernel_irqchip=split is not supported on ARM.: Success

Comment 5 Cornelia Huck 2022-07-29 06:47:01 UTC
upstream patch: https://lore.kernel.org/all/20220728142446.438177-1-cohuck@redhat.com/

Comment 6 Cornelia Huck 2022-08-01 16:01:33 UTC
Now merged as 47c182fe8b03c0c40059fb95840923e65c9bdb4f.

Comment 11 Yihuang Yu 2022-08-09 08:28:47 UTC
Verify with qemu-kvm-7.0.0-10.el9

# /usr/libexec/qemu-kvm -version
QEMU emulator version 7.0.0 (qemu-kvm-7.0.0-10.el9)
Copyright (c) 2003-2022 Fabrice Bellard and the QEMU Project developers

# /usr/libexec/qemu-kvm -cpu host -M virt,kernel-irqchip=split
qemu-kvm: -machine kernel_irqchip=split is not supported on ARM.

Comment 14 Yihuang Yu 2022-08-16 08:25:10 UTC
This is a negative test so no need to run regression tests, and based on comment 11, move this status to "VERIFIED" directly.

Comment 17 errata-xmlrpc 2022-11-15 09:54:42 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: qemu-kvm 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:7967