From patchwork Thu Jun 17 23:39:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Daniel P. Smith" X-Patchwork-Id: 12329739 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91E58C2B9F4 for ; Thu, 17 Jun 2021 23:30:03 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2EA3E6113E for ; Thu, 17 Jun 2021 23:30:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2EA3E6113E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=apertussolutions.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.144191.265453 (Exim 4.92) (envelope-from ) id 1lu1SE-0000O1-V0; Thu, 17 Jun 2021 23:29:46 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 144191.265453; Thu, 17 Jun 2021 23:29:46 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lu1SE-0000Nu-Rx; Thu, 17 Jun 2021 23:29:46 +0000 Received: by outflank-mailman (input) for mailman id 144191; Thu, 17 Jun 2021 23:29:46 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lu1SD-0000No-R9 for xen-devel@lists.xenproject.org; Thu, 17 Jun 2021 23:29:46 +0000 Received: from sender4-of-o51.zoho.com (unknown [136.143.188.51]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id b2d330fa-39ab-43a1-afab-57eefe836421; Thu, 17 Jun 2021 23:29:44 +0000 (UTC) Received: from sisyou.hme. (static-72-81-132-2.bltmmd.fios.verizon.net [72.81.132.2]) by mx.zohomail.com with SMTPS id 1623972570136919.7959647662097; Thu, 17 Jun 2021 16:29:30 -0700 (PDT) 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: b2d330fa-39ab-43a1-afab-57eefe836421 ARC-Seal: i=1; a=rsa-sha256; t=1623972571; cv=none; d=zohomail.com; s=zohoarc; b=QxO0GJY8DRCnDkKxZKYV7xJanLe7P/YBWo4PsycDOYi9kaed3Nsslnz85pNZdTc65lkqTWR321yVRhVugz6T5XDQr8aqoMNS7knmS5wp+0kKonajeIj+YigRMdZl1DHeyFYMOkzmrj2NT+oJHUl788WqPlQAQ+b31ky5NydyyTA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623972571; h=Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Subject:To; bh=WxFwJbkeLx48JJcKKFj8bqNXb8kx5EkWM6kLDvPg1uw=; b=IxDhegwUJgYTV3yqwUkRcu/lKbb75RGd7sHrI0t16hkkX1MXt0ZVdqShVRNpjE2CAHLGGbHO0P9LREYoGOw6UOlo1rfMQJv8o6642GZQr8NmnmHTyHOT71O09pGulmURMWqi2/nXrH4MijYQEi5p12cyWZJ60Mvc6TOjNNR0vSU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=apertussolutions.com; spf=pass smtp.mailfrom=dpsmith@apertussolutions.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1623972571; s=zoho; d=apertussolutions.com; i=dpsmith@apertussolutions.com; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Transfer-Encoding; bh=WxFwJbkeLx48JJcKKFj8bqNXb8kx5EkWM6kLDvPg1uw=; b=LeorGAiZqHjv35c7Kl0p23czVYlFvW9FPu1NjweNlyibyNWCHQ2AbNfhb0lBMo6M NbUrVWLT6ngvSrlOC5iLDZ93FNwil0Vq7kGpG0jSrRAjN/SFhF8x04M/KZ6jTsigNi7 9oDFCccVu7HS6XpfzXC31XwQiHLFCTtnUYWJ6rbo= From: "Daniel P. Smith" To: xen-devel@lists.xenproject.org Cc: Stefano Stabellini , Julien Grall , Volodymyr Babchuk , Andrew Cooper , George Dunlap , Ian Jackson , Jan Beulich , Wei Liu , =?utf-8?q?Roger_Pau_?= =?utf-8?q?Monn=C3=A9?= , Tamas K Lengyel , Tim Deegan , Juergen Gross , Alexandru Isaila , Petre Pircalabu , Dario Faggioli , Paul Durrant , Daniel De Graaf , persaur@gmail.com, christopher.w.clark@gmail.com, adam.schwalm@starlab.io, scott.davis@starlab.io Subject: [PATCH 0/6] xsm: refactoring xsm hooks Date: Thu, 17 Jun 2021 19:39:12 -0400 Message-Id: <20210617233918.10095-1-dpsmith@apertussolutions.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-ZohoMailClient: External Based on feedback from 2021 Xen Developers Summit the xsm-roles RFC patch set is being split into two separate patch sets. This is the first patch set and is focused purely on the clean up and refactoring of the XSM hooks. This patch set refactors the xsm_ops wrapper hooks to use the alternative_call infrastructure. Then proceeds to move and realign the headers to remove the psuedo is/is not enable implementation. The remainder of the changes are clean up and removing no longer necessary abstractions. Daniel P. Smith (6): xsm: refactor xsm_ops handling xsm: decouple xsm header inclusion selection xsm: enabling xsm to always be included xsm: remove xen_defualt_t from hook definitions xsm: expanding function related macros in dummy.h xsm: removing the XSM_ASSERT_ACTION macro xen/arch/arm/dm.c | 2 +- xen/arch/arm/domctl.c | 6 +- xen/arch/arm/hvm.c | 2 +- xen/arch/arm/mm.c | 2 +- xen/arch/arm/platform_hypercall.c | 2 +- xen/arch/x86/cpu/mcheck/mce.c | 2 +- xen/arch/x86/cpu/vpmu.c | 2 +- xen/arch/x86/domctl.c | 8 +- xen/arch/x86/hvm/dm.c | 2 +- xen/arch/x86/hvm/hvm.c | 12 +- xen/arch/x86/irq.c | 5 +- xen/arch/x86/mm.c | 20 +- xen/arch/x86/mm/mem_paging.c | 2 +- xen/arch/x86/mm/mem_sharing.c | 9 +- xen/arch/x86/mm/p2m.c | 2 +- xen/arch/x86/mm/paging.c | 4 +- xen/arch/x86/mm/shadow/set.c | 2 +- xen/arch/x86/msi.c | 3 +- xen/arch/x86/pci.c | 2 +- xen/arch/x86/physdev.c | 17 +- xen/arch/x86/platform_hypercall.c | 10 +- xen/arch/x86/pv/emul-priv-op.c | 2 +- xen/arch/x86/sysctl.c | 4 +- xen/common/Kconfig | 55 +- xen/common/domain.c | 4 +- xen/common/domctl.c | 12 +- xen/common/event_channel.c | 12 +- xen/common/grant_table.c | 16 +- xen/common/hypfs.c | 2 +- xen/common/kernel.c | 2 +- xen/common/kexec.c | 2 +- xen/common/mem_access.c | 2 +- xen/common/memory.c | 16 +- xen/common/monitor.c | 2 +- xen/common/sched/core.c | 6 +- xen/common/sysctl.c | 8 +- xen/common/vm_event.c | 2 +- xen/common/xenoprof.c | 2 +- xen/drivers/char/console.c | 2 +- xen/drivers/passthrough/device_tree.c | 4 +- xen/drivers/passthrough/pci.c | 12 +- xen/include/xen/sched.h | 2 +- xen/include/xsm/dummy.h | 774 -------------------------- xen/include/xsm/xsm-core.h | 236 ++++++++ xen/include/xsm/xsm.h | 626 +++++++-------------- xen/xsm/Makefile | 4 +- xen/xsm/dummy.c | 7 +- xen/xsm/dummy.h | 697 +++++++++++++++++++++++ xen/xsm/flask/flask_op.c | 21 +- xen/xsm/silo.c | 18 +- xen/xsm/xsm_core.c | 54 +- 51 files changed, 1309 insertions(+), 1413 deletions(-) delete mode 100644 xen/include/xsm/dummy.h create mode 100644 xen/include/xsm/xsm-core.h create mode 100644 xen/xsm/dummy.h