summary refs log tree commit diff stats
path: root/include/hw/loongarch/virt.h
diff options
context:
space:
mode:
authorBibo Mao <maobibo@loongson.cn>2025-02-17 09:56:13 +0800
committerBibo Mao <maobibo@loongson.cn>2025-02-25 16:05:31 +0800
commitdb369c11c90b35f3a6ab59ad78564aea5b30c3da (patch)
tree6e420a1c1acd5edafa3f89b4b945ece9cd933715 /include/hw/loongarch/virt.h
parent954cc5c311cd4459ce16a3302ff8611d98473d7d (diff)
downloadfocaccia-qemu-db369c11c90b35f3a6ab59ad78564aea5b30c3da.tar.gz
focaccia-qemu-db369c11c90b35f3a6ab59ad78564aea5b30c3da.zip
target/loongarch: Enable virtual extioi feature
Feature virtual extioi is loongArch virt machine property rather than
vCPU property in qemu side. However it is vCPU property in KVM kernel
side, here add loongArch virt machine property checking and enable virt
extioi feature when vCPU is created.

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Bibo Mao <maobibo@loongson.cn>
Diffstat (limited to 'include/hw/loongarch/virt.h')
-rw-r--r--include/hw/loongarch/virt.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/hw/loongarch/virt.h b/include/hw/loongarch/virt.h
index 661efae61d..2e7cdfaef0 100644
--- a/include/hw/loongarch/virt.h
+++ b/include/hw/loongarch/virt.h
@@ -68,4 +68,13 @@ struct LoongArchVirtMachineState {
 OBJECT_DECLARE_SIMPLE_TYPE(LoongArchVirtMachineState, LOONGARCH_VIRT_MACHINE)
 void virt_acpi_setup(LoongArchVirtMachineState *lvms);
 void virt_fdt_setup(LoongArchVirtMachineState *lvms);
+
+static inline bool virt_is_veiointc_enabled(LoongArchVirtMachineState *lvms)
+{
+    if (lvms->veiointc == ON_OFF_AUTO_OFF) {
+        return false;
+    }
+    return true;
+}
+
 #endif