04 Dec, 2014

2 commits


06 Oct, 2014

1 commit


03 Oct, 2014

1 commit

  • To be able to use an initially unmapped initrd with xen the following
    header files must be synced to a newer version from the xen tree:

    include/xen/interface/elfnote.h
    include/xen/interface/xen.h

    As the KEXEC and DUMPCORE related ELFNOTES are not relevant for the
    kernel they are omitted from elfnote.h.

    Signed-off-by: Juergen Gross
    Signed-off-by: David Vrabel

    Juergen Gross
     

23 Sep, 2014

2 commits

  • Add the definition of pvSCSI protocol used between the pvSCSI frontend
    in a XEN domU and the pvSCSI backend in a XEN driver domain (usually
    Dom0).

    This header was originally provided by Fujitsu for Xen based on Linux
    2.6.18. Changes are:
    - Added comments.
    - Adapt to Linux style guide.
    - Add support for larger SG-lists by putting them in an own granted
    page.
    - Remove stale definitions.

    Signed-off-by: Juergen Gross
    Signed-off-by: David Vrabel

    Juergen Gross
     
  • Export bind_interdomain_evtchn_to_irq() so drivers can use threaded
    interrupt handlers with:

    irq = bind_interdomain_evtchn_to_irq(remote_dom, remote_port);
    if (irq < 0)
    /* error */
    ret = request_threaded_irq(...);

    Signed-off-by: Juergen Gross
    Acked-by: Konrad Rzeszutek Wilk
    Signed-off-by: David Vrabel

    Juergen Gross
     

12 Sep, 2014

1 commit

  • The flag tells us that the hypervisor maps a grant page to guest
    physical address == machine address of the page in addition to the
    normal grant mapping address. It is needed to properly issue cache
    maintenance operation at the completion of a DMA operation involving a
    foreign grant.

    Signed-off-by: Stefano Stabellini
    Tested-by: Denis Schneider

    Stefano Stabellini
     

08 Aug, 2014

1 commit

  • Pull Xen updates from David Vrabel:
    - remove unused V2 grant table support
    - note that Konrad is xen-blkkback/front maintainer
    - add 'xen_nopv' option to disable PV extentions for x86 HVM guests
    - misc minor cleanups

    * tag 'stable/for-linus-3.17-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
    xen-pciback: Document the 'quirks' sysfs file
    xen/pciback: Fix error return code in xen_pcibk_attach()
    xen/events: drop negativity check of unsigned parameter
    xen/setup: Remove Identity Map Debug Message
    xen/events/fifo: remove a unecessary use of BM()
    xen/events/fifo: ensure all bitops are properly aligned even on x86
    xen/events/fifo: reset control block and local HEADs on resume
    xen/arm: use BUG_ON
    xen/grant-table: remove support for V2 tables
    x86/xen: safely map and unmap grant frames when in atomic context
    MAINTAINERS: Make me the Xen block subsystem (front and back) maintainer
    xen: Introduce 'xen_nopv' to disable PV extensions for HVM guests.

    Linus Torvalds
     

05 Aug, 2014

1 commit

  • Pull EFI changes from Ingo Molnar:
    "Main changes in this cycle are:

    - arm64 efi stub fixes, preservation of FP/SIMD registers across
    firmware calls, and conversion of the EFI stub code into a static
    library - Ard Biesheuvel

    - Xen EFI support - Daniel Kiper

    - Support for autoloading the efivars driver - Lee, Chun-Yi

    - Use the PE/COFF headers in the x86 EFI boot stub to request that
    the stub be loaded with CONFIG_PHYSICAL_ALIGN alignment - Michael
    Brown

    - Consolidate all the x86 EFI quirks into one file - Saurabh Tangri

    - Additional error logging in x86 EFI boot stub - Ulf Winkelvos

    - Support loading initrd above 4G in EFI boot stub - Yinghai Lu

    - EFI reboot patches for ACPI hardware reduced platforms"

    * 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (31 commits)
    efi/arm64: Handle missing virtual mapping for UEFI System Table
    arch/x86/xen: Silence compiler warnings
    xen: Silence compiler warnings
    x86/efi: Request desired alignment via the PE/COFF headers
    x86/efi: Add better error logging to EFI boot stub
    efi: Autoload efivars
    efi: Update stale locking comment for struct efivars
    arch/x86: Remove efi_set_rtc_mmss()
    arch/x86: Replace plain strings with constants
    xen: Put EFI machinery in place
    xen: Define EFI related stuff
    arch/x86: Remove redundant set_bit(EFI_MEMMAP) call
    arch/x86: Remove redundant set_bit(EFI_SYSTEM_TABLES) call
    efi: Introduce EFI_PARAVIRT flag
    arch/x86: Do not access EFI memory map if it is not available
    efi: Use early_mem*() instead of early_io*()
    arch/ia64: Define early_memunmap()
    x86/reboot: Add EFI reboot quirk for ACPI Hardware Reduced flag
    efi/reboot: Allow powering off machines using EFI
    efi/reboot: Add generic wrapper around EfiResetSystem()
    ...

    Linus Torvalds
     

31 Jul, 2014

1 commit


30 Jul, 2014

1 commit

  • arch_gnttab_map_frames() and arch_gnttab_unmap_frames() are called in
    atomic context but were calling alloc_vm_area() which might sleep.

    Also, if a driver attempts to allocate a grant ref from an interrupt
    and the table needs expanding, then the CPU may already by in lazy MMU
    mode and apply_to_page_range() will BUG when it tries to re-enable
    lazy MMU mode.

    These two functions are only used in PV guests.

    Introduce arch_gnttab_init() to allocates the virtual address space in
    advance.

    Avoid the use of apply_to_page_range() by using saving and using the
    array of PTE addresses from the alloc_vm_area() call (which ensures
    that the required page tables are pre-allocated).

    Signed-off-by: David Vrabel
    Signed-off-by: Konrad Rzeszutek Wilk

    David Vrabel
     

19 Jul, 2014

3 commits

  • Add inline keyword to silence the following compiler
    warnings if xen_efi_probe() is not used:

    CC arch/x86/xen/setup.o
    In file included from arch/x86/xen/xen-ops.h:7:0,
    from arch/x86/xen/setup.c:31:
    include/xen/xen-ops.h:43:35: warning: ‘xen_efi_probe’ defined but not used [-Wunused-function]

    Signed-off-by: Daniel Kiper
    Reviewed-by: Konrad Rzeszutek Wilk
    Signed-off-by: Matt Fleming

    Daniel Kiper
     
  • This patch enables EFI usage under Xen dom0. Standard EFI Linux
    Kernel infrastructure cannot be used because it requires direct
    access to EFI data and code. However, in dom0 case it is not possible
    because above mentioned EFI stuff is fully owned and controlled
    by Xen hypervisor. In this case all calls from dom0 to EFI must
    be requested via special hypercall which in turn executes relevant
    EFI code in behalf of dom0.

    When dom0 kernel boots it checks for EFI availability on a machine.
    If it is detected then artificial EFI system table is filled.
    Native EFI callas are replaced by functions which mimics them
    by calling relevant hypercall. Later pointer to EFI system table
    is passed to standard EFI machinery and it continues EFI subsystem
    initialization taking into account that there is no direct access
    to EFI boot services, runtime, tables, structures, etc. After that
    system runs as usual.

    This patch is based on Jan Beulich and Tang Liang work.

    Signed-off-by: Jan Beulich
    Signed-off-by: Tang Liang
    Signed-off-by: Daniel Kiper
    Reviewed-by: David Vrabel
    Acked-by: Stefano Stabellini

    Daniel Kiper
     
  • Define constants and structures which are needed to properly
    execute EFI related hypercall in Xen dom0.

    This patch is based on Jan Beulich and Tang Liang work.

    Signed-off-by: Jan Beulich
    Signed-off-by: Tang Liang
    Signed-off-by: Daniel Kiper
    Reviewed-by: David Vrabel
    Acked-by: Stefano Stabellini
    Signed-off-by: Matt Fleming

    Daniel Kiper
     

15 Jul, 2014

2 commits

  • Since 11c7ff17c9b6dbf3a4e4f36be30ad531a6cf0ec9 (xen/grant-table: Force
    to use v1 of grants.) the code for V2 grant tables is not used.

    Signed-off-by: David Vrabel
    Signed-off-by: Konrad Rzeszutek Wilk

    David Vrabel
     
  • arch_gnttab_map_frames() and arch_gnttab_unmap_frames() are called in
    atomic context but were calling alloc_vm_area() which might sleep.

    Also, if a driver attempts to allocate a grant ref from an interrupt
    and the table needs expanding, then the CPU may already by in lazy MMU
    mode and apply_to_page_range() will BUG when it tries to re-enable
    lazy MMU mode.

    These two functions are only used in PV guests.

    Introduce arch_gnttab_init() to allocates the virtual address space in
    advance.

    Avoid the use of apply_to_page_range() by using saving and using the
    array of PTE addresses from the alloc_vm_area() call.

    N.B. 'alloc_vm_area' pre-allocates the pagetable so there is no need
    to worry about having to do a PGD/PUD/PMD walk (like apply_to_page_range
    does) and we can instead do set_pte.

    Signed-off-by: David Vrabel
    Signed-off-by: Konrad Rzeszutek Wilk
    ----
    [v2: Add comment about alloc_vm_area]
    [v3: Fix compile error found by 0-day bot]

    David Vrabel
     

13 Jun, 2014

1 commit

  • Pull networking updates from David Miller:

    1) Seccomp BPF filters can now be JIT'd, from Alexei Starovoitov.

    2) Multiqueue support in xen-netback and xen-netfront, from Andrew J
    Benniston.

    3) Allow tweaking of aggregation settings in cdc_ncm driver, from Bjørn
    Mork.

    4) BPF now has a "random" opcode, from Chema Gonzalez.

    5) Add more BPF documentation and improve test framework, from Daniel
    Borkmann.

    6) Support TCP fastopen over ipv6, from Daniel Lee.

    7) Add software TSO helper functions and use them to support software
    TSO in mvneta and mv643xx_eth drivers. From Ezequiel Garcia.

    8) Support software TSO in fec driver too, from Nimrod Andy.

    9) Add Broadcom SYSTEMPORT driver, from Florian Fainelli.

    10) Handle broadcasts more gracefully over macvlan when there are large
    numbers of interfaces configured, from Herbert Xu.

    11) Allow more control over fwmark used for non-socket based responses,
    from Lorenzo Colitti.

    12) Do TCP congestion window limiting based upon measurements, from Neal
    Cardwell.

    13) Support busy polling in SCTP, from Neal Horman.

    14) Allow RSS key to be configured via ethtool, from Venkata Duvvuru.

    15) Bridge promisc mode handling improvements from Vlad Yasevich.

    16) Don't use inetpeer entries to implement ID generation any more, it
    performs poorly, from Eric Dumazet.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1522 commits)
    rtnetlink: fix userspace API breakage for iproute2 < v3.9.0
    tcp: fixing TLP's FIN recovery
    net: fec: Add software TSO support
    net: fec: Add Scatter/gather support
    net: fec: Increase buffer descriptor entry number
    net: fec: Factorize feature setting
    net: fec: Enable IP header hardware checksum
    net: fec: Factorize the .xmit transmit function
    bridge: fix compile error when compiling without IPv6 support
    bridge: fix smatch warning / potential null pointer dereference
    via-rhine: fix full-duplex with autoneg disable
    bnx2x: Enlarge the dorq threshold for VFs
    bnx2x: Check for UNDI in uncommon branch
    bnx2x: Fix 1G-baseT link
    bnx2x: Fix link for KR with swapped polarity lane
    sctp: Fix sk_ack_backlog wrap-around problem
    net/core: Add VF link state control policy
    net/fsl: xgmac_mdio is dependent on OF_MDIO
    net/fsl: Make xgmac_mdio read error message useful
    net_sched: drr: warn when qdisc is not work conserving
    ...

    Linus Torvalds
     

05 Jun, 2014

1 commit


03 Jun, 2014

1 commit

  • Pull block driver changes from Jens Axboe:
    "Now that the core bits are in, here's the pull request for the driver
    related changes for 3.16. Nothing out of the ordinary here, mostly
    business as usual. There are a few pulls of for-3.16/core into this
    branch, which were done when the blk-mq was modified after the
    mtip32xx conversion was put in.

    The pull request contains:

    - skd and cciss converted to use pci_enable_msix_exact(). From
    Alexander Gordeev.

    - A few mtip32xx fixes from Asai @ Micron.

    - The conversion of mtip32xx from make_request_fn to blk-mq, and a
    later small fix for that conversion on quiescing for non-queued IO.
    From me.

    - A fix for bsg to use an exported function to check whether this
    driver is request based or not. Needed updating for blk-mq, which
    is request based, but does not have a request_fn hook. From me.

    - Small floppy bug fix from Jiri.

    - A series of cleanups for the cdrom uniform layer from Joe Perches.
    Gets rid of various old ugly macros, making the code conform more
    to the modern coding style.

    - A series of patches for drbd from the drbd crew (Lars Ellenberg and
    Philipp Reisner).

    - A use-after-free fix for null_blk from Ming Lei.

    - Also from Ming Lei is a performance patch for virtio-blk, which can
    net us a 3x win on kvm platforms where world notification is
    expensive.

    - Ming Lei also fixed a stall issue in virtio-blk, due to a race
    between queue start/stop and resource limits.

    - A small batch of fixes for xen-blk{back,front} from Olaf Hering and
    Valentin Priescu"

    * 'for-3.16/drivers' of git://git.kernel.dk/linux-block: (54 commits)
    block: virtio_blk: don't hold spin lock during world switch
    xen-blkback: defer freeing blkif to avoid blocking xenwatch
    xen blkif.h: fix comment typo in discard-alignment
    xen/blkback: disable discard feature if requested by toolstack
    xen-blkfront: remove type check from blkfront_setup_discard
    floppy: do not corrupt bio.bi_flags when reading block 0
    mtip32xx: move error handling to service thread
    virtio_blk: fix race between start and stop queue
    mtip32xx: stop block hardware queues before quiescing IO
    mtip32xx: blk_mq_init_queue() returns an ERR_PTR
    mtip32xx: convert to use blk-mq
    cdrom: Remove unnecessary prototype for cdrom_get_disc_info
    cdrom: Remove unnecessary prototype for cdrom_mrw_exit
    cdrom: Remove cdrom_count_tracks prototype
    cdrom: Remove cdrom_get_next_writeable prototype
    cdrom: Remove cdrom_get_last_written prototype
    cdrom: Move mmc_ioctls above cdrom_ioctl to remove unnecessary prototype
    cdrom: Remove unnecessary sanitize_format prototype
    cdrom: Remove unnecessary check_for_audio_disc prototype
    cdrom: Remove prototype for open_for_data
    ...

    Linus Torvalds
     

29 May, 2014

1 commit


13 May, 2014

1 commit

  • New architectures currently have to provide implementations of 5 different
    functions: xen_arch_pre_suspend(), xen_arch_post_suspend(),
    xen_arch_hvm_post_suspend(), xen_mm_pin_all(), and xen_mm_unpin_all().

    Refactor the suspend code to only require xen_arch_pre_suspend() and
    xen_arch_post_suspend().

    Signed-off-by: David Vrabel
    Reviewed-by: Boris Ostrovsky

    David Vrabel
     

24 Apr, 2014

1 commit

  • As part of this make the usual change to xen_ulong_t in place of unsigned long.
    This change has no impact on x86.

    The Linux definition of struct multicall_entry.result differs from the Xen
    definition, I think for good reasons, and used a long rather than an unsigned
    long. Therefore introduce a xen_long_t, which is a long on x86 architectures
    and a signed 64-bit integer on ARM.

    Use uint32_t nr_calls on x86 for consistency with the ARM definition.

    Build tested on amd64 and i386 builds. Runtime tested on ARM.

    Signed-off-by: Ian Campbell
    Cc: Stefano Stabellini
    Cc: Konrad Rzeszutek Wilk
    Cc: Boris Ostrovsky
    Signed-off-by: David Vrabel

    Ian Campbell
     

18 Mar, 2014

2 commits

  • syscore->resume() callback is expected to do not enable interrupts,
    it generates warning like below otherwise:

    [ 9386.365390] WARNING: CPU: 0 PID: 6733 at drivers/base/syscore.c:104 syscore_resume+0x9a/0xe0()
    [ 9386.365403] Interrupts enabled after xen_acpi_processor_resume+0x0/0x34 [xen_acpi_processor]
    ...
    [ 9386.365429] Call Trace:
    [ 9386.365434] [] dump_stack+0x45/0x56
    [ 9386.365437] [] warn_slowpath_common+0x7d/0xa0
    [ 9386.365439] [] warn_slowpath_fmt+0x4c/0x50
    [ 9386.365442] [] ? xen_upload_processor_pm_data+0x300/0x300 [xen_acpi_processor]
    [ 9386.365443] [] syscore_resume+0x9a/0xe0
    [ 9386.365445] [] suspend_devices_and_enter+0x402/0x470
    [ 9386.365447] [] pm_suspend+0x178/0x260

    On xen_acpi_processor_resume() we call various procedures, which are
    non atomic and can enable interrupts. To prevent the issue introduce
    separate resume notify called after we enable interrupts on resume
    and before we call other drivers resume callbacks.

    Signed-off-by: Stanislaw Gruszka
    Signed-off-by: Konrad Rzeszutek Wilk

    Stanislaw Gruszka
     
  • Add support for MSI message groups for Xen Dom0 using the
    MAP_PIRQ_TYPE_MULTI_MSI pirq map type.

    In order to keep track of which pirq is the first one in the group all
    pirqs in the MSI group except for the first one have the newly
    introduced PIRQ_MSI_GROUP flag set. This prevents calling
    PHYSDEVOP_unmap_pirq on them, since the unmap must be done with the
    first pirq in the group.

    Signed-off-by: Roger Pau Monné
    Signed-off-by: David Vrabel
    Cc: Boris Ostrovsky

    Roger Pau Monne
     

01 Mar, 2014

2 commits


15 Feb, 2014

1 commit

  • Pull block IO fixes from Jens Axboe:
    "Second round of updates and fixes for 3.14-rc2. Most of this stuff
    has been queued up for a while. The notable exception is the blk-mq
    changes, which are naturally a bit more in flux still.

    The pull request contains:

    - Two bug fixes for the new immutable vecs, causing crashes with raid
    or swap. From Kent.

    - Various blk-mq tweaks and fixes from Christoph. A fix for
    integrity bio's from Nic.

    - A few bcache fixes from Kent and Darrick Wong.

    - xen-blk{front,back} fixes from David Vrabel, Matt Rushton, Nicolas
    Swenson, and Roger Pau Monne.

    - Fix for a vec miscount with integrity vectors from Martin.

    - Minor annotations or fixes from Masanari Iida and Rashika Kheria.

    - Tweak to null_blk to do more normal FIFO processing of requests
    from Shlomo Pongratz.

    - Elevator switching bypass fix from Tejun.

    - Softlockup in blkdev_issue_discard() fix when !CONFIG_PREEMPT from
    me"

    * 'for-linus' of git://git.kernel.dk/linux-block: (31 commits)
    block: add cond_resched() to potentially long running ioctl discard loop
    xen-blkback: init persistent_purge_work work_struct
    blk-mq: pair blk_mq_start_request / blk_mq_requeue_request
    blk-mq: dont assume rq->errors is set when returning an error from ->queue_rq
    block: Fix cloning of discard/write same bios
    block: Fix type mismatch in ssize_t_blk_mq_tag_sysfs_show
    blk-mq: rework flush sequencing logic
    null_blk: use blk_complete_request and blk_mq_complete_request
    virtio_blk: use blk_mq_complete_request
    blk-mq: rework I/O completions
    fs: Add prototype declaration to appropriate header file include/linux/bio.h
    fs: Mark function as static in fs/bio-integrity.c
    block/null_blk: Fix completion processing from LIFO to FIFO
    block: Explicitly handle discard/write same segments
    block: Fix nr_vecs for inline integrity vectors
    blk-mq: Add bio_integrity setup to blk_mq_make_request
    blk-mq: initialize sg_reserved_size
    blk-mq: handle dma_drain_size
    blk-mq: divert __blk_put_request for MQ ops
    blk-mq: support at_head inserations for blk_execute_rq
    ...

    Linus Torvalds
     

13 Feb, 2014

1 commit

  • Pull Xen bugfixes from Konrad Rzeszutek Wilk:
    "This has an healthy amount of code being removed - which we do not use
    anymore (the only user of it was ia64 Xen which had been removed
    already). The other bug-fixes are to make Xen ARM be able to use the
    new event channel mechanism and proper export of header files to
    user-space.

    Summary:
    - Fix ARM and Xen FIFO not working.
    - Remove more Xen ia64 vestigates.
    - Fix UAPI missing Xen files"

    * tag 'stable/for-linus-3.14-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
    ia64/xen: Remove Xen support for ia64 even more
    xen: install xen/gntdev.h and xen/gntalloc.h
    xen/events: bind all new interdomain events to VCPU0

    Linus Torvalds
     

11 Feb, 2014

3 commits

  • Commit d52eefb47d4e ("ia64/xen: Remove Xen support for ia64") removed
    the Kconfig symbol XEN_XENCOMM. But it didn't remove the code depending
    on that symbol. Remove that code now.

    Signed-off-by: Paul Bolle
    Acked-by: David Vrabel
    Signed-off-by: Konrad Rzeszutek Wilk

    Paul Bolle
     
  • xen/gntdev.h and xen/gntalloc.h both provide userspace ABIs so they
    should be installed.

    CC: stable@vger.kernel.org
    Signed-off-by: David Vrabel
    Signed-off-by: Konrad Rzeszutek Wilk

    David Vrabel
     
  • …/git/xen/tip into for-linus

    Konrad writes:

    Please git pull the following branch:

    git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git stable/for-jens-3.14

    which is based off v3.13-rc6. If you would like me to rebase it on
    a different branch/tag I would be more than happy to do so.

    The patches are all bug-fixes and hopefully can go in 3.14.

    They deal with xen-blkback shutdown and cause memory leaks
    as well as shutdown races. They should go to stable tree and if you
    are OK with I will ask them to backport those fixes.

    There is also a fix to xen-blkfront to deal with unexpected state
    transition. And lastly a fix to the header where it was using the
    __aligned__ unnecessarily.

    Jens Axboe
     

08 Feb, 2014

1 commit

  • This was wrongly introduced in commit 402b27f9, the only difference
    between blkif_request_segment_aligned and blkif_request_segment is
    that the former has a named padding, while both share the same
    memory layout.

    Also correct a few minor glitches in the description, including for it
    to no longer assume PAGE_SIZE == 4096.

    Signed-off-by: Roger Pau Monné
    [Description fix by Jan Beulich]
    Signed-off-by: Jan Beulich
    Reported-by: Jan Beulich
    Cc: Konrad Rzeszutek Wilk
    Cc: David Vrabel
    Cc: Boris Ostrovsky
    Tested-by: Matt Rushton
    Cc: Matt Wilson
    Signed-off-by: Konrad Rzeszutek Wilk

    Roger Pau Monne
     

06 Feb, 2014

1 commit


03 Feb, 2014

1 commit


01 Feb, 2014

1 commit

  • …inux/kernel/git/xen/tip

    Pull Xen bugfixes from Konrad Rzeszutek Wilk:
    "Bug-fixes for the new features that were added during this cycle.

    There are also two fixes for long-standing issues for which we have a
    solution: grant-table operations extra work that was not needed
    causing performance issues and the self balloon code was too
    aggressive causing OOMs.

    Details:
    - Xen ARM couldn't use the new FIFO events
    - Xen ARM couldn't use the SWIOTLB if compiled as 32-bit with 64-bit PCIe devices.
    - Grant table were doing needless M2P operations.
    - Ratchet down the self-balloon code so it won't OOM.
    - Fix misplaced kfree in Xen PVH error code paths"

    * tag 'stable/for-linus-3.14-rc0-late-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
    xen/pvh: Fix misplaced kfree from xlated_setup_gnttab_pages
    drivers: xen: deaggressive selfballoon driver
    xen/grant-table: Avoid m2p_override during mapping
    xen/gnttab: Use phys_addr_t to describe the grant frame base address
    xen: swiotlb: handle sizeof(dma_addr_t) != sizeof(phys_addr_t)
    arm/xen: Initialize event channels earlier

    Linus Torvalds
     

31 Jan, 2014

1 commit

  • The grant mapping API does m2p_override unnecessarily: only gntdev needs it,
    for blkback and future netback patches it just cause a lock contention, as
    those pages never go to userspace. Therefore this series does the following:
    - the original functions were renamed to __gnttab_[un]map_refs, with a new
    parameter m2p_override
    - based on m2p_override either they follow the original behaviour, or just set
    the private flag and call set_phys_to_machine
    - gnttab_[un]map_refs are now a wrapper to call __gnttab_[un]map_refs with
    m2p_override false
    - a new function gnttab_[un]map_refs_userspace provides the old behaviour

    It also removes a stray space from page.h and change ret to 0 if
    XENFEAT_auto_translated_physmap, as that is the only possible return value
    there.

    v2:
    - move the storing of the old mfn in page->index to gnttab_map_refs
    - move the function header update to a separate patch

    v3:
    - a new approach to retain old behaviour where it needed
    - squash the patches into one

    v4:
    - move out the common bits from m2p* functions, and pass pfn/mfn as parameter
    - clear page->private before doing anything with the page, so m2p_find_override
    won't race with this

    v5:
    - change return value handling in __gnttab_[un]map_refs
    - remove a stray space in page.h
    - add detail why ret = 0 now at some places

    v6:
    - don't pass pfn to m2p* functions, just get it locally

    Signed-off-by: Zoltan Kiss
    Suggested-by: David Vrabel
    Acked-by: David Vrabel
    Acked-by: Stefano Stabellini
    Signed-off-by: Konrad Rzeszutek Wilk

    Zoltan Kiss
     

30 Jan, 2014

1 commit

  • On ARM, address size can be 32 bits or 64 bits (if CONFIG_ARCH_PHYS_ADDR_T_64BIT
    is enabled).
    We can't assume that the grant frame base address will always fits in an
    unsigned long. Use phys_addr_t instead of unsigned long as argument for
    gnttab_setup_auto_xlat_frames.

    Signed-off-by: Julien Grall
    Signed-off-by: Stefano Stabellini
    Acked-by: Ian Campbell
    Reviewed-by: David Vrabel

    Julien Grall
     

23 Jan, 2014

1 commit

  • Pull Xen updates from Konrad Rzeszutek Wilk:
    "Two major features that Xen community is excited about:

    The first is event channel scalability by David Vrabel - we switch
    over from an two-level per-cpu bitmap of events (IRQs) - to an FIFO
    queue with priorities. This lets us be able to handle more events,
    have lower latency, and better scalability. Good stuff.

    The other is PVH by Mukesh Rathor. In short, PV is a mode where the
    kernel lets the hypervisor program page-tables, segments, etc. With
    EPT/NPT capabilities in current processors, the overhead of doing this
    in an HVM (Hardware Virtual Machine) container is much lower than the
    hypervisor doing it for us.

    In short we let a PV guest run without doing page-table, segment,
    syscall, etc updates through the hypervisor - instead it is all done
    within the guest container. It is a "hybrid" PV - hence the 'PVH'
    name - a PV guest within an HVM container.

    The major benefits are less code to deal with - for example we only
    use one function from the the pv_mmu_ops (which has 39 function
    calls); faster performance for syscall (no context switches into the
    hypervisor); less traps on various operations; etc.

    It is still being baked - the ABI is not yet set in stone. But it is
    pretty awesome and we are excited about it.

    Lastly, there are some changes to ARM code - you should get a simple
    conflict which has been resolved in #linux-next.

    In short, this pull has awesome features.

    Features:
    - FIFO event channels. Key advantages: support for over 100,000
    events (2^17), 16 different event priorities, improved fairness in
    event latency through the use of FIFOs.
    - Xen PVH support. "It’s a fully PV kernel mode, running with
    paravirtualized disk and network, paravirtualized interrupts and
    timers, no emulated devices of any kind (and thus no qemu), no BIOS
    or legacy boot — but instead of requiring PV MMU, it uses the HVM
    hardware extensions to virtualize the pagetables, as well as system
    calls and other privileged operations." (from "The
    Paravirtualization Spectrum, Part 2: From poles to a spectrum")

    Bug-fixes:
    - Fixes in balloon driver (refactor and make it work under ARM)
    - Allow xenfb to be used in HVM guests.
    - Allow xen_platform_pci=0 to work properly.
    - Refactors in event channels"

    * tag 'stable/for-linus-3.14-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: (52 commits)
    xen/pvh: Set X86_CR0_WP and others in CR0 (v2)
    MAINTAINERS: add git repository for Xen
    xen/pvh: Use 'depend' instead of 'select'.
    xen: delete new instances of __cpuinit usage
    xen/fb: allow xenfb initialization for hvm guests
    xen/evtchn_fifo: fix error return code in evtchn_fifo_setup()
    xen-platform: fix error return code in platform_pci_init()
    xen/pvh: remove duplicated include from enlighten.c
    xen/pvh: Fix compile issues with xen_pvh_domain()
    xen: Use dev_is_pci() to check whether it is pci device
    xen/grant-table: Force to use v1 of grants.
    xen/pvh: Support ParaVirtualized Hardware extensions (v3).
    xen/pvh: Piggyback on PVHVM XenBus.
    xen/pvh: Piggyback on PVHVM for grant driver (v4)
    xen/grant: Implement an grant frame array struct (v3).
    xen/grant-table: Refactor gnttab_init
    xen/grants: Remove gnttab_max_grant_frames dependency on gnttab_init.
    xen/pvh: Piggyback on PVHVM for event channels (v2)
    xen/pvh: Update E820 to work with PVH (v2)
    xen/pvh: Secondary VCPU bringup (non-bootup CPUs)
    ...

    Linus Torvalds
     

21 Jan, 2014

1 commit


06 Jan, 2014

1 commit

  • PVH allows PV linux guest to utilize hardware extended capabilities,
    such as running MMU updates in a HVM container.

    The Xen side defines PVH as (from docs/misc/pvh-readme.txt,
    with modifications):

    "* the guest uses auto translate:
    - p2m is managed by Xen
    - pagetables are owned by the guest
    - mmu_update hypercall not available
    * it uses event callback and not vlapic emulation,
    * IDT is native, so set_trap_table hcall is also N/A for a PVH guest.

    For a full list of hcalls supported for PVH, see pvh_hypercall64_table
    in arch/x86/hvm/hvm.c in xen. From the ABI prespective, it's mostly a
    PV guest with auto translate, although it does use hvm_op for setting
    callback vector."

    Use .ascii and .asciz to define xen feature string. Note, the PVH
    string must be in a single line (not multiple lines with \) to keep the
    assembler from putting null char after each string before \.
    This patch allows it to be configured and enabled.

    We also use introduce the 'XEN_ELFNOTE_SUPPORTED_FEATURES' ELF note to
    tell the hypervisor that 'hvm_callback_vector' is what the kernel
    needs. We can not put it in 'XEN_ELFNOTE_FEATURES' as older hypervisor
    parse fields they don't understand as errors and refuse to load
    the kernel. This work-around fixes the problem.

    Signed-off-by: Mukesh Rathor
    Signed-off-by: Konrad Rzeszutek Wilk
    Acked-by: Stefano Stabellini

    Mukesh Rathor