From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <pve-devel-bounces@lists.proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
	by lore.proxmox.com (Postfix) with ESMTPS id 66F3D1FF161
	for <inbox@lore.proxmox.com>; Wed,  4 Dec 2024 10:40:41 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
	by firstgate.proxmox.com (Proxmox) with ESMTP id 3618A402D;
	Wed,  4 Dec 2024 10:40:39 +0100 (CET)
Message-ID: <77f8faaf-db60-4ee0-8354-1ff83c870416@proxmox.com>
Date: Wed, 4 Dec 2024 10:40:04 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird Beta
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
References: <mailman.694.1732617417.391.pve-devel@lists.proxmox.com>
Content-Language: en-US
From: Dominik Csapak <d.csapak@proxmox.com>
In-Reply-To: <mailman.694.1732617417.391.pve-devel@lists.proxmox.com>
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.016 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DMARC_MISSING             0.1 Missing DMARC policy
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to
 Validity was blocked. See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more
 information.
 RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to
 Validity was blocked. See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more
 information.
 RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to
 Validity was blocked. See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more
 information.
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more
 information. [proxmox.com]
Subject: Re: [pve-devel] [PATCH] Add UI option for boot optional mapped usb
 device
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
Reply-To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Cc: moddingfox <moddingfox@gmail.com>, Tyst Marin <moddingfox@foxtek.us>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Errors-To: pve-devel-bounces@lists.proxmox.com
Sender: "pve-devel" <pve-devel-bounces@lists.proxmox.com>

Hi,

thanks for wanting to contribute!

First, did you already see https://pve.proxmox.com/wiki/Developer_Documentation ?
(especially the CLA part at the end?)

Just a few high level comments/questions to the approach (did not look too much at the code yet).

Please correct me if I'm wrong, but my guess why you want this is to emulate
the behavior for 'raw' USB passed through devices? (since those don't have to
be there for the vm to start?)

I think maybe such a setting would be better suited on the mapping itself?

I say this because the mapping defines which devices can/should be used, so
there is IMHO the right part to decide if it should be used in a guest
when it's missing.

Also I'm not very sure if we'd need a setting for this at all, since
the 'raw' passthrough also simply pass it through.

Just for your understanding, the reason it's currently implemented this way
is to prevent booting a VM with a wrong device (at least when using the path),
or a without one since that can have bad consequences (depending on what the
guest does with the device and what devices are connected)

Additionally we currently don't properly track the use of usb devices on our
side (which can have weird side effects, e.g. if you try to pass the same
device to multiple running vms at the same time) but this is not really
possible when using vendor/device ids since there could be mulitple such devices.


with kind regards
Dominik


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel