1. 10 Sep, 2013 11 commits
  2. 09 Sep, 2013 1 commit
    • Paul Burton's avatar
      mips_malta: support up to 2GiB RAM · 94c2b6af
      Paul Burton authored
      A Malta board can support up to 2GiB of RAM. Since the unmapped kseg0/1
      regions are only 512MiB large & the latter 256MiB of those are taken up
      by the IO region, access to RAM beyond 256MiB must be done through a
      mapped region. In the case of a Linux guest this means we need to use
      The mainline Linux kernel does not support highmem for Malta at this
      time, however this can be tested using the linux-mti-3.8 kernel branch
      available from:
      You should be able to boot a Linux kernel built from the linux-mti-3.8
      branch, with CONFIG_HIGHMEM enabled, using 2GiB RAM by passing "-m 2G"
      to QEMU and appending the following kernel parameters:
        mem=256m@0x0 mem=256m@0x90000000 mem=1536m@0x20000000
      Note that the upper half of the physical address space of a Malta
      mirrors the lower half (hence the 2GiB limit) except that the IO region
      (0x10000000-0x1fffffff in the lower half) is not mirrored in the upper
      half. That is, physical addresses 0x90000000-0x9fffffff access RAM
      rather than the IO region, resulting in a physical address space
      resembling the following:
        0x00000000 -> 0x0fffffff  RAM
        0x10000000 -> 0x1fffffff  I/O
        0x20000000 -> 0x7fffffff  RAM
        0x80000000 -> 0x8fffffff  RAM (mirror of 0x00000000 -> 0x0fffffff)
        0x90000000 -> 0x9fffffff  RAM
        0xa0000000 -> 0xffffffff  RAM (mirror of 0x20000000 -> 0x7fffffff)
      The second mem parameter provided to the kernel above accesses the
      second 256MiB of RAM through the upper half of the physical address
      space, making use of the aliasing described above in order to avoid
      the IO region and use the whole 2GiB RAM.
      The memory setup may be seen as 'backwards' in this commit since the
      'real' memory is mapped in the upper half of the physical address space
      and the lower half contains the aliases. On real hardware it would be
      typical to see the upper half of the physical address space as the alias
      since the bus addresses generated match the lower half of the physical
      address space. However since the memory accessible in the upper half of
      the physical address space is uninterrupted by the IO region it is
      easiest to map the RAM as a whole there, and functionally it makes no
      difference to the target code.
      Due to the requirements of accessing the second 256MiB of RAM through
      a mapping to the upper half of the physical address space it is usual
      for the bootloader to indicate a maximum of 256MiB memory to a kernel.
      This allows kernels which do not support such access to boot on systems
      with more than 256MiB of RAM. It is also the behaviour assumed by Linux.
      QEMUs small generated bootloader is modified to provide this behaviour.
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Signed-off-by: default avatarYongbok Kim <yongbok.kim@imgtec.com>
      Reviewed-by: default avatarAurelien Jarno <aurelien@aurel32.net>
      Signed-off-by: default avatarAurelien Jarno <aurelien@aurel32.net>
  3. 05 Sep, 2013 7 commits
  4. 03 Sep, 2013 10 commits
    • Anthony Liguori's avatar
      Merge remote-tracking branch 'afaerber/tags/qom-cpu-for-anthony' into staging · aaa6a401
      Anthony Liguori authored
      QOM CPUState refactorings / X86CPU
      * Conversion of global CPU list to QTAILQ - preparing for CPU hot-unplug
      * Document X86CPU magic numbers for CPUID cache info
      # gpg: Signature made Tue 03 Sep 2013 10:59:22 AM CDT using RSA key ID 3E7E013F
      # gpg: Can't check signature: public key not found
      # By Andreas Färber (3) and Eduardo Habkost (1)
      # Via Andreas Färber
      * afaerber/tags/qom-cpu-for-anthony:
        target-i386: Use #defines instead of magic numbers for CPUID cache info
        cpu: Replace qemu_for_each_cpu()
        cpu: Use QTAILQ for CPU list
        a15mpcore: Use qemu_get_cpu() for generic timers
    • Anthony Liguori's avatar
      Merge remote-tracking branch 'kwolf/for-anthony' into staging · bb7d4d82
      Anthony Liguori authored
      # By Max Reitz (11) and others
      # Via Kevin Wolf
      * kwolf/for-anthony: (26 commits)
        qemu-iotests: Overlapping cluster allocations
        qcow2_check: Mark image consistent
        qcow2-refcount: Repair shared refcount blocks
        qcow2-refcount: Repair OFLAG_COPIED errors
        qcow2-refcount: Move OFLAG_COPIED checks
        qcow2: Employ metadata overlap checks
        qcow2: Metadata overlap checks
        qcow2: Add corrupt bit
        qemu-iotests: Snapshotting zero clusters
        qcow2-refcount: Snapshot update for zero clusters
        option: Add assigned flag to QEMUOptionParameter
        gluster: Abort on AIO completion failure
        block: Remove old raw driver
        switch raw block driver from "raw.o" to "raw_bsd.o"
        raw_bsd: register bdrv_raw
        raw_bsd: add raw_create_options
        raw_bsd: introduce "special members"
        raw_bsd: add raw_create()
        raw_bsd: emit debug events in bdrv_co_readv() and bdrv_co_writev()
        add skeleton for BSD licensed "raw" BlockDriver
      Message-id: 1378111792-20436-1-git-send-email-kwolf@redhat.com
      Signed-off-by: default avatarAnthony Liguori <anthony@codemonkey.ws>
    • Anthony Liguori's avatar
      Merge remote-tracking branch 'mjt/trivial-patches' into staging · 5a93d5c2
      Anthony Liguori authored
      # By Stefan Weil (6) and others
      # Via Michael Tokarev
      * mjt/trivial-patches:
        aio / timers: use g_usleep() not sleep()
        adlib: sort offsets in portio registration
        qmp: fix integer usage in examples
        tci: Remove function tcg_out64 (fix broken build)
        target-arm: Report unimplemented opcodes (LOG_UNIMP)
        pflash_cfi02.c: fix debug macro
        configure: Remove unneeded redirections of stderr (pkg-config --exists)
        configure: Remove unneeded redirections of stderr (pkg-config --cflags, --libs)
        configure: Don't write .pyc files by default (python -B)
        curl: qemu_bh_new() can never return NULL
        slirp/arp_table.c: Avoid shifting into sign bit of signed integers
        configure: disable clang -Wstring-plus-int warning
        rdma: silly ipv6 bugfix
        misc: Fix some typos in names and comments
        slirp: Port redirection option behave differently on Linux and Windows
      Message-id: 1378119695-14568-1-git-send-email-mjt@msgid.tls.msk.ru
      Signed-off-by: default avatarAnthony Liguori <anthony@codemonkey.ws>
    • Anthony Liguori's avatar
      Merge remote-tracking branch 'kraxel/usb.88' into staging · 9ea0f58f
      Anthony Liguori authored
      # By Gerd Hoffmann (10) and Marcel Apfelbaum (1)
      # Via Gerd Hoffmann
      * kraxel/usb.88:
        usb/dev-hid: Modified usb-tablet category from Misc to Input
        Revert "usb-hub: report status changes only once"
        usb-hub: add tracepoint for status reports
        usb: parallelize usb3 streams
        uas: add property for request logging
        xhci: reset port when disabling slot
        xhci: emulate intr endpoint intervals correctly
        xhci: fix endpoint interval calculation
        xhci: add port to slot_address tracepoint
        xhci: add tracepoint for endpoint state changes
        xhci: remove leftover debug printf
      Message-id: 1378117055-29620-1-git-send-email-kraxel@redhat.com
      Signed-off-by: default avatarAnthony Liguori <anthony@codemonkey.ws>
    • Anthony Liguori's avatar
      Merge remote-tracking branch 'mst/tags/for_anthony' into staging · 9889e04a
      Anthony Liguori authored
      pc,pci,virtio fixes and cleanups
      This includes pc and pci cleanups and enhancements,
      and a virtio bugfix for level interrupts.
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      # gpg: Signature made Sun 01 Sep 2013 03:15:36 AM CDT using RSA key ID D28D5469
      # gpg: Can't check signature: public key not found
      # By Michael S. Tsirkin (3) and others
      # Via Michael S. Tsirkin
      * mst/tags/for_anthony:
        virtio_pci: fix level interrupts with irqfd
        pc: reduce duplication, fix PIIX descriptions
        hw: Clean up bogus default boot order
        pci: add config space access traces
        pc: fix regression for 64 bit PCI memory
        pci: Introduce helper to retrieve a PCI device's DMA address space
      Message-id: 1378023590-11109-1-git-send-email-mst@redhat.com
      Signed-off-by: default avatarAnthony Liguori <anthony@codemonkey.ws>
    • Anthony Liguori's avatar
      Merge remote-tracking branch 'afaerber/tags/qom-devices-for-anthony' into staging · 5cff81f0
      Anthony Liguori authored
      QOM device refactorings
      * Fix QOM and ISA documentation errors
      * Extend object_initialize() et al. to check the instance size
      # gpg: Signature made Fri 30 Aug 2013 02:19:48 PM CDT using RSA key ID 3E7E013F
      # gpg: Can't check signature: public key not found
      # By Andreas Färber (14) and others
      # Via Andreas Färber
      * afaerber/tags/qom-devices-for-anthony:
        isa: Fix documentation of isa_register_portio_list()
        qom: Assert instance size in object_initialize_with_type()
        qom: Pass available size to object_initialize()
        qdev: Pass size to qbus_create_inplace()
        virtio-mmio: Pass size to virtio_mmio_bus_new()
        virtio-ccw: Pass size to virtio_ccw_bus_new()
        s390-virtio-bus: Pass size to virtio_s390_bus_new()
        virtio-pci: Pass size to virtio_pci_bus_new()
        usb: Pass size to usb_bus_new()
        scsi: Pass size to scsi_bus_new()
        pci: Pass size to pci_bus_new_inplace()
        ide: Pass size to ide_bus_new()
        ipack: Pass size to ipack_bus_new_inplace()
        intel-hda: Pass size to hda_codec_bus_init()
        qom: Fix object_initialize_with_type() argument name in documentation
        virtio: Remove unnecessary OBJECT() casts
        object: Fix typo in qom/object.h
    • Eduardo Habkost's avatar
      target-i386: Use #defines instead of magic numbers for CPUID cache info · 5e891bf8
      Eduardo Habkost authored
      This is an attempt to make the CPUID cache topology code clearer, by
      replacing the magic numbers in the code with #defines, and moving all
      the cache information to the same place in the file.
      I took care of comparing the assembly output of compiling
      target-i386/cpu.c before and after applying this change, to make sure
      not a single bit was changed on cpu_x86_cpuid() before and after
      applying this patch (unfortunately I had to manually check existing
      differences, because of __LINE__ expansions on
      object_class_dynamic_cast_assert() calls).
      This even keeps the code bug-compatible with the previous version: today
      the cache information returned on AMD cache information leaves (CPUID
      0x80000005 & 0x80000006) do not match the information returned on CPUID
      leaves 2 and 4. The L2 cache information on CPUID leaf 2 also doesn't
      match the information on CPUID leaf 2. The new constants should make it
      easier to eventually fix those inconsistencies. All inconsistencies I
      have found are documented in code comments.
      Signed-off-by: default avatarEduardo Habkost <ehabkost@redhat.com>
      Reviewed-by: default avatarliguang <lig.fnst@cn.fujitsu.com>
      Signed-off-by: default avatarAndreas Färber <afaerber@suse.de>
    • Andreas Färber's avatar
      cpu: Replace qemu_for_each_cpu() · 38fcbd3f
      Andreas Färber authored
      It was introduced to loop over CPUs from target-independent code, but
      since commit 182735ef
      CPUState is used.
      A loop can be considered more efficient than function calls in a loop,
      and CPU_FOREACH() hides implementation details just as well, so use that
      Suggested-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarAndreas Färber <afaerber@suse.de>
    • Andreas Färber's avatar
      cpu: Use QTAILQ for CPU list · bdc44640
      Andreas Färber authored
      Introduce CPU_FOREACH(), CPU_FOREACH_SAFE() and CPU_NEXT() shorthand
      Signed-off-by: default avatarAndreas Färber <afaerber@suse.de>
    • Andreas Färber's avatar
      a15mpcore: Use qemu_get_cpu() for generic timers · 27013bf2
      Andreas Färber authored
      This simplifies the loop and aids with refactoring of CPU list.
      Requested-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: default avatarAndreas Färber <afaerber@suse.de>
  5. 02 Sep, 2013 11 commits