From patchwork Tue Feb 23 15:27:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 1443531 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:1231::1; helo=merlin.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=merlin.20170209 header.b=Gr0KXJPd; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (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 4DlNG63dLqz9sVV for ; Wed, 24 Feb 2021 02:27:26 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject: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=8O0WtPY4OzvGPI9BBa1WSn+7D2NEdxx4OwMcYaGAmW8=; b=Gr0KXJPdu26rZyA7zEPpqUdSr1 A9bFOZbefIovyG3ETjwJIre6N8d1zOotfW+k3zlGSSo0nUiONSoq73O5BPIGLiWQjQ7mD0hthASJo clXoShI4p2tNRbrew5zgm5yD3lKnt1RwZiwnWX3/kwJL5ACh/TRBMwg+Gb6yguULln7pRkmiYLZSC lzZsKOdFsLpU2nrFbIa8SzEamz9PPbhH4+kdDxEnsAbSdI9l8ZvBK489GUFvXIhfhA8YOewUO+A+E fosXerKQH1iT5edFnhsqbEUSGalJ+StqmGMxAIihX5wOkJP73CS7FDZOx4LfWD1HsvmsmJQU6uLL0 Iwlu1MoQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lEZan-0001FK-Dq; Tue, 23 Feb 2021 15:27:17 +0000 Received: from s3.sipsolutions.net ([2a01:4f8:191:4433::2] helo=sipsolutions.net) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lEZaj-0001CU-Hi for linux-um@lists.infradead.org; Tue, 23 Feb 2021 15:27:14 +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 1lEZah-007R3T-G1; Tue, 23 Feb 2021 16:27:11 +0100 From: Johannes Berg To: linux-um@lists.infradead.org Subject: [PATCH 0/7] PCI support for UML Date: Tue, 23 Feb 2021 16:27:00 +0100 Message-Id: <20210223152707.408995-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-20210223_102713_619102_B5374053 X-CRM114-Status: UNSURE ( 7.76 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , linux-kernel@vger.kernel.org Sender: "linux-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Hi, 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