From nobody Mon Sep 16 19:16:08 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=1678135632; cv=none; d=zohomail.com; s=zohoarc; b=EZr694Kco7CVKRFpe+Q36RNBWtJdJxdt0hCWyy92a7BPZtse7l8FgDopP/QAnUIcgrbU1tQ2oIyLkPfhSow62kEEhP2hGnIIE+z9+jP7VCXCiJ+77POuLA0MhHmVcp7owwsXCbhu6MDou5GCAnsDKNibUuUm+5fIFK4RAbF3IrI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678135632; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=g1U1enCCqhluHpfaG4HHaT7Rre3o7tLWWfcsEuLv2CA=; b=c1aO71cewjxeX78u9u1PCXZ3zO7ftUzlFAT5g0TEvQ+NMe6KsqZK5MJSkFYvFtrjS/TFADK+wApn5ySW26JJg4Fjf0pXmSfkGHyN2qkA8raZlVxQiLVBo1IpxO2vO/i1MfX2hysvtmJFaj7dKPvaOnXWveCZr9udnNr4Lt4LoaU= 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 1678135632273227.15470235693158; Mon, 6 Mar 2023 12:47:12 -0800 (PST) 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-398-iSJcwv6_Nv6GYvZY6iu7VA-1; Mon, 06 Mar 2023 15:47:03 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8B0F9857F5E; Mon, 6 Mar 2023 20:46:53 +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 725AD2166B2B; Mon, 6 Mar 2023 20:46:53 +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 464D519465B6; Mon, 6 Mar 2023 20:46:53 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id CE0171946589 for ; Mon, 6 Mar 2023 20:46:52 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id C1AEF51FF; Mon, 6 Mar 2023 20:46:52 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 427F944104 for ; Mon, 6 Mar 2023 20:46:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678135631; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=g1U1enCCqhluHpfaG4HHaT7Rre3o7tLWWfcsEuLv2CA=; b=bJvP9gTG3y8QSjS2B4h7W+htWi3Qe6TGOLrPhrdE743vl6Y+tYFz04sQzYrX0BHvaeRdWZ Upvts5hL3DuVXcqQU0mmJ30o/5XlHhjgK500rDDqM/+3ZZZ48jWqfD8+J6WU01e62cJyLA KBrAVf3kLr6f4YJLLTYnNbQpUtjluKA= X-MC-Unique: iSJcwv6_Nv6GYvZY6iu7VA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 05/15] qemu: command: Format '-no-hpet' based on architecture check Date: Mon, 6 Mar 2023 21:46:33 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 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 3.1 on 10.11.54.6 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: 1678135633068100005 Content-Type: text/plain; charset="utf-8" Rather than asserting a capability based on architecture, format the fallback parameter based on the presence of the newer capability and an explicit architecture check. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 189be55537..8d96f69f3d 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -5936,9 +5936,11 @@ qemuBuildClockCommandLine(virCommand *cmd, * -no-hpet exists is VIR_TRISTATE_BOOL_YES, and when -no-hpet * doesn't exist is VIR_TRISTATE_BOOL_NO. "confusing"? "yes"= ! */ - if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_NO_HPET)) { - if (def->clock.timers[i]->present =3D=3D VIR_TRISTATE_BOOL= _NO) - virCommandAddArg(cmd, "-no-hpet"); + if (def->clock.timers[i]->present =3D=3D VIR_TRISTATE_BOOL_NO = && + !virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_HPET) && + (def->os.arch =3D=3D VIR_ARCH_I686 || + def->os.arch =3D=3D VIR_ARCH_X86_64)) { + virCommandAddArg(cmd, "-no-hpet"); } break; } --=20 2.39.2