> -----Original Message----- > From: Yigit, Ferruh > Sent: Wednesday, November 1, 2017 9:07 AM > To: Thomas Monjalon; Richardson, Bruce; Gonzalez Monroy, Sergio > Cc: dev@dpdk.org; Yigit, Ferruh; Tan, Jianfeng; Santosh Shukla > Subject: [PATCH] eal: disable IOVA mode detection by default > > Fix kernel crash with KNI because KNI requires physical addresses. > > A config option introduced to disable IOVA mode detection and to set it > to physical address by default. Disabling config option will enable IOVA > mode detection. > > When there is no intension to use KNI, it is safe to enable detection. > > Config option disable IOVA mode detection by default to be sure only who > is aware of result enable it. > > Fixes: 72d013644bd6 ("mem: honor IOVA mode in malloc virt2phy") > > Signed-off-by: Ferruh Yigit <ferruh.yi...@intel.com> > --- > Cc: Jianfeng Tan <jianfeng....@intel.com> > Cc: Santosh Shukla <santosh.shu...@caviumnetworks.com> > Cc: Thomas Monjalon <tho...@monjalon.net>
Refer to how vhost-kernel works, we may leverage a memory region table to do the translation. The bad side is it's less efficient than current phys_to_virt. Another side, we did not check the result of phys_to_virt, that's why kernel crashes. Thanks, Jianfeng