summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/kvm/lib/test_util.c
diff options
context:
space:
mode:
authorDaniel Henrique Barboza <dbarboza@ventanamicro.com>2023-08-03 13:32:58 -0300
committerAnup Patel <anup@brainfault.org>2023-08-08 17:25:53 +0530
commitbea8d23713a2b2dc07ae9d7325b1269dff8c8a1f (patch)
tree471445d19c11cc55f5d2386f60cb779423e5df79 /tools/testing/selftests/kvm/lib/test_util.c
parentd57304bbfb742bf744d2cd4dc3a08ce3fbfba787 (diff)
RISC-V: KVM: avoid EBUSY when writing same ISA val
kvm_riscv_vcpu_set_reg_config() will return -EBUSY if the ISA config reg is being written after the VCPU ran at least once. The same restriction isn't placed in kvm_riscv_vcpu_get_reg_config(), so there's a chance that we'll -EBUSY out on an ISA config reg write even if the userspace intended no changes to it. We'll allow the same form of 'lazy writing' that registers such as zicbom/zicboz_block_size supports: avoid erroring out if userspace made no changes to the ISA config reg. Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Signed-off-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'tools/testing/selftests/kvm/lib/test_util.c')
0 files changed, 0 insertions, 0 deletions