Re: [Qemu-devel] [PATCH uq/master v2 1/2] kvm: reset state from the CPU's reset method

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

 



On Tue, Apr 02, 2013 at 04:29:32PM +0300, Gleb Natapov wrote:
> >  static void kvm_sw_tlb_put(PowerPCCPU *cpu)
> >  {
> >      CPUPPCState *env = &cpu->env;
> > diff --git a/target-s390x/cpu.c b/target-s390x/cpu.c
> > index 23fe51f..6321384 100644
> > --- a/target-s390x/cpu.c
> > +++ b/target-s390x/cpu.c
> > @@ -84,6 +84,10 @@ static void s390_cpu_reset(CPUState *s)
> >       * after incrementing the cpu counter */
> >  #if !defined(CONFIG_USER_ONLY)
> >      s->halted = 1;
> > +
> > +    if (kvm_enabled()) {
> > +        kvm_arch_reset_vcpu(s);
> Does this compile with kvm support disabled?
> 
Well, it does not:
  CC    s390x-softmmu/target-s390x/cpu.o
/users/gleb/work/qemu/target-s390x/cpu.c: In function 's390_cpu_reset':
/users/gleb/work/qemu/target-s390x/cpu.c:89:9: error: implicit
declaration of function 'kvm_arch_reset_vcpu'
[-Werror=implicit-function-declaration]
/users/gleb/work/qemu/target-s390x/cpu.c:89:9: error: nested extern
declaration of 'kvm_arch_reset_vcpu' [-Werror=nested-externs]
cc1: all warnings being treated as errors

I wonder if it is portable between compilers to rely on code in if(0){} to
be dropped in all levels of optimizations.

--
			Gleb.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux