From 56d8c4364c601895e91edb0ff5ff6779ca21f1bc Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 28 Mar 2008 16:20:45 +0000 Subject: [PATCH] improve DMA transfers by increasing the size of DMA buffers. Signed-off-by: Samuel Thibault Cross-ported from xen-unstable f4a92f0db20fda98a633c149e3396c005a759a77 --- hw/scsi-disk.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index 91fcc70a..3f781666 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -34,7 +34,12 @@ do { fprintf(stderr, "scsi-disk: " fmt , ##args); } while (0) #define SENSE_HARDWARE_ERROR 4 #define SENSE_ILLEGAL_REQUEST 5 -#define SCSI_DMA_BUF_SIZE 65536 +#ifdef CONFIG_STUBDOM +#include +#define SCSI_DMA_BUF_SIZE (BLKIF_MAX_SEGMENTS_PER_REQUEST * TARGET_PAGE_SIZE) +#else +#define SCSI_DMA_BUF_SIZE 131072 +#endif typedef struct SCSIRequest { SCSIDeviceState *dev; -- 2.39.5