From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1E8861B150C for ; Thu, 4 Jul 2024 16:16:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720109801; cv=none; b=BkSFcd8QXiL/8mVvaKej5g2UUaKHuhe20iPTsV0bGL2t7budyGT8p6rmeZxyq1MSWldfKSVuz3MJgWVjuCletPmPS2xa9R0NaZok9BaFhz3mM4MzThvnIUCzzxH6DTyNuGolgEnlSm0+b94fFKT6VwFjUGQGRKFrt93tIq2+NaY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720109801; c=relaxed/simple; bh=Q64XgPXxdPyF8fceBZsqiK/ZwK9E+LeSQ35lbTiGvTs=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ekDPT9bW5mv95mU2ZuAGd4rqqs8groIP8a4fJLvXEO9wniT0B2AYD0p9/ZD8B/8GCUbkd3Va37EZJ9/+7LqIuYyTz7LqgZsKxSV89ao3Lppjn2WWVgMGKDFjNudYKoNaBh4WnOjws/C87Hp/9UHUuTGNSosia131HTVDY9AH78o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=QPy9yZqG; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="QPy9yZqG" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1720109799; 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=yJa9zCFGNHZVVWTUWtjqpJT17S7A9QRX0TDrsTkoGKc=; b=QPy9yZqGfeZ80kcMHWlgtBeRfXuoAJRyeeHNrI+yv1OxBX+w7QLi3qsfS+VCEiqFEIcNwM /R3JVnMe49R5hPbFS78Qh+8bRDp7dmjGWY27Qdi/A/0x5D9DfldhPzsuWnXENkmXphxG5x jnCbBYjh944RSEylKATcSAufL7mDjEs= Received: from mail-io1-f71.google.com (mail-io1-f71.google.com [209.85.166.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-652-mRuSFc0xMHe8nm8kiZAebQ-1; Thu, 04 Jul 2024 12:16:37 -0400 X-MC-Unique: mRuSFc0xMHe8nm8kiZAebQ-1 Received: by mail-io1-f71.google.com with SMTP id ca18e2360f4ac-7f61f4c998bso105819339f.1 for ; Thu, 04 Jul 2024 09:16:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720109797; x=1720714597; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=yJa9zCFGNHZVVWTUWtjqpJT17S7A9QRX0TDrsTkoGKc=; b=lHZLUv8hTRzVVZ7lUTYL7Viw82ZMzRVPSAQgwmpf7RdLQFnUSgo7g4hdh+CLltVB6n LKeY+ScUdWuIzqyvNtSTZ1k9oDRk3wuB/cQI0wpgchJHpdip2aOeTOjMDI2r9/jVS5w9 UGXzhXmmsKu2b85Wcho8L0Dvz/dE17zgdRZjaZkDiV1fn+S/0T39aG3unT+uIzoZSULC NOtnwf04eaduYojpU9UWfkjj+TMy9jdkMtL+8QtZEnvpbwOzKpzqX0PMH7zRgyNFn8z3 lEKOl8Y/PZ5rWuvEllWC+pN3GNoLQr0Pa9wRMfH3FCFo0kPQoyITNosam7YBFe2s40x5 EKVA== X-Forwarded-Encrypted: i=1; AJvYcCXpN03NjAPWwJl9SSgdlcdrF/eeIEZgT4MNMBakDZHQYka5GovkcBstwZn2rjcB383hYC08KascQMzvxYvOr7xIRcqq/gJHTg6XruiB X-Gm-Message-State: AOJu0YwQZH9tYF2ObnFHFEBQtxDsyg4X5gzdg/VJ/tVZDts5Bww4w/Rw 0X9xUcPhdNjHBlgd6I6uMrUhlNQuCrGVAC92PB8UbZsSxPx9LPUyMjrAs2Q1bvOv1sijA85PNgF F93RqtidfZyWkD5X7k3Jd8sUDM1EUKDtY89GD6oawGtDJDva+h1ihFGpF9Rwmxg== X-Received: by 2002:a6b:e611:0:b0:7f3:d82c:b9e6 with SMTP id ca18e2360f4ac-7f66df1c79emr262810339f.15.1720109796818; Thu, 04 Jul 2024 09:16:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEJUTtWQwJuNtpWfpOA8Dm3k5p7PLSbdfR6O6iYLOTaqEpw7ci4MY9M4rg9iu7ACxq2jHdXvw== X-Received: by 2002:a6b:e611:0:b0:7f3:d82c:b9e6 with SMTP id ca18e2360f4ac-7f66df1c79emr262807939f.15.1720109796433; Thu, 04 Jul 2024 09:16:36 -0700 (PDT) Received: from redhat.com ([38.15.36.11]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4bb73bb361fsm4006058173.23.2024.07.04.09.16.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jul 2024 09:16:36 -0700 (PDT) Date: Thu, 4 Jul 2024 10:16:34 -0600 From: Alex Williamson To: Niklas Schnelle Cc: Bjorn Helgaas , Christoph Hellwig , Gerald Schaefer , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Gerd Bayer , Matthew Rosato , Jason Gunthorpe , linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org Subject: Re: [PATCH v4 4/4] vfio/pci: Enable PCI resource mmap() on s390 and remove VFIO_PCI_MMAP Message-ID: <20240704101634.30b542a2.alex.williamson@redhat.com> In-Reply-To: <20240626-vfio_pci_mmap-v4-4-7f038870f022@linux.ibm.com> References: <20240626-vfio_pci_mmap-v4-0-7f038870f022@linux.ibm.com> <20240626-vfio_pci_mmap-v4-4-7f038870f022@linux.ibm.com> Organization: Red Hat Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 26 Jun 2024 13:15:51 +0200 Niklas Schnelle wrote: > With the introduction of memory I/O (MIO) instructions enbaled in commit > 71ba41c9b1d9 ("s390/pci: provide support for MIO instructions") s390 > gained support for direct user-space access to mapped PCI resources. > Even without those however user-space can access mapped PCI resources > via the s390 specific MMIO syscalls. Thus mmap() can and should be > supported on all s390 systems with native PCI. Since VFIO_PCI_MMAP > enablement for s390 would make it unconditionally true and thus > pointless just remove it entirely. > > Link: https://lore.kernel.org/all/c5ba134a1d4f4465b5956027e6a4ea6f6beff969.camel@linux.ibm.com/ > Suggested-by: Jason Gunthorpe > Reviewed-by: Matthew Rosato > Reviewed-by: Jason Gunthorpe > Signed-off-by: Niklas Schnelle > --- > drivers/vfio/pci/Kconfig | 4 ---- > drivers/vfio/pci/vfio_pci_core.c | 3 --- > 2 files changed, 7 deletions(-) I think you're planning a v5 which drops patch 3/ of this series and finesses the commit log of patch 2/ a bit. This has become much less a vfio series, so if you want to commit through s390, Acked-by: Alex Williamson Thanks, Alex > > diff --git a/drivers/vfio/pci/Kconfig b/drivers/vfio/pci/Kconfig > index bf50ffa10bde..c3bcb6911c53 100644 > --- a/drivers/vfio/pci/Kconfig > +++ b/drivers/vfio/pci/Kconfig > @@ -7,10 +7,6 @@ config VFIO_PCI_CORE > select VFIO_VIRQFD > select IRQ_BYPASS_MANAGER > > -config VFIO_PCI_MMAP > - def_bool y if !S390 > - depends on VFIO_PCI_CORE > - > config VFIO_PCI_INTX > def_bool y if !S390 > depends on VFIO_PCI_CORE > diff --git a/drivers/vfio/pci/vfio_pci_core.c b/drivers/vfio/pci/vfio_pci_core.c > index 0e9d46575776..c08d0f7bb500 100644 > --- a/drivers/vfio/pci/vfio_pci_core.c > +++ b/drivers/vfio/pci/vfio_pci_core.c > @@ -120,9 +120,6 @@ static void vfio_pci_probe_mmaps(struct vfio_pci_core_device *vdev) > > res = &vdev->pdev->resource[bar]; > > - if (!IS_ENABLED(CONFIG_VFIO_PCI_MMAP)) > - goto no_mmap; > - > if (!(res->flags & IORESOURCE_MEM)) > goto no_mmap; > >