1. 07 12月, 2012 1 次提交
  2. 06 12月, 2012 2 次提交
    • X
      KVM: MMU: optimize for set_spte · c2193463
      Xiao Guangrong 提交于
      There are two cases we need to adjust page size in set_spte:
      1): the one is other vcpu creates new sp in the window between mapping_level()
          and acquiring mmu-lock.
      2): the another case is the new sp is created by itself (page-fault path) when
          guest uses the target gfn as its page table.
      
      In current code, set_spte drop the spte and emulate the access for these case,
      it works not good:
      - for the case 1, it may destroy the mapping established by other vcpu, and
        do expensive instruction emulation.
      - for the case 2, it may emulate the access even if the guest is accessing
        the page which not used as page table. There is a example, 0~2M is used as
        huge page in guest, in this huge page, only page 3 used as page table, then
        guest read/writes on other pages can cause instruction emulation.
      
      Both of these cases can be fixed by allowing guest to retry the access, it
      will refault, then we can establish the mapping by using small page
      Signed-off-by: NXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
      Acked-by: NMarcelo Tosatti <mtosatti@redhat.com>
      Signed-off-by: NGleb Natapov <gleb@redhat.com>
      c2193463
    • J
      KVM: x86: Make register state after reset conform to specification · 66f7b72e
      Julian Stecklina 提交于
      VMX behaves now as SVM wrt to FPU initialization. Code has been moved to
      generic code path. General-purpose registers are now cleared on reset and
      INIT.  SVM code properly initializes EDX.
      Signed-off-by: NJulian Stecklina <jsteckli@os.inf.tu-dresden.de>
      Signed-off-by: NGleb Natapov <gleb@redhat.com>
      66f7b72e
  3. 05 12月, 2012 4 次提交
  4. 02 12月, 2012 1 次提交
  5. 01 12月, 2012 2 次提交
    • W
      KVM: x86: Emulate IA32_TSC_ADJUST MSR · ba904635
      Will Auld 提交于
      CPUID.7.0.EBX[1]=1 indicates IA32_TSC_ADJUST MSR 0x3b is supported
      
      Basic design is to emulate the MSR by allowing reads and writes to a guest
      vcpu specific location to store the value of the emulated MSR while adding
      the value to the vmcs tsc_offset. In this way the IA32_TSC_ADJUST value will
      be included in all reads to the TSC MSR whether through rdmsr or rdtsc. This
      is of course as long as the "use TSC counter offsetting" VM-execution control
      is enabled as well as the IA32_TSC_ADJUST control.
      
      However, because hardware will only return the TSC + IA32_TSC_ADJUST +
      vmsc tsc_offset for a guest process when it does and rdtsc (with the correct
      settings) the value of our virtualized IA32_TSC_ADJUST must be stored in one
      of these three locations. The argument against storing it in the actual MSR
      is performance. This is likely to be seldom used while the save/restore is
      required on every transition. IA32_TSC_ADJUST was created as a way to solve
      some issues with writing TSC itself so that is not an option either.
      
      The remaining option, defined above as our solution has the problem of
      returning incorrect vmcs tsc_offset values (unless we intercept and fix, not
      done here) as mentioned above. However, more problematic is that storing the
      data in vmcs tsc_offset will have a different semantic effect on the system
      than does using the actual MSR. This is illustrated in the following example:
      
      The hypervisor set the IA32_TSC_ADJUST, then the guest sets it and a guest
      process performs a rdtsc. In this case the guest process will get
      TSC + IA32_TSC_ADJUST_hyperviser + vmsc tsc_offset including
      IA32_TSC_ADJUST_guest. While the total system semantics changed the semantics
      as seen by the guest do not and hence this will not cause a problem.
      Signed-off-by: NWill Auld <will.auld@intel.com>
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      ba904635
    • W
      KVM: x86: Add code to track call origin for msr assignment · 8fe8ab46
      Will Auld 提交于
      In order to track who initiated the call (host or guest) to modify an msr
      value I have changed function call parameters along the call path. The
      specific change is to add a struct pointer parameter that points to (index,
      data, caller) information rather than having this information passed as
      individual parameters.
      
      The initial use for this capability is for updating the IA32_TSC_ADJUST msr
      while setting the tsc value. It is anticipated that this capability is
      useful for other tasks.
      Signed-off-by: NWill Auld <will.auld@intel.com>
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      8fe8ab46
  6. 30 11月, 2012 2 次提交
  7. 29 11月, 2012 2 次提交
  8. 28 11月, 2012 18 次提交
  9. 14 11月, 2012 3 次提交
  10. 01 11月, 2012 2 次提交
    • M
      Merge branch 'for-queue' of https://github.com/agraf/linux-2.6 into queue · f026399f
      Marcelo Tosatti 提交于
      * 'for-queue' of https://github.com/agraf/linux-2.6:
        PPC: ePAPR: Convert hcall header to uapi (round 2)
        KVM: PPC: Book3S HV: Fix thinko in try_lock_hpte()
        KVM: PPC: Book3S HV: Allow DTL to be set to address 0, length 0
        KVM: PPC: Book3S HV: Fix accounting of stolen time
        KVM: PPC: Book3S HV: Run virtual core whenever any vcpus in it can run
        KVM: PPC: Book3S HV: Fixes for late-joining threads
        KVM: PPC: Book3s HV: Don't access runnable threads list without vcore lock
        KVM: PPC: Book3S HV: Fix some races in starting secondary threads
        KVM: PPC: Book3S HV: Allow KVM guests to stop secondary threads coming online
        PPC: ePAPR: Convert header to uapi
        KVM: PPC: Move mtspr/mfspr emulation into own functions
        KVM: Documentation: Fix reentry-to-be-consistent paragraph
        KVM: PPC: 44x: fix DCR read/write
      f026399f
    • J
      KVM: SVM: update MAINTAINERS entry · 7de609c8
      Joerg Roedel 提交于
      I have no access to my AMD email address anymore. Update
      entry in MAINTAINERS to the new address.
      
      Cc: Avi Kivity <avi@redhat.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Signed-off-by: NJoerg Roedel <joro@8bytes.org>
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      7de609c8
  11. 31 10月, 2012 2 次提交
  12. 30 10月, 2012 1 次提交