1. 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
  2. 30 7月, 2013 1 次提交
  3. 04 7月, 2013 1 次提交
  4. 27 4月, 2013 1 次提交
  5. 12 4月, 2013 1 次提交
  6. 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
  7. 12 3月, 2013 1 次提交
  8. 01 2月, 2013 1 次提交
  9. 30 1月, 2013 3 次提交
  10. 19 1月, 2013 3 次提交
  11. 16 1月, 2013 1 次提交
  12. 19 12月, 2012 5 次提交
  13. 11 12月, 2012 1 次提交
    • C
      Support default block interfaces per QEMUMachine · 2d0d2837
      Christian Borntraeger 提交于
      There are QEMUMachines that have neither IF_IDE nor IF_SCSI as a
      default/standard interface to their block devices / drives. Therefore,
      this patch introduces a new field default_block_type per QEMUMachine
      struct. The prior use_scsi field becomes thereby obsolete and is
      replaced through .default_block_type = IF_SCSI.
      
      This patch also changes the default for s390x to IF_VIRTIO and
      removes an early hack that converts IF_IDE drives.
      Other parties have already claimed interest (e.g. IF_SD for exynos)
      
      To create a sane default, for machines that dont specify a
      default_block_type, this patch makes IF_IDE = 0 and IF_NONE = 1.
      I checked all users of IF_NONE (blockdev.c and ww/device-hotplug.c)
      as well as IF_IDE and it seems that it is ok to change the defines -
      in other words, I found no obvious (to me) assumption in the code
      regarding IF_NONE==0. IF_NONE is only set if there is an
      explicit if=none. Without if=* the interface becomes IF_DEFAULT.
      
      I would suggest to have some additional care, e.g. by letting
      this patch sit some days in the block tree.
      
      Based on an initial patch from Einar Lueck <elelueck@de.ibm.com>
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      CC: Igor Mitsyanko <i.mitsyanko@samsung.com>
      CC: Markus Armbruster <armbru@redhat.com>
      CC: Kevin Wolf <kwolf@redhat.com>
      Reviewed-by: NAlexander Graf <agraf@suse.de>
      Acked-by: NIgor Mitsyanko <i.mitsyanko@samsung.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      2d0d2837
  14. 27 11月, 2012 1 次提交
  15. 30 10月, 2012 2 次提交
  16. 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
  17. 20 10月, 2012 1 次提交
    • E
      create struct for machine initialization arguments · 5f072e1f
      Eduardo Habkost 提交于
      This should help us to:
      - More easily add or remove machine initialization arguments without
        having to change every single machine init function;
      - More easily make mechanical changes involving the machine init
        functions in the future;
      - Let machine initialization forward the init arguments to other
        functions more easily.
      
      This change was half-mechanical process: first the struct was added with
      the local ram_size, boot_device, kernel_*, initrd_*, and cpu_model local
      variable initialization to all functions. Then the compiler helped me
      locate the local variables that are unused, so they could be removed.
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      5f072e1f
  18. 11 6月, 2012 2 次提交
  19. 02 5月, 2012 4 次提交
  20. 15 3月, 2012 1 次提交
  21. 06 3月, 2012 1 次提交
    • C
      s390: Rework kernel loading: supports elf and newer kernels · 1edb4934
      Christian Borntraeger 提交于
      This reworks the image loading on s390.
      
      Newer kernels will not always have a 0dd0 (basr 13,0) at address 0x10000.
      We must not rely on specific code at certain  addresses. This check was
      introduced to warn users that tried to load vmlinux, since ELF loading
      was not supported. Lets wire that up. If elf loading fails, we assume
      that this is a standard kernel image and load that via load_image_targphys.
      This patch also changes all other users of load_image to
      load_image_targphys to be consistent. (the elf loader registers the kernel
      as rom).
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      1edb4934
  22. 22 1月, 2012 1 次提交
  23. 04 1月, 2012 1 次提交
    • A
      vmstate, memory: decouple vmstate from memory API · c5705a77
      Avi Kivity 提交于
      Currently creating a memory region automatically registers it for
      live migration.  This differs from other state (which is enumerated
      in a VMStateDescription structure) and ties the live migration code
      into the memory core.
      
      Decouple the two by introducing a separate API, vmstate_register_ram(),
      for registering a RAM block for migration.  Currently the same
      implementation is reused, but later it can be moved into a separate list,
      and registrations can be moved to VMStateDescription blocks.
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      c5705a77
  24. 15 11月, 2011 4 次提交
    • A
      s390x: initialize virtio dev region · 326384d5
      Alexander Graf 提交于
      When running the s390x virtio machine we can potentially use uninitialized
      memory for the virtio device backing ram. That can lead to weird breakge.
      
      So let's better initialize it to 0 properly.
      Reported-by: NAndreas Färber <afaerber@suse.de>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      
      ---
      
      v1 -> v2:
      
        - use target_phys_addr_t
      326384d5
    • C
      s390: Fix cpu shutdown for KVM · 854e42f3
      Christian Borntraeger 提交于
      On s390 a shutdown is the state of all CPUs being either stopped
      or disabled (for interrupts) waiting. We have to track the overall
      number of running CPUs to call the shutdown sequence accordingly.
      This patch implements the counting and shutdown handling for the
      kvm path in qemu.
      Lets also wrap changes to env->halted and env->exception_index.
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      854e42f3
    • C
      s390: fix short kernel command lines · 13449a6e
      Christian Borntraeger 提交于
      The default kernel command line for s390 is
      "root=/dev/ram0 ro"
      
      When overriding this line, we have to ensure to also copy the \0 to
      avoid false lines, for example, -append "root=/dev/vda" will result in
      "root=/dev/vda0 ro" with the current code.
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      13449a6e
    • C
      s390: fix reset hypercall to reset the status · e9d86b76
      Christian Borntraeger 提交于
      This patch fixes the reset hypercall which is supposed to also
      reset the device status in device memory.
      This fixes the following bug:
      
      [root@localhost driver]# echo virtio0 > unbind
      [   35.056966] ------------[ cut here ]------------
      [   35.057054] kernel BUG at drivers/virtio/virtio.c:157!
      [   35.057113] illegal operation: 0001 [#1] SMP
      [   35.057181] Modules linked in:
      [   35.057243] CPU: 0 Not tainted 3.0.0-rc1-00180-g0792644-dirty #51
      [   35.057323] Process bash (pid: 497, task: 000000003e58c538, ksp: 000000003ef43978)
      [   35.057409] Krnl PSW : 0704100180000000 00000000003d46f8 (virtio_check_driver_offered_feature+0x0/0x38)
      [   35.057528]            R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:0 CC:1 PM:0 EA:3
      [   35.057616] Krnl GPRS: 0000000000000000 0000000040000000 0000000000000007 0000000000000000
      [   35.057716]            00000000003b3be4 0000000000000001 000000003ef4d380 000000003f1cff00
      [   35.057805]            000000003ef43f18 00000000005ca620 0000000000000008 0000000000838e88
      [   35.057919]            000000000083c860 000000003f7c2e00 00000000003d46b0 000000003ef43d10
      [   35.058027] Krnl Code: 00000000003d46e8: f0b00004ebcf	srp	4(12,%r0),3023(%r14),0
      [   35.058115]            00000000003d46ee: f0a0000407f4	srp	4(11,%r0),2036,0
      [   35.058207]            00000000003d46f4: a7f40001		brc	15,3d46f6
      [   35.058295]           >00000000003d46f8: e31020900004	lg	%r1,144(%r2)
      [   35.058383]            00000000003d46fe: bf2f1080		icm	%r2,15,128(%r1)
      [   35.058470]            00000000003d4702: a784000d		brc	8,3d471c
      [   35.058557]            00000000003d4706: e32010780004	lg	%r2,120(%r1)
      [   35.058645]            00000000003d470c: 59302000		c	%r3,0(%r2)
      [   35.058748] Call Trace:
      [   35.058777] ([<00000000003d469e>] virtio_dev_remove+0x36/0x90)
      [   35.058852]  [<00000000003f3a40>] __device_release_driver+0x7c/0xec
      [   35.058936]  [<00000000003f3ae8>] device_release_driver+0x38/0x48
      [   35.059023]  [<00000000003f2a98>] driver_unbind+0xa4/0xc4
      [   35.059111]  [<00000000002acb70>] sysfs_write_file+0xe8/0x19c
      [   35.059226]  [<000000000022e7a4>] vfs_write+0xb0/0x18c
      [   35.059317]  [<000000000022eb18>] SyS_write+0x58/0xb4
      [   35.059398]  [<000000000057e674>] sysc_noemu+0x16/0x1c
      [   35.059475]  [<000003fffd44b6c0>] 0x3fffd44b6c0
      [   35.059531] Last Breaking-Event-Address:
      [   35.059576]  [<00000000003d46f4>] virtio_dev_remove+0x8c/0x90
      [   35.059646]
      [   35.059661] ---[ end trace 9b1959188f21ee11 ]---
      
      Signed-off-by: Christian Borntraeger<borntraeger@de.ibm.com>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      e9d86b76