From nobody Sat Feb 7 09:36:48 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1605721219; cv=none; d=zohomail.com; s=zohoarc; b=lJde9YY880CqfjlxX7gAMjMjjpEBH+LCLntXZhSmhaewOfXnK3WynWWpLAXRsU+2fN3Ho7mIVvvI9RhvA8N8JM01pmq3YKz9EUUjbiN0CTwiiakUqkrljVe8HDuon8yCNr1eS5FTfDb/i3BFJIx8FE4YcUWcFhWF7xOCuy5EoMA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605721219; 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=ij1dBsONbMiEPXCYXYsakxI+4DFcjOQkXZ4gZEDasLg=; b=aYLlkL6YYRHNzhemmkQfdkLCP6AOMI5gd9ELykI4p8s2RC9uhmQJtXBNzvy+ED4H3TRQX/IaUzDoIaWg58biHJ92c78+rqsdEsJ6R0P0xkMtaRIEiX1gxC8nVabgdyXd05PTMjH8SG2MD0EhbGrSzpSZidhlaN0MsVCl9ZNmAiU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.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 [63.128.21.124]) by mx.zohomail.com with SMTPS id 160572121918466.70092047982439; Wed, 18 Nov 2020 09:40:19 -0800 (PST) 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-144-_v5uzfWpPLWV9ffVGbndrg-1; Wed, 18 Nov 2020 12:40:15 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2648B1087D68; Wed, 18 Nov 2020 17:40:09 +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 01EE360864; Wed, 18 Nov 2020 17:40:09 +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 BF2111809CA4; Wed, 18 Nov 2020 17:40:08 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0AIHe6Eg004388 for ; Wed, 18 Nov 2020 12:40:06 -0500 Received: by smtp.corp.redhat.com (Postfix) id 6C4B41A268; Wed, 18 Nov 2020 17:40:06 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-115-41.ams2.redhat.com [10.36.115.41]) by smtp.corp.redhat.com (Postfix) with ESMTP id 779BF19486; Wed, 18 Nov 2020 17:40:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605721218; 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=ij1dBsONbMiEPXCYXYsakxI+4DFcjOQkXZ4gZEDasLg=; b=b7zlfvrYINq0Kgyqh+bAXDDDed1maHmk848eXtLaVwg48HCOQmpkmweqSiapsmM7KtSGOx vLD7dw7qA2vyo316P/QpLeIcevx3028Dgmj9PM1ZOFyG9GDOq1GNSTRyXrhQ3XcXoSjjVI QKBFeSKzoeqtwLq0Vgp/mNbRxNeXL7w= X-MC-Unique: _v5uzfWpPLWV9ffVGbndrg-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH 03/10] qemu: add helper method for checking if ESP SCSI is builtin Date: Wed, 18 Nov 2020 17:39:46 +0000 Message-Id: <20201118173953.576417-4-berrange@redhat.com> In-Reply-To: <20201118173953.576417-1-berrange@redhat.com> References: <20201118173953.576417-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com 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.13 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) The NCR53C90 ESP SCSI controller is only usable when built-in to the machine type. This method will facilitate checking that restriction across many places. Signed-off-by: Daniel P. Berrang=C3=A9 --- src/qemu/qemu_domain.c | 17 +++++++++++++++++ src/qemu/qemu_domain.h | 1 + 2 files changed, 18 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index e85ca80929..1a80aa4c69 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -8289,6 +8289,23 @@ qemuDomainMachineHasBuiltinIDE(const char *machine, } =20 =20 +bool qemuDomainHasBuiltinESP(const virDomainDef *def) +{ + /* These machines use ncr53c90 (ESP) SCSI controller built-in */ + if (def->os.arch =3D=3D VIR_ARCH_SPARC) { + return true; + } else if (ARCH_IS_MIPS64(def->os.arch) && + (STREQ(def->os.machine, "magnum") || + STREQ(def->os.machine, "pica61"))) { + return true; + } else if (def->os.arch =3D=3D VIR_ARCH_M68K && + STREQ(def->os.machine, "q800")) { + return true; + } + return false; +} + + static bool qemuDomainMachineNeedsFDC(const char *machine, const virArch arch) diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index 8dbec6e33f..6b75b828c0 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -780,6 +780,7 @@ bool qemuDomainIsPSeries(const virDomainDef *def); bool qemuDomainHasPCIRoot(const virDomainDef *def); bool qemuDomainHasPCIeRoot(const virDomainDef *def); bool qemuDomainHasBuiltinIDE(const virDomainDef *def); +bool qemuDomainHasBuiltinESP(const virDomainDef *def); bool qemuDomainNeedsFDC(const virDomainDef *def); bool qemuDomainSupportsPCI(virDomainDefPtr def, virQEMUCapsPtr qemuCaps); --=20 2.28.0