From nobody Fri Oct 31 03:42:56 2025 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; dkim=pass; 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; dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1750847606; cv=none; d=zohomail.com; s=zohoarc; b=PuLUDCJVdEo8Bh3baBdGFpQcLFRV5qp4hddRYvT/fOFxINUijpB90Gg6unVqJIj4b/2ryAfT7Tilq3GjpEYbGTF5ZfALquSO/Qdi3E6GIKj2nPpHz+M7cAK4Tu8pyogNsun/1KmprfcsDxyKE+q4FwazAHyiAQz62SneRDWYxSA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1750847606; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=7/+BzpDTLyj/g6qTn3N+ge2TUlSpNqc+t5mf+a0g4AA=; b=g4/ZqfhJ+1kr1YWGCdbzlC5usX+iRyKTsa6Su0/wR0xuNkSZIbOXUPkHcSC1q2Zur+RegyE5tJP+HWTQ4B6F3am1JjmLb1DmypzYQuRBvlGmAVWLazaO1YpCe3uAqlaswU9ct3cmXnAZV268RI1lKoBwzZlhSB4OUFPLmsb+0gs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1750847606824723.7410666600157; Wed, 25 Jun 2025 03:33:26 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1024677.1400507 (Exim 4.92) (envelope-from ) id 1uUNRH-00083z-Ug; Wed, 25 Jun 2025 10:33:11 +0000 Received: by outflank-mailman (output) from mailman id 1024677.1400507; Wed, 25 Jun 2025 10:33: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 1uUNRH-00083s-SB; Wed, 25 Jun 2025 10:33:11 +0000 Received: by outflank-mailman (input) for mailman id 1024677; Wed, 25 Jun 2025 10:33:11 +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 1uUNRH-00083m-0c for xen-devel@lists.xenproject.org; Wed, 25 Jun 2025 10:33:11 +0000 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id c9e7ef65-51af-11f0-a30f-13f23c93f187; Wed, 25 Jun 2025 12:33:10 +0200 (CEST) Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 2219F2116D; Wed, 25 Jun 2025 10:33:09 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id F2E0E13AC4; Wed, 25 Jun 2025 10:33:08 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id flnCOWTQW2gkSAAAD6G6ig (envelope-from ); Wed, 25 Jun 2025 10:33:08 +0000 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: c9e7ef65-51af-11f0-a30f-13f23c93f187 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1750847589; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=7/+BzpDTLyj/g6qTn3N+ge2TUlSpNqc+t5mf+a0g4AA=; b=UhG7Z1pVQmJBJbpqFP0gB1L0HYXBM5djkfz/6lxkbS3qQ74sU5L5xzBVbel1e7Vc+A9DdT +xWDXv1JTVTcyVRyht08gWTuYo8WWOpa1DCBUnSvZymXGxMbagOo3HQBDWH99t/aAlOk8d 9eH1pEdIN3EP8UAdad03eKDxqmOwHfg= Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.com header.s=susede1 header.b=UhG7Z1pV DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1750847589; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=7/+BzpDTLyj/g6qTn3N+ge2TUlSpNqc+t5mf+a0g4AA=; b=UhG7Z1pVQmJBJbpqFP0gB1L0HYXBM5djkfz/6lxkbS3qQ74sU5L5xzBVbel1e7Vc+A9DdT +xWDXv1JTVTcyVRyht08gWTuYo8WWOpa1DCBUnSvZymXGxMbagOo3HQBDWH99t/aAlOk8d 9eH1pEdIN3EP8UAdad03eKDxqmOwHfg= From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Anthony PERARD Subject: [PATCH] tools/libxenguest: fix build in stubdom environment Date: Wed, 25 Jun 2025 12:33:06 +0200 Message-ID: <20250625103306.4599-1-jgross@suse.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Queue-Id: 2219F2116D X-Rspamd-Action: no action X-Spam-Flag: NO X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.com:s=susede1]; NEURAL_HAM_SHORT(-0.20)[-0.995]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; FUZZY_BLOCKED(0.00)[rspamd.com]; DKIM_TRACE(0.00)[suse.com:+]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_TLS_ALL(0.00)[]; DNSWL_BLOCKED(0.00)[2a07:de40:b281:106:10:150:64:167:received,2a07:de40:b281:104:10:150:64:97:from]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; RCPT_COUNT_THREE(0.00)[3]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:mid,suse.com:dkim,suse.com:email,imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo] X-Spam-Score: -3.01 X-Spam-Level: X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1750847607612116600 Content-Type: text/plain; charset="utf-8" With introduction of the new byteswap infrastructure the build of libxenguest for stubdoms was broken. Fix that again. Fixes: 60dcff871e34 ("xen/decompressors: Remove use of *_to_cpup() helpers") Signed-off-by: Juergen Gross Acked-by: Andrew Cooper Acked-by: Anthony PERARD Reviewed-by: Jason Andryuk --- tools/libs/guest/xg_dom_decompress_unsafe_lzo1x.c | 9 +++++++++ tools/libs/guest/xg_dom_decompress_unsafe_xz.c | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/libs/guest/xg_dom_decompress_unsafe_lzo1x.c b/tools/libs= /guest/xg_dom_decompress_unsafe_lzo1x.c index ca2f37d915..356f228718 100644 --- a/tools/libs/guest/xg_dom_decompress_unsafe_lzo1x.c +++ b/tools/libs/guest/xg_dom_decompress_unsafe_lzo1x.c @@ -25,6 +25,15 @@ static inline uint16_t be16_to_cpu(const uint16_t v) #endif } =20 +static inline uint32_t be32_to_cpu(const uint32_t v) +{ +#if BYTE_ORDER =3D=3D LITTLE_ENDIAN + return __builtin_bswap32(v); +#else + return v; +#endif +} + #include "../../xen/common/lzo.c" #include "../../xen/common/unlzo.c" =20 diff --git a/tools/libs/guest/xg_dom_decompress_unsafe_xz.c b/tools/libs/gu= est/xg_dom_decompress_unsafe_xz.c index 1f52875340..0501f7f693 100644 --- a/tools/libs/guest/xg_dom_decompress_unsafe_xz.c +++ b/tools/libs/guest/xg_dom_decompress_unsafe_xz.c @@ -25,7 +25,7 @@ static inline uint32_t cpu_to_le32(const uint32_t v) #endif } =20 -static inline uint32_t le32_to_cpu(const uint32_t p) +static inline uint32_t le32_to_cpu(const uint32_t v) { #if BYTE_ORDER =3D=3D BIG_ENDIAN return __builtin_bswap32(v); --=20 2.43.0