Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp1233768lqd; Thu, 25 Apr 2024 09:20:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWsCVAIx31uCl6MN4+gSuaz/v97wqkA6I7gwQ0lUR5oqZIhPiYnshZlnJg1hUZOO3C1arJXim4vvJPxeEmOYNYfUsKsG5X0W0x2dkG0yQ== X-Google-Smtp-Source: AGHT+IERjZCPIiSdDiyx0vRwVivqpXAqWBUqq+p5XDRbENCl6P6l9HqStGiCm0O7THDS4v9cy2TR X-Received: by 2002:a05:6a00:21c9:b0:6ec:fdcc:3cce with SMTP id t9-20020a056a0021c900b006ecfdcc3ccemr321020pfj.5.1714062023619; Thu, 25 Apr 2024 09:20:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714062023; cv=pass; d=google.com; s=arc-20160816; b=jq5YJQ9RKhXt36uPjdSCktCuWB8u5z07M3MmE3opjvUr9BH+szwh9n+fDis4v0vUbV oRIuRVFSjS4OVary74sakPBIjMVata3I31aGQF3mDFDQJYZ7sPYnIdCIo5PpJO85fDEG UQ9psH4/ds0YBeXMqw4RqJ6dTodNZIb+BU5WlaKcVADw7nfACCsSgmp60QwRPk3ETBow ZEt3wZ3VsxBuLhQkI3fQJ/dw6z6XjEAdnQx8K9/Pj8J66rff3dJhzc0p+DMgp4tYvGYI q0RdGE4zmP3XRIbIpSPKknxMPz+YBIAXlA4pSSjPyXt8k6ehgDQ8miGF5E4mEk0J7AnZ +rQw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=PNie86bdmJzFK9yJjg6eW1JuhZfMlBOBkMyB7kl77M4=; fh=b0GhHGzyGHYt5G64szUuetIUC0kmLE/lFuNFlnq/JOI=; b=QfD8b149XEC/swLcZezpVRFVy5rngwVP4BOJwvCyIVBtyQ73tZoZCERZckhi/IMzdf dIcVh8wyiKhiGCQmhmylx7qjWRV+PQRxXigVSDdamTsDv5dUCj31ahGlipqlGjn6G6wM fCXcd3Mo0lRdmpMcTD9ifJj/LkWKYgXnnqPmiqe/XXoqLLPOgOzKowBSukyF0hL3MyQ9 P6c+TxxZxRm6zUcWkq1mfVrT7nvKlniRbFkEregJNToU87ohMmHQeAUDG5NYgn0DgiVT Gn+cStUWIgN54rgezo0uNvlA7OPMK9e4mG2Xf6spVoF2Mk6pl1jVjtYcD/iBrYEvQOGB wakg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-158848-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158848-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id ll11-20020a056a00728b00b006e6f9ce6388si13214163pfb.195.2024.04.25.09.20.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 09:20:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-158848-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-158848-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158848-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 341F9B24923 for ; Thu, 25 Apr 2024 15:53:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7646114C5A4; Thu, 25 Apr 2024 15:53:04 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8441512B156; Thu, 25 Apr 2024 15:53:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714060384; cv=none; b=q24j9OylZeA+bSaXo3f/+w9AMOhMXvCuAYqFNabuqhFAAFUt+Y/qxmA4uSlWb3G95GHftMCUuoTQ4MomRdp31/bjaXN6GOTHFYbjGdHk5ndWprPEhCUC2SdQgTdJfEFyLoyHq/DFP5qK8SnC+z+pVAaFYloF9zHBtkzOUThtxm0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714060384; c=relaxed/simple; bh=wpvhhW2gIm86VfAGnDMuFuxo/RtovAFc2eHB/QgqRRQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=PE4SO/jmfRGzjG0fD8FZyMSQO+dqoj6o2XEvm6mmqhEahHTlRZNPzOZ2S85iv9OZ1FulZbMB9rgxhzelFiFJnMHEGoz3R3F+wPucpG7koLfrL9IO4HW6hjmkqj6sAgi9a/SDR13hl0sGiD15URD09XrJRtj8eb7bMr653I1CCyc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E112D1007; Thu, 25 Apr 2024 08:53:27 -0700 (PDT) Received: from [10.57.56.40] (unknown [10.57.56.40]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id AF7D83F73F; Thu, 25 Apr 2024 08:52:55 -0700 (PDT) Message-ID: Date: Thu, 25 Apr 2024 16:52:54 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 09/14] arm64: Enable memory encrypt for Realms To: Suzuki K Poulose , kernel test robot , kvm@vger.kernel.org, kvmarm@lists.linux.dev Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, Catalin Marinas , Marc Zyngier , Will Deacon , James Morse , Oliver Upton , Zenghui Yu , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Joey Gouly , Alexandru Elisei , Christoffer Dall , Fuad Tabba , linux-coco@lists.linux.dev, Ganapatrao Kulkarni , Emanuele.Rocca@arm.com References: <20240412084213.1733764-10-steven.price@arm.com> <202404151003.vkNApJiS-lkp@intel.com> From: Steven Price Content-Language: en-GB In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 25/04/2024 14:42, Suzuki K Poulose wrote: > On 15/04/2024 04:13, kernel test robot wrote: >> Hi Steven, >> >> kernel test robot noticed the following build errors: >> >>>> drivers/hv/channel.c:442:8: error: call to undeclared function >>>> 'set_memory_decrypted'; ISO C99 and later do not support implicit >>>> function declarations [-Wimplicit-function-declaration] >>       442 |         ret = set_memory_decrypted((unsigned long)kbuffer, >>           |               ^ >>>> drivers/hv/channel.c:531:3: error: call to undeclared function >>>> 'set_memory_encrypted'; ISO C99 and later do not support implicit >>>> function declarations [-Wimplicit-function-declaration] >>       531 |                 set_memory_encrypted((unsigned long)kbuffer, >>           |                 ^ >>     drivers/hv/channel.c:848:8: error: call to undeclared function >> 'set_memory_encrypted'; ISO C99 and later do not support implicit >> function declarations [-Wimplicit-function-declaration] >>       848 |         ret = set_memory_encrypted((unsigned >> long)gpadl->buffer, >>           |               ^ >>     5 warnings and 3 errors generated. > > Thats my mistake. The correct place for declaring set_memory_*crypted() > is asm/set_memory.h not asm/mem_encrypt.h. > > Steven, please could you fold this patch below : Sure, I've folded into my local branch. Thanks for looking into the error. Steve > > diff --git a/arch/arm64/include/asm/mem_encrypt.h > b/arch/arm64/include/asm/mem_encrypt.h > index 7381f9585321..e47265cd180a 100644 > --- a/arch/arm64/include/asm/mem_encrypt.h > +++ b/arch/arm64/include/asm/mem_encrypt.h > @@ -14,6 +14,4 @@ static inline bool force_dma_unencrypted(struct device > *dev) >         return is_realm_world(); >  } > > -int set_memory_encrypted(unsigned long addr, int numpages); > -int set_memory_decrypted(unsigned long addr, int numpages); >  #endif > diff --git a/arch/arm64/include/asm/set_memory.h > b/arch/arm64/include/asm/set_memory.h > index 0f740b781187..9561b90fb43c 100644 > --- a/arch/arm64/include/asm/set_memory.h > +++ b/arch/arm64/include/asm/set_memory.h > @@ -14,4 +14,6 @@ int set_direct_map_invalid_noflush(struct page *page); >  int set_direct_map_default_noflush(struct page *page); >  bool kernel_page_present(struct page *page); > > +int set_memory_encrypted(unsigned long addr, int numpages); > +int set_memory_decrypted(unsigned long addr, int numpages); > > > > Suzuki