1. 07 5月, 2014 1 次提交
  2. 05 5月, 2014 5 次提交
  3. 18 4月, 2014 3 次提交
  4. 08 4月, 2014 1 次提交
    • A
      PPC: Clean up DECR implementation · e81a982a
      Alexander Graf 提交于
      There are 3 different variants of the decrementor for BookE and BookS.
      
      The BookE variant sets TSR[DIS] to 1 when the DEC value becomes 1 or 0. TSR[DIS]
      is then the indicator whether the decrementor interrupt line is asserted or not.
      
      The old BookS variant treats DEC as an edge interrupt that gets triggered when
      the DEC value's top bit turns 1 from 0.
      
      The new BookS variant maintains the assertion bit inside DEC itself. Whenever
      the DEC value becomes negative (top bit set) the DEC interrupt line is asserted.
      
      So far we implemented mostly the old BookS variant. Let's do them all properly.
      
      This fixes booting pseries ppc64 guest images in TCG mode for me.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      e81a982a
  5. 07 4月, 2014 1 次提交
  6. 20 3月, 2014 4 次提交
  7. 18 3月, 2014 1 次提交
  8. 14 3月, 2014 1 次提交
  9. 13 3月, 2014 10 次提交
  10. 11 3月, 2014 2 次提交
  11. 10 3月, 2014 1 次提交
  12. 05 3月, 2014 4 次提交
    • A
      qdev: Keep global allocation counter per bus · 61de3676
      Alexander Graf 提交于
      When we have 2 separate qdev devices that both create a qbus of the
      same type without specifying a bus name or device name, we end up
      with two buses of the same name, such as ide.0 on the Mac machines:
      
        dev: macio-ide, id ""
          bus: ide.0
            type IDE
        dev: macio-ide, id ""
          bus: ide.0
            type IDE
      
      If we now spawn a device that connects to a ide.0 the last created
      bus gets the device, with the first created bus inaccessible to the
      command line.
      
      After some discussion on IRC we concluded that the best quick fix way
      forward for this is to make automated bus-class type based allocation
      count a global counter. That's what this patch implements. With this
      we instead get
      
        dev: macio-ide, id ""
          bus: ide.1
            type IDE
        dev: macio-ide, id ""
          bus: ide.0
            type IDE
      
      on the example mentioned above.
      
      This also means that if you did -device ...,bus=ide.0 you got a device
      on the first bus (the last created one) before this patch and get that
      device on the second one (the first created one) now.  Breaks
      migration unless you change bus=ide.0 to bus=ide.1 on the destination.
      
      This is intended and makes the bus enumeration work as expected.
      
      As per review request follows a list of otherwise affected boards and
      the reasoning for the conclusion that they are ok:
      
         target      machine         bus id              times
         ------      -------         ------              -----
      
         aarch64     n800            i2c-bus.0           2
         aarch64     n810            i2c-bus.0           2
         arm         n800            i2c-bus.0           2
         arm         n810            i2c-bus.0           2
      
      -> Devices are only created explicitly on one of the two buses, using
         s->mpu->i2c[0], so no change to the guest.
      
         aarch64     vexpress-a15    virtio-mmio-bus.0   4
         aarch64     vexpress-a9     virtio-mmio-bus.0   4
         aarch64     virt            virtio-mmio-bus.0   32
         arm         vexpress-a15    virtio-mmio-bus.0   4
         arm         vexpress-a9     virtio-mmio-bus.0   4
         arm         virt            virtio-mmio-bus.0   32
      
      -> Makes -device bus= work for all virtio-mmio buses.  Breaks
         migration.  Workaround for migration from old to new: specify
         virtio-mmio-bus.4 or .32 respectively rather than .0 on the
         destination.
      
         aarch64     xilinx-zynq-a9  usb-bus.0           2
         arm         xilinx-zynq-a9  usb-bus.0           2
         mips64el    fulong2e        usb-bus.0           2
      
      -> Normal USB operation not affected. Migration driver needs command
         line to use the other bus.
      
         i386        isapc           ide.0               2
         x86_64      isapc           ide.0               2
         mips        mips            ide.0               2
         mips64      mips            ide.0               2
         mips64el    mips            ide.0               2
         mipsel      mips            ide.0               2
         ppc         g3beige         ide.0               2
         ppc         mac99           ide.0               2
         ppc         prep            ide.0               2
         ppc64       g3beige         ide.0               2
         ppc64       mac99           ide.0               2
         ppc64       prep            ide.0               2
      
      -> Makes -device bus= work for all IDE buses.  Breaks migration.
         Workaround for migration from old to new: specify ide.1 rather than
         ide.0 on the destination.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NAndreas Faerber <afaerber@suse.de>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      61de3676
    • A
      elf-loader: add more return codes · 18674b26
      Alexey Kardashevskiy 提交于
      The existing load_elf() just returns -1 if it fails to load ELF. However
      it could be smarter than this and tell more about the failure such as
      wrong endianness or incompatible platform.
      
      This adds additional return codes for wrong architecture, wrong
      endianness and if the image is not ELF at all.
      
      This adds a load_elf_strerror() helper to convert return codes into
      string messages.
      
      This fixes handling of what load_elf() returns for s390x, other
      callers just check the return value for <0 and this remains unchanged.
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      18674b26
    • A
      kvm: Add a new machine option kvm-type · 135a129a
      Aneesh Kumar K.V 提交于
      Targets like ppc64 support different types of KVM, one which use
      hypervisor mode and the other which doesn't. Add a new machine
      option kvm-type that helps in selecting the respective ones
      We also add a new QEMUMachine callback get_vm_type that helps
      in mapping the string representation of kvm type specified.
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      [agraf: spelling fixes, use error_report(), use qemumachine.h]
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      135a129a
    • A
      KVM: Split QEMUMachine typedef into separate header · 9c06a1f7
      Alexander Graf 提交于
      Older gcc versions (such as the one in SLES11) get confused when you declare
      a typedef on the same struct twice.
      
      To work around that limitation, let's extract the QEMUMachine typedef into a
      separate header file that is guarded by preprocessor duplicate include checks.
      
      This fixes the following type of compile errors for me:
      
        In file included from vl.c:125:
        include/hw/xen/xen.h:39: error: redefinition of typedef "QEMUMachine"
        include/sysemu/kvm.h:155: error: previous declaration of "QEMUMachine" was here
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      9c06a1f7
  13. 27 2月, 2014 4 次提交
    • M
      sun4m: Set HostID in NVRAM · f9681f11
      Mark Cave-Ayland 提交于
      On SparcStations, the HostID field in the NVRAM is equal to the last
      three bytes of the MAC address (which is also stored in the NVRAM).
      
      This constant is used as an identification/serial number on Solaris.
      Signed-off-by: NOlivier Danet <odanet@caramail.com>
      Signed-off-by: NMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      f9681f11
    • H
      s390x/event-facility: code restructure · 477a72a1
      Heinz Graalfs 提交于
      Code restructure in order to simplify class hierarchy
        - remove S390SCLPDevice abstract base class
          and move function pointers into new SCLPEventFacilityClass
        - implement SCLPEventFacility as SysBusDevice
        - use define constants for instance creation strings
      
      The following ascii-art shows the class structure wrt the SCLP EventFacility
      before (CURRENT) and after the restructure (NEW):
      
      ----
      CURRENT:
      
         "s390-sclp-events-bus"
         +-------------------------+
         |      SCLPEventsBus      |
         |-------------------------|
         |BusState qbus            |
         +-------------------------+
      
         +-------------------------+
         |   SCLPEventFacility     |  - to be replaced by new SCLPEventFacility,
         |-------------------------|    which will be a SysBusDevice
         |SCLPEventsBus sbus       |
         |DeviceState *qdev        |
         |unsigned int receive_mask|
         +-------------------------+
      
         +-------------------------+
         |   S390SCLPDeviceClass   |  - to be replaced by new SCLPEventFacilityClass
         |-------------------------|
         |DeviceClass qdev         |
         |*(init)()                |
         +-------------------------+
      
         "s390-sclp-event-facility"
                   |
               instance-of
                   |
                   V
         "s390-sclp-device"           - this is an abstract class
         +-------------------------+
         |     S390SCLPDevice   (A)|  - to be replaced by new SCLPEventFacility
         |-------------------------|
         |SysBusDevice busdev      |
         |SCLPEventFacility *ef    |
         |                         |
         |*(sclp_command_handler)()|  - these 2 go to new SCLPEventFacilityClass
         |*(event_pending)()       |
         +-------------------------+
      
      ----
      NEW:
      
         "s390-sclp-events-bus"
         +-------------------------+
         |      SCLPEventsBus      |
         |-------------------------|
         |BusState qbus            |
         +-------------------------+
      
         +-------------------------+
         | SCLPEventFacilityClass  |
         |-------------------------|
         |DeviceClass parent_class |
         |                         |
         |*(init)()                |
         |*(command_handler)()     |
         |*(event_pending)()       |
         +-------------------------+
      
         "s390-sclp-event-facility"
         +-------------------------+
         |   SCLPEventFacility     |
         |-------------------------|
         |SysBusDevice parent_class|
         |SCLPEventsBus sbus       |
         |unsigned int receive_mask|
         +-------------------------+
      Signed-off-by: NHeinz Graalfs <graalfs@linux.vnet.ibm.com>
      Reviewed-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      477a72a1
    • J
      s390x/kvm: implement floating-interrupt controller device · 3a553fc6
      Jens Freimann 提交于
      This patch implements a floating-interrupt controller device (flic)
      which interacts with the s390 flic kvm_device.
      Signed-off-by: NJens Freimann <jfrei@linux.vnet.ibm.com>
      Reviewed-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      3a553fc6
    • C
      arm: vgic device control api support · 1da41cc1
      Christoffer Dall 提交于
      Support creating the ARM vgic device through the device control API and
      setting the base address for the distributor and cpu interfaces in KVM
      VMs using this API.
      
      Because the older KVM_CREATE_IRQCHIP interface needs the irq chip to be
      created prior to creating the VCPUs, we first test if we can use the
      device control API in kvm_arch_irqchip_create (using the test flag from
      the device control API).  If we cannot, it means we have to fall back to
      KVM_CREATE_IRQCHIP and use the older ioctl at this point in time.  If
      however, we can use the device control API, we don't do anything and
      wait until the arm_gic_kvm driver initializes and let that use the
      device control API.
      Signed-off-by: NChristoffer Dall <christoffer.dall@linaro.org>
      Message-id: 1392687720-26806-5-git-send-email-christoffer.dall@linaro.org
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      1da41cc1
  14. 26 2月, 2014 2 次提交