From nobody Wed Dec 4 09:01:55 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1715456460065676.2078226084484; Sat, 11 May 2024 12:41:00 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 60B921A7F; Sat, 11 May 2024 15:40:58 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 97E911A7C; Sat, 11 May 2024 15:40:30 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id B8B501A61; Sat, 11 May 2024 15:40:27 -0400 (EDT) Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id C522B1A26 for ; Sat, 11 May 2024 15:40:26 -0400 (EDT) Received: by mail-ed1-f46.google.com with SMTP id 4fb4d7f45d1cf-572c65cea55so5458454a12.0 for ; Sat, 11 May 2024 12:40:26 -0700 (PDT) Received: from localhost.localdomain ([212.70.119.83]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5733c2cb54csm3752149a12.60.2024.05.11.12.40.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 May 2024 12:40:24 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715456425; x=1716061225; 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=RMADkbcQHsbi2R45kfASBPJXpTbE3XbOrMSh3Po04qo=; b=QIGI7aKiGUOHpIQNupT/QEFcPeQV9KA+lVg6G+MvmZ76hgZOgSNm1INY80HVl+vSTG +RK5UP7JuQCLRUXMmd4TbkadJzm4nE7O3FsxKTysrQh8j672Zr6f4o50Nwl7yLqjObpj zJBOwiXKgl9qmQOEHHCPm/dMaomfJ72TWtjC6xg+6S8sXl7hBToVbHbHfIs6EoWM4WNz qg4bUf7WJf6H5+zcqlhqAuyRhiKKewqG4nOB4lp7X4gq+bvVxsbnQzlNl4KIGCmELbMX yJW9ewWJpYRpC+B5V1izYe39mogrX9Dd3YL45ax+KloSRSczvNsJWvooT5OL5jZ3jloB 8DEw== X-Gm-Message-State: AOJu0Yx6H2yCFU9484/6GBLyx3W9G12zYSyDgCT5q8OFwSc7yU1t3804 CsN31qaRaHrTZNmoFb3SGcN+N4b76RATFImS3afPzj5O76Y+M+5xp72iuw== X-Google-Smtp-Source: AGHT+IEbQOUg0tRjZqcJbca3V5Z7kDf9ZOEXQCuYerps64Pch0GeYPsSUOnTcZ74FcE2jp8j3vIuKQ== X-Received: by 2002:aa7:cd1a:0:b0:573:4f09:793e with SMTP id 4fb4d7f45d1cf-5734f097987mr4588718a12.1.1715456424931; Sat, 11 May 2024 12:40:24 -0700 (PDT) From: Rayhan Faizel To: devel@lists.libvirt.org Subject: [PATCH] qemu_hotplug: Properly assign USB address to hotplugged usb-net device Date: Sun, 12 May 2024 00:59:15 +0530 Message-Id: <20240511192915.64451-1-rayhan.faizel@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Message-ID-Hash: 5MS4JIQEEKWQNPEBCI6J6MAOIHAP2Y7M X-Message-ID-Hash: 5MS4JIQEEKWQNPEBCI6J6MAOIHAP2Y7M X-MailFrom: rayhan.faizel@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: Rayhan Faizel X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1715456460925100001 Signed-off-by: Rayhan Faizel --- src/qemu/qemu_hotplug.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 774962b0df..3b39941780 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -1159,8 +1159,11 @@ qemuDomainAttachNetDevice(virQEMUDriver *driver, goto cleanup; } =20 - if (qemuDomainIsS390CCW(vm->def) && - net->info.type !=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) { + if (net->model =3D=3D VIR_DOMAIN_NET_MODEL_USB_NET) { + if (virDomainUSBAddressEnsure(priv->usbaddrs, &net->info) < 0) + goto cleanup; + } else if (qemuDomainIsS390CCW(vm->def) && + net->info.type !=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) { net->info.type =3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW; if (!(ccwaddrs =3D virDomainCCWAddressSetCreateFromDomain(vm->def)= )) goto cleanup; --=20 2.34.1 _______________________________________________ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-leave@lists.libvirt.org