summaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/kvm_booke.h
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2011-12-12 12:30:16 (GMT)
committerAvi Kivity <avi@redhat.com>2012-03-05 12:52:36 (GMT)
commit075295dd322b0c0de0c9ecf8e0cb19ee813438ed (patch)
tree5e87ae30e3d74feaf2f39f919529f21518e6e17a /arch/powerpc/include/asm/kvm_booke.h
parent93e602490c1da83162a8b6ba86b4b48a7a0f0c9e (diff)
downloadlinux-075295dd322b0c0de0c9ecf8e0cb19ee813438ed.tar.xz
KVM: PPC: Make the H_ENTER hcall more reliable
At present, our implementation of H_ENTER only makes one try at locking each slot that it looks at, and doesn't even retry the ldarx/stdcx. atomic update sequence that it uses to attempt to lock the slot. Thus it can return the H_PTEG_FULL error unnecessarily, particularly when the H_EXACT flag is set, meaning that the caller wants a specific PTEG slot. This improves the situation by making a second pass when no free HPTE slot is found, where we spin until we succeed in locking each slot in turn and then check whether it is full while we hold the lock. If the second pass fails, then we return H_PTEG_FULL. This also moves lock_hpte to a header file (since later commits in this series will need to use it from other source files) and renames it to try_lock_hpte, which is a somewhat less misleading name. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/powerpc/include/asm/kvm_booke.h')
0 files changed, 0 insertions, 0 deletions