[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v5 00/10] xsm: refactoring xsm hooks

  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Date: Thu, 9 Sep 2021 22:12:25 -0400
  • Arc-authentication-results: i=1; mx.zohomail.com; dkim=pass header.i=apertussolutions.com; spf=pass smtp.mailfrom=dpsmith@xxxxxxxxxxxxxxxxxxxx; dmarc=pass header.from=<dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1631225548; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Subject:To; bh=jfgI+YuhgZ+q3DewpTocAmdfPzKAzfGL5vsDIKUFnGE=; b=g+gl71bTI1pHUlGZo3cpLKKKzIej8hq/+O0x7LSU06s91kDKN9nU0/oEV7vO5fyapmQyzDMvnO/UIS6av8gJJP4I3NrzmN+WoK1lpuRfB6QHjAG+FJuFoXt7h66qZohDNIuGNF6XkEP08jX0f7umgyP5n3dh/Wo97yjbJ1uVQfc=
  • Arc-seal: i=1; a=rsa-sha256; t=1631225548; cv=none; d=zohomail.com; s=zohoarc; b=Tlnm4EJ05rZzsP9cknZFvs/tffNhjJyL2Ja6MkLClKvXZNffMYaZkALdOXFCu7vRamvzBGq9p3sklT7BXfgbYnoLLtJ+sv5752kLFzSXW4Ad91IgACwN/tZuZvCrPv2CMFBskkaRsb4JYOfe+EAiVjvxvwIlC9fr1kSVUuBkWko=
  • Cc: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 09 Sep 2021 22:12:44 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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 simplify the
unnecessarily complicated header inclusions, remove the facad of being able to
enable/disable XSM, and simplify the XSM hooks down to a single interface and
implementation. The remainder of the changes are clean up and removing no
longer necessary abstractions.

 - restructured the patches, breaking them up as needed
 - incorporate Andrew Cooper's alternative call common code
 - change XSM module registration, removing register_xsm
 - incoporate KConfig recommendations
 - reworded commit messages
 - incorporate macro expansion recommendations
 - misc clean-up fallout from recommendations

 - renamed struct xsm_operations to struct xsm_ops
 - flask and silo ops structs made __initconst
 - fixed misplacement of __init on flask/silo_init
 - lots of coding style alignment
 - further clean up from FLASK_DISABLE removal
 - addressed commit message comments
 - removed missed guard around alternative-call include
- reworked approach to XSM hooks, merging the two interfaces instead of
   dropping one

- make __alt_call_maybe_initdata resolve to __read_mostly when
- removed the masking of void with xsm_op_t
- moved all the coding style conformity to an early commit
- fixed declaration on real and stub declarations in xsm.h
- corrected to __initconstrel
- made the xsm_ops global __read_mostly
- adjusted blank lines in xsm_ops struct to provide consistent grouping
- moved extern references to built in policy to where they are used
- Added back in the #ifdef CONFIG_XSM into struct evtchn
- split the patch removing the duplicate interface up further

- changed 80 col wrapping style to preferred style
- a few additional code style cleanups caught in v4 review
- made xsm_ops_registered __initdata
- pulled duplicate if out of switch cases in xsm_core_init()
- dropped struct evtchn commit
- dropped silo hooks direct calls to xsm_default_action

Andrew Cooper (1):
  xen: Implement xen/alternative-call.h for use in common code

Daniel P. Smith (9):
  xsm: remove the ability to disable flask
  xsm: remove remnants of xsm_memtype hook
  xsm: drop dubious xsm_op_t type
  xsm: apply coding style
  xsm: refactor xsm_ops handling
  xsm: convert xsm_ops hook calls to alternative call
  xsm: decouple xsm header inclusion selection
  kconfig: update xsm config to reflect reality
  xsm: remove alternate xsm hook interface

 xen/arch/x86/Kconfig               |   1 +
 xen/common/Kconfig                 |  52 +-
 xen/include/public/xsm/flask_op.h  |   2 +-
 xen/include/xen/alternative-call.h |  63 +++
 xen/include/xen/hypercall.h        |   4 +-
 xen/include/xen/sched.h            |   2 +-
 xen/include/xsm/dummy.h            | 774 ---------------------------
 xen/include/xsm/xsm-core.h         | 266 ++++++++++
 xen/include/xsm/xsm.h              | 806 +++++++++++++----------------
 xen/xsm/Makefile                   |   4 +-
 xen/xsm/dummy.c                    |   7 +-
 xen/xsm/dummy.h                    | 659 +++++++++++++++++++++++
 xen/xsm/flask/flask_op.c           |  32 +-
 xen/xsm/flask/hooks.c              |  16 +-
 xen/xsm/silo.c                     |  11 +-
 xen/xsm/xsm_core.c                 |  93 ++--
 xen/xsm/xsm_policy.c               |   7 +-
 17 files changed, 1436 insertions(+), 1363 deletions(-)
 create mode 100644 xen/include/xen/alternative-call.h
 delete mode 100644 xen/include/xsm/dummy.h
 create mode 100644 xen/include/xsm/xsm-core.h
 create mode 100644 xen/xsm/dummy.h




Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.