28 Apr, 2008

4 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (40 commits)
    [SCSI] jazz_esp, sgiwd93, sni_53c710, sun3x_esp: fix platform driver hotplug/coldplug
    [SCSI] aic7xxx: add const
    [SCSI] aic7xxx: add static
    [SCSI] aic7xxx: Update _shipped files
    [SCSI] aic7xxx: teach aicasm to not emit unused debug code/data
    [SCSI] qla2xxx: Update version number to 8.02.01-k2.
    [SCSI] qla2xxx: Correct regression in relogin code.
    [SCSI] qla2xxx: Correct misc. endian and byte-ordering issues.
    [SCSI] qla2xxx: make qla2x00_issue_iocb_timeout() static
    [SCSI] qla2xxx: qla_os.c, make 2 functions static
    [SCSI] qla2xxx: Re-register FDMI information after a LIP.
    [SCSI] qla2xxx: Correct SRB usage-after-completion/free issues.
    [SCSI] qla2xxx: Correct ISP84XX verify-chip response handling.
    [SCSI] qla2xxx: Wakeup DPC thread to process any deferred-work requests.
    [SCSI] qla2xxx: Collapse RISC-RAM retrieval code during a firmware-dump.
    [SCSI] m68k: new mac_esp scsi driver
    [SCSI] zfcp: Add some statistics provided by the FCP adapter to the sysfs
    [SCSI] zfcp: Print some messages only during ERP
    [SCSI] zfcp: Wait for free SBAL during exchange config
    [SCSI] scsi_transport_fc: fc_user_scan correction
    ...

    Linus Torvalds
     
  • * 'kvm-updates-2.6.26' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm: (147 commits)
    KVM: kill file->f_count abuse in kvm
    KVM: MMU: kvm_pv_mmu_op should not take mmap_sem
    KVM: SVM: remove selective CR0 comment
    KVM: SVM: remove now obsolete FIXME comment
    KVM: SVM: disable CR8 intercept when tpr is not masking interrupts
    KVM: SVM: sync V_TPR with LAPIC.TPR if CR8 write intercept is disabled
    KVM: export kvm_lapic_set_tpr() to modules
    KVM: SVM: sync TPR value to V_TPR field in the VMCB
    KVM: ppc: PowerPC 440 KVM implementation
    KVM: Add MAINTAINERS entry for PowerPC KVM
    KVM: ppc: Add DCR access information to struct kvm_run
    ppc: Export tlb_44x_hwater for KVM
    KVM: Rename debugfs_dir to kvm_debugfs_dir
    KVM: x86 emulator: fix lea to really get the effective address
    KVM: x86 emulator: fix smsw and lmsw with a memory operand
    KVM: x86 emulator: initialize src.val and dst.val for register operands
    KVM: SVM: force a new asid when initializing the vmcb
    KVM: fix kvm_vcpu_kick vs __vcpu_run race
    KVM: add ioctls to save/store mpstate
    KVM: Rename VCPU_MP_STATE_* to KVM_MP_STATE_*
    ...

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (49 commits)
    ide-tape: remove tape->merge_stage
    ide-tape: mv tape->merge_stage_size tape->merge_bh_size
    ide-tape: mv idetape_empty_write_pipeline ide_tape_flush_merge_buffer
    ide-tape: mv idetape_discard_read_pipeline ide_tape_discard_merge_buffer
    ide-tape: make __idetape_discard_read_pipeline() of type void
    ide: remove now unused ide_pci_create_host_proc()
    ide: remove /proc/ide/ali
    ide-tape: improve buffer pages freeing strategy
    ide-tape: mv tape->pages_per_stage tape->pages_per_buffer
    ide-tape: mv tape->stage_size tape->buffer_size
    ide-tape: improve buffer allocation strategy
    ide: add struct ide_io_ports (take 3)
    ide: make ide_unregister() take 'ide_hwif_t *' as an argument (take 2)
    ide: sanitize ide_unregister() usage
    mpc8xx-ide: use ide_find_port()
    ide: add "noacpi" / "acpigtf" / "acpionboot" parameters
    gayle: add "doubler" parameter
    ide: add "cdrom=" and "chs=" parameters
    ide: add "nodma|noflush|noprobe|nowerr=" parameters
    ide: remove obsoleted "hdx=autotune" kernel parameter
    ...

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
    mlx4_core: Add helper to move QP to ready-to-send
    mlx4_core: Add HW queues allocation helpers
    RDMA/nes: Remove volatile qualifier from struct nes_hw_cq.cq_vbase
    mlx4_core: CQ resizing should pass a 0 opcode modifier to MODIFY_CQ
    mlx4_core: Move kernel doorbell management into core
    IB/ehca: Bump version number to 0026
    IB/ehca: Make some module parameters bool, update descriptions
    IB/ehca: Remove mr_largepage parameter
    IB/ehca: Move high-volume debug output to higher debug levels
    IB/ehca: Prevent posting of SQ WQEs if QP not in RTS
    IPoIB: Handle 4K IB MTU for UD (datagram) mode
    RDMA/nes: Fix adapter reset after PXE boot
    RDMA/nes: Print IPv4 addresses in a readable format
    RDMA/nes: Use print_mac() to format ethernet addresses for printing

    Linus Torvalds
     

27 Apr, 2008

36 commits

  • Use kvm own refcounting instead of playing with ->filp->f_count.
    That will allow to get rid of a lot of crap in anon_inode_getfd() and
    kill a race in kvm_dev_ioctl_create_vm() (file might have been closed
    immediately by another thread, so ->filp might point to already freed
    struct file when we get around to setting it).

    Signed-off-by: Al Viro
    Signed-off-by: Avi Kivity

    Al Viro
     
  • Device Control Registers are essentially another address space found on PowerPC
    4xx processors, analogous to PIO on x86. DCRs are always 32 bits, and can be
    identified by a 32-bit number. We forward most DCR accesses to userspace for
    emulation (with the exception of CPR0 registers, which can be read directly
    for simplicity in timebase frequency determination).

    Signed-off-by: Hollis Blanchard
    Signed-off-by: Avi Kivity

    Hollis Blanchard
     
  • It's a globally exported symbol now.

    Signed-off-by: Hollis Blanchard
    Signed-off-by: Avi Kivity

    Hollis Blanchard
     
  • So userspace can save/restore the mpstate during migration.

    [avi: export the #define constants describing the value]
    [christian: add s390 stubs]
    [avi: ditto for ia64]

    Signed-off-by: Marcelo Tosatti
    Signed-off-by: Christian Borntraeger
    Signed-off-by: Carsten Otte
    Signed-off-by: Avi Kivity

    Marcelo Tosatti
     
  • It creates files in proc with obsoleted ->get_info interface.

    Signed-off-by: Alexey Dobriyan
    Cc: Andrew Morton
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Alexey Dobriyan
     
  • * Add struct ide_io_ports and use it instead of `unsigned long io_ports[]`
    in ide_hwif_t.

    * Rename io_ports[] in hw_regs_t to io_ports_array[].

    * Use un-named union for 'unsigned long io_ports_array[]' and 'struct
    ide_io_ports io_ports' in hw_regs_t.

    * Remove IDE_*_OFFSET defines.

    v2:
    * scc_pata.c build fix from Stephen Rothwell.

    v3:
    * Fix ctl_adrr typo in Sparc-specific part of ns87415.c.
    (Noticed by Andrew Morton)

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Make ide_unregister() take 'ide_hwif_t *hwif' instead of 'unsigned int
    index' (hwif->index) as an argument and update all users accordingly.

    While at it:

    * Remove unnecessary checks for hwif != NULL from ide-pnp.c::idepnp_remove()
    and delkin_cb.c::delkin_cb_remove().

    * Remove needless hwif->chipset assignment from scc_pata.c::scc_remove().

    v2:
    * Fixup ide_unregister() documentation.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Rename ide_noacpi{tfs,onboot} to ide_acpi{gtf,onboot} (+ reverse logic).

    * Move ide_*acpi* variables to ide-acpi.c and remove unnecessary initializers.

    * Add "noacpi" / "acpigtf" / "acpionboot" parameters.

    * Obsolete "ide=noacpi" / "ide=acpigtf" / "ide=acpionboot" kernel parameters.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Remove obsoleted "hdx=autotune" kernel parameter
    (we always auto-tune PIO if possible nowadays).

    * Remove no longer needed ide_drive_t.autotune flag.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Don't set IDE_HFLAG_NO_AUTOTUNE host flag in sgiioc4 and icside
    host drivers - there is no need for it as they don't implement
    ->set_pio_mode method.

    * Remove no longer needed IDE_HFLAG_NO_AUTOTUNE host flag.

    There should be no functional changes caused by this patch.

    Acked-by: Sergei Shtylyov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Add "vlb_clock=" parameter for specifying VLB clock frequency (in MHz).

    * Add "pci_clock=" parameter for specifying PCI bus clock frequency (in MHz).

    While at it:

    * qd65xx.c: rename {active,recovery}_cycle variables to {act,rec}_cyc.

    Cc: Alan Cox
    Acked-by: Sergei Shtylyov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Remove obsoleted "hdx=noautotune" kernel parameter
    (it has been obsoleted since 1 Nov 2004).

    Then make ide_hwif_t.autotune a single bit flag
    and remove no longer needed IDE_TUNE_* defines.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Remove obsoleted "idex=reset" kernel parameter
    (it has been obsoleted since 1 Nov 2004).

    Then remove corresponding code from ide_probe_port()
    and no longer used ->reset field from ide_hwif_t.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Add "ignore_cable" parameter:

    * "ide_core.ignore_cable=[interface_number]" boot option if IDE is built-in
    (i.e. "ide_core.ignore_cable=1" to force ignoring cable for "ide1")

    * "ignore_cable=[interface_number]" module parameter (for ide_core module)
    if IDE is compiled as module

    v2:
    * Add ide_port_apply_params() helper
    - use it in ide_device_add_all() and ide_scan_port().

    * Make it possible to later disable ignoring cable detection by passing
    "[interface_number]:0" to /sys/module/ide_core/parameters/ignore_cable
    (however sysfs interface is not enabled yet since it needs some other
    IDE changes to make it work reliable).

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Timers that fire between guest hlt and vcpu_block's add_wait_queue() are
    ignored, possibly resulting in hangs.

    Also make sure that atomic_inc and waitqueue_active tests happen in the
    specified order, otherwise the following race is open:

    CPU0 CPU1
    if (waitqueue_active(wq))
    add_wait_queue()
    if (!atomic_read(pit_timer->pending))
    schedule()
    atomic_inc(pit_timer->pending)

    Signed-off-by: Marcelo Tosatti
    Signed-off-by: Avi Kivity

    Marcelo Tosatti
     
  • This interface allows user a space application to read the trace of kvm
    related events through relayfs.

    Signed-off-by: Feng (Eric) Liu
    Signed-off-by: Avi Kivity

    Feng(Eric) Liu
     
  • Trace markers allow userspace to trace execution of a virtual machine
    in order to monitor its performance.

    Signed-off-by: Feng (Eric) Liu
    Signed-off-by: Avi Kivity

    Feng (Eric) Liu
     
  • This patch introduces a gfn_to_pfn() function and corresponding functions like
    kvm_release_pfn_dirty(). Using these new functions, we can modify the x86
    MMU to no longer assume that it can always get a struct page for any given gfn.

    We don't want to eliminate gfn_to_page() entirely because a number of places
    assume they can do gfn_to_page() and then kmap() the results. When we support
    IO memory, gfn_to_page() will fail for IO pages although gfn_to_pfn() will
    succeed.

    This does not implement support for avoiding reference counting for reserved
    RAM or for IO memory. However, it should make those things pretty straight
    forward.

    Since we're only introducing new common symbols, I don't think it will break
    the non-x86 architectures but I haven't tested those. I've tested Intel,
    AMD, NPT, and hugetlbfs with Windows and Linux guests.

    [avi: fix overflow when shifting left pfns by adding casts]

    Signed-off-by: Anthony Liguori
    Signed-off-by: Avi Kivity

    Anthony Liguori
     
  • the main purpose of adding this functions is the abilaty to release the
    spinlock that protect the kvm list while still be able to do operations
    on a specific kvm in a safe way.

    Signed-off-by: Izik Eidus
    Signed-off-by: Avi Kivity

    Izik Eidus
     
  • This patch introduces interpretation of some diagnose instruction intercepts.
    Diagnose is our classic architected way of doing a hypercall. This patch
    features the following diagnose codes:
    - vm storage size, that tells the guest about its memory layout
    - time slice end, which is used by the guest to indicate that it waits
    for a lock and thus cannot use up its time slice in a useful way
    - ipl functions, which a guest can use to reset and reboot itself

    In order to implement ipl functions, we also introduce an exit reason that
    causes userspace to perform various resets on the virtual machine. All resets
    are described in the principles of operation book, except KVM_S390_RESET_IPL
    which causes a reboot of the machine.

    Acked-by: Martin Schwidefsky
    Signed-off-by: Christian Borntraeger
    Signed-off-by: Carsten Otte
    Signed-off-by: Avi Kivity

    Christian Borntraeger
     
  • This patch contains the s390 interrupt subsystem (similar to in kernel apic)
    including timer interrupts (similar to in-kernel-pit) and enabled wait
    (similar to in kernel hlt).

    In order to achieve that, this patch also introduces intercept handling
    for instruction intercepts, and it implements load control instructions.

    This patch introduces an ioctl KVM_S390_INTERRUPT which is valid for both
    the vm file descriptors and the vcpu file descriptors. In case this ioctl is
    issued against a vm file descriptor, the interrupt is considered floating.
    Floating interrupts may be delivered to any virtual cpu in the configuration.

    The following interrupts are supported:
    SIGP STOP - interprocessor signal that stops a remote cpu
    SIGP SET PREFIX - interprocessor signal that sets the prefix register of a
    (stopped) remote cpu
    INT EMERGENCY - interprocessor interrupt, usually used to signal need_reshed
    and for smp_call_function() in the guest.
    PROGRAM INT - exception during program execution such as page fault, illegal
    instruction and friends
    RESTART - interprocessor signal that starts a stopped cpu
    INT VIRTIO - floating interrupt for virtio signalisation
    INT SERVICE - floating interrupt for signalisations from the system
    service processor

    struct kvm_s390_interrupt, which is submitted as ioctl parameter when injecting
    an interrupt, also carrys parameter data for interrupts along with the interrupt
    type. Interrupts on s390 usually have a state that represents the current
    operation, or identifies which device has caused the interruption on s390.

    kvm_s390_handle_wait() does handle waitpsw in two flavors: in case of a
    disabled wait (that is, disabled for interrupts), we exit to userspace. In case
    of an enabled wait we set up a timer that equals the cpu clock comparator value
    and sleep on a wait queue.

    [christian: change virtio interrupt to 0x2603]

    Acked-by: Martin Schwidefsky
    Signed-off-by: Heiko Carstens
    Signed-off-by: Carsten Otte
    Signed-off-by: Christian Borntraeger
    Signed-off-by: Avi Kivity

    Carsten Otte
     
  • This path introduces handling of sie intercepts in three flavors: Intercepts
    are either handled completely in-kernel by kvm_handle_sie_intercept(),
    or passed to userspace with corresponding data in struct kvm_run in case
    kvm_handle_sie_intercept() returns -ENOTSUPP.
    In case of partial execution in kernel with the need of userspace support,
    kvm_handle_sie_intercept() may choose to set up struct kvm_run and return
    -EREMOTE.

    The trivial intercept reasons are handled in this patch:
    handle_noop() just does nothing for intercepts that don't require our support
    at all
    handle_stop() is called when a cpu enters stopped state, and it drops out to
    userland after updating our vcpu state
    handle_validity() faults in the cpu lowcore if needed, or passes the request
    to userland

    Acked-by: Martin Schwidefsky
    Signed-off-by: Christian Borntraeger
    Signed-off-by: Carsten Otte
    Signed-off-by: Avi Kivity

    Christian Borntraeger
     
  • This patch contains the port of Qumranet's kvm kernel module to IBM zSeries
    (aka s390x, mainframe) architecture. It uses the mainframe's virtualization
    instruction SIE to run virtual machines with up to 64 virtual CPUs each.
    This port is only usable on 64bit host kernels, and can only run 64bit guest
    kernels. However, running 31bit applications in guest userspace is possible.

    The following source files are introduced by this patch
    arch/s390/kvm/kvm-s390.c similar to arch/x86/kvm/x86.c, this implements all
    arch callbacks for kvm. __vcpu_run calls back into
    sie64a to enter the guest machine context
    arch/s390/kvm/sie64a.S assembler function sie64a, which enters guest
    context via SIE, and switches world before and after that
    include/asm-s390/kvm_host.h contains all vital data structures needed to run
    virtual machines on the mainframe
    include/asm-s390/kvm.h defines kvm_regs and friends for user access to
    guest register content
    arch/s390/kvm/gaccess.h functions similar to uaccess to access guest memory
    arch/s390/kvm/kvm-s390.h header file for kvm-s390 internals, extended by
    later patches

    Acked-by: Martin Schwidefsky
    Signed-off-by: Christian Borntraeger
    Signed-off-by: Heiko Carstens
    Signed-off-by: Carsten Otte
    Signed-off-by: Avi Kivity

    Heiko Carstens
     
  • The SIE instruction on s390 uses the 2nd half of the page table page to
    virtualize the storage keys of a guest. This patch offers the s390_enable_sie
    function, which reorganizes the page tables of a single-threaded process to
    reserve space in the page table:
    s390_enable_sie makes sure that the process is single threaded and then uses
    dup_mm to create a new mm with reorganized page tables. The old mm is freed
    and the process has now a page status extended field after every page table.

    Code that wants to exploit pgstes should SELECT CONFIG_PGSTE.

    This patch has a small common code hit, namely making dup_mm non-static.

    Edit (Carsten): I've modified Martin's patch, following Jeremy Fitzhardinge's
    review feedback. Now we do have the prototype for dup_mm in
    include/linux/sched.h. Following Martin's suggestion, s390_enable_sie() does now
    call task_lock() to prevent race against ptrace modification of mm_users.

    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Carsten Otte
    Acked-by: Andrew Morton
    Signed-off-by: Avi Kivity

    Carsten Otte
     
  • Signed-off-by: Avi Kivity

    Avi Kivity
     
  • include/linux/kvm.h defines struct kvm_dirty_log to
    [...]
    union {
    void __user *dirty_bitmap; /* one bit per page */
    __u64 padding;
    };

    __user requires compiler.h to compile. Currently, this works on x86
    only coincidentally due to other include files. This patch makes
    kvm.h compile in all cases.

    Signed-off-by: Christian Borntraeger
    Signed-off-by: Avi Kivity

    Christian Borntraeger
     
  • Hypercall based pte updates are faster than faults, and also allow use
    of the lazy MMU mode to batch operations.

    Don't report the feature if two dimensional paging is enabled.

    [avi:
    - one mmu_op hypercall instead of one per op
    - allow 64-bit gpa on hypercall
    - don't pass host errors (-ENOMEM) to guest]

    [akpm: warning fix on i386]

    Signed-off-by: Marcelo Tosatti
    Signed-off-by: Andrew Morton
    Signed-off-by: Avi Kivity

    Marcelo Tosatti
     
  • Add basic KVM paravirt support. Avoid vm-exits on IO delays.

    Signed-off-by: Marcelo Tosatti
    Signed-off-by: Avi Kivity

    Marcelo Tosatti
     
  • Add basic KVM paravirt support. Avoid vm-exits on IO delays.

    Signed-off-by: Marcelo Tosatti
    Signed-off-by: Avi Kivity

    Marcelo Tosatti
     
  • Signed-off-by: Sheng Yang
    Signed-off-by: Avi Kivity

    Sheng Yang
     
  • The patch moves the PIT model from userspace to kernel, and increases
    the timer accuracy greatly.

    [marcelo: make last_injected_time per-guest]

    Signed-off-by: Sheng Yang
    Signed-off-by: Marcelo Tosatti
    Tested-and-Acked-by: Alex Davis
    Signed-off-by: Avi Kivity

    Sheng Yang
     
  • In the current inject_page_fault path KVM only checks if there is another PF
    pending and injects a DF then. But it has to check for a pending DF too to
    detect a shutdown condition in the VCPU. If this is not detected the VCPU goes
    to a PF -> DF -> PF loop when it should triple fault. This patch detects this
    condition and handles it with an KVM_SHUTDOWN exit to userspace.

    Signed-off-by: Joerg Roedel
    Signed-off-by: Avi Kivity

    Joerg Roedel
     
  • Create large pages mappings if the guest PTE's are marked as such and
    the underlying memory is hugetlbfs backed. If the largepage contains
    write-protected pages, a large pte is not used.

    Gives a consistent 2% improvement for data copies on ram mounted
    filesystem, without NPT/EPT.

    Anthony measures a 4% improvement on 4-way kernbench, with NPT.

    Signed-off-by: Marcelo Tosatti
    Signed-off-by: Avi Kivity

    Marcelo Tosatti
     
  • Mark zapped root pagetables as invalid and ignore such pages during lookup.

    This is a problem with the cr3-target feature, where a zapped root table fools
    the faulting code into creating a read-only mapping. The result is a lockup
    if the instruction can't be emulated.

    Signed-off-by: Marcelo Tosatti
    Cc: Anthony Liguori
    Signed-off-by: Avi Kivity

    Marcelo Tosatti
     
  • Signed-off-by: Avi Kivity

    Avi Kivity
     
  • Signed-off-by: Avi Kivity

    Avi Kivity