Skip to content

Commits

Permalink
memhp-v2
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Commits on Jul 20, 2012

  1. Implement _PS3 for dimm

    This will allow us to update dimm state on OSPM-initiated eject operations e.g.
    with "echo 1 > /sys/bus/acpi/devices/PNP0C80\:00/eject"
    Vasilis Liaskovitis committed Jul 20, 2012
    Copy the full SHA
    86d25d3 View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2012

  1. Implement mem_increase, mem_decrease hmp/qmp commands

    This implements batch monitor operations for hot-add and hot-remove. These are
    probably better suited for a higher-level management layer, but are useful for
    testing. Let me know if there is interest for such commands upstream.
    
    syntax: mem_increase poolid num
    will hotplug num dimms from pool poolid. This starts from lowest unpopulated
    physical memory (dimm) and trying to cover any existing physical holes.
    
    syntax: mem_decrease poolid num
    will hot-unplug num dimms from pool poolid, This starts from highest populated
    physical memory (dimm).
    
    Respective qmp commands are "mem-increase", "mem-decrease".
    
    Signed-off-by: Vasilis Liaskovitis <vasilis.liaskovitis@profitbricks.com>
    Vasilis Liaskovitis committed Jul 11, 2012
    Copy the full SHA
    6edf7a5 View commit details
    Browse the repository at this point in the history
  2. Implement -dimms, -dimmspop command line options

    Implement batch dimm creation command line options. These could be useful for
    not bloating the command line with a large number of dimms.
    
    syntax: -dimms pfx=poolid,size=sz,num=n
    Will create numdimms dimms with ids poolid0, ..., poolidn-1. Each dimm has a
    size of sz.
    
    Implement -dimmpop option to populate dimms at bootup
    syntax: -dimmpop pfx=poolid,num=n
    This will populate n dimms with ids poolid0, ..., poolidn-1.
    
    (live-migration could break here without patch 12/21: -dimmspop
    needs to be reworked to support populating of individual dimms with
    same prefix, and not only a range of dimms starting from 0)
    
    Signed-off-by: Vasilis Liaskovitis <vasilis.liaskovitis@profitbricks.com>
    Vasilis Liaskovitis committed Jul 11, 2012
    Copy the full SHA
    ddf1d88 View commit details
    Browse the repository at this point in the history
  3. Implement "info memtotal" and "query-memtotal"

    Returns total memory of guest in bytes, including hotplugged memory.
    
    Signed-off-by: Vasilis Liaskovitis <vasilis.liaskovitis@profitbricks.com>
    Vasilis Liaskovitis committed Jul 11, 2012
    Copy the full SHA
    3c14c67 View commit details
    Browse the repository at this point in the history
  4. acpi_piix4: Update dimm bitmap state on hot-remove fail

    This allows failed hot operations to be retried at anytime. This only
    works for guests that use _OST notification. Other guests cannot retry failed
    hot operations on same devices until after reboot.
    
    Signed-off-by: Vasilis Liaskovitis <vasilis.liaskovitis@profitbricks.com>
    Vasilis Liaskovitis committed Jul 11, 2012
    Copy the full SHA
    2f70dac View commit details
    Browse the repository at this point in the history
  5. acpi_piix4: Update dimm state on VM reboot

    in case of hot-remove or hot-add failure, the dimm bitmaps in qemu and Seabios
    are inconsistent with the true state of the DIMM devices. The "populated" field
    of the DimmState reflects the true state of the device. This inconsistency means
    that a failed operation cannot be retried.
    
    Ths patch updates the bit array to the true state of the dimms on VM reboot.
    This allows retry of failed hot-add or hot-remove operations after a reboot.
    
    Retrying a failed hot operation is not yet possible before reboot (the following
    patch removes this limitation for guests with _OST acpi support)
    
    Signed-off-by: Vasilis Liaskovitis <vasilis.liaskovitis@profitbricks.com>
    Vasilis Liaskovitis committed Jul 11, 2012
    Copy the full SHA
    e988c86 View commit details
    Browse the repository at this point in the history
  6. acpi_piix4: _OST dimm support

    This allows qemu to receive notifications from the guest OS on success or
    failure of a memory hotplug request. The guest OS needs to implement the _OST
    functionality for this to work (linux-next: http://lkml.org/lkml/2012/6/25/321)
    Also add new _OST registers in docs/specs/acpi_hotplug.txt
    
    Signed-off-by: Vasilis Liaskovitis <vasilis.liaskovitis@profitbricks.com>
    Vasilis Liaskovitis committed Jul 11, 2012
    Copy the full SHA
    5cdaf10 View commit details
    Browse the repository at this point in the history
  7. Implement memory hotplug notification lists

    Guest can respond to ACPI hotplug events e.g. with _EJ or _OST method.
    This patch implements a tail queue to store guest notifications for memory
    hot-add and hot-remove requests.
    
    Guest responses for memory hotplug command on a per-dimm basis can be detected
    with the new hmp command "info memhp" or the new qmp command "query-memhp"
    Examples:
    
    (qemu) dimm_add dimm0
    (qemu) info memhp
    Dimm: dimm0 hot-add success
    or
    Dimm: dimm0 hot-add failure
    
    (qemu) dimm_del dimm0
    (qemu) info memhp
    Dimm: dimm0 hot-remove success
    or
    Dimm: dimm0 hot-remove failure
    
    Results are removed from the queue once read.
    
    This patch only queues _EJ events that signal hot-remove success.
    For  _OST event queuing, which cover the hot-remove failure and
    hot-add success/failure cases, the next 2 patches are also needed.
    
    These notification items should probably be part of migration state (not yet
    implemented)
    
    Signed-off-by: Vasilis Liaskovitis <vasilis.liaskovitis@profitbricks.com>
    Vasilis Liaskovitis committed Jul 11, 2012
    Copy the full SHA
    3051df9 View commit details
    Browse the repository at this point in the history
  8. fix live-migration when "populated=on" is missing

    Live migration works after memory hot-add events, as long as the
    qemu command line "-dimm" arguments are changed on the destination host
    to specify "populated=on" for the dimms that have been hot-added.
    
    If a command-line change has not occured, the destination host does not yet
    have the corresponding ramblock in its ram_list. Activate the memslot on the
    destination during ram_load.
    
    Perhaps several fields of the DimmState struct should be part of a
    VMStateDescription to handle migration in a cleaner way.
    
    Signed-off-by: Vasilis Liaskovitis <vasilis.liaskovitis@profitbricks.com>
    Vasilis Liaskovitis committed Jul 11, 2012
    Copy the full SHA
    dcfcbef View commit details
    Browse the repository at this point in the history
  9. Implement dimm_add and dimm_del hmp/qmp commands

    Hot-add hmp syntax: dimm_add dimmid
    Hot-remove hmp syntax: dimm_del dimmid
    
    Respective qmp commands are "dimm-add", "dimm-del".
    
    Signed-off-by: Vasilis Liaskovitis <vasilis.liaskovitis@profitbricks.com>
    Vasilis Liaskovitis committed Jul 11, 2012
    Copy the full SHA
    c4ebc7a View commit details
    Browse the repository at this point in the history
  10. Implement "-dimm" command line option

    Syntax: "-dimm id=name,size=sz,node=pxm,populated=on|off"
    
    The starting physical address for all dimms is calculated automatically from top
    of memory, skipping the pci hole at [PCI_HOLE_START, 4G).
    "populated=on" means the dimm is populated at machine startup. Default is off.
    "node" is defining numa proximity for this dimm. Default is node zero.
    
    Example:
    "-dimm id=dimm0,size=512M,node=0,populated=off"
    will define a 512M memory slot belonging to numa node 0.
    
    Signed-off-by: Vasilis Liaskovitis <vasilis.liaskovitis@profitbricks.com>
    Vasilis Liaskovitis committed Jul 11, 2012
    Copy the full SHA
    ba8f739 View commit details
    Browse the repository at this point in the history
  11. pc: Add dimm paravirt SRAT info

    The numa_fw_cfg paravirt interface is extended to include SRAT information for
    all hotplug-able dimms. There are 3 words for each hotplug-able memory slot,
    denoting start address, size and node proximity. The new info is appended after
    existing numa info, so that the fw_cfg layout does not break.  This information
    is used by Seabios to build hotplug memory device objects at runtime.
    nb_numa_nodes is set to 1 by default (not 0), so that we always pass srat info
    to SeaBIOS.
    
    v1->v2:
    Dimm SRAT info (#dimms) is appended at end of existing numa fw_cfg in order not
    to break existing layout
    Documentation of the new fwcfg layout is included in docs/specs/fwcfg.txt
    
    Signed-off-by: Vasilis Liaskovitis <vasilis.liaskovitis@profitbricks.com>
    Vasilis Liaskovitis committed Jul 11, 2012
    Copy the full SHA
    5a6ae3a View commit details
    Browse the repository at this point in the history
  12. pc: calculate dimm physical addresses and adjust memory map

    Dimm physical address offsets are calculated automatically and memory map is
    adjusted accordingly. If a DIMM can fit before the PCI_HOLE_START (currently
    0xe0000000), it will be added normally, otherwise its physical address will be
    above 4GB.
    
    Signed-off-by: Vasilis Liaskovitis <vasilis.liaskovitis@profitbricks.com>
    Vasilis Liaskovitis committed Jul 11, 2012
    Copy the full SHA
    03fb015 View commit details
    Browse the repository at this point in the history
  13. acpi_piix4: Implement memory device hotplug registers

    A 32-byte register is used to present up to 256 hotplug-able memory devices
    to BIOS and OSPM. Hot-add and hot-remove functions trigger an ACPI hotplug
    event through these. Only reads are allowed from these registers.
    
    An ACPI hot-remove event but needs to wait for OSPM to eject the device.
    We use a single-byte register to know when OSPM has called the _EJ function
    for a particular dimm. A write to this byte will depopulate the respective dimm.
    Only writes are allowed to this byte.
    
    v1->v2:
    mems_sts address moved from 0xaf20 to 0xaf80 (to accomodate more space for
    cpu-hotplugging in the future).
    _EJ array is reduced to a single byte.
    Add documentation in docs/specs/acpi_hotplug.txt
    
    Signed-off-by: Vasilis Liaskovitis <vasilis.liaskovitis@profitbricks.com>
    Vasilis Liaskovitis committed Jul 11, 2012
    Copy the full SHA
    7f2acc8 View commit details
    Browse the repository at this point in the history
  14. dimm: Implement memory device abstraction

    Each hotplug-able memory slot is a SysBusDevice. A hot-add operation for a
    particular dimm creates a new MemoryRegion of the given physical address
    offset, size and node proximity, and attaches it to main system memory as a
    sub_region. A hot-remove operation detaches and frees the MemoryRegion from
    system memory.
    
    This prototype still lacks proper qdev integration: a separate
    hotplug side-channel is used and main system bus hotplug capability is
    ignored.
    
    Signed-off-by: Vasilis Liaskovitis <vasilis.liaskovitis@profitbricks.com>
    Vasilis Liaskovitis committed Jul 11, 2012
    Copy the full SHA
    266c4bf View commit details
    Browse the repository at this point in the history

Commits on Jul 4, 2012

  1. Merge branch 'uq/master' of git://git.kernel.org/pub/scm/virt/kvm/qem…

    …u-kvm into uq/master
    Vasilis Liaskovitis committed Jul 4, 2012
    Copy the full SHA
    169458b View commit details
    Browse the repository at this point in the history

Commits on Jun 28, 2012

  1. bsd-user: fix build

    Link in oslib objects also for BSD user, but avoid using the version of
    qemu_vmalloc() defined in oslib-posix.c.
    
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
    blueswirl committed Jun 28, 2012
    Copy the full SHA
    71ea2e0 View commit details
    Browse the repository at this point in the history
  2. x86: rename op_helper.c to seg_helper.c

    Rename what is remaining of op_helper.c to seg_helper.c.
    
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
    blueswirl committed Jun 28, 2012
    Copy the full SHA
    9cc85c2 View commit details
    Browse the repository at this point in the history
  3. x86: split off memory access helpers

    Move memory access helpers to mem_helper.c.
    
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
    blueswirl committed Jun 28, 2012
    Copy the full SHA
    1077499 View commit details
    Browse the repository at this point in the history
  4. x86: split off misc helpers

    Move various functions to misc_helper.c.
    
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
    blueswirl committed Jun 28, 2012
    Copy the full SHA
    f7b2429 View commit details
    Browse the repository at this point in the history
  5. x86: split off SMM helpers

    Move SMM helpers to smm_helper.c.
    
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
    blueswirl committed Jun 28, 2012
    Copy the full SHA
    ab109e5 View commit details
    Browse the repository at this point in the history
  6. x86: split off SVM helpers

    Move SVM helpers to svm_helper.c.
    
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
    blueswirl committed Jun 28, 2012
    Copy the full SHA
    6bada5e View commit details
    Browse the repository at this point in the history
  7. x86: split off integer helpers

    Move integer and bit field helpers to int_helper.c.
    
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
    blueswirl committed Jun 28, 2012
    Copy the full SHA
    d758207 View commit details
    Browse the repository at this point in the history
  8. x86: split off condition code helpers

    Move condition code helpers to cc_helper.c.
    
    Move the shared inline functions lshift(), cpu_load_eflags() and
    cpu_cc_compute_all() to cpu.h.
    
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
    blueswirl committed Jun 28, 2012
    Copy the full SHA
    5918fff View commit details
    Browse the repository at this point in the history
  9. x86: prepare eflags helpers for general use

    Adjust function names and add an explicit CPUX86State
    parameter instead of relying on AREG0.
    
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
    blueswirl committed Jun 28, 2012
    Copy the full SHA
    997ff0d View commit details
    Browse the repository at this point in the history
  10. x86: split condition code and shift templates

    Move shift templates from helper_template.h to
    shift_helper_template.h and the condition code helpers
    to cc_helper_template.h.
    
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
    blueswirl committed Jun 28, 2012
    Copy the full SHA
    38de4c4 View commit details
    Browse the repository at this point in the history
  11. x86: fix coding style in helper_template.h

    Fix coding style in helper_template.h before next commit.
    
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
    blueswirl committed Jun 28, 2012
    Copy the full SHA
    a04759f View commit details
    Browse the repository at this point in the history
  12. x86: improve SSE table type safety

    SSE function tables could easily be corrupted because of use
    of void pointers.
    
    Introduce function pointer types and helper variables in order
    to improve type safety.
    
    Split sse_op_table3 according to types used.
    
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
    blueswirl committed Jun 28, 2012
    Copy the full SHA
    c4baa05 View commit details
    Browse the repository at this point in the history
  13. x86: split off FPU helpers

    Move FPU and MMX/SSE helpers to fpu_helpers.c.
    
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
    blueswirl committed Jun 28, 2012
    Copy the full SHA
    f299f43 View commit details
    Browse the repository at this point in the history
  14. x86: fix coding style in ops_sse.h

    Fix coding style in ops_sse.h before next commit.
    
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
    blueswirl committed Jun 28, 2012
    Copy the full SHA
    e01d9d3 View commit details
    Browse the repository at this point in the history
  15. x86: avoid an extern declaration

    After the previous patch, we can use the proper
    declaration in a common header file.
    
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
    blueswirl committed Jun 28, 2012
    Copy the full SHA
    9dd69d6 View commit details
    Browse the repository at this point in the history
  16. x86: split off exception handlers

    Move exception handlers from op_helper.c to excp_helper.c.
    
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
    blueswirl committed Jun 28, 2012
    Copy the full SHA
    599b9a5 View commit details
    Browse the repository at this point in the history
  17. x86: avoid AREG0 for exceptions

    Add an explicit CPUX86State parameter instead of relying on AREG0.
    
    Merge raise_exception_env() to raise_exception(), likewise with
    raise_exception_err_env() and raise_exception_err().
    
    Introduce cpu_svm_check_intercept_param() and cpu_vmexit()
    as wrappers.
    
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
    blueswirl committed Jun 28, 2012
    Copy the full SHA
    77b2bc2 View commit details
    Browse the repository at this point in the history
  18. x86: prepare op_helper.c for splitting

    Fix coding style and a few typos.
    
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
    blueswirl committed Jun 28, 2012
    Copy the full SHA
    20054ef View commit details
    Browse the repository at this point in the history

Commits on Jun 27, 2012

  1. Add a memory barrier to DMA functions

    The emulated devices can run simultaneously with the guest, so
    we need to be careful with ordering of load and stores done by
    them to the guest system memory, which need to be observed in
    the right order by the guest operating system.
    
    This adds a barrier call to the basic DMA read/write ops which
    is currently implemented as a smp_mb(), but could be later
    improved for more fine grained control of barriers.
    
    Additionally, a _relaxed() variant of the accessors is provided
    to easily convert devices who would be performance sensitive
    and negatively impacted by the change.
    
    Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    ozbenh authored and Anthony Liguori committed Jun 27, 2012
    Copy the full SHA
    7a0bac4 View commit details
    Browse the repository at this point in the history
Older