lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250219033823.215630-1-maobibo@loongson.cn>
Date: Wed, 19 Feb 2025 11:38:21 +0800
From: Bibo Mao <maobibo@...ngson.cn>
To: Tianrui Zhao <zhaotianrui@...ngson.cn>
Cc: Huacai Chen <chenhuacai@...nel.org>,
	WANG Xuerui <kernel@...0n.name>,
	kvm@...r.kernel.org,
	loongarch@...ts.linux.dev,
	linux-kernel@...r.kernel.org
Subject: [PATCH v2 0/2] LoongArch: KVM: Enhancement about PGD saving

There is enhancement about PGD saving about KVM hypervisor. Register
LOONGARCH_CSR_PGDL is shared between host kernel and KVM hypervisor.
For host kernel it is for user space pgd of VMM threads, secondary mmu
for KVM hypervisor. Both are not changed after VM is created, so it
can be saved as host_pgd and kvm_pgd in advanced.

Also it fixes GPA size typo issue, it should cpu_vabits rather than
cpu_vabits - 1. And inject data abort error to VM if it exceeds maximum.
GPA size. For example there will be data abort when executing command:
 # busybox devmem 0xc00000100008
  Bus error (core dumped)
Previous it is treated as MMIO address and let VMM handle this.

---
  v1 ... v2:
    1. Use name kvm_pgd rather than host_second_pgd for PGD of
       hypervisor.
    2. Fix GPA size typo issue and add page fault address checking.

---
Bibo Mao (2):
  LoongArch: KVM: Remove PGD saving during VM context switch
  LoongArch: KVM: Fix GPA size issue about VM

 arch/loongarch/include/asm/kvm_host.h |  2 ++
 arch/loongarch/kernel/asm-offsets.c   |  4 +---
 arch/loongarch/kvm/exit.c             |  6 ++++++
 arch/loongarch/kvm/switch.S           | 12 ++----------
 arch/loongarch/kvm/vcpu.c             |  8 ++++++++
 arch/loongarch/kvm/vm.c               |  7 ++++++-
 6 files changed, 25 insertions(+), 14 deletions(-)


base-commit: 2408a807bfc3f738850ef5ad5e3fd59d66168996
-- 
2.39.3


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ