Commit 0bf46a40a1fe22e35df344af1a8825f3b47a91e0
1 parent
43b96858
qemu: introduce qemu_init_vcpu (Marcelo Tosatti)
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7242 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
11 changed files
with
26 additions
and
4 deletions
qemu-common.h
... | ... | @@ -189,6 +189,12 @@ void qemu_service_io(void); |
189 | 189 | /* Force QEMU to process pending events */ |
190 | 190 | void qemu_notify_event(void); |
191 | 191 | |
192 | +#ifdef CONFIG_USER_ONLY | |
193 | +#define qemu_init_vcpu(env) do { } while (0) | |
194 | +#else | |
195 | +void qemu_init_vcpu(void *env); | |
196 | +#endif | |
197 | + | |
192 | 198 | typedef struct QEMUIOVector { |
193 | 199 | struct iovec *iov; |
194 | 200 | int niov; | ... | ... |
target-alpha/translate.c
target-arm/helper.c
target-cris/translate.c
target-i386/helper.c
target-m68k/helper.c
target-mips/translate.c
target-ppc/helper.c
target-sh4/translate.c
target-sparc/helper.c
vl.c
... | ... | @@ -3731,6 +3731,15 @@ static int qemu_init_main_loop(void) |
3731 | 3731 | return qemu_event_init(); |
3732 | 3732 | } |
3733 | 3733 | |
3734 | +void qemu_init_vcpu(void *_env) | |
3735 | +{ | |
3736 | + CPUState *env = _env; | |
3737 | + | |
3738 | + if (kvm_enabled()) | |
3739 | + kvm_init_vcpu(env); | |
3740 | + return; | |
3741 | +} | |
3742 | + | |
3734 | 3743 | #ifdef _WIN32 |
3735 | 3744 | static void host_main_loop_wait(int *timeout) |
3736 | 3745 | { | ... | ... |