15 Oct, 2014

1 commit

  • Replace duplicated code in all transports with a single wrapper in
    virtio.c.

    The only functional change is in virtio_mmio.c: if a buggy device sends
    us an interrupt before driver is set, we previously returned IRQ_NONE,
    now we return IRQ_HANDLED.

    As this must not happen in practice, this does not look like a big deal.

    See also commit 3fff0179e33cd7d0a688dab65700c46ad089e934
    virtio-pci: do not oops on config change if driver not loaded.
    for the original motivation behind the driver check.

    Signed-off-by: Michael S. Tsirkin
    Reviewed-by: Cornelia Huck
    Signed-off-by: Rusty Russell

    Michael S. Tsirkin
     

03 Apr, 2014

1 commit

  • Use the new defines for external interruption codes to get rid
    of "magic" numbers in the s390 source code. And while we're at it,
    also rename the (un-)register_external_interrupt function to
    something shorter so that this patch does not exceed the 80
    columns all over the place.

    Signed-off-by: Thomas Huth
    Signed-off-by: Martin Schwidefsky

    Thomas Huth
     

29 Oct, 2013

1 commit

  • Currently a host kick error is silently ignored and not reflected in
    the virtqueue of a particular virtio device.

    Changing the notify API for guest->host notification seems to be one
    prerequisite in order to be able to handle such errors in the context
    where the kick is triggered.

    This patch changes the notify API. The notify function must return a
    bool return value. It returns false if the host notification failed.

    Signed-off-by: Heinz Graalfs
    Signed-off-by: Rusty Russell

    Heinz Graalfs
     

04 Sep, 2013

1 commit

  • Let's not add a function for every external interrupt subclass for
    which we need reference counting. Just have two register/unregister
    functions which have a subclass parameter:

    void irq_subclass_register(enum irq_subclass subclass);
    void irq_subclass_unregister(enum irq_subclass subclass);

    Signed-off-by: Heiko Carstens

    Heiko Carstens
     

02 Apr, 2013

1 commit

  • The current location for mapping virtio devices does not take
    into consideration the standby memory. This causes the failure
    of mapping standby memory since the location for the mapping is
    already taken by the virtio devices. To fix the problem, we move
    the location to beyond the end of standby memory.

    Signed-off-by: Nick Wang
    Reviewed-by: Christian Borntraeger
    Signed-off-by: Cornelia Huck
    Signed-off-by: Gleb Natapov

    Nick Wang
     

27 Feb, 2013

1 commit

  • Pull virtio updates from Rusty Russell:
    "All trivial, thanks to the stuff which didn't quite make it time"

    * tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
    virtio_console: Initialize guest_connected=true for rproc_serial
    virtio: use module_virtio_driver.
    virtio: Add module driver macro for virtio drivers.
    virtio_console: Use virtio device index to generate port name
    virtio: make pci_device_id const
    virtio: make config_ops const
    virtio-mmio: fix wrong comment about register offset
    virtio_console: Let unconnected rproc device receive data.

    Linus Torvalds
     

25 Feb, 2013

1 commit

  • Pull KVM updates from Marcelo Tosatti:
    "KVM updates for the 3.9 merge window, including x86 real mode
    emulation fixes, stronger memory slot interface restrictions, mmu_lock
    spinlock hold time reduction, improved handling of large page faults
    on shadow, initial APICv HW acceleration support, s390 channel IO
    based virtio, amongst others"

    * tag 'kvm-3.9-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (143 commits)
    Revert "KVM: MMU: lazily drop large spte"
    x86: pvclock kvm: align allocation size to page size
    KVM: nVMX: Remove redundant get_vmcs12 from nested_vmx_exit_handled_msr
    x86 emulator: fix parity calculation for AAD instruction
    KVM: PPC: BookE: Handle alignment interrupts
    booke: Added DBCR4 SPR number
    KVM: PPC: booke: Allow multiple exception types
    KVM: PPC: booke: use vcpu reference from thread_struct
    KVM: Remove user_alloc from struct kvm_memory_slot
    KVM: VMX: disable apicv by default
    KVM: s390: Fix handling of iscs.
    KVM: MMU: cleanup __direct_map
    KVM: MMU: remove pt_access in mmu_set_spte
    KVM: MMU: cleanup mapping-level
    KVM: MMU: lazily drop large spte
    KVM: VMX: cleanup vmx_set_cr0().
    KVM: VMX: add missing exit names to VMX_EXIT_REASONS array
    KVM: VMX: disable SMEP feature when guest is in non-paging mode
    KVM: Remove duplicate text in api.txt
    Revert "KVM: MMU: split kvm_mmu_free_page"
    ...

    Linus Torvalds
     

11 Feb, 2013

1 commit


08 Jan, 2013

1 commit

  • Now that irq sum accounting for /proc/stat's "intr" line works again we
    have the oddity that the sum field (first field) contains only the sum
    of the second (external irqs) and third field (I/O interrupts).
    The reason for that is that these two fields are already sums of all other
    fields. So if we would sum up everything we would count every interrupt
    twice.
    This is broken since the split interrupt accounting was merged two years
    ago: 052ff461c8427629aee887ccc27478fc7373237c "[S390] irq: have detailed
    statistics for interrupt types".
    To fix this remove the split interrupt fields from /proc/stat's "intr"
    line again and only have them in /proc/interrupts.

    This restores the old behaviour, seems to be the only sane fix and mimics
    a behaviour from other architectures where /proc/interrupts also contains
    more than /proc/stat's "intr" line does.

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     

18 Dec, 2012

1 commit

  • Running under a kvm host does not necessarily imply the presence of
    a page mapped above the main memory with the virtio information;
    however, the code includes a hard coded access to that page.

    Instead, check for the presence of the page and exit gracefully
    before we hit an addressing exception if it does not exist.

    Reviewed-by: Marcelo Tosatti
    Reviewed-by: Alexander Graf
    Signed-off-by: Cornelia Huck
    cc: stable@vger.kernel.org
    Signed-off-by: Gleb Natapov

    Cornelia Huck
     

28 Sep, 2012

2 commits

  • virtio network device multiqueue support reserves
    vq 3 for future use (useful both for future extensions and to make it
    pretty - this way receive vqs have even and transmit - odd numbers).
    Make it possible to skip initialization for
    specific vq numbers by specifying NULL for name.
    Document this usage as well as (existing) NULL callback.

    Drivers using this not coded up yet, so I simply tested
    with virtio-pci and verified that this patch does
    not break existing drivers.

    Signed-off-by: Michael S. Tsirkin
    Signed-off-by: Rusty Russell

    Michael S. Tsirkin
     
  • Instead of storing the queue index in transport-specific virtio structs,
    this patch moves them to vring_virtqueue and introduces an helper to get
    the value. This lets drivers simplify their management and tracing of
    virtqueues.

    Signed-off-by: Jason Wang
    Signed-off-by: Paolo Bonzini
    Signed-off-by: Rusty Russell

    Jason Wang
     

25 Jul, 2012

1 commit

  • Pull KVM updates from Avi Kivity:
    "Highlights include
    - full big real mode emulation on pre-Westmere Intel hosts (can be
    disabled with emulate_invalid_guest_state=0)
    - relatively small ppc and s390 updates
    - PCID/INVPCID support in guests
    - EOI avoidance; 3.6 guests should perform better on 3.6 hosts on
    interrupt intensive workloads)
    - Lockless write faults during live migration
    - EPT accessed/dirty bits support for new Intel processors"

    Fix up conflicts in:
    - Documentation/virtual/kvm/api.txt:

    Stupid subchapter numbering, added next to each other.

    - arch/powerpc/kvm/booke_interrupts.S:

    PPC asm changes clashing with the KVM fixes

    - arch/s390/include/asm/sigp.h, arch/s390/kvm/sigp.c:

    Duplicated commits through the kvm tree and the s390 tree, with
    subsequent edits in the KVM tree.

    * tag 'kvm-3.6-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (93 commits)
    KVM: fix race with level interrupts
    x86, hyper: fix build with !CONFIG_KVM_GUEST
    Revert "apic: fix kvm build on UP without IOAPIC"
    KVM guest: switch to apic_set_eoi_write, apic_write
    apic: add apic_set_eoi_write for PV use
    KVM: VMX: Implement PCID/INVPCID for guests with EPT
    KVM: Add x86_hyper_kvm to complete detect_hypervisor_platform check
    KVM: PPC: Critical interrupt emulation support
    KVM: PPC: e500mc: Fix tlbilx emulation for 64-bit guests
    KVM: PPC64: booke: Set interrupt computation mode for 64-bit host
    KVM: PPC: bookehv: Add ESR flag to Data Storage Interrupt
    KVM: PPC: bookehv64: Add support for std/ld emulation.
    booke: Added crit/mc exception handler for e500v2
    booke/bookehv: Add host crit-watchdog exception support
    KVM: MMU: document mmu-lock and fast page fault
    KVM: MMU: fix kvm_mmu_pagetable_walk tracepoint
    KVM: MMU: trace fast page fault
    KVM: MMU: fast path of handling guest page fault
    KVM: MMU: introduce SPTE_MMU_WRITEABLE bit
    KVM: MMU: fold tlb flush judgement into mmu_spte_update
    ...

    Linus Torvalds
     

20 Jul, 2012

1 commit

  • Remove the file name from the comment at top of many files. In most
    cases the file name was wrong anyway, so it's rather pointless.

    Also unify the IBM copyright statement. We did have a lot of sightly
    different statements and wanted to change them one after another
    whenever a file gets touched. However that never happened. Instead
    people start to take the old/"wrong" statements to use as a template
    for new files.
    So unify all of them in one go.

    Signed-off-by: Heiko Carstens

    Heiko Carstens
     

14 Jun, 2012

1 commit


11 Mar, 2012

1 commit

  • The external interrupt handlers have a parameter called ext_int_code.
    Besides the name this paramter does not only contain the ext_int_code
    but in addition also the "cpu address" (POP) which caused the external
    interrupt.
    To make the code a bit more obvious pass a struct instead so the called
    function can easily distinguish between external interrupt code and
    cpu address. The cpu address field however is named "subcode" since
    some external interrupt sources do not pass a cpu address but a
    different parameter (or none at all).

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     

12 Jan, 2012

1 commit

  • We were cheating with our barriers; using the smp ones rather than the
    real device ones. That was fine, until rpmsg came along, which is
    used to talk to a real device (a non-SMP CPU).

    Unfortunately, just putting back the real barriers (reverting
    d57ed95d) causes a performance regression on virtio-pci. In
    particular, Amos reports netbench's TCP_RR over virtio_net CPU
    utilization increased up to 35% while throughput went down by up to
    14%.

    By comparison, this branch is in the noise.

    Reference: https://lkml.org/lkml/2011/12/11/22

    Signed-off-by: Rusty Russell

    Rusty Russell
     

17 Nov, 2011

1 commit


07 Nov, 2011

1 commit

  • * 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits)
    Revert "tracing: Include module.h in define_trace.h"
    irq: don't put module.h into irq.h for tracking irqgen modules.
    bluetooth: macroize two small inlines to avoid module.h
    ip_vs.h: fix implicit use of module_get/module_put from module.h
    nf_conntrack.h: fix up fallout from implicit moduleparam.h presence
    include: replace linux/module.h with "struct module" wherever possible
    include: convert various register fcns to macros to avoid include chaining
    crypto.h: remove unused crypto_tfm_alg_modname() inline
    uwb.h: fix implicit use of asm/page.h for PAGE_SIZE
    pm_runtime.h: explicitly requires notifier.h
    linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h
    miscdevice.h: fix up implicit use of lists and types
    stop_machine.h: fix implicit use of smp.h for smp_processor_id
    of: fix implicit use of errno.h in include/linux/of.h
    of_platform.h: delete needless include
    acpi: remove module.h include from platform/aclinux.h
    miscdevice.h: delete unnecessary inclusion of module.h
    device_cgroup.h: delete needless include
    net: sch_generic remove redundant use of
    net: inet_timewait_sock doesnt need
    ...

    Fix up trivial conflicts (other header files, and removal of the ab3550 mfd driver) in
    - drivers/media/dvb/frontends/dibx000_common.c
    - drivers/media/video/{mt9m111.c,ov6650.c}
    - drivers/mfd/ab3550-core.c
    - include/linux/dmaengine.h

    Linus Torvalds
     

01 Nov, 2011

1 commit

  • Fix several compile errors on s390 caused by splitting module.h.

    Some include additions [e.g. qdio_setup.c, zfcp_qdio.c] are in
    anticipation of pending changes queued for s390 that increase
    the modular use footprint.

    [PG: added additional obvious changes since Heiko's original patch]

    Signed-off-by: Heiko Carstens
    Signed-off-by: Paul Gortmaker

    Heiko Carstens
     

30 Oct, 2011

2 commits


26 May, 2011

2 commits

  • Merge irq.c and s390_ext.c into irq.c. That way all external interrupt
    related functions are together.

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     
  • Interrupt sources like pfault, sclp, dasd_diag and virtio all use the
    service signal external interrupt subclass mask in control register 0
    to enable and disable the corresponding interrupt.
    Because no reference counting is implemented each subsystem thinks it
    is the only user of subclass and sets and clears the bit like it wants.
    This leads to case that unloading the dasd diag module under z/VM
    causes both sclp and pfault interrupts to be masked. The result will
    be locked up system sooner or later.
    Fix this by introducing a new way to set (register) and clear
    (unregister) the service signal subclass mask bit in cr0.
    Also convert all drivers.

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     

29 Apr, 2011

1 commit

  • pfault, dasd diag and virtio all use the same external interrupt number.
    The respective interrupt handlers decide by the subcode if they are
    meant to handle the interrupt.
    Counting is currently done before looking at the subcode which means
    each handler counts an interrupt even if it is not handling it.
    Fix this by moving the kstat code after the code which looks at the
    subcode.

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     

05 Jan, 2011

1 commit

  • Up to now /proc/interrupts only has statistics for external and i/o
    interrupts but doesn't split up them any further.
    This patch adds a line for every single interrupt source so that it
    is possible to easier tell what the machine is/was doing.
    Part of the output now looks like this;

    CPU0 CPU2 CPU4
    EXT: 3898 4232 2305
    I/O: 782 315 245
    CLK: 1029 1964 727 [EXT] Clock Comparator
    IPI: 2868 2267 1577 [EXT] Signal Processor
    TMR: 0 0 0 [EXT] CPU Timer
    TAL: 0 0 0 [EXT] Timing Alert
    PFL: 0 0 0 [EXT] Pseudo Page Fault
    [...]
    NMI: 0 1 1 [NMI] Machine Checks

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     

25 Oct, 2010

1 commit


24 Oct, 2010

2 commits

  • The one big missing feature in s390-virtio was hotplugging. This is no more.
    This patch implements hotplug add support, so you can on the fly add new devices
    in the guest.

    Keep in mind that this needs a patch for qemu to actually leverage the
    functionality.

    Signed-off-by: Alexander Graf
    Signed-off-by: Marcelo Tosatti

    Alexander Graf
     
  • Currenty the ext_param field only distinguishes between "config change" and
    "vring interrupt". We can do a lot more with it though, so let's enable a
    full byte of possible values and constants to #defines while at it.

    Signed-off-by: Alexander Graf
    Signed-off-by: Marcelo Tosatti

    Alexander Graf
     

30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

27 Feb, 2010

1 commit

  • Use asm offsets to make sure the offset defines to struct _lowcore and
    its layout don't get out of sync.
    Also add a BUILD_BUG_ON() which checks that the size of the structure
    is sane.
    And while being at it change those sites which use odd casts to access
    the current lowcore. These should use S390_lowcore instead.

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     

11 Sep, 2009

1 commit


12 Jun, 2009

2 commits


07 Jan, 2009

1 commit


30 Dec, 2008

3 commits


15 Nov, 2008

1 commit


11 Oct, 2008

1 commit

  • No need to define a static device for the kvm_s390 root device,
    just use s390_root_dev_register().

    This is needed for the bus_id rework

    Acked-by: Carsten Otte
    Cc: Kay Sievers
    Signed-off-by: Cornelia Huck
    Signed-off-by: Greg Kroah-Hartman
    Signed-off-by: Martin Schwidefsky

    Cornelia Huck