All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH_V3] Adding ifdefs to call the respective routines only when their configs are enabled
@ 2021-05-25  2:58 Swetha Joshi
  2021-05-25  3:20 ` Richard Henderson
  0 siblings, 1 reply; 19+ messages in thread
From: Swetha Joshi @ 2021-05-25  2:58 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Swetha Joshi

Signed-off-by: Swetha Joshi <swethajoshi139@gmail.com>
---
 target/arm/kvm64.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c
index dff85f6db9..47a4d9d831 100644
--- a/target/arm/kvm64.c
+++ b/target/arm/kvm64.c
@@ -1403,7 +1403,10 @@ void kvm_arch_on_sigbus_vcpu(CPUState *c, int code, void *addr)
     hwaddr paddr;
     Object *obj = qdev_get_machine();
     VirtMachineState *vms = VIRT_MACHINE(obj);
-    bool acpi_enabled = virt_is_acpi_enabled(vms);
+    bool acpi_enabled = false;
+#ifdef CONFIG_ARM_VIRT
+    acpi_enabled = virt_is_acpi_enabled(vms);
+#endif /* CONFIG_ARM_VIRT */
 
     assert(code == BUS_MCEERR_AR || code == BUS_MCEERR_AO);
 
@@ -1426,12 +1429,13 @@ void kvm_arch_on_sigbus_vcpu(CPUState *c, int code, void *addr)
              */
             if (code == BUS_MCEERR_AR) {
                 kvm_cpu_synchronize_state(c);
-                if (!acpi_ghes_record_errors(ACPI_HEST_SRC_ID_SEA, paddr)) {
-                    kvm_inject_arm_sea(c);
-                } else {
+#ifdef CONFIG_ACPI_APEI
+                if (acpi_ghes_record_errors(ACPI_HEST_SRC_ID_SEA, paddr)) {
                     error_report("failed to record the error");
                     abort();
                 }
+#endif /* CONFIG_ACPI_APEI */
+                kvm_inject_arm_sea(c);
             }
             return;
         }
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2021-09-07 10:04 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-25  2:58 [PATCH_V3] Adding ifdefs to call the respective routines only when their configs are enabled Swetha Joshi
2021-05-25  3:20 ` Richard Henderson
     [not found]   ` <CALf2nmKjSB0FN1ZotYjLKF+BBsWiwLPUDjkNeRgq1HkG4P=Aow@mail.gmail.com>
2021-05-25  4:14     ` Richard Henderson
2021-05-25  6:45   ` Philippe Mathieu-Daudé
2021-05-25  9:04   ` Peter Maydell
2021-05-25 16:27     ` Swetha Joshi
2021-05-25 17:15       ` Peter Maydell
2021-05-26 17:32         ` Swetha Joshi
2021-05-26 18:19           ` Peter Maydell
2021-05-28  7:08             ` Dongjiu Geng
2021-05-28 19:41               ` Swetha Joshi
2021-06-02 13:44                 ` Dongjiu Geng
2021-06-03 17:17                   ` Swetha Joshi
2021-06-03 17:22                 ` Peter Maydell
2021-06-03 17:30                   ` Swetha Joshi
2021-06-04  5:25                     ` Swetha Joshi
2021-06-04  9:03                       ` Peter Maydell
2021-06-04 15:06                         ` Swetha Joshi
2021-09-07 10:02                           ` Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.