linux-s390.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Kirti Wankhede <kwankhede@nvidia.com>,
	Tony Krowiak <akrowiak@linux.ibm.com>,
	Halil Pasic <pasic@linux.ibm.com>,
	Jason Herne <jjherne@linux.ibm.com>,
	Eric Farman <farman@linux.ibm.com>,
	Matthew Rosato <mjrosato@linux.ibm.com>,
	Zhenyu Wang <zhenyuw@linux.intel.com>,
	Zhi Wang <zhi.a.wang@intel.com>, Jason Gunthorpe <jgg@nvidia.com>,
	kvm@vger.kernel.org, linux-s390@vger.kernel.org,
	intel-gvt-dev@lists.freedesktop.org
Subject: Re: simplify the mdev interface v8
Date: Tue, 27 Sep 2022 15:54:26 -0600	[thread overview]
Message-ID: <20220927155426.23f4b8e9.alex.williamson@redhat.com> (raw)
In-Reply-To: <20220927140737.0b4c9a54.alex.williamson@redhat.com>

On Tue, 27 Sep 2022 14:07:37 -0600
Alex Williamson <alex.williamson@redhat.com> wrote:

> On Fri, 23 Sep 2022 11:26:38 +0200
> Christoph Hellwig <hch@lst.de> wrote:
> 
> > Hi all,
> > 
> > this series significantly simplifies the mdev driver interface by
> > following the patterns for device model interaction used elsewhere in
> > the kernel.
> > 
> > Changes since v7:
> >  - rebased to the latests vfio/next branch
> >  - move the mdev.h include from cio.h to vfio_ccw_private.h
> >  - don't free the parent in mdev_type_release
> >  - set the pretty_name for vfio_ap
> >  - fix the available_instances check in mdev_device_create  
> 
> Thanks for your persistence, I think all threads are resolved at this
> point.  Applied to vfio next branch for v6.1.  Thanks,

Oops, I had to drop this, I get a null pointer from gvt-g code:

[   92.132636] BUG: kernel NULL pointer dereference, address: 0000000000000000
[   92.139597] #PF: supervisor read access in kernel mode
[   92.144734] #PF: error_code(0x0000) - not-present page
[   92.149865] PGD 0 P4D 0 
[   92.152405] Oops: 0000 [#2] PREEMPT SMP PTI
[   92.156592] CPU: 2 PID: 950 Comm: mdevctl Tainted: G      D W          6.0.0-rc4+ #1
[   92.164330] Hardware name:  /NUC5i5MYBE, BIOS MYBDWi5v.86A.0054.2019.0520.1531 05/20/2019
[   92.172495] RIP: 0010:intel_vgpu_get_available+0x7e/0xb0 [kvmgt]
[   92.178518] Code: 00 45 2b a5 a0 00 00 00 89 d1 41 2b 8d 90 00 00 00 29 d3 41 83 ec 04 8d a9 00 00 00 f8 e8 fa f3 43 e1 49 8b 4e 70 89 e8 31 d2 <f7> 31 31 d2 89 c5 44 89 e0 f7 71 08 39 c5 0f 47 e8 89 d8 31 d2 5b
[   92.197264] RSP: 0018:ffffaf57818ffd80 EFLAGS: 00010246
[   92.202490] RAX: 0000000038000000 RBX: 00000000a8000000 RCX: 0000000000000000
[   92.209622] RDX: 0000000000000000 RSI: ffffffffc0454160 RDI: ffff9b389aaa8000
[   92.216747] RBP: 0000000038000000 R08: ffff9b3881826f08 R09: ffff9b38969aeb40
[   92.223879] R10: 0000000000000000 R11: 0000000000000000 R12: 000000000000001c
[   92.231004] R13: ffff9b389aaa8000 R14: ffff9b3881826ef0 R15: 0000000000000001
[   92.238136] FS:  00007f2f76f12800(0000) GS:ffff9b3bf6d00000(0000) knlGS:0000000000000000
[   92.246222] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   92.251968] CR2: 0000000000000000 CR3: 000000011686e002 CR4: 00000000003706e0
[   92.259101] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[   92.266234] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[   92.273366] Call Trace:
[   92.275811]  <TASK>
[   92.277919]  available_instances_show+0x1f/0x60 [mdev]
[   92.283055]  sysfs_kf_seq_show+0xa3/0xe0
[   92.286983]  seq_read_iter+0x122/0x450
[   92.290735]  vfs_read+0x1d2/0x2a0
[   92.294056]  ksys_read+0x53/0xd0
[   92.297286]  do_syscall_64+0x5b/0x80
[   92.300866]  ? syscall_exit_to_user_mode+0x17/0x40
[   92.305659]  ? do_syscall_64+0x67/0x80
[   92.309412]  ? exc_page_fault+0x70/0x170
[   92.313337]  entry_SYSCALL_64_after_hwframe+0x63/0xcd
[   92.318388] RIP: 0033:0x7f2f76d01852
[   92.321977] Code: c0 e9 b2 fe ff ff 50 48 8d 3d 9a d0 0b 00 e8 55 f6 01 00 0f 1f 44 00 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 0f 05 <48> 3d 00 f0 ff ff 77 56 c3 0f 1f 44 00 00 48 83 ec 28 48 89 54 24
[   92.340725] RSP: 002b:00007fff85c74b58 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
[   92.348290] RAX: ffffffffffffffda RBX: 0000000000001000 RCX: 00007f2f76d01852
[   92.355422] RDX: 0000000000001000 RSI: 0000562f18d61120 RDI: 0000000000000005
[   92.362555] RBP: 0000000000001000 R08: 00007f2f76df8eb0 R09: 00007f2f76df8eb0
[   92.369689] R10: 0000000000000000 R11: 0000000000000246 R12: 00007fff85c74c58
[   92.376820] R13: 0000000000000000 R14: 00007fff85c74c70 R15: 0000000000000005
[   92.383946]  </TASK>
[   92.386137] Modules linked in: nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ip_set nf_tables rfkill nfnetlink qrtr sunrpc vfat fat snd_hda_codec_realtek snd_hda_codec_generic snd_hda_codec_hdmi ledtrig_audio snd_hda_intel snd_intel_dspcfg snd_intel_sdw_acpi snd_hda_codec snd_hda_core snd_hwdep mei_pxp intel_rapl_msr intel_rapl_common snd_pcm x86_pkg_temp_thermal intel_powerclamp coretemp mei_wdt mei_hdcp kvm_intel mei_me rapl mei intel_cstate snd_timer snd at24 intel_uncore soundcore iTCO_wdt intel_pmc_bxt iTCO_vendor_support lpc_ich pcspkr i2c_i801 i2c_smbus acpi_pad fuse zram kvmgt vfio_iommu_type1 vfio kvm irqbypass i915 mdev drm_buddy crct10dif_pclmul crc32_pclmul drm_display_helper crc32c_intel cec e1000e ghash_clmulni_intel ttm video pinctrl_lynxpoint
[   92.386194] Unloaded tainted modules: acpi_cpufreq():1 acpi_cpufreq():1 acpi_cpufreq():1 acpi_cpufreq():1 fjes():1 fjes():1 fjes():1 fjes():1 fjes():1 pcc_cpufreq():1 pcc_cpufreq():1 pcc_cpufreq():1 pcc_cpufreq():1 acpi_cpufreq():1 pcc_cpufreq():1 acpi_cpufreq():1 pcc_cpufreq():1 acpi_cpufreq():1 acpi_cpufreq():1 pcc_cpufreq():1 pcc_cpufreq():1 acpi_cpufreq():1 acpi_cpufreq():1 acpi_cpufreq():1 acpi_cpufreq():1 fjes():1 fjes():1 fjes():1 fjes():1 fjes():1
[   92.504665] CR2: 0000000000000000
[   92.507982] ---[ end trace 0000000000000000 ]---
[   92.512603] RIP: 0010:intel_vgpu_get_available+0x7e/0xb0 [kvmgt]
[   92.518626] Code: 00 45 2b a5 a0 00 00 00 89 d1 41 2b 8d 90 00 00 00 29 d3 41 83 ec 04 8d a9 00 00 00 f8 e8 fa f3 43 e1 49 8b 4e 70 89 e8 31 d2 <f7> 31 31 d2 89 c5 44 89 e0 f7 71 08 39 c5 0f 47 e8 89 d8 31 d2 5b
[   92.537370] RSP: 0018:ffffaf5780557d20 EFLAGS: 00010246
[   92.542598] RAX: 0000000038000000 RBX: 00000000a8000000 RCX: 0000000000000000
[   92.549729] RDX: 0000000000000000 RSI: ffffffffc0454160 RDI: ffff9b389aaa8000
[   92.556861] RBP: 0000000038000000 R08: ffff9b3881826e90 R09: ffff9b3897860240
[   92.563987] R10: 0000000000000000 R11: 0000000000000001 R12: 000000000000001c
[   92.571119] R13: ffff9b389aaa8000 R14: ffff9b3881826e78 R15: 0000000000000001
[   92.578251] FS:  00007f2f76f12800(0000) GS:ffff9b3bf6d00000(0000) knlGS:0000000000000000
[   92.586336] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   92.592074] CR2: 0000000000000000 CR3: 000000011686e002 CR4: 00000000003706e0
[   92.599199] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[   92.606333] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


  reply	other threads:[~2022-09-27 21:54 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-23  9:26 simplify the mdev interface v8 Christoph Hellwig
2022-09-23  9:26 ` [PATCH 01/14] drm/i915/gvt: fix a memory leak in intel_gvt_init_vgpu_types Christoph Hellwig
2022-09-23  9:26 ` [PATCH 02/14] drm/i915/gvt: simplify vgpu configuration management Christoph Hellwig
2022-09-23  9:26 ` [PATCH 03/14] vfio/mdev: make mdev.h standalone includable Christoph Hellwig
2022-09-23  9:26 ` [PATCH 04/14] vfio/mdev: embedd struct mdev_parent in the parent data structure Christoph Hellwig
2022-09-27  1:28   ` Eric Farman
2022-09-23  9:26 ` [PATCH 05/14] vfio/mdev: simplify mdev_type handling Christoph Hellwig
2022-09-27  1:28   ` Eric Farman
2022-09-23  9:26 ` [PATCH 06/14] vfio/mdev: remove mdev_from_dev Christoph Hellwig
2022-09-23  9:26 ` [PATCH 07/14] vfio/mdev: unexport mdev_bus_type Christoph Hellwig
2022-09-23  9:26 ` [PATCH 08/14] vfio/mdev: remove mdev_parent_dev Christoph Hellwig
2022-09-23  9:26 ` [PATCH 09/14] vfio/mdev: remove mtype_get_parent_dev Christoph Hellwig
2022-09-27  1:28   ` Eric Farman
2022-09-23  9:26 ` [PATCH 10/14] vfio/mdev: consolidate all the device_api sysfs into the core code Christoph Hellwig
2022-09-27  1:28   ` Eric Farman
2022-09-23  9:26 ` [PATCH 11/14] vfio/mdev: consolidate all the name " Christoph Hellwig
2022-09-27  1:28   ` Eric Farman
2022-09-23  9:26 ` [PATCH 12/14] vfio/mdev: consolidate all the available_instance " Christoph Hellwig
2022-09-27  1:28   ` Eric Farman
2022-09-23  9:26 ` [PATCH 13/14] vfio/mdev: consolidate all the description " Christoph Hellwig
2022-09-23  9:26 ` [PATCH 14/14] vfio/mdev: add mdev available instance checking to the core Christoph Hellwig
2022-09-27  1:28   ` Eric Farman
2022-09-27 20:07 ` simplify the mdev interface v8 Alex Williamson
2022-09-27 21:54   ` Alex Williamson [this message]
2022-09-28 12:11     ` Christoph Hellwig
2022-09-28 18:56       ` Alex Williamson
2022-09-29  7:11         ` Christoph Hellwig
2022-09-30 21:31       ` Alex Williamson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220927155426.23f4b8e9.alex.williamson@redhat.com \
    --to=alex.williamson@redhat.com \
    --cc=akrowiak@linux.ibm.com \
    --cc=farman@linux.ibm.com \
    --cc=hch@lst.de \
    --cc=intel-gvt-dev@lists.freedesktop.org \
    --cc=jgg@nvidia.com \
    --cc=jjherne@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=kwankhede@nvidia.com \
    --cc=linux-s390@vger.kernel.org \
    --cc=mjrosato@linux.ibm.com \
    --cc=pasic@linux.ibm.com \
    --cc=zhenyuw@linux.intel.com \
    --cc=zhi.a.wang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).