Skip to content

Commit b2c2c21

Browse files
committed
Merge tag 'kvm-riscv-fixes-5.18-1' of https://github.com/kvm-riscv/linux into HEAD
KVM/riscv fixes for 5.18, take #1 - Remove hgatp zeroing in kvm_arch_vcpu_put() - Fix alignment of the guest_hang() in KVM selftest - Fix PTE A and D bits in KVM selftest - Missing #include in vcpu_fp.c
2 parents a44e2c2 + 4054eee commit b2c2c21

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

arch/riscv/kvm/vcpu.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -653,8 +653,6 @@ void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu)
653653
vcpu->arch.isa);
654654
kvm_riscv_vcpu_host_fp_restore(&vcpu->arch.host_context);
655655

656-
csr_write(CSR_HGATP, 0);
657-
658656
csr->vsstatus = csr_read(CSR_VSSTATUS);
659657
csr->vsie = csr_read(CSR_VSIE);
660658
csr->vstvec = csr_read(CSR_VSTVEC);

arch/riscv/kvm/vcpu_fp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <linux/err.h>
1212
#include <linux/kvm_host.h>
1313
#include <linux/uaccess.h>
14+
#include <asm/hwcap.h>
1415

1516
#ifdef CONFIG_FPU
1617
void kvm_riscv_vcpu_fp_reset(struct kvm_vcpu *vcpu)

tools/testing/selftests/kvm/include/riscv/processor.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ static inline void set_reg(struct kvm_vm *vm, uint32_t vcpuid, uint64_t id,
101101
#define PGTBL_PTE_WRITE_SHIFT 2
102102
#define PGTBL_PTE_READ_MASK 0x0000000000000002ULL
103103
#define PGTBL_PTE_READ_SHIFT 1
104-
#define PGTBL_PTE_PERM_MASK (PGTBL_PTE_EXECUTE_MASK | \
104+
#define PGTBL_PTE_PERM_MASK (PGTBL_PTE_ACCESSED_MASK | \
105+
PGTBL_PTE_DIRTY_MASK | \
106+
PGTBL_PTE_EXECUTE_MASK | \
105107
PGTBL_PTE_WRITE_MASK | \
106108
PGTBL_PTE_READ_MASK)
107109
#define PGTBL_PTE_VALID_MASK 0x0000000000000001ULL

tools/testing/selftests/kvm/lib/riscv/processor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ void vcpu_dump(FILE *stream, struct kvm_vm *vm, uint32_t vcpuid, uint8_t indent)
268268
core.regs.t3, core.regs.t4, core.regs.t5, core.regs.t6);
269269
}
270270

271-
static void guest_hang(void)
271+
static void __aligned(16) guest_hang(void)
272272
{
273273
while (1)
274274
;

0 commit comments

Comments
 (0)