From nobody Sun May 19 05:00:14 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1661860167; cv=none; d=zohomail.com; s=zohoarc; b=i4wMdNL17jLnwrVomYIhfgH/MWdRny/uBAbRIoMeNWBHoSq4fmtCpH1hUEogTXATJHaTRBihdXr20iObkS7LeqI61F5pHPg0tO0coTYUu61goTw7+nRJz09vQoxXoasI+7eX88G3A27ErCUnR+VigHGbT/kY0M174AqWRryXGe8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1661860167; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=nKLpw1G3Fc6BT3E/HbbJeu2Qj4xDIo15pwjIzYfItRU=; b=JxTTccrqngPLu0dlac8hz8/4wIb+N0tC+v+DDLWlzHZ3ZW6HaujHJYPLbS1wGCr5byn3+xOcgekF3kQPnPTPPdLjrzOAwo2Y2LyW9Y3rjNBkjI/DOTVNDc5D3p9W3GxvEaWcWZdFmGpa2TePOeHWgYG7CzFWrH78z3KqxW3ocYk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1661860167756785.6102103795826; Tue, 30 Aug 2022 04:49:27 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-446-5BWVirTtNiqW3LjFgbEWLw-1; Tue, 30 Aug 2022 07:49:25 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DEE8285A58D; Tue, 30 Aug 2022 11:49:23 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id CC50E9458A; Tue, 30 Aug 2022 11:49:23 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 9222C1946A42; Tue, 30 Aug 2022 11:49:18 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 0B1101946A40 for ; Tue, 30 Aug 2022 11:49:17 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id F13922026D07; Tue, 30 Aug 2022 11:49:16 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 64DD92026D4C for ; Tue, 30 Aug 2022 11:49:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661860166; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=nKLpw1G3Fc6BT3E/HbbJeu2Qj4xDIo15pwjIzYfItRU=; b=TDbNeB1ukmZbWdLHC3ZsV5wEP5SUhnpbubpI/Wn9+0s2BM5qZPbpPUOPbK5UxkmmSZhdBB OSk9+UhCXThgEFQmJPwdoH1WGnA7DPlw8+wRjGsOwlr+G8OsRDvjekceVMt1aarXnmeG5n RdwO31g1mNL2/T+9StkNgL00++QUY1M= X-MC-Unique: 5BWVirTtNiqW3LjFgbEWLw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH] qemuValidateDomainDef: Clarify error message when S390 PV launch security is unsupported by the kernel Date: Tue, 30 Aug 2022 13:49:14 +0200 Message-Id: <25922e067ca4154000193c73412879f4717ad388.1661860154.git.pkrempa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1661860168569100001 Content-Type: text/plain; charset="utf-8" Split up the condition and report a different error message when the host or host config results in S390 PV launch security being unavailable. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=3D2122534 Signed-off-by: Peter Krempa Reviewed-by: Marc Hartmayer --- src/qemu/qemu_validate.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 6403266559..63f3459c90 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -1454,11 +1454,14 @@ qemuValidateDomainDef(const virDomainDef *def, break; case VIR_DOMAIN_LAUNCH_SECURITY_PV: if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_CONFIDENTAL_GU= EST_SUPPORT) || - !virQEMUCapsGet(qemuCaps, QEMU_CAPS_S390_PV_GUEST) || - !virQEMUCapsGetKVMSupportsSecureGuest(qemuCaps)) { + !virQEMUCapsGet(qemuCaps, QEMU_CAPS_S390_PV_GUEST)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("S390 PV launch security is not supported= with " - "this QEMU binary")); + _("S390 PV launch security is not supported= with this QEMU binary")); + return -1; + } + if (!virQEMUCapsGetKVMSupportsSecureGuest(qemuCaps)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("S390 PV launch security is not supported= by this host or kernel")); return -1; } break; --=20 2.37.1