All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philipp Gühring" <mailinglists@futureware.at>
To: qemu devel Mailing list <qemu-devel@nongnu.org>
Subject: [Qemu-devel] pciproxy
Date: Mon, 13 Sep 2004 14:27:00 +0200	[thread overview]
Message-ID: <200409131427.00213.mailinglists@futureware.at> (raw)

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 official 
qemu, since it is clean code.

I haven´t looked a the Linux-Host part of pciproxy deeply yet, and I am 
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 interested:

cvs diff: Diffing .
Index: Makefile.target
===================================================================
RCS file: /cvsroot/qemu/qemu/Makefile.target,v
retrieving revision 1.40
diff -u -r1.40 Makefile.target
--- 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
-VL_OBJS=vl.o osdep.o block.o readline.o monitor.o pci.o console.o
+VL_OBJS=vl.o osdep.o block.o readline.o monitor.o pci.o console.o pciproxy.o
 VL_OBJS+=block-cow.o block-qcow.o aes.o block-vmdk.o

 ifeq ($(TARGET_ARCH), i386)
Index: configure
===================================================================
RCS file: /cvsroot/qemu/qemu/configure,v
retrieving revision 1.43
diff -u -r1.43 configure
--- 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=yes" >> $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" = "yes" ; then
   echo "CONFIG_GDBSTUB=yes" >> $config_mak
   echo "#define CONFIG_GDBSTUB 1" >> $config_h
Index: vl.c
===================================================================
RCS file: /cvsroot/qemu/qemu/vl.c,v
retrieving revision 1.97
diff -u -r1.97 vl.c
--- 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 = NULL;
 const char *bios_dir = CONFIG_QEMU_SHAREDIR;
 char phys_ram_file[1024];
 CPUState *global_env;
@@ -1566,7 +1567,7 @@
         return -1;
     }
     memset(&ifr, 0, sizeof(ifr));
-    ifr.ifr_flags = IFF_TAP | IFF_NO_PI;
+    ifr.ifr_flags = IFF_TAP | IFF_NO_PI | IFF_ONE_QUEUE;
     pstrcpy(ifr.ifr_name, IFNAMSIZ, "tun%d");
     ret = ioctl(fd, TUNSETIFF, (void *) &ifr);
     if (ret != 0) {
@@ -2504,6 +2505,7 @@
            "-d item1,...    output log to %s (use -d ? for a list of log 
items)\n"
            "-hdachs c,h,s   force hard disk 0 geometry (usually qemu can 
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 = (char *)optarg;
+                break;
             }
         }
     }
Index: vl.h
===================================================================
RCS file: /cvsroot/qemu/qemu/vl.h,v
retrieving revision 1.52
diff -u -r1.52 vl.h
--- 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
===================================================================
RCS file: /cvsroot/qemu/qemu/hw/pc.c,v
retrieving revision 1.27
diff -u -r1.27 pc.c
--- 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 = i440fx_init();
         piix3_init(pci_bus);
+        if ( pciproxy_devpath )
+           pciproxy_add_device(pciproxy_devpath);
+
     } else {
         pci_bus = NULL;
     }
cvs diff: Diffing linux-user
Index: linux-user/syscall.c
===================================================================
RCS file: /cvsroot/qemu/qemu/linux-user/syscall.c,v
retrieving revision 1.50
diff -u -r1.50 syscall.c
--- 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:
-        case SO_BSDCOMPAT:
+        //case SO_BSDCOMPAT:
         case SO_PASSCRED:
         case SO_TIMESTAMP:
         case SO_RCVLOWAT:






Many greetings,
Philipp Gühring

             reply	other threads:[~2004-09-13 12:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-13 12:27 Philipp Gühring [this message]
2004-09-14 15:20 ` [Qemu-devel] pciproxy Gianni Tedesco

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200409131427.00213.mailinglists@futureware.at \
    --to=mailinglists@futureware.at \
    --cc=pg@futureware.at \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.