Following my kernel compilation issue i used another method to get the source. I added : # custom patch for acs override support Patch6666: override_for_missing_acs_capabilities.patch
in my kernel.spec The patch is in rpmbuild/SOURCES but when i run the build it says the file is missing. Also to noted i wasn't able to apply the patch following documentation simply because it seems the patch application changed entirely ? So either the patch listed is apply automatically with the other in the code or i need to find the proper place to apply it. I posted below the command i use to build following by the error message, second paste is the sources i used.
http://fpaste.org/326707/00190714/
It seems i'm really close to succeeding in the case the patch is workng, just have to solve this and i should have proper patch kernel
On 02/20/2016 02:04 PM, thibaut noah wrote:
Following my kernel compilation issue i used another method to get the source. I added : # custom patch for acs override support Patch6666: override_for_missing_acs_capabilities.patch
in my kernel.spec The patch is in rpmbuild/SOURCES but when i run the build it says the file is missing. Also to noted i wasn't able to apply the patch following documentation simply because it seems the patch application changed entirely ? So either the patch listed is apply automatically with the other in the code or i need to find the proper place to apply it. I posted below the command i use to build following by the error message, second paste is the sources i used.
http://fpaste.org/326707/00190714/
It seems i'm really close to succeeding in the case the patch is workng, just have to solve this and i should have proper patch kernel
It is not clear from this email what source of kernel rpm you are using to run rpmbuild for. Why can't you first specify what you are doing to what? Kernel source rpms. Link to said source rpms Your current OS release and current running kernel. Where did you obtain the patch file from?
yumdownloader --source kernel-4.2.3-300.fc23.x86_64 I use fedora 23 and the kernel 4.2.3-300
I got the patch from here : https://ask.fedoraproject.org/en/question/73697/acs-override-patch-on-fedora...
A modify version which is the most recent version of this patch i could find. I just want to apply this to my kernel to override pcie_acs and fix my iommu grouping. I've been on this for 3days so...
2016-02-20 22:11 GMT+01:00 jd1008 jd1008@gmail.com:
On 02/20/2016 02:04 PM, thibaut noah wrote:
Following my kernel compilation issue i used another method to get the source. I added : # custom patch for acs override support Patch6666: override_for_missing_acs_capabilities.patch
in my kernel.spec The patch is in rpmbuild/SOURCES but when i run the build it says the file is missing. Also to noted i wasn't able to apply the patch following documentation simply because it seems the patch application changed entirely ? So either the patch listed is apply automatically with the other in the code or i need to find the proper place to apply it. I posted below the command i use to build following by the error message, second paste is the sources i used.
http://fpaste.org/326707/00190714/
It seems i'm really close to succeeding in the case the patch is workng, just have to solve this and i should have proper patch kernel
It is not clear from this email what source of kernel rpm you are using
to run rpmbuild for. Why can't you first specify what you are doing to what? Kernel source rpms. Link to said source rpms Your current OS release and current running kernel. Where did you obtain the patch file from? -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
On 02/20/2016 02:20 PM, thibaut noah wrote:
yumdownloader --source kernel-4.2.3-300.fc23.x86_64 I use fedora 23 and the kernel 4.2.3-300
I got the patch from here : https://ask.fedoraproject.org/en/question/73697/acs-override-patch-on-fedora...
A modify version which is the most recent version of this patch i could find. I just want to apply this to my kernel to override pcie_acs and fix my iommu grouping. I've been on this for 3days so...
2016-02-20 22:11 GMT+01:00 jd1008 <jd1008@gmail.com mailto:jd1008@gmail.com>:
On 02/20/2016 02:04 PM, thibaut noah wrote: Following my kernel compilation issue i used another method to get the source. I added : # custom patch for acs override support Patch6666: override_for_missing_acs_capabilities.patch in my kernel.spec The patch is in rpmbuild/SOURCES but when i run the build it says the file is missing. Also to noted i wasn't able to apply the patch following documentation simply because it seems the patch application changed entirely ? So either the patch listed is apply automatically with the other in the code or i need to find the proper place to apply it. I posted below the command i use to build following by the error message, second paste is the sources i used. http://fpaste.org/326707/00190714/ http://ur1.ca/ojtmz It seems i'm really close to succeeding in the case the patch is workng, just have to solve this and i should have proper patch kernel It is not clear from this email what source of kernel rpm you are using to run rpmbuild for. Why can't you first specify what you are doing to what? Kernel source rpms. Link to said source rpms Your current OS release and current running kernel. Where did you obtain the patch file from?
You keep top posting. Please enter your reply at bottom of each message.
So you want to apply a patch from Fedora 22 on kernel for fedora 23?
How do you expect that to work?
Do you have any idea for which exact kernel version the patch was issued?
If you are trying to apply the patch to a kernel version other than the kernel version for which it was created, you should expect it to fail.
Furthermore the spec file needs to refer to the patch file also. Look at other spec files to see how patches are specified in them.
I am just using the respond feature of gmail, i don't know what you're talking about :/
Patch is say to work on 4.1.3 The thing is there is actually no patch that i know about for current kernel, i expect it to work because i checked it with upstream source earlier and it was working. Methods have indeed moved in quircks.c but the lines numbers are good in the patch.
There is a reference of the patch in the spec file, after rereading the documentation earlier i modify the number to follow the last patch number.
My problem is that fact that rpmbuild see the patch in the spec file but tells me it is missing.
2016-02-20 22:36 GMT+01:00 jd1008 jd1008@gmail.com:
On 02/20/2016 02:20 PM, thibaut noah wrote:
yumdownloader --source kernel-4.2.3-300.fc23.x86_64 I use fedora 23 and the kernel 4.2.3-300
I got the patch from here :
https://ask.fedoraproject.org/en/question/73697/acs-override-patch-on-fedora...
A modify version which is the most recent version of this patch i could find. I just want to apply this to my kernel to override pcie_acs and fix my iommu grouping. I've been on this for 3days so...
2016-02-20 22:11 GMT+01:00 jd1008 <jd1008@gmail.com mailto: jd1008@gmail.com>:
On 02/20/2016 02:04 PM, thibaut noah wrote: Following my kernel compilation issue i used another method to get the source. I added : # custom patch for acs override support Patch6666: override_for_missing_acs_capabilities.patch in my kernel.spec The patch is in rpmbuild/SOURCES but when i run the build it says the file is missing. Also to noted i wasn't able to apply the patch following documentation simply because it seems the patch application changed entirely ? So either the patch listed is apply automatically with the other in the code or i need to find the proper place to apply it. I posted below the command i use to build following by the error message, second paste is the sources i used. http://fpaste.org/326707/00190714/ http://ur1.ca/ojtmz It seems i'm really close to succeeding in the case the patch is workng, just have to solve this and i should have proper patch kernel It is not clear from this email what source of kernel rpm you are using to run rpmbuild for. Why can't you first specify what you are doing to what? Kernel source rpms. Link to said source rpms Your current OS release and current running kernel. Where did you obtain the patch file from?You keep top posting. Please enter your reply at bottom of each message.
So you want to apply a patch from Fedora 22 on kernel for fedora 23?
How do you expect that to work?
Do you have any idea for which exact kernel version the patch was issued?
If you are trying to apply the patch to a kernel version other than the kernel version for which it was created, you should expect it to fail.
Furthermore the spec file needs to refer to the patch file also. Look at other spec files to see how patches are specified in them.
-- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
On 02/20/2016 01:46 PM, thibaut noah wrote:
I am just using the respond feature of gmail, i don't know what you're talking about :/
I have a gmail account, although I'm not using it for this list. Gmail is set to assume top posting, but somehow, none of my replies go out top posted. Think of it as an IQ test, and try not to fail again.
2016-02-20 22:52 GMT+01:00 Joe Zeff joe@zeff.us:
On 02/20/2016 01:46 PM, thibaut noah wrote:
I am just using the respond feature of gmail, i don't know what you're talking about :/
I have a gmail account, although I'm not using it for this list. Gmail is set to assume top posting, but somehow, none of my replies go out top posted. Think of it as an IQ test, and try not to fail again.
Okay, i googled what top posting is. I did not to post, i just never quote what i'm replying too since text is not quoted when one press the answer button on gmail. What's the point of quoting everything when you just have to read the previous message 3centimeters on top? Also you sir are very rude, what the hell is wrong with you?
On 02/20/2016 02:08 PM, thibaut noah wrote:
Okay, i googled what top posting is. I did not to post, i just never quote what i'm replying too since text is not quoted when one press the answer button on gmail. What's the point of quoting everything when you just have to read the previous message 3centimeters on top? Also you sir are very rude, what the hell is wrong with you?
*Shrug!* When I reply to something from gmail, the entire message is quoted, but I trim it to what's relevant. Sometimes, I cut the quoted text into sections with replies in between to make it clear just what I'm responding to. It's not exactly rocket surgery, and I fail to understand why some of the people on the list find it so difficult, or think that they must include the entire message in their reply, including the boiler plate at the bottom. (Not that you did, but if you'll look at what we get in this list, very many posters do exactly that.)
Don't let it get you down noah - these mailing lists are antiquated - people get very religious about top-posting vs bottom-posting!!!!
On 20 Feb 2016, at 22:08, thibaut noah thibaut.noah@gmail.com wrote:
2016-02-20 22:52 GMT+01:00 Joe Zeff joe@zeff.us:
On 02/20/2016 01:46 PM, thibaut noah wrote: I am just using the respond feature of gmail, i don't know what you're talking about :/
I have a gmail account, although I'm not using it for this list. Gmail is set to assume top posting, but somehow, none of my replies go out top posted. Think of it as an IQ test, and try not to fail again.
Okay, i googled what top posting is. I did not to post, i just never quote what i'm replying too since text is not quoted when one press the answer button on gmail. What's the point of quoting everything when you just have to read the previous message 3centimeters on top? Also you sir are very rude, what the hell is wrong with you? -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
2016-02-20 23:14 GMT+01:00 Joe Zeff joe@zeff.us:
When I reply to something from gmail, the entire message is quoted, but I trim it to what's relevant. Sometimes, I cut the quoted text into sections with replies in between to make it clear just what I'm responding to. It's not exactly rocket surgery, and I fail to understand why some of the people on the list find it so difficult, or think that they must include the entire message in their reply, including the boiler plate at the bottom. (Not that you did, but if you'll look at what we get in this list, very many posters do exactly that.)
There is a difference between your expectations and people's regular behaviour. I personnaly NEVER quoted anyone in a mail before, and i'm using mails since 2005. Gmail does not include this function by default, so why should people go into the trouble of having to search what parameters they have to use for a feature they never use? I personnaly never heard of top posting before (i am french so maybe that's the reason, not sure about that), if you want people to follow certain guidelines, they should be advertise somewhere imo (like stackoverflow does)
On 20 Feb 2016, at 22:14, Joe Zeff joe@zeff.us wrote:
On 02/20/2016 02:08 PM, thibaut noah wrote:
Okay, i googled what top posting is. I did not to post, i just never quote what i'm replying too since text is not quoted when one press the answer button on gmail. What's the point of quoting everything when you just have to read the previous message 3centimeters on top? Also you sir are very rude, what the hell is wrong with you?
*Shrug!* When I reply to something from gmail, the entire message is quoted, but I trim it to what's relevant. Sometimes, I cut the quoted text into sections with replies in between to make it clear just what I'm responding to. It's not exactly rocket surgery, and I fail to understand why some of the people on the list find it so difficult, or think that they must include the entire message in their reply, including the boiler plate at the bottom. (Not that you did, but if you'll look at what we get in this list, very many posters do exactly that.)
users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Because my friend not many of us in this day & age have time to spend cutting & pasting bits of an email chain! Despite all the ancient protestations on this list - top-posting is becoming the norm! I presume you use facebook & linked-in - they are good examples of why these mailing lists are sailing against a head-wind.
On 02/20/2016 02:46 PM, thibaut noah wrote:
I am just using the respond feature of gmail, i don't know what you're talking about :/
Patch is say to work on 4.1.3 The thing is there is actually no patch that i know about for current kernel, i expect it to work because i checked it with upstream source earlier and it was working. Methods have indeed moved in quircks.c but the lines numbers are good in the patch.
There is a reference of the patch in the spec file, after rereading the documentation earlier i modify the number to follow the last patch number.
My problem is that fact that rpmbuild see the patch in the spec file but tells me it is missing.
2016-02-20 22:36 GMT+01:00 jd1008 <jd1008@gmail.com mailto:jd1008@gmail.com>:
On 02/20/2016 02:20 PM, thibaut noah wrote: yumdownloader --source kernel-4.2.3-300.fc23.x86_64 I use fedora 23 and the kernel 4.2.3-300 I got the patch from here : https://ask.fedoraproject.org/en/question/73697/acs-override-patch-on-fedora-22/ A modify version which is the most recent version of this patch i could find. I just want to apply this to my kernel to override pcie_acs and fix my iommu grouping. I've been on this for 3days so... 2016-02-20 22:11 GMT+01:00 jd1008 <jd1008@gmail.com <mailto:jd1008@gmail.com> <mailto:jd1008@gmail.com <mailto:jd1008@gmail.com>>>: On 02/20/2016 02:04 PM, thibaut noah wrote: Following my kernel compilation issue i used another method to get the source. I added : # custom patch for acs override support Patch6666: override_for_missing_acs_capabilities.patch in my kernel.spec The patch is in rpmbuild/SOURCES but when i run the build it says the file is missing. Also to noted i wasn't able to apply the patch following documentation simply because it seems the patch application changed entirely ? So either the patch listed is apply automatically with the other in the code or i need to find the proper place to apply it. I posted below the command i use to build following by the error message, second paste is the sources i used. http://fpaste.org/326707/00190714/ http://ur1.ca/ojtmz It seems i'm really close to succeeding in the case the patch is workng, just have to solve this and i should have proper patch kernel It is not clear from this email what source of kernel rpm you are using to run rpmbuild for. Why can't you first specify what you are doing to what? Kernel source rpms. Link to said source rpms Your current OS release and current running kernel. Where did you obtain the patch file from? You keep top posting. Please enter your reply at bottom of each message. So you want to apply a patch from Fedora 22 on kernel for fedora 23? How do you expect that to work? Do you have any idea for which exact kernel version the patch was issued? If you are trying to apply the patch to a kernel version other than the kernel version for which it was created, you should expect it to fail. Furthermore the spec file needs to refer to the patch file also. Look at other spec files to see how patches are specified in them.
You cannot set the number of the patch in the spec file to match some other spec file. If you do, then you need to re-number all the other patch files in mentioned in the spec file. Setting the number for the patch you want, you will mess up the sequence of patches which are often sequentially dependent. Best thing to do is is choose a number for the patch that is not currently assigned to any other patch in the pristine spec file. So, if you have, say... 10 patches in the pristine spec file, create an entry for patch 11 in the spec file.
This is no guarantee the patch will succeed.
As far as top posting, using web gmail and you decide to reply, gmail shows you an icon for the message you are replying to. The icon looks like a gray rectangle with 3 dots in it. Click on that and the message you are replying to will appear. Scroll down to bottom of that message and enter your reply there.
On 02/20/2016 03:21 PM, Ntlworld wrote:
Don't let it get you down noah - these mailing lists are antiquated - people get very religious about top-posting vs bottom-posting!!!!
On 20 Feb 2016, at 22:08, thibaut noah <thibaut.noah@gmail.com mailto:thibaut.noah@gmail.com> wrote:
2016-02-20 22:52 GMT+01:00 Joe Zeff <joe@zeff.us mailto:joe@zeff.us>:
On 02/20/2016 01:46 PM, thibaut noah wrote: I am just using the respond feature of gmail, i don't know what you're talking about :/ I have a gmail account, although I'm not using it for this list. Gmail is set to assume top posting, but somehow, none of my replies go out top posted. Think of it as an IQ test, and try not to fail again.Okay, i googled what top posting is. I did not to post, i just never quote what i'm replying too since text is not quoted when one press the answer button on gmail. What's the point of quoting everything when you just have to read the previous message 3centimeters on top? Also you sir are very rude, what the hell is wrong with you?
You are wrong sir. Reason why experienced people prefer bottom posting (i.e. replying) is because new people who want to read the whole thread in the hope that they find a solution similar to their problem, will be able to read the whole exchange and understand the relationship of the replies to the previous posts or replies. If you do not think this is useful, try to read a book about quantum physics by reading pages at random and see if you understand anything and how it relates to the rest of the book.
On 02/20/2016 02:23 PM, thibaut noah wrote:
I personnaly NEVER quoted anyone in a mail before, and i'm using mails since 2005.
I wouldn't be bragging about that if I were you. I was doing telephone tech support for an ISP back in '96, and nobody, including the suits was top posting back then.
Gmail does not include this function by default, so why should people go into the trouble of having to search what parameters they have to use for a feature they never use?
Speak for yourself. I use it all the time, and it doesn't take any searching. Gmail sets up the reply for top posting, but there's nothing in the world stopping you from moving the cursor down to the bottom where it belongs, or from trimming extraneous text from what you quote. (Again, I commend you for knowing how to keep your quoted text to what's relevant; I just wish that more of you kids would do it. There's a song from the musical Bye Bye Birdie that's relevant here, but you'd probably find it offensive, with good reason, and I've no desire to descend to that level.)
On 02/20/2016 02:27 PM, Ntlworld wrote:
I presume you use facebook & linked-in - they are good examples of why these mailing lists are sailing against a head-wind.
You presume wrong. I've never used the tome of farces, I'm not linked in and I've never visited Twitter. I have no use for them and consider them a complete waste of time. Farcebook is especially pernicious because they openly mine your data and sell it.
2016-02-20 23:27 GMT+01:00 jd1008 jd1008@gmail.com:
You cannot set the number of the patch in the spec file to match some other spec file. If you do, then you need to re-number all the other patch files in mentioned in the spec file. Setting the number for the patch you want, you will mess up the sequence of patches which are often sequentially dependent. Best thing to do is is choose a number for the patch that is not currently assigned to any other patch in the pristine spec file. So, if you have, say... 10 patches in the pristine spec file, create an entry for patch 11 in the spec file.
This is no guarantee the patch will succeed.
That's no what i did. I checked all the patches numbers and i set my patch number at last number + 1 to set a not used number.
On 02/20/2016 03:54 PM, thibaut noah wrote:
2016-02-20 23:27 GMT+01:00 jd1008 <jd1008@gmail.com mailto:jd1008@gmail.com>:
You cannot set the number of the patch in the spec file to match some other spec file. If you do, then you need to re-number all the other patch files in mentioned in the spec file. Setting the number for the patch you want, you will mess up the sequence of patches which are often sequentially dependent. Best thing to do is is choose a number for the patch that is not currently assigned to any other patch in the pristine spec file. So, if you have, say... 10 patches in the pristine spec file, create an entry for patch 11 in the spec file. This is no guarantee the patch will succeed.That's no what i did. I checked all the patches numbers and i set my patch number at last number + 1 to set a not used number.
OK. You did the right thing. So it should be obvious to you now that the patch from an older release will not work on a subsequent release.
2016-02-20 23:51 GMT+01:00 Joe Zeff joe@zeff.us:
Gmail sets up the reply for top posting, but there's nothing in the world stopping you from moving the cursor down to the bottom where it belongs, or from trimming extraneous text from what you quote. (Again, I commend you for knowing how to keep your quoted text to what's relevant; I just wish that more of you kids would do it)
No it does not by default, do you want me to post a video of what happens when i hit the reply button? First of all i'm not a kid, i'm 28 years old thank you. Second, i'm not your friend or your kid or whathever, stop talking to me like i am, know your place and stick with it.
Now, if we come back on topic i'm sure people would appreciate it.
On 02/20/2016 03:00 PM, thibaut noah wrote:
First of all i'm not a kid, i'm 28 years old thank you. Second, i'm not your friend or your kid or whathever, stop talking to me like i am, know your place and stick with it.
...and I'm 66, so to me, you're still a kid. I know my place, and I don't need people less than half my age telling me how to act. Nor, I'll grant, do I have any authority to tell you how to behave, although I am taking sides in this discussion of list etiquette.
On 02/20/2016 02:23 PM, thibaut noah wrote:
if you want people to follow certain guidelines, they should be advertise somewhere imo (like stackoverflow does)
In the footer that's included in every post including this one, there's a link to the Mailing List Guidelines. Go to http://fedoraproject.org/wiki/Mailing_list_guidelines#Proper_posting_style and read the part about not top posting for yourself.
On 2016-02-20 15:00, thibaut noah wrote:
First of all i'm not a kid, i'm 28 years old thank you.
Barely an adult. Probably doesn't pee in his pants anymore. Possible alleges to a college graduation.
{^_-} From my vantage point his a really callow child little more than 1/3 my age.
On 20.02.2016, thibaut noah wrote:
I got the patch from here : https://ask.fedoraproject.org/en/question/73697/acs-override-patch-on-fedora...
A modify version which is the most recent version of this patch i could find.
Here's the same patch ported to 4.4.2, avoiding the level 2 fuzz. It applies cleanly:
[root@chiara linux-4.4.2]# cat quirk.diff | patch -p2 patching file drivers/pci/quirks.c
diff -urN a/linux-4.4.2/drivers/pci/quirks.c b/linux-4.4.2/drivers/pci/quirks.c --- a/linux-4.4.2/drivers/pci/quirks.c 2016-02-17 21:31:25.000000000 +0100 +++ b/linux-4.4.2/drivers/pci/quirks.c 2016-02-21 09:30:52.154070792 +0100 @@ -3659,6 +3659,108 @@
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ADAPTEC2, 0x0285, quirk_fixed_dma_alias);
+static bool acs_on_downstream; +static bool acs_on_multifunction; + +#define NUM_ACS_IDS 16 +struct acs_on_id { + unsigned short vendor; + unsigned short device; +}; +static struct acs_on_id acs_on_ids[NUM_ACS_IDS]; +static u8 max_acs_id; + +static __init int pcie_acs_override_setup(char *p) +{ + if (!p) + return -EINVAL; + + while (*p) { + if (!strncmp(p, "downstream", 10)) + acs_on_downstream = true; + if (!strncmp(p, "multifunction", 13)) + acs_on_multifunction = true; + if (!strncmp(p, "id:", 3)) { + char opt[5]; + int ret; + long val; + + if (max_acs_id >= NUM_ACS_IDS - 1) { + pr_warn("Out of PCIe ACS override slots (%d)\n", + NUM_ACS_IDS); + goto next; + } + + p += 3; + snprintf(opt, 5, "%s", p); + ret = kstrtol(opt, 16, &val); + if (ret) { + pr_warn("PCIe ACS ID parse error %d\n", ret); + goto next; + } + acs_on_ids[max_acs_id].vendor = val; + + p += strcspn(p, ":"); + if (*p != ':') { + pr_warn("PCIe ACS invalid ID\n"); + goto next; + } + + p++; + snprintf(opt, 5, "%s", p); + ret = kstrtol(opt, 16, &val); + if (ret) { + pr_warn("PCIe ACS ID parse error %d\n", ret); + goto next; + } + acs_on_ids[max_acs_id].device = val; + max_acs_id++; + } +next: + p += strcspn(p, ","); + if (*p == ',') + p++; + } + + if (acs_on_downstream || acs_on_multifunction || max_acs_id) + pr_warn("Warning: PCIe ACS overrides enabled; This may allow non-IOMMU protected peer-to-peer DMA\n"); + + return 0; +} +early_param("pcie_acs_override", pcie_acs_override_setup); + +static int pcie_acs_overrides(struct pci_dev *dev, u16 acs_flags) +{ + int i; + + /* Never override ACS for legacy devices or devices with ACS caps */ + if (!pci_is_pcie(dev) || + pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ACS)) + return -ENOTTY; + + for (i = 0; i < max_acs_id; i++) + if (acs_on_ids[i].vendor == dev->vendor && + acs_on_ids[i].device == dev->device) + return 1; + + switch (pci_pcie_type(dev)) { + case PCI_EXP_TYPE_DOWNSTREAM: + case PCI_EXP_TYPE_ROOT_PORT: + if (acs_on_downstream) + return 1; + break; + case PCI_EXP_TYPE_ENDPOINT: + case PCI_EXP_TYPE_UPSTREAM: + case PCI_EXP_TYPE_LEG_END: + case PCI_EXP_TYPE_RC_END: + if (acs_on_multifunction && dev->multifunction) + return 1; + } + + return -ENOTTY; +} + + /* * A few PCIe-to-PCI bridges fail to expose a PCIe capability, resulting in * using the wrong DMA alias for the device. Some of these devices can be @@ -3964,6 +4066,7 @@ { PCI_VENDOR_ID_INTEL, 0x15b8, pci_quirk_mf_endpoint_acs }, /* Intel PCH root ports */ { PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_quirk_intel_pch_acs }, + { PCI_ANY_ID, PCI_ANY_ID, pcie_acs_overrides }, { 0x19a2, 0x710, pci_quirk_mf_endpoint_acs }, /* Emulex BE3-R */ { 0x10df, 0x720, pci_quirk_mf_endpoint_acs }, /* Emulex Skyhawk-R */ { 0 }
On 20/02/16 22:27, Ntlworld wrote:
Because my friend not many of us in this day & age have time to spend cutting & pasting bits of an email chain!
You're thinking about this the wrong way. Not many of us in "this day and age" have enough time to read email. For every email you write there may be thousands of readers. Their time is just as precious as yours; perhaps even more so. Therefore, if you want people to read your mail, you should do them the courtesy of quoting what is relevant and trimming the rest.
Despite all the ancient protestations on this list - top-posting is becoming the norm!
Well, yes. As the proportion of civilians using email goes up, the overall cluefulness level goes down.
Andrew.
2016-02-21 9:38 GMT+01:00 Heinz Diehl htd+ml@fritha.org:
Here's the same patch ported to 4.4.2, avoiding the level 2 fuzz. It applies cleanly
Current kernel is 4.3.5 through dnf update. There is still no easy way to get a 4.4.1 kernel on fedora since it seems one has to build his own package atm. So i have no way to use this patch on 4.4.2 since i have no way to run it, i'm already lost with patching my kernel i can't build my own package. Thanks though
On 21.02.2016, thibaut noah wrote:
So i have no way to use this patch on 4.4.2 since i have no way to run it, i'm already lost with patching my kernel i can't build my own package.
How to build a recent "Fedora kernel for the unexperienced":
1. Grab recent -stable from kernel.org and unpack it into /usr/src 2. Take a look into /boot and grab the config of your recent Fedora kernel. Example: config-4.2.5-300.fc23.x86_64 3. Rename this file to ".config" and copy it into the root directory of your unpacked source 4. Change into the source root directory 5. Do a "make oldconfig". If your new kernel is newer that your recent Fedora one, you'll have to answer some new question on the configuration of your new kernel. If you have no clue what to answer, a "no" for alle of the questions will do it in 95% of the cases. 6. Continue with "nice -n 19 make -j x", where x is the number of your cpus cores. 7. "make modules_install" 8. "make install" 9. Reboot, you're done.
This kernel will live peacefully together with your Fedora kernels, without affecting the rpm database or similar.
Btw: your patch should be applied after step 4 and before step 5 ;-)
On 21.02.2016, Heinz Diehl wrote:
[....]
Daah, today's not my day. Should have used a spelling & grammar correction, sorry for the broken English :-(
2016-02-21 17:32 GMT+01:00 Heinz Diehl htd+ml@fritha.org:
How to build a recent "Fedora kernel for the unexperienced":
- Grab recent -stable from kernel.org and unpack it into /usr/src
- Take a look into /boot and grab the config of your recent Fedora
kernel. Example: config-4.2.5-300.fc23.x86_64 3. Rename this file to ".config" and copy it into the root directory of your unpacked source 4. Change into the source root directory 5. Do a "make oldconfig". If your new kernel is newer that your recent Fedora one, you'll have to answer some new question on the configuration of your new kernel. If you have no clue what to answer, a "no" for alle of the questions will do it in 95% of the cases. 6. Continue with "nice -n 19 make -j x", where x is the number of your cpus cores. 7. "make modules_install" 8. "make install" 9. Reboot, you're done.
This kernel will live peacefully together with your Fedora kernels, without affecting the rpm database or similar.
Btw: your patch should be applied after step 4 and before step 5 ;-)
Thanks mate, didn't have first steps
2016-02-21 9:38 GMT+01:00 Heinz Diehl htd+ml@fritha.org:
Here's the same patch ported to 4.4.2, avoiding the level 2 fuzz. It applies cleanly:
[root@chiara linux-4.4.2]# cat quirk.diff | patch -p2 patching file drivers/pci/quirks.c
diff -urN a/linux-4.4.2/drivers/pci/quirks.c b/linux-4.4.2/drivers/pci/quirks.c --- a/linux-4.4.2/drivers/pci/quirks.c 2016-02-17 21:31:25.000000000 +0100 +++ b/linux-4.4.2/drivers/pci/quirks.c 2016-02-21 09:30:52.154070792 +0100 @@ -3659,6 +3659,108 @@
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ADAPTEC2, 0x0285, quirk_fixed_dma_alias);
+static bool acs_on_downstream; +static bool acs_on_multifunction;
+#define NUM_ACS_IDS 16 +struct acs_on_id {
- unsigned short vendor;
- unsigned short device;
+}; +static struct acs_on_id acs_on_ids[NUM_ACS_IDS]; +static u8 max_acs_id;
+static __init int pcie_acs_override_setup(char *p) +{
- if (!p)
return -EINVAL;- while (*p) {
if (!strncmp(p, "downstream", 10))acs_on_downstream = true;if (!strncmp(p, "multifunction", 13))acs_on_multifunction = true;if (!strncmp(p, "id:", 3)) {char opt[5];int ret;long val;if (max_acs_id >= NUM_ACS_IDS - 1) {pr_warn("Out of PCIe ACS override slots (%d)\n",NUM_ACS_IDS);goto next;}p += 3;snprintf(opt, 5, "%s", p);ret = kstrtol(opt, 16, &val);if (ret) {pr_warn("PCIe ACS ID parse error %d\n", ret);goto next;}acs_on_ids[max_acs_id].vendor = val;p += strcspn(p, ":");if (*p != ':') {pr_warn("PCIe ACS invalid ID\n");goto next;}p++;snprintf(opt, 5, "%s", p);ret = kstrtol(opt, 16, &val);if (ret) {pr_warn("PCIe ACS ID parse error %d\n", ret);goto next;}acs_on_ids[max_acs_id].device = val;max_acs_id++;}+next:
p += strcspn(p, ",");if (*p == ',')p++;- }
- if (acs_on_downstream || acs_on_multifunction || max_acs_id)
pr_warn("Warning: PCIe ACS overrides enabled; This may allownon-IOMMU protected peer-to-peer DMA\n");
- return 0;
+} +early_param("pcie_acs_override", pcie_acs_override_setup);
+static int pcie_acs_overrides(struct pci_dev *dev, u16 acs_flags) +{
- int i;
- /* Never override ACS for legacy devices or devices with ACS caps */
- if (!pci_is_pcie(dev) ||
pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ACS))return -ENOTTY;- for (i = 0; i < max_acs_id; i++)
if (acs_on_ids[i].vendor == dev->vendor &&acs_on_ids[i].device == dev->device)return 1;- switch (pci_pcie_type(dev)) {
- case PCI_EXP_TYPE_DOWNSTREAM:
- case PCI_EXP_TYPE_ROOT_PORT:
if (acs_on_downstream)return 1;break;- case PCI_EXP_TYPE_ENDPOINT:
- case PCI_EXP_TYPE_UPSTREAM:
- case PCI_EXP_TYPE_LEG_END:
- case PCI_EXP_TYPE_RC_END:
if (acs_on_multifunction && dev->multifunction)return 1;- }
- return -ENOTTY;
+}
/*
- A few PCIe-to-PCI bridges fail to expose a PCIe capability, resulting
in
- using the wrong DMA alias for the device. Some of these devices can be
@@ -3964,6 +4066,7 @@ { PCI_VENDOR_ID_INTEL, 0x15b8, pci_quirk_mf_endpoint_acs }, /* Intel PCH root ports */ { PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_quirk_intel_pch_acs },
{ PCI_ANY_ID, PCI_ANY_ID, pcie_acs_overrides }, { 0x19a2, 0x710, pci_quirk_mf_endpoint_acs }, /* Emulex BE3-R */ { 0x10df, 0x720, pci_quirk_mf_endpoint_acs }, /* Emulex Skyhawk-R*/ { 0 }
Hey mate, applying the patch at root directory of kernel 4.2.2 (downloaded from kernel.org)
cat acs_override.patch | patch -p2 patching file drivers/pci/quirks.c HUNK #2 FAILED at 4066
Here is a paste of the reject file : cat drivers/pci/quirks.c.rej --- drivers/pci/quirks.c 2016-02-17 21:31:25.000000000 +0100 +++ drivers/pci/quirks.c 2016-02-21 09:30:52.154070792 +0100 @@ -4066,6 +4168,7 @@ { PCI_VENDOR_ID_INTEL, 0x15b8, pci_quirk_mf_endpoint_acs }, /* Intel PCH root ports */ { PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_quirk_intel_pch_acs }, + { PCI_ANY_ID, PCI_ANY_ID, pcie_acs_overrides }, { 0x19a2, 0x710, pci_quirk_mf_endpoint_acs }, /* Emulex BE3-R */ { 0x10df, 0x720, pci_quirk_mf_endpoint_acs }, /* Emulex Skyhawk-R */ { 0 }
Not appying cleanly here, did i miss something?
2016-02-21 17:32 GMT+01:00 Heinz Diehl htd+ml@fritha.org:
- Grab recent -stable from kernel.org and unpack it into /usr/src
- Take a look into /boot and grab the config of your recent Fedora
kernel. Example: config-4.2.5-300.fc23.x86_64 3. Rename this file to ".config" and copy it into the root directory of your unpacked source 4. Change into the source root directory 5. Do a "make oldconfig". If your new kernel is newer that your recent Fedora one, you'll have to answer some new question on the configuration of your new kernel. If you have no clue what to answer, a "no" for alle of the questions will do it in 95% of the cases. 6. Continue with "nice -n 19 make -j x", where x is the number of your cpus cores. 7. "make modules_install" 8. "make install" 9. Reboot, you're done.
Failing at step 7 : http://fpaste.org/327222/39094145/ Error seems to be related to ssl, maybe a certificate creation for the kernel that fails?
ps : Fixed the HUNK failed by adding the line directly into the quirks.c file
2016-02-22 12:07 GMT+01:00 thibaut noah thibaut.noah@gmail.com:
Failing at step 7 : http://fpaste.org/327222/39094145/ Error seems to be related to ssl, maybe a certificate creation for the kernel that fails?
ps : Fixed the HUNK failed by adding the line directly into the quirks.c file
Error was mine, basically instead if you find yourself in my position, instead of tapping 'n' for no, if you want the default config just spam enter. Working just fine now thanks everyone.