1. 08 9月, 2014 3 次提交
    • A
      PPC: Mac: Move tbfreq into local variable · caae6c96
      Alexander Graf 提交于
      We already expose the real CPU's tb frequency to the guest via fw_cfg. Soon
      we will need to also expose it to the MacIO, so let's move it to a variable
      that we can leverage every time we need the frequency.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      caae6c96
    • A
      PPC: mac99: Move NVRAM to page boundary when necessary · 261265cc
      Alexander Graf 提交于
      When running KVM we have to adhere to host page boundaries for memory slots.
      Unfortunately the NVRAM on mac99 is a 4k RAM hole inside of an MMIO flash
      area.
      
      So if our host is configured with 64k page size, we can't use the mac99 target
      with KVM. This is a real shame, as this limitation is not really an issue - we
      can easily map NVRAM somewhere else and at least Linux and Mac OS X use it
      at their new location.
      
      So in that emergency case when it's about failing to run at all and moving NVRAM
      to a place it shouldn't be at, choose the latter.
      
      This patch enables -M mac99 with KVM on 64k page size hosts.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      261265cc
    • A
      PPC: KVM: Fix g3beige and mac99 when HV is loaded · 277c7a4d
      Alexander Graf 提交于
      On PPC we have 2 different styles of KVM: PR and HV. HV can only virtualize
      sPAPR guests while PR can virtualize everything that's reasonably close to
      the host hardware platform.
      
      As long as only one kernel module (PR or HV) is loaded, the "default" kvm type
      is the module that's loaded. So if your hardware only supports PR mode you can
      easily spawn a Mac VM.
      
      However, if both HV and PR are loaded we default to HV mode. And in that case
      the Mac machines have to explicitly ask for PR mode to get a working VM.
      
      Fix this up by explicitly having the Mac machines ask for PR style KVM. This
      fixes bootup of Mac VMs on systems where bot HV and PR kvm modules are loaded
      for me.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      277c7a4d
  2. 15 8月, 2014 1 次提交
  3. 22 7月, 2014 1 次提交
    • H
      ppc: fix -mem-path failure · e206ad48
      Hu Tao 提交于
      commit e938ba0c tried to enable -mem-path for ppc but breaked some ppc
      boards.
      
      The problems are:
      
      1. it fails when allocating memory for rom, sram whose sizes are less
         than huge page size:
      
         ./ppc-softmmu/qemu-system-ppc  -m 512 -mem-path /hugepages/ \
         -kernel /home/hutao/Downloads/vmlinux-ppc -initrd \
         /home/hutao/Downloads/initrd-ppc.gz
         qemu-system-ppc: /mnt/data/projects/qemu/exec.c:1184: qemu_ram_set_idstr: Assertion `new_block' failed.
      
      2. if there is a numa node backed by memory backend object, qemu fails
         with message:
      
         ./ppc-softmmu/qemu-system-ppc  -m 512 \
         -object memory-backend-file,size=512M,mem-path=/hugepages,id=f0 \
         -numa node,nodeid=0,memdev=f0 \
         -kernel /home/hutao/Downloads/vmlinux-ppc \
         -initrd /home/hutao/Downloads/initrd-ppc.gz
         qemu-system-ppc: memory backend f0 is used multiple times. Each -numa option must use a different memdev value.
      
      This patch does following:
      
      1. replaces memory_region_allocate_system_memory() with
         memory_region_init_ram() for rom, sram. Then only system memory
         is backed by hugepages when specifying mem-path.
      
      2. for memory banks, allocates all ram with
         one memory_region_allocate_system_memory(), and use
         memory_region_init_alias() to initialize memory banks.
      
      Tested machines: default(g3beige), mac99, taihu, bamboo, ref405ep.
      Signed-off-by: NHu Tao <hutao@cn.fujitsu.com>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      e206ad48
  4. 15 7月, 2014 1 次提交
  5. 27 6月, 2014 1 次提交
    • B
      mac99: Add motherboard devices before PCI cards · a0bb2a5f
      BALATON Zoltan 提交于
      Change the order of creating devices for New World Mac emulation so
      that devices on the motherboard are added first and PCI cards (VGA and
      NIC) come later. As a side effect, this also causes OpenBIOS to map
      the motherboard devices into the MMIO space to the same addresses as
      on real hardware and allow clients that hardcode these addresses (e.g.
      MorphOS) to find and use them until OpenBIOS is tought to map devices
      to specific addresses. (On real hardware the graphics and network
      cards are really on separate buses but we don't model that yet.) This
      brings the memory map closer to what is found on PowerMac3,1.
      Signed-off-by: NBALATON Zoltan <balaton@eik.bme.hu>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      a0bb2a5f
  6. 16 6月, 2014 1 次提交
  7. 28 5月, 2014 1 次提交
  8. 28 8月, 2013 1 次提交
    • M
      hw: Clean up bogus default boot order · c1654732
      Markus Armbruster 提交于
      We set default boot order "cad" in every single machine definition
      except "pseries" and "moxiesim", even though very few boards actually
      care for boot order, and "cad" makes sense for even fewer.
      
      Machines that care:
      
      * pc and its variants
      
        Accept up to three letters 'a', 'b' (undocumented alias for 'a'),
        'c', 'd' and 'n'.  Reject all others (fatal with -boot).
      
      * nseries (n800, n810)
      
        Check whether order starts with 'n'.  Silently ignored otherwise.
      
      * prep, g3beige, mac99
      
        Extract the first character the machine understands (subset of
        'a'..'f').  Silently ignored otherwise.
      
      * spapr
      
        Accept an arbitrary string (vl.c restricts it to contain only
        'a'..'p', no duplicates).
      
      * sun4[mdc]
      
        Use the first character.  Silently ignored otherwise.
      
      Strip characters these machines ignore from their default boot order.
      
      For all other machines, remove the unused default boot order
      alltogether.
      
      Note that my rename of QEMUMachine member boot_order to
      default_boot_order and QEMUMachineInitArgs member boot_device to
      boot_order has a welcome side effect: it makes every use of boot
      orders visible in this patch, for easy review.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      c1654732
  9. 25 7月, 2013 1 次提交
  10. 12 7月, 2013 1 次提交
  11. 08 7月, 2013 1 次提交
    • D
      pci: Add root bus parameter to pci_nic_init() · 29b358f9
      David Gibson 提交于
      At present, pci_nic_init() and pci_nic_init_nofail() assume that they will
      only create a NIC under the primary PCI root.  As we add support for
      multiple PCI roots, that may no longer be the case.  This patch adds a root
      bus parameter to pci_nic_init() (and updates callers accordingly) to allow
      the machine init code using it to specify the right PCI root for NICs
      created by old-style -net nic parameters.  NICs created new-style, with
      -device can of course be put anywhere.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      29b358f9
  12. 04 7月, 2013 1 次提交
  13. 01 7月, 2013 5 次提交
  14. 27 4月, 2013 1 次提交
    • A
      PPC: mac newworld: fix cpu NIP reset value · 20f649dd
      Alexander Graf 提交于
      On -M mac99, we can run 970 CPUs. However, these CPUs define the initial
      instruction pointer they start execution at as part of their bootup protocol,
      so effectively it's up to the board to decide where they start.
      
      This went unnoticed, because they used to boot at the same location our flash
      was mapped to, but due to the recent reset changes our 970 CPUs want to reset
      to 0x100 now, which is always a 0 instruction.
      
      Set the initial IP to something reasonable for -M mac99.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Reviewed-by: NFabien Chouteau <chouteau@adacore.com>
      20f649dd
  15. 09 4月, 2013 1 次提交
    • P
      hw: move headers to include/ · 0d09e41a
      Paolo Bonzini 提交于
      Many of these should be cleaned up with proper qdev-/QOM-ification.
      Right now there are many catch-all headers in include/hw/ARCH depending
      on cpu.h, and this makes it necessary to compile these files per-target.
      However, fixing this does not belong in these patches.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      0d09e41a
  16. 09 3月, 2013 1 次提交
  17. 27 1月, 2013 1 次提交
  18. 26 1月, 2013 7 次提交
  19. 22 1月, 2013 1 次提交
  20. 16 1月, 2013 1 次提交
  21. 19 12月, 2012 3 次提交
  22. 17 12月, 2012 1 次提交
  23. 14 12月, 2012 2 次提交
    • A
      openpic: convert to qdev · d0b72631
      Alexander Graf 提交于
      This patch converts the OpenPIC device to qdev. Along the way it
      renames the "openpic" target to "raven" and the "mpic" target to
      "fsl_mpic_20", to better reflect the actual models they implement.
      
      This way we have a generic OpenPIC device now that can handle
      different flavors of the OpenPIC specification.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      d0b72631
    • A
      openpic: remove irq_out · 5bac0701
      Alexander Graf 提交于
      The current openpic emulation contains half-ready code for bypass mode.
      Remove it, so that when someone wants to finish it they can start from a
      clean state.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      5bac0701
  24. 29 10月, 2012 1 次提交
    • Z
      Add USB option in machine options · 094b287f
      zhlcindy@gmail.com 提交于
      When -usb option is used, global varible usb_enabled is set.
      And all the plaform will create one USB controller according
      to this variable. In fact, global varibles make code hard
      to read.
      
      So this patch is to remove global variable usb_enabled and
      add USB option in machine options. All the plaforms will get
      USB option value from machine options.
      
      USB option of machine options will be set either by:
        * -usb
        * -machine type=pseries,usb=on
      
      Both these ways can work now. They both set USB option in
      machine options. In the future, the first way will be removed.
      Signed-off-by: NLi Zhang <zhlcindy@linux.vnet.ibm.com>
      Acked-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      094b287f
  25. 23 10月, 2012 1 次提交
    • A
      Rename target_phys_addr_t to hwaddr · a8170e5e
      Avi Kivity 提交于
      target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are
      reserved) and its purpose doesn't match the name (most target_phys_addr_t
      addresses are not target specific).  Replace it with a finger-friendly,
      standards conformant hwaddr.
      
      Outstanding patchsets can be fixed up with the command
      
        git rebase -i --exec 'find -name "*.[ch]"
                              | xargs s/target_phys_addr_t/hwaddr/g' origin
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      a8170e5e