From nobody Wed May 15 12:48:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1710343042873482.2425267104891; Wed, 13 Mar 2024 08:17:22 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.692557.1079815 (Exim 4.92) (envelope-from ) id 1rkQLk-0005hU-9Y; Wed, 13 Mar 2024 15:17:00 +0000 Received: by outflank-mailman (output) from mailman id 692557.1079815; Wed, 13 Mar 2024 15:17:00 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rkQLk-0005gx-5V; Wed, 13 Mar 2024 15:17:00 +0000 Received: by outflank-mailman (input) for mailman id 692557; Wed, 13 Mar 2024 15:16:59 +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 1rkQLj-0005e0-8l for xen-devel@lists.xenproject.org; Wed, 13 Mar 2024 15:16:59 +0000 Received: from fout3-smtp.messagingengine.com (fout3-smtp.messagingengine.com [103.168.172.146]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id bb051b42-e14c-11ee-a1ee-f123f15fe8a2; Wed, 13 Mar 2024 16:16:57 +0100 (CET) Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailfout.nyi.internal (Postfix) with ESMTP id 74D8513800A7; Wed, 13 Mar 2024 11:16:56 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Wed, 13 Mar 2024 11:16:56 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 13 Mar 2024 11:16:54 -0400 (EDT) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: bb051b42-e14c-11ee-a1ee-f123f15fe8a2 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=fm1; t=1710343016; x=1710429416; bh=G9GKN9B8dH TGd4PXNPHUeKZSdjSUiY5pvs4yUwY572k=; b=THMohA7j8GCuaUm4OWNqJ5qAIr SXO34opW77Frm+pxeTW1cCtAzJzFnTbuDH7gT9NfZFj+HnIjEKOeHzQMxHRdDJzY 6WKM/VKkvfnymn3rwX2XDnowvXKgXw1VSlYeGL0qzjBVvPJ/3kcjqX+RpgPrfWpO 53pCjlREs6rB5CxWcvKJFYGWl6ioeaH/JdXH6ufHtEmR/8idKYURJSLggVVgjegZ b6q7rrZg4FqLyhE9D/fCIi/LAekJCjBcGnAfFouqtNRc127+aEPSYjAQcIJyBY4m gWaS6fLPAHGRS1L/XCcVo0PAXTuewCdkgQr6HlOoCVQmPnxg/koDmUEe2VXg== 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=fm1; t=1710343016; x= 1710429416; bh=G9GKN9B8dHTGd4PXNPHUeKZSdjSUiY5pvs4yUwY572k=; b=Y jNN8vNAoZxGkodc9tFNvuGk/xsa6iFmhUdjCk+f89GqBVHtN38gBq/39lGMJnAU2 2A2NUZOKjYvTpqcNYzXvKauNjxl92Lr8ETfExGTQRLu1PAseutIJLDfteUqWxvVX 0IqRmljTxclqjhgaVGaU66Tk98rZ71O6KvVXMqqnvFVaqMDOhDd1BZc9o3SbWEn5 GbqauV7lfC4SlpkpGgjqpnG+iWTt/JmXj6Mt4jyh9k7GbiTQifIpT2Nafmgc9qu8 iPW0WimKaWdlbGe6gnyDwdBW7eiLu99X8StfXznuL8RRY/gs05iOQnd7bRkCu/wL t/q/2PY2NgjUJek/T3K/A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrjeehgdejgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkffojghfgggtgfesthekredtredtjeenucfhrhhomhepofgrrhgv khcuofgrrhgtiiihkhhofihskhhiqdfikphrvggtkhhiuceomhgrrhhmrghrvghksehinh hvihhsihgslhgvthhhihhnghhslhgrsgdrtghomheqnecuggftrfgrthhtvghrnhepgfeu udehgfdvfeehhedujeehfeduveeugefhkefhheelgeevudetueeiudfggfffnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhgrrhhmrghrvghk sehinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomh X-ME-Proxy: Feedback-ID: i1568416f:Fastmail From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= To: xen-devel@lists.xenproject.org Cc: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu , George Dunlap , Julien Grall , Stefano Stabellini Subject: [PATCH v5 1/7] x86/msi: passthrough all MSI-X vector ctrl writes to device model Date: Wed, 13 Mar 2024 16:16:06 +0100 Message-ID: <3e1150560a41bd567049627d684cd4e754530869.1710342968.git-series.marmarek@invisiblethingslab.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1710343044553100005 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=C3=B3recki Acked-by: Roger Pau Monn=C3=A9 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=3D=3D0 for write len=3D4 completion (Jan), but add descripti= ve #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; =20 - if ( (len !=3D 4 && len !=3D 8) || (address & (len - 1)) ) - return r; + if ( !IS_ALIGNED(address, len) ) + return X86EMUL_OKAY; =20 rcu_read_lock(&msixtbl_rcu_lock); =20 @@ -345,8 +345,7 @@ static int msixtbl_write(struct vcpu *v, unsigned long = address, =20 unlock: spin_unlock_irqrestore(&desc->lock, flags); - if ( len =3D=3D 4 ) - r =3D X86EMUL_OKAY; + r =3D X86EMUL_OKAY; =20 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 !=3D 4 && len !=3D 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; } =20 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(voi= d) arg) fi.submap |=3D (1U << XENFEAT_hvm_safe_pvclock) | (1U << XENFEAT_hvm_callback_vector) | (has_pirq(d) ? (1U << XENFEAT_hvm_pirqs) : 0); + fi.submap |=3D (1U << XENFEAT_dm_msix_all_writes); #endif if ( !paging_mode_translate(d) || is_domain_direct_mapped(d) ) fi.submap |=3D (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 =20 +/* + * If set, Xen will passthrough all MSI-X vector ctrl writes to device mod= el, + * 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 behi= nd + * Xen's backs. This information is relevant only for device models. + */ +#define XENFEAT_dm_msix_all_writes 20 + #define XENFEAT_NR_SUBMAPS 1 =20 #endif /* __XEN_PUBLIC_FEATURES_H__ */ --=20 git-series 0.9.1 From nobody Wed May 15 12:48:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1710343041473229.19398931319984; Wed, 13 Mar 2024 08:17:21 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.692558.1079829 (Exim 4.92) (envelope-from ) id 1rkQLm-000677-FB; Wed, 13 Mar 2024 15:17:02 +0000 Received: by outflank-mailman (output) from mailman id 692558.1079829; Wed, 13 Mar 2024 15:17:02 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rkQLm-00066z-C1; Wed, 13 Mar 2024 15:17:02 +0000 Received: by outflank-mailman (input) for mailman id 692558; Wed, 13 Mar 2024 15:17:01 +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 1rkQLl-00064u-ES for xen-devel@lists.xenproject.org; Wed, 13 Mar 2024 15:17:01 +0000 Received: from fout3-smtp.messagingengine.com (fout3-smtp.messagingengine.com [103.168.172.146]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id bbe0fe38-e14c-11ee-afdd-a90da7624cb6; Wed, 13 Mar 2024 16:16:59 +0100 (CET) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailfout.nyi.internal (Postfix) with ESMTP id 10DB9138009A; Wed, 13 Mar 2024 11:16:58 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Wed, 13 Mar 2024 11:16:58 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 13 Mar 2024 11:16:56 -0400 (EDT) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: bbe0fe38-e14c-11ee-afdd-a90da7624cb6 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=fm1; t=1710343018; x=1710429418; bh=pRnc2ONRL/ 09dyz6m9s7vlkjBE0IxmuPAPPs7bOI7J0=; b=MQkO2ZK8/TD2NSfb5m2EqpQM06 FsdmkCKynqUItmdWnUKk9aj2lCd+jfm5tyFVMw119Dxuo+ZB3znWigiZa8PkVGRg HxNH8LIA6yrUEiSlRg8sDHM+xLLqmdeTV61txYxkx6MUlN1/z/wcAHuNKApILYGO ZxehVKCO4EI8p9xqItOC0XBHdh5C/49GzMk2b32uZltRTI2nQckxKRbJujFKir9O uQS+vUjV63RdkqK9/XxN6vyvvtkovjdXsK2nZ/3ysnHADQRZuaQyzp98ZTiEcsR7 UqTfDyK98WcpQf8R/Gs4e7iCx8txoXxSv/DWhFKddTgmmzkL/rh8xmPz2ogA== 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=fm1; t=1710343018; x= 1710429418; bh=pRnc2ONRL/09dyz6m9s7vlkjBE0IxmuPAPPs7bOI7J0=; b=N JPOhODajrRVYHIX4XAvRhvndUabjXWg/OfWz+LMH99uTPd37VOajgv5NIS3jQgln G06p7jvwh+rl/eRW4s0A9tC5ucCJyJIh02DAvFnpLxRZLQ1h6gSW9AfLZYFaVL/y mFIiTvn3D3w2JYT8JJqrF5U1z3lPqQ7nRiWsnpuncYLil8moN4VwyLhQVU6mPGYn cwvRT4rePAxsEoOvaIZQNUPnp8gL7fKqr0/76TX37wVjQ/tzJRQY1cE69Ec1FnnF wBsVRr+Vnp+rKcNaT0KZXXMMuB+HEBvX03BHyPGThd2Evbu9pmohEODYidRGqdvh U+BMvKibR7aXesuhD7QGA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrjeehgdejgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkffojghfgggtgfesthekredtredtjeenucfhrhhomhepofgrrhgv khcuofgrrhgtiiihkhhofihskhhiqdfikphrvggtkhhiuceomhgrrhhmrghrvghksehinh hvihhsihgslhgvthhhihhnghhslhgrsgdrtghomheqnecuggftrfgrthhtvghrnhepgfeu udehgfdvfeehhedujeehfeduveeugefhkefhheelgeevudetueeiudfggfffnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhgrrhhmrghrvghk sehinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomh X-ME-Proxy: Feedback-ID: i1568416f:Fastmail From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= To: xen-devel@lists.xenproject.org Cc: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu Subject: [PATCH v5 2/7] x86/msi: Extend per-domain/device warning mechanism Date: Wed, 13 Mar 2024 16:16:07 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1710343042519100001 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=C3=B3recki --- Should I add also some helper for the boilerplate the handling requires now? I tried some macro that also sets the bit field, but I couldn't get it working. I guess I could make it working with a bitmask in a single uint8_t - would that be preferred? New in v5 --- xen/arch/x86/include/asm/msi.h | 8 +++++++- xen/arch/x86/msi.c | 9 +++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/include/asm/msi.h b/xen/arch/x86/include/asm/msi.h index 997ccb87be0c..19b1e6631fdf 100644 --- a/xen/arch/x86/include/asm/msi.h +++ b/xen/arch/x86/include/asm/msi.h @@ -217,7 +217,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; + } u; + } warned_kind; }; =20 void early_msi_init(void); diff --git a/xen/arch/x86/msi.c b/xen/arch/x86/msi.c index e721aaf5c001..6433df30bd60 100644 --- a/xen/arch/x86/msi.c +++ b/xen/arch/x86/msi.c @@ -364,9 +364,14 @@ static bool msi_set_mask_bit(struct irq_desc *desc, bo= ol host, bool guest) domid_t domid =3D pdev->domain->domain_id; =20 maskall =3D true; - if ( pdev->msix->warned !=3D domid ) + if ( pdev->msix->warned_domid !=3D domid ) { - pdev->msix->warned =3D domid; + pdev->msix->warned_domid =3D domid; + pdev->msix->warned_kind.all =3D 0; + } + if ( !pdev->msix->warned_kind.u.maskall ) + { + pdev->msix->warned_kind.u.maskall =3D true; printk(XENLOG_G_WARNING "cannot mask IRQ %d: masking MSI-X on Dom%d's %pp\n= ", desc->irq, domid, &pdev->sbdf); --=20 git-series 0.9.1 From nobody Wed May 15 12:48:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1710343045746845.2913501190204; Wed, 13 Mar 2024 08:17:25 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.692559.1079839 (Exim 4.92) (envelope-from ) id 1rkQLn-0006Mi-SU; Wed, 13 Mar 2024 15:17:03 +0000 Received: by outflank-mailman (output) from mailman id 692559.1079839; Wed, 13 Mar 2024 15:17:03 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rkQLn-0006MX-Ny; Wed, 13 Mar 2024 15:17:03 +0000 Received: by outflank-mailman (input) for mailman id 692559; Wed, 13 Mar 2024 15:17:02 +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 1rkQLm-00064u-3S for xen-devel@lists.xenproject.org; Wed, 13 Mar 2024 15:17:02 +0000 Received: from fout3-smtp.messagingengine.com (fout3-smtp.messagingengine.com [103.168.172.146]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id bcd7d46c-e14c-11ee-afdd-a90da7624cb6; Wed, 13 Mar 2024 16:17:00 +0100 (CET) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailfout.nyi.internal (Postfix) with ESMTP id ADF1013800C4; Wed, 13 Mar 2024 11:16:59 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Wed, 13 Mar 2024 11:16:59 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 13 Mar 2024 11:16:58 -0400 (EDT) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: bcd7d46c-e14c-11ee-afdd-a90da7624cb6 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=fm1; t=1710343019; x=1710429419; bh=4SwFKvimJV RlV6iERPovdY29XXOSNZstQLCDxtr3mlE=; b=G74MjXFlPZBP9p7g4lW9LhU1+H xjzTZ8N8s4SSAF9i8X+4EpGmD/skZDBgDyeIuWJzLpqG8k0qhUBjVWtOTW+BcHzY XOQxs4GJPaloWLu9QaaVyXgp78y3UpqVx0wfpy6nqoZep3f53vz/AwVqOrrSvXl7 bMvPMTNwQHJQ39/KHLlaEbhWXpj0uHfDu0M/mzPxZmuYgsp1gxxhHHFcqCGBU3aZ Lf//v7f1YHNwuXGDWaDBx9kOvXxWIlkHevAOwCOYtEnpQcmVkBuhU0v3eRY8NPd5 A2+53E6GvLARsOP26Cc9Oef8vVe2/4+nF4uif92RnxvwugKrardUxkgD5LHQ== 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=fm1; t=1710343019; x= 1710429419; bh=4SwFKvimJVRlV6iERPovdY29XXOSNZstQLCDxtr3mlE=; b=j I2YjelrTFhvLfurwxrmdoOHCP+0/g3rkhjFOlcCniQdXZI6uaLM9NKWo3WAu9rAj Vgm7Eu1LTaXAVv/wyH2WjIbKxJ2lVA2vefD418QIq3SsJWuKRcXY5MTuGTR19YFf AsqKNHUnlvbGR43Aaq8d8DYwaFsSPB7NrBvBXF7WpquZTDD5jGIkGzKK/83lFTWP C9Io87D7Xq5rnx16zzYkYeyI3vEfzc3pwRepwa1y3ivFBoB2AvixibvQ1HbOSxzq JiMqSpgBXCjAORB6V8N/nK8Q2z4L26mEcSflNfN7W3ijQwrtRFgzzgiWoUIZRv3q H7Jy4yEcQv7Qb/ub/RFpw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrjeehgdejgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkffojghfgggtgfesthekredtredtjeenucfhrhhomhepofgrrhgv khcuofgrrhgtiiihkhhofihskhhiqdfikphrvggtkhhiuceomhgrrhhmrghrvghksehinh hvihhsihgslhgvthhhihhnghhslhgrsgdrtghomheqnecuggftrfgrthhtvghrnhephfei hffghefgkeetiefgtdeivdfgvefhhfefvdduleetvdfggedtkeetfeefgeehnecuffhomh grihhnpehmshhigihtsghlpghlihhsthdrnhgvgihtnecuvehluhhsthgvrhfuihiivgep tdenucfrrghrrghmpehmrghilhhfrhhomhepmhgrrhhmrghrvghksehinhhvihhsihgslh gvthhhihhnghhslhgrsgdrtghomh X-ME-Proxy: Feedback-ID: i1568416f:Fastmail From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= To: xen-devel@lists.xenproject.org Cc: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu Subject: [PATCH v5 3/7] x86/hvm: Allow access to registers on the same page as MSI-X table Date: Wed, 13 Mar 2024 16:16:08 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1710343046597100007 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 =E2=80=98msixtbl_range=E2=80=99: arch/x86/hvm/vmsi.c:553:8: error: =E2=80=98desc=E2=80=99 may be used un= initialized [-Werror=3Dmaybe-uninitialized] 553 | if ( desc ) | ^ arch/x86/hvm/vmsi.c:537:28: note: =E2=80=98desc=E2=80=99 was declared h= ere 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=C3=B3recki --- 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 | 209 ++++++++++++++++++++++++++++++++-- xen/arch/x86/include/asm/msi.h | 7 +- xen/arch/x86/msi.c | 41 +++++++- 3 files changed, 247 insertions(+), 10 deletions(-) diff --git a/xen/arch/x86/hvm/vmsi.c b/xen/arch/x86/hvm/vmsi.c index 999917983789..5ac3d9d9b4cf 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; } =20 +/* + * 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 =3D v->domain; =20 list_for_each_entry( entry, &d->arch.hvm.msixtbl_list, list ) - if ( addr >=3D entry->gtable && - addr < entry->gtable + entry->table_len ) + if ( PFN_DOWN(addr) >=3D PFN_DOWN(entry->gtable) && + PFN_DOWN(addr) <=3D PFN_DOWN(entry->gtable + entry->table_len= - 1) ) return entry; =20 return NULL; @@ -213,6 +217,148 @@ static struct msi_desc *msixtbl_addr_to_desc( return NULL; } =20 +/* + * 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) =3D=3D PFN_DOWN(entry->gtable) && addr < entry->gt= able ) + adj_type =3D ADJ_IDX_FIRST; + else if ( PFN_DOWN(addr) =3D=3D PFN_DOWN(entry->gtable + entry->table_= len - 1) && + addr >=3D entry->gtable + entry->table_len ) + adj_type =3D ADJ_IDX_LAST; + else + return ADJACENT_DONT_HANDLE; + + msix =3D entry->pdev->msix; + ASSERT(msix); + + if ( !msix->adj_access_idx[adj_type] ) + { + if ( msix->warned_domid !=3D entry->pdev->domain->domain_id ) + { + msix->warned_domid =3D entry->pdev->domain->domain_id; + msix->warned_kind.all =3D 0; + } + if ( !msix->warned_kind.u.adjacent_not_initialized ) + { + msix->warned_kind.u.adjacent_not_initialized =3D true; + gprintk(XENLOG_WARNING, + "Page for adjacent(%d) MSI-X table access not initiali= zed 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 =3D=3D ADJ_IDX_LAST && + msix->table.last =3D=3D msix->pba.first) || + (adj_type =3D=3D ADJ_IDX_FIRST && + msix->table.first =3D=3D msix->pba.last)) ) + { + if ( msix->warned_domid !=3D entry->pdev->domain->domain_id ) + { + msix->warned_domid =3D entry->pdev->domain->domain_id; + msix->warned_kind.all =3D 0; + } + if ( !msix->warned_kind.u.adjacent_pba ) + { + msix->warned_kind.u.adjacent_pba =3D true; + 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; + + *pval =3D ~0UL; + + ASSERT(fixmap_idx !=3D ADJACENT_DISCARD_WRITE); + + hwaddr =3D fix_to_virt(fixmap_idx) + PAGE_OFFSET(address); + + switch ( len ) + { + case 1: + *pval =3D readb(hwaddr); + break; + + case 2: + *pval =3D readw(hwaddr); + break; + + case 4: + *pval =3D readl(hwaddr); + break; + + case 8: + *pval =3D readq(hwaddr); + break; + + default: + ASSERT_UNREACHABLE(); + } + 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 =3D=3D ADJACENT_DISCARD_WRITE ) + return X86EMUL_OKAY; + + hwaddr =3D 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 +366,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 =3D X86EMUL_UNHANDLEABLE; =20 - if ( (len !=3D 4 && len !=3D 8) || (address & (len - 1)) ) + if ( !IS_ALIGNED(address, len) ) return r; =20 rcu_read_lock(&msixtbl_rcu_lock); @@ -230,6 +377,21 @@ static int cf_check msixtbl_read( entry =3D msixtbl_find_entry(current, address); if ( !entry ) goto out; + + adjacent_fixmap =3D adjacent_handle(entry, address, false); + if ( adjacent_fixmap !=3D ADJACENT_DONT_HANDLE ) + { + r =3D adjacent_read(adjacent_fixmap, address, len, pval); + goto out; + } + + if ( address < entry->gtable || + address >=3D entry->gtable + entry->table_len ) + goto out; + + if ( len !=3D 4 && len !=3D 8 ) + goto out; + offset =3D address & (PCI_MSIX_ENTRY_SIZE - 1); =20 if ( offset !=3D PCI_MSIX_ENTRY_VECTOR_CTRL_OFFSET ) @@ -282,6 +444,7 @@ static int msixtbl_write(struct vcpu *v, unsigned long = address, int r =3D X86EMUL_UNHANDLEABLE; unsigned long flags; struct irq_desc *desc; + unsigned int adjacent_fixmap; =20 if ( !IS_ALIGNED(address, len) ) return X86EMUL_OKAY; @@ -291,6 +454,21 @@ static int msixtbl_write(struct vcpu *v, unsigned long= address, entry =3D msixtbl_find_entry(v, address); if ( !entry ) goto out; + + adjacent_fixmap =3D adjacent_handle(entry, address, true); + if ( adjacent_fixmap !=3D ADJACENT_DONT_HANDLE ) + { + r =3D adjacent_write(adjacent_fixmap, address, len, val); + goto out; + } + + if ( address < entry->gtable || + address >=3D entry->gtable + entry->table_len ) + goto out; + + if ( len !=3D 4 && len !=3D 8 ) + goto out; + nr_entry =3D array_index_nospec(((address - entry->gtable) / PCI_MSIX_ENTRY_SIZE), MAX_MSIX_TABLE_ENTRIES); @@ -356,8 +534,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 !=3D 4 && len !=3D 8) || !IS_ALIGNED(address, len) ) + /* Ignore unaligned writes. */ + if ( !IS_ALIGNED(address, len) ) return X86EMUL_OKAY; =20 /* @@ -374,14 +552,22 @@ static bool cf_check msixtbl_range( { struct vcpu *curr =3D current; unsigned long addr =3D r->addr; - const struct msi_desc *desc; + const struct msixtbl_entry *entry; + const struct msi_desc *desc =3D NULL; + unsigned int adjacent_fixmap; =20 ASSERT(r->type =3D=3D IOREQ_TYPE_COPY); =20 rcu_read_lock(&msixtbl_rcu_lock); - desc =3D msixtbl_addr_to_desc(msixtbl_find_entry(curr, addr), addr); + entry =3D msixtbl_find_entry(curr, addr); + adjacent_fixmap =3D adjacent_handle(entry, addr, false); + if ( adjacent_fixmap =3D=3D ADJACENT_DONT_HANDLE ) + desc =3D msixtbl_addr_to_desc(entry, addr); rcu_read_unlock(&msixtbl_rcu_lock); =20 + if ( adjacent_fixmap !=3D ADJACENT_DONT_HANDLE ) + return 1; + if ( desc ) return 1; =20 @@ -622,12 +808,15 @@ void msix_write_completion(struct vcpu *v) v->arch.hvm.hvm_io.msix_snoop_gpa ) { unsigned int token =3D hvmemul_cache_disable(v); - const struct msi_desc *desc; + const struct msi_desc *desc =3D NULL; + const struct msixtbl_entry *entry; uint32_t data; =20 rcu_read_lock(&msixtbl_rcu_lock); - desc =3D msixtbl_addr_to_desc(msixtbl_find_entry(v, snoop_addr), - snoop_addr); + entry =3D msixtbl_find_entry(v, snoop_addr); + if ( entry && snoop_addr >=3D entry->gtable && + snoop_addr < entry->gtable + entry->table_len ) + desc =3D msixtbl_addr_to_desc(entry, snoop_addr); rcu_read_unlock(&msixtbl_rcu_lock); =20 if ( desc && diff --git a/xen/arch/x86/include/asm/msi.h b/xen/arch/x86/include/asm/msi.h index 19b1e6631fdf..400944682b17 100644 --- a/xen/arch/x86/include/asm/msi.h +++ b/xen/arch/x86/include/asm/msi.h @@ -208,6 +208,10 @@ struct msg_address { PCI_MSIX_ENTRY_SIZE + \ (~PCI_MSIX_BIRMASK & (PAGE_SIZE - 1= ))) =20 +/* Indexes in adj_access_idx[] below */ +#define ADJ_IDX_FIRST 0 +#define ADJ_IDX_LAST 1 + struct arch_msix { unsigned int nr_entries, used_entries; struct { @@ -215,6 +219,7 @@ struct arch_msix { } table, pba; int table_refcnt[MAX_MSIX_TABLE_PAGES]; int table_idx[MAX_MSIX_TABLE_PAGES]; + unsigned int adj_access_idx[2]; spinlock_t table_lock; bool host_maskall, guest_maskall; domid_t warned_domid; @@ -222,6 +227,8 @@ struct arch_msix { uint8_t all; struct { bool maskall : 1; + bool adjacent_not_initialized : 1; + bool adjacent_pba : 1; } u; } warned_kind; }; diff --git a/xen/arch/x86/msi.c b/xen/arch/x86/msi.c index 6433df30bd60..b4aa0e53be2c 100644 --- a/xen/arch/x86/msi.c +++ b/xen/arch/x86/msi.c @@ -921,6 +921,36 @@ static int msix_capability_init(struct pci_dev *dev, list_add_tail(&entry->list, &dev->msi_list); *desc =3D 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 =3D msix_get_fixmap(msix, table_paddr, table_paddr); + + if ( idx > 0 ) + msix->adj_access_idx[ADJ_IDX_FIRST] =3D 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 la= st page + * for passthrough accesses. + */ + if ( PAGE_OFFSET(table_paddr + msix->nr_entries * PCI_MSIX_ENTRY_S= IZE) ) + { + uint64_t entry_paddr =3D table_paddr + msix->nr_entries * PCI_= MSIX_ENTRY_SIZE; + int idx =3D msix_get_fixmap(msix, table_paddr, entry_paddr); + + if ( idx > 0 ) + msix->adj_access_idx[ADJ_IDX_LAST] =3D idx; + else + gprintk(XENLOG_ERR, "Failed to map last MSI-X table page: = %d\n", idx); + } + } =20 if ( !msix->used_entries ) { @@ -1087,6 +1117,17 @@ static void _pci_cleanup_msix(struct arch_msix *msix) msix->table.first =3D 0; msix->table.last =3D 0; =20 + 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] =3D 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] =3D 0; + } + if ( rangeset_remove_range(mmio_ro_ranges, msix->pba.first, msix->pba.last) ) WARN(); --=20 git-series 0.9.1 From nobody Wed May 15 12:48:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1710343049515966.2928156178664; Wed, 13 Mar 2024 08:17:29 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.692560.1079848 (Exim 4.92) (envelope-from ) id 1rkQLq-0006eK-2b; Wed, 13 Mar 2024 15:17:06 +0000 Received: by outflank-mailman (output) from mailman id 692560.1079848; Wed, 13 Mar 2024 15:17:06 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rkQLp-0006e2-VZ; Wed, 13 Mar 2024 15:17:05 +0000 Received: by outflank-mailman (input) for mailman id 692560; Wed, 13 Mar 2024 15:17:03 +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 1rkQLn-0005e0-QN for xen-devel@lists.xenproject.org; Wed, 13 Mar 2024 15:17:03 +0000 Received: from fhigh6-smtp.messagingengine.com (fhigh6-smtp.messagingengine.com [103.168.172.157]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id bdc0fcfa-e14c-11ee-a1ee-f123f15fe8a2; Wed, 13 Mar 2024 16:17:02 +0100 (CET) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 103E411400FA; Wed, 13 Mar 2024 11:17:01 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 13 Mar 2024 11:17:01 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 13 Mar 2024 11:16:59 -0400 (EDT) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: bdc0fcfa-e14c-11ee-a1ee-f123f15fe8a2 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=fm1; t=1710343021; x=1710429421; bh=hZ6VYL08E0 Yxr0n/W2twXlHVhmqK+fKxAH0QY/uH+Wo=; b=DtCO9B0Weh6roG52LY1gbplx+E pOHVHU3cIwZxGbAk67lMYRoZqPOKa5HpnoX0+DOkBBOXXqAuj1JEYNtJ8nAwkrGf MtQbKFbsA5vG4n4uczfKmbqco5URvdWXnnlrHB7dGUEbN1+gc34kmkD+6eVztq9l jqf5F27Q6V/8gwk1ciC6r+idj4LKELarJnGrBC7hKS9cOngLl1XtHVbjKdk25IoD HIgdk5tdVq6FHiN0eLYQTGH2qSwXjKq7t1usUiKK1X9Z80L0mEGW6T8svBfFkfcB GB5+Z84X/xZ08dcq+sDj+o7bSRz5PEdEeBX/70n+AgGzJz9mAK8PRQpkwxNQ== 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=fm1; t=1710343021; x= 1710429421; bh=hZ6VYL08E0Yxr0n/W2twXlHVhmqK+fKxAH0QY/uH+Wo=; b=X ip+AMW2NM5y535jgAklSMHFg8JKlfSPzv51c0gaL6qnf/pxO/4p7D9LcvBP/pF8m V6DbccH1hLj01GXmdELnpv5CjZ5vGH2oyRLqrRM5phBW/S6QJLQo1XrUTURxQTfA m/dNjfvOjdyViLq/6Z75zkvKgtgfBnq198JfWBLhAeKYEBOD1JIA9KRzUI7+S6Mn J+c353aAXSAolhZH0Q62h/oK3bX0SuI3s7GtT1Zh4IzSVXtVKMHHlsGKP9kAKRPl g9r9+FrWca1amYbE4afeQlgjlVYPA2VslWHQREK/ZFmgpZoIaQnkmELXJGaGRhmF BFxQ7ZTE6SrTclzRFwswg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrjeehgdejgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkffojghfgggtgfesthekredtredtjeenucfhrhhomhepofgrrhgv khcuofgrrhgtiiihkhhofihskhhiqdfikphrvggtkhhiuceomhgrrhhmrghrvghksehinh hvihhsihgslhgvthhhihhnghhslhgrsgdrtghomheqnecuggftrfgrthhtvghrnhepgfeu udehgfdvfeehhedujeehfeduveeugefhkefhheelgeevudetueeiudfggfffnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhgrrhhmrghrvghk sehinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomh X-ME-Proxy: Feedback-ID: i1568416f:Fastmail From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= To: xen-devel@lists.xenproject.org Cc: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= , Stefano Stabellini , Doug Goldstein Subject: [PATCH v5 4/7] automation: prevent QEMU access to /dev/mem in PCI passthrough tests Date: Wed, 13 Mar 2024 16:16:09 +0100 Message-ID: <2ba54ff3f9021d5790a3bfccb27468c18fadc6bf.1710342968.git-series.marmarek@invisiblethingslab.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1710343050811100001 /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=C3=B3recki 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 =20 +# 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/^/(do= mU) /\" & xl create /etc/xen/domU.cfg --=20 git-series 0.9.1 From nobody Wed May 15 12:48:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1710343050324469.69251974127394; Wed, 13 Mar 2024 08:17:30 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.692561.1079856 (Exim 4.92) (envelope-from ) id 1rkQLq-0006hd-GC; Wed, 13 Mar 2024 15:17:06 +0000 Received: by outflank-mailman (output) from mailman id 692561.1079856; Wed, 13 Mar 2024 15:17:06 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rkQLq-0006ga-7f; Wed, 13 Mar 2024 15:17:06 +0000 Received: by outflank-mailman (input) for mailman id 692561; Wed, 13 Mar 2024 15:17:04 +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 1rkQLo-0005e0-QW for xen-devel@lists.xenproject.org; Wed, 13 Mar 2024 15:17:04 +0000 Received: from fhigh6-smtp.messagingengine.com (fhigh6-smtp.messagingengine.com [103.168.172.157]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id be8de75e-e14c-11ee-a1ee-f123f15fe8a2; Wed, 13 Mar 2024 16:17:03 +0100 (CET) Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 6CC4E11400FF; Wed, 13 Mar 2024 11:17:02 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Wed, 13 Mar 2024 11:17:02 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 13 Mar 2024 11:17:01 -0400 (EDT) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: be8de75e-e14c-11ee-a1ee-f123f15fe8a2 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=fm1; t=1710343022; x=1710429422; bh=i5H8JidWWb TxxhBJM5jd/OPNyDg2YLsGie249e88IWE=; b=UKvjsY1vxQCEsNgn1NvSASZJoX pC8aLwCl5sLjzxT4OQ9Dg17DN2aJXfyEym/U2Kxndo4u7HtrzwzDPjedgB+qrNu5 3E1JODtwBLtCb8h99WBxL32dvSYLfQjFLGpFSzzkAzp9EgunpsMaYbTVP7VUh4VE vLIur6Gbo9E8yz/lnlSzkSKNaj24DdYopTlgD8OHPHAZEbM3LPr1e1N/vKfu6V88 swr0+L6LQPYMVwcL5Kq+9nmjoe9c7wojGI0PTfdLCUGGUPyZthsHnqx/rRO/kgtv Ll64MMjn4YG3ZkVHDxc4eLSm1W2YzXZcbAJLDHhOQum1xwtemkI8M+XrFU0A== 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=fm1; t=1710343022; x= 1710429422; bh=i5H8JidWWbTxxhBJM5jd/OPNyDg2YLsGie249e88IWE=; b=B Ryd5Gz71E/xqjdh+hLpHF1s6usSvZ7wmu8PgBUnfhM4MPSbUg7316DtNRP8cVTSl Oxut5vsoQBIohFQr0tDayu95L19ilUXuT2ZkL+eY869urylBE8h5apVFVOwsxQ9E Ek5F3My6NFkGVrobko4Soem7jEkmk0Tp7sAcK1wtMzVD+Mh1ghUOXH/ev3gd+RG9 Lb3jqQptdiKGH4f568DgHnl3OcsiDQ7kDia4KzV8Kcfk0aVogblyZdRQXJXQVmrA MWLOt0/Fo+MIoCV1E/VJykslsIjFm4+nTkXX7KK6rkxnlYeNJJUgjk3BVeooZ50t QzcOz3w4NhgdKyECS99og== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrjeehgdejgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkffojghfgggtgfesthekredtredtjeenucfhrhhomhepofgrrhgv khcuofgrrhgtiiihkhhofihskhhiqdfikphrvggtkhhiuceomhgrrhhmrghrvghksehinh hvihhsihgslhgvthhhihhnghhslhgrsgdrtghomheqnecuggftrfgrthhtvghrnhepffei tdegveffteelvdeghffhvefghfefkeelheeujeejgedvvdfgffejuedtvdelnecuffhomh grihhnpehkvghrnhgvlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgr mhepmhgrihhlfhhrohhmpehmrghrmhgrrhgvkhesihhnvhhishhisghlvghthhhinhhgsh hlrggsrdgtohhm X-ME-Proxy: Feedback-ID: i1568416f:Fastmail From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= To: xen-devel@lists.xenproject.org Cc: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= , Stefano Stabellini , Doug Goldstein Subject: [PATCH v5 5/7] automation: switch to a wifi card on ADL system Date: Wed, 13 Mar 2024 16:16:10 +0100 Message-ID: <30d445332e4cd70ce1d53a71d878107e43f128c5.1710342968.git-series.marmarek@invisiblethingslab.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1710343052613100003 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=C3=B3recki 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: =20 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 =3D "destroy" domU_check=3D" set -x -e interface=3Deth0 +if [ -e /sys/class/net/wlan0 ]; then + interface=3Dwlan0 + 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=3D\$(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/automati= on/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/v= 6.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 =3Dm |sed 's/=3Dm/=3Dy/g' >> .confi= g && \ make -j$(nproc) bzImage && \ --=20 git-series 0.9.1 From nobody Wed May 15 12:48:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1710343058476464.90300971410875; Wed, 13 Mar 2024 08:17:38 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.692562.1079869 (Exim 4.92) (envelope-from ) id 1rkQLs-0007CF-QE; Wed, 13 Mar 2024 15:17:08 +0000 Received: by outflank-mailman (output) from mailman id 692562.1079869; Wed, 13 Mar 2024 15:17:08 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rkQLs-0007C2-Lv; Wed, 13 Mar 2024 15:17:08 +0000 Received: by outflank-mailman (input) for mailman id 692562; Wed, 13 Mar 2024 15:17:07 +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 1rkQLr-0005e0-1h for xen-devel@lists.xenproject.org; Wed, 13 Mar 2024 15:17:07 +0000 Received: from fhigh6-smtp.messagingengine.com (fhigh6-smtp.messagingengine.com [103.168.172.157]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id bff73287-e14c-11ee-a1ee-f123f15fe8a2; Wed, 13 Mar 2024 16:17:05 +0100 (CET) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfhigh.nyi.internal (Postfix) with ESMTP id C60E311400DD; Wed, 13 Mar 2024 11:17:04 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 13 Mar 2024 11:17:04 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 13 Mar 2024 11:17:02 -0400 (EDT) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: bff73287-e14c-11ee-a1ee-f123f15fe8a2 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=fm1; t=1710343024; x=1710429424; bh=EAaNxhwX2Xjwv3rkR/3PC xXHxt3VIaaNGAHnw+G6qes=; b=acADtP9QRyyn8PJwbdwhm88aXtQqPHU12Fbbj N8frPzd8tdm/OhDuIgUQtsKehufgu9wixeyCya6oEkPL3txyGY2dTMU3uot46Xbk 0Hg/MJEjfZB6L49seBY9knk9daX33ysIdzcI/0LaG/c9jeShzZrsj6j4jsTccEpX LwEt39OltxmF3Sve1UcSsdpD1SA2LdtfE2iLlmk3NP8DYolmugiG37ssjGL4VSDA Z/J/SgEQOZKU93htoIs8yXLHDLD4zD39lRskI2hHsHCXf6ZsUMszSeE9JlBmCIEm Ox05/eyqS+sbhkAZ1MMmddWzWjq+0fzQ9mvBCKkOEdA27nZaQ== 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=fm1; t=1710343024; x= 1710429424; bh=EAaNxhwX2Xjwv3rkR/3PCxXHxt3VIaaNGAHnw+G6qes=; b=U S59gh9E6ezjwJybiFwfZyFajpPZ+WRq5lP68XP4idnLSc5mCKqg0A5VVAuR2BK79 SuCqxi6ZDC4MkaYYbP6eUFbZw32J/BTHJszVgaf+72cck0NZGMps3qi1peD7Txkc Ka6CU+55Kkv4wrTntfFTcJykXqXNfg9A5qRwMrazk0vG6pPPLiDQsTHIKmkdL4Cz cXt0TAO4tFLGaP2K/Lm06TDcs9Gy7NbK0pzkveauX0sqkdU9OJMMSRiP2YRf88lp nkHmVBlIQIrk58s9aeskEA3EvtqYdPNH74Ku9DUg+FVYcI0UvpLrJ0TwLbWss+0Y JxIhyMC/FopTPrAL6noIg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrjeehgdejgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkffojghfggfgsedtkeertdertdejnecuhfhrohhmpeforghrvghk ucforghrtgiihihkohifshhkihdqifpkrhgvtghkihcuoehmrghrmhgrrhgvkhesihhnvh hishhisghlvghthhhinhhgshhlrggsrdgtohhmqeenucggtffrrghtthgvrhhnpeegtedt ieeghfekhfefgedvueeivddtffekledtiedvgfetleeuuefhteelveeugeenucffohhmrg hinhepgigvnhdrohhrghdpghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivgep tdenucfrrghrrghmpehmrghilhhfrhhomhepmhgrrhhmrghrvghksehinhhvihhsihgslh gvthhhihhnghhslhgrsgdrtghomh X-ME-Proxy: Feedback-ID: i1568416f:Fastmail From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= To: xen-devel@lists.xenproject.org Cc: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= , Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [PATCH v5 6/7] [DO NOT APPLY] switch to qemu fork Date: Wed, 13 Mar 2024 16:16:11 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1710343060783100001 Content-Type: text/plain; charset="utf-8" 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 ?=3D https://xenbits.xen.org/git-http/ovmf.git OVMF_UPSTREAM_REVISION ?=3D ba91d0292e593df8528b66f99c1b0b14fadc8e16 =20 -QEMU_UPSTREAM_URL ?=3D https://xenbits.xen.org/git-http/qemu-xen.git -QEMU_UPSTREAM_REVISION ?=3D master +QEMU_UPSTREAM_URL ?=3D https://github.com/marmarek/qemu +QEMU_UPSTREAM_REVISION ?=3D origin/msix =20 MINIOS_UPSTREAM_URL ?=3D https://xenbits.xen.org/git-http/mini-os.git MINIOS_UPSTREAM_REVISION ?=3D b6a5b4d72b88e5c4faed01f5a44505de022860fc --=20 git-series 0.9.1 From nobody Wed May 15 12:48:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1710343053399127.98825227343502; Wed, 13 Mar 2024 08:17:33 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.692563.1079879 (Exim 4.92) (envelope-from ) id 1rkQLv-0007WP-4r; Wed, 13 Mar 2024 15:17:11 +0000 Received: by outflank-mailman (output) from mailman id 692563.1079879; Wed, 13 Mar 2024 15:17:11 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rkQLu-0007W9-Vz; Wed, 13 Mar 2024 15:17:10 +0000 Received: by outflank-mailman (input) for mailman id 692563; Wed, 13 Mar 2024 15:17:08 +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 1rkQLs-0005e0-Ro for xen-devel@lists.xenproject.org; Wed, 13 Mar 2024 15:17:08 +0000 Received: from fout3-smtp.messagingengine.com (fout3-smtp.messagingengine.com [103.168.172.146]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id c10a0061-e14c-11ee-a1ee-f123f15fe8a2; Wed, 13 Mar 2024 16:17:07 +0100 (CET) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfout.nyi.internal (Postfix) with ESMTP id 961B41380063; Wed, 13 Mar 2024 11:17:06 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 13 Mar 2024 11:17:06 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 13 Mar 2024 11:17:04 -0400 (EDT) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: c10a0061-e14c-11ee-a1ee-f123f15fe8a2 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=fm1; t=1710343026; x=1710429426; bh=rqAlWJ788XGq8tNuFWR/8 CwesBByjaWaSAP4BkMnyEs=; b=KmXybWfqPZ5FXd7uhqw9z5UweMLZ+OASdIDdd 2CAloPqIaW5uyVPavfKwG9NJqYo6q3FIW4GQL1yvFmdkeB6nhGHp06QLV60UtBiG fkcdVQmAysQO/suw1eNMaWsDATj+FMWwa2OZvQS3cWSYwRGCSWNkr+a+J1crgkYM NSTIVOdykSMhM8nStI7iNfvKaEAiunUE/1kfRiuEykZnO3B18zlvhe7o+Z5NOBbj p5HuzYR0Fg/nMNXaf2Ex1Vdz8/Pm6eEnU9XUybk+++LJDRwyVSey6MWr6aVkQ19Z 9nxyjMCan//Pd//C36ilSrJmGlnPNbdO+FRNxFMwNhhk8q5TQ== 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=fm1; t=1710343026; x= 1710429426; bh=rqAlWJ788XGq8tNuFWR/8CwesBByjaWaSAP4BkMnyEs=; b=I EpOTZre72V/R9KM4M3B5tt+XtrdmVc5AMZGW5iUIfjy/o/loE4wInAV6+Sjf/9Jg W8Uv0oY9A1DyNneY7JP8HYQlcCHQ0xqMcutK2L5JF8IHsgB3i+rGC9Wb3CD+FcU/ RSZNV5LgBs1j0Pk+Q08O6PGF8aIaIfnXMb6+WVw1HcY4nekZln414ijY1/e7we+H LNL9cda5nreRVoUTlv5Ia37Ptd1zwzOuaAsxm1qo72s2UGL7Urjms1NHAZ2F8s+f QUD4Xjj5/s82QiECZjMv/LhHpUo35Y807YIBiTYANc1yQAQh1q9TigGEla7pjEGg wkox0OjTJOVsLSho0jmFw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrjeehgdejgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkffojghfggfgsedtkeertdertdejnecuhfhrohhmpeforghrvghk ucforghrtgiihihkohifshhkihdqifpkrhgvtghkihcuoehmrghrmhgrrhgvkhesihhnvh hishhisghlvghthhhinhhgshhlrggsrdgtohhmqeenucggtffrrghtthgvrhhnpeeuteeh gfeiheehfedtueeludfhgfeileeujefhgffgieeiveethfeffffffedtheenucffohhmrg hinhepghhithhlrggsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghm pehmrghilhhfrhhomhepmhgrrhhmrghrvghksehinhhvihhsihgslhgvthhhihhnghhslh grsgdrtghomh X-ME-Proxy: Feedback-ID: i1568416f:Fastmail From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= To: xen-devel@lists.xenproject.org Cc: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= , Doug Goldstein , Stefano Stabellini Subject: [PATCH v5 7/7] [DO NOT APPLY] switch to alternative artifact repo Date: Wed, 13 Mar 2024 16:16:12 +0100 Message-ID: <6e8f9bd56b241e101b014f748888010adf280da5.1710342968.git-series.marmarek@invisiblethingslab.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1710343054604100005 Content-Type: text/plain; charset="utf-8" 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.y= aml index 6d2cb18b8883..7dafbf144494 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: =20 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-artifac= ts/alpine:3.18 script: - mkdir binaries && cp /initrd.tar.gz binaries/initrd.tar.gz artifacts: @@ -331,7 +331,7 @@ alpine-3.18-rootfs-export: =20 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-artifac= ts/kernel:6.1.19 script: - mkdir binaries && cp /bzImage binaries/bzImage artifacts: --=20 git-series 0.9.1