[PATCH] D72184: [BPF] support atomic instructions

Yonghong Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 23 08:24:25 PST 2020


yonghong-song added a comment.

Ya, the above llvm crash is expected as bpf backend does not handle AtomicStore.

For kernel code, I can see:

  kvm/x86.c:      vcpu->arch.nmi_pending += atomic_xchg(&vcpu->arch.nmi_queued, 0);

...

  kvm/x86.c:              atomic_set(&kvm_guest_has_master_clock, 1);

So for atomic_set we do not return a value, right?

I did not see kernel has atomic_store, do you mean atomic_set?

Do you suggest we also implement atomic_set? There is no need for 64-bit architecture like x64, right?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72184/new/

https://reviews.llvm.org/D72184



More information about the cfe-commits mailing list