1. 16 4月, 2020 21 次提交
  2. 14 4月, 2020 5 次提交
  3. 07 4月, 2020 8 次提交
  4. 03 4月, 2020 6 次提交
    • U
      KVM: SVM: Split svm_vcpu_run inline assembly to separate file · 199cd1d7
      Uros Bizjak 提交于
      The compiler (GCC) does not like the situation, where there is inline
      assembly block that clobbers all available machine registers in the
      middle of the function. This situation can be found in function
      svm_vcpu_run in file kvm/svm.c and results in many register spills and
      fills to/from stack frame.
      
      This patch fixes the issue with the same approach as was done for
      VMX some time ago. The big inline assembly is moved to a separate
      assembly .S file, taking into account all ABI requirements.
      
      There are two main benefits of the above approach:
      
      * elimination of several register spills and fills to/from stack
      frame, and consequently smaller function .text size. The binary size
      of svm_vcpu_run is lowered from 2019 to 1626 bytes.
      
      * more efficient access to a register save array. Currently, register
      save array is accessed as:
      
          7b00:    48 8b 98 28 02 00 00     mov    0x228(%rax),%rbx
          7b07:    48 8b 88 18 02 00 00     mov    0x218(%rax),%rcx
          7b0e:    48 8b 90 20 02 00 00     mov    0x220(%rax),%rdx
      
      and passing ia pointer to a register array as an argument to a function one gets:
      
        12:    48 8b 48 08              mov    0x8(%rax),%rcx
        16:    48 8b 50 10              mov    0x10(%rax),%rdx
        1a:    48 8b 58 18              mov    0x18(%rax),%rbx
      
      As a result, the total size, considering that the new function size is 229
      bytes, gets lowered by 164 bytes.
      Signed-off-by: NUros Bizjak <ubizjak@gmail.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      199cd1d7
    • J
      KVM: SVM: Move SEV code to separate file · eaf78265
      Joerg Roedel 提交于
      Move the SEV specific parts of svm.c into the new sev.c file.
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      Message-Id: <20200324094154.32352-5-joro@8bytes.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      eaf78265
    • J
      KVM: SVM: Move AVIC code to separate file · ef0f6496
      Joerg Roedel 提交于
      Move the AVIC related functions from svm.c to the new avic.c file.
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      Message-Id: <20200324094154.32352-4-joro@8bytes.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      ef0f6496
    • J
      KVM: SVM: Move Nested SVM Implementation to nested.c · 883b0a91
      Joerg Roedel 提交于
      Split out the code for the nested SVM implementation and move it to a
      separate file.
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      Message-Id: <20200324094154.32352-3-joro@8bytes.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      883b0a91
    • J
      kVM SVM: Move SVM related files to own sub-directory · 46a010dd
      Joerg Roedel 提交于
      Move svm.c and pmu_amd.c into their own arch/x86/kvm/svm/
      subdirectory.
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      Message-Id: <20200324094154.32352-2-joro@8bytes.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      46a010dd
    • L
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 8c1b724d
      Linus Torvalds 提交于
      Pull kvm updates from Paolo Bonzini:
       "ARM:
         - GICv4.1 support
      
         - 32bit host removal
      
        PPC:
         - secure (encrypted) using under the Protected Execution Framework
           ultravisor
      
        s390:
         - allow disabling GISA (hardware interrupt injection) and protected
           VMs/ultravisor support.
      
        x86:
         - New dirty bitmap flag that sets all bits in the bitmap when dirty
           page logging is enabled; this is faster because it doesn't require
           bulk modification of the page tables.
      
         - Initial work on making nested SVM event injection more similar to
           VMX, and less buggy.
      
         - Various cleanups to MMU code (though the big ones and related
           optimizations were delayed to 5.8). Instead of using cr3 in
           function names which occasionally means eptp, KVM too has
           standardized on "pgd".
      
         - A large refactoring of CPUID features, which now use an array that
           parallels the core x86_features.
      
         - Some removal of pointer chasing from kvm_x86_ops, which will also
           be switched to static calls as soon as they are available.
      
         - New Tigerlake CPUID features.
      
         - More bugfixes, optimizations and cleanups.
      
        Generic:
         - selftests: cleanups, new MMU notifier stress test, steal-time test
      
         - CSV output for kvm_stat"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (277 commits)
        x86/kvm: fix a missing-prototypes "vmread_error"
        KVM: x86: Fix BUILD_BUG() in __cpuid_entry_get_reg() w/ CONFIG_UBSAN=y
        KVM: VMX: Add a trampoline to fix VMREAD error handling
        KVM: SVM: Annotate svm_x86_ops as __initdata
        KVM: VMX: Annotate vmx_x86_ops as __initdata
        KVM: x86: Drop __exit from kvm_x86_ops' hardware_unsetup()
        KVM: x86: Copy kvm_x86_ops by value to eliminate layer of indirection
        KVM: x86: Set kvm_x86_ops only after ->hardware_setup() completes
        KVM: VMX: Configure runtime hooks using vmx_x86_ops
        KVM: VMX: Move hardware_setup() definition below vmx_x86_ops
        KVM: x86: Move init-only kvm_x86_ops to separate struct
        KVM: Pass kvm_init()'s opaque param to additional arch funcs
        s390/gmap: return proper error code on ksm unsharing
        KVM: selftests: Fix cosmetic copy-paste error in vm_mem_region_move()
        KVM: Fix out of range accesses to memslots
        KVM: X86: Micro-optimize IPI fastpath delay
        KVM: X86: Delay read msr data iff writes ICR MSR
        KVM: PPC: Book3S HV: Add a capability for enabling secure guests
        KVM: arm64: GICv4.1: Expose HW-based SGIs in debugfs
        KVM: arm64: GICv4.1: Allow non-trapping WFI when using HW SGIs
        ...
      8c1b724d