From nobody Sun May 5 23:41:52 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 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=1595417253; cv=none; d=zohomail.com; s=zohoarc; b=cwqeghEFh/EGJXECBuZwgnSKeDmAYx70olculQJtiU/GgUhOueryJQ/J1ZjZ5+Cr9AiNYcoh49XF0uWZVUXNgLY5f2MR9vbupCSz3XGZY8/thlD1U2H4Xl+/QPrcTRQ4bPdhzpiUefvpbHQBCnEdFfBYXfxHoj6RucFMkQ/VPKs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1595417253; h=Content-Type:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:Sender:Subject:To; bh=cTQzt08KA1DGtw0jre+Ys4oOqjKJ1h1CjyTNzjgZ37I=; b=m/ptdXAHh2hJXyculfzyAPc5zY/Z9X/LPbnavu4LasTvnh/uw0GgK/1PPQTb4173WagEBxL+TZMPODToK1vM8RBa0HotwB3mxut9UXFX+f8UqQdGZCTe4v1WUOTBDMvnE2RJOa+qURPeRy5Xrpz7sJuEz/YAGBHi/NRVX6WFcF4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1595417253318362.5341293476872; Wed, 22 Jul 2020 04:27:33 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-178-aPdYjn0SOom8j0--fWlU-Q-1; Wed, 22 Jul 2020 07:27:29 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 154C8102C7F3; Wed, 22 Jul 2020 11:27:24 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6C93260C05; Wed, 22 Jul 2020 11:27:23 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 0CC491809557; Wed, 22 Jul 2020 11:27:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 06MBLWG3012449 for ; Wed, 22 Jul 2020 07:21:32 -0400 Received: by smtp.corp.redhat.com (Postfix) id BD7AB5C3F8; Wed, 22 Jul 2020 11:21:32 +0000 (UTC) Received: from thuth.com (ovpn-112-92.ams2.redhat.com [10.36.112.92]) by smtp.corp.redhat.com (Postfix) with ESMTP id E24815FC3B; Wed, 22 Jul 2020 11:21:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595417252; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:content-type:content-type:list-id: list-help:list-unsubscribe:list-subscribe:list-post; bh=cTQzt08KA1DGtw0jre+Ys4oOqjKJ1h1CjyTNzjgZ37I=; b=TRk48/FiBwPrWVVRoV6H9bOqbL7HcglR4KlaT0ETkmIyTvfCFdaJNEFxZK9VYSTwtq/NnQ cRRVe+NCpsrcVTM6SmA/xAd3r4PxuxNdnZdNjNDFOUEosEzDU6GJsCt8AmIQF62bPqyiE2 oS3rnYx61TF6XE54bsRReqxVfgrcKOc= X-MC-Unique: aPdYjn0SOom8j0--fWlU-Q-1 From: Thomas Huth To: libvir-list@redhat.com Subject: [PATCH] qemu: Do not silently allow non-available timers on non-x86 systems Date: Wed, 22 Jul 2020 13:21:26 +0200 Message-Id: <20200722112126.31010-1-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: Boris Fiuczynski X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" libvirt currently silently allows and some other timer tags in the guest XML definition for timers that do not exist on non-x86 systems. We should not silently ignore these tags since the users might not get what they expected otherwise. Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=3D1754887 Signed-off-by: Thomas Huth --- src/qemu/qemu_validate.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 488f258d00..667ac5cc23 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -371,6 +371,18 @@ qemuValidateDomainDefClockTimers(const virDomainDef *d= ef, case VIR_DOMAIN_TIMER_NAME_TSC: case VIR_DOMAIN_TIMER_NAME_KVMCLOCK: case VIR_DOMAIN_TIMER_NAME_HYPERVCLOCK: + if (!ARCH_IS_X86(def->os.arch)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("Configuring the '%s' timer is not suppor= ted " + "for virtType=3D%s arch=3D%s machine=3D%s= guests"), + virDomainTimerNameTypeToString(timer->name), + virDomainVirtTypeToString(def->virtType), + virArchToString(def->os.arch), + def->os.machine); + return -1; + } + break; + case VIR_DOMAIN_TIMER_NAME_LAST: break; =20 --=20 2.18.1