1. 30 7月, 2018 1 次提交
  2. 23 7月, 2018 1 次提交
  3. 02 7月, 2018 2 次提交
    • J
      target-i386: Add NPT support · fe441054
      Jan Kiszka 提交于
      This implements NPT suport for SVM by hooking into
      x86_cpu_handle_mmu_fault where it reads the stage-1 page table. Whether
      we need to perform this 2nd stage translation, and how, is decided
      during vmrun and stored in hflags2, along with nested_cr3 and
      nested_pg_mode.
      
      As get_hphys performs a direct cpu_vmexit in case of NPT faults, we need
      retaddr in that function. To avoid changing the signature of
      cpu_handle_mmu_fault, this passes the value from tlb_fill to get_hphys
      via the CPU state.
      
      This was tested successfully via the Jailhouse hypervisor.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Message-Id: <567473a0-6005-5843-4c73-951f476085ca@web.de>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      fe441054
    • V
      i386/kvm: add support for Hyper-V TLB flush · 47512009
      Vitaly Kuznetsov 提交于
      Add support for Hyper-V TLB flush which recently got added to KVM.
      
      Just like regular Hyper-V we announce HV_EX_PROCESSOR_MASKS_RECOMMENDED
      regardless of how many vCPUs we have. Windows is 'smart' and uses less
      expensive non-EX Hypercall whenever possible (when it wants to flush TLB
      for all vCPUs or the maximum vCPU index in the vCPU set requires flushing
      is less than 64).
      Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com>
      Message-Id: <20180610184927.19309-1-vkuznets@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      47512009
  4. 29 6月, 2018 2 次提交
  5. 09 6月, 2018 1 次提交
  6. 23 5月, 2018 1 次提交
  7. 22 5月, 2018 2 次提交
  8. 15 5月, 2018 4 次提交
  9. 11 5月, 2018 1 次提交
  10. 09 4月, 2018 1 次提交
    • R
      i386/hyperv: add hv-frequencies cpu property · 9445597b
      Roman Kagan 提交于
      In order to guarantee compatibility on migration, QEMU should have
      complete control over the features it announces to the guest via CPUID.
      
      However, the availability of Hyper-V frequency MSRs
      (HV_X64_MSR_TSC_FREQUENCY and HV_X64_MSR_APIC_FREQUENCY) depends solely
      on the support for them in the underlying KVM.
      
      Introduce "hv-frequencies" cpu property (off by default) which gives
      QEMU full control over whether these MSRs are announced.
      
      While at this, drop the redundant check of the cpu tsc frequency, and
      decouple this feature from hv-time.
      Signed-off-by: NRoman Kagan <rkagan@virtuozzo.com>
      Reviewed-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20180330170209.20627-2-rkagan@virtuozzo.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      9445597b
  11. 20 3月, 2018 2 次提交
  12. 13 3月, 2018 4 次提交
  13. 21 2月, 2018 1 次提交
  14. 25 1月, 2018 1 次提交
    • L
      accel/tcg: add size paremeter in tlb_fill() · 98670d47
      Laurent Vivier 提交于
      The MC68040 MMU provides the size of the access that
      triggers the page fault.
      
      This size is set in the Special Status Word which
      is written in the stack frame of the access fault
      exception.
      
      So we need the size in m68k_cpu_unassigned_access() and
      m68k_cpu_handle_mmu_fault().
      
      To be able to do that, this patch modifies the prototype of
      handle_mmu_fault handler, tlb_fill() and probe_write().
      do_unassigned_access() already includes a size parameter.
      
      This patch also updates handle_mmu_fault handlers and
      tlb_fill() of all targets (only parameter, no code change).
      Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
      Reviewed-by: NDavid Hildenbrand <david@redhat.com>
      Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
      Message-Id: <20180118193846.24953-2-laurent@vivier.eu>
      98670d47
  15. 18 1月, 2018 3 次提交
  16. 16 1月, 2018 1 次提交
  17. 22 12月, 2017 2 次提交
    • P
      6701d81d
    • S
      i386: hvf: add code base from Google's QEMU repository · c97d6d2c
      Sergio Andres Gomez Del Real 提交于
      This file begins tracking the files that will be the code base for HVF
      support in QEMU. This code base is part of Google's QEMU version of
      their Android emulator, and can be found at
      https://android.googlesource.com/platform/external/qemu/+/emu-master-dev
      
      This code is based on Veertu Inc's vdhh (Veertu Desktop Hosted
      Hypervisor), found at https://github.com/veertuinc/vdhh. Everything is
      appropriately licensed under GPL v2-or-later, except for the code inside
      x86_task.c and x86_task.h, which, deriving from KVM (the Linux kernel),
      is licensed GPL v2-only.
      
      This code base already implements a very great deal of functionality,
      although Google's version removed from Vertuu's the support for APIC
      page and hyperv-related stuff. According to the Android Emulator Release
      Notes, Revision 26.1.3 (August 2017), "Hypervisor.framework is now
      enabled by default on macOS for 32-bit x86 images to improve performance
      and macOS compatibility", although we better use with caution for, as the
      same Revision warns us, "If you experience issues with it specifically,
      please file a bug report...". The code hasn't seen much update in the
      last 5 months, so I think that we can further develop the code with
      occasional visiting Google's repository to see if there has been any
      update.
      
      On top of Google's code, the following changes were made:
      
      - add code to the configure script to support the --enable-hvf argument.
      If the OS is Darwin, it checks for presence of HVF in the system. The
      patch also adds strings related to HVF in the file qemu-options.hx.
      QEMU will only support the modern syntax style '-M accel=hvf' no enable
      hvf; the legacy '-enable-hvf' will not be supported.
      
      - fix styling issues
      
      - add glue code to cpus.c
      
      - move HVFX86EmulatorState field to CPUX86State, changing the
      the emulation functions to have a parameter with signature 'CPUX86State *'
      instead of 'CPUState *' so we don't have to get the 'env'.
      Signed-off-by: NSergio Andres Gomez Del Real <Sergio.G.DelReal@gmail.com>
      Message-Id: <20170913090522.4022-2-Sergio.G.DelReal@gmail.com>
      Message-Id: <20170913090522.4022-3-Sergio.G.DelReal@gmail.com>
      Message-Id: <20170913090522.4022-5-Sergio.G.DelReal@gmail.com>
      Message-Id: <20170913090522.4022-6-Sergio.G.DelReal@gmail.com>
      Message-Id: <20170905035457.3753-7-Sergio.G.DelReal@gmail.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      c97d6d2c
  18. 21 12月, 2017 3 次提交
  19. 19 9月, 2017 3 次提交
    • R
      hyperv: add header with protocol definitions · 5e953812
      Roman Kagan 提交于
      The definitions for Hyper-V emulation are currently taken from a header
      imported from the Linux kernel.
      
      However, as these describe a third-party protocol rather than a kernel
      API, it probably wasn't a good idea to publish it in the kernel uapi.
      
      This patch introduces a header that provides all the necessary
      definitions, superseding the one coming from the kernel.
      
      The new header supports (temporary) coexistence with the kernel one.
      The constants explicitly named in the Hyper-V specification (e.g. msr
      numbers) are defined in a non-conflicting way.  Other constants and
      types have got new names.
      
      While at this, the protocol data structures are defined in a more
      conventional way, without bitfields, enums, and excessive unions.
      
      The code using this stuff is adjusted, too; it can now be built both
      with and without the kernel header in the tree.
      Signed-off-by: NRoman Kagan <rkagan@virtuozzo.com>
      Message-Id: <20170713201522.13765-2-rkagan@virtuozzo.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      5e953812
    • G
      i386/cpu/hyperv: support over 64 vcpus for windows guests · 6c69dfb6
      Gonglei 提交于
      Starting with Windows Server 2012 and Windows 8, if
      CPUID.40000005.EAX contains a value of -1, Windows assumes specific
      limit to the number of VPs. In this case, Windows Server 2012
      guest VMs may use more than 64 VPs, up to the maximum supported
      number of processors applicable to the specific Windows
      version being used.
      
      https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/reference/tlfs
      
      For compatibility, Let's introduce a new property for X86CPU,
      named "x-hv-max-vps" as Eduardo's suggestion, and set it
      to 0x40 before machine 2.10.
      
      (The "x-" prefix indicates that the property is not supposed to
      be a stable user interface.)
      Signed-off-by: NGonglei <arei.gonglei@huawei.com>
      Message-Id: <1505143227-14324-1-git-send-email-arei.gonglei@huawei.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      6c69dfb6
    • I
      pc: use generic cpu_model parsing · 311ca98d
      Igor Mammedov 提交于
      define default CPU type in generic way in pc_machine_class_init()
      and let common machine code to handle cpu_model parsing
      
      Patch also introduces TARGET_DEFAULT_CPU_TYPE define for 2 purposes:
        * make foo_machine_class_init() look uniform on every target
        * use define in [bsd|linux]-user targets to pick default
          cpu type
      Signed-off-by: NIgor Mammedov <imammedo@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-Id: <1505318697-77161-5-git-send-email-imammedo@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      311ca98d
  20. 01 9月, 2017 1 次提交
  21. 18 7月, 2017 1 次提交
    • D
      i386: expose "TCGTCGTCGTCG" in the 0x40000000 CPUID leaf · 1ce36bfe
      Daniel P. Berrange 提交于
      Currently when running KVM, we expose "KVMKVMKVM\0\0\0" in
      the 0x40000000 CPUID leaf. Other hypervisors (VMWare,
      HyperV, Xen, BHyve) all do the same thing, which leaves
      TCG as the odd one out.
      
      The CPUID signature is used by software to detect which
      virtual environment they are running in and (potentially)
      change behaviour in certain ways. For example, systemd
      supports a ConditionVirtualization= setting in unit files.
      The virt-what command can also report the virt type it is
      running on
      
      Currently both these apps have to resort to custom hacks
      like looking for 'fw-cfg' entry in the /proc/device-tree
      file to identify TCG.
      
      This change thus proposes a signature "TCGTCGTCGTCG" to be
      reported when running under TCG.
      
      To hide this, the -cpu option tcg-cpuid=off can be used.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-Id: <20170509132736.10071-3-berrange@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      1ce36bfe
  22. 05 7月, 2017 2 次提交