From: Ian Jackson Date: Wed, 22 Oct 2008 17:17:08 +0000 (+0100) Subject: Merge branch 'qemu' X-Git-Tag: t.master-before-merge~69 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=acc42d6748871a25f099a7e2272f1747bf7c995a;p=qemu-xen-4.3-testing.git Merge branch 'qemu' Conflicts: block.c hw/scsi-disk.c vl.c --- acc42d6748871a25f099a7e2272f1747bf7c995a diff --cc block.c index 4676e10dd,e02104bf9..64e7c3edc --- a/block.c +++ b/block.c @@@ -479,7 -459,7 +479,7 @@@ int bdrv_open2(BlockDriverState *bs, co } path_combine(backing_filename, sizeof(backing_filename), filename, bs->backing_file); - if (bdrv_open2(bs->backing_hd, backing_filename, 0, &bdrv_raw) < 0) - if (bdrv_open(bs->backing_hd, backing_filename, open_flags) < 0) ++ if (bdrv_open2(bs->backing_hd, backing_filename, open_flags, &bdrv_raw) < 0) goto fail; } diff --cc hw/scsi-disk.c index 471081e50,a6dee5026..974a826b5 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@@ -34,12 -34,10 +34,15 @@@ do { fprintf(stderr, "scsi-disk: " fmt #define SENSE_HARDWARE_ERROR 4 #define SENSE_ILLEGAL_REQUEST 5 + #define STATUS_GOOD 0 + #define STATUS_CHECK_CONDITION 2 + +#ifdef CONFIG_STUBDOM +#include +#define SCSI_DMA_BUF_SIZE ((BLKIF_MAX_SEGMENTS_PER_REQUEST - 1) * PAGE_SIZE) +#else #define SCSI_DMA_BUF_SIZE 131072 +#endif typedef struct SCSIRequest { SCSIDeviceState *dev; diff --cc vl.c index c2e5ab410,393459847..bdddb6002 --- a/vl.c +++ b/vl.c @@@ -39,10 -38,9 +39,11 @@@ #include "qemu-char.h" #include "block.h" #include "audio/audio.h" +#include "qemu-xen.h" + #include "migration.h" #include +#include #include #include #include @@@ -3390,8 -3345,7 +3390,7 @@@ static void udp_chr_update_read_handler } } - int parse_host_port(struct sockaddr_in *saddr, const char *str); -#ifndef _WIN32 +#ifndef NO_UNIX_SOCKETS static int parse_unix_path(struct sockaddr_un *uaddr, const char *str); #endif int parse_host_src_port(struct sockaddr_in *haddr, @@@ -8840,35 -8771,8 +8924,36 @@@ int main(int argc, char **argv const char *pid_file = NULL; VLANState *vlan; int autostart; + const char *incoming = NULL; + logfile = stderr; /* initial value */ + +#if !defined(__sun__) && !defined(CONFIG_STUBDOM) + /* Maximise rlimits. Needed where default constraints are tight (*BSD). */ + if (getrlimit(RLIMIT_STACK, &rl) != 0) { + perror("getrlimit(RLIMIT_STACK)"); + exit(1); + } + rl.rlim_cur = rl.rlim_max; + if (setrlimit(RLIMIT_STACK, &rl) != 0) + perror("setrlimit(RLIMIT_STACK)"); + if (getrlimit(RLIMIT_DATA, &rl) != 0) { + perror("getrlimit(RLIMIT_DATA)"); + exit(1); + } + rl.rlim_cur = rl.rlim_max; + if (setrlimit(RLIMIT_DATA, &rl) != 0) + perror("setrlimit(RLIMIT_DATA)"); + rl.rlim_cur = RLIM_INFINITY; + rl.rlim_max = RLIM_INFINITY; + if (setrlimit(RLIMIT_RSS, &rl) != 0) + perror("setrlimit(RLIMIT_RSS)"); + rl.rlim_cur = RLIM_INFINITY; + rl.rlim_max = RLIM_INFINITY; + if (setrlimit(RLIMIT_MEMLOCK, &rl) != 0) + perror("setrlimit(RLIMIT_MEMLOCK)"); + #endif + LIST_INIT (&vm_change_state_head); #ifndef _WIN32 {