1. 23 5月, 2018 3 次提交
  2. 20 5月, 2018 2 次提交
  3. 19 5月, 2018 3 次提交
  4. 18 5月, 2018 5 次提交
  5. 16 5月, 2018 1 次提交
  6. 15 5月, 2018 16 次提交
  7. 14 5月, 2018 3 次提交
    • D
      s390x: refactor reset/reipl handling · a30fb811
      David Hildenbrand 提交于
      Calling pause_all_vcpus()/resume_all_vcpus() from a VCPU thread might
      not be the best idea. As pause_all_vcpus() temporarily drops the qemu
      mutex, two parallel calls to pause_all_vcpus() can be active at a time,
      resulting in a deadlock. (either by two VCPUs or by the main thread and a
      VCPU)
      
      Let's handle it via the main loop instead, as suggested by Paolo. If we
      would have two parallel reset requests by two different VCPUs at the
      same time, the last one would win.
      
      We use the existing ipl device to handle it. The nice side effect is
      that we can get rid of reipl_requested.
      
      This change implies that all reset handling now goes via the common
      path, so "no-reboot" handling is now active for all kinds of reboots.
      
      Let's execute any CPU initialization code on the target CPU using
      run_on_cpu.
      Signed-off-by: NDavid Hildenbrand <david@redhat.com>
      Message-Id: <20180424101859.10239-1-david@redhat.com>
      Acked-by: NThomas Huth <thuth@redhat.com>
      Signed-off-by: NCornelia Huck <cohuck@redhat.com>
      a30fb811
    • L
      linux-user: correctly align types in thunking code · f606e4d6
      Laurent Vivier 提交于
      This is a follow up
      of patch:
      
              commit c2e3dee6
              Author: Laurent Vivier <laurent@vivier.eu>
              Date:   Sun Feb 13 23:37:34 2011 +0100
      
                  linux-user: Define target alignment size
      
      In my case m68k aligns "int" on 2 not 4. You can check this with the
      following program:
      
      int main(void)
      {
              struct rtentry rt;
              printf("rt_pad1 %ld %zd\n", offsetof(struct rtentry, rt_pad1),
                      sizeof(rt.rt_pad1));
              printf("rt_dst %ld %zd\n", offsetof(struct rtentry, rt_dst),
                      sizeof(rt.rt_dst));
              printf("rt_gateway %ld %zd\n", offsetof(struct rtentry, rt_gateway),
                      sizeof(rt.rt_gateway));
              printf("rt_genmask %ld %zd\n", offsetof(struct rtentry, rt_genmask),
                      sizeof(rt.rt_genmask));
              printf("rt_flags %ld %zd\n", offsetof(struct rtentry, rt_flags),
                      sizeof(rt.rt_flags));
              printf("rt_pad2 %ld %zd\n", offsetof(struct rtentry, rt_pad2),
                      sizeof(rt.rt_pad2));
              printf("rt_pad3 %ld %zd\n", offsetof(struct rtentry, rt_pad3),
                      sizeof(rt.rt_pad3));
              printf("rt_pad4 %ld %zd\n", offsetof(struct rtentry, rt_pad4),
                      sizeof(rt.rt_pad4));
              printf("rt_metric %ld %zd\n", offsetof(struct rtentry, rt_metric),
                      sizeof(rt.rt_metric));
              printf("rt_dev %ld %zd\n", offsetof(struct rtentry, rt_dev),
                      sizeof(rt.rt_dev));
              printf("rt_mtu %ld %zd\n", offsetof(struct rtentry, rt_mtu),
                      sizeof(rt.rt_mtu));
              printf("rt_window %ld %zd\n", offsetof(struct rtentry, rt_window),
                      sizeof(rt.rt_window));
              printf("rt_irtt %ld %zd\n", offsetof(struct rtentry, rt_irtt),
                      sizeof(rt.rt_irtt));
      }
      
      And result is :
      
      i386
      
      rt_pad1 0 4
      rt_dst 4 16
      rt_gateway 20 16
      rt_genmask 36 16
      rt_flags 52 2
      rt_pad2 54 2
      rt_pad3 56 4
      rt_pad4 62 2
      rt_metric 64 2
      rt_dev 68 4
      rt_mtu 72 4
      rt_window 76 4
      rt_irtt 80 2
      
      m68k
      
      rt_pad1 0 4
      rt_dst 4 16
      rt_gateway 20 16
      rt_genmask 36 16
      rt_flags 52 2
      rt_pad2 54 2
      rt_pad3 56 4
      rt_pad4 62 2
      rt_metric 64 2
      rt_dev 66 4
      rt_mtu 70 4
      rt_window 74 4
      rt_irtt 78 2
      
      This affects the "route" command :
      
      WITHOUT this patch:
      
      $ sudo route add -net default gw 10.0.3.1 window 1024 irtt 2 eth0
      $ netstat -nr
      Kernel IP routing table
      Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
      0.0.0.0         10.0.3.1        0.0.0.0         UG        0 67108866  32768 eth0
      10.0.3.0        0.0.0.0         255.255.255.0   U         0 0          0 eth0
      
      WITH this patch:
      
      $ sudo route add -net default gw 10.0.3.1 window 1024 irtt 2 eth0
      $ netstat -nr
      Kernel IP routing table
      Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
      0.0.0.0         10.0.3.1        0.0.0.0         UG        0 1024       2 eth0
      10.0.3.0        0.0.0.0         255.255.255.0   U         0 0          0 eth0
      Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-Id: <20180510205949.26455-1-laurent@vivier.eu>
      f606e4d6
    • T
      net: Remove the deprecated "vlan" parameter · af1a5c3e
      Thomas Huth 提交于
      It's been marked as deprecated since QEMU v2.9.0, so that should have
      been enough time for everybody to either just drop unnecessary "vlan=0"
      parameters, to switch to the modern -device + -netdev syntax for connecting
      guest NICs with host network backends, or to switch to the "hubport" netdev
      in case hubs are really wanted instead.
      
      Buglink: https://bugs.launchpad.net/qemu/+bug/658904Signed-off-by: NThomas Huth <thuth@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      af1a5c3e
  8. 11 5月, 2018 4 次提交
    • P
      atomic.h: Work around gcc spurious "unused value" warning · cd95fc28
      Peter Maydell 提交于
      Some versions of gcc produce a spurious warning if the result of
      __atomic_compare_echange_n() is not used and the type involved
      is a signed 8 bit value:
        error: value computed is not used [-Werror=unused-value]
      This has been seen on at least
       gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
      
      Work around this by using an explicit cast to void to indicate
      that we don't care about the return value.
      
      We don't currently use our atomic_cmpxchg() macro on any signed
      8 bit types, but the upcoming support for the Arm v8.1-Atomics
      will require it.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      cd95fc28
    • I
      arm/boot: split load_dtb() from arm_load_kernel() · 3b77f6c3
      Igor Mammedov 提交于
      load_dtb() depends on arm_load_kernel() to figure out place
      in RAM where it should be loaded, but it's not required for
      arm_load_kernel() to work. Sometimes it's neccesary for
      devices added with -device/device_add to be enumerated in
      DTB as well, which's lead to [1] and surrounding commits to
      add 2 more machine_done notifiers with non obvious ordering
      to make dynamic sysbus devices initialization happen in
      the right order.
      
      However instead of moving whole arm_load_kernel() in to
      machine_done, it's sufficient to move only load_dtb() into
      virt_machine_done() notifier and remove ArmLoadKernelNotifier/
      /PlatformBusFDTNotifierParams notifiers, which saves us ~90LOC
      and simplifies code flow quite a bit.
      Later would allow to consolidate DTB generation within one
      function for 'mach-virt' board and make it reentrant so it
      could generate updated DTB in device hotplug secenarios.
      
      While at it rename load_dtb() to arm_load_dtb() since it's
      public now.
      
      Add additional field skip_dtb_autoload to struct arm_boot_info
      to allow manual DTB load later in mach-virt and to avoid touching
      all other boards to explicitly call arm_load_dtb().
      
       1) (ac9d32e3 hw/arm/boot: arm_load_kernel implemented as a machine init done notifier)
      Signed-off-by: NIgor Mammedov <imammedo@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: NAndrew Jones <drjones@redhat.com>
      Message-id: 1525691524-32265-4-git-send-email-imammedo@redhat.com
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      3b77f6c3
    • I
      platform-bus-device: use device plug callback instead of machine_done notifier · a3fc8396
      Igor Mammedov 提交于
      platform-bus were using machine_done notifier to get and map
      (assign irq/mmio resources) dynamically added sysbus devices
      after all '-device' options had been processed.
      That however creates non obvious dependencies on ordering of
      machine_done notifiers and requires carefull line juggling
      to keep it working. For example see comment above
      create_platform_bus() and 'straitforward' arm_load_kernel()
      had to converted to machine_done notifier and that lead to
      yet another machine_done notifier to keep it working
      arm_register_platform_bus_fdt_creator().
      
      Instead of hiding resource assignment in platform-bus-device
      to magically initialize sysbus devices, use device plug
      callback and assign resources explicitly at board level
      at the moment each -device option is being processed.
      
      That adds a bunch of machine declaration boiler plate to
      e500plat board, similar to ARM/x86 but gets rid of hidden
      machine_done notifier and would allow to remove the dependent
      notifiers in ARM code simplifying it and making code flow
      easier to follow.
      Signed-off-by: NIgor Mammedov <imammedo@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Acked-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Message-id: 1525691524-32265-3-git-send-email-imammedo@redhat.com
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      a3fc8396
    • I
      pc: simplify MachineClass::get_hotplug_handler handling · 38aefb57
      Igor Mammedov 提交于
      By default MachineClass::get_hotplug_handler is NULL and concrete board
      should set it to it's own handler.
      Considering there isn't any default handler, drop saving empty
      MachineClass::get_hotplug_handler in child class and make PC code
      consistent with spapr/s390x boards.
      
      We can bring this back when actual usecase surfaces and do it
      consistently across boards that use get_hotplug_handler().
      Suggested-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NIgor Mammedov <imammedo@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-id: 1525691524-32265-2-git-send-email-imammedo@redhat.com
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      38aefb57
  9. 10 5月, 2018 2 次提交
  10. 09 5月, 2018 1 次提交