1. 07 5月, 2013 8 次提交
    • E
      target-i386: Introduce generic CPUID feature compat function · 0668af54
      Eduardo Habkost 提交于
      Introduce x86_cpu_compat_set_features(), that can be used to set/unset
      feature bits on specific CPU models for machine-type compatibility.
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      0668af54
    • A
      target-i386: Change CPUID model of 486 to 8 · b2a856d9
      Andreas Färber 提交于
      This changes the model number of 486 to 8 (DX4) which matches the
      feature set presented, and actually has the CPUID instruction.
      
      This adds a compatibility property, to keep model=0 on pc-*-1.4 and older.
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      [AF: Add compat_props entry]
      Tested-by: NEduardo Habkost <ehabkost@redhat.com>
      Reviewed-by: NEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      b2a856d9
    • A
      target-i386: Emulate X86CPU subclasses for global properties · ba2bc7a4
      Andreas Färber 提交于
      After initializing the object from its x86_def_t and before setting any
      additional -cpu arguments, set any global properties for the designated
      subclass <name>-{i386,x86_64}-cpu.
      Reviewed-by: NEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      ba2bc7a4
    • A
      qdev: Introduce qdev_prop_set_globals_for_type() · 868d378b
      Andreas Färber 提交于
      Reuse it in qdev_prop_set_globals().
      Reviewed-by: NEduardo Habkost <ehabkost@redhat.com>
      [AF: Renamed from qdev_prop_set_custom_globals()]
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      868d378b
    • A
      qdev: Let qdev_prop_parse() pass through Error · b1fe9bcb
      Andreas Färber 提交于
      Move error reporting to callers.
      Reviewed-by: NEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      b1fe9bcb
    • E
      target-i386: Add "filtered-features" property to X86CPU · 7e5292b5
      Eduardo Habkost 提交于
      This property will contain all the features that were removed from the
      CPU because they are not supported by the host.
      
      This way, libvirt or other management tools can emulate the
      check/enforce behavior by checking if filtered-properties is all zeroes,
      before starting the guest.
      
      Example output where some features were missing:
      
        $ qemu-system-x86_64 -enable-kvm -cpu Haswell,check -S \
          -qmp unix:/tmp/m,server,nowait
        warning: host doesn't support requested feature: CPUID.01H:ECX.fma [bit 12]
        warning: host doesn't support requested feature: CPUID.01H:ECX.movbe [bit 22]
        warning: host doesn't support requested feature: CPUID.01H:ECX.tsc-deadline [bit 24]
        warning: host doesn't support requested feature: CPUID.01H:ECX.xsave [bit 26]
        warning: host doesn't support requested feature: CPUID.01H:ECX.avx [bit 28]
        warning: host doesn't support requested feature: CPUID.07H:EBX.fsgsbase [bit 0]
        warning: host doesn't support requested feature: CPUID.07H:EBX.bmi1 [bit 3]
        warning: host doesn't support requested feature: CPUID.07H:EBX.hle [bit 4]
        warning: host doesn't support requested feature: CPUID.07H:EBX.avx2 [bit 5]
        warning: host doesn't support requested feature: CPUID.07H:EBX.smep [bit 7]
        warning: host doesn't support requested feature: CPUID.07H:EBX.bmi2 [bit 8]
        warning: host doesn't support requested feature: CPUID.07H:EBX.erms [bit 9]
        warning: host doesn't support requested feature: CPUID.07H:EBX.invpcid [bit 10]
        warning: host doesn't support requested feature: CPUID.07H:EBX.rtm [bit 11]
        [...]
        $ ./QMP/qmp --path=/tmp/m \
          qom-get --path=/machine/icc-bridge/icc/child[0] \
                  --property=filtered-features
        item[0].cpuid-register: EDX
        item[0].cpuid-input-eax: 2147483658
        item[0].features: 0
        item[1].cpuid-register: EAX
        item[1].cpuid-input-eax: 1073741825
        item[1].features: 0
        item[2].cpuid-register: EDX
        item[2].cpuid-input-eax: 3221225473
        item[2].features: 0
        item[3].cpuid-register: ECX
        item[3].cpuid-input-eax: 2147483649
        item[3].features: 0
        item[4].cpuid-register: EDX
        item[4].cpuid-input-eax: 2147483649
        item[4].features: 0
        item[5].cpuid-register: EBX
        item[5].cpuid-input-eax: 7
        item[5].features: 4025
        item[5].cpuid-input-ecx: 0
        item[6].cpuid-register: ECX
        item[6].cpuid-input-eax: 1
        item[6].features: 356519936
        item[7].cpuid-register: EDX
        item[7].cpuid-input-eax: 1
        item[7].features: 0
      
      Example output when no feature is missing:
      
        $ qemu-system-x86_64 -enable-kvm -cpu Nehalem,enforce -S \
          -qmp unix:/tmp/m,server,nowait
        [...]
        $ ./QMP/qmp --path=/tmp/m \
          qom-get --path=/machine/icc-bridge/icc/child[0] \
                  --property=filtered-features
        item[0].cpuid-register: EDX
        item[0].cpuid-input-eax: 2147483658
        item[0].features: 0
        item[1].cpuid-register: EAX
        item[1].cpuid-input-eax: 1073741825
        item[1].features: 0
        item[2].cpuid-register: EDX
        item[2].cpuid-input-eax: 3221225473
        item[2].features: 0
        item[3].cpuid-register: ECX
        item[3].cpuid-input-eax: 2147483649
        item[3].features: 0
        item[4].cpuid-register: EDX
        item[4].cpuid-input-eax: 2147483649
        item[4].features: 0
        item[5].cpuid-register: EBX
        item[5].cpuid-input-eax: 7
        item[5].features: 0
        item[5].cpuid-input-ecx: 0
        item[6].cpuid-register: ECX
        item[6].cpuid-input-eax: 1
        item[6].features: 0
        item[7].cpuid-register: EDX
        item[7].cpuid-input-eax: 1
        item[7].features: 0
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      7e5292b5
    • E
      target-i386: Introduce X86CPU::filtered_features field · 034acf4a
      Eduardo Habkost 提交于
      This field will contain the feature bits that were filtered out because
      of missing host support.
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      034acf4a
    • E
      target-i386: Add "feature-words" property to X86CPU · 8e8aba50
      Eduardo Habkost 提交于
      This property will be useful for libvirt, as libvirt already has logic
      based on low-level feature bits (not feature names), so it will be
      really easy to convert the current libvirt logic to something using the
      "feature-words" property.
      
      The property will have two main use cases:
       - Checking host capabilities, by checking the features of the "host"
         CPU model
       - Checking which features are enabled on each CPU model
      
      Example output:
      
        $ ./QMP/qmp --path=/tmp/m \
          qom-get --path=/machine/icc-bridge/icc/child[0] \
                  --property=feature-words
        item[0].cpuid-register: EDX
        item[0].cpuid-input-eax: 2147483658
        item[0].features: 0
        item[1].cpuid-register: EAX
        item[1].cpuid-input-eax: 1073741825
        item[1].features: 0
        item[2].cpuid-register: EDX
        item[2].cpuid-input-eax: 3221225473
        item[2].features: 0
        item[3].cpuid-register: ECX
        item[3].cpuid-input-eax: 2147483649
        item[3].features: 101
        item[4].cpuid-register: EDX
        item[4].cpuid-input-eax: 2147483649
        item[4].features: 563346425
        item[5].cpuid-register: EBX
        item[5].cpuid-input-eax: 7
        item[5].features: 0
        item[5].cpuid-input-ecx: 0
        item[6].cpuid-register: ECX
        item[6].cpuid-input-eax: 1
        item[6].features: 2155880449
        item[7].cpuid-register: EDX
        item[7].cpuid-input-eax: 1
        item[7].features: 126614521
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      8e8aba50
  2. 06 5月, 2013 7 次提交
  3. 05 5月, 2013 3 次提交
  4. 04 5月, 2013 15 次提交
  5. 03 5月, 2013 7 次提交