From nobody Sat Jul 27 03:11:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) client-ip=78.46.105.101; envelope-from=seabios-bounces@seabios.org; helo=coreboot.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) smtp.mailfrom=seabios-bounces@seabios.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from coreboot.org (coreboot.org [78.46.105.101]) by mx.zohomail.com with SMTPS id 168310581679374.2431636818767; Wed, 3 May 2023 02:23:36 -0700 (PDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id C1CE120CDA; Wed, 3 May 2023 09:23:32 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTP id DB3D122EB1 for ; Wed, 3 May 2023 09:22:07 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-517-k4S14Hk1OWqvBzy8QzCszA-1; Wed, 03 May 2023 05:22:05 -0400 Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 23B783C1068C for ; Wed, 3 May 2023 09:22:05 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E39D2C15BAD; Wed, 3 May 2023 09:22:04 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) id A1B0C1804A41; Wed, 3 May 2023 11:22:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1683105726; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oaPLxwJcPEhzsB8UYJCQxwt+S/o2P+UMcijNL3fi+Wg=; b=VmOpNa5YONj6yUihdC8xBo4MN9l5jc62EVDZsgDAGWR1nWEu0ygsMAS5thOarDylqJxT2+ cxwFzOy+u5F6GnQVTmfR7XGKkr4wM33utLO9W1khoXZYXXVpTkUMaYelPqfZMRQ8cDkU0h zX1Tk7nnky0S6mZg/CUINc1jygwulwA= X-MC-Unique: k4S14Hk1OWqvBzy8QzCszA-1 From: Gerd Hoffmann To: seabios@seabios.org Date: Wed, 3 May 2023 11:22:01 +0200 Message-Id: <20230503092201.487130-3-kraxel@redhat.com> In-Reply-To: <20230503092201.487130-1-kraxel@redhat.com> References: <20230503092201.487130-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Message-ID-Hash: KNW4FO3TQENEEDK2533BOIDIP6CEPMQ7 X-Message-ID-Hash: KNW4FO3TQENEEDK2533BOIDIP6CEPMQ7 X-MailFrom: kraxel@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-seabios.seabios.org-0; header-match-seabios.seabios.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Gerd Hoffmann X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [SeaBIOS] [PATCH 2/2] display error message for blocksizes != 512 List-Id: SeaBIOS mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable Authentication-Results: coreboot.org; auth=pass smtp.auth=mailman@coreboot.org smtp.mailfrom=seabios-bounces@seabios.org X-Spamd-Bar: --- X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1683105817427100001 Content-Type: text/plain; charset="utf-8"; x-default="true" This actually happens in case users try to use 4k sectors with seabios. Printing the error to the screen instead of only the debug log helps users to figure why their guest doesn't boot. Signed-off-by: Gerd Hoffmann --- src/hw/blockcmd.c | 2 +- src/hw/virtio-blk.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hw/blockcmd.c b/src/hw/blockcmd.c index 6b6fea970748..ff88680b16b6 100644 --- a/src/hw/blockcmd.c +++ b/src/hw/blockcmd.c @@ -336,7 +336,7 @@ scsi_drive_setup(struct drive_s *drive, const char *s, = int prio) // 64-bit LBA anyway. drive->blksize =3D be32_to_cpu(capdata.blksize); if (drive->blksize !=3D DISK_SECTOR_SIZE) { - dprintf(1, "%s: unsupported block size %d\n", s, drive->blksize); + hwerr_printf("%s: unsupported block size %d\n", s, drive->blksize); return -1; } drive->sectors =3D (u64)be32_to_cpu(capdata.sectors) + 1; diff --git a/src/hw/virtio-blk.c b/src/hw/virtio-blk.c index e087fe4fb0e3..9d2bcb0f38f4 100644 --- a/src/hw/virtio-blk.c +++ b/src/hw/virtio-blk.c @@ -193,8 +193,8 @@ init_virtio_blk(void *data) vdrive->drive.blksize =3D DISK_SECTOR_SIZE; } if (vdrive->drive.blksize !=3D DISK_SECTOR_SIZE) { - dprintf(1, "virtio-blk %pP block size %d is unsupported\n", - pci, vdrive->drive.blksize); + hwerr_printf("virtio-blk %pP block size %d is unsupported\n", + pci, vdrive->drive.blksize); goto fail; } dprintf(3, "virtio-blk %pP blksize=3D%d sectors=3D%u size_max=3D%u= " --=20 2.40.1 _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org