1. 22 12月, 2017 1 次提交
  2. 28 2月, 2017 3 次提交
    • E
      i386: Define static "base" CPU model · 5adbed30
      Eduardo Habkost 提交于
      The query-cpu-model-expand QMP command needs at least one static
      model, to allow the "static" expansion mode to be implemented.
      Instead of defining static versions of every CPU model, define a
      "base" CPU model that has absolutely no feature flag enabled.
      
      Despite having no CPUID data set at all, "-cpu base" is even a
      functional CPU:
      
      * It can boot a Slackware Linux 1.01 image with a Linux 0.99.12
        kernel[1].
      * It is even possible to boot[2] a modern Fedora x86_64 guest by
        manually enabling the following CPU features:
        -cpu base,+lm,+msr,+pae,+fpu,+cx8,+cmov,+sse,+sse2,+fxsr
      
      [1] http://www.qemu-advent-calendar.org/2014/#day-1
      [2] This is what can be seen in the guest:
          [root@localhost ~]# cat /proc/cpuinfo
          processor       : 0
          vendor_id       : unknown
          cpu family      : 0
          model           : 0
          model name      : 00/00
          stepping        : 0
          physical id     : 0
          siblings        : 1
          core id         : 0
          cpu cores       : 1
          apicid          : 0
          initial apicid  : 0
          fpu             : yes
          fpu_exception   : yes
          cpuid level     : 1
          wp              : yes
          flags           : fpu msr pae cx8 cmov fxsr sse sse2 lm nopl
          bugs            :
          bogomips        : 5832.70
          clflush size    : 64
          cache_alignment : 64
          address sizes   : 36 bits physical, 48 bits virtual
          power management:
      
          [root@localhost ~]# x86info -v -a
          x86info v1.30.  Dave Jones 2001-2011
          Feedback to <davej@redhat.com>.
      
          No TSC, MHz calculation cannot be performed.
          Unknown vendor (0)
          MP Table:
      
          Family: 0 Model: 0 Stepping: 0
          CPU Model (x86info's best guess):
      
          eax in: 0x00000000, eax = 00000001 ebx = 00000000 ecx = 00000000 edx = 00000000
          eax in: 0x00000001, eax = 00000000 ebx = 00000800 ecx = 00000000 edx = 07008161
      
          eax in: 0x80000000, eax = 80000001 ebx = 00000000 ecx = 00000000 edx = 00000000
          eax in: 0x80000001, eax = 00000000 ebx = 00000000 ecx = 00000000 edx = 20000000
      
          Feature flags:
           fpu            Onboard FPU
           msr            Model-Specific Registers
           pae            Physical Address Extensions
           cx8            CMPXCHG8 instruction
           cmov           CMOV instruction
           fxsr           FXSAVE and FXRSTOR instructions
           sse            SSE support
           sse2           SSE2 support
      
          Long NOPs supported: yes
      
          Address sizes : 0 bits physical, 0 bits virtual
          0MHz processor (estimate).
      
           running at an estimated 0MHz
          [root@localhost ~]#
      
      Message-Id: <20170222190029.17243-2-ehabkost@redhat.com>
      Reviewed-by: NDavid Hildenbrand <david@redhat.com>
      Tested-by: NJiri Denemark <jdenemar@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      5adbed30
    • E
      i386: Don't set CPUClass::cpu_def on "max" model · 0bacd8b3
      Eduardo Habkost 提交于
      Host CPUID info is used by the "max" CPU model only in KVM mode.
      Move the initialization of CPUID data for "max" from class_init
      to instance_init, and don't set CPUClass::cpu_def for "max".
      
      Message-Id: <20170222183919.11928-4-ehabkost@redhat.com>
      Tested-by: NRichard W.M. Jones <rjones@redhat.com>
      Tested-by: NJiri Denemark <jdenemar@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      0bacd8b3
    • E
      i386: Add ordering field to CPUClass · f48c8837
      Eduardo Habkost 提交于
      Instead of using kvm_enabled to order the "-cpu help" list, use a
      new "ordering" field for that.
      
      Message-Id: <20170119210449.11991-3-ehabkost@redhat.com>
      Tested-by: NJiri Denemark <jdenemar@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      f48c8837
  3. 24 1月, 2017 1 次提交
  4. 21 12月, 2016 1 次提交
    • T
      Move target-* CPU file into a target/ folder · fcf5ef2a
      Thomas Huth 提交于
      We've currently got 18 architectures in QEMU, and thus 18 target-xxx
      folders in the root folder of the QEMU source tree. More architectures
      (e.g. RISC-V, AVR) are likely to be included soon, too, so the main
      folder of the QEMU sources slowly gets quite overcrowded with the
      target-xxx folders.
      To disburden the main folder a little bit, let's move the target-xxx
      folders into a dedicated target/ folder, so that target-xxx/ simply
      becomes target/xxx/ instead.
      
      Acked-by: Laurent Vivier <laurent@vivier.eu> [m68k part]
      Acked-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de> [tricore part]
      Acked-by: Michael Walle <michael@walle.cc> [lm32 part]
      Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> [s390x part]
      Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> [s390x part]
      Acked-by: Eduardo Habkost <ehabkost@redhat.com> [i386 part]
      Acked-by: Artyom Tarasenko <atar4qemu@gmail.com> [sparc part]
      Acked-by: Richard Henderson <rth@twiddle.net> [alpha part]
      Acked-by: Max Filippov <jcmvbkbc@gmail.com> [xtensa part]
      Reviewed-by: David Gibson <david@gibson.dropbear.id.au> [ppc part]
      Acked-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> [cris&microblaze part]
      Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn> [unicore32 part]
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      fcf5ef2a
  5. 25 10月, 2016 1 次提交
  6. 18 10月, 2016 1 次提交
  7. 19 5月, 2016 2 次提交
  8. 23 2月, 2016 1 次提交
  9. 17 12月, 2015 2 次提交
    • A
      target-i386/kvm: Hyper-V SynIC timers MSR's support · ff99aa64
      Andrey Smetanin 提交于
      Hyper-V SynIC timers are host timers that are configurable
      by guest through corresponding MSR's (HV_X64_MSR_STIMER*).
      Guest setup and use fired by host events(SynIC interrupt
      and appropriate timer expiration message) as guest clock
      events.
      
      The state of Hyper-V SynIC timers are stored in corresponding
      MSR's. This patch seria implements such MSR's support and migration.
      Signed-off-by: NAndrey Smetanin <asmetanin@virtuozzo.com>
      CC: Paolo Bonzini <pbonzini@redhat.com>
      CC: Richard Henderson <rth@twiddle.net>
      CC: Eduardo Habkost <ehabkost@redhat.com>
      CC: "Andreas Färber" <afaerber@suse.de>
      CC: Marcelo Tosatti <mtosatti@redhat.com>
      CC: Denis V. Lunev <den@openvz.org>
      CC: Roman Kagan <rkagan@virtuozzo.com>
      CC: kvm@vger.kernel.org
      
      Message-Id: <1448464885-8300-3-git-send-email-asmetanin@virtuozzo.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      ff99aa64
    • A
      target-i386/kvm: Hyper-V SynIC MSR's support · 866eea9a
      Andrey Smetanin 提交于
      This patch does Hyper-V Synthetic interrupt
      controller(Hyper-V SynIC) MSR's support and
      migration. Hyper-V SynIC is enabled by cpu's
      'hv-synic' option.
      
      This patch does not allow cpu creation if
      'hv-synic' option specified but kernel
      doesn't support Hyper-V SynIC.
      
      Changes v3:
      * removed 'msr_hv_synic_version' migration because
      it's value always the same
      * moved SynIC msr's initialization into kvm_arch_init_vcpu
      Signed-off-by: NAndrey Smetanin <asmetanin@virtuozzo.com>
      Reviewed-by: NRoman Kagan <rkagan@virtuozzo.com>
      Signed-off-by: NDenis V. Lunev <den@openvz.org>
      CC: Paolo Bonzini <pbonzini@redhat.com>
      CC: Richard Henderson <rth@twiddle.net>
      CC: Eduardo Habkost <ehabkost@redhat.com>
      CC: "Andreas Färber" <afaerber@suse.de>
      CC: Marcelo Tosatti <mtosatti@redhat.com>
      CC: Roman Kagan <rkagan@virtuozzo.com>
      CC: Denis V. Lunev <den@openvz.org>
      CC: kvm@vger.kernel.org
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      866eea9a
  10. 19 10月, 2015 1 次提交
  11. 13 10月, 2015 3 次提交
  12. 16 9月, 2015 1 次提交
  13. 05 6月, 2015 2 次提交
  14. 10 3月, 2015 2 次提交
  15. 03 3月, 2015 1 次提交
  16. 26 2月, 2015 2 次提交
  17. 26 9月, 2014 2 次提交
  18. 05 9月, 2014 1 次提交
    • E
      target-i386: Support migratable=no properly · 4d1b279b
      Eduardo Habkost 提交于
      When the "migratable" property was implemented, the behavior was tested
      by changing the default on the code, but actually using the option on
      the command-line (e.g. "-cpu host,migratable=false") doesn't work as
      expected. This is a regression for a common use case of "-cpu host",
      which is to enable features that are supported by the host CPU + kernel
      before feature-specific code is added to QEMU.
      
      Fix this by initializing the feature words for "-cpu host" on
      x86_cpu_parse_featurestr(), right after parsing the CPU options.
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Reviewed-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      4d1b279b
  19. 26 6月, 2014 2 次提交
  20. 04 6月, 2014 1 次提交
    • A
      kvm: Enable -cpu option to hide KVM · f522d2ac
      Alex Williamson 提交于
      The latest Nvidia driver (337.88) specifically checks for KVM as the
      hypervisor and reports Code 43 for the driver in a Windows guest when
      found.  Removing or changing the KVM signature is sufficient for the
      driver to load and work.  This patch adds an option to easily allow
      the KVM hypervisor signature to be hidden using '-cpu kvm=off'.  We
      continue to expose KVM via the cpuid value by default.  The state of
      this option does not supercede or replace -enable-kvm or the accel=kvm
      machine option.  This only changes the visibility of KVM to the guest
      and paravirtual features specifically tied to the KVM cpuid.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      f522d2ac
  21. 14 3月, 2014 1 次提交
    • E
      target-i386: X86CPU model subclasses · d940ee9b
      Eduardo Habkost 提交于
      Register separate QOM types for each x86 CPU model.
      
      This will allow management code to more easily probe what each CPU model
      provides, by simply creating objects using the appropriate class name,
      without having to restart QEMU.
      
      This also allows us to eliminate the qdev_prop_set_globals_for_type()
      hack to set CPU-model-specific global properties.
      
      Instead of creating separate class_init functions for each class, I just
      used class_data to store a pointer to the X86CPUDefinition struct for
      each CPU model. This should make the patch shorter and easier to review.
      Later we can gradually convert each X86CPUDefinition field to lists of
      per-class property defaults.
      
      The "host" CPU model is special, as the feature flags depend on KVM
      being initialized. So it has its own class_init and instance_init
      function, and feature flags are set on instance_init instead of
      class_init.
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      Signed-off-by: NIgor Mammedov <imammedo@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Reviewed-by: NEduardo Habkost <ehabkost@redhat.com>
      Tested-by: NEduardo Habkost <ehabkost@redhat.com>
      [AF: Limit the host CPU type to CONFIG_KVM as build fix]
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      d940ee9b
  22. 04 2月, 2014 1 次提交
  23. 24 12月, 2013 1 次提交
  24. 23 12月, 2013 1 次提交
  25. 20 9月, 2013 1 次提交
  26. 17 8月, 2013 1 次提交
  27. 29 7月, 2013 1 次提交
    • E
      target-i386: Disable PMU CPUID leaf by default · 9337e3b6
      Eduardo Habkost 提交于
      Bug description: QEMU currently gets all bits from GET_SUPPORTED_CPUID
      for CPUID leaf 0xA and passes them directly to the guest. This makes
      the guest ABI depend on host kernel and host CPU capabilities, and
      breaks live migration if we migrate between hosts with different
      capabilities (e.g., different number of PMU counters).
      
      Add a "pmu" property to X86CPU, and set it to true only on "-cpu host",
      or on pc-*-1.5 and older machine-types.
      
      For now, setting pmu=on will enable the current passthrough mode that
      doesn't have any ABI stability guarantees, but in the future we may
      implement a mode where the PMU CPUID bits are stable and configurable.
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      9337e3b6
  28. 27 7月, 2013 1 次提交
  29. 23 7月, 2013 1 次提交