[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 09/65] trace/kvm: Add trace for page convertion between shared
From: |
Xiaoyao Li |
Subject: |
[PATCH v5 09/65] trace/kvm: Add trace for page convertion between shared and private |
Date: |
Thu, 29 Feb 2024 01:36:30 -0500 |
From: Isaku Yamahata <isaku.yamahata@intel.com>
Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
---
accel/kvm/kvm-all.c | 2 ++
accel/kvm/trace-events | 1 +
2 files changed, 3 insertions(+)
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
index 87e4275932a7..fe2eb3f06902 100644
--- a/accel/kvm/kvm-all.c
+++ b/accel/kvm/kvm-all.c
@@ -2912,6 +2912,8 @@ static int kvm_convert_memory(hwaddr start, hwaddr size,
bool to_private)
void *addr;
int ret = -1;
+ trace_kvm_convert_memory(start, size, to_private ? "shared_to_private" :
"private_to_shared");
+
if (!QEMU_PTR_IS_ALIGNED(start, qemu_host_page_size) ||
!QEMU_PTR_IS_ALIGNED(size, qemu_host_page_size)) {
return -1;
diff --git a/accel/kvm/trace-events b/accel/kvm/trace-events
index e8c52cb9e7a1..31175fed97ce 100644
--- a/accel/kvm/trace-events
+++ b/accel/kvm/trace-events
@@ -31,3 +31,4 @@ kvm_cpu_exec(void) ""
kvm_interrupt_exit_request(void) ""
kvm_io_window_exit(void) ""
kvm_run_exit_system_event(int cpu_index, uint32_t event_type) "cpu_index %d,
system_even_type %"PRIu32
+kvm_convert_memory(uint64_t start, uint64_t size, const char *msg) "start 0x%"
PRIx64 " size 0x%" PRIx64 " %s"
--
2.34.1
- [PATCH v5 00/65] QEMU Guest memfd + QEMU TDX support, Xiaoyao Li, 2024/02/29
- [PATCH v5 01/65] linux-headers: Update to Linux v6.8-rc5, Xiaoyao Li, 2024/02/29
- [PATCH v5 02/65] RAMBlock: Add support of KVM private guest memfd, Xiaoyao Li, 2024/02/29
- [PATCH v5 03/65] HostMem: Add mechanism to opt in kvm guest memfd via MachineState, Xiaoyao Li, 2024/02/29
- [PATCH v5 04/65] trace/kvm: Split address space and slot id in trace_kvm_set_user_memory(), Xiaoyao Li, 2024/02/29
- [PATCH v5 05/65] kvm: Enable KVM_SET_USER_MEMORY_REGION2 for memslot, Xiaoyao Li, 2024/02/29
- [PATCH v5 06/65] kvm: Introduce support for memory_attributes, Xiaoyao Li, 2024/02/29
- [PATCH v5 07/65] physmem: Introduce ram_block_discard_guest_memfd_range(), Xiaoyao Li, 2024/02/29
- [PATCH v5 08/65] kvm: handle KVM_EXIT_MEMORY_FAULT, Xiaoyao Li, 2024/02/29
- [PATCH v5 09/65] trace/kvm: Add trace for page convertion between shared and private,
Xiaoyao Li <=
- [PATCH v5 10/65] kvm/memory: Make memory type private by default if it has guest memfd backend, Xiaoyao Li, 2024/02/29
- [PATCH v5 11/65] *** HACK *** linux-headers: Update headers to pull in TDX API changes, Xiaoyao Li, 2024/02/29
- [PATCH v5 12/65] i386: Introduce tdx-guest object, Xiaoyao Li, 2024/02/29
- [PATCH v5 13/65] target/i386: Implement mc->kvm_type() to get VM type, Xiaoyao Li, 2024/02/29
- [PATCH v5 14/65] i386/tdx: Implement tdx_kvm_init() to initialize TDX VM context, Xiaoyao Li, 2024/02/29
- [PATCH v5 15/65] i386/tdx: Get tdx_capabilities via KVM_TDX_CAPABILITIES, Xiaoyao Li, 2024/02/29
- [PATCH v5 16/65] i386/tdx: Introduce is_tdx_vm() helper and cache tdx_guest object, Xiaoyao Li, 2024/02/29
- [PATCH v5 17/65] i386/tdx: Adjust the supported CPUID based on TDX restrictions, Xiaoyao Li, 2024/02/29
- [PATCH v5 18/65] i386/tdx: Make Intel-PT unsupported for TD guest, Xiaoyao Li, 2024/02/29