All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: linux-arm-kernel@lists.infradead.org,
	kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: will@kernel.org, qperret@google.com, dbrazdil@google.com,
	Steven Price <steven.price@arm.com>,
	Andrew Jones <drjones@redhat.com>, Fuad Tabba <tabba@google.com>,
	Srivatsa Vaddagiri <vatsa@codeaurora.org>,
	Shanker R Donthineni <sdonthineni@nvidia.com>,
	James Morse <james.morse@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Alexandru Elisei <alexandru.elisei@arm.com>,
	kernel-team@android.com
Subject: [PATCH v2 00/16]  KVM: arm64: MMIO guard PV services
Date: Mon,  4 Oct 2021 18:48:33 +0100	[thread overview]
Message-ID: <20211004174849.2831548-1-maz@kernel.org> (raw)

This is the second version of this series initially posted at [1] that
aims at letting a guest express what it considers as MMIO, and only
let this through to userspace. Together with the guest memory made
(mostly) inaccessible to the host kernel and userspace, this allows an
implementation of a hardened IO subsystem.

A lot has been fixed/revamped/improved since the initial posting,
although I am still not pleased with the ioremap plugging on the guest
side. I'll take any idea to get rid of it!

The series is based on 5.15-rc3.

[1] https://lore.kernel.org/kvmarm/20210715163159.1480168-1-maz@kernel.org

Marc Zyngier (16):
  KVM: arm64: Generalise VM features into a set of flags
  KVM: arm64: Check for PTE valitity when checking for
    executable/cacheable
  KVM: arm64: Turn kvm_pgtable_stage2_set_owner into
    kvm_pgtable_stage2_annotate
  KVM: arm64: Add MMIO checking infrastructure
  KVM: arm64: Plumb MMIO checking into the fault handling
  KVM: arm64: Force a full unmap on vpcu reinit
  KVM: arm64: Wire MMIO guard hypercalls
  KVM: arm64: Add tracepoint for failed MMIO guard check
  KVM: arm64: Advertise a capability for MMIO guard
  KVM: arm64: Add some documentation for the MMIO guard feature
  firmware/smccc: Call arch-specific hook on discovering KVM services
  mm/vmalloc: Add arch-specific callbacks to track io{remap,unmap}
    physical pages
  arm64: Implement ioremap/iounmap hooks calling into KVM's MMIO guard
  arm64: Enroll into KVM's MMIO guard if required
  arm64: Add a helper to retrieve the PTE of a fixmap
  arm64: Register earlycon fixmap with the MMIO guard

 .../admin-guide/kernel-parameters.txt         |   3 +
 Documentation/virt/kvm/arm/index.rst          |   1 +
 Documentation/virt/kvm/arm/mmio-guard.rst     |  74 ++++++++
 arch/arm/include/asm/hypervisor.h             |   1 +
 arch/arm64/Kconfig                            |   1 +
 arch/arm64/include/asm/fixmap.h               |   2 +
 arch/arm64/include/asm/hypervisor.h           |   2 +
 arch/arm64/include/asm/kvm_host.h             |  14 +-
 arch/arm64/include/asm/kvm_mmu.h              |   5 +
 arch/arm64/include/asm/kvm_pgtable.h          |  12 +-
 arch/arm64/kernel/setup.c                     |   6 +
 arch/arm64/kvm/arm.c                          |  30 ++--
 arch/arm64/kvm/hyp/include/nvhe/mem_protect.h |   2 +-
 arch/arm64/kvm/hyp/nvhe/mem_protect.c         |  11 +-
 arch/arm64/kvm/hyp/nvhe/setup.c               |  10 +-
 arch/arm64/kvm/hyp/pgtable.c                  |  29 ++--
 arch/arm64/kvm/hypercalls.c                   |  38 ++++
 arch/arm64/kvm/mmio.c                         |  20 ++-
 arch/arm64/kvm/mmu.c                          | 111 ++++++++++++
 arch/arm64/kvm/psci.c                         |   8 +
 arch/arm64/kvm/trace_arm.h                    |  17 ++
 arch/arm64/mm/ioremap.c                       | 162 ++++++++++++++++++
 arch/arm64/mm/mmu.c                           |  15 ++
 drivers/firmware/smccc/kvm_guest.c            |   4 +
 include/linux/arm-smccc.h                     |  28 +++
 include/linux/io.h                            |   2 +
 include/uapi/linux/kvm.h                      |   1 +
 mm/Kconfig                                    |   5 +
 mm/vmalloc.c                                  |  12 +-
 29 files changed, 575 insertions(+), 51 deletions(-)
 create mode 100644 Documentation/virt/kvm/arm/mmio-guard.rst

-- 
2.30.2


WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: linux-arm-kernel@lists.infradead.org,
	kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: kernel-team@android.com,
	Srivatsa Vaddagiri <vatsa@codeaurora.org>,
	Steven Price <steven.price@arm.com>,
	Shanker R Donthineni <sdonthineni@nvidia.com>,
	will@kernel.org
Subject: [PATCH v2 00/16]  KVM: arm64: MMIO guard PV services
Date: Mon,  4 Oct 2021 18:48:33 +0100	[thread overview]
Message-ID: <20211004174849.2831548-1-maz@kernel.org> (raw)

This is the second version of this series initially posted at [1] that
aims at letting a guest express what it considers as MMIO, and only
let this through to userspace. Together with the guest memory made
(mostly) inaccessible to the host kernel and userspace, this allows an
implementation of a hardened IO subsystem.

A lot has been fixed/revamped/improved since the initial posting,
although I am still not pleased with the ioremap plugging on the guest
side. I'll take any idea to get rid of it!

The series is based on 5.15-rc3.

[1] https://lore.kernel.org/kvmarm/20210715163159.1480168-1-maz@kernel.org

Marc Zyngier (16):
  KVM: arm64: Generalise VM features into a set of flags
  KVM: arm64: Check for PTE valitity when checking for
    executable/cacheable
  KVM: arm64: Turn kvm_pgtable_stage2_set_owner into
    kvm_pgtable_stage2_annotate
  KVM: arm64: Add MMIO checking infrastructure
  KVM: arm64: Plumb MMIO checking into the fault handling
  KVM: arm64: Force a full unmap on vpcu reinit
  KVM: arm64: Wire MMIO guard hypercalls
  KVM: arm64: Add tracepoint for failed MMIO guard check
  KVM: arm64: Advertise a capability for MMIO guard
  KVM: arm64: Add some documentation for the MMIO guard feature
  firmware/smccc: Call arch-specific hook on discovering KVM services
  mm/vmalloc: Add arch-specific callbacks to track io{remap,unmap}
    physical pages
  arm64: Implement ioremap/iounmap hooks calling into KVM's MMIO guard
  arm64: Enroll into KVM's MMIO guard if required
  arm64: Add a helper to retrieve the PTE of a fixmap
  arm64: Register earlycon fixmap with the MMIO guard

 .../admin-guide/kernel-parameters.txt         |   3 +
 Documentation/virt/kvm/arm/index.rst          |   1 +
 Documentation/virt/kvm/arm/mmio-guard.rst     |  74 ++++++++
 arch/arm/include/asm/hypervisor.h             |   1 +
 arch/arm64/Kconfig                            |   1 +
 arch/arm64/include/asm/fixmap.h               |   2 +
 arch/arm64/include/asm/hypervisor.h           |   2 +
 arch/arm64/include/asm/kvm_host.h             |  14 +-
 arch/arm64/include/asm/kvm_mmu.h              |   5 +
 arch/arm64/include/asm/kvm_pgtable.h          |  12 +-
 arch/arm64/kernel/setup.c                     |   6 +
 arch/arm64/kvm/arm.c                          |  30 ++--
 arch/arm64/kvm/hyp/include/nvhe/mem_protect.h |   2 +-
 arch/arm64/kvm/hyp/nvhe/mem_protect.c         |  11 +-
 arch/arm64/kvm/hyp/nvhe/setup.c               |  10 +-
 arch/arm64/kvm/hyp/pgtable.c                  |  29 ++--
 arch/arm64/kvm/hypercalls.c                   |  38 ++++
 arch/arm64/kvm/mmio.c                         |  20 ++-
 arch/arm64/kvm/mmu.c                          | 111 ++++++++++++
 arch/arm64/kvm/psci.c                         |   8 +
 arch/arm64/kvm/trace_arm.h                    |  17 ++
 arch/arm64/mm/ioremap.c                       | 162 ++++++++++++++++++
 arch/arm64/mm/mmu.c                           |  15 ++
 drivers/firmware/smccc/kvm_guest.c            |   4 +
 include/linux/arm-smccc.h                     |  28 +++
 include/linux/io.h                            |   2 +
 include/uapi/linux/kvm.h                      |   1 +
 mm/Kconfig                                    |   5 +
 mm/vmalloc.c                                  |  12 +-
 29 files changed, 575 insertions(+), 51 deletions(-)
 create mode 100644 Documentation/virt/kvm/arm/mmio-guard.rst

-- 
2.30.2

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: linux-arm-kernel@lists.infradead.org,
	kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: will@kernel.org, qperret@google.com, dbrazdil@google.com,
	Steven Price <steven.price@arm.com>,
	Andrew Jones <drjones@redhat.com>, Fuad Tabba <tabba@google.com>,
	Srivatsa Vaddagiri <vatsa@codeaurora.org>,
	Shanker R Donthineni <sdonthineni@nvidia.com>,
	James Morse <james.morse@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Alexandru Elisei <alexandru.elisei@arm.com>,
	kernel-team@android.com
Subject: [PATCH v2 00/16]  KVM: arm64: MMIO guard PV services
Date: Mon,  4 Oct 2021 18:48:33 +0100	[thread overview]
Message-ID: <20211004174849.2831548-1-maz@kernel.org> (raw)

This is the second version of this series initially posted at [1] that
aims at letting a guest express what it considers as MMIO, and only
let this through to userspace. Together with the guest memory made
(mostly) inaccessible to the host kernel and userspace, this allows an
implementation of a hardened IO subsystem.

A lot has been fixed/revamped/improved since the initial posting,
although I am still not pleased with the ioremap plugging on the guest
side. I'll take any idea to get rid of it!

The series is based on 5.15-rc3.

[1] https://lore.kernel.org/kvmarm/20210715163159.1480168-1-maz@kernel.org

Marc Zyngier (16):
  KVM: arm64: Generalise VM features into a set of flags
  KVM: arm64: Check for PTE valitity when checking for
    executable/cacheable
  KVM: arm64: Turn kvm_pgtable_stage2_set_owner into
    kvm_pgtable_stage2_annotate
  KVM: arm64: Add MMIO checking infrastructure
  KVM: arm64: Plumb MMIO checking into the fault handling
  KVM: arm64: Force a full unmap on vpcu reinit
  KVM: arm64: Wire MMIO guard hypercalls
  KVM: arm64: Add tracepoint for failed MMIO guard check
  KVM: arm64: Advertise a capability for MMIO guard
  KVM: arm64: Add some documentation for the MMIO guard feature
  firmware/smccc: Call arch-specific hook on discovering KVM services
  mm/vmalloc: Add arch-specific callbacks to track io{remap,unmap}
    physical pages
  arm64: Implement ioremap/iounmap hooks calling into KVM's MMIO guard
  arm64: Enroll into KVM's MMIO guard if required
  arm64: Add a helper to retrieve the PTE of a fixmap
  arm64: Register earlycon fixmap with the MMIO guard

 .../admin-guide/kernel-parameters.txt         |   3 +
 Documentation/virt/kvm/arm/index.rst          |   1 +
 Documentation/virt/kvm/arm/mmio-guard.rst     |  74 ++++++++
 arch/arm/include/asm/hypervisor.h             |   1 +
 arch/arm64/Kconfig                            |   1 +
 arch/arm64/include/asm/fixmap.h               |   2 +
 arch/arm64/include/asm/hypervisor.h           |   2 +
 arch/arm64/include/asm/kvm_host.h             |  14 +-
 arch/arm64/include/asm/kvm_mmu.h              |   5 +
 arch/arm64/include/asm/kvm_pgtable.h          |  12 +-
 arch/arm64/kernel/setup.c                     |   6 +
 arch/arm64/kvm/arm.c                          |  30 ++--
 arch/arm64/kvm/hyp/include/nvhe/mem_protect.h |   2 +-
 arch/arm64/kvm/hyp/nvhe/mem_protect.c         |  11 +-
 arch/arm64/kvm/hyp/nvhe/setup.c               |  10 +-
 arch/arm64/kvm/hyp/pgtable.c                  |  29 ++--
 arch/arm64/kvm/hypercalls.c                   |  38 ++++
 arch/arm64/kvm/mmio.c                         |  20 ++-
 arch/arm64/kvm/mmu.c                          | 111 ++++++++++++
 arch/arm64/kvm/psci.c                         |   8 +
 arch/arm64/kvm/trace_arm.h                    |  17 ++
 arch/arm64/mm/ioremap.c                       | 162 ++++++++++++++++++
 arch/arm64/mm/mmu.c                           |  15 ++
 drivers/firmware/smccc/kvm_guest.c            |   4 +
 include/linux/arm-smccc.h                     |  28 +++
 include/linux/io.h                            |   2 +
 include/uapi/linux/kvm.h                      |   1 +
 mm/Kconfig                                    |   5 +
 mm/vmalloc.c                                  |  12 +-
 29 files changed, 575 insertions(+), 51 deletions(-)
 create mode 100644 Documentation/virt/kvm/arm/mmio-guard.rst

-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2021-10-04 17:49 UTC|newest]

Thread overview: 87+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-04 17:48 Marc Zyngier [this message]
2021-10-04 17:48 ` [PATCH v2 00/16] KVM: arm64: MMIO guard PV services Marc Zyngier
2021-10-04 17:48 ` Marc Zyngier
2021-10-04 17:48 ` [PATCH v2 01/16] KVM: arm64: Generalise VM features into a set of flags Marc Zyngier
2021-10-04 17:48   ` Marc Zyngier
2021-10-04 17:48   ` Marc Zyngier
2021-10-06 10:24   ` Andrew Jones
2021-10-06 10:24     ` Andrew Jones
2021-10-06 10:24     ` Andrew Jones
2021-10-04 17:48 ` [PATCH v2 02/16] KVM: arm64: Check for PTE valitity when checking for executable/cacheable Marc Zyngier
2021-10-04 17:48   ` Marc Zyngier
2021-10-04 17:48   ` Marc Zyngier
2021-10-06 10:41   ` Andrew Jones
2021-10-06 10:41     ` Andrew Jones
2021-10-06 10:41     ` Andrew Jones
2021-10-04 17:48 ` [PATCH v2 03/16] KVM: arm64: Turn kvm_pgtable_stage2_set_owner into kvm_pgtable_stage2_annotate Marc Zyngier
2021-10-04 17:48   ` Marc Zyngier
2021-10-04 17:48   ` Marc Zyngier
2021-10-06 11:02   ` Andrew Jones
2021-10-06 11:02     ` Andrew Jones
2021-10-06 11:02     ` Andrew Jones
2021-10-06 11:22     ` Andrew Jones
2021-10-06 11:22       ` Andrew Jones
2021-10-06 11:22       ` Andrew Jones
2021-10-04 17:48 ` [PATCH v2 04/16] KVM: arm64: Add MMIO checking infrastructure Marc Zyngier
2021-10-04 17:48   ` Marc Zyngier
2021-10-04 17:48   ` Marc Zyngier
2021-10-06 11:37   ` Andrew Jones
2021-10-06 11:37     ` Andrew Jones
2021-10-06 11:37     ` Andrew Jones
2021-10-04 17:48 ` [PATCH v2 05/16] KVM: arm64: Plumb MMIO checking into the fault handling Marc Zyngier
2021-10-04 17:48   ` Marc Zyngier
2021-10-04 17:48   ` Marc Zyngier
2021-10-04 17:48 ` [PATCH v2 06/16] KVM: arm64: Force a full unmap on vpcu reinit Marc Zyngier
2021-10-04 17:48   ` Marc Zyngier
2021-10-04 17:48   ` Marc Zyngier
2021-10-07 13:49   ` Andrew Jones
2021-10-07 13:49     ` Andrew Jones
2021-10-07 13:49     ` Andrew Jones
2021-10-04 17:48 ` [PATCH v2 07/16] KVM: arm64: Wire MMIO guard hypercalls Marc Zyngier
2021-10-04 17:48   ` Marc Zyngier
2021-10-04 17:48   ` Marc Zyngier
2021-10-07 13:53   ` Andrew Jones
2021-10-07 13:53     ` Andrew Jones
2021-10-07 13:53     ` Andrew Jones
2021-10-04 17:48 ` [PATCH v2 08/16] KVM: arm64: Add tracepoint for failed MMIO guard check Marc Zyngier
2021-10-04 17:48   ` Marc Zyngier
2021-10-04 17:48   ` Marc Zyngier
2021-10-04 17:48 ` [PATCH v2 09/16] KVM: arm64: Advertise a capability for MMIO guard Marc Zyngier
2021-10-04 17:48   ` Marc Zyngier
2021-10-04 17:48   ` Marc Zyngier
2021-10-07 14:22   ` Andrew Jones
2021-10-07 14:22     ` Andrew Jones
2021-10-07 14:22     ` Andrew Jones
2021-10-04 17:48 ` [PATCH v2 10/16] KVM: arm64: Add some documentation for the MMIO guard feature Marc Zyngier
2021-10-04 17:48   ` Marc Zyngier
2021-10-04 17:48   ` Marc Zyngier
2021-10-07 14:38   ` Andrew Jones
2021-10-07 14:38     ` Andrew Jones
2021-10-07 14:38     ` Andrew Jones
2021-10-07 14:42   ` Andrew Jones
2021-10-07 14:42     ` Andrew Jones
2021-10-07 14:42     ` Andrew Jones
2021-10-04 17:48 ` [PATCH v2 11/16] firmware/smccc: Call arch-specific hook on discovering KVM services Marc Zyngier
2021-10-04 17:48   ` Marc Zyngier
2021-10-04 17:48   ` Marc Zyngier
2021-10-04 17:48 ` [PATCH v2 12/16] mm/vmalloc: Add arch-specific callbacks to track io{remap,unmap} physical pages Marc Zyngier
2021-10-04 17:48   ` [PATCH v2 12/16] mm/vmalloc: Add arch-specific callbacks to track io{remap, unmap} " Marc Zyngier
2021-10-04 17:48   ` Marc Zyngier
2021-10-04 17:48 ` [PATCH v2 13/16] arm64: Implement ioremap/iounmap hooks calling into KVM's MMIO guard Marc Zyngier
2021-10-04 17:48   ` Marc Zyngier
2021-10-04 17:48   ` Marc Zyngier
2021-10-07 15:36   ` Andrew Jones
2021-10-07 15:36     ` Andrew Jones
2021-10-07 15:36     ` Andrew Jones
2021-10-04 17:48 ` [PATCH v2 14/16] arm64: Enroll into KVM's MMIO guard if required Marc Zyngier
2021-10-04 17:48   ` Marc Zyngier
2021-10-04 17:48   ` Marc Zyngier
2021-10-04 17:48 ` [PATCH v2 15/16] arm64: Add a helper to retrieve the PTE of a fixmap Marc Zyngier
2021-10-04 17:48   ` Marc Zyngier
2021-10-04 17:48   ` Marc Zyngier
2021-10-04 17:48 ` [PATCH v2 16/16] arm64: Register earlycon fixmap with the MMIO guard Marc Zyngier
2021-10-04 17:48   ` Marc Zyngier
2021-10-04 17:48   ` Marc Zyngier
2021-10-07 15:52 ` [PATCH v2 00/16] KVM: arm64: MMIO guard PV services Andrew Jones
2021-10-07 15:52   ` Andrew Jones
2021-10-07 15:52   ` Andrew Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211004174849.2831548-1-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=alexandru.elisei@arm.com \
    --cc=dbrazdil@google.com \
    --cc=drjones@redhat.com \
    --cc=james.morse@arm.com \
    --cc=kernel-team@android.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=qperret@google.com \
    --cc=sdonthineni@nvidia.com \
    --cc=steven.price@arm.com \
    --cc=suzuki.poulose@arm.com \
    --cc=tabba@google.com \
    --cc=vatsa@codeaurora.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.