1. 10 6月, 2019 1 次提交
  2. 03 6月, 2019 1 次提交
  3. 11 5月, 2019 1 次提交
  4. 26 4月, 2019 1 次提交
  5. 19 4月, 2019 3 次提交
    • M
      qom/cpu: Simplify how CPUClass:cpu_dump_state() prints · 90c84c56
      Markus Armbruster 提交于
      CPUClass method dump_statistics() takes an fprintf()-like callback and
      a FILE * to pass to it.  Most callers pass fprintf() and stderr.
      log_cpu_state() passes fprintf() and qemu_log_file.
      hmp_info_registers() passes monitor_fprintf() and the current monitor
      cast to FILE *.  monitor_fprintf() casts it right back, and is
      otherwise identical to monitor_printf().
      
      The callback gets passed around a lot, which is tiresome.  The
      type-punning around monitor_fprintf() is ugly.
      
      Drop the callback, and call qemu_fprintf() instead.  Also gets rid of
      the type-punning, since qemu_fprintf() takes NULL instead of the
      current monitor cast to FILE *.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Message-Id: <20190417191805.28198-15-armbru@redhat.com>
      90c84c56
    • M
      target/i386: Simplify how x86_cpu_dump_local_apic_state() prints · d3fd9e4b
      Markus Armbruster 提交于
      x86_cpu_dump_local_apic_state() takes an fprintf()-like callback and a
      FILE * to pass to it, and so do its helper functions.
      
      Its only caller hmp_info_local_apic() passes monitor_fprintf() and the
      current monitor cast to FILE *.  monitor_fprintf() casts it right
      back, and is otherwise identical to monitor_printf().  The
      type-punning is ugly.
      
      Drop the callback, and call qemu_printf() instead.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Message-Id: <20190417191805.28198-12-armbru@redhat.com>
      d3fd9e4b
    • M
      target: Simplify how the TARGET_cpu_list() print · 0442428a
      Markus Armbruster 提交于
      The various TARGET_cpu_list() take an fprintf()-like callback and a
      FILE * to pass to it.  Their callers (vl.c's main() via list_cpus(),
      bsd-user/main.c's main(), linux-user/main.c's main()) all pass
      fprintf() and stdout.  Thus, the flexibility provided by the (rather
      tiresome) indirection isn't actually used.
      
      Drop the callback, and call qemu_printf() instead.
      
      Calling printf() would also work, but would make the code unsuitable
      for monitor context without making it simpler.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20190417191805.28198-10-armbru@redhat.com>
      Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      0442428a
  6. 11 3月, 2019 1 次提交
  7. 05 2月, 2019 1 次提交
  8. 14 1月, 2019 2 次提交
    • E
      x86: host-phys-bits-limit option · 258fe08b
      Eduardo Habkost 提交于
      Some downstream distributions of QEMU set host-phys-bits=on by
      default.  This worked very well for most use cases, because
      phys-bits really didn't have huge consequences. The only
      difference was on the CPUID data seen by guests, and on the
      handling of reserved bits.
      
      This changed in KVM commit 855feb673640 ("KVM: MMU: Add 5 level
      EPT & Shadow page table support").  Now choosing a large
      phys-bits value for a VM has bigger impact: it will make KVM use
      5-level EPT even when it's not really necessary.  This means
      using the host phys-bits value may not be the best choice.
      
      Management software could address this problem by manually
      configuring phys-bits depending on the size of the VM and the
      amount of MMIO address space required for hotplug.  But this is
      not trivial to implement.
      
      However, there's another workaround that would work for most
      cases: keep using the host phys-bits value, but only if it's
      smaller than 48.  This patch makes this possible by introducing a
      new "-cpu" option: "host-phys-bits-limit".  Management software
      or users can make sure they will always use 4-level EPT using:
      "host-phys-bits=on,host-phys-bits-limit=48".
      
      This behavior is still not enabled by default because QEMU
      doesn't enable host-phys-bits=on by default.  But users,
      management software, or downstream distributions may choose to
      change their defaults using the new option.
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20181211192527.13254-1-ehabkost@redhat.com>
      [ehabkost: removed test code while some issues are addressed]
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      258fe08b
    • V
      i386/kvm: expose HV_CPUID_ENLIGHTMENT_INFO.EAX and HV_CPUID_NESTED_FEATURES.EAX as feature words · a2b107db
      Vitaly Kuznetsov 提交于
      It was found that QMP users of QEMU (e.g. libvirt) may need
      HV_CPUID_ENLIGHTMENT_INFO.EAX/HV_CPUID_NESTED_FEATURES.EAX information. In
      particular, 'hv_tlbflush' and 'hv_evmcs' enlightenments are only exposed in
      HV_CPUID_ENLIGHTMENT_INFO.EAX.
      
      HV_CPUID_NESTED_FEATURES.EAX is exposed for two reasons: convenience
      (we don't need to export it from hyperv_handle_properties() and as
      future-proof for Enlightened MSR-Bitmap, PV EPT invalidation and
      direct virtual flush features.
      Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com>
      Message-Id: <20181126135958.20956-1-vkuznets@redhat.com>
      Reviewed-by: NRoman Kagan <rkagan@virtuozzo.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      a2b107db
  9. 12 12月, 2018 2 次提交
  10. 07 11月, 2018 1 次提交
  11. 31 10月, 2018 1 次提交
  12. 19 10月, 2018 2 次提交
    • R
      hyperv: only add SynIC in compatible configurations · 9b4cf107
      Roman Kagan 提交于
      Certain configurations do not allow SynIC to be used in QEMU.  In
      particular,
      
      - when hyperv_vpindex is off, SINT routes can't be used as they refer to
        the destination vCPU by vp_index
      
      - older KVM (which doesn't expose KVM_CAP_HYPERV_SYNIC2) zeroes out
        SynIC message and event pages on every msr load, breaking migration
      
      OTOH in-KVM users of SynIC -- SynIC timers -- do work in those
      configurations, and we shouldn't stop the guest from using them.
      
      To cover both scenarios, introduce an X86CPU property that makes CPU
      init code to skip creation of the SynIC object (and thus disables any
      SynIC use in QEMU) but keeps the KVM part of the SynIC working.
      The property is clear by default but is set via compat logic for older
      machine types.
      
      As a result, when hv_synic and a modern machine type are specified, QEMU
      will refuse to run unless vp_index is on and the kernel is recent
      enough.  OTOH with an older machine type QEMU will run fine with
      hv_synic=on against an older kernel and/or without vp_index enabled but
      will disallow the in-QEMU uses of SynIC (in e.g. VMBus).
      Signed-off-by: NRoman Kagan <rkagan@virtuozzo.com>
      Message-Id: <20180921082217.29481-4-rkagan@virtuozzo.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      9b4cf107
    • V
      i386/kvm: add support for Hyper-V IPI send · 6b7a9830
      Vitaly Kuznetsov 提交于
      Hyper-V PV IPI support is merged to KVM, enable the feature in Qemu. When
      enabled, this allows Windows guests to send IPIs to other vCPUs with a
      single hypercall even when there are >64 vCPUs in the request.
      Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com>
      Reviewed-by: NRoman Kagan <rkagan@virtuozzo.com>
      Message-Id: <20181009130853.6412-3-vkuznets@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      6b7a9830
  13. 03 10月, 2018 3 次提交
  14. 24 8月, 2018 1 次提交
  15. 17 8月, 2018 4 次提交
  16. 30 7月, 2018 1 次提交
  17. 23 7月, 2018 1 次提交
  18. 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
  19. 29 6月, 2018 2 次提交
  20. 09 6月, 2018 1 次提交
  21. 23 5月, 2018 1 次提交
  22. 22 5月, 2018 2 次提交
  23. 15 5月, 2018 4 次提交
  24. 11 5月, 2018 1 次提交