• Xiao Guangrong's avatar
    KVM: Add "exiting guest mode" state · 6b7e2d09
    Xiao Guangrong authored
    Currently we keep track of only two states: guest mode and host
    mode.  This patch adds an "exiting guest mode" state that tells
    us that an IPI will happen soon, so unless we need to wait for the
    IPI, we can avoid it completely.
    
    Also
    1: No need atomically to read/write ->mode in vcpu's thread
    
    2: reorganize struct kvm_vcpu to make ->mode and ->requests
       in the same cache line explicitly
    Signed-off-by: default avatarXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
    Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
    6b7e2d09
kvm-ia64.c 44.2 KB