cmpxchg_guest_abs_with_key(9)
π¦ cmpxchg_guest_abs_with_key(9) π¦
okay bestie, welcome to the Kernel API Manual entry for cmpxchg_guest_abs_with_key β yes, the name is a mouthful, but weβre gonna make it make sense. π
πΈ NAME πΈ
cmpxchg_guest_abs_with_key β perform cmpxchg on guest absolute address. itβs giving βatomic compare-and-exchange, but for a guest absolute address,β and honestly? iconic. β¨
π SYNOPSIS π
int cmpxchg_guest_abs_with_key (struct kvm *kvm , gpa_t gpa , int len ,
union kvm_s390_quad *old , union kvm_s390_quad new , u8 acc , bool
*success );
β¨ ARGUMENTS β¨
kvmβ virtual machine instance. π»gpaβ absolute guest address of the location to be changed. πlenβ operand length of the cmpxchg. required:1 <= len <= 16. providing a non power of two will result in failure. π¨oldβ pointer to old value. if the location atgpacontains this value, the exchange will succeed. after callingcmpxchg_guest_abs_with_key,*oldcontains the value atgpabefore the attempt to exchange the value. π«Άnewβ the value to place atgpa. πaccβ the access key to use for the guest access. πsuccessβ output value indicating if an exchange occurred. β
π DESCRIPTION π
atomically exchange the value at gpa by new, if it contains *old. it honors storage keys. periodt. π₯
π RETURN π
0: successful exchange>0: a program interruption code indicating the reason cmpxchg could not be attempted-EINVAL: address misaligned orlennot power of two-EAGAIN: transient failure (len1 or 2)-EOPNOTSUPP: read-only memslot (should never occur)
π¦ SEE ALSO π¦
Kernel file ./arch/s390/kvm/s390/gaccess.c β the main character β plus the whole crew:
guest_translate_gva(9)guest_range_to_gpas(9)__cmpxchg_with_key(9)guest_translate_address_with_key(9)check_gva_range(9)check_gpa_range(9)kvm_s390_check_low_addr_prot_real(9)walk_guest_tables(9)__gaccess_shadow_fault(9)
mwah π β this pageβs source/version is ./arch/s390/kvm/s390, dated October 2026, page cmpxchg_guest_abs_with_key(9). thatβs the footer, bestie, now go be iconic. π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms