1. 22 3月, 2010 2 次提交
  2. 16 3月, 2010 1 次提交
    • A
      load_elf: replace the address addend by a translation function · 409dbce5
      Aurelien Jarno 提交于
      A few machines need to translate the ELF header addresses into physical
      addresses. Currently the only possibility is to add a value to the
      addresses.
      
      This patch replaces the addend argument by and a translation function
      and an opaque passed to the function. A NULL function does not translate
      the address.
      
      The patch also convert all machines that have an addend, simplify the
      PowerPC kernel loading and fix the MIPS kernel loading using this new
      feature. Other machines may benefit from this feature.
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      409dbce5
  3. 04 3月, 2010 1 次提交
    • J
      KVM: Rework VCPU state writeback API · ea375f9a
      Jan Kiszka 提交于
      This grand cleanup drops all reset and vmsave/load related
      synchronization points in favor of four(!) generic hooks:
      
      - cpu_synchronize_all_states in qemu_savevm_state_complete
        (initial sync from kernel before vmsave)
      - cpu_synchronize_all_post_init in qemu_loadvm_state
        (writeback after vmload)
      - cpu_synchronize_all_post_init in main after machine init
      - cpu_synchronize_all_post_reset in qemu_system_reset
        (writeback after system reset)
      
      These writeback points + the existing one of VCPU exec after
      cpu_synchronize_state map on three levels of writeback:
      
      - KVM_PUT_RUNTIME_STATE (during runtime, other VCPUs continue to run)
      - KVM_PUT_RESET_STATE   (on synchronous system reset, all VCPUs stopped)
      - KVM_PUT_FULL_STATE    (on init or vmload, all VCPUs stopped as well)
      
      This level is passed to the arch-specific VCPU state writing function
      that will decide which concrete substates need to be written. That way,
      no writer of load, save or reset functions that interact with in-kernel
      KVM states will ever have to worry about synchronization again. That
      also means that a lot of reasons for races, segfaults and deadlocks are
      eliminated.
      
      cpu_synchronize_state remains untouched, just as Anthony suggested. We
      continue to need it before reading or writing of VCPU states that are
      also tracked by in-kernel KVM subsystems.
      
      Consequently, this patch removes many cpu_synchronize_state calls that
      are now redundant, just like remaining explicit register syncs.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      ea375f9a
  4. 14 2月, 2010 1 次提交
    • A
      PPC: tell the guest about the time base frequency · dc333cd6
      Alexander Graf 提交于
      Our guest systems need to know by how much the timebase increases every second,
      so there usually is a "timebase-frequency" property in the cpu leaf of the
      device tree.
      
      This property is missing in OpenBIOS.
      
      With qemu, Linux's fallback timebase speed and qemu's internal timebase speed
      match up. With KVM, that is no longer true. The guest is running at the same
      timebase speed as the host.
      
      This leads to massive timing problems. On my test machine, a "sleep 2" takes
      about 14 seconds with KVM enabled.
      
      This patch exports the timebase frequency to OpenBIOS, so it can then put them
      into the device tree.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      dc333cd6
  5. 21 12月, 2009 1 次提交
  6. 04 12月, 2009 1 次提交
  7. 01 12月, 2009 1 次提交
  8. 07 11月, 2009 1 次提交
  9. 12 10月, 2009 1 次提交
    • G
      rom loader: fix sparc -kernel boot. · 3c178e72
      Gerd Hoffmann 提交于
      Changes:
      (1) register pstrcpy_targphys() in rom list, it is used for kernel
      command lines by a number of architectures.
      (2) add rom_ptr() function to get a pointer for applying changes
      to loaded images.  Needed for example to tell the linux kernel
      where it finds the initrd image by updating the header.
      (3) make sparc use rom_ptr for initrd setup.
      
      booting sparc-test works now, and 'info roms' shows this:
      
      (qemu) info roms
      addr=0000000000000000 size=0x2a3828 mem=ram name="phdr #0: vmlinux-2.6.11+tcx"
      addr=00000000007ff000 size=0x00000e mem=ram name="cmdline"
      addr=0000000000800000 size=0x400000 mem=ram name="/root/qemu-test/sparc-test/linux.img"
      addr=0000000070000000 size=0x0e4000 mem=rom name="phdr #0: /home/kraxel/projects/qemu/build-zfull/pc-bios/openbios-sparc32"
      
      reboot via 'system_reset' works too.
      
      Patchworks-ID: 35262
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      3c178e72
  10. 05 10月, 2009 1 次提交
    • M
      Fix pci_add nic not to exit on bad model · 07caea31
      Markus Armbruster 提交于
      Monitor command "pci_add ADDR nic model=MODEL" uses pci_nic_init() to
      create the NIC.  When MODEL is unknown or "?", this prints to stderr
      and terminates the program.
      
      Change pci_nic_init() not to treat "?" specially, and to return NULL
      on failure.  Switch uses during startup to new convenience wrapper
      pci_nic_init_nofail(), which behaves just like pci_nic_init() used to
      do.
      
      Bonus bug fix: we now check for qdev_init() failing there.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      07caea31
  11. 02 10月, 2009 2 次提交
  12. 20 9月, 2009 1 次提交
    • B
      Compile loader only once · ca20cf32
      Blue Swirl 提交于
      Callers must pass ELF machine, byte swapping and symbol LSB clearing
      information to ELF loader. A.out loader needs page size information, pass
      that too as a parameter.
      
      Extract prototypes to a separate file. Move loader.[ch] and elf_ops.h under hw.
      
      Adjust callers. Also use target_phys_addr_t instead of target_ulong for
      addresses: loader addresses aren't virtual.
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      ca20cf32
  13. 10 9月, 2009 1 次提交
    • G
      qdev/usb: convert ohci. · 5b19d9a2
      Gerd Hoffmann 提交于
      Drop num_ports argument for usb_ohci_init_pci(), everybody
      calls it with num_ports == 3, so it is pointless.
      
      Convert ohci pci device into qdev.
      TODO: convert non-pci ohci adapters.
      
      You can add a OHCI USB Controller to your virtual pc now using
      '-device pci-ohci'.  Specifying a id is a good idea, so you can
      attach usb devices to it, like this:
      
        -device pci-ohci,id=ohci
        -device usb-mouse,bus=ohci.0
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      5b19d9a2
  14. 04 9月, 2009 1 次提交
  15. 28 8月, 2009 1 次提交
  16. 16 8月, 2009 1 次提交
  17. 08 8月, 2009 1 次提交
  18. 01 8月, 2009 1 次提交
  19. 28 7月, 2009 1 次提交
    • G
      kill drives_table · 751c6a17
      Gerd Hoffmann 提交于
      First step cleaning up the drives handling.  This one does nothing but
      removing drives_table[], still it became seriously big.
      
      drive_get_index() is gone and is replaced by drives_get() which hands
      out DriveInfo pointers instead of a table index.  This needs adaption in
      *tons* of places all over.
      
      The drives are now maintained as linked list.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      751c6a17
  20. 26 7月, 2009 1 次提交
  21. 30 6月, 2009 1 次提交
  22. 22 6月, 2009 1 次提交
    • M
      Support addr=... in option argument of -net nic · 5607c388
      Markus Armbruster 提交于
      Make net_client_init() accept addr=, put the value into struct
      NICinfo.  Use it in pci_nic_init(), and remove arguments bus and
      devfn.
      
      Don't support addr= in third argument of monitor command pci_add,
      because that clashes with its first argument.  Admittedly unelegant.
      
      Machines "malta" and "r2d" have a default NIC with a well-known PCI
      address.  Deal with that the same way as the NIC model: make
      pci_nic_init() take an optional default to be used when the user
      doesn't specify one.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      5607c388
  23. 30 5月, 2009 1 次提交
  24. 22 5月, 2009 2 次提交
    • J
      Introduce reset notifier order · 8217606e
      Jan Kiszka 提交于
      Add the parameter 'order' to qemu_register_reset and sort callbacks on
      registration. On system reset, callbacks with lower order will be
      invoked before those with higher order. Update all existing users to the
      standard order 0.
      
      Note: At least for x86, the existing users seem to assume that handlers
      are called in their registration order. Therefore, the patch preserves
      this property. If someone feels bored, (s)he could try to identify this
      dependency and express it properly on callback registration.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      8217606e
    • A
      Introduce is_default field for QEMUMachine · 0c257437
      Anthony Liguori 提交于
      f80f9ec9 changed the order that machines are registered which had the effect of
      changing the default machine.  This changeset introduces a new is_default field
      so that machine types can declare that they are the default for an architecture.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      0c257437
  25. 21 5月, 2009 1 次提交
  26. 14 5月, 2009 1 次提交
    • P
      Remove vga_ram_size · fbe1b595
      Paul Brook 提交于
      The vga_ram_size argument to machine init functions always has the same
      value, and is ignored by many machines (including SPARC32 which has an
      obsolete ifdef for VGA_RAM_SIZE).
      
      Remove it and push VGA_RAM_SIZE into vga_int.h.
      Signed-off-by: NPaul Brook <paul@codesourcery.com>
      fbe1b595
  27. 08 5月, 2009 1 次提交
  28. 12 4月, 2009 1 次提交
  29. 10 4月, 2009 3 次提交
  30. 08 3月, 2009 2 次提交
  31. 08 2月, 2009 1 次提交
  32. 07 2月, 2009 1 次提交
  33. 01 2月, 2009 1 次提交
  34. 31 1月, 2009 1 次提交