Skip to content

[PW_SID:1143036] [v2] RISC-V: KVM: Serialize IMSIC attributes with vCPU migration - #2437

Open
linux-riscv-bot wants to merge 1 commit into
workflow__riscv__fixesfrom
pw1143036
Open

[PW_SID:1143036] [v2] RISC-V: KVM: Serialize IMSIC attributes with vCPU migration#2437
linux-riscv-bot wants to merge 1 commit into
workflow__riscv__fixesfrom
pw1143036

Conversation

@linux-riscv-bot

Copy link
Copy Markdown

PR for series 1143036 applied to workflow__riscv__fixes

Name: [v2] RISC-V: KVM: Serialize IMSIC attributes with vCPU migration
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1143036
Version: 2

KVM device ioctls are not serialized against KVM_RUN. As a result,
kvm_riscv_aia_imsic_rw_attr() can snapshot the physical CPU and HGEI of
an IMSIC VS-file before a concurrent vCPU migration releases it.

The HGEI can then be allocated to another vCPU before imsic_vsfile_rw()
uses the stale tuple. A GET or SET attribute may consequently access the
new owner's interrupt file.

Serialize the entire IMSIC attribute operation with the target vCPU
mutex. This prevents the VS-file from being migrated and recycled until
the attribute access completes. Acquire the mutex killably so that the
device ioctl remains interruptible while waiting for KVM_RUN to finish.

Fixes: db8b7e9 ("RISC-V: KVM: Add in-kernel virtualization of AIA IMSIC")
Cc: stable@vger.kernel.org
Signed-off-by: Xie Bo <xb@ultrarisc.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v2] RISC-V: KVM: Serialize IMSIC attributes with vCPU migration"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 117.12 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v2] RISC-V: KVM: Serialize IMSIC attributes with vCPU migration"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1159.98 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v2] RISC-V: KVM: Serialize IMSIC attributes with vCPU migration"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1440.91 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v2] RISC-V: KVM: Serialize IMSIC attributes with vCPU migration"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 19.76 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v2] RISC-V: KVM: Serialize IMSIC attributes with vCPU migration"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 21.29 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v2] RISC-V: KVM: Serialize IMSIC attributes with vCPU migration"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.60 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v2] RISC-V: KVM: Serialize IMSIC attributes with vCPU migration"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 78.62 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v2] RISC-V: KVM: Serialize IMSIC attributes with vCPU migration"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.22 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v2] RISC-V: KVM: Serialize IMSIC attributes with vCPU migration"
kdoc
Desc: Detects for kdoc errors
Duration: 0.69 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v2] RISC-V: KVM: Serialize IMSIC attributes with vCPU migration"
module-param
Desc: Detect module_param changes
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v2] RISC-V: KVM: Serialize IMSIC attributes with vCPU migration"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v2] RISC-V: KVM: Serialize IMSIC attributes with vCPU migration"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.25 seconds
Result: PASS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants