From patchwork Fri Mar 5 12:19:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 1447803 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1:d65d:64ff:fe57:4e05; helo=desiato.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=nipc8slH; dkim-atps=neutral Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DsRf65Tn0z9sWL for ; Fri, 5 Mar 2021 23:20:46 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=0xiK54DeFC+fUkWcl1rPtIPaXpjbJN7D+d65OC0wwlM=; b=nipc8slH6kqzNiO4/t8cT1iaVj 0dM1xC3sRovVxrRzojpVte2sKsnLbXwS8amr/qcbCgmtfjQ4OZCEq7vXLaG7uB0hqrcjrIWKjzC5P PrDCpyj1ayRLJuAKJCQMR2hg3jW8lleplTGGNZImS3kMCi+WTYG2ubFUl8oHbr/y8hQQRMMG2feNB WbIghrBXq5VBGg9k0XIlfAi0KuxVTS5iGlWOY44fWiTd4Llz3YiskXdMZzIVZ/K8ybYWJKX2macKi 7M/2mkY+I4agmoHEu3wlyqfKDSgSk2zyh96xhSDVXe+hCYqZ3PITpGCz3vZKHrJ0wG32ujavSfOKO HuEqFE2Q==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lI9RY-00EwpX-V0; Fri, 05 Mar 2021 12:20:33 +0000 Received: from s3.sipsolutions.net ([2a01:4f8:191:4433::2] helo=sipsolutions.net) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lI9RU-00Ewm4-Gi for linux-um@lists.infradead.org; Fri, 05 Mar 2021 12:20:30 +0000 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94) (envelope-from ) id 1lI9RT-00C3YV-Lr; Fri, 05 Mar 2021 13:20:27 +0100 From: Johannes Berg To: linux-um@lists.infradead.org Cc: Arnd Bergmann Subject: [PATCH v4 0/9] PCI support for UML Date: Fri, 5 Mar 2021 13:19:50 +0100 Message-Id: <20210305122010.442577-1-johannes@sipsolutions.net> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210305_122028_722618_64B980C7 X-CRM114-Status: GOOD ( 12.21 ) X-Spam-Score: 0.4 (/) X-Spam-Report: Spam detection software, running on the system "desiato.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Changes since v3: - fix a circular build dependency in "um: expose time-travel mode to userspace side" Chances since v2: - add "um: expose time-travel mode to userspace side" to simplify "um: time-travel/signals: fix ndelay() in interrupt" - rework "um: time-travel/signals: fix ndelay() in interrupt" a [...] Content analysis details: (0.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Changes since v3: - fix a circular build dependency in "um: expose time-travel mode to userspace side" Chances since v2: - add "um: expose time-travel mode to userspace side" to simplify "um: time-travel/signals: fix ndelay() in interrupt" - rework "um: time-travel/signals: fix ndelay() in interrupt" a fair bit to fix bugs with time_travel_mode != TT_MODE_EXTERNAL when CONFIG_UML_TIME_TRAVEL_SUPPORT is enabled, and to clean up the code - no changes to the other patches Changes since v1: - fix a memory leak in the PCI code - fix race in interrupt handling - fix checks in interrupt handling - use asm-generic for fb.h and vga.h - rediff against v5.12-rc1 - export signals_enabled directly Original description: In order to simulate some devices and write tests completely independent of real PCI devices, we continued the development of time-travel and related bits, and are adding PCI support here now. The way it works is that it communicates with the outside (of UML) with virtio, which we previously added using vhost-user, and then offers a PCI bus to the inside system, where normal PCI probing etc. happens, but all config space & IO accesses are forwarded over virtio. To enable that, add lib/logic_iomem, similar to logic_pio but for iomem regions, this way, ioread/iowrite can be redirected over the virtio device. Since currently no official virtio device ID is assigned yet a Kconfig option for that is required to be set to the value you want to use locally for experimentation. Once we have an official value we can change the default (currently -1 which makes it non-functional) or remove the option entirely. johannes