1. 10 3月, 2016 7 次提交
  2. 08 3月, 2016 10 次提交
  3. 07 3月, 2016 2 次提交
  4. 05 3月, 2016 2 次提交
    • E
      ui: Shorten references into InputEvent · b5a1b443
      Eric Blake 提交于
      An upcoming patch will alter how simple unions, like InputEvent, are
      laid out, which will impact all lines of the form 'evt->u.XXX'
      (expanding it to the longer 'evt->u.XXX.data').  For better
      legibility in that patch, and less need for line wrapping, it's better
      to use a temporary variable to reduce the effect of a layout change to
      just the variable initializations, rather than every reference within
      an InputEvent.
      
      There was one instance in hid.c:hid_pointer_event() where the code
      was referring to evt->u.rel inside the case label where evt->u.abs
      is the correct name; thankfully, both members of the union have the
      same type, so it happened to work, but it is now cleaner.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1457021813-10704-8-git-send-email-eblake@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      b5a1b443
    • E
      qapi-dealloc: Reduce use outside of generated code · 96a1616c
      Eric Blake 提交于
      No need to roll our own use of the dealloc visitors when we can
      just directly use the qapi_free_FOO() functions that do what we
      want in one line.
      
      In net.c, inline net_visit() into its remaining lone caller.
      
      After this patch, test-visitor-serialization.c is the only
      non-generated file that needs to use a dealloc visitor, because
      it is testing low level aspects of the visitor interface.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1456262075-3311-2-git-send-email-eblake@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      96a1616c
  5. 04 3月, 2016 13 次提交
    • P
      hw/intc/arm_gic.c: Implement GICv2 GICC_DIR · a55c910e
      Peter Maydell 提交于
      The GICv2 introduces a new CPU interface register GICC_DIR, which
      allows an OS to split the "priority drop" and "deactivate interrupt"
      parts of interrupt completion. Implement this register.
      (Note that the register is at offset 0x1000 in the CPU interface,
      which means it is on a different 4K page from all the other registers.)
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NSergey Fedorov <serge.fdrv@gmail.com>
      Message-id: 1456854176-7813-1-git-send-email-peter.maydell@linaro.org
      a55c910e
    • P
      arm: boot: Support big-endian elfs · 9776f636
      Peter Crosthwaite 提交于
      Support ARM big-endian ELF files in system-mode emulation. When loading
      an elf, determine the endianness mode expected by the elf, and set the
      relevant CPU state accordingly.
      
      With this, big-endian modes are now fully supported via system-mode LE,
      so there is no need to restrict the elf loading to the TARGET
      endianness so the ifdeffery on TARGET_WORDS_BIGENDIAN goes away.
      Signed-off-by: NPeter Crosthwaite <crosthwaite.peter@gmail.com>
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      [PMM: fix typo in comments]
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      9776f636
    • P
      loader: Add data swap option to load-elf · 7ef295ea
      Peter Crosthwaite 提交于
      Some CPUs are of an opposite data-endianness to other components in the
      system. Sometimes elfs have the data sections layed out with this CPU
      data-endianness accounting for when loaded via the CPU, so byte swaps
      (relative to other system components) will occur.
      
      The leading example, is ARM's BE32 mode, which is is basically LE with
      address manipulation on half-word and byte accesses to access the
      hw/byte reversed address. This means that word data is invariant
      across LE and BE32. This also means that instructions are still LE.
      The expectation is that the elf will be loaded via the CPU in this
      endianness scheme, which means the data in the elf is reversed at
      compile time.
      
      As QEMU loads via the system memory directly, rather than the CPU, we
      need a mechanism to reverse elf data endianness to implement this
      possibility.
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPeter Crosthwaite <crosthwaite.peter@gmail.com>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      7ef295ea
    • P
      loader: add API to load elf header · 04ae712a
      Peter Crosthwaite 提交于
      Add an API to load an elf header header from a file. Populates a
      buffer with the header contents, as well as a boolean for whether the
      elf is 64b or not. Both arguments are optional.
      Signed-off-by: NPeter Crosthwaite <crosthwaite.peter@gmail.com>
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      [PMM: Fix typo in comment]
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      04ae712a
    • A
      bcm2835_mbox/property: replace ldl_phys/stl_phys with endian-specific accesses · eab71394
      Andrew Baumann 提交于
      PMM pointed out that ldl_phys and stl_phys are dependent on the CPU's
      endianness, whereas device model code should be independent of
      it. This changes the relevant Raspberry Pi devices to explicitly call
      the little-endian variants.
      Signed-off-by: NAndrew Baumann <Andrew.Baumann@microsoft.com>
      Message-id: 1456880233-22568-1-git-send-email-Andrew.Baumann@microsoft.com
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      eab71394
    • P
      hw/arm/virt: Assume EL3 boot rom will handle PSCI if one is provided · 4824a61a
      Peter Maydell 提交于
      If the user passes us an EL3 boot rom, then it is going to want to
      implement the PSCI interface itself. In this case, disable QEMU's
      internal PSCI implementation so it does not get in the way, and
      instead start all CPUs in an SMP configuration at once (the boot
      rom will catch them all and pen up the secondaries until needed).
      The boot rom code is also responsible for editing the device tree
      to include any necessary information about its own PSCI implementation
      before eventually passing it to a NonSecure guest.
      
      (This "start all CPUs at once" approach is what both ARM Trusted
      Firmware and UEFI expect, since it is what the ARM Foundation Model
      does; the other approach would be to provide some emulated hardware
      for "start the secondaries" but this is simplest.)
      
      This is a compatibility break, but I don't believe that anybody
      was using a secure boot ROM with an SMP configuration. Such a setup
      would be somewhat broken since there was nothing preventing nonsecure
      guest code from calling the QEMU PSCI function to start up a secondary
      core in a way that completely bypassed the secure world.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
      Message-id: 1456853976-7592-1-git-send-email-peter.maydell@linaro.org
      4824a61a
    • P
      hw/arm/virt: Make first flash device Secure-only if booting secure · 738a5d9f
      Peter Maydell 提交于
      If the virt board is started with the 'secure' property set to
      request a Secure setup, then make the first flash device be
      visible only to the Secure world.
      
      This is a breaking change, but I don't expect it to be noticed
      by anybody, because running TZ-aware guests isn't common and
      those guests are generally going to be booting from the flash
      and implicitly expecting their Non-secure guests to not touch it.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1455288361-30117-5-git-send-email-peter.maydell@linaro.org
      738a5d9f
    • P
      hw/arm/virt: Load bios image to MemoryRegion, not physaddr · 16f4a8dc
      Peter Maydell 提交于
      If we're loading a BIOS image into the first flash device,
      load it into the flash's memory region specifically, not
      into the physical address where the flash resides. This will
      make a difference when the flash might be in the Secure
      address space rather than the Nonsecure one.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1455288361-30117-4-git-send-email-peter.maydell@linaro.org
      16f4a8dc
    • P
      loader: Add load_image_mr() to load ROM image to a MemoryRegion · 76151cac
      Peter Maydell 提交于
      Add a new function load_image_mr(), which behaves like
      load_image_targphys() except that it loads the ROM image to
      a specified MemoryRegion rather than to a specified physical
      address. This is useful when a ROM blob needs to be loaded
      to a particular flash or ROM device but the address of that
      device in the machine's address space is not known. (For
      instance, ROMs in devices, or ROMs which might exist in
      a different address space to the system address space.)
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1455288361-30117-3-git-send-email-peter.maydell@linaro.org
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      76151cac
    • P
      hw/arm/virt: Provide a secure-only RAM if booting in Secure mode · 83ec1923
      Peter Maydell 提交于
      If we're booting in Secure mode, provide a secure-only RAM
      (just 16MB) so that secure firmware has somewhere to run
      from that won't be accessible to the Non-secure guest.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1455288361-30117-2-git-send-email-peter.maydell@linaro.org
      83ec1923
    • P
      sdhci: Implement DeviceClass reset · 8b41c305
      Peter Maydell 提交于
      The sdhci device was missing a DeviceClass reset method;
      implement it. Poweron reset looks the same as reset commanded
      by the guest via the device registers, apart from modelling of
      the rpi 'pending insert interrupt on powerup' quirk.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NAndrew Baumann <Andrew.Baumann@microsoft.com>
      Message-id: 1456493044-10025-3-git-send-email-peter.maydell@linaro.org
      8b41c305
    • P
      sd.c: Handle NULL block backend in sd_get_inserted() · 0719e71e
      Peter Maydell 提交于
      The sd.c SD card emulation code can be in a state where the
      SDState BlockBackend pointer is NULL; this is treated as
      "card not present". Add a missing check to sd_get_inserted()
      so that we don't segfault in this situation.
      
      (This could be provoked by the guest writing to the SDHCI
      register to do a reset on a xilinx-zynq-a9 board; it will
      also happen at startup when sdhci implements its DeviceClass
      reset method.)
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NAlistair Francis <alistair.francis@xilinx.com>
      Message-id: 1456493044-10025-2-git-send-email-peter.maydell@linaro.org
      0719e71e
    • P
      virt: Lift the maximum RAM limit from 30GB to 255GB · 71c27684
      Peter Maydell 提交于
      The virt board restricts guests to only 30GB of RAM. This is a
      hangover from the vexpress-a15 board, and there's no inherent reason
      for it. 30GB is smaller than you might reasonably want to provision
      a VM for on a beefy server machine. Raise the limit to 255GB.
      
      We choose 255GB because the available space we currently have
      below the 1TB boundary is up to the 512GB mark, but we don't
      want to paint ourselves into a corner by assigning it all to
      RAM. So we make half of it available for RAM, with the 256GB..512GB
      range available for future non-RAM expansion purposes.
      
      If we need to provide more RAM to VMs in the future then we need to:
       * allocate a second bank of RAM starting at 2TB and working up
       * fix the DT and ACPI table generation code in QEMU to correctly
         report two split lumps of RAM to the guest
       * fix KVM in the host kernel to allow guests with >40 bit address spaces
      
      The last of these is obviously the trickiest, but it seems
      reasonable to assume that anybody configuring a VM with a quarter
      of a terabyte of RAM will be doing it on a host with more than a
      terabyte of physical address space.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NChristoffer Dall <christoffer.dall@linaro.org>
      Tested-by: NWei Huang <wei@redhat.com>
      Message-id: 1456402182-11651-1-git-send-email-peter.maydell@linaro.org
      71c27684
  6. 03 3月, 2016 1 次提交
  7. 01 3月, 2016 5 次提交