From nobody Mon Nov 25 01:59:47 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1718866141; cv=none; d=zohomail.com; s=zohoarc; b=RzPA8kXcAur/Gs36Lud0x78oZ664/AHwkM7mece9Zw6OlcSVpx5hJKbZlLfLTCht3MbBBWlbrAHoodLhDIwfEBy0VGrW/WEHGOq/NsPYn0DpduZxHNU9cvHJAKiZji/yk0otz62VxEr8/pg50YKdrBmfi81iIGImB7zKu9jK7sg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1718866141; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=XXZPwB/KCQGzcH47VzVAAPMuBPHuKn5n1lAk8lM+KDo=; b=ZRgrqxM8DtLy7KMbCgunENkyLLVUw6rF/TWzJqbgetSFu4r4K9JVHqy4ie7jbAm5wgF1kYk1eD3Q7w5pWHRqRvI25mEtcrEX1rV94vTsyLb1g8Jf1z7am+2Xbl/QmBlrftJmqv7isE1yOrHc7p0XPopNmwhglLDTkr4ulyI2QVo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1718866141525642.7103443382906; Wed, 19 Jun 2024 23:49:01 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sKBa4-0002Ur-W6; Thu, 20 Jun 2024 02:47:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sKBa3-0002Ub-Nb for qemu-devel@nongnu.org; Thu, 20 Jun 2024 02:47:35 -0400 Received: from mail-qv1-xf2f.google.com ([2607:f8b0:4864:20::f2f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sKBa2-0004Jo-6b for qemu-devel@nongnu.org; Thu, 20 Jun 2024 02:47:35 -0400 Received: by mail-qv1-xf2f.google.com with SMTP id 6a1803df08f44-6b4fdf56903so2426046d6.1 for ; Wed, 19 Jun 2024 23:47:33 -0700 (PDT) Received: from sunil-laptop.dc1.ventanamicro.com ([106.51.83.242]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6b2a5c68ff3sm85144666d6.74.2024.06.19.23.47.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 23:47:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1718866053; x=1719470853; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=XXZPwB/KCQGzcH47VzVAAPMuBPHuKn5n1lAk8lM+KDo=; b=LpVSwcwMNp664QQbV5wDaP7RPtS18XGnGfwZS1MHIRbDSAhf7guKJPqy91rfSK3M/C vNg2c5RDVnYMHR2pX2fwBGEY84xVyzQZAN/exO8hP9U4aOwvKit3/xAR03CvJu3SeBSO Tpyxmlx4mVq8JjtQ1Y9nAdO99zdKq5Y/0c1BXaoMKrAy2cFt8+qadxhm5w6BsBNu08Rs pYfCGkYCxDB1IF3OAhiAh9XCdu8NAumdLnSU5Cu1vg9xTUEcUbAFUdr1lv/9GJdz4b48 GsuAs6UvtJ1Rp0zWV8JuU2jtRfRyZ+vZFat0lOU+OsuiQXv/wLOoMN8MUtr5ZyHsZSQi uh+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718866053; x=1719470853; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=XXZPwB/KCQGzcH47VzVAAPMuBPHuKn5n1lAk8lM+KDo=; b=QXDJTeDguuJ9as7WRLnzrZvJAGzHo+rR8aB4zvHm1SyTZUplUvEybINyHuJSH/yfKz ri5Lk/AYjqBrS8Ugex9dP5JwFFKwITjzHEl4mPGNRefIfBGp+8YOv3S8PEgXXH3yL3zc ZjoML/+MjO4YsaEykhxaNexkFizXpFzowy/bKRNT34p7evAqVVQBccdKxNMiYEDUCCFW KNaIja6fwbdBJj/ilC9QzKZmvcWCczrCrW+vUdtVWDPZ96VdTu2NA9j02VSKIGk+vwUH QcFGErXuYlvI/quPfqSPxe/tD2+33y9H0VAyS7xUrvcUuamfXE/KRqTeW53NARVZT4tq 7Xjg== X-Forwarded-Encrypted: i=1; AJvYcCWcH1JBV77QFFGEGbSEco9FjzD860dVIkdUC20iPoSgpVPSBHgY/TfaaXPj8U69evqs7nx7/8zyoHP54aP+LtQano/+rKo= X-Gm-Message-State: AOJu0YzHp1ot9I0QNv6QmNwpycyreTmjp8OkyO5jb8fO+cC798SAuHqH yM2FAIs/1taH86uFuGtQRpEREk9S1cgBHWGGa/wzjvuV0osPb2I0xddztj4eQro= X-Google-Smtp-Source: AGHT+IGjryhrJtkn68tTwP2D3tYbf6mUBAftzPdslhAA2r+4zgccBimycDAs8kMEBambnXWWk1s8vQ== X-Received: by 2002:ad4:5749:0:b0:6b0:8abb:2f29 with SMTP id 6a1803df08f44-6b501e9cd38mr68600136d6.44.1718866052910; Wed, 19 Jun 2024 23:47:32 -0700 (PDT) From: Sunil V L To: qemu-riscv@nongnu.org, qemu-devel@nongnu.org Cc: Palmer Dabbelt , Alistair Francis , Bin Meng , Weiwei Li , Daniel Henrique Barboza , Liu Zhiwei , Peter Maydell , Anup Patel , Andrew Jones , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Sunil V L Subject: [PATCH] hw/riscv/virt.c: Make block devices default to virtio Date: Thu, 20 Jun 2024 12:17:18 +0530 Message-Id: <20240620064718.275427-1-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::f2f; envelope-from=sunilvl@ventanamicro.com; helo=mail-qv1-xf2f.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ventanamicro.com) X-ZM-MESSAGEID: 1718866143272100001 Content-Type: text/plain; charset="utf-8" RISC-V virt is currently missing default type for block devices. Without this being set, proper backend is not created when option like -cdrom is used. So, make the virt board's default block device type be IF_VIRTIO similar to other architectures. We also need to set no_cdrom to avoid getting a default cdrom device. Signed-off-by: Sunil V L Reviewed-by: Alistair Francis Reviewed-by: Daniel Henrique Barboza --- hw/riscv/virt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 8675c3a7d1..b0871b7f81 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -1764,6 +1764,8 @@ static void virt_machine_class_init(ObjectClass *oc, = void *data) mc->init =3D virt_machine_init; mc->max_cpus =3D VIRT_CPUS_MAX; mc->default_cpu_type =3D TYPE_RISCV_CPU_BASE; + mc->block_default_type =3D IF_VIRTIO; + mc->no_cdrom =3D 1; mc->pci_allow_0_address =3D true; mc->possible_cpu_arch_ids =3D riscv_numa_possible_cpu_arch_ids; mc->cpu_index_to_instance_props =3D riscv_numa_cpu_index_to_props; --=20 2.34.1