03 Apr, 2014

1 commit

  • Pull trivial tree updates from Jiri Kosina:
    "Usual rocket science -- mostly documentation and comment updates"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial:
    sparse: fix comment
    doc: fix double words
    isdn: capi: fix "CAPI_VERSION" comment
    doc: DocBook: Fix typos in xml and template file
    Bluetooth: add module name for btwilink
    driver core: unexport static function create_syslog_header
    mmc: core: typo fix in printk specifier
    ARM: spear: clean up editing mistake
    net-sysfs: fix comment typo 'CONFIG_SYFS'
    doc: Insert MODULE_ in module-signing macros
    Documentation: update URL to hfsplus Technote 1150
    gpio: update path to documentation
    ixgbe: Fix format string in ixgbe_fcoe.
    Kconfig: Remove useless "default N" lines
    user_namespace.c: Remove duplicated word in comment
    CREDITS: fix formatting
    treewide: Fix typo in Documentation/DocBook
    mm: Fix warning on make htmldocs caused by slab.c
    ata: ata-samsung_cf: cleanup in header file
    idr: remove unused prototype of idr_free()

    Linus Torvalds
     

28 Mar, 2014

1 commit

  • The KVM API documentation is not clear about the semantics of the data
    field on the mmio struct on the kvm_run struct.

    This has become problematic when supporting ARM guests on big-endian
    host systems with guests of both endianness types, because it is unclear
    how the data should be exported to user space.

    This should not break with existing implementations as all supported
    existing implementations of known user space applications (QEMU and
    kvmtools for virtio) only support default endianness of the
    architectures on the host side.

    Cc: Marc Zyngier
    Cc: Peter Maydell
    Cc: Alexander Graf
    Signed-off-by: Christoffer Dall
    Signed-off-by: Paolo Bonzini

    Christoffer Dall
     

21 Mar, 2014

4 commits

  • Introduce a new interrupt class for s390 adapter interrupts and enable
    irqfds for s390.

    This is depending on a new s390 specific vm capability, KVM_CAP_S390_IRQCHIP,
    that needs to be enabled by userspace.

    Acked-by: Christian Borntraeger
    Signed-off-by: Cornelia Huck

    Cornelia Huck
     
  • Add a new interface to register/deregister sources of adapter interrupts
    identified by an unique id via the flic. Adapters may also be maskable
    and carry a list of pinned pages.

    These adapters will be used by irq routing later.

    Acked-by: Christian Borntraeger
    Signed-off-by: Cornelia Huck

    Cornelia Huck
     
  • Allow KVM_ENABLE_CAP to act on a vm as well as on a vcpu. This makes more
    sense when the caller wants to enable a vm-related capability.

    s390 will be the first user; wire it up.

    Reviewed-by: Thomas Huth
    Reviewed-by: Christian Borntraeger
    Signed-off-by: Cornelia Huck

    Cornelia Huck
     
  • Fix double words "the the" in various files
    within Documentations.

    Signed-off-by: Masanari Iida
    Signed-off-by: Jiri Kosina

    Masanari Iida
     

13 Mar, 2014

1 commit

  • Both QEMU and KVM have already accumulated a significant number of
    optimizations based on the hard-coded assumption that ioapic polarity
    will always use the ActiveHigh convention, where the logical and
    physical states of level-triggered irq lines always match (i.e.,
    active(asserted) == high == 1, inactive == low == 0). QEMU guests
    are expected to follow directions given via ACPI and configure the
    ioapic with polarity 0 (ActiveHigh). However, even when misbehaving
    guests (e.g. OS X
    Signed-off-by: Gabriel L. Somlo
    [Move documentation to KVM_IRQ_LINE, add ia64. - Paolo]
    Signed-off-by: Paolo Bonzini

    Gabriel L. Somlo
     

04 Mar, 2014

1 commit


11 Feb, 2014

1 commit

  • Some of the 00-INDEX files are somewhat outdated and some folders does
    not contain 00-INDEX at all. Only outdated (with the notably exception
    of spi) indexes are touched here, the 169 folders without 00-INDEX has
    not been touched.

    New 00-INDEX
    - spi/* was added in a series of commits dating back to 2006

    Added files (missing in (*/)00-INDEX)
    - dmatest.txt was added by commit 851b7e16a07d ("dmatest: run test via
    debugfs")
    - this_cpu_ops.txt was added by commit a1b2a555d637 ("percpu: add
    documentation on this_cpu operations")
    - ww-mutex-design.txt was added by commit 040a0a371005 ("mutex: Add
    support for wound/wait style locks")
    - bcache.txt was added by commit cafe56359144 ("bcache: A block layer
    cache")
    - kernel-per-CPU-kthreads.txt was added by commit 49717cb40410
    ("kthread: Document ways of reducing OS jitter due to per-CPU
    kthreads")
    - phy.txt was added by commit ff764963479a ("drivers: phy: add generic
    PHY framework")
    - block/null_blk was added by commit 12f8f4fc0314 ("null_blk:
    documentation")
    - module-signing.txt was added by commit 3cafea307642 ("Add
    Documentation/module-signing.txt file")
    - assoc_array.txt was added by commit 3cb989501c26 ("Add a generic
    associative array implementation.")
    - arm/IXP4xx was part of the initial repo
    - arm/cluster-pm-race-avoidance.txt was added by commit 7fe31d28e839
    ("ARM: mcpm: introduce helpers for platform coherency exit/setup")
    - arm/firmware.txt was added by commit 7366b92a77fc ("ARM: Add
    interface for registering and calling firmware-specific operations")
    - arm/kernel_mode_neon.txt was added by commit 2afd0a05241d ("ARM:
    7825/1: document the use of NEON in kernel mode")
    - arm/tcm.txt was added by commit bc581770cfdd ("ARM: 5580/2: ARM TCM
    (Tightly-Coupled Memory) support v3")
    - arm/vlocks.txt was added by commit 9762f12d3e05 ("ARM: mcpm: Add
    baremetal voting mutexes")
    - blackfin/gptimers-example.c, Makefile was added by commit
    4b60779d5ea7 ("Blackfin: add an example showing how to use the
    gptimers API")
    - devicetree/usage-model.txt was added by commit 31134efc681a ("dt:
    Linux DT usage model documentation")
    - fb/api.txt was added by commit fb21c2f42879 ("fbdev: Add FOURCC-based
    format configuration API")
    - fb/sm501.txt was added by commit e6a049807105 ("video, sm501: add
    edid and commandline support")
    - fb/udlfb.txt was added by commit 96f8d864afd6 ("fbdev: move udlfb out
    of staging.")
    - filesystems/Makefile was added by commit 1e0051ae48a2
    ("Documentation/fs/: split txt and source files")
    - filesystems/nfs/nfsd-admin-interfaces.txt was added by commit
    8a4c6e19cfed ("nfsd: document kernel interfaces for nfsd
    configuration")
    - ide/warm-plug-howto.txt was added by commit f74c91413ec6 ("ide: add
    warm-plug support for IDE devices (take 2)")
    - laptops/Makefile was added by commit d49129accc21
    ("Documentation/laptop/: split txt and source files")
    - leds/leds-blinkm.txt was added by commit b54cf35a7f65 ("LEDS: add
    BlinkM RGB LED driver, documentation and update MAINTAINERS")
    - leds/ledtrig-oneshot.txt was added by commit 5e417281cde2 ("leds: add
    oneshot trigger")
    - leds/ledtrig-transient.txt was added by commit 44e1e9f8e705 ("leds:
    add new transient trigger for one shot timer activation")
    - m68k/README.buddha was part of the initial repo
    - networking/LICENSE.(qla3xxx|qlcnic|qlge) was added by commits
    40839129f779, c4e84bde1d59, 5a4faa873782
    - networking/Makefile was added by commit 3794f3e812ef ("docsrc: build
    Documentation/ sources")
    - networking/i40evf.txt was added by commit 105bf2fe6b32 ("i40evf: add
    driver to kernel build system")
    - networking/ipsec.txt was added by commit b3c6efbc36e2 ("xfrm: Add
    file to document IPsec corner case")
    - networking/mac80211-auth-assoc-deauth.txt was added by commit
    3cd7920a2be8 ("mac80211: add auth/assoc/deauth flow diagram")
    - networking/netlink_mmap.txt was added by commit 5683264c3981
    ("netlink: add documentation for memory mapped I/O")
    - networking/nf_conntrack-sysctl.txt was added by commit c9f9e0e1597f
    ("netfilter: doc: add nf_conntrack sysctl api documentation") lan)
    - networking/team.txt was added by commit 3d249d4ca7d0 ("net: introduce
    ethernet teaming device")
    - networking/vxlan.txt was added by commit d342894c5d2f ("vxlan:
    virtual extensible lan")
    - power/runtime_pm.txt was added by commit 5e928f77a09a ("PM: Introduce
    core framework for run-time PM of I/O devices (rev. 17)")
    - power/charger-manager.txt was added by commit 3bb3dbbd56ea
    ("power_supply: Add initial Charger-Manager driver")
    - RCU/lockdep-splat.txt was added by commit d7bd2d68aa2e ("rcu:
    Document interpretation of RCU-lockdep splats")
    - s390/kvm.txt was added by 5ecee4b (KVM: s390: API documentation)
    - s390/qeth.txt was added by commit b4d72c08b358 ("qeth: bridgeport
    support - basic control")
    - scheduler/sched-bwc.txt was added by commit 88ebc08ea9f7 ("sched: Add
    documentation for bandwidth control")
    - scsi/advansys.txt was added by commit 4bd6d7f35661 ("[SCSI] advansys:
    Move documentation to Documentation/scsi")
    - scsi/bfa.txt was added by commit 1ec90174bdb4 ("[SCSI] bfa: add
    readme file")
    - scsi/bnx2fc.txt was added by commit 12b8fc10eaf4 ("[SCSI] bnx2fc: Add
    driver documentation")
    - scsi/cxgb3i.txt was added by commit c3673464ebc0 ("[SCSI] cxgb3i: Add
    cxgb3i iSCSI driver.")
    - scsi/hpsa.txt was added by commit 992ebcf14f3c ("[SCSI] hpsa: Add
    hpsa.txt to Documentation/scsi")
    - scsi/link_power_management_policy.txt was added by commit
    ca77329fb713 ("[libata] Link power management infrastructure")
    - scsi/osd.txt was added by commit 78e0c621deca ("[SCSI] osd:
    Documentation for OSD library")
    - scsi/scsi-parameter.txt was created/moved by commit 163475fb111c
    ("Documentation: move SCSI parameters to their own text file")
    - serial/driver was part of the initial repo
    - serial/n_gsm.txt was added by commit 323e84122ec6 ("n_gsm: add a
    documentation")
    - timers/Makefile was added by commit 3794f3e812ef ("docsrc: build
    Documentation/ sources")
    - virt/kvm/s390.txt was added by commit d9101fca3d57 ("KVM: s390:
    diagnose call documentation")
    - vm/split_page_table_lock was added by commit 49076ec2ccaf ("mm:
    dynamically allocate page->ptl if it cannot be embedded to struct
    page")
    - w1/slaves/w1_ds28e04 was added by commit fbf7f7b4e2ae ("w1: Add
    1-wire slave device driver for DS28E04-100")
    - w1/masters/omap-hdq was added by commit e0a29382c6f5 ("hdq:
    documentation for OMAP HDQ")
    - x86/early-microcode.txt was added by commit 0d91ea86a895 ("x86, doc:
    Documentation for early microcode loading")
    - x86/earlyprintk.txt was added by commit a1aade478862 ("x86/doc:
    mini-howto for using earlyprintk=dbgp")
    - x86/entry_64.txt was added by commit 8b4777a4b50c ("x86-64: Document
    some of entry_64.S")
    - x86/pat.txt was added by commit d27554d874c7 ("x86: PAT
    documentation")

    Moved files
    - arm/kernel_user_helpers.txt was moved out of arch/arm/kernel by
    commit 37b8304642c7 ("ARM: kuser: move interface documentation out of
    the source code")
    - efi-stub.txt was moved out of x86/ and down into Documentation/ in
    commit 4172fe2f8a47 ("EFI stub documentation updates")
    - laptops/hpfall.c was moved out of hwmon/ and into laptops/ in commit
    efcfed9bad88 ("Move hp_accel to drivers/platform/x86")
    - commit 5616c23ad9cd ("x86: doc: move x86-generic documentation from
    Doc/x86/i386"):
    * x86/usb-legacy-support.txt
    * x86/boot.txt
    * x86/zero_page.txt
    - power/video_extension.txt was moved to acpi in commit 70e66e4df191
    ("ACPI / video: move video_extension.txt to Documentation/acpi")

    Removed files (left in 00-INDEX)
    - memory.txt was removed by commit 00ea8990aadf ("memory.txt: remove
    stray information")
    - gpio.txt was moved to gpio/ in commit fd8e198cfcaa ("Documentation:
    gpiolib: document new interface")
    - networking/DLINK.txt was removed by commit 168e06ae26dd
    ("drivers/net: delete old parallel port de600/de620 drivers")
    - serial/hayes-esp.txt was removed by commit f53a2ade0bb9 ("tty: esp:
    remove broken driver")
    - s390/TAPE was removed by commit 9e280f669308 ("[S390] remove tape
    block docu")
    - vm/locking was removed by commit 57ea8171d2bc ("mm: documentation:
    remove hopelessly out-of-date locking doc")
    - laptops/acer-wmi.txt was remvoed by commit 020036678e81 ("acer-wmi:
    Delete out-of-date documentation")

    Typos/misc issues
    - rpc-server-gss.txt was added as knfsd-rpcgss.txt in commit
    030d794bf498 ("SUNRPC: Use gssproxy upcall for server RPCGSS
    authentication.")
    - commit b88cf73d9278 ("net: add missing entries to
    Documentation/networking/00-INDEX")
    * generic-hdlc.txt was added as generic_hdlc.txt
    * spider_net.txt was added as spider-net.txt
    - w1/master/mxc-w1 was added as mxc_w1 by commit a5fd9139f74c ("w1: add
    1-wire master driver for i.MX27 / i.MX31")
    - s390/zfcpdump.txt was added as zfcpdump by commit 6920c12a407e
    ("[S390] Add Documentation/s390/00-INDEX.")

    Signed-off-by: Henrik Austad
    Reviewed-by: Paul E. McKenney [rcu bits]
    Acked-by: Rob Landley
    Cc: Jiri Kosina
    Cc: Thomas Gleixner
    Cc: Rob Herring
    Cc: David S. Miller
    Cc: Mark Brown
    Cc: "H. Peter Anvin"
    Cc: Ingo Molnar
    Cc: Gleb Natapov
    Cc: Linus Torvalds
    Cc: Len Brown
    Cc: James Bottomley
    Cc: Jean-Christophe Plagniol-Villard
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Henrik Austad
     

04 Feb, 2014

1 commit


30 Jan, 2014

3 commits


27 Jan, 2014

1 commit

  • The DABRX (DABR extension) register on POWER7 processors provides finer
    control over which accesses cause a data breakpoint interrupt. It
    contains 3 bits which indicate whether to enable accesses in user,
    kernel and hypervisor modes respectively to cause data breakpoint
    interrupts, plus one bit that enables both real mode and virtual mode
    accesses to cause interrupts. Currently, KVM sets DABRX to allow
    both kernel and user accesses to cause interrupts while in the guest.

    This adds support for the guest to specify other values for DABRX.
    PAPR defines a H_SET_XDABR hcall to allow the guest to set both DABR
    and DABRX with one call. This adds a real-mode implementation of
    H_SET_XDABR, which shares most of its code with the existing H_SET_DABR
    implementation. To support this, we add a per-vcpu field to store the
    DABRX value plus code to get and set it via the ONE_REG interface.

    For Linux guests to use this new hcall, userspace needs to add
    "hcall-xdabr" to the set of strings in the /chosen/hypertas-functions
    property in the device tree. If userspace does this and then migrates
    the guest to a host where the kernel doesn't include this patch, then
    userspace will need to implement H_SET_XDABR by writing the specified
    DABR value to the DABR using the ONE_REG interface. In that case, the
    old kernel will set DABRX to DABRX_USER | DABRX_KERNEL. That should
    still work correctly, at least for Linux guests, since Linux guests
    cope with getting data breakpoint interrupts in modes that weren't
    requested by just ignoring the interrupt, and Linux guests never set
    DABRX_BTI.

    The other thing this does is to make H_SET_DABR and H_SET_XDABR work
    on POWER8, which has the DAWR and DAWRX instead of DABR/X. Guests that
    know about POWER8 should use H_SET_MODE rather than H_SET_[X]DABR, but
    guests running in POWER7 compatibility mode will still use H_SET_[X]DABR.
    For them, this adds the logic to convert DABR/X values into DAWR/X values
    on POWER8.

    Signed-off-by: Paul Mackerras
    Signed-off-by: Alexander Graf

    Paul Mackerras
     

15 Jan, 2014

1 commit


01 Jan, 2014

1 commit


22 Dec, 2013

3 commits

  • Add infrastructure to handle distributor and cpu interface register
    accesses through the KVM_{GET/SET}_DEVICE_ATTR interface by adding the
    KVM_DEV_ARM_VGIC_GRP_DIST_REGS and KVM_DEV_ARM_VGIC_GRP_CPU_REGS groups
    and defining the semantics of the attr field to be the MMIO offset as
    specified in the GICv2 specs.

    Missing register accesses or other changes in individual register access
    functions to support save/restore of the VGIC state is added in
    subsequent patches.

    Acked-by: Marc Zyngier
    Signed-off-by: Christoffer Dall

    Christoffer Dall
     
  • Support setting the distributor and cpu interface base addresses in the
    VM physical address space through the KVM_{SET,GET}_DEVICE_ATTR API
    in addition to the ARM specific API.

    This has the added benefit of being able to share more code in user
    space and do things in a uniform manner.

    Also deprecate the older API at the same time, but backwards
    compatibility will be maintained.

    Acked-by: Marc Zyngier
    Signed-off-by: Christoffer Dall

    Christoffer Dall
     
  • Support creating the ARM VGIC device through the KVM_CREATE_DEVICE
    ioctl, which can then later be leveraged to use the
    KVM_{GET/SET}_DEVICE_ATTR, which is useful both for setting addresses in
    a more generic API than the ARM-specific one and is useful for
    save/restore of VGIC state.

    Adds KVM_CAP_DEVICE_CTRL to ARM capabilities.

    Note that we change the check for creating a VGIC from bailing out if
    any VCPUs were created, to bailing out if any VCPUs were ever run. This
    is an important distinction that shouldn't break anything, but allows
    creating the VGIC after the VCPUs have been created.

    Acked-by: Marc Zyngier
    Signed-off-by: Christoffer Dall

    Christoffer Dall
     

18 Dec, 2013

1 commit


12 Dec, 2013

1 commit


04 Nov, 2013

1 commit


31 Oct, 2013

3 commits

  • Cc: Gleb Natapov
    Cc: Paolo Bonzini
    Signed-off-by: Ramkumar Ramachandra
    [Some editing. - Paolo]
    Signed-off-by: Paolo Bonzini

    Ramkumar Ramachandra
     
  • So far we've succeeded at making KVM and VFIO mostly unaware of each
    other, but areas are cropping up where a connection beyond eventfds
    and irqfds needs to be made. This patch introduces a KVM-VFIO device
    that is meant to be a gateway for such interaction. The user creates
    the device and can add and remove VFIO groups to it via file
    descriptors. When a group is added, KVM verifies the group is valid
    and gets a reference to it via the VFIO external user interface.

    Signed-off-by: Alex Williamson
    Signed-off-by: Paolo Bonzini

    Alex Williamson
     
  • Add a kvm ioctl which states which system functionality kvm emulates.
    The format used is that of CPUID and we return the corresponding CPUID
    bits set for which we do emulate functionality.

    Make sure ->padding is being passed on clean from userspace so that we
    can use it for something in the future, after the ioctl gets cast in
    stone.

    s/kvm_dev_ioctl_get_supported_cpuid/kvm_dev_ioctl_get_cpuid/ while at
    it.

    Signed-off-by: Borislav Petkov
    Signed-off-by: Paolo Bonzini

    Borislav Petkov
     

17 Oct, 2013

6 commits

  • This enables us to use the Processor Compatibility Register (PCR) on
    POWER7 to put the processor into architecture 2.05 compatibility mode
    when running a guest. In this mode the new instructions and registers
    that were introduced on POWER7 are disabled in user mode. This
    includes all the VSX facilities plus several other instructions such
    as ldbrx, stdbrx, popcntw, popcntd, etc.

    To select this mode, we have a new register accessible through the
    set/get_one_reg interface, called KVM_REG_PPC_ARCH_COMPAT. Setting
    this to zero gives the full set of capabilities of the processor.
    Setting it to one of the "logical" PVR values defined in PAPR puts
    the vcpu into the compatibility mode for the corresponding
    architecture level. The supported values are:

    0x0f000002 Architecture 2.05 (POWER6)
    0x0f000003 Architecture 2.06 (POWER7)
    0x0f100003 Architecture 2.06+ (POWER7+)

    Since the PCR is per-core, the architecture compatibility level and
    the corresponding PCR value are stored in the struct kvmppc_vcore, and
    are therefore shared between all vcpus in a virtual core.

    Signed-off-by: Paul Mackerras
    [agraf: squash in fix to add missing break statements and documentation]
    Signed-off-by: Alexander Graf

    Paul Mackerras
     
  • POWER7 and later IBM server processors have a register called the
    Program Priority Register (PPR), which controls the priority of
    each hardware CPU SMT thread, and affects how fast it runs compared
    to other SMT threads. This priority can be controlled by writing to
    the PPR or by use of a set of instructions of the form or rN,rN,rN
    which are otherwise no-ops but have been defined to set the priority
    to particular levels.

    This adds code to context switch the PPR when entering and exiting
    guests and to make the PPR value accessible through the SET/GET_ONE_REG
    interface. When entering the guest, we set the PPR as late as
    possible, because if we are setting a low thread priority it will
    make the code run slowly from that point on. Similarly, the
    first-level interrupt handlers save the PPR value in the PACA very
    early on, and set the thread priority to the medium level, so that
    the interrupt handling code runs at a reasonable speed.

    Acked-by: Benjamin Herrenschmidt
    Signed-off-by: Paul Mackerras
    Signed-off-by: Alexander Graf

    Paul Mackerras
     
  • This adds the ability to have a separate LPCR (Logical Partitioning
    Control Register) value relating to a guest for each virtual core,
    rather than only having a single value for the whole VM. This
    corresponds to what real POWER hardware does, where there is a LPCR
    per CPU thread but most of the fields are required to have the same
    value on all active threads in a core.

    The per-virtual-core LPCR can be read and written using the
    GET/SET_ONE_REG interface. Userspace can can only modify the
    following fields of the LPCR value:

    DPFD Default prefetch depth
    ILE Interrupt little-endian
    TC Translation control (secondary HPT hash group search disable)

    We still maintain a per-VM default LPCR value in kvm->arch.lpcr, which
    contains bits relating to memory management, i.e. the Virtualized
    Partition Memory (VPM) bits and the bits relating to guest real mode.
    When this default value is updated, the update needs to be propagated
    to the per-vcore values, so we add a kvmppc_update_lpcr() helper to do
    that.

    Signed-off-by: Paul Mackerras
    [agraf: fix whitespace]
    Signed-off-by: Alexander Graf

    Paul Mackerras
     
  • The VRSAVE register value for a vcpu is accessible through the
    GET/SET_SREGS interface for Book E processors, but not for Book 3S
    processors. In order to make this accessible for Book 3S processors,
    this adds a new register identifier for GET/SET_ONE_REG, and adds
    the code to implement it.

    Signed-off-by: Paul Mackerras
    Signed-off-by: Alexander Graf

    Paul Mackerras
     
  • This allows guests to have a different timebase origin from the host.
    This is needed for migration, where a guest can migrate from one host
    to another and the two hosts might have a different timebase origin.
    However, the timebase seen by the guest must not go backwards, and
    should go forwards only by a small amount corresponding to the time
    taken for the migration.

    Therefore this provides a new per-vcpu value accessed via the one_reg
    interface using the new KVM_REG_PPC_TB_OFFSET identifier. This value
    defaults to 0 and is not modified by KVM. On entering the guest, this
    value is added onto the timebase, and on exiting the guest, it is
    subtracted from the timebase.

    This is only supported for recent POWER hardware which has the TBU40
    (timebase upper 40 bits) register. Writing to the TBU40 register only
    alters the upper 40 bits of the timebase, leaving the lower 24 bits
    unchanged. This provides a way to modify the timebase for guest
    migration without disturbing the synchronization of the timebase
    registers across CPU cores. The kernel rounds up the value given
    to a multiple of 2^24.

    Timebase values stored in KVM structures (struct kvm_vcpu, struct
    kvmppc_vcore, etc.) are stored as host timebase values. The timebase
    values in the dispatch trace log need to be guest timebase values,
    however, since that is read directly by the guest. This moves the
    setting of vcpu->arch.dec_expires on guest exit to a point after we
    have restored the host timebase so that vcpu->arch.dec_expires is a
    host timebase value.

    Signed-off-by: Paul Mackerras
    Signed-off-by: Alexander Graf

    Paul Mackerras
     
  • This reserves space in get/set_one_reg ioctl for the extra guest state
    needed for POWER8. It doesn't implement these at all, it just reserves
    them so that the ABI is defined now.

    A few things to note here:

    - This add *a lot* state for transactional memory. TM suspend mode,
    this is unavoidable, you can't simply roll back all transactions and
    store only the checkpointed state. I've added this all to
    get/set_one_reg (including GPRs) rather than creating a new ioctl
    which returns a struct kvm_regs like KVM_GET_REGS does. This means we
    if we need to extract the TM state, we are going to need a bucket load
    of IOCTLs. Hopefully most of the time this will not be needed as we
    can look at the MSR to see if TM is active and only grab them when
    needed. If this becomes a bottle neck in future we can add another
    ioctl to grab all this state in one go.

    - The TM state is offset by 0x80000000.

    - For TM, I've done away with VMX and FP and created a single 64x128 bit
    VSX register space.

    - I've left a space of 1 (at 0x9c) since Paulus needs to add a value
    which applies to POWER7 as well.

    Signed-off-by: Michael Neuling
    Signed-off-by: Alexander Graf

    Michael Neuling
     

16 Oct, 2013

2 commits


03 Oct, 2013

1 commit

  • To implement CPU=Host we have added KVM_ARM_PREFERRED_TARGET
    vm ioctl which provides information to user space required for
    creating VCPU matching underlying Host.

    This patch adds info related to this new KVM_ARM_PREFERRED_TARGET
    vm ioctl in the KVM API documentation.

    Signed-off-by: Anup Patel
    Signed-off-by: Pranavkumar Sawargaonkar
    Signed-off-by: Christoffer Dall

    Anup Patel
     

30 Sep, 2013

2 commits

  • In commit e935b8372cf8 ("KVM: Convert kvm_lock to raw_spinlock"),
    the kvm_lock was made a raw lock. However, the kvm mmu_shrink()
    function tries to grab the (non-raw) mmu_lock within the scope of
    the raw locked kvm_lock being held. This leads to the following:

    BUG: sleeping function called from invalid context at kernel/rtmutex.c:659
    in_atomic(): 1, irqs_disabled(): 0, pid: 55, name: kswapd0
    Preemption disabled at:[] mmu_shrink+0x5c/0x1b0 [kvm]

    Pid: 55, comm: kswapd0 Not tainted 3.4.34_preempt-rt
    Call Trace:
    [] __might_sleep+0xfd/0x160
    [] rt_spin_lock+0x24/0x50
    [] mmu_shrink+0xec/0x1b0 [kvm]
    [] shrink_slab+0x17d/0x3a0
    [] ? mem_cgroup_iter+0x130/0x260
    [] balance_pgdat+0x54a/0x730
    [] ? set_pgdat_percpu_threshold+0xa7/0xd0
    [] kswapd+0x18f/0x490
    [] ? get_parent_ip+0x11/0x50
    [] ? __init_waitqueue_head+0x50/0x50
    [] ? balance_pgdat+0x730/0x730
    [] kthread+0xdb/0xe0
    [] ? finish_task_switch+0x52/0x100
    [] kernel_thread_helper+0x4/0x10
    [] ? __init_kthread_worker+0x

    After the previous patch, kvm_lock need not be a raw spinlock anymore,
    so change it back.

    Reported-by: Paul Gortmaker
    Cc: kvm@vger.kernel.org
    Cc: gleb@redhat.com
    Cc: jan.kiszka@siemens.com
    Reviewed-by: Gleb Natapov
    Signed-off-by: Paolo Bonzini

    Paolo Bonzini
     
  • The VM list need not be protected by a raw spinlock. Separate the
    two so that kvm_lock can be made non-raw.

    Cc: kvm@vger.kernel.org
    Cc: gleb@redhat.com
    Cc: jan.kiszka@siemens.com
    Reviewed-by: Gleb Natapov
    Signed-off-by: Paolo Bonzini

    Paolo Bonzini
     

25 Sep, 2013

2 commits


07 Sep, 2013

1 commit

  • Pull trivial tree from Jiri Kosina:
    "The usual trivial updates all over the tree -- mostly typo fixes and
    documentation updates"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (52 commits)
    doc: Documentation/cputopology.txt fix typo
    treewide: Convert retrun typos to return
    Fix comment typo for init_cma_reserved_pageblock
    Documentation/trace: Correcting and extending tracepoint documentation
    mm/hotplug: fix a typo in Documentation/memory-hotplug.txt
    power: Documentation: Update s2ram link
    doc: fix a typo in Documentation/00-INDEX
    Documentation/printk-formats.txt: No casts needed for u64/s64
    doc: Fix typo "is is" in Documentations
    treewide: Fix printks with 0x%#
    zram: doc fixes
    Documentation/kmemcheck: update kmemcheck documentation
    doc: documentation/hwspinlock.txt fix typo
    PM / Hibernate: add section for resume options
    doc: filesystems : Fix typo in Documentations/filesystems
    scsi/megaraid fixed several typos in comments
    ppc: init_32: Fix error typo "CONFIG_START_KERNEL"
    treewide: Add __GFP_NOWARN to k.alloc calls with v.alloc fallbacks
    page_isolation: Fix a comment typo in test_pages_isolated()
    doc: fix a typo about irq affinity
    ...

    Linus Torvalds
     

26 Aug, 2013

1 commit