From nobody Sun May 19 03:38:12 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=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1694099806; cv=none; d=zohomail.com; s=zohoarc; b=mj8kOsoq/yFbdNbwTV6/zZsbBuXM8+L2sD0uxCG5y0+5HFanpNsyoK4xpBRw6pqi283+ZFvb9cC1thHqWDSqdhHybQTA+uDBOwr2CsxT12nRdNGgyQZFB5envwdz6E8ZCJfcVh6zRCYf9laa1iuFr/kMgXqZCH7XWz3fEXnMB78= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1694099806; 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=M3ZByGEDZdELqUya7GUTY9i8XXFs5HblR9GE9jzOH8U=; b=ah4sIvWjRNh7I3hSOzXKj5B1x5Y8IKU0KQrtrCBSC5JOQXZq1Eulx7qSulciqWOl72Wyg76LDIPBHM7Ap22RqYv87UcEGymwsW86kvV7Ae5UW4sl+BmPJod+4V7X6wWyIoPSInivGkH9gq/tZX/pPi/RAz/WiqnH58CfLZh8Iy4= 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 1694099806444500.9406476270873; Thu, 7 Sep 2023 08:16:46 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.597477.931713 (Exim 4.92) (envelope-from ) id 1qeGjs-0003Aa-5S; Thu, 07 Sep 2023 15:16:12 +0000 Received: by outflank-mailman (output) from mailman id 597477.931713; Thu, 07 Sep 2023 15:16:12 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qeGjs-0003AT-2r; Thu, 07 Sep 2023 15:16:12 +0000 Received: by outflank-mailman (input) for mailman id 597477; Thu, 07 Sep 2023 15:16:10 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qeGjq-0003AI-8S for xen-devel@lists.xenproject.org; Thu, 07 Sep 2023 15:16:10 +0000 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [2a00:1450:4864:20::22a]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 7917e284-4d91-11ee-8783-cb3800f73035; Thu, 07 Sep 2023 17:16:09 +0200 (CEST) Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2bd0a5a5abbso19221871fa.0 for ; Thu, 07 Sep 2023 08:16:09 -0700 (PDT) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id x2-20020a2e8802000000b002bbacc6c523sm3944055ljh.49.2023.09.07.08.16.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 08:16:07 -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: 7917e284-4d91-11ee-8783-cb3800f73035 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694099768; x=1694704568; 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=M3ZByGEDZdELqUya7GUTY9i8XXFs5HblR9GE9jzOH8U=; b=Ctg7cmtn95ahFmClhozFyA8QflGE7xQO4gPLDluo2emsZYkGqZ/JM03yByfKvOurOq tH3RxQ6bnigka5TrUzLQ/UE442XG5s0QndSdP0zaIBb/1XiLAIakjzaSHh92w1CBDZfw Ecs9Xnd5fyiCVi0CYVGxWW2VRvXVd7wkekiPtqmUSFlhk1eYVeOl1LBwn8MQPlt7MUEI zfG5n+9F19S51ms5abzOandN+B/fiUjxNIo8eRFDfIRaZbn+MfvHAJGw3yX5aYupdoeJ AHMkFF59V5MN5BJYRvxnjhvcWMI4U9UTjGjTYJoE+/4DQiAMBJ2E+rgCLb9KfJJR0stT 8Iwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694099768; x=1694704568; 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=M3ZByGEDZdELqUya7GUTY9i8XXFs5HblR9GE9jzOH8U=; b=FJCaI/EM7KZIN+7qNmnLvOq8yRIbD86BcCev3yIMEhqI3RetMKMAzZVMXQ7J1p82TQ UH3umpKmoK8VaWA6mbQmoRSt7YVIHY+WMYIMx2fVqQlpKd3OX4EaJhhSfIPcyTL+mtfP HBZ/Md0m+d7dJO9R2Y6pHuqireqDnH4412ncm0ERV7HGhaw7yCCivd0Yug0uWnzRZJgA urqD2i4X9Mqdjtzf41uVges360kr0kWhUYP8cS+FKJob2jpoQh+fL9yqPUPa2l5KukOt ZmICbX+cq+Nq2xldRfWjZ9Ct/DcOUuOPBdyJC/p1CB9X2rp20mrP9PPb16DXBFFG2Bsb cJJg== X-Gm-Message-State: AOJu0YxczxMMwZThlCMtbDFWXXeqZjlTO8HcHMvlwIBil2dSc+ABzPzi y1yAkUTFjqv7zCfnWetTNzp6hBi6XtM= X-Google-Smtp-Source: AGHT+IH949d4Rp06C6NCIRxZt5PXbHL527ct0RML399iu/rDVldau5QZJCfeJVLYVH8Nkqg7Npn4oQ== X-Received: by 2002:a2e:7a1a:0:b0:2bc:b0ae:a9e5 with SMTP id v26-20020a2e7a1a000000b002bcb0aea9e5mr5223726ljc.42.1694099768353; Thu, 07 Sep 2023 08:16:08 -0700 (PDT) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Anthony PERARD , Tamas K Lengyel , Oleksii Kurochko , Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [PATCH v7 1/2] xen: asm-generic support Date: Thu, 7 Sep 2023 18:15:59 +0300 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1694099807370100003 Content-Type: text/plain; charset="utf-8" Some headers are shared between individual architectures or are empty. To avoid duplication of these headers, asm-generic is introduced. With the following patch, an architecture uses generic headers mentioned in the file arch/$(ARCH)/include/asm/Makefile To use a generic header is needed to add to arch/$(ARCH)/include/asm/Makefile : generic-y +=3D For each mentioned header in arch/$(ARCH)/include/asm/Makefile, the necessary wrapper in arch/$(ARCH)/include/generated/asm will be generated. As the base Makefile.asm-generic from Linux kernel was taken. ( 06c2afb862f9da8 "Linux 6.5-rc1" ). Signed-off-by: Oleksii Kurochko Reviewed-by: Anthony PERARD Acked-by: Jan Beulich --- Changes in V7: - update warning message in Makefile.asm-generic - add Reviewed-by: Anthony PERARD - add Acked-by: Jan Beulich --- Changes in V6: - introduce $(asm-generic) macro in Kbuild.include. - move "asm-generic" after the rule "__distclean". --- Changes in V5: - Update the commit message - Update SPDX license in Makefile. - Remove code related to UML - Include $(src)/Makefile instead of $(kbuild-file)=20 - Update comment message in Makefile.asm-generic - Update .gitignore - Update path to generated headers in CFLAGS. - Use the latest version of Linux's Makefile.asm-generic --- Changes in V4: - introduce asm-generic support - update commit message --- Changes in V3: - Rename stubs dir to asm-generic --- Changes in V2: - Nothing changed. --- .gitignore | 1 + xen/Makefile | 9 +++++- xen/scripts/Kbuild.include | 6 ++++ xen/scripts/Makefile.asm-generic | 53 ++++++++++++++++++++++++++++++++ 4 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 xen/scripts/Makefile.asm-generic diff --git a/.gitignore b/.gitignore index 50273adb8d..287166f8fc 100644 --- a/.gitignore +++ b/.gitignore @@ -267,6 +267,7 @@ xen/arch/*/efi/efi.h xen/arch/*/efi/pe.c xen/arch/*/efi/runtime.c xen/arch/*/include/asm/asm-offsets.h +xen/arch/*/include/generated xen/build-dir-cppcheck/ xen/common/config_data.S xen/common/config.gz diff --git a/xen/Makefile b/xen/Makefile index f57e5a596c..2dc5e3526d 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -438,6 +438,7 @@ ifdef building_out_of_srctree endif CFLAGS +=3D -I$(srctree)/include CFLAGS +=3D -I$(srctree)/arch/$(SRCARCH)/include +CFLAGS +=3D -I$(objtree)/arch/$(SRCARCH)/include/generated =20 # Note that link order matters! ALL_OBJS-y :=3D common/built_in.o @@ -580,16 +581,22 @@ _clean: rm -f $(TARGET).efi $(TARGET).efi.map $(TARGET).efi.elf $(TARGET).efi.str= ipped rm -f asm-offsets.s arch/*/include/asm/asm-offsets.h rm -f .banner .allconfig.tmp include/xen/compile.h + rm -rf $(objtree)/arch/*/include/generated =20 .PHONY: _distclean _distclean: clean rm -f tags TAGS cscope.files cscope.in.out cscope.out cscope.po.out GTAGS= GPATH GRTAGS GSYMS .config source =20 +# Support for using generic headers in asm-generic +PHONY +=3D asm-generic +asm-generic: + $(Q)$(MAKE) $(asm-generic)=3Darch/$(SRCARCH)/include/generated/asm + $(TARGET).gz: $(TARGET) gzip -n -f -9 < $< > $@.new mv $@.new $@ =20 -$(TARGET): outputmakefile FORCE +$(TARGET): outputmakefile asm-generic FORCE $(Q)$(MAKE) $(build)=3Dtools $(Q)$(MAKE) $(build)=3D. include/xen/compile.h $(Q)$(MAKE) $(build)=3Dinclude all diff --git a/xen/scripts/Kbuild.include b/xen/scripts/Kbuild.include index 785a32c32e..c2bd8498e1 100644 --- a/xen/scripts/Kbuild.include +++ b/xen/scripts/Kbuild.include @@ -91,6 +91,12 @@ cc-ifversion =3D $(shell [ $(CONFIG_GCC_VERSION)0 $(1) $= (2)000 ] && echo $(3) || e =20 clang-ifversion =3D $(shell [ $(CONFIG_CLANG_VERSION)0 $(1) $(2)000 ] && e= cho $(3) || echo $(4)) =20 +### +# Shorthand for $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.asm-generic obj +# Usage: +# $(Q)$(MAKE) $(asm-generic)=3Ddir +asm-generic :=3D -f $(srctree)/scripts/Makefile.asm-generic obj + ### # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.build obj=3D # Usage: diff --git a/xen/scripts/Makefile.asm-generic b/xen/scripts/Makefile.asm-ge= neric new file mode 100644 index 0000000000..b0d356bfa3 --- /dev/null +++ b/xen/scripts/Makefile.asm-generic @@ -0,0 +1,53 @@ +# SPDX-License-Identifier: GPL-2.0-only +# include/asm-generic contains a lot of files that are used +# verbatim by several architectures. +# +# This Makefile reads the file arch/$(SRCARCH)/include/asm/Makefile +# and for each file listed in this file with generic-y creates +# a small wrapper file in arch/$(SRCARCH)/include/generated/asm. + +PHONY :=3D all +all: + +src :=3D $(subst /generated,,$(obj)) + +include $(srctree)/scripts/Kbuild.include +-include $(src)/Makefile + +redundant :=3D $(filter $(mandatory-y) $(generated-y), $(generic-y)) +redundant +=3D $(foreach f, $(generic-y), $(if $(wildcard $(srctree)/$(src= )/$(f)),$(f))) +redundant :=3D $(sort $(redundant)) +$(if $(redundant),\ + $(warning redundant generic-y found in $(src)/Makefile: $(redundant))) + +# If arch does not implement mandatory headers, fallback to asm-generic on= es. +mandatory-y :=3D $(filter-out $(generated-y), $(mandatory-y)) +generic-y +=3D $(foreach f, $(mandatory-y), $(if $(wildcard $(srctree)/$= (src)/$(f)),,$(f))) + +generic-y :=3D $(addprefix $(obj)/, $(generic-y)) +generated-y :=3D $(addprefix $(obj)/, $(generated-y)) + +# Remove stale wrappers when the corresponding files are removed from gene= ric-y +old-headers :=3D $(wildcard $(obj)/*.h) +unwanted :=3D $(filter-out $(generic-y) $(generated-y),$(old-headers)) + +quiet_cmd_wrap =3D WRAP $@ + cmd_wrap =3D echo "\#include " > $@ + +quiet_cmd_remove =3D REMOVE $(unwanted) + cmd_remove =3D rm -f $(unwanted) + +all: $(generic-y) + $(if $(unwanted),$(call cmd,remove)) + @: + +$(obj)/%.h: + $(call cmd,wrap) + +# Create output directory. Skip it if at least one old header exists +# since we know the output directory already exists. +ifeq ($(old-headers),) +$(shell mkdir -p $(obj)) +endif + +.PHONY: $(PHONY) --=20 2.41.0 From nobody Sun May 19 03:38:12 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=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1694099812; cv=none; d=zohomail.com; s=zohoarc; b=Tlj1KQwsRSZtIZ/54Z68RkFRwFKesn28w3OulOqQr185N/QosvlTtwLhO3tIIB0lJHSzylnzJHCC/SpX8kPpsRMABRz83Cos5OxhZExMwp/8qM63Nzm+y/vn/aH/doSiweF6vyT4YaF2otfNfw6FZUXoeWgEXLF+iFvZKTtuODo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1694099812; 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=FgYSo7DZzzYqnhzSFLB9XVyVN1T4yIUqP15YWWRhIHw=; b=euN70HaaydXElUgrIp7XqeoA8RvY4P+AqVYw/IOIczRYXPCHipv0qeOra6lTmmu22fWkNelknX/vC58RRYEVu8wXEsLUvbKIKSYEYAh3claHwVwhHwK+B0uAJXls9GnZDuaBbFpJH+ZUEymnxeubbte+RT2NR4hADrqNJK/8EFA= 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 1694099812532728.0781347881997; Thu, 7 Sep 2023 08:16:52 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.597478.931724 (Exim 4.92) (envelope-from ) id 1qeGjt-0003Pd-Gp; Thu, 07 Sep 2023 15:16:13 +0000 Received: by outflank-mailman (output) from mailman id 597478.931724; Thu, 07 Sep 2023 15:16:13 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qeGjt-0003PW-Ds; Thu, 07 Sep 2023 15:16:13 +0000 Received: by outflank-mailman (input) for mailman id 597478; Thu, 07 Sep 2023 15:16:11 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qeGjr-0003AI-Dq for xen-devel@lists.xenproject.org; Thu, 07 Sep 2023 15:16:11 +0000 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [2a00:1450:4864:20::231]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 79c58c85-4d91-11ee-8783-cb3800f73035; Thu, 07 Sep 2023 17:16:10 +0200 (CEST) Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2bccda76fb1so19336211fa.2 for ; Thu, 07 Sep 2023 08:16:10 -0700 (PDT) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id x2-20020a2e8802000000b002bbacc6c523sm3944055ljh.49.2023.09.07.08.16.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 08:16:08 -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: 79c58c85-4d91-11ee-8783-cb3800f73035 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694099770; x=1694704570; 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=FgYSo7DZzzYqnhzSFLB9XVyVN1T4yIUqP15YWWRhIHw=; b=JimElWEuHtwtmxWix7nhE9Gs2TZHF75bluJRUrHAJxE1i5Oss4SNi4hq3ObLruRSmE CJ91mY53Z+Hm2Xuux6IgmAGkw+zrqzt/KkksF2fsThig4c3Hs/3yQoBO9exsnaDeQgQA oilNJc6NbHBHh77My1Gbte1SevZ9jDvcGyENpWC3rgqdIqrfXq0zDa8tU+BQ0sLCx79+ aLkWsG/Y0Q+V1pDNtOfwnDTB6guogvOw2AI1vKHndfhMd4bHkpiEMNfKc7cHz16f2L2Q cfHQBY96Tn7kMeGY0MVVbYBsU4HAFLak1kaUsufqVQ+ApRCQLn7ngnHBSZYLoyOn9rcV C2wQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694099770; x=1694704570; 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=FgYSo7DZzzYqnhzSFLB9XVyVN1T4yIUqP15YWWRhIHw=; b=HjDVUwxvAwW8QcACB6O+5B7HGmAmI98MSXt93m4xNUOBPPRhuYYnQ3OvVkv/CzNAiG B9qkQpXNtnRCd7QaK93nDPkGLe3IghOlnDeJPKznmRkfwVH0r42wh41homi2tJ3WI72t fhQjJk+RFeUyxQBTLyb9miCa9PyiMn4VMPEoZ7j53sW9hPe3QKwslyPjTZR4mXmj93co lCs+EOeP7fAEbFk4XYbBpS1CbQR3LUUPFdjFZITdpmQZ/rWF1Bc+0+wqNyaFOE66kVPl BD5lC9Ltvk4wwkr0m9YDIGZPJwmiARRYYvq32D4XLvYQ/awti2U8eotHzJluxwkAPYgI faQA== X-Gm-Message-State: AOJu0Yy9tXiW1/1KS8TRzuh72iP+qkj+4bKwkpbN11c8Rc4ZfRqky6Ql Uy8G9rGGMbsaENiDkzx2+iwKQT3wJxU= X-Google-Smtp-Source: AGHT+IELS9ppTUSojnzqfwGXeBPnrBczNmjv4sIpk7AK2gNYRokiax/g9aSarzN+KASVnSpX23TTCQ== X-Received: by 2002:a2e:9b04:0:b0:2b5:7f93:b3b0 with SMTP id u4-20020a2e9b04000000b002b57f93b3b0mr4765080lji.17.1694099769663; Thu, 07 Sep 2023 08:16:09 -0700 (PDT) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Anthony PERARD , Tamas K Lengyel , Oleksii Kurochko , Stefano Stabellini , Julien Grall , Bertrand Marquis , Volodymyr Babchuk , Andrew Cooper , George Dunlap , Jan Beulich , Wei Liu Subject: [PATCH v7 2/2] xen: move arm/include/asm/vm_event.h to asm-generic Date: Thu, 7 Sep 2023 18:16:00 +0300 Message-ID: <5ff2d32ddd56f98a9c4a28c600457d6df022f755.1694097564.git.oleksii.kurochko@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1694099814775100001 Content-Type: text/plain; charset="utf-8" asm/vm_event.h is common for ARM and RISC-V so it will be moved to asm-generic dir. Original asm/vm_event.h from ARM was updated: * use SPDX-License-Identifier. * update comment messages of stubs. * update #ifdef * instead of "include " -> "public/vm_event.h" As vm_event.h was moved to asm-generic then it is needed to create Makefile in arm/include/asm/ and add generated-y +=3D vm_event.h to it. Signed-off-by: Oleksii Kurochko Acked-by: Tamas K Lengyel --- Changes in V7: - update guards in asm-generic/vm_event.h. - add Acked-by: Tamas K Lengyel --- Changes in V6: - update the commit message. --- Changes in V5: - Update the commit message - Remove Acked-by:... - Switch ARM to use asm-generic/vm_event.h --- Changes in V4: - update path of vm_event.h from include/asm-generic/asm to include/asm-ge= neric --- Changes in V3: - add Acked-by: Stefano Stabellini for "xen: move= arm/include/asm/vm_event.h to asm-generic" - update SPDX tag. - move asm/vm_event.h to asm-generic. --- Changes in V2: - change public/domctl.h to public/vm_event.h. - update commit message of [PATCH v2 2/2] xen: move arm/include/asm/vm_eve= nt.h to stubs --- xen/arch/arm/include/asm/Makefile | 2 + xen/arch/arm/include/asm/vm_event.h | 66 ----------------------------- xen/include/asm-generic/vm_event.h | 55 ++++++++++++++++++++++++ 3 files changed, 57 insertions(+), 66 deletions(-) create mode 100644 xen/arch/arm/include/asm/Makefile delete mode 100644 xen/arch/arm/include/asm/vm_event.h create mode 100644 xen/include/asm-generic/vm_event.h diff --git a/xen/arch/arm/include/asm/Makefile b/xen/arch/arm/include/asm/M= akefile new file mode 100644 index 0000000000..821addb0bf --- /dev/null +++ b/xen/arch/arm/include/asm/Makefile @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0-only +generic-y +=3D vm_event.h diff --git a/xen/arch/arm/include/asm/vm_event.h b/xen/arch/arm/include/asm= /vm_event.h deleted file mode 100644 index 4d861373b3..0000000000 --- a/xen/arch/arm/include/asm/vm_event.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * vm_event.h: architecture specific vm_event handling routines - * - * Copyright (c) 2015 Tamas K Lengyel (tamas@tklengyel.com) - * - * 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 . - */ - -#ifndef __ASM_ARM_VM_EVENT_H__ -#define __ASM_ARM_VM_EVENT_H__ - -#include -#include - -static inline int vm_event_init_domain(struct domain *d) -{ - /* Nothing to do. */ - return 0; -} - -static inline void vm_event_cleanup_domain(struct domain *d) -{ - memset(&d->monitor, 0, sizeof(d->monitor)); -} - -static inline void vm_event_toggle_singlestep(struct domain *d, struct vcp= u *v, - vm_event_response_t *rsp) -{ - /* Not supported on ARM. */ -} - -static inline -void vm_event_register_write_resume(struct vcpu *v, vm_event_response_t *r= sp) -{ - /* Not supported on ARM. */ -} - -static inline -void vm_event_emulate_check(struct vcpu *v, vm_event_response_t *rsp) -{ - /* Not supported on ARM. */ -} - -static inline -void vm_event_sync_event(struct vcpu *v, bool value) -{ - /* Not supported on ARM. */ -} - -static inline -void vm_event_reset_vmtrace(struct vcpu *v) -{ - /* Not supported on ARM. */ -} - -#endif /* __ASM_ARM_VM_EVENT_H__ */ diff --git a/xen/include/asm-generic/vm_event.h b/xen/include/asm-generic/v= m_event.h new file mode 100644 index 0000000000..620c7b971c --- /dev/null +++ b/xen/include/asm-generic/vm_event.h @@ -0,0 +1,55 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * vm_event.h: stubs for architecture specific vm_event handling routines + * + * Copyright (c) 2015 Tamas K Lengyel (tamas@tklengyel.com) + */ + +#ifndef __ASM_GENERIC_VM_EVENT_H__ +#define __ASM_GENERIC_VM_EVENT_H__ + +#include +#include + +static inline int vm_event_init_domain(struct domain *d) +{ + /* Nothing to do. */ + return 0; +} + +static inline void vm_event_cleanup_domain(struct domain *d) +{ + memset(&d->monitor, 0, sizeof(d->monitor)); +} + +static inline void vm_event_toggle_singlestep(struct domain *d, struct vcp= u *v, + vm_event_response_t *rsp) +{ + /* Nothing to do. */ +} + +static inline +void vm_event_register_write_resume(struct vcpu *v, vm_event_response_t *r= sp) +{ + /* Nothing to do. */ +} + +static inline +void vm_event_emulate_check(struct vcpu *v, vm_event_response_t *rsp) +{ + /* Nothing to do. */ +} + +static inline +void vm_event_sync_event(struct vcpu *v, bool value) +{ + /* Nothing to do. */ +} + +static inline +void vm_event_reset_vmtrace(struct vcpu *v) +{ + /* Nothing to do. */ +} + +#endif /* __ASM_GENERIC_VM_EVENT_H__ */ --=20 2.41.0