1. 19 3月, 2012 1 次提交
    • A
      exec: fix write tlb entry misused as iotlb · 7859cc6e
      Avi Kivity 提交于
      A couple of code paths check the lower bits of CPUTLBEntry::addr_write
      against io_mem_ram as a way of looking for a dirty RAM page.  This works
      by accident since the value is zero, which matches all clear bits for
      TLB_INVALID, TLB_MMIO, and TLB_NOTDIRTY (indicating dirty RAM).
      
      Make it work by design by checking for the proper bits.
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      7859cc6e
  2. 18 3月, 2012 9 次提交
  3. 17 3月, 2012 11 次提交
    • S
      w64: Fix data type of next_tb and tcg_qemu_tb_exec · 69784eae
      Stefan Weil 提交于
      next_tb is the numeric value of a tcg target (= QEMU host) address.
      
      Using tcg_target_ulong instead of unsigned long shows this and makes
      the code portable for hosts with an unusual size of long (w64).
      
      The type cast '(long)(next_tb & ~3)' was not needed (casting
      unsigned long to long does not change the bits, and nor does
      casting long to pointer for most (= all non w64) hosts.
      It is removed here.
      
      Macro or function tcg_qemu_tb_exec is used to set next_tb.
      The function also returns next_tb. Therefore tcg_qemu_tb_exec
      must return a tcg_target_ulong.
      Signed-off-by: NStefan Weil <sw@weilnetz.de>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      69784eae
    • A
      softfloat: fix for C99 · 3bf7e40a
      Avi Kivity 提交于
      C99 appears to consider compound literals as non-constants, and complains
      when they are used in static initializers.  Switch to ordinary initializer
      syntax.
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      Acked-by: NAndreas Färber <afaerber@suse.de>
      Reported-by: NAndreas Färber <andreas.faerber@web.de>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      3bf7e40a
    • B
      Merge branch 'target-arm.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm · 6344d922
      Blue Swirl 提交于
      * 'target-arm.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm:
        target-arm: Decode SETEND correctly in Thumb
        target-arm: Clear IT bits when taking exceptions in v7M
        target-arm: Fix typo in ARM946 cp15 c5 handling
      6344d922
    • B
      Merge branch 'malta' of git://qemu.weilnetz.de/qemu · 6b41fecf
      Blue Swirl 提交于
      * 'malta' of git://qemu.weilnetz.de/qemu:
        malta: Fix display for LED array
        malta: Use symbolic hardware addresses
        malta: Always allocate flash memory
        malta: Clean allocation of bios region alias
      6b41fecf
    • B
      Merge branch 'ppc-for-upstream' of git://repo.or.cz/qemu/agraf · cb76e9c7
      Blue Swirl 提交于
      * 'ppc-for-upstream' of git://repo.or.cz/qemu/agraf:
        PPC: Fix openpic with relative memregions
        pseries: Configure PCI bridge using properties
        PPC: KVM: Synchronize regs on CPU dump
        kvm: Comparison with ioctl number macros needs to be unsigned
        ppc: Correctly define POWERPC_INSNS2_DEFAULT
        pseries: Add support for level interrupts to XICS
        PPC: Fix large page support in TCG
        PPC: Add PIR register to POWER7 CPU
        pseries: Remove PCI device from PCI host bridge code
        pseries: Remove unused constant from PCI code
        pseries: Update SLOF firmware image
        PPC64: Add support for ldbrx and stdbrx instructions
        pseries: Don't try to munmap() a malloc()ed TCE table
        ppc: Add missing 'static' to spin_rw_ops
        PPC: 405: Fix ppc405ep initialization
        Bad zero comparison for sas_ss_flags on powerpc
      cb76e9c7
    • A
      vmstate: fix varrays with uint32_t indexes · 1329d189
      Amos Kong 提交于
      VMSTATE_VARRAY_UINT32() is used in hw/ds1225y.c, and we checked
      VMS_VARRAY_UINT32 bit of field->flags in vmstate_load_state(),
      but we don't check this bit in vmstate_save_state().
      Signed-off-by: NAmos Kong <akong@redhat.com>
      Acked-by: NJuan Quintela <quintela@redhat.com>
      Acked-by: NHervé Poussineau <hpoussin@reactos.org>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      1329d189
    • K
      Fix large memory chunks allocation with tcg_malloc. · 4055299e
      Kirill Batuzov 提交于
      An attempt to allocate a large memory chunk after a small one resulted in
      circular links in list of pools.  It caused the same memory being
      allocated twice for different arrays.
      
      Now pools for large memory chunks are kept in separate list and are
      freed during pool reset because current allocator can not reuse them.
      Signed-off-by: NKirill Batuzov <batuzovk@ispras.ru>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      4055299e
    • P
      hw/pxa2xx.c: Fix handling of pxa2xx_i2c variable offset within region · 14dd5faa
      Peter Maydell 提交于
      The pxa2xx I2C controller can have its registers at an arbitrary offset
      within the MemoryRegion it creates. We use this to create two controllers,
      one which covers a region of size 0x10000 with registers starting at an
      offset 0x1600 into that region, and a second one which covers a region
      of size just 0x100 with the registers starting at the base of the region.
      
      The implementation of this offsetting uses two qdev properties, "offset"
      (which sets the offset which must be subtracted from the address to
      get the offset into the actual register bank) and "size", which is the
      size of the MemoryRegion. We were actually using "offset" for two
      purposes: firstly the required one of handling the registers not being
      at the base of the MemoryRegion, and secondly as a workaround for a
      deficiency of QEMU. Until commit 5312bd8b, if a MemoryRegion was mapped
      at a non-page boundary, the address passed into the read and write
      functions would be the offset from the start of the page, not the
      offset from the start of the MemoryRegion. So when calculating the value
      to set the "offset" qdev property we included a rounding to a page
      boundary.
      
      Following commit 5312bd8b MemoryRegion read/write functions are now
      correctly passed the offset from the base of the region, and our
      workaround now means we're subtracting too much from addresses, resulting
      in warnings like "pxa2xx_i2c_read: Bad register 0xffffff90".
      The fix for this is simply to remove the rounding to a page boundary;
      this allows us to slightly simplify the expression since
        base - (base & (~region_size)) == base & region_size
      
      The qdev property "offset" itself must remain because it is still
      performing its primary job of handling register banks not being at
      the base of the MemoryRegion.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NAndreas Färber <afaerber@suse.de>
      14dd5faa
    • M
      hw/pxa2xx_lcd.c: drop target_phys_addr_t usage in device state · 27424dcc
      Mitsyanko Igor 提交于
      Pxa2xx LCD controller is intended to work with 32-bit bus and it has no knowledge
      of system's physical address size, so it should not use target_phys_addr_t in it's
      state. Convert three variables in DMAChannel state from target_phys_addr_t to uint32_t,
      use VMSTATE_UINT32 instead of VMSTATE_UINTTL for these variables.
      We can do this safely because:
      1) pxa2xx has 32-bit physical address;
      2) rest of the code in file never assumes converted variables to have any size
      different from uint32_t;
      3) we shouldn't have used VMSTATE_UINTTL in the first place because this macro
      is for target_ulong type (which can be different from target_phys_addr_t).
      Signed-off-by: NIgor Mitsyanko <i.mitsyanko@samsung.com>
      Reviewed-by: NAndreas Färber <afaerber@suse.de>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      27424dcc
    • M
      hw/pxa2xx_dma.c: drop target_phys_addr_t usage in device state · a10394e1
      Mitsyanko Igor 提交于
      Pxa2xx DMA controller is a 32-bit device and it has no knowledge of system's
      physical address size, so it should not use target_phys_addr_t in it's state.
      Convert variables descr, src and dest from type target_phys_addr_t to uint32_t,
      use VMSTATE_UINT32 instead of VMSTATE_UINTTL for these variables.
      
      We can do this safely because:
      1) pxa2xx actually has 32-bit physical address size;
      2) rest of the code in file never assumes descr, src and dest variables to have
      size different from uint32_t;
      3) we shouldn't have used VMSTATE_UINTTL in the first place because this macro
      is for target_ulong type (which can be different from target_phys_addr_t).
      Signed-off-by: NIgor Mitsyanko <i.mitsyanko@samsung.com>
      Reviewed-by: NAndreas Färber <afaerber@suse.de>
      Reviewed-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      a10394e1
    • P
      ARM: Remove unnecessary subpage workarounds · 0e4a398a
      Peter Maydell 提交于
      In the ARM per-CPU peripherals (GIC, private timers, SCU, etc),
      remove workarounds for subpage memory region read/write functions
      being passed offsets from the start of the page rather than the
      start of the region. Following commit 5312bd8b the masking off
      of high bits of the address offset is now harmless but unnecessary.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NAndreas Färber <afaerber@suse.de>
      0e4a398a
  4. 16 3月, 2012 8 次提交
  5. 15 3月, 2012 11 次提交