Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1232528 > unrolled thread

RE: [PATCH v9 00/18] Add VT-d Posted-Interrupts support - including prerequisite series

Started by"Wu, Feng" <feng.wu@intel.com>
First post2015-09-25 03:50 +0200
Last post2015-09-28 12:30 +0200
Articles 5 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  RE: [PATCH v9 00/18] Add VT-d Posted-Interrupts support - including  prerequisite series "Wu, Feng" <feng.wu@intel.com> - 2015-09-25 03:50 +0200
    Re: [PATCH v9 00/18] Add VT-d Posted-Interrupts support - including  prerequisite series Paolo Bonzini <pbonzini@redhat.com> - 2015-09-25 13:20 +0200
      RE: [PATCH v9 00/18] Add VT-d Posted-Interrupts support - including  prerequisite series "Wu, Feng" <feng.wu@intel.com> - 2015-09-28 12:20 +0200
        Re: [PATCH v9 00/18] Add VT-d Posted-Interrupts support - including  prerequisite series Paolo Bonzini <pbonzini@redhat.com> - 2015-09-28 12:20 +0200
          RE: [PATCH v9 00/18] Add VT-d Posted-Interrupts support - including  prerequisite series "Wu, Feng" <feng.wu@intel.com> - 2015-09-28 12:30 +0200

#1232528 — RE: [PATCH v9 00/18] Add VT-d Posted-Interrupts support - including prerequisite series

From"Wu, Feng" <feng.wu@intel.com>
Date2015-09-25 03:50 +0200
SubjectRE: [PATCH v9 00/18] Add VT-d Posted-Interrupts support - including prerequisite series
Message-ID<qcqj7-3Qz-7@gated-at.bofh.it>
Hi Paolo,

Thanks for your review on this series! I'd like to confirm this series (plus
the patch fixing the compilation error) is okay to you and I don't need to
do extra things for it, right?

Thanks,
Feng

> -----Original Message-----
> From: Wu, Feng
> Sent: Friday, September 18, 2015 10:30 PM
> To: pbonzini@redhat.com; alex.williamson@redhat.com; joro@8bytes.org;
> mtosatti@redhat.com
> Cc: eric.auger@linaro.org; kvm@vger.kernel.org;
> iommu@lists.linux-foundation.org; linux-kernel@vger.kernel.org; Wu, Feng
> Subject: [PATCH v9 00/18] Add VT-d Posted-Interrupts support - including
> prerequisite series
> 
> VT-d Posted-Interrupts is an enhancement to CPU side Posted-Interrupt.
> With VT-d Posted-Interrupts enabled, external interrupts from
> direct-assigned devices can be delivered to guests without VMM
> intervention when guest is running in non-root mode.
> 
> You can find the VT-d Posted-Interrtups Spec. in the following URL:
> http://www.intel.com/content/www/us/en/intelligent-systems/intel-technolog
> y/vt-directed-io-spec.html
> 
> v9:
> - Include the whole series:
> [01/18]: irq bypasser manager
> [02/18] - [06/18]: Common non-architecture part for VT-d PI and ARM side
> forwarded irq
> [07/18] - [18/18]: VT-d PI part
> 
> v8:
> refer to the changelog in each patch
> 
> v7:
> * Define two weak irq bypass callbacks:
>   - kvm_arch_irq_bypass_start()
>   - kvm_arch_irq_bypass_stop()
> * Remove the x86 dummy implementation of the above two functions.
> * Print some useful information instead of WARN_ON() when the
>   irq bypass consumer unregistration fails.
> * Fix an issue when calling pi_pre_block and pi_post_block.
> 
> v6:
> * Rebase on 4.2.0-rc6
> * Rebase on https://lkml.org/lkml/2015/8/6/526 and
> http://www.gossamer-threads.com/lists/linux/kernel/2235623
> * Make the add_consumer and del_consumer callbacks static
> * Remove pointless INIT_LIST_HEAD to 'vdev->ctx[vector].producer.node)'
> * Use dev_info instead of WARN_ON() when irq_bypass_register_producer fails
> * Remove optional dummy callbacks for irq producer
> 
> v4:
> * For lowest-priority interrupt, only support single-CPU destination
> interrupts at the current stage, more common lowest priority support
> will be added later.
> * Accoring to Marcelo's suggestion, when vCPU is blocked, we handle
> the posted-interrupts in the HLT emulation path.
> * Some small changes (coding style, typo, add some code comments)
> 
> v3:
> * Adjust the Posted-interrupts Descriptor updating logic when vCPU is
>   preempted or blocked.
> * KVM_DEV_VFIO_DEVICE_POSTING_IRQ -->
> KVM_DEV_VFIO_DEVICE_POST_IRQ
> * __KVM_HAVE_ARCH_KVM_VFIO_POSTING -->
> __KVM_HAVE_ARCH_KVM_VFIO_POST
> * Add KVM_DEV_VFIO_DEVICE_UNPOST_IRQ attribute for VFIO irq, which
>   can be used to change back to remapping mode.
> * Fix typo
> 
> v2:
> * Use VFIO framework to enable this feature, the VFIO part of this series is
>   base on Eric's patch "[PATCH v3 0/8] KVM-VFIO IRQ forward control"
> * Rebase this patchset on
> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git,
>   then revise some irq logic based on the new hierarchy irqdomain patches
> provided
>   by Jiang Liu <jiang.liu@linux.intel.com>
> 
> 
> *** BLURB HERE ***
> 
> Alex Williamson (1):
>   virt: IRQ bypass manager
> 
> Eric Auger (4):
>   KVM: arm/arm64: select IRQ_BYPASS_MANAGER
>   KVM: create kvm_irqfd.h
>   KVM: introduce kvm_arch functions for IRQ bypass
>   KVM: eventfd: add irq bypass consumer management
> 
> Feng Wu (13):
>   KVM: x86: select IRQ_BYPASS_MANAGER
>   KVM: Extend struct pi_desc for VT-d Posted-Interrupts
>   KVM: Add some helper functions for Posted-Interrupts
>   KVM: Define a new interface kvm_intr_is_single_vcpu()
>   KVM: Make struct kvm_irq_routing_table accessible
>   KVM: make kvm_set_msi_irq() public
>   vfio: Register/unregister irq_bypass_producer
>   KVM: x86: Update IRTE for posted-interrupts
>   KVM: Implement IRQ bypass consumer callbacks for x86
>   KVM: Add an arch specific hooks in 'struct kvm_kernel_irqfd'
>   KVM: Update Posted-Interrupts Descriptor when vCPU is preempted
>   KVM: Update Posted-Interrupts Descriptor when vCPU is blocked
>   iommu/vt-d: Add a command line parameter for VT-d posted-interrupts
> 
>  Documentation/kernel-parameters.txt   |   1 +
>  Documentation/virtual/kvm/locking.txt |  12 ++
>  MAINTAINERS                           |   7 +
>  arch/arm/kvm/Kconfig                  |   2 +
>  arch/arm/kvm/Makefile                 |   1 +
>  arch/arm64/kvm/Kconfig                |   2 +
>  arch/arm64/kvm/Makefile               |   1 +
>  arch/x86/include/asm/kvm_host.h       |  24 +++
>  arch/x86/kvm/Kconfig                  |   3 +
>  arch/x86/kvm/Makefile                 |   3 +
>  arch/x86/kvm/irq_comm.c               |  32 ++-
>  arch/x86/kvm/lapic.c                  |  59 ++++++
>  arch/x86/kvm/lapic.h                  |   2 +
>  arch/x86/kvm/trace.h                  |  33 ++++
>  arch/x86/kvm/vmx.c                    | 361
> +++++++++++++++++++++++++++++++++-
>  arch/x86/kvm/x86.c                    | 108 +++++++++-
>  drivers/iommu/irq_remapping.c         |  12 +-
>  drivers/vfio/pci/Kconfig              |   1 +
>  drivers/vfio/pci/vfio_pci_intrs.c     |   9 +
>  drivers/vfio/pci/vfio_pci_private.h   |   2 +
>  include/linux/irqbypass.h             |  90 +++++++++
>  include/linux/kvm_host.h              |  29 +++
>  include/linux/kvm_irqfd.h             |  71 +++++++
>  virt/kvm/Kconfig                      |   3 +
>  virt/kvm/eventfd.c                    | 142 +++++++------
>  virt/kvm/irqchip.c                    |  10 -
>  virt/kvm/kvm_main.c                   |   3 +
>  virt/lib/Kconfig                      |   2 +
>  virt/lib/Makefile                     |   1 +
>  virt/lib/irqbypass.c                  | 257 ++++++++++++++++++++++++
>  30 files changed, 1182 insertions(+), 101 deletions(-)
>  create mode 100644 include/linux/irqbypass.h
>  create mode 100644 include/linux/kvm_irqfd.h
>  create mode 100644 virt/lib/Kconfig
>  create mode 100644 virt/lib/Makefile
>  create mode 100644 virt/lib/irqbypass.c
> 
> --
> 2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1232716

FromPaolo Bonzini <pbonzini@redhat.com>
Date2015-09-25 13:20 +0200
Message-ID<qczcJ-88V-7@gated-at.bofh.it>
In reply to#1232528

On 25/09/2015 03:49, Wu, Feng wrote:
> Hi Paolo,
> 
> Thanks for your review on this series! I'd like to confirm this series (plus
> the patch fixing the compilation error) is okay to you and I don't need to
> do extra things for it, right?

Yes, can you check if branch vtd-pi of
git://git.kernel.org/pub/scm/virt/kvm/kvm.git works for you?  If so I'll
merge it.

Paolo

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1234005

From"Wu, Feng" <feng.wu@intel.com>
Date2015-09-28 12:20 +0200
Message-ID<qdDHj-2KC-1@gated-at.bofh.it>
In reply to#1232716

> -----Original Message-----
> From: Paolo Bonzini [mailto:pbonzini@redhat.com]
> Sent: Friday, September 25, 2015 7:15 PM
> To: Wu, Feng; alex.williamson@redhat.com; joro@8bytes.org;
> mtosatti@redhat.com
> Cc: eric.auger@linaro.org; kvm@vger.kernel.org;
> iommu@lists.linux-foundation.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH v9 00/18] Add VT-d Posted-Interrupts support - including
> prerequisite series
> 
> 
> 
> On 25/09/2015 03:49, Wu, Feng wrote:
> > Hi Paolo,
> >
> > Thanks for your review on this series! I'd like to confirm this series (plus
> > the patch fixing the compilation error) is okay to you and I don't need to
> > do extra things for it, right?
> 
> Yes, can you check if branch vtd-pi of
> git://git.kernel.org/pub/scm/virt/kvm/kvm.git works for you?  If so I'll
> merge it.

Thanks a lot for creating branch for vt-d pi. However, I cannot launch guests
with this tree. I encountered the following kernel dump, and I find that the
problematic commit is " 2260b1cde0b5472ab70ad0764b10095372e41913 "

    KVM: x86: put vcpu_create under kvm->srcu critical section

    This is needed in case vcpu_create wants to access the memslots array.
    Fixes this lockdep splat:

After removing this commit from the tree, my VT-d patch-set works fine.


Kernel dump:
[  221.978182] BUG: unable to handle kernel NULL pointer dereference at           (null)
[  221.986085] IP: [<ffffffffc0368ab0>] kvm_arch_vcpu_create+0x30/0x90 [kvm]
[  221.993102] PGD 0
[  221.995148] Oops: 0000 [#1] SMP
[  221.998440] Modules linked in: bnep rfcomm bluetooth ax88179_178a usbnet intel_rapl mii snd_hda_codec_hdmi iosf_mbi x86_pkg_temp_thermal nouveau intel_powerclamp snd_hda_intel snd_hda_codec coretemp kvm_intel snd_hda_core kvm snd_hwdep snd_pcm crct10dif_pclmul crc32_pclmul snd_seq_midi ghash_clmulni_intel mxm_wmi snd_seq_midi_event snd_rawmidi video snd_seq ttm aesni_intel aes_x86_64 lrw gf128mul drm_kms_helper snd_seq_device binfmt_misc snd_timer glue_helper ablk_helper drm cryptd fb_sys_fops snd syscopyarea sysfillrect sb_edac soundcore sysimgblt mei_me parport_pc edac_core ppdev mei shpchp lp lpc_ich mac_hid parport acpi_power_meter wmi ixgbe igb i2c_algo_bit hid_generic usbhid ptp ahci hid libahci pps_core mdio
[  222.063533] CPU: 4 PID: 3384 Comm: qemu-system-x86 Not tainted 4.3.0-rc1+ #6
[  222.070612] Hardware name: Intel Corp. GRANGEVILLE/GRANTLEY, BIOS GNVDCRB1.86B.0020.V07.1409241147 09/24/2014
[  222.080764] task: ffff88006e7c8000 ti: ffff8800714a8000 task.ti: ffff8800714a8000
[  222.088283] RIP: 0010:[<ffffffffc0368ab0>]  [<ffffffffc0368ab0>] kvm_arch_vcpu_create+0x30/0x90 [kvm]
[  222.097680] RSP: 0018:ffff8800714abde0  EFLAGS: 00010246
[  222.103153] RAX: 0000000000000000 RBX: ffff88016f28c000 RCX: 0000000000000000
[  222.110407] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff88016f28c000
[  222.117659] RBP: ffff8800714abdf8 R08: 0000000000000001 R09: 0000000000000040
[  222.124824] R10: ffff880077e86438 R11: ffff880163e06880 R12: ffff88016f28c000
[  222.132150] R13: 0000000000000000 R14: 000000000000ae41 R15: 0000000000000000
[  222.139405] FS:  00007f43fd7ec700(0000) GS:ffff880178700000(0000) knlGS:0000000000000000
[  222.147629] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  222.153471] CR2: 0000000000000000 CR3: 000000017074b000 CR4: 00000000003426e0
[  222.160726] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  222.167979] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[  222.175231] Stack:
[  222.177277]  0000000000000000 ffff88016f28c000 0000000000000000 ffff8800714abea0
[  222.184870]  ffffffffc0355b17 0000000000000008 ffff8800714abe28 ffffffff810aba32
[  222.192444]  ffff880178816e40 ffff8800714abe40 ffffffff810a4f44 ffff880178816e40
[  222.200017] Call Trace:
[  222.202522]  [<ffffffffc0355b17>] kvm_vm_ioctl+0x277/0x6e0 [kvm]
[  222.208633]  [<ffffffff810aba32>] ? put_prev_task_fair+0x22/0x40
[  222.214741]  [<ffffffff810a4f44>] ? pick_next_task_idle+0x14/0x30
[  222.220942]  [<ffffffff811fb53a>] do_vfs_ioctl+0x2ba/0x490
[  222.226523]  [<ffffffff8106274a>] ? __do_page_fault+0x1ba/0x410
[  222.232546]  [<ffffffff811fb789>] SyS_ioctl+0x79/0x90
[  222.237684]  [<ffffffff81003ba5>] ? syscall_return_slowpath+0x55/0x150
[  222.244323]  [<ffffffff81791d36>] entry_SYSCALL_64_fastpath+0x16/0x75
[  222.250869] Code: 55 48 89 e5 41 55 41 54 53 41 89 f5 48 89 fb e8 27 61 cb c0 85 c0 74 13 8b 83 f0 09 00 00 85 c0 74 09 80 3d 53 2e 04 00 00 74 40 <48> 8b 04 25 00 00 00 00 48 8d 78 48 e8 7f c4 d6 c0 41 89 c4 48
[  222.270790] RIP  [<ffffffffc0368ab0>] kvm_arch_vcpu_create+0x30/0x90 [kvm]
[  222.277813]  RSP <ffff8800714abde0>
[  222.281359] CR2: 0000000000000000
[  222.290421] ---[ end trace 957f5a39692fe6c7 ]---
root@feng-bdw-de-pi:~/workspace/tools# dmesg > ~/dmesg.log
root@feng-bdw-de-pi:~/workspace/tools# vim ~/dmesg.log
[  221.998440] Modules linked in: bnep rfcomm bluetooth ax88179_178a usbnet intel_rapl mii snd_hda_codec_hdmi iosf_mbi x86_pkg_temp_thermal nouveau intel_powerclamp snd_hda_intel snd_hda_codec coretemp kvm_intel snd_hda_core kvm snd_hwdep snd_pcm crct10dif_pclmul crc32_pclmul snd_seq_midi ghash_clmulni_intel mxm_wmi snd_seq_midi_event snd_rawmidi video snd_seq ttm aesni_intel aes_x86_64 lrw gf128mul drm_kms_helper snd_seq_device binfmt_misc snd_timer glue_helper ablk_helper drm cryptd fb_sys_fops snd syscopyarea sysfillrect sb_edac soundcore sysimgblt mei_me parport_pc edac_core ppdev mei shpchp lp lpc_ich mac_hid parport acpi_power_meter wmi ixgbe igb i2c_algo_bit hid_generic usbhid ptp ahci hid libahci pps_core mdio
[  222.063533] CPU: 4 PID: 3384 Comm: qemu-system-x86 Not tainted 4.3.0-rc1+ #6
[  222.070612] Hardware name: Intel Corp. GRANGEVILLE/GRANTLEY, BIOS GNVDCRB1.86B.0020.V07.1409241147 09/24/2014
[  222.080764] task: ffff88006e7c8000 ti: ffff8800714a8000 task.ti: ffff8800714a8000
[  222.088283] RIP: 0010:[<ffffffffc0368ab0>]  [<ffffffffc0368ab0>] kvm_arch_vcpu_create+0x30/0x90 [kvm]
[  222.097680] RSP: 0018:ffff8800714abde0  EFLAGS: 00010246
[  222.103153] RAX: 0000000000000000 RBX: ffff88016f28c000 RCX: 0000000000000000
[  222.110407] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff88016f28c000
[  222.117659] RBP: ffff8800714abdf8 R08: 0000000000000001 R09: 0000000000000040
[  222.124824] R10: ffff880077e86438 R11: ffff880163e06880 R12: ffff88016f28c000
[  222.132150] R13: 0000000000000000 R14: 000000000000ae41 R15: 0000000000000000
[  222.139405] FS:  00007f43fd7ec700(0000) GS:ffff880178700000(0000) knlGS:0000000000000000
[  222.147629] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  222.153471] CR2: 0000000000000000 CR3: 000000017074b000 CR4: 00000000003426e0
[  222.160726] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  222.167979] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[  222.175231] Stack:
[  222.177277]  0000000000000000 ffff88016f28c000 0000000000000000 ffff8800714abea0
[  222.184870]  ffffffffc0355b17 0000000000000008 ffff8800714abe28 ffffffff810aba32
[  222.192444]  ffff880178816e40 ffff8800714abe40 ffffffff810a4f44 ffff880178816e40
[  222.200017] Call Trace:
[  222.202522]  [<ffffffffc0355b17>] kvm_vm_ioctl+0x277/0x6e0 [kvm]
[  222.208633]  [<ffffffff810aba32>] ? put_prev_task_fair+0x22/0x40
[  222.214741]  [<ffffffff810a4f44>] ? pick_next_task_idle+0x14/0x30
[  222.220942]  [<ffffffff811fb53a>] do_vfs_ioctl+0x2ba/0x490
[  222.226523]  [<ffffffff8106274a>] ? __do_page_fault+0x1ba/0x410
[  222.232546]  [<ffffffff811fb789>] SyS_ioctl+0x79/0x90
[  222.237684]  [<ffffffff81003ba5>] ? syscall_return_slowpath+0x55/0x150
[  222.244323]  [<ffffffff81791d36>] entry_SYSCALL_64_fastpath+0x16/0x75
[  222.250869] Code: 55 48 89 e5 41 55 41 54 53 41 89 f5 48 89 fb e8 27 61 cb c0 85 c0 74 13 8b 83 f0 09 00 00 85 c0 74 09 80 3d 53 2e 04 00 00 74 40 <48> 8b 04 25 00 00 00 00 48 8d 78 48 e8 7f c4 d6 c0 41 89 c4 48
[  222.270790] RIP  [<ffffffffc0368ab0>] kvm_arch_vcpu_create+0x30/0x90 [kvm]
[  222.277813]  RSP <ffff8800714abde0>
[  222.281359] CR2: 0000000000000000
[  222.290421] ---[ end trace 957f5a39692fe6c7 ]---

Thanks,
Feng

> 
> Paolo

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1234008

FromPaolo Bonzini <pbonzini@redhat.com>
Date2015-09-28 12:20 +0200
Message-ID<qdDHj-2KC-9@gated-at.bofh.it>
In reply to#1234005

On 28/09/2015 12:14, Wu, Feng wrote:
> Thanks a lot for creating branch for vt-d pi. However, I cannot launch guests
> with this tree. I encountered the following kernel dump, and I find that the
> problematic commit is " 2260b1cde0b5472ab70ad0764b10095372e41913 "
> 
>     KVM: x86: put vcpu_create under kvm->srcu critical section
> 
>     This is needed in case vcpu_create wants to access the memslots array.
>     Fixes this lockdep splat:
> 
> After removing this commit from the tree, my VT-d patch-set works fine.

Great, thanks.  The above commit had already been reverted.

I'm sorting out the kbuild reports, and then will merge VT-d PI.

Paolo

> 
> Kernel dump:
> [  221.978182] BUG: unable to handle kernel NULL pointer dereference at           (null)
> [  221.986085] IP: [<ffffffffc0368ab0>] kvm_arch_vcpu_create+0x30/0x90 [kvm]
> [  221.993102] PGD 0
> [  221.995148] Oops: 0000 [#1] SMP
> [  221.998440] Modules linked in: bnep rfcomm bluetooth ax88179_178a usbnet intel_rapl mii snd_hda_codec_hdmi iosf_mbi x86_pkg_temp_thermal nouveau intel_powerclamp snd_hda_intel snd_hda_codec coretemp kvm_intel snd_hda_core kvm snd_hwdep snd_pcm crct10dif_pclmul crc32_pclmul snd_seq_midi ghash_clmulni_intel mxm_wmi snd_seq_midi_event snd_rawmidi video snd_seq ttm aesni_intel aes_x86_64 lrw gf128mul drm_kms_helper snd_seq_device binfmt_misc snd_timer glue_helper ablk_helper drm cryptd fb_sys_fops snd syscopyarea sysfillrect sb_edac soundcore sysimgblt mei_me parport_pc edac_core ppdev mei shpchp lp lpc_ich mac_hid parport acpi_power_meter wmi ixgbe igb i2c_algo_bit hid_generic usbhid ptp ahci hid libahci pps_core mdio
> [  222.063533] CPU: 4 PID: 3384 Comm: qemu-system-x86 Not tainted 4.3.0-rc1+ #6
> [  222.070612] Hardware name: Intel Corp. GRANGEVILLE/GRANTLEY, BIOS GNVDCRB1.86B.0020.V07.1409241147 09/24/2014
> [  222.080764] task: ffff88006e7c8000 ti: ffff8800714a8000 task.ti: ffff8800714a8000
> [  222.088283] RIP: 0010:[<ffffffffc0368ab0>]  [<ffffffffc0368ab0>] kvm_arch_vcpu_create+0x30/0x90 [kvm]
> [  222.097680] RSP: 0018:ffff8800714abde0  EFLAGS: 00010246
> [  222.103153] RAX: 0000000000000000 RBX: ffff88016f28c000 RCX: 0000000000000000
> [  222.110407] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff88016f28c000
> [  222.117659] RBP: ffff8800714abdf8 R08: 0000000000000001 R09: 0000000000000040
> [  222.124824] R10: ffff880077e86438 R11: ffff880163e06880 R12: ffff88016f28c000
> [  222.132150] R13: 0000000000000000 R14: 000000000000ae41 R15: 0000000000000000
> [  222.139405] FS:  00007f43fd7ec700(0000) GS:ffff880178700000(0000) knlGS:0000000000000000
> [  222.147629] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> [  222.153471] CR2: 0000000000000000 CR3: 000000017074b000 CR4: 00000000003426e0
> [  222.160726] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> [  222.167979] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> [  222.175231] Stack:
> [  222.177277]  0000000000000000 ffff88016f28c000 0000000000000000 ffff8800714abea0
> [  222.184870]  ffffffffc0355b17 0000000000000008 ffff8800714abe28 ffffffff810aba32
> [  222.192444]  ffff880178816e40 ffff8800714abe40 ffffffff810a4f44 ffff880178816e40
> [  222.200017] Call Trace:
> [  222.202522]  [<ffffffffc0355b17>] kvm_vm_ioctl+0x277/0x6e0 [kvm]
> [  222.208633]  [<ffffffff810aba32>] ? put_prev_task_fair+0x22/0x40
> [  222.214741]  [<ffffffff810a4f44>] ? pick_next_task_idle+0x14/0x30
> [  222.220942]  [<ffffffff811fb53a>] do_vfs_ioctl+0x2ba/0x490
> [  222.226523]  [<ffffffff8106274a>] ? __do_page_fault+0x1ba/0x410
> [  222.232546]  [<ffffffff811fb789>] SyS_ioctl+0x79/0x90
> [  222.237684]  [<ffffffff81003ba5>] ? syscall_return_slowpath+0x55/0x150
> [  222.244323]  [<ffffffff81791d36>] entry_SYSCALL_64_fastpath+0x16/0x75
> [  222.250869] Code: 55 48 89 e5 41 55 41 54 53 41 89 f5 48 89 fb e8 27 61 cb c0 85 c0 74 13 8b 83 f0 09 00 00 85 c0 74 09 80 3d 53 2e 04 00 00 74 40 <48> 8b 04 25 00 00 00 00 48 8d 78 48 e8 7f c4 d6 c0 41 89 c4 48
> [  222.270790] RIP  [<ffffffffc0368ab0>] kvm_arch_vcpu_create+0x30/0x90 [kvm]
> [  222.277813]  RSP <ffff8800714abde0>
> [  222.281359] CR2: 0000000000000000
> [  222.290421] ---[ end trace 957f5a39692fe6c7 ]---
> root@feng-bdw-de-pi:~/workspace/tools# dmesg > ~/dmesg.log
> root@feng-bdw-de-pi:~/workspace/tools# vim ~/dmesg.log
> [  221.998440] Modules linked in: bnep rfcomm bluetooth ax88179_178a usbnet intel_rapl mii snd_hda_codec_hdmi iosf_mbi x86_pkg_temp_thermal nouveau intel_powerclamp snd_hda_intel snd_hda_codec coretemp kvm_intel snd_hda_core kvm snd_hwdep snd_pcm crct10dif_pclmul crc32_pclmul snd_seq_midi ghash_clmulni_intel mxm_wmi snd_seq_midi_event snd_rawmidi video snd_seq ttm aesni_intel aes_x86_64 lrw gf128mul drm_kms_helper snd_seq_device binfmt_misc snd_timer glue_helper ablk_helper drm cryptd fb_sys_fops snd syscopyarea sysfillrect sb_edac soundcore sysimgblt mei_me parport_pc edac_core ppdev mei shpchp lp lpc_ich mac_hid parport acpi_power_meter wmi ixgbe igb i2c_algo_bit hid_generic usbhid ptp ahci hid libahci pps_core mdio
> [  222.063533] CPU: 4 PID: 3384 Comm: qemu-system-x86 Not tainted 4.3.0-rc1+ #6
> [  222.070612] Hardware name: Intel Corp. GRANGEVILLE/GRANTLEY, BIOS GNVDCRB1.86B.0020.V07.1409241147 09/24/2014
> [  222.080764] task: ffff88006e7c8000 ti: ffff8800714a8000 task.ti: ffff8800714a8000
> [  222.088283] RIP: 0010:[<ffffffffc0368ab0>]  [<ffffffffc0368ab0>] kvm_arch_vcpu_create+0x30/0x90 [kvm]
> [  222.097680] RSP: 0018:ffff8800714abde0  EFLAGS: 00010246
> [  222.103153] RAX: 0000000000000000 RBX: ffff88016f28c000 RCX: 0000000000000000
> [  222.110407] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff88016f28c000
> [  222.117659] RBP: ffff8800714abdf8 R08: 0000000000000001 R09: 0000000000000040
> [  222.124824] R10: ffff880077e86438 R11: ffff880163e06880 R12: ffff88016f28c000
> [  222.132150] R13: 0000000000000000 R14: 000000000000ae41 R15: 0000000000000000
> [  222.139405] FS:  00007f43fd7ec700(0000) GS:ffff880178700000(0000) knlGS:0000000000000000
> [  222.147629] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> [  222.153471] CR2: 0000000000000000 CR3: 000000017074b000 CR4: 00000000003426e0
> [  222.160726] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> [  222.167979] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> [  222.175231] Stack:
> [  222.177277]  0000000000000000 ffff88016f28c000 0000000000000000 ffff8800714abea0
> [  222.184870]  ffffffffc0355b17 0000000000000008 ffff8800714abe28 ffffffff810aba32
> [  222.192444]  ffff880178816e40 ffff8800714abe40 ffffffff810a4f44 ffff880178816e40
> [  222.200017] Call Trace:
> [  222.202522]  [<ffffffffc0355b17>] kvm_vm_ioctl+0x277/0x6e0 [kvm]
> [  222.208633]  [<ffffffff810aba32>] ? put_prev_task_fair+0x22/0x40
> [  222.214741]  [<ffffffff810a4f44>] ? pick_next_task_idle+0x14/0x30
> [  222.220942]  [<ffffffff811fb53a>] do_vfs_ioctl+0x2ba/0x490
> [  222.226523]  [<ffffffff8106274a>] ? __do_page_fault+0x1ba/0x410
> [  222.232546]  [<ffffffff811fb789>] SyS_ioctl+0x79/0x90
> [  222.237684]  [<ffffffff81003ba5>] ? syscall_return_slowpath+0x55/0x150
> [  222.244323]  [<ffffffff81791d36>] entry_SYSCALL_64_fastpath+0x16/0x75
> [  222.250869] Code: 55 48 89 e5 41 55 41 54 53 41 89 f5 48 89 fb e8 27 61 cb c0 85 c0 74 13 8b 83 f0 09 00 00 85 c0 74 09 80 3d 53 2e 04 00 00 74 40 <48> 8b 04 25 00 00 00 00 48 8d 78 48 e8 7f c4 d6 c0 41 89 c4 48
> [  222.270790] RIP  [<ffffffffc0368ab0>] kvm_arch_vcpu_create+0x30/0x90 [kvm]
> [  222.277813]  RSP <ffff8800714abde0>
> [  222.281359] CR2: 0000000000000000
> [  222.290421] ---[ end trace 957f5a39692fe6c7 ]---
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1234017

From"Wu, Feng" <feng.wu@intel.com>
Date2015-09-28 12:30 +0200
Message-ID<qdDR0-2VP-21@gated-at.bofh.it>
In reply to#1234008

> -----Original Message-----
> From: Paolo Bonzini [mailto:pbonzini@redhat.com]
> Sent: Monday, September 28, 2015 6:19 PM
> To: Wu, Feng; alex.williamson@redhat.com; joro@8bytes.org;
> mtosatti@redhat.com
> Cc: eric.auger@linaro.org; kvm@vger.kernel.org;
> iommu@lists.linux-foundation.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH v9 00/18] Add VT-d Posted-Interrupts support - including
> prerequisite series
> 
> 
> 
> On 28/09/2015 12:14, Wu, Feng wrote:
> > Thanks a lot for creating branch for vt-d pi. However, I cannot launch guests
> > with this tree. I encountered the following kernel dump, and I find that the
> > problematic commit is " 2260b1cde0b5472ab70ad0764b10095372e41913 "
> >
> >     KVM: x86: put vcpu_create under kvm->srcu critical section
> >
> >     This is needed in case vcpu_create wants to access the memslots array.
> >     Fixes this lockdep splat:
> >
> > After removing this commit from the tree, my VT-d patch-set works fine.
> 
> Great, thanks.  The above commit had already been reverted.
> 
> I'm sorting out the kbuild reports, and then will merge VT-d PI.

Thanks a lot for make this happen!

Thanks,
Feng

> 
> Paolo
> 
> >
> > Kernel dump:
> > [  221.978182] BUG: unable to handle kernel NULL pointer dereference at
> (null)
> > [  221.986085] IP: [<ffffffffc0368ab0>] kvm_arch_vcpu_create+0x30/0x90
> [kvm]
> > [  221.993102] PGD 0
> > [  221.995148] Oops: 0000 [#1] SMP
> > [  221.998440] Modules linked in: bnep rfcomm bluetooth ax88179_178a
> usbnet intel_rapl mii snd_hda_codec_hdmi iosf_mbi x86_pkg_temp_thermal
> nouveau intel_powerclamp snd_hda_intel snd_hda_codec coretemp kvm_intel
> snd_hda_core kvm snd_hwdep snd_pcm crct10dif_pclmul crc32_pclmul
> snd_seq_midi ghash_clmulni_intel mxm_wmi snd_seq_midi_event snd_rawmidi
> video snd_seq ttm aesni_intel aes_x86_64 lrw gf128mul drm_kms_helper
> snd_seq_device binfmt_misc snd_timer glue_helper ablk_helper drm cryptd
> fb_sys_fops snd syscopyarea sysfillrect sb_edac soundcore sysimgblt mei_me
> parport_pc edac_core ppdev mei shpchp lp lpc_ich mac_hid parport
> acpi_power_meter wmi ixgbe igb i2c_algo_bit hid_generic usbhid ptp ahci hid
> libahci pps_core mdio
> > [  222.063533] CPU: 4 PID: 3384 Comm: qemu-system-x86 Not tainted
> 4.3.0-rc1+ #6
> > [  222.070612] Hardware name: Intel Corp. GRANGEVILLE/GRANTLEY, BIOS
> GNVDCRB1.86B.0020.V07.1409241147 09/24/2014
> > [  222.080764] task: ffff88006e7c8000 ti: ffff8800714a8000 task.ti:
> ffff8800714a8000
> > [  222.088283] RIP: 0010:[<ffffffffc0368ab0>]  [<ffffffffc0368ab0>]
> kvm_arch_vcpu_create+0x30/0x90 [kvm]
> > [  222.097680] RSP: 0018:ffff8800714abde0  EFLAGS: 00010246
> > [  222.103153] RAX: 0000000000000000 RBX: ffff88016f28c000 RCX:
> 0000000000000000
> > [  222.110407] RDX: 0000000000000000 RSI: 0000000000000000 RDI:
> ffff88016f28c000
> > [  222.117659] RBP: ffff8800714abdf8 R08: 0000000000000001 R09:
> 0000000000000040
> > [  222.124824] R10: ffff880077e86438 R11: ffff880163e06880 R12:
> ffff88016f28c000
> > [  222.132150] R13: 0000000000000000 R14: 000000000000ae41 R15:
> 0000000000000000
> > [  222.139405] FS:  00007f43fd7ec700(0000) GS:ffff880178700000(0000)
> knlGS:0000000000000000
> > [  222.147629] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> > [  222.153471] CR2: 0000000000000000 CR3: 000000017074b000 CR4:
> 00000000003426e0
> > [  222.160726] DR0: 0000000000000000 DR1: 0000000000000000 DR2:
> 0000000000000000
> > [  222.167979] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7:
> 0000000000000400
> > [  222.175231] Stack:
> > [  222.177277]  0000000000000000 ffff88016f28c000 0000000000000000
> ffff8800714abea0
> > [  222.184870]  ffffffffc0355b17 0000000000000008 ffff8800714abe28
> ffffffff810aba32
> > [  222.192444]  ffff880178816e40 ffff8800714abe40 ffffffff810a4f44
> ffff880178816e40
> > [  222.200017] Call Trace:
> > [  222.202522]  [<ffffffffc0355b17>] kvm_vm_ioctl+0x277/0x6e0 [kvm]
> > [  222.208633]  [<ffffffff810aba32>] ? put_prev_task_fair+0x22/0x40
> > [  222.214741]  [<ffffffff810a4f44>] ? pick_next_task_idle+0x14/0x30
> > [  222.220942]  [<ffffffff811fb53a>] do_vfs_ioctl+0x2ba/0x490
> > [  222.226523]  [<ffffffff8106274a>] ? __do_page_fault+0x1ba/0x410
> > [  222.232546]  [<ffffffff811fb789>] SyS_ioctl+0x79/0x90
> > [  222.237684]  [<ffffffff81003ba5>] ? syscall_return_slowpath+0x55/0x150
> > [  222.244323]  [<ffffffff81791d36>]
> entry_SYSCALL_64_fastpath+0x16/0x75
> > [  222.250869] Code: 55 48 89 e5 41 55 41 54 53 41 89 f5 48 89 fb e8 27 61
> cb c0 85 c0 74 13 8b 83 f0 09 00 00 85 c0 74 09 80 3d 53 2e 04 00 00 74 40 <48>
> 8b 04 25 00 00 00 00 48 8d 78 48 e8 7f c4 d6 c0 41 89 c4 48
> > [  222.270790] RIP  [<ffffffffc0368ab0>] kvm_arch_vcpu_create+0x30/0x90
> [kvm]
> > [  222.277813]  RSP <ffff8800714abde0>
> > [  222.281359] CR2: 0000000000000000
> > [  222.290421] ---[ end trace 957f5a39692fe6c7 ]---
> > root@feng-bdw-de-pi:~/workspace/tools# dmesg > ~/dmesg.log
> > root@feng-bdw-de-pi:~/workspace/tools# vim ~/dmesg.log
> > [  221.998440] Modules linked in: bnep rfcomm bluetooth ax88179_178a
> usbnet intel_rapl mii snd_hda_codec_hdmi iosf_mbi x86_pkg_temp_thermal
> nouveau intel_powerclamp snd_hda_intel snd_hda_codec coretemp kvm_intel
> snd_hda_core kvm snd_hwdep snd_pcm crct10dif_pclmul crc32_pclmul
> snd_seq_midi ghash_clmulni_intel mxm_wmi snd_seq_midi_event snd_rawmidi
> video snd_seq ttm aesni_intel aes_x86_64 lrw gf128mul drm_kms_helper
> snd_seq_device binfmt_misc snd_timer glue_helper ablk_helper drm cryptd
> fb_sys_fops snd syscopyarea sysfillrect sb_edac soundcore sysimgblt mei_me
> parport_pc edac_core ppdev mei shpchp lp lpc_ich mac_hid parport
> acpi_power_meter wmi ixgbe igb i2c_algo_bit hid_generic usbhid ptp ahci hid
> libahci pps_core mdio
> > [  222.063533] CPU: 4 PID: 3384 Comm: qemu-system-x86 Not tainted
> 4.3.0-rc1+ #6
> > [  222.070612] Hardware name: Intel Corp. GRANGEVILLE/GRANTLEY, BIOS
> GNVDCRB1.86B.0020.V07.1409241147 09/24/2014
> > [  222.080764] task: ffff88006e7c8000 ti: ffff8800714a8000 task.ti:
> ffff8800714a8000
> > [  222.088283] RIP: 0010:[<ffffffffc0368ab0>]  [<ffffffffc0368ab0>]
> kvm_arch_vcpu_create+0x30/0x90 [kvm]
> > [  222.097680] RSP: 0018:ffff8800714abde0  EFLAGS: 00010246
> > [  222.103153] RAX: 0000000000000000 RBX: ffff88016f28c000 RCX:
> 0000000000000000
> > [  222.110407] RDX: 0000000000000000 RSI: 0000000000000000 RDI:
> ffff88016f28c000
> > [  222.117659] RBP: ffff8800714abdf8 R08: 0000000000000001 R09:
> 0000000000000040
> > [  222.124824] R10: ffff880077e86438 R11: ffff880163e06880 R12:
> ffff88016f28c000
> > [  222.132150] R13: 0000000000000000 R14: 000000000000ae41 R15:
> 0000000000000000
> > [  222.139405] FS:  00007f43fd7ec700(0000) GS:ffff880178700000(0000)
> knlGS:0000000000000000
> > [  222.147629] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> > [  222.153471] CR2: 0000000000000000 CR3: 000000017074b000 CR4:
> 00000000003426e0
> > [  222.160726] DR0: 0000000000000000 DR1: 0000000000000000 DR2:
> 0000000000000000
> > [  222.167979] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7:
> 0000000000000400
> > [  222.175231] Stack:
> > [  222.177277]  0000000000000000 ffff88016f28c000 0000000000000000
> ffff8800714abea0
> > [  222.184870]  ffffffffc0355b17 0000000000000008 ffff8800714abe28
> ffffffff810aba32
> > [  222.192444]  ffff880178816e40 ffff8800714abe40 ffffffff810a4f44
> ffff880178816e40
> > [  222.200017] Call Trace:
> > [  222.202522]  [<ffffffffc0355b17>] kvm_vm_ioctl+0x277/0x6e0 [kvm]
> > [  222.208633]  [<ffffffff810aba32>] ? put_prev_task_fair+0x22/0x40
> > [  222.214741]  [<ffffffff810a4f44>] ? pick_next_task_idle+0x14/0x30
> > [  222.220942]  [<ffffffff811fb53a>] do_vfs_ioctl+0x2ba/0x490
> > [  222.226523]  [<ffffffff8106274a>] ? __do_page_fault+0x1ba/0x410
> > [  222.232546]  [<ffffffff811fb789>] SyS_ioctl+0x79/0x90
> > [  222.237684]  [<ffffffff81003ba5>] ? syscall_return_slowpath+0x55/0x150
> > [  222.244323]  [<ffffffff81791d36>]
> entry_SYSCALL_64_fastpath+0x16/0x75
> > [  222.250869] Code: 55 48 89 e5 41 55 41 54 53 41 89 f5 48 89 fb e8 27 61
> cb c0 85 c0 74 13 8b 83 f0 09 00 00 85 c0 74 09 80 3d 53 2e 04 00 00 74 40 <48>
> 8b 04 25 00 00 00 00 48 8d 78 48 e8 7f c4 d6 c0 41 89 c4 48
> > [  222.270790] RIP  [<ffffffffc0368ab0>] kvm_arch_vcpu_create+0x30/0x90
> [kvm]
> > [  222.277813]  RSP <ffff8800714abde0>
> > [  222.281359] CR2: 0000000000000000
> > [  222.290421] ---[ end trace 957f5a39692fe6c7 ]---
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web