Features/CPUHotplug: Difference between revisions

From QEMU
Line 32: Line 32:
* <span style="color:blue">CPUID features as properties</span>
* <span style="color:blue">CPUID features as properties</span>
** provides an ability to set/get features using common FEAT_FOO=VAL property interfaces.
** provides an ability to set/get features using common FEAT_FOO=VAL property interfaces.
** Features related clean-ups and code reorganisation:
*** move feature flags fix-ups & checks to realize time
**** in OQM model any feature/property could be amended until realize time. Masking out unsupported kvm/tcg features too early could lead to invalid features be exposed to guest
**** <span style="color:green">9b15cd9 target-i386: Sanitize AMD's ext2_features at realize time</span>
**** <span style="color:green">4586f15 target-i386: Filter out unsupported features at realize time</span>
*** <span style="color:blue">separate features parsing from setting defaults</span>
**** clean-up cpu_x86_parse_featurestr(), leaving in it only custom features parsing that should be set on CPU instance after all defaults are set. Setting default later should be moved to CPU sub-classes. And custom legacy features parser cpu_x86_parse_featurestr() could be converted to setting global properties later, when CPU features are converted into static properties.
**** Patches: http://permalink.gmane.org/gmane.comp.emulators.qemu/188062
** <span style="color:blue">Conversion of features and other properties into static properties</span> provides following benefits:
** <span style="color:blue">Conversion of features and other properties into static properties</span> provides following benefits:
*** global properties for CPU
*** global properties for CPU
*** setting defaults using default values of static properties
*** setting defaults using default values of static properties, could be used in CPU subclasses
*** current impl.: [https://github.com/imammedo/qemu/tree/x86-cpu-properties.WIP]


* <span style="color:blue">CPU models as CPU subclasses</span>
* <span style="color:blue">CPU models as CPU subclasses</span>
** should provide complete QOM object interface to CPU subclasses.
** should provide complete QOM object interface to CPU subclasses.
** gives ability to create/initialize CPUs using CPU subclass name without any ad-hoc calls.
** gives ability to create/initialize CPUs using CPU subclass name without any ad-hoc calls.

Revision as of 16:35, 14 January 2013

Summary

This feature is about allowing CPU hotplug in QEMU.

Owner

  • Name: Igor Mammedov
  • Email: imammedo@redhat.com

Detailed Summary

It was proposed to use device-add/device-del interface for hot-plugging CPUs instead of using it's own interface. For this to work CPUs should become child of Device and do not require external calls for creating or initializing it.

Roadmap for QEMU 1.3

X86CPU Dependencies and ToDo-s

Legend: green - done, blue - in progress, red - to be implemented

  • External CPU clean-ups. Move CPU internals inside CPU object
    • move tcg init code CPU. commits d65e98, 84e3b60, eeec69d, 130a038
    • move CPU reset from board level into CPU. commits 65dee3805, dd673288
    • move APIC creation/initialization into CPU object. commit [ bdeec8021]
  • CPU as Device [commit: 961f839]
    • necessary for converting "CPUID features" into static properties
    • allows to use device_add command after CPU subclasses is implemented.
  • CPUID features as properties
    • provides an ability to set/get features using common FEAT_FOO=VAL property interfaces.
    • Features related clean-ups and code reorganisation:
      • move feature flags fix-ups & checks to realize time
        • in OQM model any feature/property could be amended until realize time. Masking out unsupported kvm/tcg features too early could lead to invalid features be exposed to guest
        • 9b15cd9 target-i386: Sanitize AMD's ext2_features at realize time
        • 4586f15 target-i386: Filter out unsupported features at realize time
      • separate features parsing from setting defaults
        • clean-up cpu_x86_parse_featurestr(), leaving in it only custom features parsing that should be set on CPU instance after all defaults are set. Setting default later should be moved to CPU sub-classes. And custom legacy features parser cpu_x86_parse_featurestr() could be converted to setting global properties later, when CPU features are converted into static properties.
        • Patches: http://permalink.gmane.org/gmane.comp.emulators.qemu/188062
    • Conversion of features and other properties into static properties provides following benefits:
      • global properties for CPU
      • setting defaults using default values of static properties, could be used in CPU subclasses
      • current impl.: [1]
  • CPU models as CPU subclasses
    • should provide complete QOM object interface to CPU subclasses.
    • gives ability to create/initialize CPUs using CPU subclass name without any ad-hoc calls.