[Kimchi-devel] [PATCH][Kimchi] Change PPC memory slots to 256
Ramon Medeiros
ramonn at linux.vnet.ibm.com
Mon Jun 13 19:27:38 UTC 2016
Reviewed-By: Ramon Medeiros <ramonn at br.ibm.com>
On 06/13/2016 04:26 PM, Rodrigo Trujillo wrote:
> PowerPC architecture now supports up to 256 memory devices for memory
> hotplug operations.
> ---
> model/vms.py | 7 ++++---
> osinfo.py | 6 +++---
> 2 files changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/model/vms.py b/model/vms.py
> index 58ff28d..795a251 100644
> --- a/model/vms.py
> +++ b/model/vms.py
> @@ -58,7 +58,7 @@ from wok.plugins.kimchi.model.utils import get_ascii_nonascii_name, get_vm_name
> from wok.plugins.kimchi.model.utils import get_metadata_node
> from wok.plugins.kimchi.model.utils import remove_metadata_node
> from wok.plugins.kimchi.model.utils import set_metadata_node
> -from wok.plugins.kimchi.osinfo import defaults
> +from wok.plugins.kimchi.osinfo import defaults, MEM_DEV_SLOTS
> from wok.plugins.kimchi.screenshot import VMScreenshot
> from wok.plugins.kimchi.utils import get_next_clone_name
> from wok.plugins.kimchi.utils import template_name_from_uri
> @@ -994,8 +994,9 @@ class VMModel(object):
> {'param': "Memory",
> 'mem': str(new_mem),
> 'alignment': str(PPC_MEM_ALIGN)})
> - # PPC suports only 32 memory slots
> - if len(xpath_get_text(xml, './devices/memory')) == 32:
> + # Check number of slots supported
> + if len(xpath_get_text(xml, './devices/memory')) == \
> + MEM_DEV_SLOTS[os.uname()[4]]:
> raise InvalidOperation('KCHVM0045E')
>
> if memory == 0:
> diff --git a/osinfo.py b/osinfo.py
> index d3909ad..4b89aac 100644
> --- a/osinfo.py
> +++ b/osinfo.py
> @@ -35,8 +35,8 @@ SUPPORTED_ARCHS = {'x86': ('i386', 'i686', 'x86_64'),
>
>
> # Memory devices slot limits by architecture
> -MEM_DEV_SLOTS = {'ppc64': 32,
> - 'ppc64le': 32,
> +MEM_DEV_SLOTS = {'ppc64': 256,
> + 'ppc64le': 256,
> 'x86_64': 256,
> 'i686': 256,
> 'i386': 256}
> @@ -184,7 +184,7 @@ def _get_tmpl_defaults():
> defaults['graphics'] = default_config.pop('graphics')
>
> # Setting default memory device slots
> - defaults['mem_dev_slots'] = MEM_DEV_SLOTS.get(os.uname()[4], 32)
> + defaults['mem_dev_slots'] = MEM_DEV_SLOTS.get(os.uname()[4], 256)
>
> return defaults
>
--
Ramon Nunes Medeiros
Kimchi Developer
Linux Technology Center Brazil
IBM Systems & Technology Group
Phone : +55 19 2132 7878
ramonn at br.ibm.com
More information about the Kimchi-devel
mailing list