From nobody Tue Feb 10 20:48:45 2026 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=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1677264646; cv=none; d=zohomail.com; s=zohoarc; b=GoS8Hi4Y094CZOuZ+Pb8iAhSvZQ96tvay+aUQ8yDBzr0AOZ8JdB4DItAOaXjHoei7dAKp7IuEGz/YdlQtbTtH49VWI7+Ipcw02nHF0gHwjE52ZDwZ2Q7HTDQqgqYnTEOrzgg1twfItrIWAzEto2lE+JIMttO81KgoVbZu4vxL90= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677264646; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=KL9lzwZ35ftF87QkRCnj2FkoflnDCOsUHUBVWqz7qNU=; b=HpJrJkksO2gCamdE4YgcmroyHS/iKWAy1C9udaUOsoAgogX0D/Y4maepvlij83jdYykuwExXobct6RDA0XWOakx/Y0hvvK7oOR9/T/ohM4PFFM1bTNDfajXUyoaZbtR/lQ4mnTYoazw3LkokaMM5qZVvUdFkp07YmwceuaAzA24= 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=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1677264646090625.8858313430128; Fri, 24 Feb 2023 10:50:46 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.501416.773179 (Exim 4.92) (envelope-from ) id 1pVd9F-0002bi-6Q; Fri, 24 Feb 2023 18:50:25 +0000 Received: by outflank-mailman (output) from mailman id 501416.773179; Fri, 24 Feb 2023 18:50:25 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pVd9F-0002bb-2u; Fri, 24 Feb 2023 18:50:25 +0000 Received: by outflank-mailman (input) for mailman id 501416; Fri, 24 Feb 2023 18:50:24 +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 1pVd9E-0002YL-6h for xen-devel@lists.xenproject.org; Fri, 24 Feb 2023 18:50:24 +0000 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [2a00:1450:4864:20::534]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 176698b8-b474-11ed-a82a-c9ca1d2f71af; Fri, 24 Feb 2023 19:50:22 +0100 (CET) Received: by mail-ed1-x534.google.com with SMTP id h16so957915edz.10 for ; Fri, 24 Feb 2023 10:50:22 -0800 (PST) Received: from uni.router.wind (adsl-185.109.242.225.tellas.gr. [109.242.225.185]) by smtp.googlemail.com with ESMTPSA id me19-20020a170906aed300b008b17662e1f7sm10585245ejb.53.2023.02.24.10.50.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Feb 2023 10:50:21 -0800 (PST) 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: 176698b8-b474-11ed-a82a-c9ca1d2f71af DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=KL9lzwZ35ftF87QkRCnj2FkoflnDCOsUHUBVWqz7qNU=; b=HF3jxW9vODJL8Fmk50sLGa5xDdXq2HeRmYVvW+7y7LqH1gpMOeFrUeBrPO1y9fuUsp IJCB6GhYPiI9dDLqQu8KfkUpMsUCYIgwI515HV49XGRexLXxUTjtIIDZd64PhjHo9gSj OW2p13RKl/tMe1ltzZdYj+b7YDxXjavoEN7k9q9tDRQ1JQQuVN4Z0Ck1NUZgEo7GzDxu 37I2EljTppxssX60KPqD3VzVZ3NvhWIeKMLR4WwaPntdLkANisi9Chp+NLd9Ns6F/K9/ qQtohPTnArQJZhwhrTsBAVEYWDLQP3h5Ds/HSwYeZVWuHYCnMNFm5VjuXKunmxNmWFHP GtGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=KL9lzwZ35ftF87QkRCnj2FkoflnDCOsUHUBVWqz7qNU=; b=h6W0rM6O5ttV+IYmGvWJOEvnc8Mc1taP7jXun63Y9CF4tOliJ32XD2QEL1sI9LjdzZ h/SpwAjDTL9CY6w9WaqTSdX2TxM+/ZEAMe0QpY4hGuyIcrFMXu1GtSmpWK9+U2b4NEBy d8Z/ZQEpQtAjBPersfUpFSZpY/YOr/Tgyq7hQf5Zg8MTW/v8AE7VqBuEaq0U1P4/Txey pFy+yvSoi1LkdNg+Mgr+XUpgntMtuf9ITYTVSv62ctUDYc4wgCgvRzdkaKQglQQzchfr HSVeARRcPdvAZT291JznQuRYAjrQ26bChrWc+VQGLHKVAJhaNv0FLr1/sTcmaOsJ2DoQ Chkw== X-Gm-Message-State: AO0yUKXWjJy5fQIAEeE0PL/TrhTIZEgrCtZMsjDaLZj1Mv/5wkAVlN4k NSdA6VguJWTf1VEpz2QWfThYVhX49AU= X-Google-Smtp-Source: AK7set8wO/M04U9cnd0sCME4qj2tNOUpoPg6UmcMghRa+mE7pAAWnUID9EMwFSS7vNY1mRRHj4XKzA== X-Received: by 2002:a17:906:e293:b0:8aa:9abe:8edd with SMTP id gg19-20020a170906e29300b008aa9abe8eddmr27669015ejb.66.1677264621570; Fri, 24 Feb 2023 10:50:21 -0800 (PST) From: Xenia Ragiadakou To: xen-devel@lists.xenproject.org Cc: Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu Subject: [PATCH v3 04/14] x86/svm: make emulate.h private Date: Fri, 24 Feb 2023 20:50:00 +0200 Message-Id: <20230224185010.3692754-5-burzalodowa@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230224185010.3692754-1-burzalodowa@gmail.com> References: <20230224185010.3692754-1-burzalodowa@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1677264647955100001 Content-Type: text/plain; charset="utf-8" The header asm/hvm/svm/emulate.h is used only internally by the SVM code, so it can be changed into a private header. Take the opportunity to use an SPDX tag for the licence. No functional change intended. Signed-off-by: Xenia Ragiadakou --- Changes in v3: - new patch xen/arch/x86/hvm/svm/emulate.c | 3 ++- .../x86/{include/asm =3D> }/hvm/svm/emulate.h | 20 +++++-------------- xen/arch/x86/hvm/svm/nestedsvm.c | 2 +- xen/arch/x86/hvm/svm/svm.c | 2 +- 4 files changed, 9 insertions(+), 18 deletions(-) rename xen/arch/x86/{include/asm =3D> }/hvm/svm/emulate.h (73%) diff --git a/xen/arch/x86/hvm/svm/emulate.c b/xen/arch/x86/hvm/svm/emulate.c index 16fc134883..4a84b4e761 100644 --- a/xen/arch/x86/hvm/svm/emulate.c +++ b/xen/arch/x86/hvm/svm/emulate.c @@ -24,7 +24,8 @@ #include #include #include -#include + +#include "emulate.h" =20 static unsigned long svm_nextrip_insn_length(struct vcpu *v) { diff --git a/xen/arch/x86/include/asm/hvm/svm/emulate.h b/xen/arch/x86/hvm/= svm/emulate.h similarity index 73% rename from xen/arch/x86/include/asm/hvm/svm/emulate.h rename to xen/arch/x86/hvm/svm/emulate.h index eb1a8c24af..c0d27772a5 100644 --- a/xen/arch/x86/include/asm/hvm/svm/emulate.h +++ b/xen/arch/x86/hvm/svm/emulate.h @@ -1,23 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* * emulate.h: SVM instruction emulation bits. + * * Copyright (c) 2005, AMD Corporation. * Copyright (c) 2004, Intel Corporation. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms and conditions of the GNU General Public License, - * version 2, as published by the Free Software Foundation. - * - * This program is distributed in the hope 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 f= or - * more details. - * - * You should have received a copy of the GNU General Public License along= with - * this program; If not, see . */ =20 -#ifndef __ASM_X86_HVM_SVM_EMULATE_H__ -#define __ASM_X86_HVM_SVM_EMULATE_H__ +#ifndef __X86_HVM_SVM_EMULATE_PRIV_H__ +#define __X86_HVM_SVM_EMULATE_PRIV_H__ =20 /* * Encoding for svm_get_insn_len(). We take X86EMUL_OPC() for the main @@ -53,7 +43,7 @@ struct vcpu; unsigned int svm_get_insn_len(struct vcpu *v, unsigned int instr_enc); unsigned int svm_get_task_switch_insn_len(void); =20 -#endif /* __ASM_X86_HVM_SVM_EMULATE_H__ */ +#endif /* __X86_HVM_SVM_EMULATE_PRIV_H__ */ =20 /* * Local variables: diff --git a/xen/arch/x86/hvm/svm/nestedsvm.c b/xen/arch/x86/hvm/svm/nested= svm.c index a341ccc876..5f5752ce21 100644 --- a/xen/arch/x86/hvm/svm/nestedsvm.c +++ b/xen/arch/x86/hvm/svm/nestedsvm.c @@ -17,7 +17,6 @@ */ =20 #include -#include #include #include #include @@ -27,6 +26,7 @@ #include /* for local_event_delivery_(en|dis)able */ #include /* p2m_get_pagetable, p2m_get_nestedp2m */ =20 +#include "emulate.h" #include "svm.h" =20 #define NSVM_ERROR_VVMCB 1 diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c index 793a10eaca..c767a3eb76 100644 --- a/xen/arch/x86/hvm/svm/svm.c +++ b/xen/arch/x86/hvm/svm/svm.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include @@ -55,6 +54,7 @@ #include =20 #include "asid.h" +#include "emulate.h" #include "svm.h" =20 void noreturn svm_asm_do_resume(void); --=20 2.37.2