1. 19 3月, 2007 12 次提交
  2. 18 3月, 2007 10 次提交
    • A
      KVM: MMU: Fix host memory corruption on i386 with >= 4GB ram · 27aba766
      Avi Kivity 提交于
      PAGE_MASK is an unsigned long, so using it to mask physical addresses on
      i386 (which are 64-bit wide) leads to truncation.  This can result in
      page->private of unrelated memory pages being modified, with disasterous
      results.
      
      Fix by not using PAGE_MASK for physical addresses; instead calculate
      the correct value directly from PAGE_SIZE.  Also fix a similar BUG_ON().
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NAvi Kivity <avi@qumranet.com>
      27aba766
    • A
      KVM: MMU: Fix guest writes to nonpae pde · ac1b714e
      Avi Kivity 提交于
      KVM shadow page tables are always in pae mode, regardless of the guest
      setting.  This means that a guest pde (mapping 4MB of memory) is mapped
      to two shadow pdes (mapping 2MB each).
      
      When the guest writes to a pte or pde, we intercept the write and emulate it.
      We also remove any shadowed mappings corresponding to the write.  Since the
      mmu did not account for the doubling in the number of pdes, it removed the
      wrong entry, resulting in a mismatch between shadow page tables and guest
      page tables, followed shortly by guest memory corruption.
      
      This patch fixes the problem by detecting the special case of writing to
      a non-pae pde and adjusting the address and number of shadow pdes zapped
      accordingly.
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NAvi Kivity <avi@qumranet.com>
      ac1b714e
    • A
      KVM: Fix guest sysenter on vmx · f5b42c33
      Avi Kivity 提交于
      The vmx code currently treats the guest's sysenter support msrs as 32-bit
      values, which breaks 32-bit compat mode userspace on 64-bit guests.  Fix by
      using the native word width of the machine.
      Signed-off-by: NAvi Kivity <avi@qumranet.com>
      f5b42c33
    • A
      KVM: Unset kvm_arch_ops if arch module loading failed · ca45aaae
      Avi Kivity 提交于
      Otherwise, the core module thinks the arch module is loaded, and won't
      let you reload it after you've fixed the bug.
      Signed-off-by: NAvi Kivity <avi@qumranet.com>
      ca45aaae
    • B
      ide: remove CONFIG_IDEDMA_{ICS,PCI}_AUTO config options · 120b9cfd
      Bartlomiej Zolnierkiewicz 提交于
      All modern distributions have been setting these options to "y" for ages.
      (additionally "n" cases have been obsoleted for few years).  Therefore use
      DMA by default and remove CONFIG_IDEDMA_{ICS,PCI}_AUTO (also remove no longer
      needed CONFIG_IDEDMA_AUTO).  This fixes DMA support for rare configurations
      where CONFIG_IDEDMA_{ICS,PCI}_AUTO was set to "n" but "hdparm -d 1" was used
      to enable DMA support and which were forced to PIO mode by "ide: don't allow
      DMA to be enabled if CONFIG_IDEDMA_{ICS,PCI}_AUTO=n" patch.  There is no
      functionality loss because "ide=nodma" kernel option is still available.
      
      Cc: Patrick Horn <phrh@yahoo.com>
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: Russell King <rmk+lkml@arm.linux.org.uk>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      120b9cfd
    • B
      ide: don't allow DMA to be enabled if CONFIG_IDEDMA_{ICS,PCI}_AUTO=n · 6f5050a9
      Bartlomiej Zolnierkiewicz 提交于
      For CONFIG_IDEDMA_{ICS,PCI}_AUTO=n and/or "ide=nodma" option the host/device
      are not programmed for DMA and it is also explicitly disabled by ide_set_dma()
      (->ide_dma_check returns "-1").  However the code responsible for manually
      enabling DMA ("hdparm -d 1") has a bug which results in DMA being erroneously
      enabled - ide_set_dma() incorrectly passes "0" return value to set_using_dma().
      This may work if BIOS/firmware configured the host/device for DMA and chipset
      allows independent configuration of DMA/PIO modes but won't work after suspend
      and is generally unsafe on many chipsets (possibly including data corruption
      if the same registers are used for DMA/PIO timings).
      
      This patch fixes kernel bugzilla bug #8169 (piix host driver fixes for
      setting PIO mode exposed the problem described above).  The side-effect of
      the fix is that some rare configuration may be forced to PIO mode when DMA
      mode was previously used - this is addressed by the next patch which removes
      CONFIG_IDEDMA_{PCI,ICS}_AUTO config option completely.
      
      Thanks goes out to Patrick Horn for reporting the issue, narrowing it down
      to the specific commit and testing the fix.  Also thanks to Sergei Shtylyov
      for help in debugging the problem.
      
      Cc: Patrick Horn <phrh@yahoo.com>
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: Russell King <rmk+lkml@arm.linux.org.uk>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      6f5050a9
    • K
      scc_pata: dependency fix · a1067db8
      Kou Ishizaki 提交于
      This patch fixes:
      * the dependency of scc_pata on BLK_DEV_IDEDMA_PCI
      * incorrect link to ide-core
      * move scc_pata from ide/ppc to ide/pci
      Signed-off-by: NKou Ishizaki <kou.ishizaki@toshiba.co.jp>
      Signed-off-by: NAkira Iguchi <akira2.iguchi@toshiba.co.jp>
      Cc: Al Viro <viro@ftp.linux.org.uk>,
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      a1067db8
    • T
      jmicron: make ide jmicron driver play nice with libata ones · ebbc2031
      Tejun Heo 提交于
      When libata is configured, the device is configured such that SATA and
      PATA ports live in separate functions with different programming
      interfaces.  pata_jmicron and ide jmicron drivers can drive only the
      PATA part.
      
      This patch makes jmicron match PCI class code such that it doesn't
      attach itself to the SATA part preventing the proper ahci driver from
      attaching.
      
      This change is suggested by Bartlomiej.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Cc: Jeff Garzik <jeff@garzik.org>
      Cc: justin@jmicron.com
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      ebbc2031
    • R
      ide: au1xxx: fix use of mixed declarations and code · 1918fd63
      Ralf Baechle 提交于
      drivers/ide/mips/au1xxx-ide.c:684: warning: ISO C90 forbids mixed declarations and code
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      1918fd63
    • S
      cmd64x: fix recovery time calculation (take 3) · e277a1aa
      Sergei Shtylyov 提交于
      The driver wrongly takes the address setup time into account when calculating
      the PIO recovery time -- this leads to slight overclocking of the PIO modes 0
      and 1 (so, the prayers failed to help, as usual :-).  Rework the code to be
      calculating recovery clock count as a difference between the total cycle count
      and the active count (we don't need to calculate the recovery time itself since
      it's not specified for the PIO modes 0 to 2, and for modes 3 and 4 this formula
      gives enough recovery time anyway in the chip's supported PCI frequency range).
      
      This patch has been inspired by reading the datasheets and looking at what the
      libata driver does; it has been compile-tested only (as usual :-) but anyway,
      the new code gives the same or longer recovery times than the old one...
      Signed-off-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      e277a1aa
  3. 17 3月, 2007 15 次提交
  4. 16 3月, 2007 1 次提交
    • A
      [PATCH] sysfs and driver core: add callback helper, used by SCSI and S390 · d9a9cdfb
      Alan Stern 提交于
      This patch (as868) adds a helper routine for device drivers that need
      to set up a callback to perform some action in a different process's
      context.  This is intended for use by attribute methods that want to
      unregister themselves or their parent device.  Attribute method calls
      are mutually exclusive with unregistration, so such actions cannot be
      taken directly.
      
      Two attribute methods are converted to use the new helper routine: one
      for SCSI device deletion and one for System/390 ccwgroup devices.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: Hugh Dickins <hugh@veritas.com>
      Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
      Cc: Oliver Neukum <oneukum@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d9a9cdfb
  5. 15 3月, 2007 2 次提交
    • B
      natsemi: Avoid IntrStatus lossage if RX state machine resets. · d2a90036
      broonie@sirena.org.uk 提交于
      This patch fixes the poll routine for the natsemi driver so that if the
      driver detects an RX state machine lockup then no interrupts will be
      lost while the driver recovers from that.
      Signed-Off-By: NMark Brown <broonie@sirena.org.uk>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      d2a90036
    • B
      natsemi: Fix NAPI for interrupt sharing · 069f8256
      broonie@sirena.org.uk 提交于
      The interrupt status register for the natsemi chips is clear on read and
      was read unconditionally from both the interrupt and from the NAPI poll
      routine, meaning that if the interrupt service routine was called (for
      example, due to a shared interrupt) while a NAPI poll was scheduled
      interrupts could be missed.  This patch fixes that by ensuring that the
      interrupt status register is only read by the interrupt handler when
      interrupts are enabled from the chip.
      
      It also reverts a workaround for this problem from the netpoll hook and
      improves the trace for interrupt events.
      
      Thanks to Sergei Shtylyov <sshtylyov@ru.mvista.com> for spotting the
      issue, Mark Huth <mhuth@mvista.com> for a simpler method and Simon
      Blake <simon@citylink.co.nz> for testing resources.
      Signed-Off-By: NMark Brown <broonie@sirena.org.uk>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      069f8256