From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id B85C71FF09C for ; Mon, 21 Sep 2026 11:50:37 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 07010214DA; Mon, 21 Sep 2026 11:50:35 +0200 (CEST) Message-ID: Date: Mon, 21 Sep 2026 11:50:30 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH qemu-server 1/3] drive: add helper to detect VirtIO driver ISOs with known issues To: Maximiliano Sandoval , Nicolas Frey References: <20260915143237.1033142-1-n.frey@proxmox.com> <20260915143237.1033142-2-n.frey@proxmox.com> Content-Language: en-US From: Fiona Ebner In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1789984230284 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.556 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: TESOZ7XKJQ4VDWMSUKFKNM7Z3F5QB33P X-Message-ID-Hash: TESOZ7XKJQ4VDWMSUKFKNM7Z3F5QB33P X-MailFrom: f.ebner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: pve-devel@lists.proxmox.com X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Am 16.09.26 um 12:23 PM schrieb Maximiliano Sandoval: > Nicolas Frey writes: >> +} >> + >> +# warn about every CD-ROM drive in $conf that contains a problematic VirtIO driver ISO >> +sub warn_about_virtio_win_issues_in_config { >> + my ($conf) = @_; >> + >> + return if !PVE::QemuServer::Helpers::windows_version($conf->{ostype}); >> + >> + for my $opt (valid_drive_names()) { >> + next if !defined($conf->{$opt}); >> + >> + my $drive = eval { parse_drive($opt, $conf->{$opt}) }; >> + next if !$drive || !drive_is_cdrom($drive, 1); >> + >> + warn_about_virtio_win_issues($opt, $drive->{file}); >> + } >> + >> + return; > > cosmetic nit: This return might be redundant. > IMHO, having such explicit 'return' statements is nice to see the intention clearly. Perl will return the result of the last expression implicitly, which can actually lead to accidents in practice: https://lore.proxmox.com/pve-devel/20240226141020.296052-2-t.lamprecht@proxmox.com/ >> +} >> + >> sub parse_drive_interface { >> my ($key) = @_; >