From nobody Thu Nov 21 21:38:37 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; 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=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1725283999; cv=none; d=zohomail.com; s=zohoarc; b=GHMGu19LKkzPEIEwZuEtOijl1ZUyH+yXLWXzB5QocTNRoFzNSrGrx5t2kA2Sr9LeJxMmIOHZtwHU4sS4XKt5l97+clzbO9/tsAi1TRvFAruBiZUwMAbZ3ieWGcKgq3k1O6ObwoYvQvBUIEZTQhnp6iBs/8pXG7alNEL1wUM8vwA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1725283999; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=aFl3TVf1HFUGf5X7Hzvme/0k6OhCaTh4d95heeg1LWs=; b=mAGEZPJYYd9nqX/wQf5IeOUuQje/gFeBAUQuLDlj03LvMOtYAyndR8UrFsIA/kSikGCujkyVGIe+JzVyWZxmhsT1k9xx4Y+mmGD9o8/2Ha9TcdUD/iZYJaSACD9FVAPEQyuveeWHm/LIZ1qeIIkkGxWGV8RkTgtgdcVH+VXl+Z4= 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=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1725283999137860.659619288822; Mon, 2 Sep 2024 06:33:19 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.787951.1197413 (Exim 4.92) (envelope-from ) id 1sl7Av-00012n-CQ; Mon, 02 Sep 2024 13:32:57 +0000 Received: by outflank-mailman (output) from mailman id 787951.1197413; Mon, 02 Sep 2024 13:32:57 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sl7Av-00010E-5K; Mon, 02 Sep 2024 13:32:57 +0000 Received: by outflank-mailman (input) for mailman id 787951; Mon, 02 Sep 2024 13:32:56 +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 1sl7Au-0000uL-C1 for xen-devel@lists.xenproject.org; Mon, 02 Sep 2024 13:32:56 +0000 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [2a00:1450:4864:20::535]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id dbe618a8-692f-11ef-99a1-01e77a169b0f; Mon, 02 Sep 2024 15:32:54 +0200 (CEST) Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-5c241feb80dso3930531a12.0 for ; Mon, 02 Sep 2024 06:32:54 -0700 (PDT) Received: from andrewcoop.eng.citrite.net ([185.25.67.249]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a8989196975sm562333666b.135.2024.09.02.06.32.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Sep 2024 06:32:52 -0700 (PDT) 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: dbe618a8-692f-11ef-99a1-01e77a169b0f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1725283973; x=1725888773; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=aFl3TVf1HFUGf5X7Hzvme/0k6OhCaTh4d95heeg1LWs=; b=r1zOi23shx0w1DjBKvQm/20YvsRD0/MqDpWthKptYDoovB1lMAEA4/s13ptFAs6Cd1 kO2MZBc+UQtekHY9bXmMGo+l0UJc4BbUmDaJZ2iySH4BVF+kP8u/nhqo9btoSgo4W350 ImZkYoS7o3dDGeWdKej8RWHy/taBtg1wJHJMQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725283973; x=1725888773; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aFl3TVf1HFUGf5X7Hzvme/0k6OhCaTh4d95heeg1LWs=; b=qXuqmFTOhMXJ51Y9xAVF46I51z4oC1dtSnwFSs+FpqCo0P0Quzv7bueOTBe8t8vqgL c0J/Jh5bMlEb1xbwEeHQjFhSCEEGdO6Od8po3QE9IXUKmaa1tRHErcvRTf+nB2G9FM8Z YXAGTqEoAt8TwH9X6+KwoSmP6ajbl3hUtg1WlY9OdY9ZAeAQxBw65FcJ3QgHMf0Gr2BL mZF/AwnYi95F6GfE0BVkDejVQiELh+kgReaoxOsZTG0K7vLkCQ5iL0h9wS/eJK58dXno 4J7vX1wQaQ56O5srftzcEXYL3m+7pSooJkJbybLBlSRPNpLHP8vf9XaNcoJmOotWA9Pj vx6A== X-Gm-Message-State: AOJu0Yxeb6uZRtj1NQt41J7D0TYVHe5GizXHYnDprzSnZ5jg1qD/xfig uAAF52DKrdUQ2bn7T/u/Aew3nxflG0vE8OuL3kQqs9xvZ1f9wyGjwoCkSLlfCaYCy25OyaagIXf p X-Google-Smtp-Source: AGHT+IHfpkYzaJzrhNVmY/WHkSEWAtrtKnBlyANpKf08/odYzlNkMz+SUEQ2t9VNTdzNSpgDDzZwbw== X-Received: by 2002:a17:907:2d88:b0:a86:9e85:2619 with SMTP id a640c23a62f3a-a89827a3c54mr1495834066b.25.1725283972949; Mon, 02 Sep 2024 06:32:52 -0700 (PDT) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Frediano Ziglio Subject: [PATCH 3/4] x86/boot: Use Date: Mon, 2 Sep 2024 14:32:31 +0100 Message-Id: <20240902133232.3302839-4-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240902133232.3302839-1-andrew.cooper3@citrix.com> References: <20240902133232.3302839-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1725284000944116600 ... rather than opencoding locally. __stdcall is x86-only and not something we want to introduce to Xen generically, so opencode it in the two positions where it matters. With this, defs.h is empty so delete it. No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 CC: Frediano Ziglio I was hoping to do away with stdcall entirely and use fastcall instead, but I've clearly got something wrong and the result doesn't boot. --- xen/arch/x86/boot/cmdline.c | 5 +++-- xen/arch/x86/boot/defs.h | 27 --------------------------- xen/arch/x86/boot/reloc.c | 7 +++---- 3 files changed, 6 insertions(+), 33 deletions(-) delete mode 100644 xen/arch/x86/boot/defs.h diff --git a/xen/arch/x86/boot/cmdline.c b/xen/arch/x86/boot/cmdline.c index b7375d106678..bdd5b95c224b 100644 --- a/xen/arch/x86/boot/cmdline.c +++ b/xen/arch/x86/boot/cmdline.c @@ -30,11 +30,11 @@ asm ( " jmp cmdline_parse_early \n" ); =20 +#include #include #include #include =20 -#include "defs.h" #include "video.h" =20 /* Keep in sync with trampoline.S:early_boot_opts label! */ @@ -347,7 +347,8 @@ static void vga_parse(const char *cmdline, early_boot_o= pts_t *ebo) #endif =20 /* SAF-1-safe */ -void __stdcall cmdline_parse_early(const char *cmdline, early_boot_opts_t = *ebo) +void __attribute__((__stdcall__)) +cmdline_parse_early(const char *cmdline, early_boot_opts_t *ebo) { if ( !cmdline ) return; diff --git a/xen/arch/x86/boot/defs.h b/xen/arch/x86/boot/defs.h deleted file mode 100644 index 4d519ac4f5ea..000000000000 --- a/xen/arch/x86/boot/defs.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - * - * max() was copied from xen/xen/include/xen/kernel.h. - */ - -#ifndef __BOOT_DEFS_H__ -#define __BOOT_DEFS_H__ - -#define __maybe_unused __attribute__((__unused__)) -#define __packed __attribute__((__packed__)) -#define __stdcall __attribute__((__stdcall__)) - -#endif /* __BOOT_DEFS_H__ */ diff --git a/xen/arch/x86/boot/reloc.c b/xen/arch/x86/boot/reloc.c index eb9902d73fd9..1e3a30fab0c6 100644 --- a/xen/arch/x86/boot/reloc.c +++ b/xen/arch/x86/boot/reloc.c @@ -26,11 +26,10 @@ asm ( " jmp reloc \n" ); =20 +#include #include #include =20 -#include "defs.h" - #include #include #include @@ -354,8 +353,8 @@ static multiboot_info_t *mbi2_reloc(uint32_t mbi_in, ui= nt32_t video_out) } =20 /* SAF-1-safe */ -void *__stdcall reloc(uint32_t magic, uint32_t in, uint32_t trampoline, - uint32_t video_info) +void *__attribute__((__stdcall__)) +reloc(uint32_t magic, uint32_t in, uint32_t trampoline, uint32_t video_inf= o) { alloc =3D trampoline; =20 --=20 2.39.2