@@ -24,6 +24,7 @@
#include "sysemu/cryptodev.h"
#include "migration/migration.h"
#include "migration/postcopy-ram.h"
+#include CONFIG_DEVICES
#include "trace.h"
#include <sys/ioctl.h>
@@ -45,8 +46,10 @@
* the maximum number supported by the target
* hardware plaform.
*/
-#if defined(TARGET_X86) || defined(TARGET_X86_64) || \
- defined(TARGET_ARM) || defined(TARGET_ARM_64)
+#if defined(CONFIG_VIRTIO_MEM)
+#define VHOST_USER_MAX_RAM_SLOTS 4096
+#elif defined(TARGET_X86) || defined(TARGET_X86_64) || \
+ defined(TARGET_ARM) || defined(TARGET_ARM_64)
#include "hw/acpi/acpi.h"
#define VHOST_USER_MAX_RAM_SLOTS ACPI_MAX_RAM_SLOTS
Let's increase the number of slots to 4096 to allow for increased flexibility with virtio-mem when dealing with large virtio-mem devices that start out small. In the future, we might want to look into some performance improvements, but for now there isn't really anything stopping us from raising the limit. Signed-off-by: David Hildenbrand <david@redhat.com> --- hw/virtio/vhost-user.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)