]> xenbits.xensource.com Git - qemu-xen-4.6-testing.git/commitdiff
Make DMA buffers depend on stubdom max request size.
authorIan Jackson <iwj@mariner.uk.xensource.com>
Wed, 26 Mar 2008 16:39:34 +0000 (16:39 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 12 May 2008 11:20:10 +0000 (12:20 +0100)
This is the second half of hg changeset
 f4a92f0db20fda98a633c149e3396c005a759a77
the first half of which is in git changeset
 4eaa19458262cce92f0b891c51433ccee0a19b79

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
hw/ide.c

index 6062c7448e24911d96181e7781308f47dba911e0..310c0122291125d2371082b9976d75201a764529 100644 (file)
--- a/hw/ide.c
+++ b/hw/ide.c
 /* set to 1 set disable mult support */
 #define MAX_MULT_SECTORS 16
 
+#ifdef CONFIG_STUBDOM
+#include <xen/io/blkif.h>
+#define IDE_DMA_BUF_SIZE (BLKIF_MAX_SEGMENTS_PER_REQUEST * TARGET_PAGE_SIZE)
+#else
 #define IDE_DMA_BUF_SIZE 131072
+#endif
 
 #if (IDE_DMA_BUF_SIZE < MAX_MULT_SECTORS * 512)
 #error "IDE_DMA_BUF_SIZE must be bigger or equal to MAX_MULT_SECTORS * 512"