1. 09 10月, 2019 7 次提交
  2. 08 10月, 2019 2 次提交
  3. 07 10月, 2019 1 次提交
  4. 06 10月, 2019 3 次提交
  5. 05 10月, 2019 1 次提交
  6. 03 10月, 2019 2 次提交
    • I
      selftests/bpf: Correct path to include msg + path · c5881463
      Ivan Khoronzhuk 提交于
      The "path" buf is supposed to contain path + printf msg up to 24 bytes.
      It will be cut anyway, but compiler generates truncation warns like:
      
      "
      samples/bpf/../../tools/testing/selftests/bpf/cgroup_helpers.c: In
      function ‘setup_cgroup_environment’:
      samples/bpf/../../tools/testing/selftests/bpf/cgroup_helpers.c:52:34:
      warning: ‘/cgroup.controllers’ directive output may be truncated
      writing 19 bytes into a region of size between 1 and 4097
      [-Wformat-truncation=]
      snprintf(path, sizeof(path), "%s/cgroup.controllers", cgroup_path);
      				  ^~~~~~~~~~~~~~~~~~~
      samples/bpf/../../tools/testing/selftests/bpf/cgroup_helpers.c:52:2:
      note: ‘snprintf’ output between 20 and 4116 bytes into a destination
      of size 4097
      snprintf(path, sizeof(path), "%s/cgroup.controllers", cgroup_path);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      samples/bpf/../../tools/testing/selftests/bpf/cgroup_helpers.c:72:34:
      warning: ‘/cgroup.subtree_control’ directive output may be truncated
      writing 23 bytes into a region of size between 1 and 4097
      [-Wformat-truncation=]
      snprintf(path, sizeof(path), "%s/cgroup.subtree_control",
      				  ^~~~~~~~~~~~~~~~~~~~~~~
      cgroup_path);
      samples/bpf/../../tools/testing/selftests/bpf/cgroup_helpers.c:72:2:
      note: ‘snprintf’ output between 24 and 4120 bytes into a destination
      of size 4097
      snprintf(path, sizeof(path), "%s/cgroup.subtree_control",
      cgroup_path);
      "
      
      In order to avoid warns, lets decrease buf size for cgroup workdir on
      24 bytes with assumption to include also "/cgroup.subtree_control" to
      the address. The cut will never happen anyway.
      Signed-off-by: NIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: NSong Liu <songliubraving@fb.com>
      Link: https://lore.kernel.org/bpf/20191002120404.26962-3-ivan.khoronzhuk@linaro.org
      c5881463
    • I
      selftests/bpf: Add static to enable_all_controllers() · fb27dcd2
      Ivan Khoronzhuk 提交于
      Add static to enable_all_controllers() to get rid from annoying warning
      during samples/bpf build:
      
      samples/bpf/../../tools/testing/selftests/bpf/cgroup_helpers.c:44:5:
      warning: no previous prototype for ‘enable_all_controllers’
      [-Wmissing-prototypes]
       int enable_all_controllers(char *cgroup_path)
      Signed-off-by: NIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: NSong Liu <songliubraving@fb.com>
      Link: https://lore.kernel.org/bpf/20191002120404.26962-2-ivan.khoronzhuk@linaro.org
      fb27dcd2
  7. 28 9月, 2019 1 次提交
  8. 26 9月, 2019 4 次提交
  9. 25 9月, 2019 5 次提交
  10. 24 9月, 2019 5 次提交
    • V
      KVM: selftests: hyperv_cpuid: add check for NoNonArchitecturalCoreSharing bit · e738772e
      Vitaly Kuznetsov 提交于
      The bit is supposed to be '1' when SMT is not supported or forcefully
      disabled and '0' otherwise.
      Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      e738772e
    • P
      KVM: selftests: Remove duplicate guest mode handling · 52200d0d
      Peter Xu 提交于
      Remove the duplication code in run_test() of dirty_log_test because
      after some reordering of functions now we can directly use the outcome
      of vm_create().
      
      Meanwhile, with the new VM_MODE_PXXV48_4K, we can safely revert
      b442324b too where we stick the x86_64 PA width to 39 bits for
      dirty_log_test.
      Reviewed-by: NAndrew Jones <drjones@redhat.com>
      Signed-off-by: NPeter Xu <peterx@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      52200d0d
    • P
      KVM: selftests: Introduce VM_MODE_PXXV48_4K · 567a9f1e
      Peter Xu 提交于
      The naming VM_MODE_P52V48_4K is explicit but unclear when used on
      x86_64 machines, because x86_64 machines are having various physical
      address width rather than some static values.  Here's some examples:
      
        - Intel Xeon E3-1220:  36 bits
        - Intel Core i7-8650:  39 bits
        - AMD   EPYC 7251:     48 bits
      
      All of them are using 48 bits linear address width but with totally
      different physical address width (and most of the old machines should
      be less than 52 bits).
      
      Let's create a new guest mode called VM_MODE_PXXV48_4K for current
      x86_64 tests and make it as the default to replace the old naming of
      VM_MODE_P52V48_4K because it shows more clearly that the PA width is
      not really a constant.  Meanwhile we also stop assuming all the x86
      machines are having 52 bits PA width but instead we fetch the real
      vm->pa_bits from CPUID 0x80000008 during runtime.
      
      We currently make this exclusively used by x86_64 but no other arch.
      
      As a slight touch up, moving DEBUG macro from dirty_log_test.c to
      kvm_util.h so lib can use it too.
      Signed-off-by: NPeter Xu <peterx@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      567a9f1e
    • P
      KVM: selftests: Create VM earlier for dirty log test · 338eb298
      Peter Xu 提交于
      Since we've just removed the dependency of vm type in previous patch,
      now we can create the vm much earlier.  Note that to move it earlier
      we used an approximation of number of extra pages but it should be
      fine.
      
      This prepares for the follow up patches to finally remove the
      duplication of guest mode parsings.
      Reviewed-by: NAndrew Jones <drjones@redhat.com>
      Signed-off-by: NPeter Xu <peterx@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      338eb298
    • P
      KVM: selftests: Move vm type into _vm_create() internally · 12c386b2
      Peter Xu 提交于
      Rather than passing the vm type from the top level to the end of vm
      creation, let's simply keep that as an internal of kvm_vm struct and
      decide the type in _vm_create().  Several reasons for doing this:
      
      - The vm type is only decided by physical address width and currently
        only used in aarch64, so we've got enough information as long as
        we're passing vm_guest_mode into _vm_create(),
      
      - This removes a loop dependency between the vm->type and creation of
        vms.  That's why now we need to parse vm_guest_mode twice sometimes,
        once in run_test() and then again in _vm_create().  The follow up
        patches will move on to clean up that as well so we can have a
        single place to decide guest machine types and so.
      
      Note that this patch will slightly change the behavior of aarch64
      tests in that previously most vm_create() callers will directly pass
      in type==0 into _vm_create() but now the type will depend on
      vm_guest_mode, however it shouldn't affect any user because all
      vm_create() users of aarch64 will be using VM_MODE_DEFAULT guest
      mode (which is VM_MODE_P40V48_4K) so at last type will still be zero.
      Reviewed-by: NAndrew Jones <drjones@redhat.com>
      Signed-off-by: NPeter Xu <peterx@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      12c386b2
  11. 23 9月, 2019 6 次提交
  12. 21 9月, 2019 3 次提交