1. 09 4月, 2018 2 次提交
  2. 03 4月, 2018 1 次提交
  3. 23 3月, 2018 1 次提交
  4. 14 3月, 2018 1 次提交
  5. 09 3月, 2018 1 次提交
  6. 08 3月, 2018 7 次提交
    • C
      s390x/sclp: clean up sclp masks · 1ffed98f
      Claudio Imbrenda 提交于
      Introduce an sccb_mask_t to be used for SCLP event masks instead of just
      unsigned int or uint32_t. This will allow later to extend the mask with
      more ease.
      Signed-off-by: NClaudio Imbrenda <imbrenda@linux.vnet.ibm.com>
      Message-Id: <1519407778-23095-3-git-send-email-imbrenda@linux.vnet.ibm.com>
      Reviewed-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: NCornelia Huck <cohuck@redhat.com>
      1ffed98f
    • C
      s390x/sclp: proper support of larger send and receive masks · bc61c8c6
      Claudio Imbrenda 提交于
      Until 67915de9 ("s390x/event-facility: variable-length event masks")
      we only supported sclp event masks with a size of exactly 4 bytes, even
      though the architecture allows the guests to set up sclp event masks
      from 1 to 1021 bytes in length.
      After that patch, the behaviour was almost compliant, but some issues
      were still remaining, in particular regarding the handling of selective
      reads and migration.
      
      When setting the sclp event mask, a mask size is also specified. Until
      now we only considered the size in order to decide which bits to save
      in the internal state. On the other hand, when a guest performs a
      selective read, it sends a mask, but it does not specify a size; the
      implied size is the size of the last mask that has been set.
      
      Specifying bits in the mask of selective read that are not available in
      the internal mask should return an error, and bits past the end of the
      mask should obviously be ignored. This can only be achieved by keeping
      track of the lenght of the mask.
      
      The mask length is thus now part of the internal state that needs to be
      migrated.
      
      This patch fixes the handling of selective reads, whose size will now
      match the length of the event mask, as per architecture.
      
      While the default behaviour is to be compliant with the architecture,
      when using older machine models the old broken behaviour is selected
      (allowing only masks of size exactly 4), in order to be able to migrate
      toward older versions.
      
      Fixes: 67915de9 ("s390x/event-facility: variable-length event masks")
      Signed-off-by: NClaudio Imbrenda <imbrenda@linux.vnet.ibm.com>
      Message-Id: <1519407778-23095-2-git-send-email-imbrenda@linux.vnet.ibm.com>
      Reviewed-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: NCornelia Huck <cohuck@redhat.com>
      bc61c8c6
    • N
      s390x/sclpconsole: Remove dead code - remove exit handlers · 2231384e
      Nia Alarie 提交于
      The other event handlers (quiesce and cpu) do not define these
      handlers, and this one does nothing, so it can be removed.
      Signed-off-by: NNia Alarie <nia.alarie@gmail.com>
      Reviewed-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Message-Id: <20180306100721.19419-1-nia.alarie@gmail.com>
      Signed-off-by: NCornelia Huck <cohuck@redhat.com>
      2231384e
    • D
      numa: we don't implement NUMA for s390x · 81ce6aa5
      David Hildenbrand 提交于
      Right now it is possible to crash QEMU for s390x by providing e.g.
          -numa node,nodeid=0,cpus=0-1
      
      Problem is, that numa.c uses mc->cpu_index_to_instance_props as an
      indicator whether NUMA is supported by a machine type. We don't
      implement NUMA for s390x ("topology") yet. However we need
      mc->cpu_index_to_instance_props for query-cpus.
      
      So let's fix this case by also checking for mc->get_default_cpu_node_id,
      which will be needed by machine_set_cpu_numa_node().
      
      qemu-system-s390x: -numa node,nodeid=0,cpus=0-1: NUMA is not supported by
                         this machine-type
      
      While at it, make s390_cpu_index_to_props() look like on other
      architectures.
      Signed-off-by: NDavid Hildenbrand <david@redhat.com>
      Message-Id: <20180227110255.20999-1-david@redhat.com>
      Reviewed-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: NCornelia Huck <cohuck@redhat.com>
      81ce6aa5
    • T
      hw/s390x: Add the possibility to specify the netboot image on the command line · 3c4e9baa
      Thomas Huth 提交于
      The file name of the netboot binary is currently hard-coded to
      "s390-netboot.img", without a possibility for the user to select
      an alternative firmware image here. That's unfortunate, especially
      since the basics are already there: The filename is a property of
      the s390-ipl device. So we just have to add a check whether the user
      already provided the property and only set the default if the string
      is still empty. Now it is possible to select a different firmware
      image with "-global s390-ipl.netboot_fw=/path/to/s390-netboot.img".
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Message-Id: <1519731154-3127-1-git-send-email-thuth@redhat.com>
      Signed-off-by: NCornelia Huck <cohuck@redhat.com>
      3c4e9baa
    • C
      s390/ipl: only print boot menu error if -boot menu=on was specified · 56000869
      Collin L. Walling 提交于
      It is possible that certain QEMU configurations may not
      create an IPLB (such as when -kernel is provided). In
      this case, a misleading error message will be printed
      stating that the "boot menu is not supported for this
      device type".
      
      To amend this, only print this message iff boot menu=on
      was provided on the commandline. Otherwise, return silently.
      
      While we're at it, remove trailing periods from error
      messages.
      Signed-off-by: NCollin L. Walling <walling@linux.vnet.ibm.com>
      Message-Id: <1519760121-24594-1-git-send-email-walling@linux.vnet.ibm.com>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      Acked-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: NCornelia Huck <cohuck@redhat.com>
      56000869
    • T
      hw/s390x/ipl: Bail out if the network bootloader can not be found · c575fa67
      Thomas Huth 提交于
      If QEMU fails to load 's390-netboot.img', the guest firmware currently
      loops forever and just floods the console with "Network boot device
      detected" messages. The code in ipl.c apparently already tried to stop
      the VM with vm_stop() in this case, but this is in vain since the run
      state is later reset due to a call to vm_start() from vl.c again.
      To avoid the ugly firmware loop, let's simply exit QEMU directly instead
      since it just does not make sense to continue if the required firmware
      image can not be loaded. While we're at it, also add the file name of
      the netboot binary to the error message, so that the user has a better
      hint about what is missing.
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Message-Id: <1519725913-24852-1-git-send-email-thuth@redhat.com>
      Reviewed-by: NDavid Hildenbrand <david@redhat.com>
      Reviewed-by: NFarhan Ali <alifm@linux.vnet.ibm.com>
      Signed-off-by: NCornelia Huck <cohuck@redhat.com>
      c575fa67
  7. 06 3月, 2018 1 次提交
  8. 03 3月, 2018 1 次提交
    • M
      qapi: Empty out qapi-schema.json · 112ed241
      Markus Armbruster 提交于
      The previous commit improved compile time by including less of the
      generated QAPI headers.  This is impossible for stuff defined directly
      in qapi-schema.json, because that ends up in headers that that pull in
      everything.
      
      Move everything but include directives from qapi-schema.json to new
      sub-module qapi/misc.json, then include just the "misc" shard where
      possible.
      
      It's possible everywhere, except:
      
      * monitor.c needs qmp-command.h to get qmp_init_marshal()
      
      * monitor.c, ui/vnc.c and the generated qapi-event-FOO.c need
        qapi-event.h to get enum QAPIEvent
      
      Perhaps we'll get rid of those some other day.
      
      Adding a type to qapi/migration.json now recompiles some 120 instead
      of 2300 out of 5100 objects.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20180211093607.27351-25-armbru@redhat.com>
      [eblake: rebase to master]
      Signed-off-by: NEric Blake <eblake@redhat.com>
      112ed241
  9. 26 2月, 2018 7 次提交
    • D
      s390x/sclp: remove memory hotplug support · 82fab5c5
      David Hildenbrand 提交于
      From an architecture point of view, nothing can be mapped into the address
      space on s390x. All there is is memory. Therefore there is also not really
      an interface to communicate such information to the guest. All we can do is
      specify the maximum ram address and guests can probe in that range if
      memory is available and usable (TPROT).
      
      Also memory hotplug is strange. The guest can decide at some point in
      time to add / remove memory in some range. While the hypervisor can deny
      to online an increment, all increments have to be predefined and there is
      no way of telling the guest about a newly "hotplugged" increment. So if we
      specify right now e.g.
          -m 2G,slots=2,maxmem=20G
      An ordinary fedora guest will happily online (hotplug) all memory,
      resulting in a guest consuming 20G. So it really behaves rather like
          -m 22G
      There is no way to hotplug memory from the outside like on other
      architectures. This is of course bad for upper management layers.
      
      As the guest can create/delete memory regions while it is running, of
      course migration support is not available and tricky to implement.
      
      With virtualization, it is different. We might want to map something
      into guest address space (e.g. fake DAX devices) and not detect it
      automatically as memory. So we really want to use the maxmem and slots
      parameter just like on all other architectures. Such devices will have
      to expose the applicable memory range themselves. To finally be able to
      provide memory hotplug to guests, we will need a new paravirtualized
      interface to do that (e.g. something into the direction of virtio-mem).
      
      This implies, that maxmem cannot be used for s390x memory hotplug
      anymore and has to go. This simplifies the code quite a bit.
      
      As migration support is not working, this change cannot really break
      migration as guests without slots and maxmem don't see the SCLP
      features. Also, the ram size calculation does not change.
      Signed-off-by: NDavid Hildenbrand <david@redhat.com>
      Message-Id: <20180219174231.10874-1-david@redhat.com>
      Reviewed-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Acked-by: NMatthew Rosato <mjrosato@linux.vnet.ibm.com>
      [CH: tweaked patch description, as discussed on list]
      Signed-off-by: NCornelia Huck <cohuck@redhat.com>
      82fab5c5
    • V
      qmp: expose s390-specific CPU info · 9d0306df
      Viktor Mihajlovski 提交于
      Presently s390x is the only architecture not exposing specific
      CPU information via QMP query-cpus. Upstream discussion has shown
      that it could make sense to report the architecture specific CPU
      state, e.g. to detect that a CPU has been stopped.
      
      With this change the output of query-cpus will look like this on
      s390:
      
         [
           {"arch": "s390", "current": true,
            "props": {"core-id": 0}, "cpu-state": "operating", "CPU": 0,
            "qom_path": "/machine/unattached/device[0]",
            "halted": false, "thread_id": 63115},
           {"arch": "s390", "current": false,
            "props": {"core-id": 1}, "cpu-state": "stopped", "CPU": 1,
            "qom_path": "/machine/unattached/device[1]",
            "halted": true, "thread_id": 63116}
         ]
      
      This change doesn't add the s390-specific data to HMP 'info cpus'.
      A follow-on patch will remove all architecture specific information
      from there.
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      Reviewed-by: NDavid Hildenbrand <david@redhat.com>
      Reviewed-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1518797321-28356-2-git-send-email-mihajlov@linux.vnet.ibm.com>
      Reviewed-by: NCornelia Huck <cohuck@redhat.com>
      Signed-off-by: NCornelia Huck <cohuck@redhat.com>
      9d0306df
    • D
      s390/stattrib: Make SaveVMHandlers data static · 571729a0
      Dr. David Alan Gilbert 提交于
      There's no need for this to be dynamic, make it static.
      Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Message-Id: <20180212154903.8859-1-dgilbert@redhat.com>
      Reviewed-by: NDavid Hildenbrand <david@redhat.com>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      Reviewed-by: NClaudio Imbrenda <imbrenda@linux.vnet.ibm.com>
      Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
      Signed-off-by: NCornelia Huck <cohuck@redhat.com>
      571729a0
    • C
      s390-ccw: interactive boot menu for scsi · ffb4a1c8
      Collin L. Walling 提交于
      Interactive boot menu for scsi. This follows a similar procedure
      as the interactive menu for eckd dasd. An example follows:
      
          s390x Enumerated Boot Menu.
      
          3 entries detected. Select from index 0 to 2.
      Signed-off-by: NCollin L. Walling <walling@linux.vnet.ibm.com>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      [thuth: Added additional "break;" statement to avoid analyzer warnings]
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      ffb4a1c8
    • C
      s390-ccw: use zipl values when no boot menu options are present · 53b310ce
      Collin L. Walling 提交于
      If no boot menu options are present, then flag the boot menu to
      use the zipl options that were set in the zipl configuration file
      (and stored on disk by zipl). These options are found at some
      offset prior to the start of the zipl boot menu banner. The zipl
      timeout value is limited to a 16-bit unsigned integer and stored
      as seconds, so we take care to convert it to milliseconds in order
      to conform to the rest of the boot menu functionality. This is
      limited to CCW devices.
      
      For reference, the zipl configuration file uses the following
      fields in the menu section:
      
            prompt=1      enable the boot menu
            timeout=X     set the timeout to X seconds
      
      To explicitly disregard any boot menu options, then menu=off or
      <bootmenu enable='no' ... /> must be specified.
      Signed-off-by: NCollin L. Walling <walling@linux.vnet.ibm.com>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      53b310ce
    • C
      s390-ccw: parse and set boot menu options · 26b2a2a4
      Collin L. Walling 提交于
      Set boot menu options for an s390 guest and store them in
      the iplb. These options are set via the QEMU command line
      option:
      
          -boot menu=on|off[,splash-time=X]
      
      or via the libvirt domain xml:
      
          <os>
            <bootmenu enable='yes|no' timeout='X'/>
          </os>
      
      Where X represents some positive integer representing
      milliseconds.
      
      Any value set for loadparm will override all boot menu options.
      If loadparm=PROMPT, then the menu will be enabled without a
      timeout.
      Signed-off-by: NCollin L. Walling <walling@linux.vnet.ibm.com>
      Reviewed-by: NJanosch Frank <frankja@linux.vnet.ibm.com>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      26b2a2a4
    • C
      s390-ccw: move auxiliary IPL data to separate location · 118ee80f
      Collin L. Walling 提交于
      The s390-ccw firmware needs some information in support of the
      boot process which is not available on the native machine.
      Examples are the netboot firmware load address and now the
      boot menu parameters.
      
      While storing that data in unused fields of the IPL parameter block
      works, that approach could create problems if the parameter block
      definition should change in the future. Because then a guest could
      overwrite these fields using the set IPLB diagnose.
      
      In fact the data in question is of more global nature and not really
      tied to an IPL device, so separating it is rather logical.
      
      This commit introduces a new structure to hold firmware relevant
      IPL parameters set by QEMU. The data is stored at location 204 (dec)
      and can contain up to 7 32-bit words. This area is available to
      programming in the z/Architecture Principles of Operation and
      can thus safely be used by the firmware until the IPL has completed.
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      Signed-off-by: NCollin L. Walling <walling@linux.vnet.ibm.com>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      Acked-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      [thuth: fixed "4 + 8 * n" comment]
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      118ee80f
  10. 09 2月, 2018 12 次提交
  11. 22 1月, 2018 4 次提交
  12. 19 1月, 2018 1 次提交
    • I
      possible_cpus: add CPUArchId::type field · d342eb76
      Igor Mammedov 提交于
      Remove dependency of possible_cpus on 1st CPU instance,
      which decouples configuration data from CPU instances that
      are created using that data.
      
      Also later it would be used for enabling early cpu to numa node
      configuration at runtime qmp_query_hotpluggable_cpus() should
      provide a list of available cpu slots at early stage,
      before machine_init() is called and the 1st cpu is created,
      so that mgmt might be able to call it and use output to set
      numa mapping.
      
      Use MachineClass::possible_cpu_arch_ids() callback to set
      cpu type info, along with the rest of possible cpu properties,
      to let machine define which cpu type* will be used.
      
      * for SPAPR it will be a spapr core type and for ARM/s390x/x86
        a respective descendant of CPUClass.
      
      Move parse_numa_opts() in vl.c after cpu_model is parsed into
      cpu_type so that possible_cpu_arch_ids() would know which
      cpu_type to use during layout initialization.
      Signed-off-by: NIgor Mammedov <imammedo@redhat.com>
      Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Message-Id: <1515597770-268979-1-git-send-email-imammedo@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      d342eb76
  13. 18 12月, 2017 1 次提交