Skip to content
  • Yoshimi Ichiyanagi's avatar
    [PATCH] KVM: Initialize kvm_arch_ops on unload · 09db28b8
    Yoshimi Ichiyanagi authored
    
    
    The latest version of kvm doesn't initialize kvm_arch_ops in kvm_init(), which
    causes an error with the following sequence.
    
    1. Load the supported arch's module.
    2. Load the unsupported arch's module.$B!!(B(loading error)
    3. Unload the unsupported arch's module.
    
    You'll get the following error message after step 3.  "BUG: unable to handle
    to handle kernel paging request at virtual address xxxxxxxx"
    
    The problem here is that the unsupported arch's module overwrites kvm_arch_ops
    of the supported arch's module at step 2.
    
    This patch initializes kvm_arch_ops upon loading architecture specific kvm
    module, and prevents overwriting kvm_arch_ops when kvm_arch_ops is already set
    correctly.
    
    Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    09db28b8