[PW_SID:1078443] riscv: Generate riscv instruction functions#1747
[PW_SID:1078443] riscv: Generate riscv instruction functions#1747linux-riscv-bot wants to merge 16 commits into
Conversation
Eliminate the need to hand-write riscv instructions by using a shell script to autogenerate a header from an instruction table. This is modeled after the syscall table infrastructure. The table is generated externally by riscv-unified-db [1], but is in a simple format to make it possible to use other tools or modify manually. [1] https://github.com/riscv-software-src/riscv-unified-db Signed-off-by: Charlie Jenkins <thecharlesjenkins@gmail.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Migrate the alternatives patching code to use the generated instruction headers instead of the hand-written instruction composition functions. Signed-off-by: Charlie Jenkins <thecharlesjenkins@gmail.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Migrate the code that is decoding instructions for the use of kgdb single stepping to use the generated instruction headers instead of the hand-written instruction functions. Signed-off-by: Charlie Jenkins <thecharlesjenkins@gmail.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Migrate the code that is decoding instruction for the use of kprobes to use the generated instruction headers instead of the hand-written instruction functions. With the more granular instruction support, split the decoding of branches into their own functions. Signed-off-by: Charlie Jenkins <thecharlesjenkins@gmail.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Migrate the code that is decoding cfi instructions to use the generated instruction headers. Signed-off-by: Charlie Jenkins <thecharlesjenkins@gmail.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Migrate the misaligned loads/store code to use the generated instruction headers instead of the hand-written instruction composition functions. Signed-off-by: Charlie Jenkins <thecharlesjenkins@gmail.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Migrate the csr parsing code to use the generated instruction headers instead of the hand-written instruction composition functions. Signed-off-by: Charlie Jenkins <thecharlesjenkins@gmail.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
KVM MMIO emulation failed to sign extend any signed reads and at the same time also unsuccessfully attempted to sign extend reads using lbu. Remove the shifting for lbu to avoid sign extension for that instruction and cast the data to a signed long instead of an unsigned long to allow for sign extension. Signed-off-by: Charlie Jenkins <thecharlesjenkins@gmail.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Create a KVM test device to help verify mmio reads and write emulation. This is a simple device that will store the data in a buffer on writes and echo back that stored data on a read. Signed-off-by: Charlie Jenkins <thecharlesjenkins@gmail.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Use the test KVM device to validate that reads and writes to a device are properly emulated by KVM. This test checks all load and store instructions that are emulated by KVM. Signed-off-by: Charlie Jenkins <thecharlesjenkins@gmail.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Migrate the mmio emulation code to use the generated instruction headers instead of the hand-written instruction composition functions. Signed-off-by: Charlie Jenkins <thecharlesjenkins@gmail.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
To test the riscv kvm implementation of emulated CSRs, add support to emulate the vsscratch csr when CONFIG_RISCV_KVM_TEST_CSR is set. Signed-off-by: Charlie Jenkins <thecharlesjenkins@gmail.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Introduce a kvm test that uses the emulated test csr to validate that all emulated reads/writes to csrs function as expected. Signed-off-by: Charlie Jenkins <thecharlesjenkins@gmail.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Migrate the csr emulation code to use the generated instruction headers instead of the hand-written instruction composition functions. Signed-off-by: Charlie Jenkins <thecharlesjenkins@gmail.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Migrate the kexec relocation code to use the generated instruction headers instead of the hand-written instruction composition functions. Signed-off-by: Charlie Jenkins <thecharlesjenkins@gmail.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
All usages of hard-coded riscv instruction have been migrated over to the generated instruction headers so the old macros can be deleted. Signed-off-by: Charlie Jenkins <thecharlesjenkins@gmail.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "[02/16] riscv: alternatives: Use generated instruction headers for patching code" |
|
Patch 1: "[02/16] riscv: alternatives: Use generated instruction headers for patching code" |
|
Patch 1: "[02/16] riscv: alternatives: Use generated instruction headers for patching code" |
|
Patch 1: "[02/16] riscv: alternatives: Use generated instruction headers for patching code" |
|
Patch 1: "[02/16] riscv: alternatives: Use generated instruction headers for patching code" |
|
Patch 1: "[02/16] riscv: alternatives: Use generated instruction headers for patching code" |
|
Patch 1: "[02/16] riscv: alternatives: Use generated instruction headers for patching code" |
|
Patch 1: "[02/16] riscv: alternatives: Use generated instruction headers for patching code" |
|
Patch 1: "[02/16] riscv: alternatives: Use generated instruction headers for patching code" |
|
Patch 1: "[02/16] riscv: alternatives: Use generated instruction headers for patching code" |
|
Patch 1: "[02/16] riscv: alternatives: Use generated instruction headers for patching code" |
|
Patch 1: "[02/16] riscv: alternatives: Use generated instruction headers for patching code" |
|
Patch 2: "[03/16] riscv: kgdb: Use generated instruction headers" |
|
Patch 2: "[03/16] riscv: kgdb: Use generated instruction headers" |
|
Patch 14: "[15/16] riscv: kexec: Use generated instruction headers for kexec relocations" |
|
Patch 14: "[15/16] riscv: kexec: Use generated instruction headers for kexec relocations" |
|
Patch 14: "[15/16] riscv: kexec: Use generated instruction headers for kexec relocations" |
|
Patch 14: "[15/16] riscv: kexec: Use generated instruction headers for kexec relocations" |
|
Patch 15: "[16/16] riscv: Remove unused instruction headers" |
|
Patch 15: "[16/16] riscv: Remove unused instruction headers" |
|
Patch 15: "[16/16] riscv: Remove unused instruction headers" |
|
Patch 15: "[16/16] riscv: Remove unused instruction headers" |
|
Patch 15: "[16/16] riscv: Remove unused instruction headers" |
|
Patch 15: "[16/16] riscv: Remove unused instruction headers" |
|
Patch 15: "[16/16] riscv: Remove unused instruction headers" |
|
Patch 15: "[16/16] riscv: Remove unused instruction headers" |
|
Patch 15: "[16/16] riscv: Remove unused instruction headers" |
|
Patch 15: "[16/16] riscv: Remove unused instruction headers" |
|
Patch 15: "[16/16] riscv: Remove unused instruction headers" |
|
Patch 15: "[16/16] riscv: Remove unused instruction headers" |
|
Patch 16: "[1/16] riscv: Introduce instruction table generation" |
|
Patch 16: "[1/16] riscv: Introduce instruction table generation" |
|
Patch 16: "[1/16] riscv: Introduce instruction table generation" |
|
Patch 16: "[1/16] riscv: Introduce instruction table generation" |
|
Patch 16: "[1/16] riscv: Introduce instruction table generation" |
|
Patch 16: "[1/16] riscv: Introduce instruction table generation" |
|
Patch 16: "[1/16] riscv: Introduce instruction table generation" |
|
Patch 16: "[1/16] riscv: Introduce instruction table generation" |
|
Patch 16: "[1/16] riscv: Introduce instruction table generation" |
|
Patch 16: "[1/16] riscv: Introduce instruction table generation" |
|
Patch 16: "[1/16] riscv: Introduce instruction table generation" |
|
Patch 16: "[1/16] riscv: Introduce instruction table generation" |
PR for series 1078443 applied to workflow__riscv__fixes
Name: riscv: Generate riscv instruction functions
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1078443
Version: 1