From 068add8ea95750f9551a4de5e8d8c698612a14ab Mon Sep 17 00:00:00 2001 From: Jiri Denemark Date: Thu, 21 Apr 2011 12:06:41 +0200 Subject: [PATCH] Remove artificial minimum limit for guest memory Remove the artificial minimum of 4096 KB for guest memory. It's drivers' job to set the limit if needed. --- src/libvirt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libvirt.c b/src/libvirt.c index 9e6784bcae..10c3cdf42f 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -2738,7 +2738,7 @@ virDomainSetMaxMemory(virDomainPtr domain, unsigned long memory) virLibDomainError(VIR_ERR_OPERATION_DENIED, __FUNCTION__); goto error; } - if (memory < 4096) { + if (!memory) { virLibDomainError(VIR_ERR_INVALID_ARG, __FUNCTION__); goto error; } @@ -2792,7 +2792,7 @@ virDomainSetMemory(virDomainPtr domain, unsigned long memory) virLibDomainError(VIR_ERR_OPERATION_DENIED, __FUNCTION__); goto error; } - if (memory < 4096) { + if (!memory) { virLibDomainError(VIR_ERR_INVALID_ARG, __FUNCTION__); goto error; } @@ -2861,7 +2861,7 @@ virDomainSetMemoryFlags(virDomainPtr domain, unsigned long memory, goto error; } - if (memory < 4096) { + if (!memory) { virLibDomainError(VIR_ERR_INVALID_ARG, __FUNCTION__); goto error; }