From b362680d4fa9007385dba830eff04fc841d830a5 Mon Sep 17 00:00:00 2001 From: Nikita Ioffe Date: Fri, 18 Jul 2025 13:49:24 +0000 Subject: [PATCH] ANDROID: KVM: arm64: make per-cpu trace file read-write Userspace tools use the per-cpu trace file to clear the per-cpu trace buffer, hence the should be able to open it for writing. Bug: 428904926 Test: presubmit Change-Id: Ie19fdf0a235745bff04b3a904b04950964b3497a Signed-off-by: Nikita Ioffe --- arch/arm64/kvm/hyp_trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kvm/hyp_trace.c b/arch/arm64/kvm/hyp_trace.c index d41c2a8ef312..915bfdf57bca 100644 --- a/arch/arm64/kvm/hyp_trace.c +++ b/arch/arm64/kvm/hyp_trace.c @@ -1044,7 +1044,7 @@ int hyp_trace_init_tracefs(void) tracefs_create_file("trace_pipe_raw", TRACEFS_MODE_READ, per_cpu_dir, (void *)cpu, &hyp_trace_raw_fops); - tracefs_create_file("trace", TRACEFS_MODE_READ, per_cpu_dir, + tracefs_create_file("trace", TRACEFS_MODE_WRITE, per_cpu_dir, (void *)cpu, &hyp_trace_fops); }