From patchwork Wed Mar 24 14:30:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 407834 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp476583jai; Wed, 24 Mar 2021 07:49:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6W5aSfF1MBX1nfY3qah5+zsxvIq2Lc5jYIhyKjnk0MkfeZXlpGBX9oDEB49XSejpX51H0 X-Received: by 2002:a05:6e02:1094:: with SMTP id r20mr2884845ilj.154.1616597341355; Wed, 24 Mar 2021 07:49:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616597341; cv=none; d=google.com; s=arc-20160816; b=bLTOQajI/d/okFmQdZxA8mpHWEo8Z7J2pv5W3wil+y4foHpTlTWBYpn+rA18yAwC4m xxCzU7qKsTjhsOsY+ZpM8C9JKG6t20WwDB426Jv8Yok0s43fKhZ5toqGUm+Zx+U8dKpZ gYqnwTftI3C4XtV5Wy4WOiccKl/qj8v/Kq94uMVQIkht6oSj02f2D6i4/WyZ0f8m6XKV h+/XTtg691iDdBQTFl8GWhPhvU4GK505J7SjGTbACWBqDTJJFkYq7LrHv3+Gy6r3S/DL DS1qFrA4tSRcV5NGdFfxjVBk7WyjIC328MaoynK6H/guLKpr7QkOiZc6/WJ7q1RvsT9A ADQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=LYtY8WstaP7kuj1GgptrAmRoMMv/ADLOwkzOGpAVJtI=; b=HM92eriqOHPXv2lWYAhL1TJFDHv5P+sR/m1pnKAtY0Za/5Ivfp2Wp5A8qZEGUpxsDn Ky9xrDr0Wn8q8wpTajTOyBVu/8jvnvBFmbuVOit1wcb40vI8OJItwjzmPyXhcz8QbSme I9MZ/JCUMiZnt8mFV5EwXizTJKgsX86l3YaiB2NVTZahG09ZuF3dNR7IbqwPbkz8839c rIujZQE1zz955AKq/pLDJBruqxK0/PXznYk197bucIa136npr8/6Z89rjD3eJlh6/stg i6Ak63rfQ1kTABVIMWABiezK7+jOp5u2x28cQtX74RUd/pvW/0ClLD53Ocaf6rl+UD6D tkWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=FF3JMkf2; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id z6si1952237ilb.14.2021.03.24.07.49.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Mar 2021 07:49:01 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=FF3JMkf2; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:41030 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lP4oe-00033W-LZ for patch@linaro.org; Wed, 24 Mar 2021 10:49:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53722) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lP4f7-0000K4-1l for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:39:09 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:40687) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lP4f2-0003Qb-Pp for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:39:08 -0400 Received: by mail-wr1-x433.google.com with SMTP id v11so24684309wro.7 for ; Wed, 24 Mar 2021 07:39:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LYtY8WstaP7kuj1GgptrAmRoMMv/ADLOwkzOGpAVJtI=; b=FF3JMkf21WzUKirBnvrpbZOXU2adk8wVK070JInTbEddMbeeDtGnmf29eoNmWaeWbC 8Y6Cyu7Nwsh3wXLFuBPUJcvA56iuYkIRN+3cjs+mEK/AutCLz3icE1m5YP1Je/odqFcV qiQotswVEb5xy+PjOHniOiIsWyVdibLANFvrZuhZgkojpqqegtOLaHdPU39GfEn99WQH DOWlvb2cw9pNwrofXG6E7f9YaKB3g5xS8aPsT3grHtRPXG9fOH9wzct1YJTj8GMluMHq OcntVhIYU0xaysHgPUZBC0C183sNczaXpilTzbG32lJ2TrNyfVq4G8rq2G4ug8pVi/M9 27FQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LYtY8WstaP7kuj1GgptrAmRoMMv/ADLOwkzOGpAVJtI=; b=dVgdwIkPU7wC3Lh2Dv64jn7y/l3gG52VkJI7SErCaUmiOugjvcL5NM1BK9AyYoGMDM cTHmqaanNwByUZEy4/+aMBtZHaZCIMt7D1/IZQoR6Wn+C4961uymIkUHwq/zxRXSxTWn vFt2uqcF6aHr8NMcUm+YvCgnUweHx00fRntGWeSHjpnUDOGpGlbyV5K/O1qBlFNTrxDr XRGSQAaG/1CWokE6iDCSbP1N/KgsYotTCbEvf2+Q5MYejLzGNSiGpa0M70NvxmPHm/fm bi+ZulcDSd0X3orBy61mdMZNNdDPNhY/zLDBeWUOV2jdx6YeJ5NVfjWM4SGmclcJb7sq u86A== X-Gm-Message-State: AOAM530aJ3/MlkS58HDAsF+6+1vgpzo6XvBMRnhsVhLlz003LKmyeK/z MMegBSsh1Vv5IbLCje+4u+La0g== X-Received: by 2002:a5d:4710:: with SMTP id y16mr3919750wrq.344.1616596743365; Wed, 24 Mar 2021 07:39:03 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id j20sm2664934wmp.30.2021.03.24.07.38.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Mar 2021 07:38:56 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 57DDC1FF9F; Wed, 24 Mar 2021 14:30:23 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 17/22] m68k: add the virtio devices aliases Date: Wed, 24 Mar 2021 14:30:16 +0000 Message-Id: <20210324143021.8560-18-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210324143021.8560-1-alex.bennee@linaro.org> References: <20210324143021.8560-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , Cornelia Huck , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , qemu-devel@nongnu.org, Paolo Bonzini , =?utf-8?q?Alex_Benn=C3=A9e?= , Laurent Vivier Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Laurent Vivier Similarly to 5f629d943cb0 ("s390x: fix s390 virtio aliases"), define the virtio aliases. This allows to start machines with virtio devices without knowledge of the implementation type. For instance, we can use "-device virtio-scsi" on m68k, s390x or PC, and the device will be respectively "virtio-scsi-device", "virtio-scsi-ccw" or "virtio-scsi-pci". This already exists for s390x and -ccw interfaces, add them for m68k and MMIO (-device) interfaces. Signed-off-by: Laurent Vivier Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Cornelia Huck Message-Id: <20210319202335.2397060-3-laurent@vivier.eu> Message-Id: <20210323165308.15244-18-alex.bennee@linaro.org> -- 2.20.1 diff --git a/include/sysemu/arch_init.h b/include/sysemu/arch_init.h index 0c90706516..16da279696 100644 --- a/include/sysemu/arch_init.h +++ b/include/sysemu/arch_init.h @@ -42,5 +42,6 @@ int xen_available(void); QEMU_ARCH_RISCV | QEMU_ARCH_SH4 | \ QEMU_ARCH_SPARC | QEMU_ARCH_XTENSA) #define QEMU_ARCH_VIRTIO_CCW (QEMU_ARCH_S390X) +#define QEMU_ARCH_VIRTIO_MMIO (QEMU_ARCH_M68K) #endif diff --git a/softmmu/qdev-monitor.c b/softmmu/qdev-monitor.c index 0b40c97c6e..a9955b97a0 100644 --- a/softmmu/qdev-monitor.c +++ b/softmmu/qdev-monitor.c @@ -60,29 +60,41 @@ static const QDevAlias qdev_alias_table[] = { { "ES1370", "es1370" }, /* -soundhw name */ { "ich9-ahci", "ahci" }, { "lsi53c895a", "lsi" }, + { "virtio-9p-device", "virtio-9p", QEMU_ARCH_VIRTIO_MMIO }, { "virtio-9p-ccw", "virtio-9p", QEMU_ARCH_VIRTIO_CCW }, { "virtio-9p-pci", "virtio-9p", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-balloon-device", "virtio-balloon", QEMU_ARCH_VIRTIO_MMIO }, { "virtio-balloon-ccw", "virtio-balloon", QEMU_ARCH_VIRTIO_CCW }, { "virtio-balloon-pci", "virtio-balloon", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-blk-device", "virtio-blk", QEMU_ARCH_VIRTIO_MMIO }, { "virtio-blk-ccw", "virtio-blk", QEMU_ARCH_VIRTIO_CCW }, { "virtio-blk-pci", "virtio-blk", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-gpu-device", "virtio-gpu", QEMU_ARCH_VIRTIO_MMIO }, { "virtio-gpu-ccw", "virtio-gpu", QEMU_ARCH_VIRTIO_CCW }, { "virtio-gpu-pci", "virtio-gpu", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-input-host-device", "virtio-input-host", QEMU_ARCH_VIRTIO_MMIO }, { "virtio-input-host-ccw", "virtio-input-host", QEMU_ARCH_VIRTIO_CCW }, { "virtio-input-host-pci", "virtio-input-host", QEMU_ARCH_VIRTIO_PCI }, { "virtio-iommu-pci", "virtio-iommu", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-keyboard-device", "virtio-keyboard", QEMU_ARCH_VIRTIO_MMIO }, { "virtio-keyboard-ccw", "virtio-keyboard", QEMU_ARCH_VIRTIO_CCW }, { "virtio-keyboard-pci", "virtio-keyboard", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-mouse-device", "virtio-mouse", QEMU_ARCH_VIRTIO_MMIO }, { "virtio-mouse-ccw", "virtio-mouse", QEMU_ARCH_VIRTIO_CCW }, { "virtio-mouse-pci", "virtio-mouse", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-net-device", "virtio-net", QEMU_ARCH_VIRTIO_MMIO }, { "virtio-net-ccw", "virtio-net", QEMU_ARCH_VIRTIO_CCW }, { "virtio-net-pci", "virtio-net", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-rng-device", "virtio-rng", QEMU_ARCH_VIRTIO_MMIO }, { "virtio-rng-ccw", "virtio-rng", QEMU_ARCH_VIRTIO_CCW }, { "virtio-rng-pci", "virtio-rng", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-scsi-device", "virtio-scsi", QEMU_ARCH_VIRTIO_MMIO }, { "virtio-scsi-ccw", "virtio-scsi", QEMU_ARCH_VIRTIO_CCW }, { "virtio-scsi-pci", "virtio-scsi", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-serial-device", "virtio-serial", QEMU_ARCH_VIRTIO_MMIO }, { "virtio-serial-ccw", "virtio-serial", QEMU_ARCH_VIRTIO_CCW }, { "virtio-serial-pci", "virtio-serial", QEMU_ARCH_VIRTIO_PCI}, + { "virtio-tablet-device", "virtio-tablet", QEMU_ARCH_VIRTIO_MMIO }, { "virtio-tablet-ccw", "virtio-tablet", QEMU_ARCH_VIRTIO_CCW }, { "virtio-tablet-pci", "virtio-tablet", QEMU_ARCH_VIRTIO_PCI }, { }