From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8A5A842DC2 for ; Mon, 3 Jul 2023 10:57:59 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3A03242D17; Mon, 3 Jul 2023 10:57:59 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 41CEE410DC for ; Mon, 3 Jul 2023 10:57:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688374677; 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=fZiMsgsmA8uDPf8efYdNClvBXpVOaPRgGvL3wB/v/WI=; b=eE9PJHMh513l8x08Rnm05yhispjGMZrTMrOo/sMqFCeAG8/uc6NXglxCRsuxjvkiANnw8Z EsU3zupRdLWSpOa0AYYAWrPOh/eaj+BBVW32Ju3sYy+qVnFxPZZtiAUjZP4YFzx8gbFpbS f+Sy7PjhK8wZGlKaTarbepIHXmazE48= Received: from mail-oi1-f200.google.com (mail-oi1-f200.google.com [209.85.167.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-99-JzikgzyVNZq1vbKGQlmfuA-1; Mon, 03 Jul 2023 04:57:54 -0400 X-MC-Unique: JzikgzyVNZq1vbKGQlmfuA-1 Received: by mail-oi1-f200.google.com with SMTP id 5614622812f47-395ff4dc3abso4375558b6e.3 for ; Mon, 03 Jul 2023 01:57:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688374674; x=1690966674; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fZiMsgsmA8uDPf8efYdNClvBXpVOaPRgGvL3wB/v/WI=; b=VT+QhHENnWIFb/EjKiB1Pd4jbvt2ugUCQ4PWLjfu/WHbylpe/EGqEMOhCMwazphlSW 79NXhMuFtwBApkN94zhh1wSH3Ga/0QdVYK2O5zZfD7nqYL73mtxlmZB729UcFbhkpsjn SqkI/+gzdhMDe+mVadgdlSgV5EEdKroKqROxkKhk7e5aU4dfVQEkX92r5nHaWxZJcNFC d/gpgDoa55p3l5k57VIfNSS8U9yuwsrrZTJUtHnicoDINDszvQjp1UYeYG2cSEWoK5xy jsH08gtjwkNsPUfoXMrDCCCRKFWUpiQgGOb5pPuZTK0lx6uuSWfmY5T8amjDFDAya7QR iVZQ== X-Gm-Message-State: ABy/qLak7/1Mdy61BbW+eJ2LHrUdUmLlh2iSV6BXHGtEaZ+WN6iVcwiT WM/GR1tyFBoXhTzoYH2gLuAQYqSOPDGiHQcKeZfxzAIVc291jN1wllGgNLZ85WuF0IfKIYV8t1w P8qbBouHOEq+QJGzsnHlngf0= X-Received: by 2002:a05:6808:130d:b0:3a3:94f4:adca with SMTP id y13-20020a056808130d00b003a394f4adcamr5711472oiv.2.1688374674125; Mon, 03 Jul 2023 01:57:54 -0700 (PDT) X-Google-Smtp-Source: APBJJlHfFPOWqkwhpp6TlBUGgyyYukxSczxCjVOwXH1FIgilJb0/yV9dgyGNEESMLchVwtkVjxB3NX5bX6EBKBRo3bw= X-Received: by 2002:a05:6808:130d:b0:3a3:94f4:adca with SMTP id y13-20020a056808130d00b003a394f4adcamr5711461oiv.2.1688374673965; Mon, 03 Jul 2023 01:57:53 -0700 (PDT) MIME-Version: 1.0 References: <20230628063651.178604-1-miao.li@intel.com> <20230629022653.263046-1-miao.li@intel.com> In-Reply-To: From: David Marchand Date: Mon, 3 Jul 2023 10:57:42 +0200 Message-ID: Subject: Re: [PATCH v2 1/2] net/virtio: fix legacy device IO port map in secondary process To: "Li, Miao" Cc: "dev@dpdk.org" , "stable@dpdk.org" , Maxime Coquelin , "Xia, Chenbo" X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On Mon, Jul 3, 2023 at 10:54=E2=80=AFAM Li, Miao wrote: > > > When doing IO port map for legacy device in secondary process, > > > vfio_cfg setup for legacy device like vfio_group_fd and vfio_dev_fd i= s > > > missing. So, in secondary process, rte_pci_map_device is added for > > > legacy device to setup vfio_cfg and fill in region info like in > > > primary process. > > > > I think, in legacy mode, there is no PCI mappable memory. > > So there should be no need for this call to rte_pci_map_device. > > > > What is missing is a vfio setup, is this correct? > > I'd rather see this issue be fixed in the pci_vfio_ioport_map() functio= n. > > > If adding vfio setup in the pci_vfio_ioport_map() function, vfio will be = setup twice in primary process because rte_pci_map_device will be called fo= r legacy device in primary process. > I add IO port region check to skip region map in the next patch. Well, something must be done so that it is not mapped twice, I did not look into the details. This current patch looks wrong to me and I understand this is not a virtio only issue. --=20 David Marchand