From patchwork Fri Apr 26 17:53:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= X-Patchwork-Id: 13645219 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9A74DC4345F for ; Fri, 26 Apr 2024 17:55:37 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.712994.1113921 (Exim 4.92) (envelope-from ) id 1s0Pn3-0004b7-56; Fri, 26 Apr 2024 17:55:17 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 712994.1113921; Fri, 26 Apr 2024 17:55:17 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s0Pn2-0004aC-Ud; Fri, 26 Apr 2024 17:55:16 +0000 Received: by outflank-mailman (input) for mailman id 712994; Fri, 26 Apr 2024 17:55:14 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s0Pn0-0004Xj-Sy for xen-devel@lists.xenproject.org; Fri, 26 Apr 2024 17:55:14 +0000 Received: from wfhigh5-smtp.messagingengine.com (wfhigh5-smtp.messagingengine.com [64.147.123.156]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 2133c0c6-03f6-11ef-909a-e314d9c70b13; Fri, 26 Apr 2024 19:55:13 +0200 (CEST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfhigh.west.internal (Postfix) with ESMTP id 20807180017C; Fri, 26 Apr 2024 13:55:11 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Fri, 26 Apr 2024 13:55:12 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 26 Apr 2024 13:55:08 -0400 (EDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 2133c0c6-03f6-11ef-909a-e314d9c70b13 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= invisiblethingslab.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1714154110; x=1714240510; bh=wnwLHJjK04 m7/9icyRhj8AsJLZNROamjl2zOStksx24=; b=UHC1s2f/T0/3E2+PWJe0soraOF +OrZF0FjpLmSpgoGC5lfSc1geZuWuK++8i6AXPWLnHWNPDMfp7E4ax/mi5J+iDlJ ur6IbDVeN6C/g4Pj6VKhc2CgksLABGmqcgOZWww1JbJp6OZSinwllqnJvt7+kg9u ux130D3+/1Tg/jk6l7yA0+5pcdnsG80jGIk0B+1xuM+vhj7HLg6nzcRyqfoOsyuw GpDOrCDDHF8ZkD1Mhvsrw4p344NLVxvPouUgoYR1FeLVVuN9JHNr7PZTr2pDd6BM 7oupxhGbA+1bJHvadrpc7Z+c1+lOho5p+FJhEe1/i71lHMDMuPhjGPV5vR8Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1714154110; x= 1714240510; bh=wnwLHJjK04m7/9icyRhj8AsJLZNROamjl2zOStksx24=; b=I /iG1QotweSKdUqu7tjOIW4uzc1PpIA45z6jzSPvYDB6SI3jM1Pmp+9M/RgLYzvQF X31sy9gaZ5S+VaTZrg80hvl/xnnLJ5hK/FG++Ak20TMVi2MRkAAPzJ9b2pXE2WD+ sADIDlBJ0wQXYJ15mZCeVyvkGi8Y/Iml6k0QQX22meWBngq0Um4+qEsvA1+895ur 48g8UstUs9z6N/+W8H3b370xZBEGhWu/DPkVw9/ThvfmxipFWu00Qan7hF/znQrV o5bq0ncsIKBZaP1HXLHENWoF8PiUPhDBW4Aj7feEwy4cU7L69olayyX+tjdaJpn8 Vl9H7lMAlmh9wfu/XkpCA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudelledguddukecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufffkffojghfgggtgfesthekredtredtjeenucfhrhhomhepofgr rhgvkhcuofgrrhgtiiihkhhofihskhhiqdfikphrvggtkhhiuceomhgrrhhmrghrvghkse hinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomheqnecuggftrfgrthhtvghrnhep gfeuudehgfdvfeehhedujeehfeduveeugefhkefhheelgeevudetueeiudfggfffnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhgrrhhmrghr vghksehinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomh X-ME-Proxy: Feedback-ID: i1568416f:Fastmail From: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= To: xen-devel@lists.xenproject.org Cc: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= , Jan Beulich , Andrew Cooper , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , George Dunlap , Julien Grall , Stefano Stabellini Subject: [PATCH v6 1/7] x86/msi: passthrough all MSI-X vector ctrl writes to device model Date: Fri, 26 Apr 2024 19:53:58 +0200 Message-ID: X-Mailer: git-send-email 2.44.0 In-Reply-To: References: MIME-Version: 1.0 QEMU needs to know whether clearing maskbit of a vector is really clearing, or was already cleared before. Currently Xen sends only clearing that bit to the device model, but not setting it, so QEMU cannot detect it. Because of that, QEMU is working this around by checking via /dev/mem, but that isn't the proper approach. Give all necessary information to QEMU by passing all ctrl writes, including masking a vector. Advertise the new behavior via XENVER_get_features, so QEMU can know it doesn't need to access /dev/mem anymore. While this commit doesn't move the whole maskbit handling to QEMU (as discussed on xen-devel as one of the possibilities), it is a necessary first step anyway. Including telling QEMU it will get all the required information to do so. The actual implementation would need to include: - a hypercall for QEMU to control just maskbit (without (re)binding the interrupt again - a methor for QEMU to tell Xen it will actually do the work Those are not part of this series. Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Jan Beulich --- I did not added any control to enable/disable this new behavior (as Roger have suggested for possible non-QEMU ioreqs). I don't see how the new behavior could be problematic for some existing ioreq server (they already received writes to those addresses, just not all of them), but if that's really necessary, I can probably add a command line option to restore previous behavior system-wide. Changes in v5: - announce the feature only on x86 - style fixes Changes in v4: - ignore unaligned writes with X86EMUL_OKAY - restructure the code to forward all writes in _msixtbl_write() instead of manipulating return value of msixtbl_write() - this makes WRITE_LEN4_COMPLETION special case unnecessary - advertise the changed behavior via XENVER_get_features instead of DMOP v3: - advertise changed behavior in XEN_DMOP_get_ioreq_server_info - make "flags" parameter IN/OUT - move len check back to msixtbl_write() - will be needed there anyway in a later patch v2: - passthrough quad writes to emulator too (Jan) - (ab)use len==0 for write len=4 completion (Jan), but add descriptive #define for this magic value --- xen/arch/x86/hvm/vmsi.c | 19 ++++++++++++++----- xen/common/kernel.c | 1 + xen/include/public/features.h | 8 ++++++++ 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/xen/arch/x86/hvm/vmsi.c b/xen/arch/x86/hvm/vmsi.c index adbac965f9f7..999917983789 100644 --- a/xen/arch/x86/hvm/vmsi.c +++ b/xen/arch/x86/hvm/vmsi.c @@ -283,8 +283,8 @@ static int msixtbl_write(struct vcpu *v, unsigned long address, unsigned long flags; struct irq_desc *desc; - if ( (len != 4 && len != 8) || (address & (len - 1)) ) - return r; + if ( !IS_ALIGNED(address, len) ) + return X86EMUL_OKAY; rcu_read_lock(&msixtbl_rcu_lock); @@ -345,8 +345,7 @@ static int msixtbl_write(struct vcpu *v, unsigned long address, unlock: spin_unlock_irqrestore(&desc->lock, flags); - if ( len == 4 ) - r = X86EMUL_OKAY; + r = X86EMUL_OKAY; out: rcu_read_unlock(&msixtbl_rcu_lock); @@ -357,7 +356,17 @@ static int cf_check _msixtbl_write( const struct hvm_io_handler *handler, uint64_t address, uint32_t len, uint64_t val) { - return msixtbl_write(current, address, len, val); + /* Ignore invalid length or unaligned writes. */ + if ( (len != 4 && len != 8) || !IS_ALIGNED(address, len) ) + return X86EMUL_OKAY; + + /* + * This function returns X86EMUL_UNHANDLEABLE even if write is properly + * handled, to propagate it to the device model (so it can keep its + * internal state in sync). + */ + msixtbl_write(current, address, len, val); + return X86EMUL_UNHANDLEABLE; } static bool cf_check msixtbl_range( diff --git a/xen/common/kernel.c b/xen/common/kernel.c index 08dbaa2a054c..b44b2439ca8e 100644 --- a/xen/common/kernel.c +++ b/xen/common/kernel.c @@ -637,6 +637,7 @@ long do_xen_version(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg) fi.submap |= (1U << XENFEAT_hvm_safe_pvclock) | (1U << XENFEAT_hvm_callback_vector) | (has_pirq(d) ? (1U << XENFEAT_hvm_pirqs) : 0); + fi.submap |= (1U << XENFEAT_dm_msix_all_writes); #endif if ( !paging_mode_translate(d) || is_domain_direct_mapped(d) ) fi.submap |= (1U << XENFEAT_direct_mapped); diff --git a/xen/include/public/features.h b/xen/include/public/features.h index 4437f25d2532..880193094713 100644 --- a/xen/include/public/features.h +++ b/xen/include/public/features.h @@ -120,6 +120,14 @@ #define XENFEAT_runstate_phys_area 18 #define XENFEAT_vcpu_time_phys_area 19 +/* + * If set, Xen will passthrough all MSI-X vector ctrl writes to device model, + * not only those unmasking an entry. This allows device model to properly keep + * track of the MSI-X table without having to read it from the device behind + * Xen's backs. This information is relevant only for device models. + */ +#define XENFEAT_dm_msix_all_writes 20 + #define XENFEAT_NR_SUBMAPS 1 #endif /* __XEN_PUBLIC_FEATURES_H__ */ From patchwork Fri Apr 26 17:53:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= X-Patchwork-Id: 13645225 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 81EACC25B5F for ; Fri, 26 Apr 2024 17:55:39 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.712995.1113935 (Exim 4.92) (envelope-from ) id 1s0Pn4-00050Q-9S; Fri, 26 Apr 2024 17:55:18 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 712995.1113935; Fri, 26 Apr 2024 17:55:18 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s0Pn4-00050J-6L; Fri, 26 Apr 2024 17:55:18 +0000 Received: by outflank-mailman (input) for mailman id 712995; Fri, 26 Apr 2024 17:55:17 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s0Pn3-0004Xj-1L for xen-devel@lists.xenproject.org; Fri, 26 Apr 2024 17:55:17 +0000 Received: from wfhigh5-smtp.messagingengine.com (wfhigh5-smtp.messagingengine.com [64.147.123.156]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 22cd8763-03f6-11ef-909a-e314d9c70b13; Fri, 26 Apr 2024 19:55:16 +0200 (CEST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfhigh.west.internal (Postfix) with ESMTP id 6107A1800120; Fri, 26 Apr 2024 13:55:14 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Fri, 26 Apr 2024 13:55:14 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 26 Apr 2024 13:55:12 -0400 (EDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 22cd8763-03f6-11ef-909a-e314d9c70b13 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= invisiblethingslab.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1714154113; x=1714240513; bh=honjTb6abt tQjuzNiX/lJMZfyWZ6V6USbB6qxEtNQxA=; b=ji60msnEKEfXtuFeFuu4U4C+4j HTwVTgFU+Afx133SGtZNHGazKsnVf0u1AUR3w1B+of3PJEN9eGdmXPLc/zbqsqGv gCvY7fjSoMyLZq1i7PDW+9N000KRW++R/m3c2AP1bGnHTGXhXl7SqxpBgzTFXe/+ hUA2qiYGBOBU8bgJLM1q0Uk/jiEwoIUS0x+mABxmemxjcnQZ+lmTiA6woFBuWzLL 83qlcFcP3f69mk3ljYtnZvi7wrXDsgj5HeexfHuGUkoPmJWGMchdHZe4GnMTy94I v0t0f4OJfEzvbJr7K93lnmCE04G6KTr5CpHXcGBir1YWX6VtBaiVnOmUcwRA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1714154113; x= 1714240513; bh=honjTb6abttQjuzNiX/lJMZfyWZ6V6USbB6qxEtNQxA=; b=B xO8B9qNEStbq4S0dLaDT7ls3zo5cUAFKYLDrfzK5G0gOcDgBwn8fVgB2aRkbIhCT HGHifMGjoKa5wjIGT56Oq5384+rFDfkALqGGdFJaVjM2O4qreyrZRWBa7nCsOwNp v8oF/36mJ1XprsUWxg0/QDDiY64TBqhGVJfPaT/GJhFRnqLTB77pPgMK41+ocI7N VmmjMx/tLYfdSIMFXi/zX+78ayIveTgk4J59vdda9IlXlD27vUgsdnf7BPiabC5h UkSvle246P+4caaIRczwohFcrHG7RZO5XrCvTN840xY0mm+bV7GVkp8dsKoiuYjk xzu5CJju+wyufBksSMzCw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudelledguddulecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufffkffojghfgggtgfesthekredtredtjeenucfhrhhomhepofgr rhgvkhcuofgrrhgtiiihkhhofihskhhiqdfikphrvggtkhhiuceomhgrrhhmrghrvghkse hinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomheqnecuggftrfgrthhtvghrnhep gfeuudehgfdvfeehhedujeehfeduveeugefhkefhheelgeevudetueeiudfggfffnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhgrrhhmrghr vghksehinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomh X-ME-Proxy: Feedback-ID: i1568416f:Fastmail From: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= To: xen-devel@lists.xenproject.org Cc: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= , Jan Beulich , Andrew Cooper , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Subject: [PATCH v6 2/7] x86/msi: Extend per-domain/device warning mechanism Date: Fri, 26 Apr 2024 19:53:59 +0200 Message-ID: <46f33e8ae1aa7d310e7a99e9da29d29096b0935b.1714154036.git-series.marmarek@invisiblethingslab.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: References: MIME-Version: 1.0 The arch_msix struct had a single "warned" field with a domid for which warning was issued. Upcoming patch will need similar mechanism for few more warnings, so change it to save a bit field of issued warnings. Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Jan Beulich --- Changes in v6: - add MSIX_CHECK_WARN macro (Jan) - drop struct name from warned_kind union (Jan) New in v5 --- xen/arch/x86/include/asm/msi.h | 17 ++++++++++++++++- xen/arch/x86/msi.c | 5 +---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/xen/arch/x86/include/asm/msi.h b/xen/arch/x86/include/asm/msi.h index 997ccb87be0c..bcfdfd35345d 100644 --- a/xen/arch/x86/include/asm/msi.h +++ b/xen/arch/x86/include/asm/msi.h @@ -208,6 +208,15 @@ struct msg_address { PCI_MSIX_ENTRY_SIZE + \ (~PCI_MSIX_BIRMASK & (PAGE_SIZE - 1))) +#define MSIX_CHECK_WARN(msix, domid, which) ({ \ + if ( (msix)->warned_domid != (domid) ) \ + { \ + (msix)->warned_domid = (domid); \ + (msix)->warned_kind.all = 0; \ + } \ + (msix)->warned_kind.which ? false : ((msix)->warned_kind.which = true); \ +}) + struct arch_msix { unsigned int nr_entries, used_entries; struct { @@ -217,7 +226,13 @@ struct arch_msix { int table_idx[MAX_MSIX_TABLE_PAGES]; spinlock_t table_lock; bool host_maskall, guest_maskall; - domid_t warned; + domid_t warned_domid; + union { + uint8_t all; + struct { + bool maskall : 1; + }; + } warned_kind; }; void early_msi_init(void); diff --git a/xen/arch/x86/msi.c b/xen/arch/x86/msi.c index e721aaf5c001..42c793426da3 100644 --- a/xen/arch/x86/msi.c +++ b/xen/arch/x86/msi.c @@ -364,13 +364,10 @@ static bool msi_set_mask_bit(struct irq_desc *desc, bool host, bool guest) domid_t domid = pdev->domain->domain_id; maskall = true; - if ( pdev->msix->warned != domid ) - { - pdev->msix->warned = domid; + if ( MSIX_CHECK_WARN(pdev->msix, domid, maskall) ) printk(XENLOG_G_WARNING "cannot mask IRQ %d: masking MSI-X on Dom%d's %pp\n", desc->irq, domid, &pdev->sbdf); - } } pdev->msix->host_maskall = maskall; if ( maskall || pdev->msix->guest_maskall ) From patchwork Fri Apr 26 17:54:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= X-Patchwork-Id: 13645220 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D5FCAC19F4F for ; Fri, 26 Apr 2024 17:55:37 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.712997.1113955 (Exim 4.92) (envelope-from ) id 1s0PnC-0005a5-TJ; Fri, 26 Apr 2024 17:55:26 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 712997.1113955; Fri, 26 Apr 2024 17:55:26 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s0PnC-0005Zq-P1; Fri, 26 Apr 2024 17:55:26 +0000 Received: by outflank-mailman (input) for mailman id 712997; Fri, 26 Apr 2024 17:55:25 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s0PnB-0005IL-Gu for xen-devel@lists.xenproject.org; Fri, 26 Apr 2024 17:55:25 +0000 Received: from wfhigh5-smtp.messagingengine.com (wfhigh5-smtp.messagingengine.com [64.147.123.156]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 2463dfae-03f6-11ef-b4bb-af5377834399; Fri, 26 Apr 2024 19:55:20 +0200 (CEST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfhigh.west.internal (Postfix) with ESMTP id 0B3E21800120; Fri, 26 Apr 2024 13:55:16 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Fri, 26 Apr 2024 13:55:17 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 26 Apr 2024 13:55:15 -0400 (EDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 2463dfae-03f6-11ef-b4bb-af5377834399 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= invisiblethingslab.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1714154116; x=1714240516; bh=4hT2or0Iti p5jFfCLVRRh827QMnfJPeWI2OQoU3RIPw=; b=JhYIlBjeijgjEgs6bzmQ4oooXg J1QNrCFxqSMX+Het+wBwJLLRw31BpdF6NGNkTE753ceLKVatnhkl3xP5ECWP379s CJrKoDf9mfYT4Jo8az/2Ufk5XcpcVVag5AryHRgzU6Qyt4I3oxH1n7kWNq+tTuNT qD3i8j2nSDGraqitPH7KfrW0UIqzIIJK/xb6y8YJhM101wGvd8QXP4uiN9sBSPfk QT/N9QYReC9pBB/Ew+gE5liUU0bSZlOltop+UNwLR6DDzssdvGbYTzRz8GIv2+Zj 7vUPZXULfHHPfv1K7Krm2GgYANgPq3ml65i5UwIMTgF8XKn5DTHSQvu2xYZQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1714154116; x= 1714240516; bh=4hT2or0Itip5jFfCLVRRh827QMnfJPeWI2OQoU3RIPw=; b=h UVQvVwAj947lUYO6bA2M41Mu+v63wA3C0+7+CD4FOsDLm1Ck8P3oKOulag8sBHvK 9qf/rAecyyDIklsr6lfex8bVS67s9VgYJPUI91AoqBw5zBGBKB41Iqg64urKZZDz vx9DxSb/YZdIeFNipG+6dapr1jIsTFErnrajdluvKo7OZcIcexy/WMbwPzlvFLms Cec/bqwMD98oQQF25NuyxlIwd/mo3sHFuzv2RGnyuzWYBHwMciUxgy6A1s6yh8nc SbKDNK/ySoC8jdbnzpp0rFZOM0spYf3FAITO2wcmMbQrLHuZ6bWNtnxx7Xg6O8Kj um+qrP2j0/59L6xTKEg8g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudelledguddukecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufffkffojghfgggtgfesthekredtredtjeenucfhrhhomhepofgr rhgvkhcuofgrrhgtiiihkhhofihskhhiqdfikphrvggtkhhiuceomhgrrhhmrghrvghkse hinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomheqnecuggftrfgrthhtvghrnhep hfeihffghefgkeetiefgtdeivdfgvefhhfefvdduleetvdfggedtkeetfeefgeehnecuff homhgrihhnpehmshhigihtsghlpghlihhsthdrnhgvgihtnecuvehluhhsthgvrhfuihii vgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhgrrhhmrghrvghksehinhhvihhsih gslhgvthhhihhnghhslhgrsgdrtghomh X-ME-Proxy: Feedback-ID: i1568416f:Fastmail From: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= To: xen-devel@lists.xenproject.org Cc: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= , Jan Beulich , Andrew Cooper , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Subject: [PATCH v6 3/7] x86/hvm: Allow access to registers on the same page as MSI-X table Date: Fri, 26 Apr 2024 19:54:00 +0200 Message-ID: X-Mailer: git-send-email 2.44.0 In-Reply-To: References: MIME-Version: 1.0 Some devices (notably Intel Wifi 6 AX210 card) keep auxiliary registers on the same page as MSI-X table. Device model (especially one in stubdomain) cannot really handle those, as direct writes to that page is refused (page is on the mmio_ro_ranges list). Instead, extend msixtbl_mmio_ops to handle such accesses too. Doing this, requires correlating read/write location with guest of MSI-X table address. Since QEMU doesn't map MSI-X table to the guest, it requires msixtbl_entry->gtable, which is HVM-only. Similar feature for PV would need to be done separately. This will be also used to read Pending Bit Array, if it lives on the same page, making QEMU not needing /dev/mem access at all (especially helpful with lockdown enabled in dom0). If PBA lives on another page, QEMU will map it to the guest directly. If PBA lives on the same page, discard writes and log a message. Technically, writes outside of PBA could be allowed, but at this moment the precise location of PBA isn't saved, and also no known device abuses the spec in this way (at least yet). To access those registers, msixtbl_mmio_ops need the relevant page mapped. MSI handling already has infrastructure for that, using fixmap, so try to map first/last page of the MSI-X table (if necessary) and save their fixmap indexes. Note that msix_get_fixmap() does reference counting and reuses existing mapping, so just call it directly, even if the page was mapped before. Also, it uses a specific range of fixmap indexes which doesn't include 0, so use 0 as default ("not mapped") value - which simplifies code a bit. GCC 12.2.1 gets confused about 'desc' variable: arch/x86/hvm/vmsi.c: In function ‘msixtbl_range’: arch/x86/hvm/vmsi.c:553:8: error: ‘desc’ may be used uninitialized [-Werror=maybe-uninitialized] 553 | if ( desc ) | ^ arch/x86/hvm/vmsi.c:537:28: note: ‘desc’ was declared here 537 | const struct msi_desc *desc; | ^~~~ It's conditional initialization is actually correct (in the case where it isn't initialized, function returns early), but to avoid build failure initialize it explicitly to NULL anyway. Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Jan Beulich --- Changes in v6: - use MSIX_CHECK_WARN macro - extend assert on fixmap_idx - add break in default label, after ASSERT_UNREACHABLE(), and move setting default there - style fixes Changes in v5: - style fixes - include GCC version in the commit message - warn only once (per domain, per device) about failed adjacent access Changes in v4: - drop same_page parameter of msixtbl_find_entry(), distinguish two cases in relevant callers - rename adj_access_table_idx to adj_access_idx - code style fixes - drop alignment check in adjacent_{read,write}() - all callers already have it earlier - delay mapping first/last MSI-X pages until preparing device for a passthrough v3: - merge handling into msixtbl_mmio_ops - extend commit message v2: - adjust commit message - pass struct domain to msixtbl_page_handler_get_hwaddr() - reduce local variables used only once - log a warning if write is forbidden if MSI-X and PBA lives on the same page - do not passthrough unaligned accesses - handle accesses both before and after MSI-X table --- xen/arch/x86/hvm/vmsi.c | 200 ++++++++++++++++++++++++++++++++-- xen/arch/x86/include/asm/msi.h | 5 +- xen/arch/x86/msi.c | 41 +++++++- 3 files changed, 236 insertions(+), 10 deletions(-) diff --git a/xen/arch/x86/hvm/vmsi.c b/xen/arch/x86/hvm/vmsi.c index 999917983789..230e3a5dee3f 100644 --- a/xen/arch/x86/hvm/vmsi.c +++ b/xen/arch/x86/hvm/vmsi.c @@ -180,6 +180,10 @@ static bool msixtbl_initialised(const struct domain *d) return d->arch.hvm.msixtbl_list.next; } +/* + * Lookup an msixtbl_entry on the same page as given addr. It's up to the + * caller to check if address is strictly part of the table - if relevant. + */ static struct msixtbl_entry *msixtbl_find_entry( struct vcpu *v, unsigned long addr) { @@ -187,8 +191,8 @@ static struct msixtbl_entry *msixtbl_find_entry( struct domain *d = v->domain; list_for_each_entry( entry, &d->arch.hvm.msixtbl_list, list ) - if ( addr >= entry->gtable && - addr < entry->gtable + entry->table_len ) + if ( PFN_DOWN(addr) >= PFN_DOWN(entry->gtable) && + PFN_DOWN(addr) <= PFN_DOWN(entry->gtable + entry->table_len - 1) ) return entry; return NULL; @@ -213,6 +217,138 @@ static struct msi_desc *msixtbl_addr_to_desc( return NULL; } +/* + * Returns: + * - ADJACENT_DONT_HANDLE if no handling should be done + * - ADJACENT_DISCARD_WRITE if write should be discarded + * - a fixmap idx to use for handling + */ +#define ADJACENT_DONT_HANDLE UINT_MAX +#define ADJACENT_DISCARD_WRITE (UINT_MAX - 1) +static unsigned int adjacent_handle( + const struct msixtbl_entry *entry, unsigned long addr, bool write) +{ + unsigned int adj_type; + struct arch_msix *msix; + + if ( !entry || !entry->pdev ) + return ADJACENT_DONT_HANDLE; + + if ( PFN_DOWN(addr) == PFN_DOWN(entry->gtable) && addr < entry->gtable ) + adj_type = ADJ_IDX_FIRST; + else if ( PFN_DOWN(addr) == PFN_DOWN(entry->gtable + entry->table_len - 1) && + addr >= entry->gtable + entry->table_len ) + adj_type = ADJ_IDX_LAST; + else + return ADJACENT_DONT_HANDLE; + + msix = entry->pdev->msix; + ASSERT(msix); + + if ( !msix->adj_access_idx[adj_type] ) + { + if ( MSIX_CHECK_WARN(msix, entry->pdev->domain->domain_id, + adjacent_not_initialized) ) + gprintk(XENLOG_WARNING, + "Page for adjacent(%d) MSI-X table access not initialized for %pp (addr %#lx, gtable %#lx\n", + adj_type, &entry->pdev->sbdf, addr, entry->gtable); + return ADJACENT_DONT_HANDLE; + } + + /* If PBA lives on the same page too, discard writes. */ + if ( write && + ((adj_type == ADJ_IDX_LAST && + msix->table.last == msix->pba.first) || + (adj_type == ADJ_IDX_FIRST && + msix->table.first == msix->pba.last)) ) + { + if ( MSIX_CHECK_WARN(msix, entry->pdev->domain->domain_id, + adjacent_pba) ) + gprintk(XENLOG_WARNING, + "MSI-X table and PBA of %pp live on the same page, " + "writing to other registers there is not implemented\n", + &entry->pdev->sbdf); + return ADJACENT_DISCARD_WRITE; + } + + return msix->adj_access_idx[adj_type]; +} + +static int adjacent_read( + unsigned int fixmap_idx, + paddr_t address, unsigned int len, uint64_t *pval) +{ + const void __iomem *hwaddr; + + ASSERT(fixmap_idx <= FIX_MSIX_IO_RESERV_END); + + hwaddr = fix_to_virt(fixmap_idx) + PAGE_OFFSET(address); + + switch ( len ) + { + case 1: + *pval = readb(hwaddr); + break; + + case 2: + *pval = readw(hwaddr); + break; + + case 4: + *pval = readl(hwaddr); + break; + + case 8: + *pval = readq(hwaddr); + break; + + default: + ASSERT_UNREACHABLE(); + *pval = ~0UL; + break; + } + + return X86EMUL_OKAY; +} + +static int adjacent_write( + unsigned int fixmap_idx, + paddr_t address, unsigned int len, uint64_t val) +{ + void __iomem *hwaddr; + + if ( fixmap_idx == ADJACENT_DISCARD_WRITE ) + return X86EMUL_OKAY; + + ASSERT(fixmap_idx <= FIX_MSIX_IO_RESERV_END); + + hwaddr = fix_to_virt(fixmap_idx) + PAGE_OFFSET(address); + + switch ( len ) + { + case 1: + writeb(val, hwaddr); + break; + + case 2: + writew(val, hwaddr); + break; + + case 4: + writel(val, hwaddr); + break; + + case 8: + writeq(val, hwaddr); + break; + + default: + ASSERT_UNREACHABLE(); + } + + return X86EMUL_OKAY; +} + static int cf_check msixtbl_read( const struct hvm_io_handler *handler, uint64_t address, uint32_t len, uint64_t *pval) @@ -220,9 +356,10 @@ static int cf_check msixtbl_read( unsigned long offset; struct msixtbl_entry *entry; unsigned int nr_entry, index; + unsigned int adjacent_fixmap; int r = X86EMUL_UNHANDLEABLE; - if ( (len != 4 && len != 8) || (address & (len - 1)) ) + if ( !IS_ALIGNED(address, len) ) return r; rcu_read_lock(&msixtbl_rcu_lock); @@ -230,6 +367,21 @@ static int cf_check msixtbl_read( entry = msixtbl_find_entry(current, address); if ( !entry ) goto out; + + adjacent_fixmap = adjacent_handle(entry, address, false); + if ( adjacent_fixmap != ADJACENT_DONT_HANDLE ) + { + r = adjacent_read(adjacent_fixmap, address, len, pval); + goto out; + } + + if ( address < entry->gtable || + address >= entry->gtable + entry->table_len ) + goto out; + + if ( len != 4 && len != 8 ) + goto out; + offset = address & (PCI_MSIX_ENTRY_SIZE - 1); if ( offset != PCI_MSIX_ENTRY_VECTOR_CTRL_OFFSET ) @@ -282,6 +434,7 @@ static int msixtbl_write(struct vcpu *v, unsigned long address, int r = X86EMUL_UNHANDLEABLE; unsigned long flags; struct irq_desc *desc; + unsigned int adjacent_fixmap; if ( !IS_ALIGNED(address, len) ) return X86EMUL_OKAY; @@ -291,6 +444,21 @@ static int msixtbl_write(struct vcpu *v, unsigned long address, entry = msixtbl_find_entry(v, address); if ( !entry ) goto out; + + adjacent_fixmap = adjacent_handle(entry, address, true); + if ( adjacent_fixmap != ADJACENT_DONT_HANDLE ) + { + r = adjacent_write(adjacent_fixmap, address, len, val); + goto out; + } + + if ( address < entry->gtable || + address >= entry->gtable + entry->table_len ) + goto out; + + if ( len != 4 && len != 8 ) + goto out; + nr_entry = array_index_nospec(((address - entry->gtable) / PCI_MSIX_ENTRY_SIZE), MAX_MSIX_TABLE_ENTRIES); @@ -356,8 +524,8 @@ static int cf_check _msixtbl_write( const struct hvm_io_handler *handler, uint64_t address, uint32_t len, uint64_t val) { - /* Ignore invalid length or unaligned writes. */ - if ( (len != 4 && len != 8) || !IS_ALIGNED(address, len) ) + /* Ignore unaligned writes. */ + if ( !IS_ALIGNED(address, len) ) return X86EMUL_OKAY; /* @@ -374,14 +542,22 @@ static bool cf_check msixtbl_range( { struct vcpu *curr = current; unsigned long addr = r->addr; - const struct msi_desc *desc; + const struct msixtbl_entry *entry; + const struct msi_desc *desc = NULL; + unsigned int adjacent_fixmap; ASSERT(r->type == IOREQ_TYPE_COPY); rcu_read_lock(&msixtbl_rcu_lock); - desc = msixtbl_addr_to_desc(msixtbl_find_entry(curr, addr), addr); + entry = msixtbl_find_entry(curr, addr); + adjacent_fixmap = adjacent_handle(entry, addr, false); + if ( adjacent_fixmap == ADJACENT_DONT_HANDLE ) + desc = msixtbl_addr_to_desc(entry, addr); rcu_read_unlock(&msixtbl_rcu_lock); + if ( adjacent_fixmap != ADJACENT_DONT_HANDLE ) + return 1; + if ( desc ) return 1; @@ -622,12 +798,16 @@ void msix_write_completion(struct vcpu *v) v->arch.hvm.hvm_io.msix_snoop_gpa ) { unsigned int token = hvmemul_cache_disable(v); - const struct msi_desc *desc; + const struct msi_desc *desc = NULL; + const struct msixtbl_entry *entry; uint32_t data; rcu_read_lock(&msixtbl_rcu_lock); - desc = msixtbl_addr_to_desc(msixtbl_find_entry(v, snoop_addr), - snoop_addr); + entry = msixtbl_find_entry(v, snoop_addr); + if ( entry && + snoop_addr >= entry->gtable && + snoop_addr < entry->gtable + entry->table_len ) + desc = msixtbl_addr_to_desc(entry, snoop_addr); rcu_read_unlock(&msixtbl_rcu_lock); if ( desc && diff --git a/xen/arch/x86/include/asm/msi.h b/xen/arch/x86/include/asm/msi.h index bcfdfd35345d..923b730d48b8 100644 --- a/xen/arch/x86/include/asm/msi.h +++ b/xen/arch/x86/include/asm/msi.h @@ -224,6 +224,9 @@ struct arch_msix { } table, pba; int table_refcnt[MAX_MSIX_TABLE_PAGES]; int table_idx[MAX_MSIX_TABLE_PAGES]; +#define ADJ_IDX_FIRST 0 +#define ADJ_IDX_LAST 1 + unsigned int adj_access_idx[2]; spinlock_t table_lock; bool host_maskall, guest_maskall; domid_t warned_domid; @@ -231,6 +234,8 @@ struct arch_msix { uint8_t all; struct { bool maskall : 1; + bool adjacent_not_initialized : 1; + bool adjacent_pba : 1; }; } warned_kind; }; diff --git a/xen/arch/x86/msi.c b/xen/arch/x86/msi.c index 42c793426da3..c77b81896269 100644 --- a/xen/arch/x86/msi.c +++ b/xen/arch/x86/msi.c @@ -913,6 +913,36 @@ static int msix_capability_init(struct pci_dev *dev, list_add_tail(&entry->list, &dev->msi_list); *desc = entry; } + else + { + /* + * If the MSI-X table doesn't start at the page boundary, map the first page for + * passthrough accesses. + */ + if ( PAGE_OFFSET(table_paddr) ) + { + int idx = msix_get_fixmap(msix, table_paddr, table_paddr); + + if ( idx > 0 ) + msix->adj_access_idx[ADJ_IDX_FIRST] = idx; + else + gprintk(XENLOG_ERR, "Failed to map first MSI-X table page: %d\n", idx); + } + /* + * If the MSI-X table doesn't end on the page boundary, map the last page + * for passthrough accesses. + */ + if ( PAGE_OFFSET(table_paddr + msix->nr_entries * PCI_MSIX_ENTRY_SIZE) ) + { + uint64_t entry_paddr = table_paddr + msix->nr_entries * PCI_MSIX_ENTRY_SIZE; + int idx = msix_get_fixmap(msix, table_paddr, entry_paddr); + + if ( idx > 0 ) + msix->adj_access_idx[ADJ_IDX_LAST] = idx; + else + gprintk(XENLOG_ERR, "Failed to map last MSI-X table page: %d\n", idx); + } + } if ( !msix->used_entries ) { @@ -1079,6 +1109,17 @@ static void _pci_cleanup_msix(struct arch_msix *msix) msix->table.first = 0; msix->table.last = 0; + if ( msix->adj_access_idx[ADJ_IDX_FIRST] ) + { + msix_put_fixmap(msix, msix->adj_access_idx[ADJ_IDX_FIRST]); + msix->adj_access_idx[ADJ_IDX_FIRST] = 0; + } + if ( msix->adj_access_idx[ADJ_IDX_LAST] ) + { + msix_put_fixmap(msix, msix->adj_access_idx[ADJ_IDX_LAST]); + msix->adj_access_idx[ADJ_IDX_LAST] = 0; + } + if ( rangeset_remove_range(mmio_ro_ranges, msix->pba.first, msix->pba.last) ) WARN(); From patchwork Fri Apr 26 17:54:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= X-Patchwork-Id: 13645223 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7973AC25B5C for ; Fri, 26 Apr 2024 17:55:39 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.712996.1113945 (Exim 4.92) (envelope-from ) id 1s0PnA-0005If-H2; Fri, 26 Apr 2024 17:55:24 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 712996.1113945; Fri, 26 Apr 2024 17:55:24 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s0PnA-0005IY-Db; Fri, 26 Apr 2024 17:55:24 +0000 Received: by outflank-mailman (input) for mailman id 712996; Fri, 26 Apr 2024 17:55:23 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s0Pn9-0004Xj-Dy for xen-devel@lists.xenproject.org; Fri, 26 Apr 2024 17:55:23 +0000 Received: from wfhigh5-smtp.messagingengine.com (wfhigh5-smtp.messagingengine.com [64.147.123.156]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 260618b3-03f6-11ef-909a-e314d9c70b13; Fri, 26 Apr 2024 19:55:22 +0200 (CEST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfhigh.west.internal (Postfix) with ESMTP id D8156180016D; Fri, 26 Apr 2024 13:55:19 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Fri, 26 Apr 2024 13:55:20 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 26 Apr 2024 13:55:17 -0400 (EDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 260618b3-03f6-11ef-909a-e314d9c70b13 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= invisiblethingslab.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1714154119; x=1714240519; bh=hZ6VYL08E0 Yxr0n/W2twXlHVhmqK+fKxAH0QY/uH+Wo=; b=xs2zvhxGLs3oExmgpv9rsb/sDO MNOPuuCPOY2Ta2x5Z/mvPPwS02lH9YsCaD7UNpDRD/FyzvHGvhZfkBI5rxVxDTU0 akH6DG36JROcTa2NEGC5a5zmyUUU91k+orj2fwdQhhLFO4CG6Vd1PlfRLj9e7hx4 QAVrFZJhiwFhRK80w036RxErue025jJTkgsPDanOeaoC3jC4QTESIHsycq4VaygZ QQMVsB6KDQvdpJ2Wtpivn21fzm1wCxazpVeXNKjQgh/QD/8K6uxTEGCG2GSurMo3 Eo79piZ1IRaoII3YUk5+SRi7J7SSI69FVLM61npKAtL1ozPr/ZSKQ/7640tQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1714154119; x= 1714240519; bh=hZ6VYL08E0Yxr0n/W2twXlHVhmqK+fKxAH0QY/uH+Wo=; b=A pUpM5z6KUgj66KnRXZpz/IpOmOcn/BXo6LMrC1GxKHpRPBjgLhLi2bneJDBhdfD5 f3luR4uOt+gHPzUynEZG9z8aLsqh74RHjfkKPXO73c3oR/in7vncFRKgtYtBGHKb h28tsrtAW2QdPa+Hx53Wtx+jPSSHL3Eh/3gskU64pThRzwLoJ9pvxTelsuhUDIdW 4WU01dWajjdIQDMqXu8aczuPEZnNOvifHXjz6/dbVUY50dmi5ZxeO3sPpx7Y6Z7N Q5fJrTYEMgjQVgYm0TyIR6BokXM9DtriaUI3pV72GDgrCWUTWjzfR5CCvlC3b+Tn yq432rmWlYmbAVSi0B0iA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudelledguddulecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufffkffojghfgggtgfesthekredtredtjeenucfhrhhomhepofgr rhgvkhcuofgrrhgtiiihkhhofihskhhiqdfikphrvggtkhhiuceomhgrrhhmrghrvghkse hinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomheqnecuggftrfgrthhtvghrnhep gfeuudehgfdvfeehhedujeehfeduveeugefhkefhheelgeevudetueeiudfggfffnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhgrrhhmrghr vghksehinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomh X-ME-Proxy: Feedback-ID: i1568416f:Fastmail From: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= To: xen-devel@lists.xenproject.org Cc: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= , Stefano Stabellini , Doug Goldstein Subject: [PATCH v6 4/7] automation: prevent QEMU access to /dev/mem in PCI passthrough tests Date: Fri, 26 Apr 2024 19:54:01 +0200 Message-ID: <32e761446e5c20c81543e530e157ee2a0d67f131.1714154036.git-series.marmarek@invisiblethingslab.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: References: MIME-Version: 1.0 /dev/mem access doesn't work in dom0 in lockdown and in stubdomain. Simulate this environment with removing /dev/mem device node. Full test for lockdown and stubdomain will come later, when all requirements will be in place. Signed-off-by: Marek Marczykowski-Górecki Acked-by: Stefano Stabellini --- This can be applied only after QEMU change is committed. Otherwise the test will fail. --- automation/scripts/qubes-x86-64.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/automation/scripts/qubes-x86-64.sh b/automation/scripts/qubes-x86-64.sh index d81ed7b931cf..7eabc1bd6ad4 100755 --- a/automation/scripts/qubes-x86-64.sh +++ b/automation/scripts/qubes-x86-64.sh @@ -163,6 +163,8 @@ ifconfig eth0 up ifconfig xenbr0 up ifconfig xenbr0 192.168.0.1 +# ensure QEMU wont have access /dev/mem +rm -f /dev/mem # get domU console content into test log tail -F /var/log/xen/console/guest-domU.log 2>/dev/null | sed -e \"s/^/(domU) /\" & xl create /etc/xen/domU.cfg From patchwork Fri Apr 26 17:54:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= X-Patchwork-Id: 13645224 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0CBE5C04FFE for ; Fri, 26 Apr 2024 17:55:37 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.712998.1113961 (Exim 4.92) (envelope-from ) id 1s0PnD-0005dU-8W; Fri, 26 Apr 2024 17:55:27 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 712998.1113961; Fri, 26 Apr 2024 17:55:27 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s0PnD-0005ch-1F; Fri, 26 Apr 2024 17:55:27 +0000 Received: by outflank-mailman (input) for mailman id 712998; Fri, 26 Apr 2024 17:55:25 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s0PnB-0004Xj-Pd for xen-devel@lists.xenproject.org; Fri, 26 Apr 2024 17:55:25 +0000 Received: from wfout3-smtp.messagingengine.com (wfout3-smtp.messagingengine.com [64.147.123.146]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 27b0fa59-03f6-11ef-909a-e314d9c70b13; Fri, 26 Apr 2024 19:55:24 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfout.west.internal (Postfix) with ESMTP id A78591C00198; Fri, 26 Apr 2024 13:55:22 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 26 Apr 2024 13:55:23 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 26 Apr 2024 13:55:20 -0400 (EDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 27b0fa59-03f6-11ef-909a-e314d9c70b13 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= invisiblethingslab.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1714154121; x=1714240521; bh=i5H8JidWWb TxxhBJM5jd/OPNyDg2YLsGie249e88IWE=; b=FyaWZ2IWiUmzB/IXuhy7vGvwP2 7TRyIGtGw+IDauhMqLG1KgcDvGrcVRswH7CMrd9XNGz22Mh2elX9+zSllFLHn7Dz kogQdTvSuD1lAnkmTi3y4s+JnouP6pTlw0LeVgy5wEuOxkxbtosUaxau8TZQzjZX +pggTCA2lgCNDRJqOfdblqli7iDcOiGl1Y0R+c9OI24Te4os7pGJWjALQKEj4CfV FHr3KML1g8fflq/932p8rs3s45VMlMP2QDOYm2s5X1c8dKK1HPxg0VMVhruEa0fb PWkMQjb35vu6faKSx7Luz8Tl+q2yP/QbDx/xJEmWUOr03+s0IcE6rqapnD5g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1714154121; x= 1714240521; bh=i5H8JidWWbTxxhBJM5jd/OPNyDg2YLsGie249e88IWE=; b=k dhmtqB10MNCDIAqMnAQ2tHtNYX16Sz47/nS1K+O5ykAwTourPJoGK6Rf7j7Xw+TZ ySNcX5ROgzqcA1Zn4iL34byWeRDldjogAodCdzISL0dFA7BoTE8NdaqFx9ooeUHr TyoSZTkIuy4OX2E9vuUwmufqcg1n6uaQ/nDHwjBn3ECjPXHytXCYKQIm0PUkUeOX O0BF1QnI5uVFe96ohHUfXvprF1wS9AlwGFnW/PDaGcB41Pfdrx29tj45B9fgTKbB h6/GvgpqSHjXTAPqIf5+My4B3XsP8Cn5al7DIO3qTHguxtLQQLvfx0A3cDmKCWNJ avMsOWDm7NNxR+Rd/MUVA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudelledguddukecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufffkffojghfgggtgfesthekredtredtjeenucfhrhhomhepofgr rhgvkhcuofgrrhgtiiihkhhofihskhhiqdfikphrvggtkhhiuceomhgrrhhmrghrvghkse hinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomheqnecuggftrfgrthhtvghrnhep ffeitdegveffteelvdeghffhvefghfefkeelheeujeejgedvvdfgffejuedtvdelnecuff homhgrihhnpehkvghrnhgvlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpehmrghrmhgrrhgvkhesihhnvhhishhisghlvghthhhinh hgshhlrggsrdgtohhm X-ME-Proxy: Feedback-ID: i1568416f:Fastmail From: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= To: xen-devel@lists.xenproject.org Cc: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= , Stefano Stabellini , Doug Goldstein Subject: [PATCH v6 5/7] automation: switch to a wifi card on ADL system Date: Fri, 26 Apr 2024 19:54:02 +0200 Message-ID: <7f3f80f2f7e106a9362c779b925cdcdaaadf3b36.1714154036.git-series.marmarek@invisiblethingslab.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: References: MIME-Version: 1.0 Switch to a wifi card that has registers on a MSI-X page. This tests the "x86/hvm: Allow writes to registers on the same page as MSI-X table" feature. Switch it only for HVM test, because MSI-X adjacent write is not supported on PV. This requires also including drivers and firmware in system for tests. Remove firmware unrelated to the test, to not increase initrd size too much (all firmware takes over 100MB compressed). And finally adjusts test script to handle not only eth0 as a test device, but also wlan0 and connect it to the wifi network. Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Stefano Stabellini --- This needs two new gitlab variables: WIFI_HW2_SSID and WIFI_HW2_PSK. I'll provide them in private. This change requires rebuilding test containers. This can be applied only after QEMU change is committed. Otherwise the test will fail. --- automation/gitlab-ci/test.yaml | 4 ++++ automation/scripts/qubes-x86-64.sh | 7 +++++++ automation/tests-artifacts/alpine/3.18.dockerfile | 7 +++++++ automation/tests-artifacts/kernel/6.1.19.dockerfile | 2 ++ 4 files changed, 20 insertions(+) diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml index 8b7b2e4da92d..23a183fad967 100644 --- a/automation/gitlab-ci/test.yaml +++ b/automation/gitlab-ci/test.yaml @@ -193,6 +193,10 @@ adl-pci-pv-x86-64-gcc-debug: adl-pci-hvm-x86-64-gcc-debug: extends: .adl-x86-64 + variables: + PCIDEV: "00:14.3" + WIFI_SSID: "$WIFI_HW2_SSID" + WIFI_PSK: "$WIFI_HW2_PSK" script: - ./automation/scripts/qubes-x86-64.sh pci-hvm 2>&1 | tee ${LOGFILE} needs: diff --git a/automation/scripts/qubes-x86-64.sh b/automation/scripts/qubes-x86-64.sh index 7eabc1bd6ad4..60498ef1e89a 100755 --- a/automation/scripts/qubes-x86-64.sh +++ b/automation/scripts/qubes-x86-64.sh @@ -94,6 +94,13 @@ on_reboot = "destroy" domU_check=" set -x -e interface=eth0 +if [ -e /sys/class/net/wlan0 ]; then + interface=wlan0 + set +x + wpa_passphrase "$WIFI_SSID" "$WIFI_PSK" > /etc/wpa_supplicant.conf + set -x + wpa_supplicant -B -iwlan0 -c /etc/wpa_supplicant.conf +fi ip link set \"\$interface\" up timeout 30s udhcpc -i \"\$interface\" pingip=\$(ip -o -4 r show default|cut -f 3 -d ' ') diff --git a/automation/tests-artifacts/alpine/3.18.dockerfile b/automation/tests-artifacts/alpine/3.18.dockerfile index 9cde6c9ad4da..c323e266c7da 100644 --- a/automation/tests-artifacts/alpine/3.18.dockerfile +++ b/automation/tests-artifacts/alpine/3.18.dockerfile @@ -34,6 +34,13 @@ RUN \ apk add udev && \ apk add pciutils && \ apk add libelf && \ + apk add wpa_supplicant && \ + # Select firmware for hardware tests + apk add linux-firmware-other && \ + mkdir /lib/firmware-preserve && \ + mv /lib/firmware/iwlwifi-so-a0-gf-a0* /lib/firmware-preserve/ && \ + rm -rf /lib/firmware && \ + mv /lib/firmware-preserve /lib/firmware && \ \ # Xen cd / && \ diff --git a/automation/tests-artifacts/kernel/6.1.19.dockerfile b/automation/tests-artifacts/kernel/6.1.19.dockerfile index 3a4096780d20..84ed5dff23ae 100644 --- a/automation/tests-artifacts/kernel/6.1.19.dockerfile +++ b/automation/tests-artifacts/kernel/6.1.19.dockerfile @@ -32,6 +32,8 @@ RUN curl -fsSLO https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-"$LINUX_VERSI make xen.config && \ scripts/config --enable BRIDGE && \ scripts/config --enable IGC && \ + scripts/config --enable IWLWIFI && \ + scripts/config --enable IWLMVM && \ cp .config .config.orig && \ cat .config.orig | grep XEN | grep =m |sed 's/=m/=y/g' >> .config && \ make -j$(nproc) bzImage && \ From patchwork Fri Apr 26 17:54:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= X-Patchwork-Id: 13645222 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B4D68C25B10 for ; Fri, 26 Apr 2024 17:55:38 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.712999.1113975 (Exim 4.92) (envelope-from ) id 1s0PnF-00068d-GI; Fri, 26 Apr 2024 17:55:29 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 712999.1113975; Fri, 26 Apr 2024 17:55:29 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s0PnF-00068O-CE; Fri, 26 Apr 2024 17:55:29 +0000 Received: by outflank-mailman (input) for mailman id 712999; Fri, 26 Apr 2024 17:55:28 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s0PnE-0004Xj-9U for xen-devel@lists.xenproject.org; Fri, 26 Apr 2024 17:55:28 +0000 Received: from wfout3-smtp.messagingengine.com (wfout3-smtp.messagingengine.com [64.147.123.146]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 299045d3-03f6-11ef-909a-e314d9c70b13; Fri, 26 Apr 2024 19:55:27 +0200 (CEST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfout.west.internal (Postfix) with ESMTP id 8A1CF1C00190; Fri, 26 Apr 2024 13:55:25 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Fri, 26 Apr 2024 13:55:26 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 26 Apr 2024 13:55:23 -0400 (EDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 299045d3-03f6-11ef-909a-e314d9c70b13 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= invisiblethingslab.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to; s=fm3; t=1714154125; x=1714240525; bh=EAaNxhwX2Xjwv3rkR/3PC xXHxt3VIaaNGAHnw+G6qes=; b=u7zuGf4H1tJzhYdMhUw6j5WAbOg2Ni53HgYI8 IcVc2L4Y43Tyh40CbESmYe3iVCk5IrXwFT0xECjRu+3NRITqtQF+BHwIYxcCwom1 VxLI07gOkiooqYeyLMC3ZL/O4On9/hnRuJH+MYnD49fg0EwkbN3XHtcUJebsdVMZ FriQoMfhFpfrLbEQQnz092NKczmUPChRwbinLJcLB/YrlZhkvDe+I8ZyL91/VxKm rlSaA1GwcH2A7IWJabmX5MhtW0UdrMExdmU4oXgiJ5L4t/9qkWIXlQuefjtSSup/ 9PLktvptnmfBy72MmHTHy+HcgW4nCSJaEqosF5hx7sxTtdxqw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1714154125; x= 1714240525; bh=EAaNxhwX2Xjwv3rkR/3PCxXHxt3VIaaNGAHnw+G6qes=; b=k jtQkBKPw+dOGankWwaF8Qc8G4yGVzqZxw3GSdMNjtE/OtnuLMHogjfVhXpu78UgA DRLcqCAi4jvViUIFvZU/k2brSZauAayZT1w8h9Gf4iBw/BC57+To16g7GJGE196H PbJJvTYLhLIhpeBDggjVSk1OSfkDXD08RXutdCuXg366/AD7Lkp3TrzlNwfToO94 Q6GCSikOJXIXXkF7dcPmCVn1o28UsOkpNh/gnXx7vw2PoRXIk9vW6ZsMEsx8K4nj RuUn/WNLY2bpVGtyxjCc7QuabGEXzyPheJhrFGhziGnFv3OkaeTwFRMsK5dz2WXC P95CpZYLqXkLdrttEXhHA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudelledguddulecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufffkffojghfggfgsedtkeertdertdejnecuhfhrohhmpeforghr vghkucforghrtgiihihkohifshhkihdqifpkrhgvtghkihcuoehmrghrmhgrrhgvkhesih hnvhhishhisghlvghthhhinhhgshhlrggsrdgtohhmqeenucggtffrrghtthgvrhhnpeeg tedtieeghfekhfefgedvueeivddtffekledtiedvgfetleeuuefhteelveeugeenucffoh hmrghinhepgigvnhdrohhrghdpghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihii vgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhgrrhhmrghrvghksehinhhvihhsih gslhgvthhhihhnghhslhgrsgdrtghomh X-ME-Proxy: Feedback-ID: i1568416f:Fastmail From: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= To: xen-devel@lists.xenproject.org Cc: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= , Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Stefano Stabellini Subject: [PATCH v6 6/7] [DO NOT APPLY] switch to qemu fork Date: Fri, 26 Apr 2024 19:54:03 +0200 Message-ID: <3138d1e229408b64dedd5ac3aa069b897117e549.1714154036.git-series.marmarek@invisiblethingslab.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: References: MIME-Version: 1.0 This makes tests to use patched QEMU, to actually test the new behavior. --- Config.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Config.mk b/Config.mk index a962f095ca16..5e220a1284e4 100644 --- a/Config.mk +++ b/Config.mk @@ -220,8 +220,8 @@ endif OVMF_UPSTREAM_URL ?= https://xenbits.xen.org/git-http/ovmf.git OVMF_UPSTREAM_REVISION ?= ba91d0292e593df8528b66f99c1b0b14fadc8e16 -QEMU_UPSTREAM_URL ?= https://xenbits.xen.org/git-http/qemu-xen.git -QEMU_UPSTREAM_REVISION ?= master +QEMU_UPSTREAM_URL ?= https://github.com/marmarek/qemu +QEMU_UPSTREAM_REVISION ?= origin/msix MINIOS_UPSTREAM_URL ?= https://xenbits.xen.org/git-http/mini-os.git MINIOS_UPSTREAM_REVISION ?= b6a5b4d72b88e5c4faed01f5a44505de022860fc From patchwork Fri Apr 26 17:54:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= X-Patchwork-Id: 13645226 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 323C8C4345F for ; Fri, 26 Apr 2024 17:55:43 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.713000.1113985 (Exim 4.92) (envelope-from ) id 1s0PnK-0006hH-VW; Fri, 26 Apr 2024 17:55:34 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 713000.1113985; Fri, 26 Apr 2024 17:55:34 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s0PnK-0006h0-R0; Fri, 26 Apr 2024 17:55:34 +0000 Received: by outflank-mailman (input) for mailman id 713000; Fri, 26 Apr 2024 17:55:33 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s0PnJ-0005IL-1C for xen-devel@lists.xenproject.org; Fri, 26 Apr 2024 17:55:33 +0000 Received: from wfout3-smtp.messagingengine.com (wfout3-smtp.messagingengine.com [64.147.123.146]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 2b343baf-03f6-11ef-b4bb-af5377834399; Fri, 26 Apr 2024 19:55:31 +0200 (CEST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfout.west.internal (Postfix) with ESMTP id 3E7111C0019D; Fri, 26 Apr 2024 13:55:28 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Fri, 26 Apr 2024 13:55:28 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 26 Apr 2024 13:55:26 -0400 (EDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 2b343baf-03f6-11ef-b4bb-af5377834399 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= invisiblethingslab.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to; s=fm3; t=1714154127; x=1714240527; bh=kqv3XxPnwBq6tyJeE7l4A gxpNVKGtZJ7FW7pxlbH88o=; b=wKCwcpVAZvyu4pg/zrW3j5/5MjojIED1bThbZ 7YlEM0+JSrEe3qV7dFe81VQVNUwb8ZKbKQ4s10DfGz/uq7NUSFrC0Q2+2AWdzztw PBVjQXfAEYq0q268DARHej5DmxBJTl9/sP02hFog2YIp6C88iYAXErLX4WvLTKW5 ufGgsx4nwPujWqS6xPm4HV5tXMyNCwZyPRJE1/NvwQuBGk8v2ktzPGyWAcp2M4FG EydCiMI/7VoYLuiHjNdIiFs0bWGIF4C2duTjoijvEajrfV/5UurCcPXx1ugC2Fw+ GGHKAEvP6rCoNwlZXNktV/cTEa8xnjAwr+VKXIHXaX4AccAcw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1714154127; x= 1714240527; bh=kqv3XxPnwBq6tyJeE7l4AgxpNVKGtZJ7FW7pxlbH88o=; b=P ve7k2xM9Qj1ZrR6uUb2WyfVSY5KpAEnsKA8cAsLsrYgOmB9svO+dULd4/YyJSDXo QTQhaRR725DJaNs8wyAOxwT6d5ENpVeScTx41lt3ksNT6ROijyG1YF7/XfRqcgBq hUWBwzsEpfBwaskAS2xbxSefNVHyRgu5pVZ/wWdW29YkqHTlRR08aVX7pIEybWJf D+3EXXfGUP1OAlejfNE1Lf62zBe9xqnhihtbIUNhR9Ka81PceyInIVBNMCliEb4/ lbbZpfZu2W7MQUGDscsUgWE1f0DZewL6JBDTTzIpYPrf9Hyg5Pq9bIN4NP9gzKgN abL6H6fA8ss/Q8m1nNaLw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudelledguddulecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufffkffojghfggfgsedtkeertdertdejnecuhfhrohhmpeforghr vghkucforghrtgiihihkohifshhkihdqifpkrhgvtghkihcuoehmrghrmhgrrhgvkhesih hnvhhishhisghlvghthhhinhhgshhlrggsrdgtohhmqeenucggtffrrghtthgvrhhnpeeu teehgfeiheehfedtueeludfhgfeileeujefhgffgieeiveethfeffffffedtheenucffoh hmrghinhepghhithhlrggsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomhepmhgrrhhmrghrvghksehinhhvihhsihgslhgvthhhihhngh hslhgrsgdrtghomh X-ME-Proxy: Feedback-ID: i1568416f:Fastmail From: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= To: xen-devel@lists.xenproject.org Cc: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= , Doug Goldstein , Stefano Stabellini Subject: [PATCH v6 7/7] [DO NOT APPLY] switch to alternative artifact repo Date: Fri, 26 Apr 2024 19:54:04 +0200 Message-ID: <4634c2b7d08997b38521f0fa82e37a4fca0d6e2c.1714154036.git-series.marmarek@invisiblethingslab.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: References: MIME-Version: 1.0 For testing, switch to my containers registry that includes containers rebuilt with changes in this series. --- automation/gitlab-ci/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml index aac29ee13ab6..6957f06016b7 100644 --- a/automation/gitlab-ci/build.yaml +++ b/automation/gitlab-ci/build.yaml @@ -320,7 +320,7 @@ qemu-system-ppc64-8.1.0-ppc64-export: alpine-3.18-rootfs-export: extends: .test-jobs-artifact-common - image: registry.gitlab.com/xen-project/xen/tests-artifacts/alpine:3.18 + image: registry.gitlab.com/xen-project/people/marmarek/xen/tests-artifacts/alpine:3.18 script: - mkdir binaries && cp /initrd.tar.gz binaries/initrd.tar.gz artifacts: @@ -331,7 +331,7 @@ alpine-3.18-rootfs-export: kernel-6.1.19-export: extends: .test-jobs-artifact-common - image: registry.gitlab.com/xen-project/xen/tests-artifacts/kernel:6.1.19 + image: registry.gitlab.com/xen-project/people/marmarek/xen/tests-artifacts/kernel:6.1.19 script: - mkdir binaries && cp /bzImage binaries/bzImage artifacts: