1. 08 Feb, 2019 1 commit
    • Andre Przywara's avatar
      arm: fdt: add stdout-path to /chosen node · 56e45ea4
      Andre Przywara authored
      The DT spec describes the stdout-path property in the /chosen node to
      contain the DT path for a default device usable for outputting characters.
      The Linux kernel uses this for earlycon (without further parameters),
      other DT users might rely on this as well.
      Add a stdout-path property pointing to the "serial0" alias, then add an
      aliases node at the end of the FDT, containing the actual path. This
      allows the FDT generation code in hw/serial.c to set this string.
      Even when we use the virtio console, the serial console is still there
      and works, so we can expose this unconditionally. Putting the virtio
      console path in there will not work anyway.
      Signed-off-by: Andre Przywara's avatarAndre Przywara <andre.przywara@arm.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
  2. 22 Jan, 2019 1 commit
  3. 19 Jun, 2018 2 commits
    • Jean-Philippe Brucker's avatar
      Extend memory bank API with memory types · 8f46c736
      Jean-Philippe Brucker authored
      Introduce memory types RAM and DEVICE, along with a way for subsystems to
      query the global memory banks. This is required by VFIO, which will need
      to pin and map guest RAM so that assigned devices can safely do DMA to it.
      Depending on the architecture, the physical map is made of either one or
      two RAM regions. In addition, this new memory types API paves the way to
      reserved memory regions introduced in a subsequent patch.
      For the moment we put vesa and ivshmem memory into the DEVICE category, so
      they don't have to be pinned. This means that physical devices assigned
      with VFIO won't be able to DMA to the vesa frame buffer or ivshmem. In
      order to do that, simply changing the type to "RAM" would work. But to
      keep the types consistent, it would be better to introduce flags such as
      KVM_MEM_TYPE_DMA that would complement both RAM and DEVICE type. We could
      then reuse the API for generating firmware information (that is, for x86
      bios; DT supports reserved-memory description).
      Reviewed-by: default avatarPunit Agrawal <punit.agrawal@arm.com>
      Signed-off-by: default avatarJean-Philippe Brucker <jean-philippe.brucker@arm.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
    • Jean-Philippe Brucker's avatar
      irq: add irqfd helpers · e59679d2
      Jean-Philippe Brucker authored
      Add helpers to add and remove IRQFD routing for both irqchips and MSIs.
      We have to make a special case of IRQ lines on ARM where the
      initialisation order goes like this:
       (1) Devices reserve their IRQ lines
       (2) VGIC is setup with VGIC_CTRL_INIT (in a late_init call)
       (3) MSIs are reserved lazily, when the guest needs them
      Since we cannot setup IRQFD before (2), store the IRQFD routing for IRQ
      lines temporarily until we're ready to submit them.
      Reviewed-by: default avatarPunit Agrawal <punit.agrawal@arm.com>
      Signed-off-by: default avatarJean-Philippe Brucker <jean-philippe.brucker@arm.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
  4. 09 Jun, 2017 2 commits
  5. 05 Nov, 2015 1 commit
    • Will Deacon's avatar
      kvmtool: fix VM exit race attempting to pthread_kill an exited thread · 2aa76b26
      Will Deacon authored
      lkvm currently suffers from a Segmentation Fault when exiting, which can
      also lead to the console not being cleaned up correctly after a VM exits.
      The issue is that (the misnamed) kvm_cpu__reboot function sends a
      SIGKVMEXIT to each vcpu thread, which causes those vcpu threads to exit
      once their main loops (kvm_cpu__start) detect that cpu->is_running is
      now false. The lack of synchronisation in this exit path means that a
      concurrent pause event (due to the br_write_lock in ioport__unregister)
      ends up sending SIGKVMPAUSE to an exited thread, resulting in a SEGV.
      This patch fixes the issue by moving kvm_cpu__reboot into kvm.c
      (renaming it in the process) where it can hold the pause_lock mutex
      across the reboot operation. This in turn makes it safe for the pause
      code to check the is_running field of each CPU before attempting to
      send a SIGKVMPAUSE signal.
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
  6. 01 Jun, 2015 33 commits