# git rev-parse -q --verify c83c7a55453f822f602332d22328a288f281ff59^{commit} c83c7a55453f822f602332d22328a288f281ff59 already have revision, skipping fetch # git checkout -q -f -B kisskb c83c7a55453f822f602332d22328a288f281ff59 # git clean -qxdf # < git log -1 # commit c83c7a55453f822f602332d22328a288f281ff59 # Author: Alexey Kardashevskiy # Date: Fri Sep 3 15:15:25 2021 +1000 # # KVM: PPC: Merge powerpc's debugfs entry content into generic entry # # At the moment KVM on PPC creates 3 types of entries under the kvm debugfs: # 1) "%pid-%fd" per a KVM instance (for all platforms); # 2) "vm%pid" (for PPC Book3s HV KVM); # 3) "vm%u_vcpu%u_timing" (for PPC Book3e KVM). # # The problem with this is that multiple VMs per process is not allowed for # 2) and 3) which makes it possible for userspace to trigger errors when # creating duplicated debugfs entries. # # This merges all these into 1). # # This defines kvm_arch_create_kvm_debugfs() similar to # kvm_arch_create_vcpu_debugfs(). # # This defines 2 hooks in kvmppc_ops that allow specific KVM implementations # add necessary entries, this adds the _e500 suffix to # kvmppc_create_vcpu_debugfs_e500() to make it clear what platform it is for. # # This makes use of already existing kvm_arch_create_vcpu_debugfs() on PPC. # # This removes no more used debugfs_dir pointers from PPC kvm_arch structs. # # This stops removing vcpu entries as once created vcpus stay around # for the entire life of a VM and removed when the KVM instance is closed, # see d56f5136b010 ("KVM: let kvm_destroy_vm_debugfs clean up vCPU # debugfs directories". # # Suggested-by: Fabiano Rosas # Signed-off-by: Alexey Kardashevskiy # --- # Changes: # v3: # * reworked commit log, especially, the bit about removing vcpus # # v2: # * handled powerpc-booke # * s/kvm/vm/ in arch hooks # < /opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld --version # < git log --format=%s --max-count=1 c83c7a55453f822f602332d22328a288f281ff59 # < make -s -j 8 ARCH=powerpc O=/kisskb/build/aik_powernv_defconfig+STRICT_RWX_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- powernv_defconfig # Added to kconfig CONFIG_RELOCATABLE=n # Added to kconfig CONFIG_STRICT_KERNEL_RWX=y # < make -s -j 8 ARCH=powerpc O=/kisskb/build/aik_powernv_defconfig+STRICT_RWX_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- help # make -s -j 8 ARCH=powerpc O=/kisskb/build/aik_powernv_defconfig+STRICT_RWX_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- olddefconfig .config:4063:warning: override: reassigning to symbol RELOCATABLE # make -s -j 8 ARCH=powerpc O=/kisskb/build/aik_powernv_defconfig+STRICT_RWX_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- :1559:2: warning: #warning syscall futex_waitv not implemented [-Wcpp] Completed OK # rm -rf /kisskb/build/aik_powernv_defconfig+STRICT_RWX_powerpc-gcc5 # Build took: 0:05:28.638053