1. 02 4月, 2013 1 次提交
  2. 12 3月, 2013 3 次提交
  3. 27 2月, 2013 1 次提交
  4. 20 2月, 2013 1 次提交
  5. 19 2月, 2013 2 次提交
  6. 16 2月, 2013 4 次提交
  7. 11 2月, 2013 1 次提交
  8. 27 1月, 2013 11 次提交
    • I
      target-i386: Remove setting tsc-frequency from x86_def_t · 2c728dfe
      Igor Mammedov 提交于
      Setting tsc-frequency from x86_def_t is NOP because default tsc_khz
      in x86_def_t is 0 and CPUX86State.tsc_khz is also initialized to 0
      by default. So there is no need to overwrite tsc_khz with default 0
      because field was already initialized to 0.
      
      Custom tsc-frequency setting is not affected due to it being set
      without using x86_def_t.
      
      Field tsc_khz in x86_def_t becomes unused with this patch, so drop it
      as well.
      Signed-off-by: NIgor Mammedov <imammedo@redhat.com>
      Reviewed-by: NEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      2c728dfe
    • I
      target-i386: Set custom features/properties without intermediate x86_def_t · a91987c2
      Igor Mammedov 提交于
      Move custom features parsing after built-in cpu_model defaults are set
      and set custom features directly on CPU instance. That allows to make a
      clear distinction between built-in cpu model defaults that eventually
      should go into class_init() and extra property setting which is done
      after defaults are set on CPU instance.
      
      Impl. details:
       * use object_property_parse() property setter so it would be a mechanical
         change to switch to global properties later.
       * And after all current features/properties are converted into static
         properties, it will take a trivial patch to switch to global properties.
         Which will allow to:
         * get CPU instance initialized with all parameters passed on -cpu ...
           cmd. line from object_new() call.
         * call cpu_model/featurestr parsing only once before CPUs are created
         * open a road for removing CPUxxxState.cpu_model_str field, when other
           CPUs are similarly converted to subclasses and static properties.
       - re-factor error handling, to use Error instead of fprintf()s, since
         it is anyway passed in for property setter.
      Signed-off-by: NIgor Mammedov <imammedo@redhat.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      a91987c2
    • I
      target-i386: Remove vendor_override field from CPUX86State · 11acfdd5
      Igor Mammedov 提交于
      Commit 89354998 makes cpuid return to guest host's vendor value
      instead of built-in one by default if kvm_enabled() == true and allows
      to override this behavior if 'vendor' is specified on -cpu command line.
      
      But every time guest calls cpuid to get 'vendor' value, host's value is
      read again and again in default case.
      
      It complicates semantics of vendor property and makes it harder to use.
      
      Instead of reading 'vendor' value from host every time cpuid[vendor] is
      called, override 'vendor' value only once in cpu_x86_find_by_name(), when
      built-in CPU model is found and if(kvm_enabled() == true).
      
      It provides the same default semantics
       if (kvm_enabled() == true)  vendor = host's vendor
       else vendor = built-in vendor
      
      and then later:
       if (custom vendor) vendor = custom vendor
      
      'vendor' value is overridden when user provides it on -cpu command line,
      and there is no need for vendor_override field anymore, remove it.
      Signed-off-by: NIgor Mammedov <imammedo@redhat.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      11acfdd5
    • I
      target-i386: Replace uint32_t vendor fields by vendor string in x86_def_t · 99b88a17
      Igor Mammedov 提交于
      Vendor property setter takes string as vendor value but cpudefs
      use uint32_t vendor[123] fields to define vendor value. It makes it
      difficult to unify and use property setter for values from cpudefs.
      
      Simplify code by using vendor property setter, vendor[123] fields
      are converted into vendor[13] array to keep its value. And vendor
      property setter is used to access/set value on CPU.
      
       - Make for() cycle reusable for the next patch by adding
         x86_cpu_vendor_words2str()
      
      Intel's CPUID spec[1] says:
      "
      5.1.1 ...
      These registers contain the ASCII string: GenuineIntel
      ...
      "
      
      List[2] of known vendor values shows that they all are 12 ASCII
      characters long, padded where necessary with space.
      
      Current supported values are all ASCII characters packed in
      ebx, edx, ecx. So lets state that QEMU supports 12 printable ASCII
      characters packed in ebx, edx, ecx registers for cpuid(0) instruction.
      
      *1 - http://www.intel.com/Assets/PDF/appnote/241618.pdf
      *2 - http://en.wikipedia.org/wiki/CPUID#EAX.3D0:_Get_vendor_IDSigned-off-by: NIgor Mammedov <imammedo@redhat.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      99b88a17
    • I
    • A
      target-i386: Drop redundant list of CPU definitions · 7fc9b714
      Andreas Färber 提交于
      It is no longer needed since dropping cpudef config file support.
      Cleaning this up removes knowledge about other models from x86_def_t,
      in preparation for reusing x86_def_t as intermediate step towards pure
      QOM X86CPU subclasses.
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      7fc9b714
    • A
      target-i386: Simplify cpu_x86_find_by_name() · 4bfe910d
      Andreas Färber 提交于
      Catch NULL name argument early to avoid repeated checks.
      Similarly, check for -cpu host early and untangle from iterating through
      model definitions. This prepares for introducing X86CPU subclasses.
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      4bfe910d
    • E
      pc: Generate APIC IDs according to CPU topology · 8932cfdf
      Eduardo Habkost 提交于
      This keeps compatibility on machine-types pc-1.2 and older, and prints a
      warning in case the requested configuration won't get the correct
      topology.
      
      I couldn't think of a better way to warn about broken topology when in
      compat mode other than using error_report(). The warning message will
      probably be buried in a log file somewhere, but it's better than
      nothing.
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      8932cfdf
    • E
      target-i386: Introduce x86_cpu_apic_id_from_index() function · cb41bad3
      Eduardo Habkost 提交于
      This function will be used by both the CPU initialization code and the
      fw_cfg table initialization code.
      
      Later this function will be updated to generate APIC IDs according to
      the CPU topology.
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      cb41bad3
    • E
      pc: Reverse pc_init_pci() compatibility logic · 29694758
      Eduardo Habkost 提交于
      Currently, the pc-1.4 machine init function enables PV EOI and then
      calls the pc-1.2 machine init function. The problem with this approach
      is that now we can't enable any additional compatibility code inside the
      pc-1.2 init function because it would end up enabling the compatibility
      behavior on pc-1.3 and pc-1.4 as well.
      
      This reverses the logic so that the pc-1.2 machine init function will
      disable PV EOI, and then call the pc-1.4 machine init function.
      
      This way we can change older machine-types to enable compatibility
      behavior, and the newer machine-types (pc-1.3, pc-q35-1.4 and
      pc-i440fx-1.4) would just use the default behavior.
      
      (This means that one nice side-effect of this change is that pc-q35-1.4
      will get PV EOI enabled by default, too)
      
      It would be interesting to eventually change pc_init_pci_no_kvmclock()
      and pc_init_isa() to reuse pc_init_pci_1_2() as well (so we don't need
      to duplicate compatibility code on those two functions). But this will
      be probably much easier to do after we create a PCInitArgs struct for
      the PC initialization arguments, and/or after we use global-properties
      to implement the compatibility modes present in pc_init_pci_1_2().
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Acked-by: NMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: NMarcelo Tosatti <mtosatti@redhat.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      29694758
    • E
      target-i386: Don't set any KVM flag by default if KVM is disabled · aa87d458
      Eduardo Habkost 提交于
      This is a cleanup that tries to solve two small issues:
      
       - We don't need a separate kvm_pv_eoi_features variable just to keep a
         constant calculated at compile-time, and this style would require
         adding a separate variable (that's declared twice because of the
         CONFIG_KVM ifdef) for each feature that's going to be
         enabled/disabled by machine-type compat code.
       - The pc-1.3 code is setting the kvm_pv_eoi flag on cpuid_kvm_features
         even when KVM is disabled at runtime. This small inconsistency in
         the cpuid_kvm_features field isn't a problem today because
         cpuid_kvm_features is ignored by the TCG code, but it may cause
         unexpected problems later when refactoring the CPUID handling code.
      
      This patch eliminates the kvm_pv_eoi_features variable and simply uses
      kvm_enabled() inside the enable_kvm_pv_eoi() compat function, so it
      enables kvm_pv_eoi only if KVM is enabled. I believe this makes the
      behavior of enable_kvm_pv_eoi() clearer and easier to understand.
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Acked-by: NGleb Natapov <gleb@redhat.com>
      Reviewed-by: NMarcelo Tosatti <mtosatti@redhat.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      aa87d458
  9. 22 1月, 2013 1 次提交
  10. 15 1月, 2013 10 次提交
  11. 09 1月, 2013 5 次提交