[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] Prevent changing a memory size of Domain-0 even if users make a careless mistake



Hi,

If users accidentally change a memory size of Domain-0 to very small 
memory size by xm mem-set command, users will be not able to operate 
Domain-0.  I think that Domain-0 is important for Xen, so I'd like to 
prevent the accident by xm mem-set command. 

This patch prevents changing the memory size of Domain-0 by xm mem-set 
command if specified memory size is smaller than dom0-min-mem in 
xend-config.sxp. 

 # cat /etc/xen/xend-config.sxp | grep "(dom0-min-mem"
 (dom0-min-mem 384)
 # xm list Domain-0
 Name                                        ID   Mem VCPUs      State   Time(s)
 Domain-0                                     0   941     2     r-----     62.6
 # xm mem-set Domain-0 1
 Error: memory_dynamic_max cannot be changed for safety reasons
 Usage: xm mem-set <Domain> <Mem>
 
 Set the current memory usage for a domain.
 # xm list Domain-0
 Name                                        ID   Mem VCPUs      State   Time(s)
 Domain-0                                     0   941     2     r-----     63.6


Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>

Best regards,
 Kan

Attachment: safe_xm_memset.patch
Description: Binary data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.