From nobody Sun May 5 01:18:32 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=1629717359; cv=none; d=zohomail.com; s=zohoarc; b=Xs1Px1ZOiWb+ZHq2QLO2kmghhI8RQWPGrGMO/vUi4p3Ek7cfpAV0GLyoY2+xc9IoFiIxbL1nHufDKkOhuyRDY7nFJWnp14VAb2ejDGqZUzY/mEaONxDFxEbYdhkvDaWcLv9k5c3s//HwW7OS+jfM+WdpRqLLf/+hdm///i8g7YY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629717359; 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=v7vgk93mUGbjnlkhbngaCpQrBnFvUlT0I9I9HxIqPPA=; b=SKtivwYU1iDDkBO0Cistx65jJTZDXPEXc7UjxHQxQ5Yg9DprDpoCwLe81HTLKev9wFAM008XIyOBfu5pFKmtqueeUY+CPo02Np5UQKL93S2Muys5WSp2Kb9Ped0+/es8jvU/wemd97/pIWk1Q94869K6D97PWvwwew4Q+8I/sbE= 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 1629717359633943.5481102796845; Mon, 23 Aug 2021 04:15:59 -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-40-RuhX8uE-MNCsAvsd9YAolQ-1; Mon, 23 Aug 2021 07:15:56 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 96E54824F8B; Mon, 23 Aug 2021 11:15:50 +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 36BED5C1D5; Mon, 23 Aug 2021 11:15:47 +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 33377181A0F2; Mon, 23 Aug 2021 11:15:41 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 17NBFdM3028556 for ; Mon, 23 Aug 2021 07:15:39 -0400 Received: by smtp.corp.redhat.com (Postfix) id E41D718361; Mon, 23 Aug 2021 11:15:39 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.43.2.44]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6BB75669F3 for ; Mon, 23 Aug 2021 11:15:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1629717358; 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=v7vgk93mUGbjnlkhbngaCpQrBnFvUlT0I9I9HxIqPPA=; b=OOs3raDrS28g4dqLKk1BUiUMTNP14rHtkUerFzjf4SAOP67MzhG/WPkizTE51Kr+NflbAM zPAp5cv5Szmlj7rzBQQJ+fAvWOFANW/UoWu3uxaZKIoRxE2hdm/rxGtKt/jyrfC79ACEmv nAHF3PKpCAnSbmh5xc4ehbH+5XVH2kU= X-MC-Unique: RuhX8uE-MNCsAvsd9YAolQ-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH] qemu: simplify machine-type check for implicit floppy controller Date: Mon, 23 Aug 2021 13:15:34 +0200 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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.16 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) X-ZM-MESSAGEID: 1629717360895100001 Q35 machine types 2.3 and older had an integrated floppy controller. Support for these machine types was removed by QEMU commit commit 86165b499edf8b03bb2d0e926d116c2f12a95bfe q35: Remove old machine versions git describe: v2.5.0-1530-g86165b499e contains: v2.6.0-rc0~76^2~4 In libvirt, we have bumped the minimum QEMU version to 2.11: commit b4cbdbe90bbf85eaf687f532d5a52a11e664b781 qemu: Formally deprecate support for qemu < 2.11 git describe: v7.3.0-13-gb4cbdbe90b contains: v7.4.0-rc1~300 Since this QEMU version only supports Q35 machine versions 2.4+, remove the code dealing with older ones. Signed-off-by: J=C3=A1n Tomko Reviewed-by: Martin Kletzander --- src/qemu/qemu_domain.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 9baa4b5d90..50a921c80d 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -8823,22 +8823,12 @@ static bool qemuDomainMachineNeedsFDC(const char *machine, const virArch arch) { - const char *p =3D STRSKIP(machine, "pc-q35-"); - if (!ARCH_IS_X86(arch)) return false; =20 - if (!p) + if (!STRPREFIX(machine, "pc-q35-")) return false; =20 - if (STRPREFIX(p, "1.") || - STREQ(p, "2.0") || - STREQ(p, "2.1") || - STREQ(p, "2.2") || - STREQ(p, "2.3")) { - return false; - } - return true; } =20 --=20 2.31.1