20 Jul, 2012

4 commits

  • Currently kexec in a PVonHVM guest fails with a triple fault because the
    new kernel overwrites the shared info page. The exact failure depends on
    the size of the kernel image. This patch moves the pfn from RAM into
    MMIO space before the kexec boot.

    The pfn containing the shared_info is located somewhere in RAM. This
    will cause trouble if the current kernel is doing a kexec boot into a
    new kernel. The new kernel (and its startup code) can not know where the
    pfn is, so it can not reserve the page. The hypervisor will continue to
    update the pfn, and as a result memory corruption occours in the new
    kernel.

    One way to work around this issue is to allocate a page in the
    xen-platform pci device's BAR memory range. But pci init is done very
    late and the shared_info page is already in use very early to read the
    pvclock. So moving the pfn from RAM to MMIO is racy because some code
    paths on other vcpus could access the pfn during the small window when
    the old pfn is moved to the new pfn. There is even a small window were
    the old pfn is not backed by a mfn, and during that time all reads
    return -1.

    Because it is not known upfront where the MMIO region is located it can
    not be used right from the start in xen_hvm_init_shared_info.

    To minimise trouble the move of the pfn is done shortly before kexec.
    This does not eliminate the race because all vcpus are still online when
    the syscore_ops will be called. But hopefully there is no work pending
    at this point in time. Also the syscore_op is run last which reduces the
    risk further.

    Signed-off-by: Olaf Hering
    Signed-off-by: Konrad Rzeszutek Wilk

    Olaf Hering
     
  • Add xs_reset_watches function to shutdown watches from old kernel after
    kexec boot. The old kernel does not unregister all watches in the
    shutdown path. They are still active, the double registration can not
    be detected by the new kernel. When the watches fire, unexpected events
    will arrive and the xenwatch thread will crash (jumps to NULL). An
    orderly reboot of a hvm guest will destroy the entire guest with all its
    resources (including the watches) before it is rebuilt from scratch, so
    the missing unregister is not an issue in that case.

    With this change the xenstored is instructed to wipe all active watches
    for the guest. However, a patch for xenstored is required so that it
    accepts the XS_RESET_WATCHES request from a client (see changeset
    23839:42a45baf037d in xen-unstable.hg). Without the patch for xenstored
    the registration of watches will fail and some features of a PVonHVM
    guest are not available. The guest is still able to boot, but repeated
    kexec boots will fail.

    Signed-off-by: Olaf Hering
    Signed-off-by: Konrad Rzeszutek Wilk

    Olaf Hering
     
  • This patch provide Xen physical cpus online/offline sys interface.
    User can use it for their own purpose, like power saving:
    by offlining some cpus when light workload it save power greatly.

    Its basic workflow is, user online/offline cpu via sys interface,
    then hypercall xen to implement, after done xen inject virq back to dom0,
    and then dom0 sync cpu status.

    Signed-off-by: Jiang, Yunhong
    Signed-off-by: Liu, Jinsong
    Signed-off-by: Konrad Rzeszutek Wilk

    Liu, Jinsong
     
  • When MCA error occurs, it would be handled by Xen hypervisor first,
    and then the error information would be sent to initial domain for logging.

    This patch gets error information from Xen hypervisor and convert
    Xen format error into Linux format mcelog. This logic is basically
    self-contained, not touching other kernel components.

    By using tools like mcelog tool users could read specific error information,
    like what they did under native Linux.

    To test follow directions outlined in Documentation/acpi/apei/einj.txt

    Acked-and-tested-by: Borislav Petkov
    Signed-off-by: Ke, Liping
    Signed-off-by: Jiang, Yunhong
    Signed-off-by: Jeremy Fitzhardinge
    Signed-off-by: Liu, Jinsong
    Signed-off-by: Konrad Rzeszutek Wilk

    Liu, Jinsong
     

22 May, 2012

1 commit

  • PV on HVM guests map GSIs into event channels. At restore time the
    event channels are resumed by restore_pirqs.

    Device drivers might try to register the same GSI again through ACPI at
    restore time, but the GSI has already been mapped and bound by
    restore_pirqs. This patch detects these situations and avoids
    mapping the same GSI multiple times.

    Without this patch we get:
    (XEN) irq.c:2235: dom4: pirq 23 or emuirq 28 already mapped
    and waste a pirq.

    CC: stable@kernel.org
    Signed-off-by: Stefano Stabellini
    Signed-off-by: Konrad Rzeszutek Wilk

    Stefano Stabellini
     

21 May, 2012

1 commit


08 May, 2012

1 commit

  • Provide the registration callback to call in the Xen's
    ACPI sleep functionality. This means that during S3/S5
    we make a hypercall XENPF_enter_acpi_sleep with the
    proper PM1A/PM1B registers.

    Based of Ke Yu's initial idea.
    [ From http://xenbits.xensource.com/linux-2.6.18-xen.hg
    change c68699484a65 ]

    [v1: Added Copyright and license]
    [v2: Added check if PM1A/B the 16-bits MSB contain something. The spec
    only uses 16-bits but might have more in future]
    Signed-off-by: Liang Tang
    Signed-off-by: Konrad Rzeszutek Wilk

    Konrad Rzeszutek Wilk
     

05 Apr, 2012

1 commit

  • Pull DMA mapping branch from Marek Szyprowski:
    "Short summary for the whole series:

    A few limitations have been identified in the current dma-mapping
    design and its implementations for various architectures. There exist
    more than one function for allocating and freeing the buffers:
    currently these 3 are used dma_{alloc, free}_coherent,
    dma_{alloc,free}_writecombine, dma_{alloc,free}_noncoherent.

    For most of the systems these calls are almost equivalent and can be
    interchanged. For others, especially the truly non-coherent ones
    (like ARM), the difference can be easily noticed in overall driver
    performance. Sadly not all architectures provide implementations for
    all of them, so the drivers might need to be adapted and cannot be
    easily shared between different architectures. The provided patches
    unify all these functions and hide the differences under the already
    existing dma attributes concept. The thread with more references is
    available here:

    http://www.spinics.net/lists/linux-sh/msg09777.html

    These patches are also a prerequisite for unifying DMA-mapping
    implementation on ARM architecture with the common one provided by
    dma_map_ops structure and extending it with IOMMU support. More
    information is available in the following thread:

    http://thread.gmane.org/gmane.linux.kernel.cross-arch/12819

    More works on dma-mapping framework are planned, especially in the
    area of buffer sharing and managing the shared mappings (together with
    the recently introduced dma_buf interface: commit d15bd7ee445d
    "dma-buf: Introduce dma buffer sharing mechanism").

    The patches in the current set introduce a new alloc/free methods
    (with support for memory attributes) in dma_map_ops structure, which
    will later replace dma_alloc_coherent and dma_alloc_writecombine
    functions."

    People finally started piping up with support for merging this, so I'm
    merging it as the last of the pending stuff from the merge window.
    Looks like pohmelfs is going to wait for 3.5 and more external support
    for merging.

    * 'for-linus' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping:
    common: DMA-mapping: add NON-CONSISTENT attribute
    common: DMA-mapping: add WRITE_COMBINE attribute
    common: dma-mapping: introduce mmap method
    common: dma-mapping: remove old alloc_coherent and free_coherent methods
    Hexagon: adapt for dma_map_ops changes
    Unicore32: adapt for dma_map_ops changes
    Microblaze: adapt for dma_map_ops changes
    SH: adapt for dma_map_ops changes
    Alpha: adapt for dma_map_ops changes
    SPARC: adapt for dma_map_ops changes
    PowerPC: adapt for dma_map_ops changes
    MIPS: adapt for dma_map_ops changes
    X86 & IA64: adapt for dma_map_ops changes
    common: dma-mapping: introduce generic alloc() and free() methods

    Linus Torvalds
     

29 Mar, 2012

2 commits

  • …m/linux/kernel/git/dhowells/linux-asm_system

    Pull "Disintegrate and delete asm/system.h" from David Howells:
    "Here are a bunch of patches to disintegrate asm/system.h into a set of
    separate bits to relieve the problem of circular inclusion
    dependencies.

    I've built all the working defconfigs from all the arches that I can
    and made sure that they don't break.

    The reason for these patches is that I recently encountered a circular
    dependency problem that came about when I produced some patches to
    optimise get_order() by rewriting it to use ilog2().

    This uses bitops - and on the SH arch asm/bitops.h drags in
    asm-generic/get_order.h by a circuituous route involving asm/system.h.

    The main difficulty seems to be asm/system.h. It holds a number of
    low level bits with no/few dependencies that are commonly used (eg.
    memory barriers) and a number of bits with more dependencies that
    aren't used in many places (eg. switch_to()).

    These patches break asm/system.h up into the following core pieces:

    (1) asm/barrier.h

    Move memory barriers here. This already done for MIPS and Alpha.

    (2) asm/switch_to.h

    Move switch_to() and related stuff here.

    (3) asm/exec.h

    Move arch_align_stack() here. Other process execution related bits
    could perhaps go here from asm/processor.h.

    (4) asm/cmpxchg.h

    Move xchg() and cmpxchg() here as they're full word atomic ops and
    frequently used by atomic_xchg() and atomic_cmpxchg().

    (5) asm/bug.h

    Move die() and related bits.

    (6) asm/auxvec.h

    Move AT_VECTOR_SIZE_ARCH here.

    Other arch headers are created as needed on a per-arch basis."

    Fixed up some conflicts from other header file cleanups and moving code
    around that has happened in the meantime, so David's testing is somewhat
    weakened by that. We'll find out anything that got broken and fix it..

    * tag 'split-asm_system_h-for-linus-20120328' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-asm_system: (38 commits)
    Delete all instances of asm/system.h
    Remove all #inclusions of asm/system.h
    Add #includes needed to permit the removal of asm/system.h
    Move all declarations of free_initmem() to linux/mm.h
    Disintegrate asm/system.h for OpenRISC
    Split arch_align_stack() out from asm-generic/system.h
    Split the switch_to() wrapper out of asm-generic/system.h
    Move the asm-generic/system.h xchg() implementation to asm-generic/cmpxchg.h
    Create asm-generic/barrier.h
    Make asm-generic/cmpxchg.h #include asm-generic/cmpxchg-local.h
    Disintegrate asm/system.h for Xtensa
    Disintegrate asm/system.h for Unicore32 [based on ver #3, changed by gxt]
    Disintegrate asm/system.h for Tile
    Disintegrate asm/system.h for Sparc
    Disintegrate asm/system.h for SH
    Disintegrate asm/system.h for Score
    Disintegrate asm/system.h for S390
    Disintegrate asm/system.h for PowerPC
    Disintegrate asm/system.h for PA-RISC
    Disintegrate asm/system.h for MN10300
    ...

    Linus Torvalds
     
  • Disintegrate asm/system.h for IA64.

    Signed-off-by: David Howells
    Acked-by: Tony Luck
    cc: linux-ia64@vger.kernel.org

    David Howells
     

28 Mar, 2012

1 commit

  • Adapt core x86 and IA64 architecture code for dma_map_ops changes: replace
    alloc/free_coherent with generic alloc/free methods.

    Signed-off-by: Andrzej Pietrasiewicz
    Acked-by: Kyungmin Park
    [removed swiotlb related changes and replaced it with wrappers,
    merged with IA64 patch to avoid inter-patch dependences in intel-iommu code]
    Signed-off-by: Marek Szyprowski
    Reviewed-by: Arnd Bergmann
    Acked-by: Tony Luck

    Andrzej Pietrasiewicz
     

25 Mar, 2012

1 commit

  • Pull more xen updates from Konrad Rzeszutek Wilk:
    "One tiny feature that accidentally got lost in the initial git pull:
    * Add fast-EOI acking of interrupts (clear a bit instead of
    hypercall)
    And bug-fixes:
    * Fix CPU bring-up code missing a call to notify other subsystems.
    * Fix reading /sys/hypervisor even if PVonHVM drivers are not loaded.
    * In Xen ACPI processor driver: remove too verbose WARN messages, fix
    up the Kconfig dependency to be a module by default, and add
    dependency on CPU_FREQ.
    * Disable CPU frequency drivers from loading when booting under Xen
    (as we want the Xen ACPI processor to be used instead).
    * Cleanups in tmem code."

    * tag 'stable/for-linus-3.4-tag-two' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen/acpi: Fix Kconfig dependency on CPU_FREQ
    xen: initialize platform-pci even if xen_emul_unplug=never
    xen/smp: Fix bringup bug in AP code.
    xen/acpi: Remove the WARN's as they just create noise.
    xen/tmem: cleanup
    xen: support pirq_eoi_map
    xen/acpi-processor: Do not depend on CPU frequency scaling drivers.
    xen/cpufreq: Disable the cpu frequency scaling drivers from loading.
    provide disable_cpufreq() function to disable the API.

    Linus Torvalds
     

24 Mar, 2012

1 commit


23 Mar, 2012

1 commit

  • Pull xen updates from Konrad Rzeszutek Wilk:
    "which has three neat features:

    - PV multiconsole support, so that there can be hvc1, hvc2, etc; This
    can be used in HVM and in PV mode.

    - P-state and C-state power management driver that uploads said power
    management data to the hypervisor. It also inhibits cpufreq
    scaling drivers to load so that only the hypervisor can make power
    management decisions - fixing a weird perf bug.

    There is one thing in the Kconfig that you won't like: "default y
    if (X86_ACPI_CPUFREQ = y || X86_POWERNOW_K8 = y)" (note, that it
    all depends on CONFIG_XEN which depends on CONFIG_PARAVIRT which by
    default is off). I've a fix to convert that boolean expression
    into "default m" which I am going to post after the cpufreq git
    pull - as the two patches to make this work depend on a fix in Dave
    Jones's tree.

    - Function Level Reset (FLR) support in the Xen PCI backend.

    Fixes:

    - Kconfig dependencies for Xen PV keyboard and video
    - Compile warnings and constify fixes
    - Change over to use percpu_xxx instead of this_cpu_xxx"

    Fix up trivial conflicts in drivers/tty/hvc/hvc_xen.c due to changes to
    a removed commit.

    * tag 'stable/for-linus-3.4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen kconfig: relax INPUT_XEN_KBDDEV_FRONTEND deps
    xen/acpi-processor: C and P-state driver that uploads said data to hypervisor.
    xen: constify all instances of "struct attribute_group"
    xen/xenbus: ignore console/0
    hvc_xen: introduce HVC_XEN_FRONTEND
    hvc_xen: implement multiconsole support
    hvc_xen: support PV on HVM consoles
    xenbus: don't free other end details too early
    xen/enlighten: Expose MWAIT and MWAIT_LEAF if hypervisor OKs it.
    xen/setup/pm/acpi: Remove the call to boot_option_idle_override.
    xenbus: address compiler warnings
    xen: use this_cpu_xxx replace percpu_xxx funcs
    xen/pciback: Support pci_reset_function, aka FLR or D3 support.
    pci: Introduce __pci_reset_function_locked to be used when holding device_lock.
    xen: Utilize the restore_msi_irqs hook.

    Linus Torvalds
     

21 Mar, 2012

2 commits

  • Use 'bool' for boolean variables. Do proper section placement.
    Eliminate an unnecessary export.

    Signed-off-by: Jan Beulich
    Acked-by: Dan Magenheimer
    Signed-off-by: Konrad Rzeszutek Wilk

    Jan Beulich
     
  • The pirq_eoi_map is a bitmap offered by Xen to check which pirqs need to
    be EOI'd without having to issue an hypercall every time.
    We use PHYSDEVOP_pirq_eoi_gmfn_v2 to map the bitmap, then if we
    succeed we use pirq_eoi_map to check whether pirqs need eoi.

    Changes in v3:

    - explicitly use PHYSDEVOP_pirq_eoi_gmfn_v2 rather than
    PHYSDEVOP_pirq_eoi_gmfn;

    - introduce pirq_check_eoi_map, a function to check if a pirq needs an
    eoi using the map;

    -rename pirq_needs_eoi into pirq_needs_eoi_flag;

    - introduce a function pointer called pirq_needs_eoi that is going to be
    set to the right implementation depending on the availability of
    PHYSDEVOP_pirq_eoi_gmfn_v2.

    Signed-off-by: Stefano Stabellini
    Signed-off-by: Konrad Rzeszutek Wilk

    Stefano Stabellini
     

15 Mar, 2012

1 commit

  • This driver solves three problems:
    1). Parse and upload ACPI0007 (or PROCESSOR_TYPE) information to the
    hypervisor - aka P-states (cpufreq data).
    2). Upload the the Cx state information (cpuidle data).
    3). Inhibit CPU frequency scaling drivers from loading.

    The reason for wanting to solve 1) and 2) is such that the Xen hypervisor
    is the only one that knows the CPU usage of different guests and can
    make the proper decision of when to put CPUs and packages in proper states.
    Unfortunately the hypervisor has no support to parse ACPI DSDT tables, hence it
    needs help from the initial domain to provide this information. The reason
    for 3) is that we do not want the initial domain to change P-states while the
    hypervisor is doing it as well - it causes rather some funny cases of P-states
    transitions.

    For this to work, the driver parses the Power Management data and uploads said
    information to the Xen hypervisor. It also calls acpi_processor_notify_smm()
    to inhibit the other CPU frequency scaling drivers from being loaded.

    Everything revolves around the 'struct acpi_processor' structure which
    gets updated during the bootup cycle in different stages. At the startup, when
    the ACPI parser starts, the C-state information is processed (processor_idle)
    and saved in said structure as 'power' element. Later on, the CPU frequency
    scaling driver (powernow-k8 or acpi_cpufreq), would call the the
    acpi_processor_* (processor_perflib functions) to parse P-states information
    and populate in the said structure the 'performance' element.

    Since we do not want the CPU frequency scaling drivers from loading
    we have to call the acpi_processor_* functions to parse the P-states and
    call "acpi_processor_notify_smm" to stop them from loading.

    There is also one oddity in this driver which is that under Xen, the
    physical online CPU count can be different from the virtual online CPU count.
    Meaning that the macros 'for_[online|possible]_cpu' would process only
    up to virtual online CPU count. We on the other hand want to process
    the full amount of physical CPUs. For that, the driver checks if the ACPI IDs
    count is different from the APIC ID count - which can happen if the user
    choose to use dom0_max_vcpu argument. In such a case a backup of the PM
    structure is used and uploaded to the hypervisor.

    [v1-v2: Initial RFC implementations that were posted]
    [v3: Changed the name to passthru suggested by Pasi Kärkkäinen ]
    [v4: Added vCPU != pCPU support - aka dom0_max_vcpus support]
    [v5: Cleaned up the driver, fix bug under Athlon XP]
    [v6: Changed the driver to a CPU frequency governor]
    [v7: Jan Beulich suggestion to make it a cpufreq scaling driver
    made me rework it as driver that inhibits cpufreq scaling driver]
    [v8: Per Jan's review comments, fixed up the driver]
    [v9: Allow to continue even if acpi_processor_preregister_perf.. fails]
    Signed-off-by: Konrad Rzeszutek Wilk

    Konrad Rzeszutek Wilk
     

14 Mar, 2012

1 commit


11 Mar, 2012

1 commit

  • For the hypervisor to take advantage of the MWAIT support it needs
    to extract from the ACPI _CST the register address. But the
    hypervisor does not have the support to parse DSDT so it relies on
    the initial domain (dom0) to parse the ACPI Power Management information
    and push it up to the hypervisor. The pushing of the data is done
    by the processor_harveset_xen module which parses the information that
    the ACPI parser has graciously exposed in 'struct acpi_processor'.

    For the ACPI parser to also expose the Cx states for MWAIT, we need
    to expose the MWAIT capability (leaf 1). Furthermore we also need to
    expose the MWAIT_LEAF capability (leaf 5) for cstate.c to properly
    function.

    The hypervisor could expose these flags when it traps the XEN_EMULATE_PREFIX
    operations, but it can't do it since it needs to be backwards compatible.
    Instead we choose to use the native CPUID to figure out if the MWAIT
    capability exists and use the XEN_SET_PDC query hypercall to figure out
    if the hypervisor wants us to expose the MWAIT_LEAF capability or not.

    Note: The XEN_SET_PDC query was implemented in c/s 23783:
    "ACPI: add _PDC input override mechanism".

    With this in place, instead of
    C3 ACPI IOPORT 415
    we get now
    C3:ACPI FFH INTEL MWAIT 0x20

    Note: The cpu_idle which would be calling the mwait variants for idling
    never gets set b/c we set the default pm_idle to be the hypercall variant.

    Acked-by: Jan Beulich
    [v2: Fix missing header file include and #ifdef]
    Signed-off-by: Konrad Rzeszutek Wilk

    Konrad Rzeszutek Wilk
     

16 Jan, 2012

1 commit

  • * 'for-3.3/drivers' of git://git.kernel.dk/linux-block:
    mtip32xx: do rebuild monitoring asynchronously
    xen-blkfront: Use kcalloc instead of kzalloc to allocate array
    mtip32xx: uninitialized variable in mtip_quiesce_io()
    mtip32xx: updates based on feedback
    xen-blkback: convert hole punching to discard request on loop devices
    xen/blkback: Move processing of BLKIF_OP_DISCARD from dispatch_rw_block_io
    xen/blk[front|back]: Enhance discard support with secure erasing support.
    xen/blk[front|back]: Squash blkif_request_rw and blkif_request_discard together
    mtip32xx: update to new ->make_request() API
    mtip32xx: add module.h include to avoid conflict with moduleh tree
    mtip32xx: mark a few more items static
    mtip32xx: ensure that all local functions are static
    mtip32xx: cleanup compat ioctl handling
    mtip32xx: fix warnings/errors on 32-bit compiles
    block: Add driver for Micron RealSSD pcie flash cards

    Linus Torvalds
     

13 Jan, 2012

1 commit


11 Jan, 2012

1 commit

  • * 'stable/for-linus-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen: (37 commits)
    xen/pciback: Expand the warning message to include domain id.
    xen/pciback: Fix "device has been assigned to X domain!" warning
    xen/pciback: Move the PCI_DEV_FLAGS_ASSIGNED ops to the "[un|]bind"
    xen/xenbus: don't reimplement kvasprintf via a fixed size buffer
    xenbus: maximum buffer size is XENSTORE_PAYLOAD_MAX
    xen/xenbus: Reject replies with payload > XENSTORE_PAYLOAD_MAX.
    Xen: consolidate and simplify struct xenbus_driver instantiation
    xen-gntalloc: introduce missing kfree
    xen/xenbus: Fix compile error - missing header for xen_initial_domain()
    xen/netback: Enable netback on HVM guests
    xen/grant-table: Support mappings required by blkback
    xenbus: Use grant-table wrapper functions
    xenbus: Support HVM backends
    xen/xenbus-frontend: Fix compile error with randconfig
    xen/xenbus-frontend: Make error message more clear
    xen/privcmd: Remove unused support for arch specific privcmp mmap
    xen: Add xenbus_backend device
    xen: Add xenbus device driver
    xen: Add privcmd device driver
    xen/gntalloc: fix reference counts on multi-page mappings
    ...

    Linus Torvalds
     

07 Jan, 2012

1 commit

  • This resolves the conflict in the arch/arm/mach-s3c64xx/s3c6400.c file,
    and it fixes the build error in the arch/x86/kernel/microcode_core.c
    file, that the merge did not catch.

    The microcode_core.c patch was provided by Stephen Rothwell
    who was invaluable in the merge issues involved
    with the large sysdev removal process in the driver-core tree.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

05 Jan, 2012

2 commits

  • Haogang Chen found out that:

    There is a potential integer overflow in process_msg() that could result
    in cross-domain attack.

    body = kmalloc(msg->hdr.len + 1, GFP_NOIO | __GFP_HIGH);

    When a malicious guest passes 0xffffffff in msg->hdr.len, the subsequent
    call to xb_read() would write to a zero-length buffer.

    The other end of this connection is always the xenstore backend daemon
    so there is no guest (malicious or otherwise) which can do this. The
    xenstore daemon is a trusted component in the system.

    However this seem like a reasonable robustness improvement so we should
    have it.

    And Ian when read the API docs found that:
    The payload length (len field of the header) is limited to 4096
    (XENSTORE_PAYLOAD_MAX) in both directions. If a client exceeds the
    limit, its xenstored connection will be immediately killed by
    xenstored, which is usually catastrophic from the client's point of
    view. Clients (particularly domains, which cannot just reconnect)
    should avoid this.

    so this patch checks against that instead.

    This also avoids a potential integer overflow pointed out by Haogang Chen.

    Signed-off-by: Ian Campbell
    Cc: Haogang Chen
    CC: stable@kernel.org
    Signed-off-by: Konrad Rzeszutek Wilk

    Ian Campbell
     
  • The 'name', 'owner', and 'mod_name' members are redundant with the
    identically named fields in the 'driver' sub-structure. Rather than
    switching each instance to specify these fields explicitly, introduce
    a macro to simplify this.

    Eliminate further redundancy by allowing the drvname argument to
    DEFINE_XENBUS_DRIVER() to be blank (in which case the first entry from
    the ID table will be used for .driver.name).

    Also eliminate the questionable xenbus_register_{back,front}end()
    wrappers - their sole remaining purpose was the checking of the
    'owner' field, proper setting of which shouldn't be an issue anymore
    when the macro gets used.

    v2: Restore DRV_NAME for the driver name in xen-pciback.

    Signed-off-by: Jan Beulich
    Cc: Jens Axboe
    Cc: Dmitry Torokhov
    Cc: Florian Tobias Schandinat
    Cc: Ian Campbell
    Cc: David S. Miller
    Signed-off-by: Konrad Rzeszutek Wilk

    Jan Beulich
     

25 Dec, 2011

1 commit


21 Dec, 2011

2 commits

  • Add support for mappings without GNTMAP_contains_pte. This was not
    supported because the unmap operation assumed that this flag was being
    used; adding a parameter to the unmap operation to allow the PTE
    clearing to be disabled is sufficient to make unmap capable of
    supporting either mapping type.

    Signed-off-by: Daniel De Graaf
    [v1: Fix cleanpatch warnings]
    Signed-off-by: Konrad Rzeszutek Wilk

    Daniel De Graaf
     
  • * commit 'v3.2-rc3': (412 commits)
    Linux 3.2-rc3
    virtio-pci: make reset operation safer
    virtio-mmio: Correct the name of the guest features selector
    virtio: add HAS_IOMEM dependency to MMIO platform bus driver
    eCryptfs: Extend array bounds for all filename chars
    eCryptfs: Flush file in vma close
    eCryptfs: Prevent file create race condition
    regulator: TPS65910: Fix VDD1/2 voltage selector count
    i2c: Make i2cdev_notifier_call static
    i2c: Delete ANY_I2C_BUS
    i2c: Fix device name for 10-bit slave address
    i2c-algo-bit: Generate correct i2c address sequence for 10-bit target
    drm: integer overflow in drm_mode_dirtyfb_ioctl()
    Revert "of/irq: of_irq_find_parent: check for parent equal to child"
    drivers/gpu/vga/vgaarb.c: add missing kfree
    drm/radeon/kms/atom: unify i2c gpio table handling
    drm/radeon/kms: fix up gpio i2c mask bits for r4xx for real
    ttm: Don't return the bo reserved on error path
    mount_subtree() pointless use-after-free
    iio: fix a leak due to improper use of anon_inode_getfd()
    ...

    Konrad Rzeszutek Wilk
     

19 Dec, 2011

1 commit


17 Dec, 2011

3 commits

  • Access for xenstored to the event channel and pre-allocated ring is
    managed via xenfs. This adds its own character device featuring mmap
    for the ring and an ioctl for the event channel.

    Signed-off-by: Bastian Blank
    Acked-by: Ian Campbell
    Signed-off-by: Konrad Rzeszutek Wilk

    Bastian Blank
     
  • These allow a domain A which has been granted access on a page of domain B's
    memory to issue domain C with a copy-grant on the same page. This is useful
    e.g. for forwarding packets between domains.

    Signed-off-by: Annie Li
    Signed-off-by: Konrad Rzeszutek Wilk

    Annie Li
     
  • - They can't be used to map the page (so can only be used in a GNTTABOP_copy
    hypercall).
    - It's possible to grant access with a finer granularity than whole pages.
    - Xen guarantees that they can be revoked quickly (a normal map grant can
    only be revoked with the cooperation of the domain which has been granted
    access).

    Signed-off-by: Annie Li
    Signed-off-by: Konrad Rzeszutek Wilk

    Annie Li
     

15 Dec, 2011

1 commit


22 Nov, 2011

4 commits

  • Acked-by: Ian Campbell
    Signed-off-by: Annie Li
    Signed-off-by: Konrad Rzeszutek Wilk

    Annie Li
     
  • Receiver-side copying of packets is based on this implementation, it gives
    better performance and better CPU accounting. It totally supports three types:
    full-page, sub-page and transitive grants.

    However this patch does not cover sub-page and transitive grants, it mainly
    focus on Full-page part and implements grant table V2 interfaces corresponding
    to what already exists in grant table V1, such as: grant table V2
    initialization, mapping, releasing and exported interfaces.

    Each guest can only supports one type of grant table type, every entry in grant
    table should be the same version. It is necessary to set V1 or V2 version before
    initializing the grant table.

    Grant table exported interfaces of V2 are same with those of V1, Xen is
    responsible to judge what grant table version guests are using in every grant
    operation.

    V2 fulfills the same role of V1, and it is totally backwards compitable with V1.
    If dom0 support grant table V2, the guests runing on it can run with either V1
    or V2.

    Acked-by: Ian Campbell
    Signed-off-by: Annie Li
    [v1: Modified alloc_vm_area call (new parameters), indentation, and cleanpatch
    warnings]
    Signed-off-by: Konrad Rzeszutek Wilk

    Annie Li
     
  • This patch introduces new structures of grant table V2, grant table V2 is an
    extension from V1. Grant table is shared between guest and Xen, and Xen is
    responsible to do corresponding work for grant operations, such as: figure
    out guest's grant table version, perform different actions based on
    different grant table version, etc. Although full-page structure of V2
    is different from V1, it play the same role as V1.

    Acked-by: Ian Campbell
    Signed-off-by: Annie Li
    Signed-off-by: Konrad Rzeszutek Wilk

    Annie Li
     
  • Event channels exposed to userspace by the evtchn module may be used by
    other modules in an asynchronous manner, which requires that reference
    counting be used to prevent the event channel from being closed before
    the signals are delivered.

    The reference count on new event channels defaults to -1 which indicates
    the event channel is not referenced outside the kernel; evtchn_get fails
    if called on such an event channel. The event channels made visible to
    userspace by evtchn have a normal reference count.

    Signed-off-by: Daniel De Graaf
    Signed-off-by: Konrad Rzeszutek Wilk

    Daniel De Graaf
     

19 Nov, 2011

2 commits


17 Nov, 2011

1 commit