Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
4c70298
KVM: x86: Support VM_ATTESTATION hypercall
Apr 26, 2021
0b33a71
driver/virt/coco: Add HYGON CSV Guest dirver.
BaoshunFang May 30, 2023
bebfff0
crypto: ccp: Support DOWNLOAD_FIRMWARE when detect CSV
Dec 3, 2021
384fcba
crypto: ccp: Implement CSV_PLATFORM_INIT ioctl command
Dec 3, 2021
9d9c43c
crypto: ccp: Implement CSV_PLATFORM_SHUTDOWN ioctl command
Dec 3, 2021
b4fc68d
crypto: ccp: Implement CSV_DOWNLOAD_FIRMWARE ioctl command
Dec 3, 2021
84894b5
crypto: ccp: Introduce init and free helpers to manage CSV RING_BUFFE…
BaoshunFang Jul 30, 2021
b966d02
crypto: ccp: Add support for enqueue command pointers in CSV RING_BUF…
BaoshunFang Jul 30, 2021
7fdfd6f
crypto: ccp: Add support for dequeue status in CSV RING_BUFFER mode
BaoshunFang Jul 30, 2021
e50d217
crypto: ccp: Add support to switch to CSV RING_BUFFER mode
BaoshunFang Jul 30, 2021
e2cd0a8
crypto: ccp: Add support for issue commands in CSV RING_BUFFER mode
BaoshunFang Jul 30, 2021
4fe9628
KVM: SVM: Add KVM_CSV_COMMAND_BATCH command for applying CSV RING_BUF…
BaoshunFang Jul 30, 2021
fe2c20a
KVM: SVM: Prepare memory pool to allocate buffers for KVM_CSV_COMMAND…
BaoshunFang Jul 30, 2021
58f28d6
KVM: SVM: Add SEND_UPDATE_DATA command helper to support KVM_CSV_COMM…
BaoshunFang Aug 1, 2021
5304e22
KVM: SVM: Add RECEIVE_UPDATE_DATA command helper to support KVM_CSV_C…
BaoshunFang Aug 1, 2021
eab51aa
crypto: ccp: Add a new interface for X86 sending command to PSP
chench246 Mar 15, 2024
dafccf5
crypto: ccp: Add another mailbox interrupt support for PSP sending co…
chench246 Mar 18, 2024
8dbfcfc
crypto: ccp: Fix definition of struct sev_data_send_update_vmsa
May 24, 2022
81b0b03
KVM: SVM: Add KVM_SEV_SEND_UPDATE_VMSA command
Apr 8, 2021
08fe214
KVM: SVM: Add KVM_SEV_RECEIVE_UPDATE_VMSA command
Apr 8, 2021
3e72ddc
KVM: x86: Restore control registers in __set_sregs() to support CSV2 …
Apr 7, 2021
b263d96
KVM: SVM: Export MSR_AMD64_SEV_ES_GHCB to userspace for CSV2 guest
Jun 15, 2021
43b192d
KVM: x86: Introduce control_{pre,post}_system_reset ioctl interfaces
Aug 8, 2023
1c27298
KVM: SVM: Add support for rebooting CSV2 guest
Apr 15, 2021
26b5bda
KVM: SVM: Force flush caches before reboot CSV guest
May 6, 2023
538907f
deepin_x86_desktop_defconfig: Set CONFIG_CSV_GUEST=m by default
Aug 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions Documentation/virt/coco/csv-guest.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
.. SPDX-License-Identifier: GPL-2.0

===================================================================
CSV Guest API Documentation
===================================================================

1. General description
======================

The CSV guest driver exposes IOCTL interfaces via the /dev/csv-guest misc
device to allow userspace to get certain CSV guest-specific details.

2. API description
==================

In this section, for each supported IOCTL, the following information is
provided along with a generic description.

:Input parameters: Parameters passed to the IOCTL and related details.
:Output: Details about output data and return value (with details about
the non common error values).

2.1 CSV_CMD_GET_REPORT
-----------------------

:Input parameters: struct csv_report_req
:Output: Upon successful execution, CSV_REPORT data is copied to
csv_report_req.report_data and return 0. Return -EINVAL for invalid
operands, -EIO on VMMCALL failure or standard error number on other
common failures.

The CSV_CMD_GET_REPORT IOCTL can be used by the attestation software to get
the CSV_REPORT from the CSV module using VMMCALL[KVM_HC_VM_ATTESTATION].
1 change: 1 addition & 0 deletions arch/x86/configs/deepin_x86_desktop_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4354,6 +4354,7 @@ CONFIG_VFIO_PCI_VGA=y
CONFIG_VIRT_DRIVERS=y
CONFIG_VBOXGUEST=m
CONFIG_NITRO_ENCLAVES=m
CONFIG_CSV_GUEST=m
CONFIG_VIRTIO_PCI=y
CONFIG_VIRTIO_VDPA=m
CONFIG_VIRTIO_PMEM=m
Expand Down
3 changes: 3 additions & 0 deletions arch/x86/include/asm/kvm-x86-ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ KVM_X86_OP(msr_filter_changed)
KVM_X86_OP(complete_emulated_msr)
KVM_X86_OP(vcpu_deliver_sipi_vector)
KVM_X86_OP_OPTIONAL_RET0(vcpu_get_apicv_inhibit_reasons);
KVM_X86_OP_OPTIONAL(vm_attestation)
KVM_X86_OP_OPTIONAL(control_pre_system_reset)
KVM_X86_OP_OPTIONAL(control_post_system_reset)

#undef KVM_X86_OP
#undef KVM_X86_OP_OPTIONAL
Expand Down
7 changes: 7 additions & 0 deletions arch/x86/include/asm/kvm_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -1751,6 +1751,13 @@ struct kvm_x86_ops {
* Returns vCPU specific APICv inhibit reasons
*/
unsigned long (*vcpu_get_apicv_inhibit_reasons)(struct kvm_vcpu *vcpu);

/*
* Interfaces for HYGON CSV guest
*/
int (*vm_attestation)(struct kvm *kvm, unsigned long gpa, unsigned long len);
int (*control_pre_system_reset)(struct kvm *kvm);
int (*control_post_system_reset)(struct kvm *kvm);
};

struct kvm_x86_nested_ops {
Expand Down
2 changes: 2 additions & 0 deletions arch/x86/kvm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ ifdef CONFIG_HYPERV
kvm-amd-y += svm/svm_onhyperv.o
endif

kvm-amd-$(CONFIG_HYGON_CSV) += svm/csv.o

obj-$(CONFIG_KVM) += kvm.o
obj-$(CONFIG_KVM_INTEL) += kvm-intel.o
obj-$(CONFIG_KVM_AMD) += kvm-amd.o
Expand Down
Loading