1. 30 1月, 2013 1 次提交
    • A
      virtio-net: introduce a new macaddr control · c1943a3f
      Amos Kong 提交于
      In virtio-net guest driver, currently we write MAC address to
      pci config space byte by byte, this means that we have an
      intermediate step where mac is wrong. This patch introduced
      a new control command to set MAC address, it's atomic.
      
      VIRTIO_NET_F_CTRL_MAC_ADDR is a new feature bit for compatibility.
      
      "mac" field will be set to read-only when VIRTIO_NET_F_CTRL_MAC_ADDR
      is acked.
      Signed-off-by: NAmos Kong <akong@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      c1943a3f
  2. 27 1月, 2013 2 次提交
    • E
      pc: Generate APIC IDs according to CPU topology · 8932cfdf
      Eduardo Habkost 提交于
      This keeps compatibility on machine-types pc-1.2 and older, and prints a
      warning in case the requested configuration won't get the correct
      topology.
      
      I couldn't think of a better way to warn about broken topology when in
      compat mode other than using error_report(). The warning message will
      probably be buried in a log file somewhere, but it's better than
      nothing.
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      8932cfdf
    • E
      pc: Reverse pc_init_pci() compatibility logic · 29694758
      Eduardo Habkost 提交于
      Currently, the pc-1.4 machine init function enables PV EOI and then
      calls the pc-1.2 machine init function. The problem with this approach
      is that now we can't enable any additional compatibility code inside the
      pc-1.2 init function because it would end up enabling the compatibility
      behavior on pc-1.3 and pc-1.4 as well.
      
      This reverses the logic so that the pc-1.2 machine init function will
      disable PV EOI, and then call the pc-1.4 machine init function.
      
      This way we can change older machine-types to enable compatibility
      behavior, and the newer machine-types (pc-1.3, pc-q35-1.4 and
      pc-i440fx-1.4) would just use the default behavior.
      
      (This means that one nice side-effect of this change is that pc-q35-1.4
      will get PV EOI enabled by default, too)
      
      It would be interesting to eventually change pc_init_pci_no_kvmclock()
      and pc_init_isa() to reuse pc_init_pci_1_2() as well (so we don't need
      to duplicate compatibility code on those two functions). But this will
      be probably much easier to do after we create a PCInitArgs struct for
      the PC initialization arguments, and/or after we use global-properties
      to implement the compatibility modes present in pc_init_pci_1_2().
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Acked-by: NMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: NMarcelo Tosatti <mtosatti@redhat.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      29694758
  3. 16 1月, 2013 1 次提交
  4. 11 1月, 2013 1 次提交
    • G
      pc: rename machine types · 94dec594
      Gerd Hoffmann 提交于
      Starting with release 1.4 we have a fully functional q35 machine type,
      i.e. "qemu -M q35" JustWorks[tm].  Update machine type names to reflect
      that:
      
        * pc-1.4 becomes pc-i440fx-1.4
        * q35-next becomes pc-q35-1.4
      
      The pc-1.3 (+older) names are maintained for compatibility reasons.
      For the same reason the "pc" and "q35" aliases are kept.  pc-piix-1.4
      continues to be the default machine type, again for compatibility
      reasons.
      
      Also updated the description (shown by "qemu -M ?") with host bridge
      name, south bridge name and chipset release year.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      94dec594
  5. 04 1月, 2013 1 次提交
  6. 19 12月, 2012 3 次提交
  7. 17 12月, 2012 1 次提交
  8. 04 12月, 2012 2 次提交
    • H
      usb-tablet: Allow connecting to ehci · 427e3aa1
      Hans de Goede 提交于
      Our ehci code has is capable of significantly lowering the wakeup rate
      for the hcd emulation while the device is idle. It is possible to add
      similar code ot the uhci emulation, but that simply is not there atm,
      and there is no reason why a (virtual) usb-tablet can not be a USB-2 device.
      
      Making usb-hid devices connect to the emulated ehci controller instead
      of the emulated uhci controller on vms which have both lowers the cpuload
      for a fully idle vm from 20% to 2-3% (on my laptop).
      
      An alternative implementation to using a property to select the tablet
      type, would be simply making it a new device type, ie usb-tablet2, but the
      downside of that is that this will require libvirt changes to be available
      through libvirt at all, and then management tools changes to become the
      default for new vms, where as using a property will automatically get
      any pc-1.3 type vms the lower cpuload.
      
      [ kraxel: adapt compat property for post-1.3 merge ]
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      
      tablet compat fixup
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      427e3aa1
    • G
      add pc-1.4 · f1ae2e38
      Gerd Hoffmann 提交于
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      f1ae2e38
  9. 26 11月, 2012 3 次提交
  10. 02 11月, 2012 1 次提交
  11. 29 10月, 2012 2 次提交
    • M
      qemu: enable PV EOI for qemu 1.3 · dc59944b
      Michael S. Tsirkin 提交于
      Enable KVM PV EOI by default. You can still disable it with
      -kvm_pv_eoi cpu flag. To avoid breaking cross-version migration,
      enable only for qemu 1.3 (or in the future, newer) machine type.
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      dc59944b
    • 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
  12. 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
  13. 20 10月, 2012 2 次提交
    • 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
    • G
      vga: add mmio bar to standard vga · 803ff052
      Gerd Hoffmann 提交于
      This patch adds a mmio bar to the qemu standard vga which allows to
      access the standard vga registers and bochs dispi interface registers
      via mmio.
      
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      803ff052
  14. 08 10月, 2012 1 次提交
  15. 26 9月, 2012 5 次提交
  16. 22 8月, 2012 1 次提交
    • S
      virtio-blk: hide VIRTIO_BLK_F_CONFIG_WCE from old machine types · ea776abc
      Stefan Hajnoczi 提交于
      QEMU has a policy of keeping a stable guest device ABI.  When new guest device
      features are introduced they must not change hardware info seen by existing
      guests.  This is important because operating systems or applications may
      "fingerprint" the hardware and refuse to run when the hardware changes.  To
      always get the latest guest device ABI, run with x86 machine type "pc".
      
      This patch hides the new VIRTIO_BLK_F_CONFIG_WCE virtio feature bit from
      existing machine types.  Only pc-1.2 and later will expose this feature
      by default.
      
      For more info on the VIRTIO_BLK_F_CONFIG_WCE feature bit, see:
      
        commit 13e3dce0
        Author: Paolo Bonzini <pbonzini@redhat.com>
        Date:   Thu Aug 9 16:07:19 2012 +0200
      
            virtio-blk: support VIRTIO_BLK_F_CONFIG_WCE
      
            Also rename VIRTIO_BLK_F_WCACHE to VIRTIO_BLK_F_WCE for consistency with
            the spec.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      
      Anthony Liguori <aliguori@us.ibm.com> reported:
      
        This broke qemu-test because it changed the pc-1.0 machine type:
      
        Setting guest RANDOM seed to 47167
        *** Running tests ***
        Running test /tests/finger-print.sh...		OK
        --- fingerprints/pc-1.0.x86_64	2011-12-18 13:08:40.000000000 -0600
        +++ fingerprint.txt	2012-08-12 13:30:48.000000000 -0500
        @@ -55,7 +55,7 @@
         /sys/bus/pci/devices/0000:00:06.0/subsystem_device=0x0002
         /sys/bus/pci/devices/0000:00:06.0/class=0x010000
         /sys/bus/pci/devices/0000:00:06.0/revision=0x00
        -/sys/bus/pci/devices/0000:00:06.0/virtio/host-features=0x710006d4
        +/sys/bus/pci/devices/0000:00:06.0/virtio/host-features=0x71000ed4
         /sys/class/dmi/id/bios_vendor=Bochs
         /sys/class/dmi/id/bios_date=01/01/2007
         /sys/class/dmi/id/bios_version=Bochs
        Guest fingerprint changed for pc-1.0!
      Reported-by: NAnthony Liguori <aliguori@us.ibm.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      ea776abc
  17. 20 8月, 2012 1 次提交
  18. 18 8月, 2012 1 次提交
    • S
      virtio-blk: hide VIRTIO_BLK_F_CONFIG_WCE from old machine types · eec7f96c
      Stefan Hajnoczi 提交于
      QEMU has a policy of keeping a stable guest device ABI.  When new guest device
      features are introduced they must not change hardware info seen by existing
      guests.  This is important because operating systems or applications may
      "fingerprint" the hardware and refuse to run when the hardware changes.  To
      always get the latest guest device ABI, run with x86 machine type "pc".
      
      This patch hides the new VIRTIO_BLK_F_CONFIG_WCE virtio feature bit from
      existing machine types.  Only pc-1.2 and later will expose this feature
      by default.
      
      For more info on the VIRTIO_BLK_F_CONFIG_WCE feature bit, see:
      
        commit 13e3dce0
        Author: Paolo Bonzini <pbonzini@redhat.com>
        Date:   Thu Aug 9 16:07:19 2012 +0200
      
            virtio-blk: support VIRTIO_BLK_F_CONFIG_WCE
      
            Also rename VIRTIO_BLK_F_WCACHE to VIRTIO_BLK_F_WCE for consistency with
            the spec.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      
      Anthony Liguori <aliguori@us.ibm.com> reported:
      
        This broke qemu-test because it changed the pc-1.0 machine type:
      
        Setting guest RANDOM seed to 47167
        *** Running tests ***
        Running test /tests/finger-print.sh...		OK
        --- fingerprints/pc-1.0.x86_64	2011-12-18 13:08:40.000000000 -0600
        +++ fingerprint.txt	2012-08-12 13:30:48.000000000 -0500
        @@ -55,7 +55,7 @@
         /sys/bus/pci/devices/0000:00:06.0/subsystem_device=0x0002
         /sys/bus/pci/devices/0000:00:06.0/class=0x010000
         /sys/bus/pci/devices/0000:00:06.0/revision=0x00
        -/sys/bus/pci/devices/0000:00:06.0/virtio/host-features=0x710006d4
        +/sys/bus/pci/devices/0000:00:06.0/virtio/host-features=0x71000ed4
         /sys/class/dmi/id/bios_vendor=Bochs
         /sys/class/dmi/id/bios_date=01/01/2007
         /sys/class/dmi/id/bios_version=Bochs
        Guest fingerprint changed for pc-1.0!
      Reported-by: NAnthony Liguori <aliguori@us.ibm.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      eec7f96c
  19. 22 6月, 2012 2 次提交
  20. 20 6月, 2012 2 次提交
    • C
      Allow machines to configure the QEMU_VERSION that's exposed via hardware · 93bfef4c
      Crístian Viana 提交于
      QEMU exposes its version to the guest's hardware and in some cases that is wrong
      (e.g. Windows prints messages about driver updates when you switch
      the QEMU version).
      There is a new field now on the struct QEmuMachine, hw_version, which may
      contain the version that the specific machine should report. If that field is
      set, then that machine will report that version to the guest.
      Signed-off-by: NCrístian Viana <vianac@linux.vnet.ibm.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      93bfef4c
    • G
      Add PIIX4 properties to control PM system states. · 459ae5ea
      Gleb Natapov 提交于
      This patch adds two things. First it allows QEMU to distinguish between
      regular powerdown and S4 powerdown. Later separate QMP notification will
      be added for S4 powerdown. Second it allows S3/S4 states to be disabled
      from QEMU command line. Some guests known to be broken with regards to
      power management, but allow to use it anyway. Using new properties
      management will be able to disable S3/S4 for such guests.
      
      Supported system state are passed to a firmware using new fw_cfg file.
      The file contains  6 byte array. Each byte represents one system
      state. If byte at offset X has its MSB set it means that system state
      X is supported and to enter it guest should use the value from lowest 3
      bits.
      Signed-off-by: NGleb Natapov <gleb@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      459ae5ea
  21. 18 6月, 2012 1 次提交
    • P
      qdev: Move bus properties to abstract superclasses · bce54474
      Paolo Bonzini 提交于
      In qdev, each bus in practice identified an abstract superclass, but
      this was mostly hidden.  In QOM, instead, these abstract classes are
      explicit so we can move bus properties there.
      
      All bus property walks are removed, and all device property walks
      are changed to look along the class hierarchy instead.
      
      We would have duplicates if class A defines some properties and its
      subclass B does not define any, because class_b->props will be
      left equal to class_a->props.
      
      The solution here is to reintroduce the class_base_init TypeInfo
      callback, that was present in one of the early QOM versions but
      removed (on my request...) before committing.
      
      This breaks global bus properties, an obscure feature when used
      with the command-line which is actually useful and used when used by
      backwards-compatible machine types.  So this patch also adjusts the
      global bus properties in hw/pc_piix.c to refer to the abstract class.
      
      Globals and other properties must be modified in the same patch to
      avoid complications related to initialization ordering.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      bce54474
  22. 22 5月, 2012 2 次提交
  23. 14 5月, 2012 1 次提交
  24. 17 4月, 2012 1 次提交
    • G
      usb/vmstate: add parent dev path · eeb0cf9a
      Gerd Hoffmann 提交于
      ... to make vmstate id string truely unique with multiple host
      controllers, i.e. move from "1/usb-ptr" to "0000:00:01.3/1/usb-ptr"
      (usb tabled connected to piix3 uhci).
      
      This obviously breaks migration.  To handle this the usb bus
      property "full-path" is added.  When setting this to false old
      behavior is maintained.  This way current qemu will be compatible
      with old versions when started using '-M pc-$oldversion'.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      eeb0cf9a
  25. 16 4月, 2012 1 次提交