c3afa714 | 06-Jan-2025 |
Bibo Mao <maobibo@loongson.cn> |
hw/intc/loongarch_extioi: Add irq routing support from physical id
The simliar with IPI interrupt controller, physical cpu id is used for irq routing for extioi interrupt controller.
Signed-off-by:
hw/intc/loongarch_extioi: Add irq routing support from physical id
The simliar with IPI interrupt controller, physical cpu id is used for irq routing for extioi interrupt controller.
Signed-off-by: Bibo Mao <maobibo@loongson.cn> Reviewed-by: Bibo Mao <maobibo@loongson.cn>
show more ...
|
0443b858 | 06-Jan-2025 |
Bibo Mao <maobibo@loongson.cn> |
hw/intc/loongarch_extioi: Remove num-cpu property
Since cpu number can be acquired from possible_cpu_arch_ids(), num-cpu property is not necessary. Here remove num-cpu property for object TYPE_LOONG
hw/intc/loongarch_extioi: Remove num-cpu property
Since cpu number can be acquired from possible_cpu_arch_ids(), num-cpu property is not necessary. Here remove num-cpu property for object TYPE_LOONGARCH_EXTIOI_COMMON object.
Signed-off-by: Bibo Mao <maobibo@loongson.cn> Reviewed-by: Bibo Mao <maobibo@loongson.cn>
show more ...
|
e0c87e30 | 19-Nov-2024 |
Daniel Henrique Barboza <dbarboza@ventanamicro.com> |
hw/intc/riscv_aplic: add kvm_msicfgaddr for split mode aplic-imsic
The last step to enable KVM AIA aplic-imsic with irqchip in split mode is to deal with how MSIs are going to be sent. In our curren
hw/intc/riscv_aplic: add kvm_msicfgaddr for split mode aplic-imsic
The last step to enable KVM AIA aplic-imsic with irqchip in split mode is to deal with how MSIs are going to be sent. In our current design we don't allow an APLIC controller to send MSIs unless it's on m-mode. And we also do not allow Supervisor MSI address configuration via the 'smsiaddrcfg' and 'smsiaddrcfgh' registers unless it's also a m-mode APLIC controller.
Add a new RISCVACPLICState attribute called 'kvm_msicfgaddr'. This attribute represents the base configuration address for MSIs, in our case the base addr of the IMSIC controller. This attribute is being set only when running irqchip_split() mode with aia=aplic-imsic.
During riscv_aplic_msi_send() we'll check if the attribute was set to skip the check for a m-mode APLIC controller and to change the resulting MSI addr by adding kvm_msicfgaddr right before address_space_stl_le().
Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Acked-by: Alistair Francis <alistair.francis@wdc.com> Message-ID: <20241119191706.718860-7-dbarboza@ventanamicro.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
show more ...
|
b319ef15 | 19-Nov-2024 |
Daniel Henrique Barboza <dbarboza@ventanamicro.com> |
hw/riscv/virt.c, riscv_aplic.c: add 'emulated_aplic' helpers
The current logic to determine if we don't need an emulated APLIC controller, i.e. KVM will provide for us, is to determine if we're runn
hw/riscv/virt.c, riscv_aplic.c: add 'emulated_aplic' helpers
The current logic to determine if we don't need an emulated APLIC controller, i.e. KVM will provide for us, is to determine if we're running KVM, with in-kernel irqchip support, and running aia=aplic-imsic. This is modelled by riscv_is_kvm_aia_aplic_imsic() and virt_use_kvm_aia_aplic_imsic().
This won't suffice to support irqchip_split() mode: it will match exactly the same conditions as the one above, but setting the irqchip to 'split' mode will now require us to emulate an APLIC s-mode controller, like we're doing with 'aia=aplic'.
Create a new riscv_use_emulated_aplic() helper that will encapsulate this logic. Replace the uses of "riscv_is_kvm_aia_aplic_imsic()" with this helper every time we're taking a decision on emulate an APLIC controller or not. Do the same in virt.c with virt_use_emulated_aplic().
Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-ID: <20241119191706.718860-6-dbarboza@ventanamicro.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
show more ...
|
6f6006ad | 13-Dec-2024 |
Bibo Mao <maobibo@loongson.cn> |
hw/intc/loongarch_extioi: Code cleanup about loongarch_extioi
Remove definition about LoongArchExtIOI and LOONGARCH_EXTIOI, and replace them with LoongArchExtIOICommonState and macro LOONGARCH_EXTIO
hw/intc/loongarch_extioi: Code cleanup about loongarch_extioi
Remove definition about LoongArchExtIOI and LOONGARCH_EXTIOI, and replace them with LoongArchExtIOICommonState and macro LOONGARCH_EXTIOI_COMMON separately. Also remove unnecessary header files.
Signed-off-by: Bibo Mao <maobibo@loongson.cn> Reviewed-by: Song Gao <gaosong@loongson.cn>
show more ...
|
ff09444a | 08-Nov-2024 |
Bibo Mao <maobibo@loongson.cn> |
hw/intc/loongarch_extioi: Add pre_save interface
Add vmstate pre_save interface, which can be used extioi kvm driver in future.
Signed-off-by: Bibo Mao <maobibo@loongson.cn> Reviewed-by: Song Gao <
hw/intc/loongarch_extioi: Add pre_save interface
Add vmstate pre_save interface, which can be used extioi kvm driver in future.
Signed-off-by: Bibo Mao <maobibo@loongson.cn> Reviewed-by: Song Gao <gaosong@loongson.cn>
show more ...
|
272c467a | 13-Dec-2024 |
Bibo Mao <maobibo@loongson.cn> |
hw/intc/loongarch_extioi: Inherit from loongarch_extioi_common
Set TYPE_LOONGARCH_EXTIOI inherit from TYPE_LOONGARCH_EXTIOI_COMMON object, it shares vmsate and property of TYPE_LOONGARCH_EXTIOI_COMM
hw/intc/loongarch_extioi: Inherit from loongarch_extioi_common
Set TYPE_LOONGARCH_EXTIOI inherit from TYPE_LOONGARCH_EXTIOI_COMMON object, it shares vmsate and property of TYPE_LOONGARCH_EXTIOI_COMMON, and has its own realize() function.
Signed-off-by: Bibo Mao <maobibo@loongson.cn> Reviewed-by: Song Gao <gaosong@loongson.cn>
show more ...
|
6b69f778 | 18-Dec-2024 |
Bibo Mao <maobibo@loongson.cn> |
hw/intc/loongarch_extioi: Add common file loongarch_extioi_common
Add new common file loongarch_extioi_common.c, and move vmstate and property structure to common file.
Signed-off-by: Bibo Mao <mao
hw/intc/loongarch_extioi: Add common file loongarch_extioi_common
Add new common file loongarch_extioi_common.c, and move vmstate and property structure to common file.
Signed-off-by: Bibo Mao <maobibo@loongson.cn> Reviewed-by: Song Gao <gaosong@loongson.cn>
show more ...
|
4abf4712 | 19-Sep-2024 |
Bibo Mao <maobibo@loongson.cn> |
hw/intc/loongarch_extioi: Add unrealize interface
For loongarch extioi emulation driver, add unrealize interface and remove instance_finalize interface and move the code to unrealize interface.
Sig
hw/intc/loongarch_extioi: Add unrealize interface
For loongarch extioi emulation driver, add unrealize interface and remove instance_finalize interface and move the code to unrealize interface.
Signed-off-by: Bibo Mao <maobibo@loongson.cn> Reviewed-by: Song Gao <gaosong@loongson.cn>
show more ...
|
aa6330d5 | 20-Sep-2024 |
Bibo Mao <maobibo@loongson.cn> |
hw/intc/loongarch_extioi: Add common realize interface
Add common realize function, it is only to check validity of property.
Signed-off-by: Bibo Mao <maobibo@loongson.cn> Reviewed-by: Song Gao <ga
hw/intc/loongarch_extioi: Add common realize interface
Add common realize function, it is only to check validity of property.
Signed-off-by: Bibo Mao <maobibo@loongson.cn> Reviewed-by: Song Gao <gaosong@loongson.cn>
show more ...
|
c169b51b | 18-Dec-2024 |
Bibo Mao <maobibo@loongson.cn> |
hw/intc/loongarch_extioi: Rename LoongArchExtIOI with LoongArchExtIOICommonState
With some structure such as vmstate and property, rename LoongArchExtIOI with LoongArchExtIOICommonState, these commo
hw/intc/loongarch_extioi: Rename LoongArchExtIOI with LoongArchExtIOICommonState
With some structure such as vmstate and property, rename LoongArchExtIOI with LoongArchExtIOICommonState, these common structure will be moved to common file.
Signed-off-by: Bibo Mao <maobibo@loongson.cn> Reviewed-by: Song Gao <gaosong@loongson.cn>
show more ...
|
b2799f10 | 17-Sep-2024 |
Bibo Mao <maobibo@loongson.cn> |
hw/intc/loongarch_pch: Code cleanup about loongarch_pch_pic
Remove definition about LoongArchPCHPIC and LOONGARCH_PCH_PIC, and replace them with LoongArchPICCommonState and LOONGARCH_PIC_COMMON sepa
hw/intc/loongarch_pch: Code cleanup about loongarch_pch_pic
Remove definition about LoongArchPCHPIC and LOONGARCH_PCH_PIC, and replace them with LoongArchPICCommonState and LOONGARCH_PIC_COMMON separately. Also remove unnecessary header files.
Signed-off-by: Bibo Mao <maobibo@loongson.cn> Reviewed-by: Song Gao <gaosong@loongson.cn>
show more ...
|
36d31cf8 | 17-Sep-2024 |
Bibo Mao <maobibo@loongson.cn> |
hw/intc/loongarch_pch: Add pre_save and post_load interfaces
Add vmstate pre_save and post_load interfaces, which can be used by pic kvm driver in future.
Signed-off-by: Bibo Mao <maobibo@loongson.
hw/intc/loongarch_pch: Add pre_save and post_load interfaces
Add vmstate pre_save and post_load interfaces, which can be used by pic kvm driver in future.
Signed-off-by: Bibo Mao <maobibo@loongson.cn> Reviewed-by: Song Gao <gaosong@loongson.cn>
show more ...
|
8bf26a9e | 18-Sep-2024 |
Bibo Mao <maobibo@loongson.cn> |
hw/intc/loongarch_pch: Inherit from loongarch_pic_common
Set TYPE_LOONGARCH_PIC inherit from TYPE_LOONGARCH_PIC_COMMON object, it shares vmsate and property of TYPE_LOONGARCH_PIC_COMMON, and has its
hw/intc/loongarch_pch: Inherit from loongarch_pic_common
Set TYPE_LOONGARCH_PIC inherit from TYPE_LOONGARCH_PIC_COMMON object, it shares vmsate and property of TYPE_LOONGARCH_PIC_COMMON, and has its own realize() function.
Signed-off-by: Bibo Mao <maobibo@loongson.cn> Reviewed-by: Song Gao <gaosong@loongson.cn>
show more ...
|