1. 19 1月, 2013 1 次提交
  2. 16 1月, 2013 1 次提交
  3. 19 12月, 2012 5 次提交
  4. 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
  5. 27 11月, 2012 1 次提交
  6. 30 10月, 2012 2 次提交
  7. 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
  8. 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
  9. 11 6月, 2012 2 次提交
  10. 02 5月, 2012 4 次提交
  11. 15 3月, 2012 1 次提交
  12. 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
  13. 22 1月, 2012 1 次提交
  14. 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
  15. 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
  16. 17 10月, 2011 1 次提交
  17. 16 10月, 2011 1 次提交
  18. 21 8月, 2011 1 次提交
  19. 13 7月, 2011 1 次提交
  20. 20 5月, 2011 1 次提交
  21. 19 4月, 2011 2 次提交
  22. 13 4月, 2011 1 次提交
  23. 21 2月, 2011 1 次提交
  24. 26 12月, 2010 1 次提交
  25. 06 7月, 2010 1 次提交
  26. 02 7月, 2010 2 次提交
    • M
      block: Catch attempt to attach multiple devices to a blockdev · 18846dee
      Markus Armbruster 提交于
      For instance, -device scsi-disk,drive=foo -device scsi-disk,drive=foo
      happily creates two SCSI disks connected to the same block device.
      It's all downhill from there.
      
      Device usb-storage deliberately attaches twice to the same blockdev,
      which fails with the fix in place.  Detach before the second attach
      there.
      
      Also catch attempt to delete while a guest device model is attached.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      18846dee
    • M
      qdev: Decouple qdev_prop_drive from DriveInfo · f8b6cc00
      Markus Armbruster 提交于
      Make the property point to BlockDriverState, cutting out the DriveInfo
      middleman.  This prepares the ground for block devices that don't have
      a DriveInfo.
      
      Currently all user-defined ones have a DriveInfo, because the only way
      to define one is -drive & friends (they go through drive_init()).
      DriveInfo is closely tied to -drive, and like -drive, it mixes
      information about host and guest part of the block device.  I'm
      working towards a new way to define block devices, with clean
      host/guest separation, and I need to get DriveInfo out of the way for
      that.
      
      Fortunately, the device models are perfectly happy with
      BlockDriverState, except for two places: ide_drive_initfn() and
      scsi_disk_initfn() need to check the DriveInfo for a serial number set
      with legacy -drive serial=...  Use drive_get_by_blockdev() there.
      
      Device model code should now use DriveInfo only when explicitly
      dealing with drives defined the old way, i.e. without -device.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      f8b6cc00