[Libvir] Flags for CPU / system 'features'

In the XenD config there are various flags which allow CPU / system features to be enabled / disabled for the guest domain. For example, HVM domains can be created with, or without, PAE, ACPI, APIC. The XenD sexpr contains simple boolean flags for these features within the (image (hvm ....)) block. IMHO, although these 3 particular features may be only be relevant for HVM, it does not make sense to restrict the expression of features to only HVM domains. Thus I propose a top level '<features>' block within the '<domain>' XML doc. This block would contain tags named after each feature to be enabled. Presence of the named tag enables the feature, ommision disables it (thus all features are disabled by default - matching current behaviour). As an example, to enable ACPI, PAE & APIC: <domain type='xen' id='55'> <name>too</name> <uuid>b5d70dd275cdaca517769660b059d8bc</uuid> <os> <type>hvm</type> <loader>/usr/lib/xen/boot/hvmloader</loader> <boot dev='hd'/> </os> <memory>409600</memory> <vcpu>1</vcpu> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <features> <acpi/> <apic/> <pae/> </features> <devices> ...snipped from example.. </devices> </domain> More flags could trivially be added over time. The attached patch implements this proposal. My only thought, is 'features' a good name for this ? Only other name I came up with was 'capabilities' but this is harder to spell :-) Regards, Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|

On Mon, 2006-08-14 at 15:03 +0100, Daniel P. Berrange wrote:
Thus I propose a top level '<features>' block within the '<domain>' XML doc. This block would contain tags named after each feature to be enabled. Presence of the named tag enables the feature, ommision disables it (thus all features are disabled by default - matching current behaviour).
Sounds good to me. As well as useful to have :)
My only thought, is 'features' a good name for this ? Only other name I came up with was 'capabilities' but this is harder to spell :-)
I think feature is actually pretty reasonable Jeremy

On Mon, Aug 14, 2006 at 03:14:57PM -0400, Jeremy Katz wrote:
On Mon, 2006-08-14 at 15:03 +0100, Daniel P. Berrange wrote:
Thus I propose a top level '<features>' block within the '<domain>' XML doc. This block would contain tags named after each feature to be enabled. Presence of the named tag enables the feature, ommision disables it (thus all features are disabled by default - matching current behaviour).
Sounds good to me. As well as useful to have :)
My only thought, is 'features' a good name for this ? Only other name I came up with was 'capabilities' but this is harder to spell :-)
I think feature is actually pretty reasonable
Ok, I've committed the patch along with updates to the HTML docs on the XML format. BTW, I think it would be useful to have a formal schema defined for the XML format - not for sake of validation - just to unambiguously define what we're expecting in the XML from apps. The current format.html doc is a good overview, but its not exactly precise in detailing what we expect / support. Regards, Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|
participants (2)
-
Daniel P. Berrange
-
Jeremy Katz