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
     

05 Jan, 2012

1 commit

  • 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
     

19 Dec, 2011

1 commit


22 Nov, 2011

1 commit

  • 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
     

07 Nov, 2011

1 commit


05 Nov, 2011

1 commit

  • * 'for-3.2/drivers' of git://git.kernel.dk/linux-block: (30 commits)
    virtio-blk: use ida to allocate disk index
    hpsa: add small delay when using PCI Power Management to reset for kump
    cciss: add small delay when using PCI Power Management to reset for kump
    xen/blkback: Fix two races in the handling of barrier requests.
    xen/blkback: Check for proper operation.
    xen/blkback: Fix the inhibition to map pages when discarding sector ranges.
    xen/blkback: Report VBD_WSECT (wr_sect) properly.
    xen/blkback: Support 'feature-barrier' aka old-style BARRIER requests.
    xen-blkfront: plug device number leak in xlblk_init() error path
    xen-blkfront: If no barrier or flush is supported, use invalid operation.
    xen-blkback: use kzalloc() in favor of kmalloc()+memset()
    xen-blkback: fixed indentation and comments
    xen-blkfront: fix a deadlock while handling discard response
    xen-blkfront: Handle discard requests.
    xen-blkback: Implement discard requests ('feature-discard')
    xen-blkfront: add BLKIF_OP_DISCARD and discard request struct
    drivers/block/loop.c: remove unnecessary bdev argument from loop_clr_fd()
    drivers/block/loop.c: emit uevent on auto release
    drivers/block/cpqarray.c: use pci_dev->revision
    loop: always allow userspace partitions and optionally support automatic scanning
    ...

    Fic up trivial header file includsion conflict in drivers/block/loop.c

    Linus Torvalds
     

25 Oct, 2011

1 commit

  • …ci.fixes-3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen

    * 'stable/drivers-3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xenbus: don't rely on xen_initial_domain to detect local xenstore
    xenbus: Fix loopback event channel assuming domain 0
    xen/pv-on-hvm:kexec: Fix implicit declaration of function 'xen_hvm_domain'
    xen/pv-on-hvm kexec: add xs_reset_watches to shutdown watches from old kernel
    xen/pv-on-hvm kexec: update xs_wire.h:xsd_sockmsg_type from xen-unstable
    xen/pv-on-hvm kexec+kdump: reset PV devices in kexec or crash kernel
    xen/pv-on-hvm kexec: rebind virqs to existing eventchannel ports
    xen/pv-on-hvm kexec: prevent crash in xenwatch_thread() when stale watch events arrive

    * 'stable/drivers.bugfixes-3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen/pciback: Check if the device is found instead of blindly assuming so.
    xen/pciback: Do not dereference psdev during printk when it is NULL.
    xen: remove XEN_PLATFORM_PCI config option
    xen: XEN_PVHVM depends on PCI
    xen/pciback: double lock typo
    xen/pciback: use mutex rather than spinlock in vpci backend
    xen/pciback: Use mutexes when working with Xenbus state transitions.
    xen/pciback: miscellaneous adjustments
    xen/pciback: use mutex rather than spinlock in passthrough backend
    xen/pciback: use resource_size()

    * 'stable/pci.fixes-3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen/pci: support multi-segment systems
    xen-swiotlb: When doing coherent alloc/dealloc check before swizzling the MFNs.
    xen/pci: make bus notifier handler return sane values
    xen-swiotlb: fix printk and panic args
    xen-swiotlb: Fix wrong panic.
    xen-swiotlb: Retry up three times to allocate Xen-SWIOTLB
    xen-pcifront: Update warning comment to use 'e820_host' option.

    Linus Torvalds
     

13 Oct, 2011

1 commit


27 Sep, 2011

1 commit

  • This patches implements the xen_platform_op hypercall, to pass the parsed
    ACPI info to hypervisor.

    Signed-off-by: Yu Ke
    Signed-off-by: Tian Kevin
    Signed-off-by: Jeremy Fitzhardinge
    [v1: Added DEFINE_GUEST.. in appropiate headers]
    [v2: Ripped out typedefs]
    Signed-off-by: Konrad Rzeszutek Wilk

    Yu Ke
     

23 Sep, 2011

3 commits

  • Add new 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.

    [v5: use xs_single instead of passing a dummy string to xs_talkv]
    [v4: ignore -EEXIST in xs_reset_watches]
    [v3: use XS_RESET_WATCHES instead of XS_INTRODUCE]
    [v2: move all code which deals with XS_INTRODUCE into xs_introduce()
    (based on feedback from Ian Campbell); remove casts from kvec assignment]
    Signed-off-by: Olaf Hering
    [v1: Redid the git description a bit]
    Signed-off-by: Konrad Rzeszutek Wilk

    Olaf Hering
     
  • Update include/xen/interface/io/xs_wire.h from xen-unstable.
    Now entries in xsd_sockmsg_type were added.

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

    Olaf Hering
     
  • Now that the hypercall interface changes are in -unstable, make the
    kernel side code not ignore the segment (aka domain) number anymore
    (which results in pretty odd behavior on such systems). Rather, if
    only the old interfaces are available, don't call them for devices on
    non-zero segments at all.

    Signed-off-by: Jan Beulich
    [v1: Edited git description]
    Signed-off-by: Konrad Rzeszutek Wilk

    Jan Beulich
     

21 Jun, 2011

1 commit


06 Jun, 2011

1 commit

  • Get the information about the VGA console hardware from Xen, and put
    it into the form the bootloader normally generates, so that the rest
    of the kernel can deal with VGA as usual.

    [ Impact: make VGA console work in dom0 ]

    Signed-off-by: Jeremy Fitzhardinge
    [v1: Rebased on 2.6.39]
    [v2: Removed incorrect comments and fixed compile warnings]
    Signed-off-by: Konrad Rzeszutek Wilk

    Jeremy Fitzhardinge
     

27 May, 2011

2 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/djm/tmem:
    xen: cleancache shim to Xen Transcendent Memory
    ocfs2: add cleancache support
    ext4: add cleancache support
    btrfs: add cleancache support
    ext3: add cleancache support
    mm/fs: add hooks to support cleancache
    mm: cleancache core ops functions and config
    fs: add field to superblock to support cleancache
    mm/fs: cleancache documentation

    Fix up trivial conflict in fs/btrfs/extent_io.c due to includes

    Linus Torvalds
     
  • This patch provides a shim between the kernel-internal cleancache
    API (see Documentation/mm/cleancache.txt) and the Xen Transcendent
    Memory ABI (see http://oss.oracle.com/projects/tmem).

    Xen tmem provides "hypervisor RAM" as an ephemeral page-oriented
    pseudo-RAM store for cleancache pages, shared cleancache pages,
    and frontswap pages. Tmem provides enterprise-quality concurrency,
    full save/restore and live migration support, compression
    and deduplication.

    A presentation showing up to 8% faster performance and up to 52%
    reduction in sectors read on a kernel compile workload, despite
    aggressive in-kernel page reclamation ("self-ballooning") can be
    found at:

    http://oss.oracle.com/projects/tmem/dist/documentation/presentations/TranscendentMemoryXenSummit2010.pdf

    Signed-off-by: Dan Magenheimer
    Reviewed-by: Jeremy Fitzhardinge
    Cc: Konrad Rzeszutek Wilk
    Cc: Matthew Wilcox
    Cc: Nick Piggin
    Cc: Mel Gorman
    Cc: Rik Van Riel
    Cc: Jan Beulich
    Cc: Chris Mason
    Cc: Andreas Dilger
    Cc: Ted Ts'o
    Cc: Mark Fasheh
    Cc: Joel Becker
    Cc: Nitin Gupta

    Dan Magenheimer
     

12 May, 2011

1 commit


31 Mar, 2011

1 commit


18 Mar, 2011

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
    watchdog: booke_wdt: clean up status messages
    watchdog: cleanup spaces before tabs
    watchdog: convert to DEFINE_PCI_DEVICE_TABLE
    watchdog: Xen watchdog driver
    watchdog: Intel SCU Watchdog Timer Driver for Moorestown and Medfield platforms.
    watchdog: jz4740_wdt - fix magic character checking
    watchdog: add JZ4740 watchdog driver
    watchdog: it87_wdt: Add support for IT8721F watchdog
    watchdog: hpwdt: build hpwdt as module by default with NMI_DECODING enabled
    watchdog: hpwdt: Fix a couple of typos

    Linus Torvalds
     

17 Mar, 2011

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1480 commits)
    bonding: enable netpoll without checking link status
    xfrm: Refcount destination entry on xfrm_lookup
    net: introduce rx_handler results and logic around that
    bonding: get rid of IFF_SLAVE_INACTIVE netdev->priv_flag
    bonding: wrap slave state work
    net: get rid of multiple bond-related netdevice->priv_flags
    bonding: register slave pointer for rx_handler
    be2net: Bump up the version number
    be2net: Copyright notice change. Update to Emulex instead of ServerEngines
    e1000e: fix kconfig for crc32 dependency
    netfilter ebtables: fix xt_AUDIT to work with ebtables
    xen network backend driver
    bonding: Improve syslog message at device creation time
    bonding: Call netif_carrier_off after register_netdevice
    bonding: Incorrect TX queue offset
    net_sched: fix ip_tos2prio
    xfrm: fix __xfrm_route_forward()
    be2net: Fix UDP packet detected status in RX compl
    Phonet: fix aligned-mode pipe socket buffer header reserve
    netxen: support for GbE port settings
    ...

    Fix up conflicts in drivers/staging/brcm80211/brcmsmac/wl_mac80211.c
    with the staging updates.

    Linus Torvalds
     

16 Mar, 2011

3 commits

  • netback is the host side counterpart to the frontend driver in
    drivers/net/xen-netfront.c. The PV protocol is also implemented by
    frontend drivers in other OSes too, such as the BSDs and even Windows.

    The patch is based on the driver from the xen.git pvops kernel tree but
    has been put through the checkpatch.pl wringer plus several manual
    cleanup passes and review iterations. The driver has been moved from
    drivers/xen/netback to drivers/net/xen-netback.

    One major change from xen.git is that the guest transmit path (i.e. what
    looks like receive to netback) has been significantly reworked to remove
    the dependency on the out of tree PageForeign page flag (a core kernel
    patch which enables a per page destructor callback on the final
    put_page). This page flag was used in order to implement a grant map
    based transmit path (where guest pages are mapped directly into SKB
    frags). Instead this version of netback uses grant copy operations into
    regular memory belonging to the backend domain. Reinstating the grant
    map functionality is something which I would like to revisit in the
    future.

    Note that this driver depends on 2e820f58f7ad "xen/irq: implement
    bind_interdomain_evtchn_to_irqhandler for backend drivers" which is in
    linux next via the "xen-two" tree and is intended for the 2.6.39 merge
    window:
    git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen.git stable/backends
    this branch has only that single commit since 2.6.38-rc2 and is safe for
    cross merging into the net branch.

    Signed-off-by: Ian Campbell
    Reviewed-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Ian Campbell
     
  • * 'for-linus' of git://xenbits.xen.org/people/sstabellini/linux-pvhvm:
    xen: suspend: remove xen_hvm_suspend
    xen: suspend: pull pre/post suspend hooks out into suspend_info
    xen: suspend: move arch specific pre/post suspend hooks into generic hooks
    xen: suspend: refactor non-arch specific pre/post suspend hooks
    xen: suspend: add "arch" to pre/post suspend hooks
    xen: suspend: pass extra hypercall argument via suspend_info struct
    xen: suspend: refactor cancellation flag into a structure
    xen: suspend: use HYPERVISOR_suspend for PVHVM case instead of open coding
    xen: switch to new schedop hypercall by default.
    xen: use new schedop interface for suspend
    xen: do not respond to unknown xenstore control requests
    xen: fix compile issue if XEN is enabled but XEN_PVHVM is disabled
    xen: PV on HVM: support PV spinlocks and IPIs
    xen: make the ballon driver work for hvm domains
    xen-blkfront: handle Xen major numbers other than XENVBD
    xen: do not use xen_info on HVM, set pv_info name to "Xen HVM"
    xen: no need to delay xen_setup_shutdown_event for hvm guests anymore

    Linus Torvalds
     
  • While the hypervisor change adding SCHEDOP_watchdog support included a
    daemon to make use of the new functionality, having a kernel driver
    for /dev/watchdog so that user space code doesn't need to distinguish
    non-Xen and Xen seems to be preferable.

    Signed-off-by: Jan Beulich
    Cc: Jeremy Fitzhardinge
    Signed-off-by: Wim Van Sebroeck

    Jan Beulich
     

09 Mar, 2011

1 commit


26 Feb, 2011

2 commits


16 Dec, 2010

1 commit


02 Dec, 2010

1 commit

  • Use the new hypercall PHYSDEVOP_get_free_pirq to ask Xen to allocate a
    pirq. Remove the unsupported PHYSDEVOP_get_nr_pirqs hypercall to get the
    amount of pirq available.

    This fixes find_unbound_pirq that otherwise would return a number
    starting from nr_irqs that might very well be out of range in Xen.

    The symptom of this bug is that when you passthrough an MSI capable pci
    device to a PV on HVM guest, Linux would fail to enable MSIs on the
    device.

    Signed-off-by: Stefano Stabellini

    Stefano Stabellini
     

13 Nov, 2010

1 commit

  • This hypercall allows Xen to specify a non-default location for the
    machine to physical mapping. This capability is used when running a 32
    bit domain 0 on a 64 bit hypervisor to shrink the hypervisor hole to
    exactly the size required.

    [ Impact: add Xen hypercall definitions ]

    Signed-off-by: Ian Campbell
    Signed-off-by: Jeremy Fitzhardinge
    Signed-off-by: Stefano Stabellini

    Ian Campbell
     

29 Oct, 2010

1 commit

  • and branch 'for-linus' of git://xenbits.xen.org/people/sstabellini/linux-pvhvm

    * 'for-linus' of git://xenbits.xen.org/people/sstabellini/linux-pvhvm:
    xen: register xen pci notifier
    xen: initialize cpu masks for pv guests in xen_smp_init
    xen: add a missing #include to arch/x86/pci/xen.c
    xen: mask the MTRR feature from the cpuid
    xen: make hvc_xen console work for dom0.
    xen: add the direct mapping area for ISA bus access
    xen: Initialize xenbus for dom0.
    xen: use vcpu_ops to setup cpu masks
    xen: map a dummy page for local apic and ioapic in xen_set_fixmap
    xen: remap MSIs into pirqs when running as initial domain
    xen: remap GSIs as pirqs when running as initial domain
    xen: introduce XEN_DOM0 as a silent option
    xen: map MSIs into pirqs
    xen: support GSI -> pirq remapping in PV on HVM guests
    xen: add xen hvm acpi_register_gsi variant
    acpi: use indirect call to register gsi in different modes
    xen: implement xen_hvm_register_pirq
    xen: get the maximum number of pirqs from xen
    xen: support pirq != irq

    * 'stable/xen-pcifront-0.8.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen: (27 commits)
    X86/PCI: Remove the dependency on isapnp_disable.
    xen: Update Makefile with CONFIG_BLOCK dependency for biomerge.c
    MAINTAINERS: Add myself to the Xen Hypervisor Interface and remove Chris Wright.
    x86: xen: Sanitse irq handling (part two)
    swiotlb-xen: On x86-32 builts, select SWIOTLB instead of depending on it.
    MAINTAINERS: Add myself for Xen PCI and Xen SWIOTLB maintainer.
    xen/pci: Request ACS when Xen-SWIOTLB is activated.
    xen-pcifront: Xen PCI frontend driver.
    xenbus: prevent warnings on unhandled enumeration values
    xenbus: Xen paravirtualised PCI hotplug support.
    xen/x86/PCI: Add support for the Xen PCI subsystem
    x86: Introduce x86_msi_ops
    msi: Introduce default_[teardown|setup]_msi_irqs with fallback.
    x86/PCI: Export pci_walk_bus function.
    x86/PCI: make sure _PAGE_IOMAP it set on pci mappings
    x86/PCI: Clean up pci_cache_line_size
    xen: fix shared irq device passthrough
    xen: Provide a variant of xen_poll_irq with timeout.
    xen: Find an unbound irq number in reverse order (high to low).
    xen: statically initialize cpu_evtchn_mask_p
    ...

    Fix up trivial conflicts in drivers/pci/Makefile

    Linus Torvalds
     

28 Oct, 2010

1 commit

  • Register a pci notifier to add (or remove) pci devices to Xen via
    hypercalls. Xen needs to know the pci devices present in the system to
    handle pci passthrough and even MSI remapping in the initial domain.

    Signed-off-by: Weidong Han
    Signed-off-by: Qing He
    Signed-off-by: Jeremy Fitzhardinge
    Signed-off-by: Stefano Stabellini

    Weidong Han
     

23 Oct, 2010

5 commits


18 Oct, 2010

2 commits

  • This is a port of the 2.6.18 Xen PCI front driver with fixes
    to make it build under 2.6.34 and later (for the full list of
    changes: git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen.git
    historic/xen-pcifront-0.1). It also includes the fixes
    to make it work properly.

    [v2: Updated Kconfig, removed crud, added Reviewed-by]
    [v3: Added 'static', fixed grant table leak, redid Kconfig]
    [v4: Added one more 'static' and removed comments]

    Signed-off-by: Konrad Rzeszutek Wilk
    Reviewed-by: Stefano Stabellini
    Reviewed-by: Jan Beulich

    Ryan Wilson
     
  • The Xen PCI front driver adds two new states that are utilizez
    for PCI hotplug support. This is a patch pulled from the
    linux-2.6-xen-sparse tree.

    Signed-off-by: Noboru Iwamatsu
    Signed-off-by: Konrad Rzeszutek Wilk
    Signed-off-by: Jeremy Fitzhardinge
    Signed-off-by: Yosuke Iwamatsu

    Yosuke Iwamatsu
     

13 Aug, 2010

1 commit

  • * 'stable/xen-swiotlb-0.8.6' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    x86: Detect whether we should use Xen SWIOTLB.
    pci-swiotlb-xen: Add glue code to setup dma_ops utilizing xen_swiotlb_* functions.
    swiotlb-xen: SWIOTLB library for Xen PV guest with PCI passthrough.
    xen/mmu: inhibit vmap aliases rather than trying to clear them out
    vmap: add flag to allow lazy unmap to be disabled at runtime
    xen: Add xen_create_contiguous_region
    xen: Rename the balloon lock
    xen: Allow unprivileged Xen domains to create iomap pages
    xen: use _PAGE_IOMAP in ioremap to do machine mappings

    Fix up trivial conflicts (adding both xen swiotlb and xen pci platform
    driver setup close to each other) in drivers/xen/{Kconfig,Makefile} and
    include/xen/xen-ops.h

    Linus Torvalds
     

27 Jul, 2010

1 commit