qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH 01/15] accel/kvm: Add more stubs


From: Richard Henderson
Subject: Re: [RFC PATCH 01/15] accel/kvm: Add more stubs
Date: Wed, 26 May 2021 11:35:54 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

On 5/17/21 4:55 AM, Philippe Mathieu-Daudé wrote:
To be able to make softmmu/cpus.c not target-specific, we need to
add two more KVM stubs, to avoid:

   /usr/bin/ld: libcommon.fa.p/softmmu_cpus.c.o: in function 
`cpu_thread_is_idle':
   softmmu/cpus.c:85: undefined reference to `kvm_halt_in_kernel_allowed'
   /usr/bin/ld: libcommon.fa.p/softmmu_cpus.c.o: in function 
`cpu_check_are_resettable':
   include/sysemu/hw_accel.h:28: undefined reference to 
`kvm_cpu_check_are_resettable'

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
  accel/stubs/kvm-stub.c | 7 +++++++
  1 file changed, 7 insertions(+)

diff --git a/accel/stubs/kvm-stub.c b/accel/stubs/kvm-stub.c
index 5b1d00a2224..6bda6c8c925 100644
--- a/accel/stubs/kvm-stub.c
+++ b/accel/stubs/kvm-stub.c
@@ -20,6 +20,7 @@
  KVMState *kvm_state;
  bool kvm_kernel_irqchip;
  bool kvm_async_interrupts_allowed;
+bool kvm_halt_in_kernel_allowed;
  bool kvm_eventfds_allowed;
  bool kvm_irqfds_allowed;
  bool kvm_resamplefds_allowed;
@@ -147,4 +148,10 @@ bool kvm_arm_supports_user_irq(void)
  {
      return false;
  }
+
+bool kvm_cpu_check_are_resettable(void)
+{
+    g_assert_not_reached();
+}
+

It should be easy to turn cpus_are_resettable into an AccelOpsClass hook.

It's less obvious how to do that for cpu_thread_is_idle, but it's clear with the kvm and whpx checks that something is required.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]