1. 11 Jun, 2022 27 commits
  2. 10 Jun, 2022 8 commits
  3. 09 Jun, 2022 5 commits
    • Paolo Bonzini's avatar
      Merge branch 'kvm-5.20-early' · e15f5e6f
      Paolo Bonzini authored
      s390:
      
      * add an interface to provide a hypervisor dump for secure guests
      
      * improve selftests to show tests
      
      x86:
      
      * Intel IPI virtualization
      
      * Allow getting/setting pending triple fault with KVM_GET/SET_VCPU_EVENTS
      
      * PEBS virtualization
      
      * Simplify PMU emulation by just using PERF_TYPE_RAW events
      
      * More accurate event reinjection on SVM (avoid retrying instructions)
      
      * Allow getting/setting the state of the speaker port data bit
      
      * Rewrite gfn-pfn cache refresh
      
      * Refuse starting the module if VM-Entry/VM-Exit controls are inconsistent
      
      * "Notify" VM exit
      e15f5e6f
    • David Matlack's avatar
      KVM: selftests: Restrict test region to 48-bit physical addresses when using nested · e0f3f46e
      David Matlack authored
      The selftests nested code only supports 4-level paging at the moment.
      This means it cannot map nested guest physical addresses with more than
      48 bits. Allow perf_test_util nested mode to work on hosts with more
      than 48 physical addresses by restricting the guest test region to
      48-bits.
      
      While here, opportunistically fix an off-by-one error when dealing with
      vm_get_max_gfn(). perf_test_util.c was treating this as the maximum
      number of GFNs, rather than the maximum allowed GFN. This didn't result
      in any correctness issues, but it did end up shifting the test region
      down slightly when using huge pages.
      Suggested-by: default avatarSean Christopherson <seanjc@google.com>
      Signed-off-by: default avatarDavid Matlack <dmatlack@google.com>
      Message-Id: <20220520233249.3776001-12-dmatlack@google.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      e0f3f46e
    • David Matlack's avatar
      KVM: selftests: Add option to run dirty_log_perf_test vCPUs in L2 · 71d48966
      David Matlack authored
      Add an option to dirty_log_perf_test that configures the vCPUs to run in
      L2 instead of L1. This makes it possible to benchmark the dirty logging
      performance of nested virtualization, which is particularly interesting
      because KVM must shadow L1's EPT/NPT tables.
      
      For now this support only works on x86_64 CPUs with VMX. Otherwise
      passing -n results in the test being skipped.
      Signed-off-by: default avatarDavid Matlack <dmatlack@google.com>
      Message-Id: <20220520233249.3776001-11-dmatlack@google.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      71d48966
    • David Matlack's avatar
      KVM: selftests: Clean up LIBKVM files in Makefile · cf97d5e9
      David Matlack authored
      Break up the long lines for LIBKVM and alphabetize each architecture.
      This makes reading the Makefile easier, and will make reading diffs to
      LIBKVM easier.
      
      No functional change intended.
      Reviewed-by: default avatarPeter Xu <peterx@redhat.com>
      Signed-off-by: default avatarDavid Matlack <dmatlack@google.com>
      Message-Id: <20220520233249.3776001-10-dmatlack@google.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      cf97d5e9
    • David Matlack's avatar
      KVM: selftests: Link selftests directly with lib object files · cdc979da
      David Matlack authored
      The linker does obey strong/weak symbols when linking static libraries,
      it simply resolves an undefined symbol to the first-encountered symbol.
      This means that defining __weak arch-generic functions and then defining
      arch-specific strong functions to override them in libkvm will not
      always work.
      
      More specifically, if we have:
      
      lib/generic.c:
      
        void __weak foo(void)
        {
                pr_info("weak\n");
        }
      
        void bar(void)
        {
                foo();
        }
      
      lib/x86_64/arch.c:
      
        void foo(void)
        {
                pr_info("strong\n");
        }
      
      And a selftest that calls bar(), it will print "weak". Now if you make
      generic.o explicitly depend on arch.o (e.g. add function to arch.c that
      is called directly from generic.c) it will print "strong". In other
      words, it seems that the linker is free to throw out arch.o when linking
      because generic.o does not explicitly depend on it, which causes the
      linker to lose the strong symbol.
      
      One solution is to link libkvm.a with --whole-archive so that the linker
      doesn't throw away object files it thinks are unnecessary. However that
      is a bit difficult to plumb since we are using the common selftests
      makefile rules. An easier solution is to drop libkvm.a just link
      selftests with all the .o files that were originally in libkvm.a.
      Reviewed-by: default avatarPeter Xu <peterx@redhat.com>
      Signed-off-by: default avatarDavid Matlack <dmatlack@google.com>
      Message-Id: <20220520233249.3776001-9-dmatlack@google.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      cdc979da