From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C6q1t-00073t-Au for qemu-devel@nongnu.org; Mon, 13 Sep 2004 08:34:00 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C6q1o-00072a-PE for qemu-devel@nongnu.org; Mon, 13 Sep 2004 08:33:54 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C6q1n-00071g-Ci for qemu-devel@nongnu.org; Mon, 13 Sep 2004 08:33:51 -0400 Received: from [80.120.131.105] (helo=linux4.futureware.at) by monty-python.gnu.org with esmtp (Exim 4.34) id 1C6pwB-0001b6-MU for qemu-devel@nongnu.org; Mon, 13 Sep 2004 08:28:04 -0400 From: Philipp =?iso-8859-1?q?G=FChring?= Date: Mon, 13 Sep 2004 14:27:00 +0200 MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <200409131427.00213.mailinglists@futureware.at> Subject: [Qemu-devel] pciproxy Reply-To: pg@futureware.at, qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu devel Mailing list Hi, I updated the pciproxy patch to work against the current CVS. Additionally I would suggest to integrate the qemu part of it in the offici= al=20 qemu, since it is clean code. I haven=B4t looked a the Linux-Host part of pciproxy deeply yet, and I am=20 wondering whether it would be possible to have it as a module? Ok, here is my version of the qemu part of pciproxy, if anyone is intereste= d: cvs diff: Diffing . Index: Makefile.target =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/qemu/qemu/Makefile.target,v retrieving revision 1.40 diff -u -r1.40 Makefile.target =2D-- Makefile.target 24 Aug 2004 21:57:12 -0000 1.40 +++ Makefile.target 13 Sep 2004 12:20:23 -0000 @@ -240,7 +240,7 @@ endif # must use static linking to avoid leaving stuff in virtual address space =2DVL_OBJS=3Dvl.o osdep.o block.o readline.o monitor.o pci.o console.o +VL_OBJS=3Dvl.o osdep.o block.o readline.o monitor.o pci.o console.o pcipro= xy.o VL_OBJS+=3Dblock-cow.o block-qcow.o aes.o block-vmdk.o ifeq ($(TARGET_ARCH), i386) Index: configure =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/qemu/qemu/configure,v retrieving revision 1.43 diff -u -r1.43 configure =2D-- configure 3 Aug 2004 21:14:23 -0000 1.43 +++ configure 13 Sep 2004 12:20:23 -0000 @@ -400,6 +400,11 @@ echo "CONFIG_DARWIN=3Dyes" >> $config_mak echo "#define CONFIG_DARWIN 1" >> $config_h fi +if test -f "/usr/include/sys/io.h"; then + echo "#define HAVE_SYS_IO_H 1" >> $config_h + echo "#define HAVE_IOPL 1" >> $config_h + echo "#define HAVE_IOPERM 1" >> $config_h +fi if test "$gdbstub" =3D "yes" ; then echo "CONFIG_GDBSTUB=3Dyes" >> $config_mak echo "#define CONFIG_GDBSTUB 1" >> $config_h Index: vl.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/qemu/qemu/vl.c,v retrieving revision 1.97 diff -u -r1.97 vl.c =2D-- vl.c 6 Sep 2004 00:14:04 -0000 1.97 +++ vl.c 13 Sep 2004 12:20:25 -0000 @@ -99,6 +99,7 @@ /* XXX: use a two level table to limit memory usage */ #define MAX_IOPORTS 65536 +char *pciproxy_devpath =3D NULL; const char *bios_dir =3D CONFIG_QEMU_SHAREDIR; char phys_ram_file[1024]; CPUState *global_env; @@ -1566,7 +1567,7 @@ return -1; } memset(&ifr, 0, sizeof(ifr)); =2D ifr.ifr_flags =3D IFF_TAP | IFF_NO_PI; + ifr.ifr_flags =3D IFF_TAP | IFF_NO_PI | IFF_ONE_QUEUE; pstrcpy(ifr.ifr_name, IFNAMSIZ, "tun%d"); ret =3D ioctl(fd, TUNSETIFF, (void *) &ifr); if (ret !=3D 0) { @@ -2504,6 +2505,7 @@ "-d item1,... output log to %s (use -d ? for a list of log=20 items)\n" "-hdachs c,h,s force hard disk 0 geometry (usually qemu can=20 guess it)\n" "-L path set the directory for the BIOS and VGA BIOS\n" + "-pciproxy a:b:c proxy pci device\n" #ifdef USE_CODE_COPY "-no-code-copy disable code copy acceleration\n" #endif @@ -2578,6 +2580,7 @@ QEMU_OPTION_L, QEMU_OPTION_no_code_copy, QEMU_OPTION_pci, + QEMU_OPTION_pciproxy, QEMU_OPTION_isa, QEMU_OPTION_prep, QEMU_OPTION_localtime, @@ -2637,6 +2640,7 @@ { "prep", 0, QEMU_OPTION_prep }, { "g", 1, QEMU_OPTION_g }, #endif + { "pciproxy", HAS_ARG, QEMU_OPTION_pciproxy }, { "localtime", 0, QEMU_OPTION_localtime }, { "isa", 0, QEMU_OPTION_isa }, { "std-vga", 0, QEMU_OPTION_std_vga }, @@ -3040,6 +3044,9 @@ sizeof(serial_devices[0]), optarg); serial_device_index++; break; + case QEMU_OPTION_pciproxy: + pciproxy_devpath =3D (char *)optarg; + break; } } } Index: vl.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/qemu/qemu/vl.h,v retrieving revision 1.52 diff -u -r1.52 vl.h =2D-- vl.h 24 Aug 2004 21:13:40 -0000 1.52 +++ vl.h 13 Sep 2004 12:20:26 -0000 @@ -498,6 +498,10 @@ void openpic_set_irq (openpic_t *opp, int n_IRQ, int level); openpic_t *openpic_init (PCIBus *bus, int *pmem_index, int nb_cpus); +/* pciproxy.c */ +extern char *pciproxy_devpath; +void pciproxy_add_device(char *devpath); + /* vga.c */ #define VGA_RAM_SIZE (4096 * 1024) cvs diff: Diffing hw Index: hw/pc.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/qemu/qemu/hw/pc.c,v retrieving revision 1.27 diff -u -r1.27 pc.c =2D-- hw/pc.c 24 Aug 2004 21:13:40 -0000 1.27 +++ hw/pc.c 13 Sep 2004 12:20:26 -0000 @@ -441,6 +441,9 @@ if (pci_enabled) { pci_bus =3D i440fx_init(); piix3_init(pci_bus); + if ( pciproxy_devpath ) + pciproxy_add_device(pciproxy_devpath); + } else { pci_bus =3D NULL; } cvs diff: Diffing linux-user Index: linux-user/syscall.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/qemu/qemu/linux-user/syscall.c,v retrieving revision 1.50 diff -u -r1.50 syscall.c =2D-- linux-user/syscall.c 19 Jun 2004 16:59:03 -0000 1.50 +++ linux-user/syscall.c 13 Sep 2004 12:20:28 -0000 @@ -577,7 +577,7 @@ case SO_OOBINLINE: case SO_NO_CHECK: case SO_PRIORITY: =2D case SO_BSDCOMPAT: + //case SO_BSDCOMPAT: case SO_PASSCRED: case SO_TIMESTAMP: case SO_RCVLOWAT: Many greetings, Philipp G=FChring