1. 28 7月, 2020 1 次提交
  2. 15 7月, 2020 1 次提交
  3. 10 7月, 2020 2 次提交
    • M
      error: Reduce unnecessary error propagation · a5f9b9df
      Markus Armbruster 提交于
      When all we do with an Error we receive into a local variable is
      propagating to somewhere else, we can just as well receive it there
      right away, even when we need to keep error_propagate() for other
      error paths.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20200707160613.848843-38-armbru@redhat.com>
      a5f9b9df
    • M
      qemu-option: Use returned bool to check for failure · 235e59cf
      Markus Armbruster 提交于
      The previous commit enables conversion of
      
          foo(..., &err);
          if (err) {
              ...
          }
      
      to
      
          if (!foo(..., &err)) {
              ...
          }
      
      for QemuOpts functions that now return true / false on success /
      error.  Coccinelle script:
      
          @@
          identifier fun = {
              opts_do_parse, parse_option_bool, parse_option_number,
              parse_option_size, qemu_opt_parse, qemu_opt_rename, qemu_opt_set,
              qemu_opt_set_bool, qemu_opt_set_number, qemu_opts_absorb_qdict,
              qemu_opts_do_parse, qemu_opts_from_qdict_entry, qemu_opts_set,
              qemu_opts_validate
          };
          expression list args, args2;
          typedef Error;
          Error *err;
          @@
          -    fun(args, &err, args2);
          -    if (err)
          +    if (!fun(args, &err, args2))
               {
                   ...
               }
      
      A few line breaks tidied up manually.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Message-Id: <20200707160613.848843-15-armbru@redhat.com>
      [Conflict with commit 0b6786a9 "block/amend: refactor qcow2 amend
      options" resolved by rerunning Coccinelle on master's version]
      235e59cf
  4. 07 7月, 2020 1 次提交
  5. 02 7月, 2020 1 次提交
  6. 18 6月, 2020 5 次提交
  7. 15 5月, 2020 3 次提交
    • M
      qdev: Unrealize must not fail · b69c3c21
      Markus Armbruster 提交于
      Devices may have component devices and buses.
      
      Device realization may fail.  Realization is recursive: a device's
      realize() method realizes its components, and device_set_realized()
      realizes its buses (which should in turn realize the devices on that
      bus, except bus_set_realized() doesn't implement that, yet).
      
      When realization of a component or bus fails, we need to roll back:
      unrealize everything we realized so far.  If any of these unrealizes
      failed, the device would be left in an inconsistent state.  Must not
      happen.
      
      device_set_realized() lets it happen: it ignores errors in the roll
      back code starting at label child_realize_fail.
      
      Since realization is recursive, unrealization must be recursive, too.
      But how could a partly failed unrealize be rolled back?  We'd have to
      re-realize, which can fail.  This design is fundamentally broken.
      
      device_set_realized() does not roll back at all.  Instead, it keeps
      unrealizing, ignoring further errors.
      
      It can screw up even for a device with no buses: if the lone
      dc->unrealize() fails, it still unregisters vmstate, and calls
      listeners' unrealize() callback.
      
      bus_set_realized() does not roll back either.  Instead, it stops
      unrealizing.
      
      Fortunately, no unrealize method can fail, as we'll see below.
      
      To fix the design error, drop parameter @errp from all the unrealize
      methods.
      
      Any unrealize method that uses @errp now needs an update.  This leads
      us to unrealize() methods that can fail.  Merely passing it to another
      unrealize method cannot cause failure, though.  Here are the ones that
      do other things with @errp:
      
      * virtio_serial_device_unrealize()
      
        Fails when qbus_set_hotplug_handler() fails, but still does all the
        other work.  On failure, the device would stay realized with its
        resources completely gone.  Oops.  Can't happen, because
        qbus_set_hotplug_handler() can't actually fail here.  Pass
        &error_abort to qbus_set_hotplug_handler() instead.
      
      * hw/ppc/spapr_drc.c's unrealize()
      
        Fails when object_property_del() fails, but all the other work is
        already done.  On failure, the device would stay realized with its
        vmstate registration gone.  Oops.  Can't happen, because
        object_property_del() can't actually fail here.  Pass &error_abort
        to object_property_del() instead.
      
      * spapr_phb_unrealize()
      
        Fails and bails out when remove_drcs() fails, but other work is
        already done.  On failure, the device would stay realized with some
        of its resources gone.  Oops.  remove_drcs() fails only when
        chassis_from_bus()'s object_property_get_uint() fails, and it can't
        here.  Pass &error_abort to remove_drcs() instead.
      
      Therefore, no unrealize method can fail before this patch.
      
      device_set_realized()'s recursive unrealization via bus uses
      object_property_set_bool().  Can't drop @errp there, so pass
      &error_abort.
      
      We similarly unrealize with object_property_set_bool() elsewhere,
      always ignoring errors.  Pass &error_abort instead.
      
      Several unrealize methods no longer handle errors from other unrealize
      methods: virtio_9p_device_unrealize(),
      virtio_input_device_unrealize(), scsi_qdev_unrealize(), ...
      Much of the deleted error handling looks wrong anyway.
      
      One unrealize methods no longer ignore such errors:
      usb_ehci_pci_exit().
      
      Several realize methods no longer ignore errors when rolling back:
      v9fs_device_realize_common(), pci_qdev_unrealize(),
      spapr_phb_realize(), usb_qdev_realize(), vfio_ccw_realize(),
      virtio_device_realize().
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-Id: <20200505152926.18877-17-armbru@redhat.com>
      b69c3c21
    • M
      Drop more @errp parameters after previous commit · 40c2281c
      Markus Armbruster 提交于
      Several functions can't fail anymore: ich9_pm_add_properties(),
      device_add_bootindex_property(), ppc_compat_add_property(),
      spapr_caps_add_properties(), PropertyInfo.create().  Drop their @errp
      parameter.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-Id: <20200505152926.18877-16-armbru@redhat.com>
      40c2281c
    • M
      qom: Clean up inconsistent use of gchar * vs. char * · ddfb0baa
      Markus Armbruster 提交于
      Uses of gchar * in qom/object.h:
      
      * ObjectProperty member @name
      
        Functions that take a property name argument all use char *.  Change
        the member to match.
      
      * ObjectProperty member @type
      
        Functions that take a property type argument or return it all use
        char *.  Change the member to match.
      
      * ObjectProperty member @description
      
        Functions that take a property description argument all use char *.
        Change the member to match.
      
      * object_resolve_path_component() parameter @part
      
        Path components are property names.  Most callers pass char *
        arguments.  Change the parameter to match.  Adjust the few callers
        that pass gchar * to pass char *.
      
      * Return value of object_get_canonical_path_component(),
        object_get_canonical_path()
      
        Most callers convert their return values right back to char *.
        Change the return value to match.  Adjust the few callers where that
        would add a conversion to gchar * to use char * instead.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-Id: <20200505152926.18877-3-armbru@redhat.com>
      ddfb0baa
  8. 29 4月, 2020 2 次提交
    • M
      virtio-net: Fix duplex=... and speed=... error handling · 843c4cfc
      Markus Armbruster 提交于
      virtio_net_device_realize() rejects invalid duplex and speed values.
      The error handling is broken:
      
          $ ../qemu/bld-sani/x86_64-softmmu/qemu-system-x86_64 -S -display none -monitor stdio
          QEMU 4.2.93 monitor - type 'help' for more information
          (qemu) device_add virtio-net,duplex=x
          Error: 'duplex' must be 'half' or 'full'
          (qemu) c
          =================================================================
          ==15654==ERROR: AddressSanitizer: heap-use-after-free on address 0x62e000014590 at pc 0x560b75c8dc13 bp 0x7fffdf1a6950 sp 0x7fffdf1a6940
          READ of size 8 at 0x62e000014590 thread T0
      	#0 0x560b75c8dc12 in object_dynamic_cast_assert /work/armbru/qemu/qom/object.c:826
      	#1 0x560b74c38ac0 in virtio_vmstate_change /work/armbru/qemu/hw/virtio/virtio.c:3210
      	#2 0x560b74d9765e in vm_state_notify /work/armbru/qemu/softmmu/vl.c:1271
      	#3 0x560b7494ba72 in vm_prepare_start /work/armbru/qemu/cpus.c:2156
      	#4 0x560b7494bacd in vm_start /work/armbru/qemu/cpus.c:2162
      	#5 0x560b75a7d890 in qmp_cont /work/armbru/qemu/monitor/qmp-cmds.c:160
      	#6 0x560b75a8d70a in hmp_cont /work/armbru/qemu/monitor/hmp-cmds.c:1043
      	#7 0x560b75a799f2 in handle_hmp_command /work/armbru/qemu/monitor/hmp.c:1082
          [...]
      
          0x62e000014590 is located 33168 bytes inside of 42288-byte region [0x62e00000c400,0x62e000016930)
          freed by thread T1 here:
      	#0 0x7feadd39491f in __interceptor_free (/lib64/libasan.so.5+0x10d91f)
      	#1 0x7feadcebcd7c in g_free (/lib64/libglib-2.0.so.0+0x55d7c)
      	#2 0x560b75c8fd40 in object_unref /work/armbru/qemu/qom/object.c:1128
      	#3 0x560b7498a625 in memory_region_unref /work/armbru/qemu/memory.c:1762
      	#4 0x560b74999fa4 in do_address_space_destroy /work/armbru/qemu/memory.c:2788
      	#5 0x560b762362fc in call_rcu_thread /work/armbru/qemu/util/rcu.c:283
      	#6 0x560b761c8884 in qemu_thread_start /work/armbru/qemu/util/qemu-thread-posix.c:519
      	#7 0x7fead9be34bf in start_thread (/lib64/libpthread.so.0+0x84bf)
      
          previously allocated by thread T0 here:
      	#0 0x7feadd394d18 in __interceptor_malloc (/lib64/libasan.so.5+0x10dd18)
      	#1 0x7feadcebcc88 in g_malloc (/lib64/libglib-2.0.so.0+0x55c88)
      	#2 0x560b75c8cf8a in object_new /work/armbru/qemu/qom/object.c:699
      	#3 0x560b75010ad9 in qdev_device_add /work/armbru/qemu/qdev-monitor.c:654
      	#4 0x560b750120c2 in qmp_device_add /work/armbru/qemu/qdev-monitor.c:805
      	#5 0x560b75012c1b in hmp_device_add /work/armbru/qemu/qdev-monitor.c:905
          [...]
          ==15654==ABORTING
      
      Cause: virtio_net_device_realize() neglects to bail out after setting
      the error.  Fix that.
      
      Fixes: 9473939e
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Jason Wang <jasowang@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Message-Id: <20200422130719.28225-9-armbru@redhat.com>
      Acked-by: NMichael S. Tsirkin <mst@redhat.com>
      843c4cfc
    • P
      various: Remove suspicious '\' character outside of #define in C code · 78ee6bd0
      Philippe Mathieu-Daudé 提交于
      Fixes the following coccinelle warnings:
      
        $ spatch --sp-file --verbose-parsing  ... \
            scripts/coccinelle/remove_local_err.cocci
        ...
        SUSPICIOUS: a \ character appears outside of a #define at ./target/ppc/translate_init.inc.c:5213
        SUSPICIOUS: a \ character appears outside of a #define at ./target/ppc/translate_init.inc.c:5261
        SUSPICIOUS: a \ character appears outside of a #define at ./target/microblaze/cpu.c:166
        SUSPICIOUS: a \ character appears outside of a #define at ./target/microblaze/cpu.c:167
        SUSPICIOUS: a \ character appears outside of a #define at ./target/microblaze/cpu.c:169
        SUSPICIOUS: a \ character appears outside of a #define at ./target/microblaze/cpu.c:170
        SUSPICIOUS: a \ character appears outside of a #define at ./target/microblaze/cpu.c:171
        SUSPICIOUS: a \ character appears outside of a #define at ./target/microblaze/cpu.c:172
        SUSPICIOUS: a \ character appears outside of a #define at ./target/microblaze/cpu.c:173
        SUSPICIOUS: a \ character appears outside of a #define at ./target/i386/cpu.c:5787
        SUSPICIOUS: a \ character appears outside of a #define at ./target/i386/cpu.c:5789
        SUSPICIOUS: a \ character appears outside of a #define at ./target/i386/cpu.c:5800
        SUSPICIOUS: a \ character appears outside of a #define at ./target/i386/cpu.c:5801
        SUSPICIOUS: a \ character appears outside of a #define at ./target/i386/cpu.c:5802
        SUSPICIOUS: a \ character appears outside of a #define at ./target/i386/cpu.c:5804
        SUSPICIOUS: a \ character appears outside of a #define at ./target/i386/cpu.c:5805
        SUSPICIOUS: a \ character appears outside of a #define at ./target/i386/cpu.c:5806
        SUSPICIOUS: a \ character appears outside of a #define at ./target/i386/cpu.c:6329
        SUSPICIOUS: a \ character appears outside of a #define at ./hw/sd/sdhci.c:1133
        SUSPICIOUS: a \ character appears outside of a #define at ./hw/scsi/scsi-disk.c:3081
        SUSPICIOUS: a \ character appears outside of a #define at ./hw/net/virtio-net.c:1529
        SUSPICIOUS: a \ character appears outside of a #define at ./hw/riscv/sifive_u.c:468
        SUSPICIOUS: a \ character appears outside of a #define at ./dump/dump.c:1895
        SUSPICIOUS: a \ character appears outside of a #define at ./block/vhdx.c:2209
        SUSPICIOUS: a \ character appears outside of a #define at ./block/vhdx.c:2215
        SUSPICIOUS: a \ character appears outside of a #define at ./block/vhdx.c:2221
        SUSPICIOUS: a \ character appears outside of a #define at ./block/vhdx.c:2222
        SUSPICIOUS: a \ character appears outside of a #define at ./block/replication.c:172
        SUSPICIOUS: a \ character appears outside of a #define at ./block/replication.c:173
      Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-Id: <20200412223619.11284-2-f4bug@amsat.org>
      Reviewed-by: NAlistair Francis <alistair.francis@wdc.com>
      Acked-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      78ee6bd0
  9. 28 4月, 2020 1 次提交
  10. 31 3月, 2020 1 次提交
  11. 25 1月, 2020 1 次提交
  12. 07 1月, 2020 1 次提交
  13. 06 1月, 2020 1 次提交
  14. 02 12月, 2019 2 次提交
    • M
      net/virtio: Fix failover error handling crash bugs · 5a0948d3
      Markus Armbruster 提交于
      Functions that take an Error ** parameter to pass an error to the
      caller expect the parameter to point to null.
      failover_replug_primary() violates this precondition in several
      places:
      
      * After qemu_opts_from_qdict() failed, *errp is no longer null.
        Passing it to error_setg() is wrong, and will trip the assertion in
        error_setv().  Messed up in commit 150ab54a "net/virtio: fix
        re-plugging of primary device".  Simply drop the error_setg().
      
      * Passing @errp to qemu_opt_set_bool(), hotplug_handler_pre_plug(),
        and hotplug_handler_plug() is wrong.  If one of the first two fails,
        *errp is no longer null.  Risks tripping the same assertion.
        Moreover, continuing after such errors is unsafe.  Messed up in
        commit 9711cd0d "net/virtio: add failover support".  Fix by
        handling each error properly.
      
      failover_replug_primary() crashes when passed a null @errp.  Also
      messed up in commit 9711cd0d.  This bug can't bite as no caller
      actually passes null.  Fix it anyway.
      
      Fixes: 9711cd0d
      Fixes: 150ab54a
      Cc: Jens Freimann <jfreimann@redhat.com>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20191130194240.10517-3-armbru@redhat.com>
      Reviewed-by: NJens Freimann <jfreimann@redhat.com>
      5a0948d3
    • M
      net/virtio: Drop useless n->primary_dev not null checks · 4dbac1ae
      Markus Armbruster 提交于
      virtio_net_handle_migration_primary() returns early when it can't
      ensure n->primary_dev is non-null.  Checking it again right after that
      early return is redundant.  Drop.
      
      If n->primary_dev is null on entering failover_replug_primary(), @pdev
      will become null, and pdev->partially_hotplugged will crash.  Checking
      n->primary_dev later is useless.  It can't actually be null, because
      its caller virtio_net_handle_migration_primary() ensures it isn't.
      Drop the useless check.
      
      Cc: Jens Freimann <jfreimann@redhat.com>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20191130194240.10517-2-armbru@redhat.com>
      Reviewed-by: NJens Freimann <jfreimann@redhat.com>
      4dbac1ae
  15. 25 11月, 2019 4 次提交
  16. 30 10月, 2019 2 次提交
    • D
      virtio_net: use RCU_READ_LOCK_GUARD · 068ddfa9
      Dr. David Alan Gilbert 提交于
      Use RCU_READ_LOCK_GUARD rather than the manual rcu_read_(un)lock call.
      Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Message-Id: <20191025103403.120616-3-dgilbert@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      068ddfa9
    • J
      net/virtio: add failover support · 9711cd0d
      Jens Freimann 提交于
      This patch adds support to handle failover device pairs of a virtio-net
      device and a (vfio-)pci device, where the virtio-net acts as the standby
      device and the (vfio-)pci device as the primary.
      
      The general idea is that we have a pair of devices, a (vfio-)pci and a
      emulated (virtio-net) device. Before migration the vfio device is
      unplugged and data flows to the emulated device, on the target side
      another (vfio-)pci device is plugged in to take over the data-path. In the
      guest the net_failover module will pair net devices with the same MAC
      address.
      
      To achieve this we need:
      
      1. Provide a callback function for the should_be_hidden DeviceListener.
         It is called when the primary device is plugged in. Evaluate the QOpt
         passed in to check if it is the matching primary device. It returns
         if the device should be hidden or not.
         When it should be hidden it stores the device options in the VirtioNet
         struct and the device is added once the VIRTIO_NET_F_STANDBY feature is
         negotiated during virtio feature negotiation.
      
         If the virtio-net devices are not realized at the time the (vfio-)pci
         devices are realized, we need to connect the devices later. This way
         we make sure primary and standby devices can be specified in any
         order.
      
      2. Register a callback for migration status notifier. When called it
         will unplug its primary device before the migration happens.
      
      3. Register a callback for the migration code that checks if a device
         needs to be unplugged from the guest.
      Signed-off-by: NJens Freimann <jfreimann@redhat.com>
      Message-Id: <20191029114905.6856-11-jfreimann@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      9711cd0d
  17. 29 10月, 2019 1 次提交
    • M
      virtio-net: prevent offloads reset on migration · 7788c3f2
      Mikhail Sennikovsky 提交于
      Currently offloads disabled by guest via the VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET
      command are not preserved on VM migration.
      Instead all offloads reported by guest features (via VIRTIO_PCI_GUEST_FEATURES)
      get enabled.
      What happens is: first the VirtIONet::curr_guest_offloads gets restored and offloads
      are getting set correctly:
      
       #0  qemu_set_offload (nc=0x555556a11400, csum=1, tso4=0, tso6=0, ecn=0, ufo=0) at net/net.c:474
       #1  virtio_net_apply_guest_offloads (n=0x555557701ca0) at hw/net/virtio-net.c:720
       #2  virtio_net_post_load_device (opaque=0x555557701ca0, version_id=11) at hw/net/virtio-net.c:2334
       #3  vmstate_load_state (f=0x5555569dc010, vmsd=0x555556577c80 <vmstate_virtio_net_device>, opaque=0x555557701ca0, version_id=11)
           at migration/vmstate.c:168
       #4  virtio_load (vdev=0x555557701ca0, f=0x5555569dc010, version_id=11) at hw/virtio/virtio.c:2197
       #5  virtio_device_get (f=0x5555569dc010, opaque=0x555557701ca0, size=0, field=0x55555668cd00 <__compound_literal.5>) at hw/virtio/virtio.c:2036
       #6  vmstate_load_state (f=0x5555569dc010, vmsd=0x555556577ce0 <vmstate_virtio_net>, opaque=0x555557701ca0, version_id=11) at migration/vmstate.c:143
       #7  vmstate_load (f=0x5555569dc010, se=0x5555578189e0) at migration/savevm.c:829
       #8  qemu_loadvm_section_start_full (f=0x5555569dc010, mis=0x5555569eee20) at migration/savevm.c:2211
       #9  qemu_loadvm_state_main (f=0x5555569dc010, mis=0x5555569eee20) at migration/savevm.c:2395
       #10 qemu_loadvm_state (f=0x5555569dc010) at migration/savevm.c:2467
       #11 process_incoming_migration_co (opaque=0x0) at migration/migration.c:449
      
      However later on the features are getting restored, and offloads get reset to
      everything supported by features:
      
       #0  qemu_set_offload (nc=0x555556a11400, csum=1, tso4=1, tso6=1, ecn=0, ufo=0) at net/net.c:474
       #1  virtio_net_apply_guest_offloads (n=0x555557701ca0) at hw/net/virtio-net.c:720
       #2  virtio_net_set_features (vdev=0x555557701ca0, features=5104441767) at hw/net/virtio-net.c:773
       #3  virtio_set_features_nocheck (vdev=0x555557701ca0, val=5104441767) at hw/virtio/virtio.c:2052
       #4  virtio_load (vdev=0x555557701ca0, f=0x5555569dc010, version_id=11) at hw/virtio/virtio.c:2220
       #5  virtio_device_get (f=0x5555569dc010, opaque=0x555557701ca0, size=0, field=0x55555668cd00 <__compound_literal.5>) at hw/virtio/virtio.c:2036
       #6  vmstate_load_state (f=0x5555569dc010, vmsd=0x555556577ce0 <vmstate_virtio_net>, opaque=0x555557701ca0, version_id=11) at migration/vmstate.c:143
       #7  vmstate_load (f=0x5555569dc010, se=0x5555578189e0) at migration/savevm.c:829
       #8  qemu_loadvm_section_start_full (f=0x5555569dc010, mis=0x5555569eee20) at migration/savevm.c:2211
       #9  qemu_loadvm_state_main (f=0x5555569dc010, mis=0x5555569eee20) at migration/savevm.c:2395
       #10 qemu_loadvm_state (f=0x5555569dc010) at migration/savevm.c:2467
       #11 process_incoming_migration_co (opaque=0x0) at migration/migration.c:449
      
      Fix this by preserving the state in saved_guest_offloads field and
      pushing out offload initialization to the new post load hook.
      
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NMikhail Sennikovsky <mikhail.sennikovskii@cloud.ionos.com>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      7788c3f2
  18. 28 10月, 2019 1 次提交
  19. 16 8月, 2019 3 次提交
    • M
      sysemu: Move the VMChangeStateEntry typedef to qemu/typedefs.h · 2f780b6a
      Markus Armbruster 提交于
      In my "build everything" tree, changing sysemu/sysemu.h triggers a
      recompile of some 1800 out of 6600 objects (not counting tests and
      objects that don't depend on qemu/osdep.h, down from 5400 due to the
      previous commit).
      
      Several headers include sysemu/sysemu.h just to get typedef
      VMChangeStateEntry.  Move it from sysemu/sysemu.h to qemu/typedefs.h.
      Spell its structure tag the same while there.  Drop the now
      superfluous includes of sysemu/sysemu.h from headers.
      
      Touching sysemu/sysemu.h now recompiles some 1100 objects.
      qemu/uuid.h also drops from 1800 to 1100, and
      qapi/qapi-types-run-state.h from 5000 to 4400.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20190812052359.30071-29-armbru@redhat.com>
      Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
      Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Tested-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      2f780b6a
    • M
      Include hw/qdev-properties.h less · a27bd6c7
      Markus Armbruster 提交于
      In my "build everything" tree, changing hw/qdev-properties.h triggers
      a recompile of some 2700 out of 6600 objects (not counting tests and
      objects that don't depend on qemu/osdep.h).
      
      Many places including hw/qdev-properties.h (directly or via hw/qdev.h)
      actually need only hw/qdev-core.h.  Include hw/qdev-core.h there
      instead.
      
      hw/qdev.h is actually pointless: all it does is include hw/qdev-core.h
      and hw/qdev-properties.h, which in turn includes hw/qdev-core.h.
      Replace the remaining uses of hw/qdev.h by hw/qdev-properties.h.
      
      While there, delete a few superfluous inclusions of hw/qdev-core.h.
      
      Touching hw/qdev-properties.h now recompiles some 1200 objects.
      
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: "Daniel P. Berrangé" <berrange@redhat.com>
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20190812052359.30071-22-armbru@redhat.com>
      a27bd6c7
    • M
      Include qemu/main-loop.h less · db725815
      Markus Armbruster 提交于
      In my "build everything" tree, changing qemu/main-loop.h triggers a
      recompile of some 5600 out of 6600 objects (not counting tests and
      objects that don't depend on qemu/osdep.h).  It includes block/aio.h,
      which in turn includes qemu/event_notifier.h, qemu/notify.h,
      qemu/processor.h, qemu/qsp.h, qemu/queue.h, qemu/thread-posix.h,
      qemu/thread.h, qemu/timer.h, and a few more.
      
      Include qemu/main-loop.h only where it's needed.  Touching it now
      recompiles only some 1700 objects.  For block/aio.h and
      qemu/event_notifier.h, these numbers drop from 5600 to 2800.  For the
      others, they shrink only slightly.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20190812052359.30071-21-armbru@redhat.com>
      Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
      Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Tested-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      db725815
  20. 02 7月, 2019 1 次提交
    • D
      net/announce: Add optional ID · 944458b6
      Dr. David Alan Gilbert 提交于
      Previously there was a single instance of the timer used by
      monitor triggered announces, that's OK, but when combined with the
      previous change that lets you have announces for subsets of interfaces
      it's a bit restrictive if you want to do different things to different
      interfaces.
      
      Add an 'id' field to the announce, and maintain a list of the
      timers based on id.
      
      This allows you to for example:
          a) Start an announce going on interface eth0 for a long time
          b) Start an announce going on interface eth1 for a long time
          c) Kill the announce on eth0 while leaving eth1 going.
      Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      944458b6
  21. 12 6月, 2019 1 次提交
  22. 02 4月, 2019 1 次提交
  23. 05 3月, 2019 2 次提交
  24. 22 2月, 2019 1 次提交