From owner-svn-ports-head@freebsd.org Tue Feb 16 16:03:34 2021 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AF09453DA76; Tue, 16 Feb 2021 16:03:34 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dg5P24Mmmz4dhq; Tue, 16 Feb 2021 16:03:34 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 886F113F59; Tue, 16 Feb 2021 16:03:34 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 11GG3Y5O030666; Tue, 16 Feb 2021 16:03:34 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 11GG3YsH030664; Tue, 16 Feb 2021 16:03:34 GMT (envelope-from royger@FreeBSD.org) Message-Id: <202102161603.11GG3YsH030664@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Tue, 16 Feb 2021 16:03:34 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r565411 - in head/emulators/xen-kernel: . files X-SVN-Group: ports-head X-SVN-Commit-Author: royger X-SVN-Commit-Paths: in head/emulators/xen-kernel: . files X-SVN-Commit-Revision: 565411 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 16:03:34 -0000 Author: royger (src committer) Date: Tue Feb 16 16:03:33 2021 New Revision: 565411 URL: https://svnweb.freebsd.org/changeset/ports/565411 Log: emulators/xen-kernel: fix EFI calling convention Xen builds using clang where not using the correct calling convention for EFI services, backport an upstream patch to fix it. Approved by: bapt (implicit) Added: head/emulators/xen-kernel/files/0001-x86-efi-enable-MS-ABI-attribute-on-clang.patch (contents, props changed) Modified: head/emulators/xen-kernel/Makefile Modified: head/emulators/xen-kernel/Makefile ============================================================================== --- head/emulators/xen-kernel/Makefile Tue Feb 16 15:44:27 2021 (r565410) +++ head/emulators/xen-kernel/Makefile Tue Feb 16 16:03:33 2021 (r565411) @@ -2,7 +2,7 @@ PORTNAME= xen PORTVERSION= 4.14.1 -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= emulators MASTER_SITES= http://downloads.xenproject.org/release/xen/${PORTVERSION}/ PKGNAMESUFFIX= -kernel @@ -27,6 +27,9 @@ PLIST_FILES= /boot/xen \ # Propagate module command line passed by the loader. EXTRA_PATCHES+= ${PATCHDIR}/0001-x86-pvh-pass-module-command-line-to-dom0.patch:-p1 + +# Fix EFI BS call ABI. +EXTRA_PATCHES+= ${PATCHDIR}/0001-x86-efi-enable-MS-ABI-attribute-on-clang.patch:-p1 .include Added: head/emulators/xen-kernel/files/0001-x86-efi-enable-MS-ABI-attribute-on-clang.patch ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/emulators/xen-kernel/files/0001-x86-efi-enable-MS-ABI-attribute-on-clang.patch Tue Feb 16 16:03:33 2021 (r565411) @@ -0,0 +1,38 @@ +From 92f5ffa58d188c9f9a9f1bcdccb6d6348d9df612 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= +Date: Thu, 4 Feb 2021 14:02:32 +0100 +Subject: [PATCH] x86/efi: enable MS ABI attribute on clang +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Or else the EFI service calls will use the wrong calling convention. + +The __ms_abi__ attribute is available on all supported versions of +clang. Add a specific Clang check because the GCC version reported by +Clang is below the required 4.4 to use the __ms_abi__ attribute. + +Signed-off-by: Roger Pau Monné +Acked-by: Andrew Cooper +Reviewed-by: Ian Jackson +Release-Acked-by: Ian Jackson +--- + xen/include/asm-x86/x86_64/efibind.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/xen/include/asm-x86/x86_64/efibind.h b/xen/include/asm-x86/x86_64/efibind.h +index b013db175d..ddcfae07ec 100644 +--- a/xen/include/asm-x86/x86_64/efibind.h ++++ b/xen/include/asm-x86/x86_64/efibind.h +@@ -172,7 +172,7 @@ typedef uint64_t UINTN; + #ifndef EFIAPI // Forces EFI calling conventions reguardless of compiler options + #ifdef _MSC_EXTENSIONS + #define EFIAPI __cdecl // Force C calling convention for Microsoft C compiler +- #elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) ++ #elif __clang__ || __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) + #define EFIAPI __attribute__((__ms_abi__)) // Force Microsoft ABI + #else + #define EFIAPI // Substitute expresion to force C calling convention +-- +2.30.1 +