1. 27 2月, 2020 1 次提交
  2. 25 2月, 2020 2 次提交
  3. 22 2月, 2020 1 次提交
    • G
      arm: allwinner: Wire up USB ports · 7abc8cab
      Guenter Roeck 提交于
      Instantiate EHCI and OHCI controllers on Allwinner A10. OHCI ports are
      modeled as companions of the respective EHCI ports.
      
      With this patch applied, USB controllers are discovered and instantiated
      when booting the cubieboard machine with a recent Linux kernel.
      
      ehci-platform 1c14000.usb: EHCI Host Controller
      ehci-platform 1c14000.usb: new USB bus registered, assigned bus number 1
      ehci-platform 1c14000.usb: irq 26, io mem 0x01c14000
      ehci-platform 1c14000.usb: USB 2.0 started, EHCI 1.00
      ehci-platform 1c1c000.usb: EHCI Host Controller
      ehci-platform 1c1c000.usb: new USB bus registered, assigned bus number 2
      ehci-platform 1c1c000.usb: irq 31, io mem 0x01c1c000
      ehci-platform 1c1c000.usb: USB 2.0 started, EHCI 1.00
      ohci-platform 1c14400.usb: Generic Platform OHCI controller
      ohci-platform 1c14400.usb: new USB bus registered, assigned bus number 3
      ohci-platform 1c14400.usb: irq 27, io mem 0x01c14400
      ohci-platform 1c1c400.usb: Generic Platform OHCI controller
      ohci-platform 1c1c400.usb: new USB bus registered, assigned bus number 4
      ohci-platform 1c1c400.usb: irq 32, io mem 0x01c1c400
      usb 2-1: new high-speed USB device number 2 using ehci-platform
      usb-storage 2-1:1.0: USB Mass Storage device detected
      scsi host1: usb-storage 2-1:1.0
      usb 3-1: new full-speed USB device number 2 using ohci-platform
      input: QEMU QEMU USB Mouse as /devices/platform/soc/1c14400.usb/usb3/3-1/3-1:1.0/0003:0627:0001.0001/input/input0
      Reviewed-by: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      Tested-by: NNiek Linnenbank <nieklinnenbank@gmail.com>
      Message-id: 20200217204812.9857-4-linux@roeck-us.net
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      7abc8cab
  4. 21 2月, 2020 5 次提交
    • G
      spapr: Don't use spapr_drc_needed() in CAS code · 4b63db12
      Greg Kurz 提交于
      We currently don't support hotplug of devices between boot and CAS. If
      this happens a CAS reboot is triggered. We detect this during CAS using
      the spapr_drc_needed() function which is essentially a VMStateDescription
      .needed callback. Even if the condition for CAS reboot happens to be the
      same as for DRC migration, it looks wrong to piggyback a migration helper
      for this.
      
      Introduce a helper with slightly more explicit name and use it in both CAS
      and DRC migration code. Since a subsequent patch will enhance this helper
      to cover the case of hot unplug, let's go for spapr_drc_transient(). While
      here convert spapr_hotplugged_dev_before_cas() to the "transient" wording as
      well.
      
      This doesn't change any behaviour.
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      Message-Id: <158169248180.3465937.9531405453362718771.stgit@bahia.lan>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      4b63db12
    • A
      spapr: Allow changing offset for -kernel image · 87262806
      Alexey Kardashevskiy 提交于
      This allows moving the kernel in the guest memory. The option is useful
      for step debugging (as Linux is linked at 0x0); it also allows loading
      grub which is normally linked to run at 0x20000.
      
      This uses the existing kernel address by default.
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Message-Id: <20200203032943.121178-6-aik@ozlabs.ru>
      Reviewed-by: NFabiano Rosas <farosas@linux.ibm.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      87262806
    • S
      spapr: Add Hcalls to support PAPR NVDIMM device · b5fca656
      Shivaprasad G Bhat 提交于
      This patch implements few of the necessary hcalls for the nvdimm support.
      
      PAPR semantics is such that each NVDIMM device is comprising of multiple
      SCM(Storage Class Memory) blocks. The guest requests the hypervisor to
      bind each of the SCM blocks of the NVDIMM device using hcalls. There can
      be SCM block unbind requests in case of driver errors or unplug(not
      supported now) use cases. The NVDIMM label read/writes are done through
      hcalls.
      
      Since each virtual NVDIMM device is divided into multiple SCM blocks,
      the bind, unbind, and queries using hcalls on those blocks can come
      independently. This doesn't fit well into the qemu device semantics,
      where the map/unmap are done at the (whole)device/object level granularity.
      The patch doesnt actually bind/unbind on hcalls but let it happen at the
      device_add/del phase itself instead.
      
      The guest kernel makes bind/unbind requests for the virtual NVDIMM device
      at the region level granularity. Without interleaving, each virtual NVDIMM
      device is presented as a separate guest physical address range. So, there
      is no way a partial bind/unbind request can come for the vNVDIMM in a
      hcall for a subset of SCM blocks of a virtual NVDIMM. Hence it is safe to
      do bind/unbind everything during the device_add/del.
      Signed-off-by: NShivaprasad G Bhat <sbhat@linux.ibm.com>
      Message-Id: <158131059899.2897.11515211602702956854.stgit@lep8c.aus.stglabs.ibm.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      b5fca656
    • S
      spapr: Add NVDIMM device support · ee3a71e3
      Shivaprasad G Bhat 提交于
      Add support for NVDIMM devices for sPAPR. Piggyback on existing nvdimm
      device interface in QEMU to support virtual NVDIMM devices for Power.
      Create the required DT entries for the device (some entries have
      dummy values right now).
      
      The patch creates the required DT node and sends a hotplug
      interrupt to the guest. Guest is expected to undertake the normal
      DR resource add path in response and start issuing PAPR SCM hcalls.
      
      The device support is verified based on the machine version unlike x86.
      
      This is how it can be used ..
      Ex :
      For coldplug, the device to be added in qemu command line as shown below
      -object memory-backend-file,id=memnvdimm0,prealloc=yes,mem-path=/tmp/nvdimm0,share=yes,size=1073872896
      -device nvdimm,label-size=128k,uuid=75a3cdd7-6a2f-4791-8d15-fe0a920e8e9e,memdev=memnvdimm0,id=nvdimm0,slot=0
      
      For hotplug, the device to be added from monitor as below
      object_add memory-backend-file,id=memnvdimm0,prealloc=yes,mem-path=/tmp/nvdimm0,share=yes,size=1073872896
      device_add nvdimm,label-size=128k,uuid=75a3cdd7-6a2f-4791-8d15-fe0a920e8e9e,memdev=memnvdimm0,id=nvdimm0,slot=0
      Signed-off-by: NShivaprasad G Bhat <sbhat@linux.ibm.com>
      Signed-off-by: NBharata B Rao <bharata@linux.ibm.com>
                     [Early implementation]
      Message-Id: <158131058078.2897.12767731856697459923.stgit@lep8c.aus.stglabs.ibm.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      ee3a71e3
    • S
      nvdimm: add uuid property to nvdimm · 6c5627bb
      Shivaprasad G Bhat 提交于
      For ppc64, PAPR requires the nvdimm device to have UUID property
      set in the device tree. Add an option to get it from the user.
      Signed-off-by: NShivaprasad G Bhat <sbhat@linux.ibm.com>
      Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
      Message-Id: <158131056931.2897.14057087440721445976.stgit@lep8c.aus.stglabs.ibm.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      6c5627bb
  5. 13 2月, 2020 2 次提交
  6. 11 2月, 2020 2 次提交
  7. 06 2月, 2020 1 次提交
  8. 03 2月, 2020 5 次提交
  9. 02 2月, 2020 5 次提交
    • C
      ppc/pnv: Add models for POWER8 PHB3 PCIe Host bridge · 9ae1329e
      Cédric Le Goater 提交于
      This is a model of the PCIe Host Bridge (PHB3) found on a POWER8
      processor. It includes the PowerBus logic interface (PBCQ), IOMMU
      support, a single PCIe Gen.3 Root Complex, and support for MSI and LSI
      interrupt sources as found on a POWER8 system using the XICS interrupt
      controller.
      
      The POWER8 processor comes in different flavors: Venice, Murano,
      Naple, each having a different number of PHBs. To make things simpler,
      the models provides 3 PHB3 per chip. Some platforms, like the
      Firestone, can also couple PHBs on the first chip to provide more
      bandwidth but this is too specific to model in QEMU.
      
      XICS requires some adjustment to support the PHB3 MSI. The changes are
      provided here but they could be decoupled in prereq patches.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NCédric Le Goater <clg@kaod.org>
      Message-Id: <20200127144506.11132-3-clg@kaod.org>
      [dwg: Use device_class_set_props()]
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      9ae1329e
    • B
      ppc/pnv: Add models for POWER9 PHB4 PCIe Host bridge · 4f9924c4
      Benjamin Herrenschmidt 提交于
      These changes introduces models for the PCIe Host Bridge (PHB4) of the
      POWER9 processor. It includes the PowerBus logic interface (PBCQ),
      IOMMU support, a single PCIe Gen.4 Root Complex, and support for MSI
      and LSI interrupt sources as found on a POWER9 system using the XIVE
      interrupt controller.
      
      POWER9 processor comes with 3 PHB4 PEC (PCI Express Controller) and
      each PEC can have several PHBs. By default,
      
        * PEC0 provides 1 PHB  (PHB0)
        * PEC1 provides 2 PHBs (PHB1 and PHB2)
        * PEC2 provides 3 PHBs (PHB3, PHB4 and PHB5)
      
      Each PEC has a set  "global" registers and some "per-stack" (per-PHB)
      registers. Those are organized in two XSCOM ranges, the "Nest" range
      and the "PCI" range, each range contains both some "PEC" registers and
      some "per-stack" registers.
      
      No default device layout is provided and PCI devices can be added on
      any of the available PCIe Root Port (pcie.0 .. 2 of a Power9 chip)
      with address 0x0 as the firwware (skiboot) only accepts a single
      device per root port. To run a simple system with a network and a
      storage adapters, use a command line options such as :
      
        -device e1000e,netdev=net0,mac=C0:FF:EE:00:00:02,bus=pcie.0,addr=0x0
        -netdev bridge,id=net0,helper=/usr/libexec/qemu-bridge-helper,br=virbr0,id=hostnet0
      
        -device megasas,id=scsi0,bus=pcie.1,addr=0x0
        -drive file=$disk,if=none,id=drive-scsi0-0-0-0,format=qcow2,cache=none
        -device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=2
      
      If more are needed, include a bridge.
      
      Multi chip is supported, each chip adding its set of PHB4 controllers
      and its PCI busses. The model doesn't emulate the EEH error handling.
      
      This model is not ready for hotplug yet.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      [ clg: - numerous cleanups
             - commit log
             - fix for broken LSI support
             - PHB pic printinfo
             - large QOM rework ]
      Signed-off-by: NCédric Le Goater <clg@kaod.org>
      Message-Id: <20200127144506.11132-2-clg@kaod.org>
      [dwg: Use device_class_set_props()]
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      4f9924c4
    • S
      spapr: Implement get_dt_compatible() callback · 864674fa
      Stefan Berger 提交于
      For devices that cannot be statically initialized, implement a
      get_dt_compatible() callback that allows us to ask the device for
      the 'compatible' value.
      Signed-off-by: NStefan Berger <stefanb@linux.ibm.com>
      Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Message-Id: <20200121152935.649898-3-stefanb@linux.ibm.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      864674fa
    • C
      ppc/pnv: Add support for "hostboot" mode · 08c3f3a7
      Cédric Le Goater 提交于
      When the "hb-mode" option is activated on the powernv machine, the
      firmware is mapped at 0x8000000 and the HRMOR of the HW threads are
      set to the same address.
      
      The PNOR mapping on the FW address space of the LPC bus is left enabled
      to let the firmware load any other images required to boot the host.
      Signed-off-by: NCédric Le Goater <clg@kaod.org>
      Message-Id: <20200127144154.10170-4-clg@kaod.org>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      08c3f3a7
    • T
      hw/ppc/prep: Remove the deprecated "prep" machine and the OpenHackware BIOS · b2ce76a0
      Thomas Huth 提交于
      It's been deprecated since QEMU v3.1. The 40p machine should be
      used nowadays instead.
      Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Acked-by: NHervé Poussineau <hpoussin@reactos.org>
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Message-Id: <20200114114617.28854-1-thuth@redhat.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      b2ce76a0
  10. 31 1月, 2020 10 次提交
  11. 30 1月, 2020 1 次提交
    • A
      hw/core/loader: Let load_elf() populate a field with CPU-specific flags · 6cdda0ff
      Aleksandar Markovic 提交于
      While loading the executable, some platforms (like AVR) need to
      detect CPU type that executable is built for - and, with this patch,
      this is enabled by reading the field 'e_flags' of the ELF header of
      the executable in question. The change expands functionality of
      the following functions:
      
        - load_elf()
        - load_elf_as()
        - load_elf_ram()
        - load_elf_ram_sym()
      
      The argument added to these functions is called 'pflags' and is of
      type 'uint32_t*' (that matches 'pointer to 'elf_word'', 'elf_word'
      being the type of the field 'e_flags', in both 32-bit and 64-bit
      variants of ELF header). Callers are allowed to pass NULL as that
      argument, and in such case no lookup to the field 'e_flags' will
      happen, and no information will be returned, of course.
      
      CC: Richard Henderson <rth@twiddle.net>
      CC: Peter Maydell <peter.maydell@linaro.org>
      CC: Edgar E. Iglesias <edgar.iglesias@gmail.com>
      CC: Michael Walle <michael@walle.cc>
      CC: Thomas Huth <huth@tuxfamily.org>
      CC: Laurent Vivier <laurent@vivier.eu>
      CC: Philippe Mathieu-Daudé <f4bug@amsat.org>
      CC: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com>
      CC: Aurelien Jarno <aurelien@aurel32.net>
      CC: Jia Liu <proljc@gmail.com>
      CC: David Gibson <david@gibson.dropbear.id.au>
      CC: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      CC: BALATON Zoltan <balaton@eik.bme.hu>
      CC: Christian Borntraeger <borntraeger@de.ibm.com>
      CC: Thomas Huth <thuth@redhat.com>
      CC: Artyom Tarasenko <atar4qemu@gmail.com>
      CC: Fabien Chouteau <chouteau@adacore.com>
      CC: KONRAD Frederic <frederic.konrad@adacore.com>
      CC: Max Filippov <jcmvbkbc@gmail.com>
      Reviewed-by: NAleksandar Rikalo <aleksandar.rikalo@rt-rk.com>
      Signed-off-by: NMichael Rolnik <mrolnik@gmail.com>
      Signed-off-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Signed-off-by: NAleksandar Markovic <amarkovic@wavecomp.com>
      Message-Id: <1580079311-20447-24-git-send-email-aleksandar.markovic@rt-rk.com>
      6cdda0ff
  12. 28 1月, 2020 2 次提交
  13. 25 1月, 2020 3 次提交