Message ID | 20240516010610.30013-1-yongxuan.wang@sifive.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [kvmtool,v3,1/1] riscv: Fix the hart bit setting of AIA | expand |
diff --git a/riscv/aia.c b/riscv/aia.c index fe9399a8ffc1..21d9704145d0 100644 --- a/riscv/aia.c +++ b/riscv/aia.c @@ -164,7 +164,7 @@ static int aia__init(struct kvm *kvm) ret = ioctl(aia_fd, KVM_SET_DEVICE_ATTR, &aia_nr_sources_attr); if (ret) return ret; - aia_hart_bits = fls_long(kvm->nrcpus); + aia_hart_bits = fls_long(kvm->nrcpus - 1); ret = ioctl(aia_fd, KVM_SET_DEVICE_ATTR, &aia_hart_bits_attr); if (ret) return ret;