From nobody Mon Nov 25 01:45:01 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=1719328280; cv=none; d=zohomail.com; s=zohoarc; b=VEvQ1w8O3ClRb8SVgg4c2mazh03YDkbOiEMBt9FZJudTo7ziRhVH0QSczJ1wE559jO0o2UU19b2+GncWrhllnhmg5wtf9ib4mt1luYPQARc/RRpUsyY4C3aknZRcaSHwxXEUi6SXFrI1PlYBu+c8BdoVc9ytmtLs5LtTU00izwk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719328280; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=TlnNdGhu04ossposrlJzR1bD3NKaX/zo3I7lspvtgbQ=; b=apUSK/6ZrvBUNeraL549qU9KxIrQeGvYsv0CinFC6Px0CyDlpMP4C5uOxG/Fvam8NvMT0wNOKkxGXaJ5LltBVy5E+wtYRMurG2i6yXrxhy6DQSCSBJSplimysW21tWtPFwvjcU5658/aadtc2fyeQ6bDkZbfckgx+3/NfHTt9Qw= 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 1719328280282154.13801999076065; Tue, 25 Jun 2024 08:11:20 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sM7n5-0001Eb-0J; Tue, 25 Jun 2024 11:09:03 -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 1sM7n2-0001DO-Sj for qemu-devel@nongnu.org; Tue, 25 Jun 2024 11:09:00 -0400 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sM7n0-0006Pn-LL for qemu-devel@nongnu.org; Tue, 25 Jun 2024 11:09:00 -0400 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-70675977d0eso2442375b3a.0 for ; Tue, 25 Jun 2024 08:08:57 -0700 (PDT) Received: from sunil-pc.Dlink ([106.51.187.237]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-70681722219sm4142636b3a.73.2024.06.25.08.08.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jun 2024 08:08:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1719328135; x=1719932935; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TlnNdGhu04ossposrlJzR1bD3NKaX/zo3I7lspvtgbQ=; b=k+euOehwtAsnCIXdp+q1irZu49z1Z5GVos5dpwHH+ORDa34pNDHnfe0C5lnspYeRV3 PluWG2uAaytIyrI4WMx0u+z/LkM4eMA4bncPrRR22yUy67EoVb7HwA+I1eXWRjL6kl/i 5WGVycZcQQ5HIz498vJHX0MEcBiWilpp8HlfhkcRA45Y0xs5KQkv9K8vzaK8Dnu+uZG/ S574oY9K2oYVDN5dh7qcq8FwpfKIBhr/2niCkpjs2MEWffZ2EmYjRzvybbIV+IxSjDR1 aW3Yt5fLHezBTq2Y7qvuRnrJgRewqKZVGxewh7xiuK6g0p+664Ysfp1Lu7JT5WsS3qyc rJxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719328135; x=1719932935; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TlnNdGhu04ossposrlJzR1bD3NKaX/zo3I7lspvtgbQ=; b=k0ICxe3Tj7xvYLhOODU4NORj7qAzsQFyEt7I4LHjiRSnTW07hMQrWBemuAbL+hRxi7 k2VLdGAzUGPnZ02pK2iSCPSmcUvtOAK6YJK7uYglCr+UyJP/VTu9BO1oH4pamoqsmZg8 4CSFg3cP16R1LwqWZqPxfXVL2JbosM1L9Kq4Fb+vmZFF3lDH4QLfdFxFdIZQtsEVFOa9 ppasgwlKYkyx3k5055p2riMUX9QimVGPU6e2XUJ8yDOZzx6LycGVka0QpVb7uLNQ/IqQ s8GgcBCrSJEBG9eDnigfMWUtEyMsWmvxi27w7iVlOhB35/wL+DPbDvgD9AzBLLqLw21h 2mfA== X-Gm-Message-State: AOJu0YxrY3hDQRshl/iLgHjsuBjKtSLGbToA7gE5iEQdBJIr+ZwD0Ph7 f57BM9g4/FhQb7JE8FaKDDyATEJTPakg1uznlulIEFFRxEpba76xOEudKy3uMxFs7MfSNDFb9i5 p X-Google-Smtp-Source: AGHT+IEWhCGGVsdSdXYdszp20qjdFCwLDSPgYVmzdVbzlp2oBsp4/hgyj4aqS8zkzvji0pDrTZnCWA== X-Received: by 2002:a05:6a00:4fcd:b0:706:8066:5cd8 with SMTP id d2e1a72fcca58-70680665dc3mr7938064b3a.11.1719328134781; Tue, 25 Jun 2024 08:08:54 -0700 (PDT) From: Sunil V L To: qemu-devel@nongnu.org, qemu-arm@nongnu.org, qemu-riscv@nongnu.org Cc: Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Michael S . Tsirkin" , Igor Mammedov , Ani Sinha , Laurent Vivier , Gerd Hoffmann , Sia Jee Heng , Alistair Francis , Daniel Henrique Barboza , Palmer Dabbelt , Bin Meng , Weiwei Li , Liu Zhiwei , Sunil V L , Alistair Francis Subject: [PATCH v4 01/16] hw/riscv/virt.c: Make block devices default to virtio Date: Tue, 25 Jun 2024 20:38:24 +0530 Message-Id: <20240625150839.1358279-2-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240625150839.1358279-1-sunilvl@ventanamicro.com> References: <20240625150839.1358279-1-sunilvl@ventanamicro.com> 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::430; envelope-from=sunilvl@ventanamicro.com; helo=mail-pf1-x430.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=unavailable 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: 1719328282470100003 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: Daniel Henrique Barboza Reviewed-by: Alistair Francis --- hw/riscv/virt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 5676d66d12..e578c6dba7 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -1746,6 +1746,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.40.1