• P
    KVM: PPC: Book3S: Fix compile error that occurs with some gcc versions · 6df3877f
    Paul Mackerras 提交于
    Some versions of gcc generate a warning that the variable "emulated"
    may be used uninitialized in function kvmppc_handle_load128_by2x64().
    It would be used uninitialized if kvmppc_handle_load128_by2x64 was
    ever called with vcpu->arch.mmio_vmx_copy_nums == 0, but neither of
    the callers ever do that, so there is no actual bug.  When gcc
    generates a warning, it causes the build to fail because arch/powerpc
    is compiled with -Werror.
    
    This silences the warning by initializing "emulated" to EMULATE_DONE.
    
    Fixes: 09f98496 ("KVM: PPC: Book3S: Add MMIO emulation for VMX instructions")
    Reported-by: NMichael Ellerman <mpe@ellerman.id.au>
    Signed-off-by: NPaul Mackerras <paulus@ozlabs.org>
    6df3877f
powerpc.c 49.8 KB