1. 07 11月, 2016 1 次提交
  2. 02 9月, 2016 1 次提交
  3. 31 8月, 2016 2 次提交
  4. 02 5月, 2016 2 次提交
    • V
      Drivers: hv: vmbus: handle various crash scenarios · cd95aad5
      Vitaly Kuznetsov 提交于
      Kdump keeps biting. Turns out CHANNELMSG_UNLOAD_RESPONSE is always
      delivered to the CPU which was used for initial contact or to CPU0
      depending on host version. vmbus_wait_for_unload() doesn't account for
      the fact that in case we're crashing on some other CPU we won't get the
      CHANNELMSG_UNLOAD_RESPONSE message and our wait on the current CPU will
      never end.
      
      Do the following:
      1) Check for completion_done() in the loop. In case interrupt handler is
         still alive we'll get the confirmation we need.
      
      2) Read message pages for all CPUs message page as we're unsure where
         CHANNELMSG_UNLOAD_RESPONSE is going to be delivered to. We can race with
         still-alive interrupt handler doing the same, add cmpxchg() to
         vmbus_signal_eom() to not lose CHANNELMSG_UNLOAD_RESPONSE message.
      
      3) Cleanup message pages on all CPUs. This is required (at least for the
         current CPU as we're clearing CPU0 messages now but we may want to bring
         up additional CPUs on crash) as new messages won't be delivered till we
         consume what's pending. On boot we'll place message pages somewhere else
         and we won't be able to read stale messages.
      Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com>
      Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cd95aad5
    • V
      Drivers: hv: kvp: fix IP Failover · 4dbfc2e6
      Vitaly Kuznetsov 提交于
      Hyper-V VMs can be replicated to another hosts and there is a feature to
      set different IP for replicas, it is called 'Failover TCP/IP'. When
      such guest starts Hyper-V host sends it KVP_OP_SET_IP_INFO message as soon
      as we finish negotiation procedure. The problem is that it can happen (and
      it actually happens) before userspace daemon connects and we reply with
      HV_E_FAIL to the message. As there are no repetitions we fail to set the
      requested IP.
      
      Solve the issue by postponing our reply to the negotiation message till
      userspace daemon is connected. We can't wait too long as there is a
      host-side timeout (cca. 75 seconds) and if we fail to reply in this time
      frame the whole KVP service will become inactive. The solution is not
      ideal - if it takes userspace daemon more than 60 seconds to connect
      IP Failover will still fail but I don't see a solution with our current
      separation between kernel and userspace parts.
      
      Other two modules (VSS and FCOPY) don't require such delay, leave them
      untouched.
      Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com>
      Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4dbfc2e6
  5. 01 5月, 2016 1 次提交
  6. 02 3月, 2016 3 次提交
  7. 17 2月, 2016 1 次提交
  8. 08 2月, 2016 2 次提交
  9. 17 12月, 2015 4 次提交
  10. 15 12月, 2015 5 次提交
  11. 04 11月, 2015 1 次提交
  12. 06 8月, 2015 2 次提交
  13. 05 8月, 2015 1 次提交
  14. 25 5月, 2015 4 次提交
  15. 03 4月, 2015 2 次提交
  16. 25 3月, 2015 2 次提交
  17. 02 3月, 2015 3 次提交
    • N
      Drivers: hv: vmbus: Add support for VMBus panic notifier handler · 96c1d058
      Nick Meier 提交于
      Hyper-V allows a guest to notify the Hyper-V host that a panic
      condition occured.  This notification can include up to five 64
      bit values.  These 64 bit values are written into crash MSRs.
      Once the data has been written into the crash MSRs, the host is
      then notified by writing into a Crash Control MSR.  On the Hyper-V
      host, the panic notification data is captured in the Windows Event
      log as a 18590 event.
      
      Crash MSRs are defined in appendix H of the Hypervisor Top Level
      Functional Specification.  At the time of this patch, v4.0 is the
      current functional spec.  The URL for the v4.0 document is:
      
      http://download.microsoft.com/download/A/B/4/AB43A34E-BDD0-4FA6-BDEF-79EEF16E880B/Hypervisor Top Level Functional Specification v4.0.docx
      Signed-off-by: NNick Meier <nmeier@microsoft.com>
      Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      96c1d058
    • V
      Drivers: hv: vmbus: Teardown clockevent devices on module unload · e086748c
      Vitaly Kuznetsov 提交于
      Newly introduced clockevent devices made it impossible to unload hv_vmbus
      module as clockevents_config_and_register() takes additional reverence to
      the module. To make it possible again we do the following:
      - avoid setting dev->owner for clockevent devices;
      - implement hv_synic_clockevents_cleanup() doing clockevents_unbind_device();
      - call it from vmbus_exit().
      
      In theory hv_synic_clockevents_cleanup() can be merged with hv_synic_cleanup(),
      however, we call hv_synic_cleanup() from smp_call_function_single() and this
      doesn't work for clockevents_unbind_device() as it does such call on its own. I
      opted for a separate function.
      Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com>
      Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e086748c
    • V
      Drivers: hv: vmbus: teardown hv_vmbus_con workqueue and vmbus_connection pages on shutdown · 09a19628
      Vitaly Kuznetsov 提交于
      We need to destroy hv_vmbus_con on module shutdown, otherwise the following
      crash is sometimes observed:
      
      [   76.569845] hv_vmbus: Hyper-V Host Build:9600-6.3-17-0.17039; Vmbus version:3.0
      [   82.598859] BUG: unable to handle kernel paging request at ffffffffa0003480
      [   82.599287] IP: [<ffffffffa0003480>] 0xffffffffa0003480
      [   82.599287] PGD 1f34067 PUD 1f35063 PMD 3f72d067 PTE 0
      [   82.599287] Oops: 0010 [#1] SMP
      [   82.599287] Modules linked in: [last unloaded: hv_vmbus]
      [   82.599287] CPU: 0 PID: 26 Comm: kworker/0:1 Not tainted 3.19.0-rc5_bug923184+ #488
      [   82.599287] Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS Hyper-V UEFI Release v1.0 11/26/2012
      [   82.599287] Workqueue: hv_vmbus_con 0xffffffffa0003480
      [   82.599287] task: ffff88007b6ddfa0 ti: ffff88007f8f8000 task.ti: ffff88007f8f8000
      [   82.599287] RIP: 0010:[<ffffffffa0003480>]  [<ffffffffa0003480>] 0xffffffffa0003480
      [   82.599287] RSP: 0018:ffff88007f8fbe00  EFLAGS: 00010202
      ...
      
      To avoid memory leaks we need to free monitor_pages and int_page for
      vmbus_connection. Implement vmbus_disconnect() function by separating cleanup
      path from vmbus_connect().
      
      As we use hv_vmbus_con to release channels (see free_channel() in channel_mgmt.c)
      we need to make sure the work was done before we remove the queue, do that with
      drain_workqueue(). We also need to avoid handling messages  which can (potentially)
      create new channels, so set vmbus_connection.conn_state = DISCONNECTED at the very
      beginning of vmbus_exit() and check for that in vmbus_onmessage_work().
      Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com>
      Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      09a19628
  18. 26 1月, 2015 1 次提交
  19. 24 9月, 2014 1 次提交
  20. 04 6月, 2014 1 次提交