1. 26 10月, 2007 3 次提交
  2. 25 10月, 2007 8 次提交
  3. 24 10月, 2007 13 次提交
  4. 23 10月, 2007 16 次提交
    • L
      mv643xx_eth: Move ethernet register definitions into private header · e2734d6c
      Lennert Buytenhek 提交于
      Move the mv643xx's ethernet-related register definitions from
      include/linux/mv643xx.h into drivers/net/mv643xx_eth.h, since
      they aren't of any use outside the ethernet driver.
      Signed-off-by: NLennert Buytenhek <buytenh@marvell.com>
      Acked-by: NTzachi Perelstein <tzachi@marvell.com>
      Signed-off-by: NDale Farnsworth <dale@farnsworth.org>
      e2734d6c
    • L
      mv643xx_eth: Split off mv643xx_eth platform device data · c4a6a2ab
      Lennert Buytenhek 提交于
      The mv643xx ethernet silicon block is also found in a couple of other
      Marvell chips.  As a first step towards splitting off the mv643xx_eth
      bits from the rest of the mv643xx bits, this patch splits the mv643xx
      ethernet platform device data struct in linux/mv643xx.h off into
      linux/mv643xx_eth.h, and includes the latter from the former.
      Signed-off-by: NLennert Buytenhek <buytenh@marvell.com>
      Acked-by: NTzachi Perelstein <tzachi@marvell.com>
      Signed-off-by: NDale Farnsworth <dale@farnsworth.org>
      c4a6a2ab
    • R
      Lguest support for Virtio · 19f1537b
      Rusty Russell 提交于
      This makes lguest able to use the virtio devices.
      
      We change the device descriptor page from a simple array to a variable
      length "type, config_len, status, config data..." format, and
      implement virtio_config_ops to read from that config data.
      
      We use the virtio ring implementation for an efficient Guest <-> Host
      virtqueue mechanism, and the new LHCALL_NOTIFY hypercall to kick the
      host when it changes.
      
      We also use LHCALL_NOTIFY on kernel addresses for very very early
      console output.  We could have another hypercall, but this hack works
      quite well.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      19f1537b
    • R
      Remove old lguest I/O infrrasructure. · 15045275
      Rusty Russell 提交于
      This patch gets rid of the old lguest host I/O infrastructure and
      replaces it with a single hypercall "LHCALL_NOTIFY" which takes an
      address.
      
      The main change is the removal of io.c: that mainly did inter-guest
      I/O, which virtio doesn't yet support.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      15045275
    • R
      Remove old lguest bus and drivers. · 0ca49ca9
      Rusty Russell 提交于
      This gets rid of the lguest bus, drivers and DMA mechanism, to make
      way for a generic virtio mechanism.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      0ca49ca9
    • R
      Virtio helper routines for a descriptor ringbuffer implementation · 0a8a69dd
      Rusty Russell 提交于
      These helper routines supply most of the virtqueue_ops for hypervisors
      which want to use a ring for virtio.  Unlike the previous lguest
      implementation:
      
      1) The rings are variable sized (2^n-1 elements).
      2) They have an unfortunate limit of 65535 bytes per sg element.
      3) The page numbers are always 64 bit (PAE anyone?)
      4) They no longer place used[] on a separate page, just a separate
         cacheline.
      5) We do a modulo on a variable.  We could be tricky if we cared.
      6) Interrupts and notifies are suppressed using flags within the rings.
      
      Users need only get the ring pages and provide a notify hook (KVM
      wants the guest to allocate the rings, lguest does it sanely).
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Cc: Dor Laor <dor.laor@qumranet.com>
      0a8a69dd
    • R
      Virtio console driver · 31610434
      Rusty Russell 提交于
      This is an hvc-based virtio console driver.  It's suboptimal becuase
      hvc expects to have raw access to interrupts and virtio doesn't assume
      that, so it currently polls.
      
      There are two solutions: expose hvc's "kick" interface, or wean off hvc.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      31610434
    • R
      Block driver using virtio. · e467cde2
      Rusty Russell 提交于
      The block driver uses scatter-gather lists with sg[0] being the
      request information (struct virtio_blk_outhdr) with the type, sector
      and inbuf id.  The next N sg entries are the bio itself, then the last
      sg is the status byte.  Whether the N entries are in or out depends on
      whether it's a read or a write.
      
      We accept the normal (SCSI) ioctls: they get handed through to the other
      side which can then handle it or reply that it's unsupported.  It's
      not clear that this actually works in general, since I don't know
      if blk_pc_request() requests have an accurate rq_data_dir().
      
      Although we try to reply -ENOTTY on unsupported commands, ioctl(fd,
      CDROMEJECT) returns success to userspace.  This needs a separate
      patch.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      e467cde2
    • R
      Net driver using virtio · 296f96fc
      Rusty Russell 提交于
      The network driver uses two virtqueues: one for input packets and one
      for output packets.  This has nice locking properties (ie. we don't do
      any for recv vs send).
      
      TODO:
      	1) Big packets.
      	2) Multi-client devices (maybe separate driver?).
      	3) Resolve freeing of old xmit skbs (Christian Borntraeger)
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: netdev@vger.kernel.org
      296f96fc
    • R
      Virtio interface · ec3d41c4
      Rusty Russell 提交于
      This attempts to implement a "virtual I/O" layer which should allow
      common drivers to be efficiently used across most virtual I/O
      mechanisms.  It will no-doubt need further enhancement.
      
      The virtio drivers add buffers to virtio queues; as the buffers are consumed
      the driver "interrupt" callbacks are invoked.
      
      There is also a generic implementation of config space which drivers can query
      to get setup information from the host.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Cc: Dor Laor <dor.laor@qumranet.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      ec3d41c4
    • R
      Boot with virtual == physical to get closer to native Linux. · 47436aa4
      Rusty Russell 提交于
      1) This allows us to get alot closer to booting bzImages.
      
      2) It means we don't have to know page_offset.
      
      3) The Guest needs to modify the boot pagetables to create the
         PAGE_OFFSET mapping before jumping to C code.
      
      4) guest_pa() walks the page tables rather than using page_offset.
      
      5) We don't use page_offset to figure out whether to emulate: it was
         always kinda quesationable, and won't work for instructions done
         before remapping (bzImage unpacking in particular).
      
      6) We still want the kernel address for tlb flushing: have the initial
         hypercall give us that, too.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      47436aa4
    • R
      Allow guest to specify syscall vector to use. · c18acd73
      Rusty Russell 提交于
      (Based on Ron Minnich's LGUEST_PLAN9_SYSCALL patch).
      
      This patch allows Guests to specify what system call vector they want,
      and we try to reserve it.  We only allow one non-Linux system call
      vector, to try to avoid DoS on the Host.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      c18acd73
    • J
      47aee45a
    • J
      Make hypercalls arch-independent. · b410e7b1
      Jes Sorensen 提交于
      Clean up the hypercall code to make the code in hypercalls.c
      architecture independent. First process the common hypercalls and
      then call lguest_arch_do_hcall() if the call hasn't been handled.
      Rename struct hcall_ring to hcall_args.
      
      This patch requires the previous patch which reorganize the layout of
      struct lguest_regs on i386 so they match the layout of struct
      hcall_args.
      Signed-off-by: NJes Sorensen <jes@sgi.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      b410e7b1
    • R
      Remove fixed limit on number of guests, and lguests array. · 48245cc0
      Rusty Russell 提交于
      Back when we had all the Guest state in the switcher, we had a fixed
      array of them.  This is no longer necessary.
      
      If we switch the network code to using random_ether_addr (46 bits is
      enough to avoid clashes), we can get rid of the concept of "guest id"
      altogether.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      48245cc0
    • J
      Move lguest hcalls to arch-specific header · c37ae93d
      Jes Sorensen 提交于
      Move architecture specific portion of lg_hcall code to asm-i386/lg_hcall.h
      and have it included from linux/lguest.h.
      
      [Changed to asm-i386/lguest_hcall.h so documentation finds it -RR]
      Signed-off-by: NJes Sorensen <jes@sgi.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Cc: Jes Sorensen <jes@sgi.com>
      c37ae93d