Add kvm_riscv_get/put_regs_timer to synchronize virtual time context
from KVM.
To set register of RISCV_TIMER_REG(state) will occur a error from KVM
on kvm_timer_state == 0. It's better to adapt in KVM, but it doesn't matter
that adaping in QEMU.
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwan
Add riscv kvm support in meson.build file.
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
---
meson.build | 2 ++
1 file changed, 2 insertions(+)
diff --git a/meson.build b/meson.build
index c1b1db1e28..06a5476254 100644
--- a/meson.build
+++ b/meson.build
@@ -90,6 +90,8 @@ elif cpu in
Use char-fe to handle console sbi call, which implement early
console io while apply 'earlycon=sbi' into kernel parameters.
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
Reviewed-by: Anup Patel
Reviewed-by: Alistair Francis
---
target/riscv/kvm.c | 42 -
Add virtual time context description to vmstate_kvmtimer. After cpu being
loaded, virtual time context is updated to KVM.
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
Reviewed-by: Anup Patel
Reviewed-by: Alistair Francis
---
target/riscv/machine.c | 30 ++
We hope that virtual time adjusts with vm state changing. When a vm
is stopped, guest virtual time should stop counting and kvm_timer
should be stopped. When the vm is resumed, guest virtual time should
continue to count and kvm_timer should be restored.
Signed-off-by: Yifei Jiang
Signed-off-by:
Get kernel and fdt start address in virt.c, and pass them to KVM
when cpu reset. Add kvm_riscv.h to place riscv specific interface.
In addition, PLIC is created without M-mode PLIC contexts when KVM
is enabled.
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
Reviewed-by: Alistair Francis
Put GPR CSR and FP registers to kvm by KVM_SET_ONE_REG ioctl
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
Reviewed-by: Alistair Francis
Reviewed-by: Anup Patel
---
target/riscv/kvm.c | 104 -
1 file changed, 103 insertions(+), 1 deletion(-)
'host' type cpu is set isa to RV32 or RV64 simply, more isa info
will obtain from KVM in kvm_arch_init_vcpu()
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
Reviewed-by: Alistair Francis
Reviewed-by: Anup Patel
---
target/riscv/cpu.c | 15 +++
target/riscv/cpu.h | 1 +
2 f
Get isa info from kvm while kvm init.
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
Reviewed-by: Alistair Francis
Reviewed-by: Anup Patel
---
target/riscv/kvm.c | 34 +-
1 file changed, 33 insertions(+), 1 deletion(-)
diff --git a/target/riscv/kvm.c b/
This series adds both riscv32 and riscv64 kvm support, and implements
migration based on riscv.
Because of RISC-V KVM has been merged into the Linux master, so this
series are changed from RFC to patch.
Several steps to use this:
1. Build emulation
$ ./configure --target-list=riscv64-softmmu
$ ma
When KVM is enabled, set the S-mode external interrupt through
kvm_riscv_set_irq function.
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
Reviewed-by: Alistair Francis
Reviewed-by: Anup Patel
---
target/riscv/cpu.c | 6 +-
target/riscv/kvm-stub.c | 5 +
target/riscv/kv
Add asm-riscv/kvm.h for RISC-V KVM.
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
Acked-by: Alistair Francis
Reviewed-by: Anup Patel
---
linux-headers/asm-riscv/kvm.h | 128 ++
1 file changed, 128 insertions(+)
create mode 100644 linux-headers/asm-risc
Get GPR CSR and FP registers from kvm by KVM_GET_ONE_REG ioctl.
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
Reviewed-by: Alistair Francis
Reviewed-by: Anup Patel
---
target/riscv/kvm.c | 112 -
1 file changed, 111 insertions(+), 1 deletion
Add target/riscv/kvm.c to place kvm_arch_* function needed by
kvm/kvm-all.c.
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
Reviewed-by: Alistair Francis
Reviewed-by: Anup Patel
---
target/riscv/kvm.c | 133 +++
target/riscv/meson.build | 1 +
Put GPR CSR and FP registers to kvm by KVM_SET_ONE_REG ioctl
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
Reviewed-by: Alistair Francis
Reviewed-by: Anup Patel
---
target/riscv/kvm.c | 104 -
1 file changed, 103 insertions(+), 1 deletion(-)
We hope that virtual time adjusts with vm state changing. When a vm
is stopped, guest virtual time should stop counting and kvm_timer
should be stopped. When the vm is resumed, guest virtual time should
continue to count and kvm_timer should be restored.
Signed-off-by: Yifei Jiang
Signed-off-by:
Get kernel and fdt start address in virt.c, and pass them to KVM
when cpu reset. Add kvm_riscv.h to place riscv specific interface.
In addition, PLIC is created without M-mode PLIC contexts when KVM
is enabled.
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
Reviewed-by: Alistair Francis
Add kvm_riscv_get/put_regs_timer to synchronize virtual time context
from KVM.
To set register of RISCV_TIMER_REG(state) will occur a error from KVM
on kvm_timer_state == 0. It's better to adapt in KVM, but it doesn't matter
that adaping in QEMU.
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwan
'host' type cpu is set isa to RV32 or RV64 simply, more isa info
will obtain from KVM in kvm_arch_init_vcpu()
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
Reviewed-by: Alistair Francis
Reviewed-by: Anup Patel
---
target/riscv/cpu.c | 15 +++
target/riscv/cpu.h | 1 +
2 f
Add virtual time context description to vmstate_kvmtimer. After cpu being
loaded, virtual time context is updated to KVM.
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
Reviewed-by: Anup Patel
Reviewed-by: Alistair Francis
---
target/riscv/machine.c | 30 ++
Use char-fe to handle console sbi call, which implement early
console io while apply 'earlycon=sbi' into kernel parameters.
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
Reviewed-by: Anup Patel
---
target/riscv/kvm.c | 42 -
target/riscv/sbi_ecall_interf
When KVM is enabled, set the S-mode external interrupt through
kvm_riscv_set_irq function.
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
Reviewed-by: Alistair Francis
Reviewed-by: Anup Patel
---
target/riscv/cpu.c | 6 +-
target/riscv/kvm-stub.c | 5 +
target/riscv/kv
Add target/riscv/kvm.c to place kvm_arch_* function needed by
kvm/kvm-all.c. Meanwhile, add kvm support in meson.build file.
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
Reviewed-by: Alistair Francis
Reviewed-by: Anup Patel
---
meson.build | 2 +
target/riscv/kvm.c
Add asm-riscv/kvm.h for RISC-V KVM.
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
Acked-by: Alistair Francis
Reviewed-by: Anup Patel
---
linux-headers/asm-riscv/kvm.h | 128 ++
1 file changed, 128 insertions(+)
create mode 100644 linux-headers/asm-risc
Get isa info from kvm while kvm init.
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
Reviewed-by: Alistair Francis
Reviewed-by: Anup Patel
---
target/riscv/kvm.c | 32 +++-
1 file changed, 31 insertions(+), 1 deletion(-)
diff --git a/target/riscv/kvm.c b/ta
This series adds both riscv32 and riscv64 kvm support, and implements
migration based on riscv.
Because of RISC-V KVM has been merged into the Linux master, so this
series are changed from RFC to patch.
Several steps to use this:
1. Build emulation
$ ./configure --target-list=riscv64-softmmu
$ ma
Get GPR CSR and FP registers from kvm by KVM_GET_ONE_REG ioctl.
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
Reviewed-by: Alistair Francis
Reviewed-by: Anup Patel
---
target/riscv/kvm.c | 112 -
1 file changed, 111 insertions(+), 1 deletion
Get GPR CSR and FP registers from kvm by KVM_GET_ONE_REG ioctl.
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
Reviewed-by: Alistair Francis
Reviewed-by: Anup Patel
---
target/riscv/kvm.c | 112 -
1 file changed, 111 insertions(+), 1 deletion
Get kernel and fdt start address in virt.c, and pass them to KVM
when cpu reset. Add kvm_riscv.h to place riscv specific interface.
In addition, PLIC is created without M-mode PLIC contexts when KVM
is enabled.
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
Reviewed-by: Alistair Francis
Get isa info from kvm while kvm init.
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
Reviewed-by: Alistair Francis
Reviewed-by: Anup Patel
---
target/riscv/kvm.c | 32 +++-
1 file changed, 31 insertions(+), 1 deletion(-)
diff --git a/target/riscv/kvm.c b/ta
Add target/riscv/kvm.c to place kvm_arch_* function needed by
kvm/kvm-all.c. Meanwhile, add kvm support in meson.build file.
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
Reviewed-by: Alistair Francis
Reviewed-by: Anup Patel
---
meson.build | 2 +
target/riscv/kvm.c
We hope that virtual time adjusts with vm state changing. When a vm
is stopped, guest virtual time should stop counting and kvm_timer
should be stopped. When the vm is resumed, guest virtual time should
continue to count and kvm_timer should be restored.
Signed-off-by: Yifei Jiang
Signed-off-by:
Add asm-riscv/kvm.h for RISC-V KVM, and update linux/kvm.h
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
Acked-by: Alistair Francis
Reviewed-by: Anup Patel
---
linux-headers/asm-riscv/kvm.h | 128 ++
1 file changed, 128 insertions(+)
create mode 100644
Use char-fe to handle console sbi call, which implement early
console io while apply 'earlycon=sbi' into kernel parameters.
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
Reviewed-by: Anup Patel
---
target/riscv/kvm.c | 43 +-
target/riscv/sbi_ecall_inter
When KVM is enabled, set the S-mode external interrupt through
kvm_riscv_set_irq function.
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
Reviewed-by: Alistair Francis
---
target/riscv/cpu.c | 6 +-
target/riscv/kvm-stub.c | 5 +
target/riscv/kvm.c | 17 ++
Add kvm_riscv_get/put_regs_timer to synchronize virtual time context
from KVM.
To set register of RISCV_TIMER_REG(state) will occur a error from KVM
on kvm_timer_state == 0. It's better to adapt in KVM, but it doesn't matter
that adaping in QEMU.
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwan
This series adds both riscv32 and riscv64 kvm support, and implements
migration based on riscv.
Because of RISC-V KVM has been merged into the Linux master, so this
series are changed from RFC to patch.
Several steps to use this:
1. Build emulation
$ ./configure --target-list=riscv64-softmmu
$ ma
Put GPR CSR and FP registers to kvm by KVM_SET_ONE_REG ioctl
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
Reviewed-by: Alistair Francis
Reviewed-by: Anup Patel
---
target/riscv/kvm.c | 104 -
1 file changed, 103 insertions(+), 1 deletion(-)
Add virtual time context description to vmstate_kvmtimer. After cpu being
loaded, virtual time context is updated to KVM.
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
Reviewed-by: Anup Patel
---
target/riscv/machine.c | 30 ++
1 file changed, 30 insertions(
'host' type cpu is set isa to RV32 or RV64 simply, more isa info
will obtain from KVM in kvm_arch_init_vcpu()
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
Reviewed-by: Alistair Francis
Reviewed-by: Anup Patel
---
target/riscv/cpu.c | 15 +++
target/riscv/cpu.h | 1 +
2 f
Add virtual time context description to vmstate_kvmtimer. After cpu being
loaded, virtual time context is updated to KVM.
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
---
target/riscv/machine.c | 37 +++--
1 file changed, 35 insertions(+), 2 deletions(-)
We hope that virtual time adjusts with vm state changing. When a vm
is stopped, guest virtual time should stop counting and kvm_timer
should be stopped. When the vm is resumed, guest virtual time should
continue to count and kvm_timer should be restored.
Signed-off-by: Yifei Jiang
Signed-off-by:
Add kvm_riscv_get/put_regs_timer to synchronize virtual time context
from KVM.
To set register of RISCV_TIMER_REG(state) will occur a error from KVM
on kvm_timer_state == 0. It's better to adapt in KVM, but it doesn't matter
that adaping in QEMU.
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwan
Use char-fe to handle console sbi call, which implement early
console io while apply 'earlycon=sbi' into kernel parameters.
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
---
target/riscv/kvm.c | 38 +++-
target/riscv/sbi_ecall_interface.h | 72 +++
Get kernel and fdt start address in virt.c, and pass them to KVM
when cpu reset. In addition, add kvm_riscv.h to place riscv specific
interface.
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
Reviewed-by: Alistair Francis
---
hw/riscv/boot.c | 11
hw/riscv/virt.c
Put GPR CSR and FP registers to kvm by KVM_SET_ONE_REG ioctl
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
Reviewed-by: Alistair Francis
---
target/riscv/kvm.c | 104 -
1 file changed, 103 insertions(+), 1 deletion(-)
diff --git a/target/ris
When KVM is enabled, set the S-mode external interrupt through
kvm_riscv_set_irq function.
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
Reviewed-by: Alistair Francis
---
target/riscv/cpu.c | 6 +-
target/riscv/kvm-stub.c | 5 +
target/riscv/kvm.c | 17 ++
'host' type cpu is set isa to RV32 or RV64 simply, more isa info
will obtain from KVM in kvm_arch_init_vcpu()
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
Reviewed-by: Alistair Francis
Reviewed-by: Anup Patel
---
target/riscv/cpu.c | 15 +++
target/riscv/cpu.h | 1 +
2 f
Add target/riscv/kvm.c to place kvm_arch_* function needed by
kvm/kvm-all.c. Meanwhile, add kvm support in meson.build file.
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
Reviewed-by: Alistair Francis
Reviewed-by: Anup Patel
---
meson.build | 2 +
target/riscv/kvm.c
Get GPR CSR and FP registers from kvm by KVM_GET_ONE_REG ioctl.
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
Reviewed-by: Alistair Francis
---
target/riscv/kvm.c | 112 -
1 file changed, 111 insertions(+), 1 deletion(-)
diff --git a/target/
Get isa info from kvm while kvm init.
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
Reviewed-by: Alistair Francis
---
target/riscv/kvm.c | 32 +++-
1 file changed, 31 insertions(+), 1 deletion(-)
diff --git a/target/riscv/kvm.c b/target/riscv/kvm.c
index 68
This series adds both riscv32 and riscv64 kvm support, and implements
migration based on riscv.
Because of RISC-V KVM has been merged into the Linux master, so this
series are changed from RFC to patch.
Several steps to use this:
1. Build emulation
$ ./configure --target-list=riscv64-softmmu
$ ma
Add asm-riscv/kvm.h for RISC-V KVM, and update linux/kvm.h
Signed-off-by: Yifei Jiang
Signed-off-by: Mingwang Li
Acked-by: Alistair Francis
Reviewed-by: Anup Patel
---
linux-headers/asm-riscv/kvm.h | 128 ++
linux-headers/linux/kvm.h | 8 +++
2 files chan
53 matches
Mail list logo