1. 10 1月, 2015 8 次提交
  2. 09 1月, 2015 7 次提交
  3. 05 1月, 2015 3 次提交
  4. 03 1月, 2015 6 次提交
  5. 30 12月, 2014 2 次提交
  6. 23 12月, 2014 14 次提交
    • P
      Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20141223' into staging · ab0302ee
      Peter Maydell 提交于
      target-arm queue:
       * enable 32-bit EL3 (TrustZone) for vexpress and virt boards
       * add fw_cfg device to virt board for UEFI firmware config
       * support passing commandline kernel/initrd to firmware
      
      # gpg: Signature made Tue 23 Dec 2014 13:50:33 GMT using RSA key ID 14360CDE
      # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>"
      
      * remotes/pmaydell/tags/pull-target-arm-20141223: (31 commits)
        hw/arm/virt: enable passing of EFI-stubbed kernel to guest UEFI firmware
        hw/arm: pass pristine kernel image to guest firmware over fw_cfg
        hw/loader: split out load_image_gzipped_buffer()
        arm: add fw_cfg to "virt" board
        fw_cfg_mem: expose the "data_width" property with fw_cfg_init_mem_wide()
        fw_cfg_mem: introduce the "data_width" property
        exec: allows 8-byte accesses in subpage_ops
        fw_cfg_mem: flip ctl_mem_ops and data_mem_ops to DEVICE_BIG_ENDIAN
        fw_cfg_mem: max access size and region size are the same for data register
        fw_cfg: move boards to fw_cfg_init_io() / fw_cfg_init_mem()
        fw_cfg: hard separation between the MMIO and I/O port mappings
        target-arm: add cpu feature EL3 to CPUs with Security Extensions
        target-arm: Disable EL3 on unsupported machines
        target-arm: Breakout integratorcp and versatilepb cpu init
        target-arm: Set CPU has_el3 prop during virt init
        target-arm: Enable CPU has_el3 prop during VE init
        target-arm: Add arm_boot_info secure_boot control
        target-arm: Add ARMCPU secure property
        target-arm: Add feature unset function
        target-arm: Add virt machine secure property
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      ab0302ee
    • P
      Merge remote-tracking branch 'remotes/awilliam/tags/vfio-update-20141222.0' into staging · 03de06dd
      Peter Maydell 提交于
      VFIO updates:
      - Conversion to tracepoints (Eric Auger)
      - Fix memory listener address space (Frank Blaschka)
      - Move to hw/vfio/ and split common vs pci (Eric Auger & Kim Phillips)
      - Trivial error_report() fixes (Alex Williamson)
      
      In addition to enabling S390 with the address space fix and updating
      to use tracepoints rather than compile time debug, this set of patches
      moves hw/misc/vfio.c to hw/vfio/ and paves the way for vfio-platform
      support by splitting common functionality from PCI specific code.
      
      # gpg: Signature made Mon 22 Dec 2014 20:19:43 GMT using RSA key ID 3BB08B22
      # gpg: Good signature from "Alex Williamson <alex.williamson@redhat.com>"
      # gpg:                 aka "Alex Williamson <alex@shazbot.org>"
      # gpg:                 aka "Alex Williamson <alwillia@redhat.com>"
      # gpg:                 aka "Alex Williamson <alex.l.williamson@gmail.com>"
      
      * remotes/awilliam/tags/vfio-update-20141222.0:
        vfio: Cleanup error_report()s
        hw/vfio: create common module
        hw/vfio/pci: use name field in format strings
        hw/vfio/pci: rename group_list into vfio_group_list
        hw/vfio/pci: split vfio_get_device
        hw/vfio/pci: Introduce VFIORegion
        hw/vfio/pci: handle reset at VFIODevice
        hw/vfio/pci: add type, name and group fields in VFIODevice
        hw/vfio/pci: introduce minimalist VFIODevice with fd
        hw/vfio/pci: generalize mask/unmask to any IRQ index
        hw/vfio/pci: Rename VFIODevice into VFIOPCIDevice
        vfio: move hw/misc/vfio.c to hw/vfio/pci.c Move vfio.h into include/hw/vfio
        vfio: fix adding memory listener to the right address space
        vfio: migration to trace points
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      03de06dd
    • P
      0266359e
    • P
    • P
      atomic: fix position of volatile qualifier · 2cbcfb28
      Paolo Bonzini 提交于
      What needs to be volatile is not the pointer, but the pointed-to
      value!
      
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      2cbcfb28
    • L
      hw/arm/virt: enable passing of EFI-stubbed kernel to guest UEFI firmware · aa351061
      Laszlo Ersek 提交于
      The virt board already ensures mutual exclusion between -bios and -pflash
      unit#0; we only need to set "bootinfo.firmware_loaded", introduced in the
      previous patch, if either of those options was used to load the guest
      firmware.
      Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 1419250305-31062-12-git-send-email-pbonzini@redhat.com
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      aa351061
    • L
      hw/arm: pass pristine kernel image to guest firmware over fw_cfg · 07abe45c
      Laszlo Ersek 提交于
      Introduce the new boolean field "arm_boot_info.firmware_loaded". When this
      field is set, it means that the portion of guest DRAM that the VCPU
      normally starts to execute, or the pflash chip that the VCPU normally
      starts to execute, has been populated by board-specific code with
      full-fledged guest firmware code, before the board calls
      arm_load_kernel().
      
      Simultaneously, "arm_boot_info.firmware_loaded" guarantees that the board
      code has set up the global firmware config instance, for arm_load_kernel()
      to find with fw_cfg_find().
      
      Guest kernel (-kernel) and guest firmware (-bios, -pflash) has always been
      possible to specify independently on the command line. The following cases
      should be considered:
      
      nr  -bios    -pflash  -kernel  description
                   unit#0
      --  -------  -------  -------  -------------------------------------------
      1   present  present  absent   Board code rejects this case, -bios and
          present  present  present  -pflash unit#0 are exclusive. Left intact
                                     by this patch.
      
      2   absent   absent   present  Traditional kernel loading, with qemu's
                                     minimal board firmware. Left intact by this
                                     patch.
      
      3   absent   present  absent   Preexistent case for booting guest firmware
          present  absent   absent   loaded with -bios or -pflash. Left intact
                                     by this patch.
      
      4   absent   absent   absent   Preexistent case for not loading any
                                     firmware or kernel up-front. Left intact by
                                     this patch.
      
      5   present  absent   present  New case introduced by this patch: kernel
          absent   present  present  image is passed to externally loaded
                                     firmware in unmodified form, using fw_cfg.
      
      An easy way to see that this patch doesn't interfere with existing cases
      is to realize that "info->firmware_loaded" is constant zero at this point.
      Which makes the "outer" condition unchanged, and the "inner" condition
      (with the fw_cfg-related code) dead.
      Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 1419250305-31062-11-git-send-email-pbonzini@redhat.com
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      07abe45c
    • L
      hw/loader: split out load_image_gzipped_buffer() · 7d48a0f7
      Laszlo Ersek 提交于
      In the next patch we'd like to reuse the image decompression facility
      without installing the output as a ROM at a specific guest-phys address.
      
      In addition, expose LOAD_IMAGE_MAX_GUNZIP_BYTES, because that's a
      straightforward "max_sz" argument for the new load_image_gzipped_buffer().
      Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 1419250305-31062-10-git-send-email-pbonzini@redhat.com
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      7d48a0f7
    • L
      arm: add fw_cfg to "virt" board · 578f3c7b
      Laszlo Ersek 提交于
      fw_cfg already supports exposure over MMIO (used in ppc/mac_newworld.c,
      ppc/mac_oldworld.c, sparc/sun4m.c); we can easily add it to the "virt"
      board.
      
      Because MMIO access is slow on ARM KVM, we enable the guest, with
      fw_cfg_init_mem_wide(), to transfer up to 8 bytes with a single access.
      This has been measured to speed up transfers up to 7.5-fold, relative to
      single byte data access, on both ARM KVM and x86_64 TCG.
      
      The MMIO register block of fw_cfg is advertized in the device tree. As
      base address we pick 0x09020000, which conforms to the comment preceding
      "a15memmap": it falls in the miscellaneous device I/O range 128MB..256MB,
      and it is aligned at 64KB. The DTB properties follow the documentation in
      the Linux source file "Documentation/devicetree/bindings/arm/fw-cfg.txt".
      
      fw_cfg automatically exports a number of files to the guest; for example,
      "bootorder" (see fw_cfg_machine_reset()).
      Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 1419250305-31062-9-git-send-email-pbonzini@redhat.com
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      578f3c7b
    • L
      fw_cfg_mem: expose the "data_width" property with fw_cfg_init_mem_wide() · 6c87e3d5
      Laszlo Ersek 提交于
      We rebase fw_cfg_init_mem() to the new function for compatibility with
      current callers.
      
      The behavior of the (big endian) multi-byte data reads is best shown
      with a qtest session.  Here, we are reading the first six bytes of
      the UUID
      
          $ arm-softmmu/qemu-system-arm -M virt -machine accel=qtest \
               -qtest stdio -uuid 4600cb32-38ec-4b2f-8acb-81c6ea54f2d8
      >>> writew 0x9020008 0x0200
      <<< OK
      >>> readl 0x9020000
      <<< OK 0x000000004600cb32
      
      Remember this is big endian.  On big endian machines, it is stored
      directly as 0x46 0x00 0xcb 0x32.
      
      On a little endian machine, we have to first swap it, so that it becomes
      0x32cb0046.  When written to memory, it becomes 0x46 0x00 0xcb 0x32
      again.
      
      Reading byte-by-byte works too, of course:
      
      >>> readb 0x9020000
      <<< OK 0x0000000000000038
      >>> readb 0x9020000
      <<< OK 0x00000000000000ec
      
      Here only a single byte is read at a time, so they are read in order
      similar to the 1-byte data port that is already in PPC and SPARC
      machines.
      Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 1419250305-31062-8-git-send-email-pbonzini@redhat.com
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      6c87e3d5
    • L
      fw_cfg_mem: introduce the "data_width" property · cfaadf0e
      Laszlo Ersek 提交于
      The "data_width" property is capable of changing the maximum valid access
      size to the MMIO data register, and resizes the memory region similarly,
      at device realization time.
      
      The default value of "data_memwidth" is set so that we don't yet diverge
      from "fw_cfg_data_mem_ops".
      
      Most of the fw_cfg_mem users will stick with the default, and for them we
      should continue using the statically allocated "fw_cfg_data_mem_ops". This
      is beneficial for debugging because gdb can resolve pointers referencing
      static objects to the names of those objects.
      Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 1419250305-31062-7-git-send-email-pbonzini@redhat.com
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      cfaadf0e
    • P
      exec: allows 8-byte accesses in subpage_ops · ff6cff75
      Paolo Bonzini 提交于
      Otherwise fw_cfg accesses are split into 4-byte ones before they reach the
      fw_cfg ops / handlers.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 1419250305-31062-6-git-send-email-pbonzini@redhat.com
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      ff6cff75
    • L
      fw_cfg_mem: flip ctl_mem_ops and data_mem_ops to DEVICE_BIG_ENDIAN · d789c845
      Laszlo Ersek 提交于
      The standalone selector port (fw_cfg_ctl_mem_ops) is only used by big
      endian guests to date (*), hence this change doesn't regress them. Paolo
      and Alex have suggested / requested an explicit DEVICE_BIG_ENDIAN setting
      here, for clarity.
      
      (*) git grep -l fw_cfg_init_mem
      
          hw/nvram/fw_cfg.c
          hw/ppc/mac_newworld.c
          hw/ppc/mac_oldworld.c
          hw/sparc/sun4m.c
          include/hw/nvram/fw_cfg.h
      
      The standalone data port (fw_cfg_data_mem_ops) has max_access_size 1 (for
      now), hence changing its endianness doesn't change behavior for existing
      guest code.
      Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 1419250305-31062-5-git-send-email-pbonzini@redhat.com
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      d789c845
    • L
      fw_cfg_mem: max access size and region size are the same for data register · 86099db3
      Laszlo Ersek 提交于
      Make it clear that the maximum access size to the MMIO data register
      determines the full size of the memory region.
      
      Currently the max access size is 1.
      
      This patch doesn't change behavior.
      Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 1419250305-31062-4-git-send-email-pbonzini@redhat.com
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      86099db3