From nobody Sun Apr 28 12:01:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1600781385; cv=none; d=zohomail.com; s=zohoarc; b=UiwTSjPeVn63KwqfHpLQoajre8P8q04pHXD8AOsK/gK2NnBaO3MOh4THTW5ZVrSAdMpZBfKA8ikde93XpfdRxHmzlwFrklqLS5Aqr/ys9vPhwZciOpxeYws+tZ3+jbsdbt5o2cFcIzzgzVHGEpsbREhZk+ay5BWSPfCpbbSBaa4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600781385; h=Content-Type:Content-Transfer-Encoding:Cc: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=TOSgkBNoEAjOPcKt9IIN5ZcFLVXhfL1hVoIiIkCI+XM=; b=HvwJRKTajdnZAHWLdta0Ym9XY/Xki+GGZQP+rn2bFeg7NANtW0+LuHn/twDjlEtJCCH+TawQMLFdDvd7BI56u9ZhNX3TLFrEkDTaPPdVlFIrH7dfNTKY1SK45xII9vZ4q/qyCi7uqaFLZwUXYZMqPxl/stNBq4K0PMwit9J2+gc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1600781385950259.34357996918993; Tue, 22 Sep 2020 06:29:45 -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-239-XONO5gjxOHCniLM5Axrhug-1; Tue, 22 Sep 2020 09:29:42 -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 B5A591891E8C; Tue, 22 Sep 2020 13:29:36 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 944F260C04; Tue, 22 Sep 2020 13:29:36 +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 624D644A6A; Tue, 22 Sep 2020 13:29:36 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 08MDTZvT024474 for ; Tue, 22 Sep 2020 09:29:35 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1B84917B4A; Tue, 22 Sep 2020 13:29:35 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-112-110.ams2.redhat.com [10.36.112.110]) by smtp.corp.redhat.com (Postfix) with ESMTP id 28C145DE50; Tue, 22 Sep 2020 13:29:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600781384; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=TOSgkBNoEAjOPcKt9IIN5ZcFLVXhfL1hVoIiIkCI+XM=; b=BS2lUI+g7opPRtq0iZKtSFmpGZ7yvS9/42HvcF7aKyPW99kBMCyxasL3oc4cP3VrfD9JNn Ot85dvJEm25vnRaugrNUq+oLLPzYrNXedM7s/T25bhBIMceSLx/7WbB0sTpdm6HnB0N+gJ NoB6dIUusLhiZTuAGIfcPcYKNVXNY6o= X-MC-Unique: XONO5gjxOHCniLM5Axrhug-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 1/1] qemu: substitute missing model name for host-passthrough Date: Tue, 22 Sep 2020 15:29:28 +0200 Message-Id: <20200922132928.392287-2-twiederh@redhat.com> In-Reply-To: <20200922132928.392287-1-twiederh@redhat.com> References: <20200922132928.392287-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake --- src/qemu/qemu_driver.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index ae715c01d7..7f5cfc1a7f 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -12336,6 +12336,15 @@ qemuConnectCompareHypervisorCPU(virConnectPtr conn, if (virCPUDefParseXMLString(xmlCPU, VIR_CPU_TYPE_AUTO, &cpu) < 0) goto cleanup; =20 + if (!cpu->model) { + if (cpu->mode =3D=3D VIR_CPU_MODE_HOST_PASSTHROUGH) { + cpu->model =3D g_strdup("host"); + } else { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("cpu parameter is missing a model name")); + goto cleanup; + } + } ret =3D qemuConnectCPUModelComparison(qemuCaps, cfg->libDir, cfg->user, cfg->group, hvCPU, cpu, failIncompatible); --=20 2.26.2