Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1195008pxb; Fri, 21 Jan 2022 12:00:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJzshtMUcijipsBHnQM/CNnYTePIz0TmbRGPVd8Jq8eYOs3oy+tPvgRWxrdMl8yjm36mC1YL X-Received: by 2002:a17:90b:33ca:: with SMTP id lk10mr2234088pjb.33.1642795219884; Fri, 21 Jan 2022 12:00:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642795219; cv=none; d=google.com; s=arc-20160816; b=VN3zHXfkZLC78S/2beTPlv5j1eWCKqhJ5D/isZwJ7seHJE3tOeb0v3jajkvzcl6sEe h1TmLypILiAIRTGlPWBnZRm35W31Pyhcn8Dlcou1V6lT9EqBEuIXdNx/B5mekxR4LScY dATMN8UcGl1Qx5K323kWCJ9aYIF51ZzmRonwxM2yc9NhGk6H0FPGryyeLolFtgm9Zt3p gBoC39DRtmZcapqT6Zd6G8HCjCBj8rOVfFuzNGS5MK8Mr3NO1d7wHyyAn+a85VGDaFcV gfG27yFavpdTB/Zz80+PDo38MLYicpxI6DlJJETW+x1Cf09PFCJTeQC172OQ7G3SoSEz gQtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=dsPEM5aEnSJRJ8gMnU+NAZrbVimVsgRGR+O2Gb2WDZk=; b=BaeeUloKSeZHx0errLhXXgUXwhF5YjtQbtIf2zFHR55NN5GlN7allSywJLJMUXVsXU RYhzg9RL2p19dWNRGzRoSvEfhYBAGgy6b3GmfR9SAoPdGzDTJxKLw6WmaymJ3s9fWT4/ YGqVNwyiEm5yd7/Hte0Ru/9DAxLYNkidUq0msUhmpgsfVQ2Uyr4ycHL3+aGxSmnzaAPP qGKIhe4L42WBp0zxOqpX+TUozlEBZvuZj8cXKo09j/4PYsJJaE1CjQEotjA8BUAvqmeV 7CVrrQKk40BTktzB6dJyiun2ICrEWEr1wDv+uIZeM0WRzD7yHDaRUCS99CfIfa+6cY6k IfRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=LWSaHbC1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ng18si7510367pjb.173.2022.01.21.12.00.07; Fri, 21 Jan 2022 12:00:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=LWSaHbC1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232636AbiASTqh (ORCPT + 99 others); Wed, 19 Jan 2022 14:46:37 -0500 Received: from mail.skyhub.de ([5.9.137.197]:54836 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230233AbiASTqg (ORCPT ); Wed, 19 Jan 2022 14:46:36 -0500 Received: from zn.tnic (dslb-088-067-202-008.088.067.pools.vodafone-ip.de [88.67.202.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 840D51EC04EC; Wed, 19 Jan 2022 20:46:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1642621591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=dsPEM5aEnSJRJ8gMnU+NAZrbVimVsgRGR+O2Gb2WDZk=; b=LWSaHbC1/2oS+M2awBLDUO+nBNzqxgUY2fz/gKliq/DinD98YI81upER14RdTcKSSTTTQb 09zQuGhRrWTdmRNSIu5y2K/H4q3CkcHMYxaeoqp3Z9JFK5kmqbs7zbK3t0BXqcj1ZPXKEm yo1Tsd/MOzHft2Lm7x4tp9JV9NlXCq8= Date: Wed, 19 Jan 2022 20:46:24 +0100 From: Borislav Petkov To: "Kirill A. Shutemov" Cc: "H. Peter Anvin" , Thomas Gleixner , "Kirill A. Shutemov" , mingo@redhat.com, dave.hansen@intel.com, luto@kernel.org, peterz@infradead.org, sathyanarayanan.kuppuswamy@linux.intel.com, aarcange@redhat.com, ak@linux.intel.com, dan.j.williams@intel.com, david@redhat.com, jgross@suse.com, jmattson@google.com, joro@8bytes.org, jpoimboe@redhat.com, knsathya@kernel.org, pbonzini@redhat.com, sdeep@vmware.com, seanjc@google.com, tony.luck@intel.com, vkuznets@redhat.com, wanpengli@tencent.com, x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 10/26] x86/tdx: Support TDX guest port I/O at decompression time Message-ID: References: <20211214150304.62613-1-kirill.shutemov@linux.intel.com> <20211214150304.62613-11-kirill.shutemov@linux.intel.com> <20220115010155.ss2hnyotw4a3nljf@black.fi.intel.com> <20220117143920.3umnnlx7dl27cm5z@box.shutemov.name> <20220119115326.rw2aj3ho2mct4xxv@box.shutemov.name> <20220119154925.mzri4zaz3o477e3k@box.shutemov.name> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220119154925.mzri4zaz3o477e3k@box.shutemov.name> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 19, 2022 at 06:49:25PM +0300, Kirill A. Shutemov wrote: > const struct port_io_ops default_pio_ops = { > .inb = inb, > .inw = inw, > .inl = inl, > .outb = outb, > .outw = outw, > .outl = outl, > }; > > make pio_ops a pointer and assign it here: > > pio_ops = &default_pio_ops; > > But it leads to an issue on linking: > > ld.lld: error: Unexpected run-time relocations (.rela) detected! So the above generates absolute relocations of type R_X86_64_64 Relocation section '.rela.data.rel.local' at offset 0x5c18 contains 6 entries: Offset Info Type Sym. Value Sym. Name + Addend 000000000000 000200000001 R_X86_64_64 0000000000000000 .text + 10 000000000008 000200000001 R_X86_64_64 0000000000000000 .text + 30 000000000010 000200000001 R_X86_64_64 0000000000000000 .text + 50 000000000018 000200000001 R_X86_64_64 0000000000000000 .text + 0 000000000020 000200000001 R_X86_64_64 0000000000000000 .text + 20 000000000028 000200000001 R_X86_64_64 0000000000000000 .text + 40 and the linker doesn't like them probably because of the mcmodel we use but I need to talk to toolchain folks first to make sense of what's going on... Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette