All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alvise Rigo <a.rigo-lrHrjnjw1UfHK3s98zE1ajGjJy/sRE9J@public.gmane.org>
To: Eric Auger <eric.auger-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	"Bharat.Bhushan-KZfg59tc24xl57MIdRCFDg@public.gmane.org"
	<Bharat.Bhushan-KZfg59tc24xl57MIdRCFDg@public.gmane.org>,
	Shannon Zhao
	<zhaoshenglong-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>,
	"a.motakis-lrHrjnjw1UfHK3s98zE1ajGjJy/sRE9J@public.gmane.org"
	<a.motakis-lrHrjnjw1UfHK3s98zE1ajGjJy/sRE9J@public.gmane.org>,
	"iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org"
	<iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>,
	"kvmarm-FPEHb7Xf0XXUo1n7N8X6UoWGPAHP3yOg@public.gmane.org"
	<kvmarm-FPEHb7Xf0XXUo1n7N8X6UoWGPAHP3yOg@public.gmane.org>
Subject: Re: Vfio-on-arm: the device tree does not contain the DMA device
Date: Thu, 19 Jun 2014 12:47:56 +0200	[thread overview]
Message-ID: <53A2BFDC.500@virtualopensystems.com> (raw)
In-Reply-To: <53A2B8DB.4060904-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

Yes, that is an old guide based on VFIO v4. We will update it soon.

Regards,
alvise

Il 19/06/2014 12:18, Eric Auger ha scritto:
> On 06/19/2014 12:15 PM, Bharat.Bhushan-KZfg59tc24xl57MIdRCFDg@public.gmane.org wrote:
>>
>>
>>> -----Original Message-----
>>> From: Eric Auger [mailto:eric.auger-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org]
>>> Sent: Thursday, June 19, 2014 3:41 PM
>>> To: Shannon Zhao; Bhushan Bharat-R65777; Alvise Rigo;
>>> a.motakis-lrHrjnjw1UfHK3s98zE1ajGjJy/sRE9J@public.gmane.org; iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org;
>>> kvmarm-FPEHb7Xf0XXUo1n7N8X6UoWGPAHP3yOg@public.gmane.org
>>> Subject: Re: Vfio-on-arm: the device tree does not contain the DMA device
>>>
>>> On 06/19/2014 11:38 AM, Shannon Zhao wrote:
>>>> Hi Bharat,
>>>>
>>>> On 2014/6/19 17:19, Bharat.Bhushan-KZfg59tc24xl57MIdRCFDg@public.gmane.org wrote:
>>>>>
>>>>>
>>>>>> -----Original Message-----
>>>>>> From: kvmarm-bounces-FPEHb7Xf0XXUo1n7N8X6UoWGPAHP3yOg@public.gmane.org [mailto:kvmarm-
>>>>>> bounces-FPEHb7Xf0XXUo1n7N8X6UoWGPAHP3yOg@public.gmane.org] On Behalf Of Shannon Zhao
>>>>>> Sent: Thursday, June 19, 2014 2:45 PM
>>>>>> To: Alvise Rigo; a.motakis-lrHrjnjw1UfHK3s98zE1ajGjJy/sRE9J@public.gmane.org; iommu-cunTk1MwBs/ROKNJybVBZg@public.gmane.org
>>>>>> foundation.org; kvmarm-FPEHb7Xf0XXUo1n7N8X6UoWGPAHP3yOg@public.gmane.org
>>>>>> Subject: Re: Vfio-on-arm: the device tree does not contain the DMA device
>>>>>>
>>>>>> Hi Alvise,
>>>>>>
>>>>>> Thanks for your reply.
>>>>>> I have apply the patch and could see the DMA devices.
>>>>>> But there is no vosys_dmatest int the directory "/sys/kernel/debug/" after
>>>>>> mounting debugfs.
>>>>>> I found that the branch vfio-platform-v4 doesn't contain the module
>>>>>> vosys_dmatest.
>>>>>> Then I port it from the branch pl330_dmatest and run vosys_dmatest
>>> successfully.
>>>>>>
>>>>>> 	echo 1 > /sys/kernel/debug/vosys_dmatest/start
>>>>>>
>>>>>> 	[ 6145.343419] dmaengine: __dma_request_channel: success (dma0chan0)
>>>>>> 	[ 6145.344000] vosys dmatest: callback: transfer completed
>>>>>> 	[ 6145.344147] vosys dmatest: tx completed
>>>>>> 	[ 6145.344589] vosys dmatest: source and destination match.
>>>>>>
>>>>>> Download the qemu and use following command to start a guest:
>>>>>> 	./qemu-system-arm -enable-kvm -M vexpress-a15 -cpu cortex-a15 \
>>>>>>         	-device pl330,vfio_group="/dev/vfio/0",vfio_device="2c0a0000.dma",\
>>>>>>         	vfio_container="/dev/vfio/vfio" \
>>>>>>         	-append "earlyprintk ip=dhcp console=ttyAMA0 rootwait" \
>>>>>>         	-kernel zImage -dtb guest.dtb -initrd filesystem.cpio.gz  -
>>>>>> nographic An error reported:
>>>>>> 	qemu-system-arm: -device
>>>>>> pl330,vfio_group=/dev/vfio/0,vfio_device=2c0a0000.dma,:
>>>>>
>>>>> Why do we need to give "vfio_group=/dev/vfio/0" ?
>>>> I refer to the url
>>> "http://www.virtualopensystems.com/en/solutions/guides/vfio-on-arm/".
>>>>>
>>>>>
>>>>>> 	could not open disk image vfio_container=/dev/vfio:
>>>>>> 	Could not open 'vfio_container=/dev/vfio': No such file or directory
>>>>>
>>>>> Are you unbinding "2c0a0000.dma" from its driver and binding with "vfio-
>>> playform" driver ?
>>>> How to unbind "2c0a0000.dma" from its driver?
>>>> I have tried following cmd to bind "2c0a0000.dma" with "vfio-playform" driver.
>>>> 	echo 2c0a0000.dma > /sys/bus/platform/drivers/vfio-platform/vfio_bind
>>>> But there is no /dev/vfio/0 or /dev/vfio/vfio .
>>>
>>> Hi Shannon,
>>>
>>> you may try following cmd to unbind the native dma driver
>>> echo 2c0a0000.dma | sudo tee -a
>>> /sys/bus/platform/devices/2c0a0000.dma/driver/unbind
>>>
>>> and then the following one to bing the meta-driver to the device
>>> echo 2c0a0000.dma | sudo tee -a
>>> /sys/bus/platform/drivers/vfio-platform/vfio_bind
>>
>> Should not we use "driver-override" mechanism for binding with vfio-platform driver?
>>
>> Thanks
>> -Bharat
> 
> Hi Bharat,
> 
> I guess Shannon is using an older version of the kernel. With
> vfio-platform v4 this is the old unbind/bin mechanism that is in place,
> if I am not wrong.
> 
> Best Regards
> 
> Eric
>>
>>>
>>> Best Regards
>>>
>>> Eric
>>>
>>>>
>>>>>
>>>>> Thanks
>>>>> -Bharat
>>>>>
>>>>>>
>>>>>> Is there something I'm wrong or do I miss some steps?
>>>>>>
>>>>>> Thank you,
>>>>>> Shannon
>>>>>>
>>>>>> On 2014/6/18 21:24, Alvise Rigo wrote:
>>>>>>> Hi Shannon,
>>>>>>>
>>>>>>> Thank you for reporting this issue, the device tree file was indeed
>>> missing.
>>>>>>> To solve the problem, you can apply the following patch to the
>>>>>>> repository you mentioned
>>>>>>> (git://github.com/virtualopensystems/arm-dts.git).
>>>>>>>
>>>>>>> For your information, soon we will update the guide with a newer
>>>>>>> version of VFIO with this issue fixed.
>>>>>>>
>>>>>>> Thank you,
>>>>>>> alvise
>>>>>>>
>>>>>>> ---
>>>>>>>  fast_models/rtsm_ve-cortex_a15x4_a7x4.dts | 100
>>>>>>> +++++++++++++++++++++++++++++-
>>>>>>>  1 file changed, 97 insertions(+), 3 deletions(-)
>>>>>>>
>>>>>>> diff --git a/fast_models/rtsm_ve-cortex_a15x4_a7x4.dts
>>>>>>> b/fast_models/rtsm_ve-cortex_a15x4_a7x4.dts
>>>>>>> index ef1275b..79c6af2 100644
>>>>>>> --- a/fast_models/rtsm_ve-cortex_a15x4_a7x4.dts
>>>>>>> +++ b/fast_models/rtsm_ve-cortex_a15x4_a7x4.dts
>>>>>>> @@ -142,7 +142,7 @@
>>>>>>>  		cpu7: cpu@7 {
>>>>>>>  			device_type = "cpu";
>>>>>>>  			compatible = "arm,cortex-a7";
>>>>>>> -			reg = <0x104>;
>>>>>>> +			reg = <0x103>;
>>>>>>>  			cluster = <&cluster1>;
>>>>>>>  			core = <&core7>;
>>>>>>>  		};
>>>>>>> @@ -159,7 +159,7 @@
>>>>>>>  		#address-cells = <0>;
>>>>>>>  		interrupt-controller;
>>>>>>>  		reg = <0 0x2c001000 0 0x1000>,
>>>>>>> -		      <0 0x2c002000 0 0x2000>,
>>>>>>> +		      <0 0x2c002000 0 0x1000>,
>>>>>>>  		      <0 0x2c004000 0 0x2000>,
>>>>>>>  		      <0 0x2c006000 0 0x2000>;
>>>>>>>  		interrupts = <1 9 0xf04>;
>>>>>>> @@ -183,6 +183,101 @@
>>>>>>>  			     <1 10 0xf08>;
>>>>>>>  	};
>>>>>>>
>>>>>>> +	smmu@2c0b0000 {
>>>>>>> +                compatible = "arm,smmu-v2";
>>>>>>> +                reg = <0x0 0x2c0b0000 0x0 0x10000>;
>>>>>>> +                #global-interrupts = <2>;
>>>>>>> +                interrupts = <0 58 4>,
>>>>>>> +                             <0 59 4>,
>>>>>>> +                             <0 60 4>,
>>>>>>> +                             <0 60 4>,
>>>>>>> +                             <0 60 4>,
>>>>>>> +                             <0 60 4>,
>>>>>>> +                             <0 60 4>,
>>>>>>> +                             <0 60 4>,
>>>>>>> +                             <0 60 4>;
>>>>>>> +                mmu-masters = <&dma0 0x0 0x8>,
>>>>>>> +                              <&dma1 0x1 0x9>,
>>>>>>> +                              <&dma2 0x2 0xa>,
>>>>>>> +                              <&dma3 0x3 0xb>;
>>>>>>> +        };
>>>>>>> +
>>>>>>> +	dma0: dma@2c0a0000 {
>>>>>>> +		compatible = "arm,pl330";
>>>>>>> +		reg = <0 0x2c0a0000 0 0x1000>;
>>>>>>> +		interrupts = <0 64 4>,
>>>>>>> +			     <0 65 4>,
>>>>>>> +			     <0 66 4>,
>>>>>>> +			     <0 67 4>,
>>>>>>> +			     <0 68 4>,
>>>>>>> +			     <0 69 4>,
>>>>>>> +			     <0 70 4>,
>>>>>>> +			     <0 71 4>;
>>>>>>> +		#dma-cells = <1>;
>>>>>>> +		#stream-id-cells = <2>;
>>>>>>> +		clocks = <&oscclk6a>;
>>>>>>> +		clock-names = "apb_pclk";
>>>>>>> +	};
>>>>>>> +
>>>>>>> +	dma1: dma@2c0a1000 {
>>>>>>> +		compatible = "arm,pl330", "arm,primecell";
>>>>>>> +		reg = <0 0x2c0a1000 0 0x1000>;
>>>>>>> +		interrupts = <0 96 4>,
>>>>>>> +			     <0 97 4>,
>>>>>>> +			     <0 98 4>,
>>>>>>> +			     <0 99 4>,
>>>>>>> +			     <0 100 4>,
>>>>>>> +			     <0 101 4>,
>>>>>>> +			     <0 102 4>,
>>>>>>> +			     <0 103 4>;
>>>>>>> +		#dma-cells = <1>;
>>>>>>> +		#stream-id-cells = <2>;
>>>>>>> +		clocks = <&oscclk6a>;
>>>>>>> +		clock-names = "apb_pclk";
>>>>>>> +	};
>>>>>>> +
>>>>>>> +	dma2: dma@2c0a2000 {
>>>>>>> +		compatible = "arm,pl330", "arm,primecell";
>>>>>>> +		reg = <0 0x2c0a2000 0 0x1000>;
>>>>>>> +		interrupts = <0 128 4>,
>>>>>>> +			     <0 129 4>,
>>>>>>> +			     <0 130 4>,
>>>>>>> +			     <0 131 4>,
>>>>>>> +			     <0 132 4>,
>>>>>>> +			     <0 133 4>,
>>>>>>> +			     <0 134 4>,
>>>>>>> +			     <0 135 4>;
>>>>>>> +		#dma-cells = <1>;
>>>>>>> +		#stream-id-cells = <2>;
>>>>>>> +		clocks = <&oscclk6a>;
>>>>>>> +		clock-names = "apb_pclk";
>>>>>>> +	};
>>>>>>> +
>>>>>>> +	dma3: dma@2c0a3000 {
>>>>>>> +		compatible = "arm,pl330", "arm,primecell";
>>>>>>> +		reg = <0 0x2c0a3000 0 0x1000>;
>>>>>>> +		interrupts = <0 160 4>,
>>>>>>> +			     <0 161 4>,
>>>>>>> +			     <0 162 4>,
>>>>>>> +			     <0 163 4>,
>>>>>>> +			     <0 164 4>,
>>>>>>> +			     <0 165 4>,
>>>>>>> +			     <0 166 4>,
>>>>>>> +			     <0 167 4>;
>>>>>>> +		#dma-cells = <1>;
>>>>>>> +		#stream-id-cells = <2>;
>>>>>>> +		clocks = <&oscclk6a>;
>>>>>>> +		clock-names = "apb_pclk";
>>>>>>> +	};
>>>>>>> +
>>>>>>> +	oscclk6a: oscclk6a {
>>>>>>> +		/* Reference 24MHz clock */
>>>>>>> +		compatible = "fixed-clock";
>>>>>>> +		#clock-cells = <0>;
>>>>>>> +		clock-frequency = <24000000>;
>>>>>>> +		clock-output-names = "oscclk6a";
>>>>>>> +	};
>>>>>>> +
>>>>>>>  	smb {
>>>>>>>  		compatible = "simple-bus";
>>>>>>>
>>>>>>> @@ -244,4 +339,3 @@
>>>>>>>  		/include/ "rtsm_ve-motherboard.dtsi"
>>>>>>>  	};
>>>>>>>  };
>>>>>>> -
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> Shannon
>>>>>>
>>>>>> _______________________________________________
>>>>>> kvmarm mailing list
>>>>>> kvmarm-FPEHb7Xf0XXUo1n7N8X6UoWGPAHP3yOg@public.gmane.org
>>>>>> https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
>>>>>
>>>>> .
>>>>>
>>>>
>>
> 

  parent reply	other threads:[~2014-06-19 10:47 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-18  2:33 Vfio-on-arm: the device tree does not contain the DMA device Shannon Zhao
     [not found] ` <53A0FA5D.5090204-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2014-06-18 13:24   ` Alvise Rigo
     [not found]     ` <53A192FE.2070303-lrHrjnjw1UfHK3s98zE1ajGjJy/sRE9J@public.gmane.org>
2014-06-19  9:14       ` Shannon Zhao
     [not found]         ` <53A2AA0E.3060207-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2014-06-19  9:19           ` Bharat.Bhushan-KZfg59tc24xl57MIdRCFDg
     [not found]             ` <a96a278c8fd04586b8120c48b78cb963-GeMU99Gfrru4FpqPz9FowuO6mTEJWrR4XA4E9RH9d+qIuWR1G4zioA@public.gmane.org>
2014-06-19  9:21               ` Bharat.Bhushan-KZfg59tc24xl57MIdRCFDg
2014-06-19  9:38               ` Shannon Zhao
     [not found]                 ` <53A2AF80.5080705-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2014-06-19 10:11                   ` Eric Auger
     [not found]                     ` <53A2B74C.1050201-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-06-19 10:15                       ` Bharat.Bhushan-KZfg59tc24xl57MIdRCFDg
     [not found]                         ` <da0f46f9ae0e482b884f4e2298ab006e-GeMU99Gfrru4FpqPz9FowuO6mTEJWrR4XA4E9RH9d+qIuWR1G4zioA@public.gmane.org>
2014-06-19 10:18                           ` Eric Auger
     [not found]                             ` <53A2B8DB.4060904-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-06-19 10:47                               ` Alvise Rigo [this message]
2014-06-19 10:28                       ` Shannon Zhao
2014-06-19 10:47                   ` Alvise Rigo
     [not found]                     ` <53A2BFAA.2050507-lrHrjnjw1UfHK3s98zE1ajGjJy/sRE9J@public.gmane.org>
2014-06-19 11:11                       ` Shannon Zhao
     [not found]                         ` <53A2C57A.9050504-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2014-06-19 11:26                           ` Alvise Rigo
     [not found]                             ` <53A2C8D5.4070801-lrHrjnjw1UfHK3s98zE1ajGjJy/sRE9J@public.gmane.org>
2014-06-19 12:08                               ` Shannon Zhao
     [not found]                                 ` <53A2D2B2.2040902-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2014-06-19 12:12                                   ` Bharat.Bhushan-KZfg59tc24xl57MIdRCFDg
     [not found]                                     ` <cf15be43f0964293a969c5a93f3c5d54-GeMU99Gfrru4FpqPz9FowuO6mTEJWrR4XA4E9RH9d+qIuWR1G4zioA@public.gmane.org>
2014-06-19 12:16                                       ` Shannon Zhao
     [not found]                                         ` <53A2D4A2.9070600-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2014-06-19 12:20                                           ` Bharat.Bhushan-KZfg59tc24xl57MIdRCFDg
     [not found]                                             ` <a6fcdaa299594393a4274ed44d49ae46-GeMU99Gfrru4FpqPz9FowuO6mTEJWrR4XA4E9RH9d+qIuWR1G4zioA@public.gmane.org>
2014-06-20  2:57                                               ` Shannon Zhao
     [not found]                                                 ` <53A3A315.4010409-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2014-06-20  7:15                                                   ` Alvise Rigo
     [not found]                                                     ` <53A3DFA7.4060006-lrHrjnjw1UfHK3s98zE1ajGjJy/sRE9J@public.gmane.org>
2014-06-20  8:23                                                       ` Shannon Zhao
     [not found]                                                         ` <53A3EF9C.8040405-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2014-06-20  8:37                                                           ` Alvise Rigo
     [not found]                                                             ` <53A3F2CC.1030800-lrHrjnjw1UfHK3s98zE1ajGjJy/sRE9J@public.gmane.org>
2014-06-24  6:59                                                               ` Shannon Zhao
     [not found]                                                                 ` <53A921D7.9060306-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2014-06-24  7:05                                                                   ` Bharat.Bhushan-KZfg59tc24xl57MIdRCFDg
     [not found]                                                                     ` <a161f9f0084f4b25b544db91cfd48dcc-GeMU99Gfrru4FpqPz9FowuO6mTEJWrR4XA4E9RH9d+qIuWR1G4zioA@public.gmane.org>
2014-06-24  7:45                                                                       ` Shannon Zhao
     [not found]                                                                         ` <53A92CB1.3010203-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2014-06-24  8:08                                                                           ` Bharat.Bhushan-KZfg59tc24xl57MIdRCFDg
     [not found]                                                                             ` <343b7fe9d9d44a18b44ab031d8e00db6-GeMU99Gfrru4FpqPz9FowuO6mTEJWrR4XA4E9RH9d+qIuWR1G4zioA@public.gmane.org>
2014-06-24  9:00                                                                               ` Shannon Zhao
     [not found]                                                                                 ` <53A93E3B.4060802-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2014-06-24  9:14                                                                                   ` Alvise Rigo
     [not found]                                                                                     ` <53A94180.8080404-lrHrjnjw1UfHK3s98zE1ajGjJy/sRE9J@public.gmane.org>
2014-06-24 13:19                                                                                       ` Shannon Zhao
     [not found]                                                                                     ` <53A97ACC.2060300@huawei.c om>
     [not found]                                                                                       ` <53A97ACC.2060300-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2014-06-24 14:50                                                                                         ` Alvise Rigo
     [not found]                                                                                     ` <53A97ACC.2060300@huawei. com>
     [not found]                                                                                       ` <53A99030.4030901@virtualopensystems .com>
     [not found]                                                                                         ` <53A99030.4030901-lrHrjnjw1UfHK3s98zE1ajGjJy/sRE9J@public.gmane.org>
2014-06-25  3:09                                                                                           ` Shannon Zhao
     [not found]                                                                                         ` <53AA3D85.5090800@huawei .com>
     [not found]                                                                                           ` <53AA3D85.5090800-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2014-06-25  8:12                                                                                             ` Alvise Rigo
2014-06-24  8:26                                                                   ` alvise rigo

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=53A2BFDC.500@virtualopensystems.com \
    --to=a.rigo-lrhrjnjw1ufhk3s98ze1ajgjjy/sre9j@public.gmane.org \
    --cc=Bharat.Bhushan-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
    --cc=a.motakis-lrHrjnjw1UfHK3s98zE1ajGjJy/sRE9J@public.gmane.org \
    --cc=eric.auger-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=kvmarm-FPEHb7Xf0XXUo1n7N8X6UoWGPAHP3yOg@public.gmane.org \
    --cc=zhaoshenglong-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.