Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1465860 > unrolled thread
| Started by | Matthew Wilcox <mawilcox@linuxonhyperv.com> |
|---|---|
| First post | 2016-08-19 04:00 +0200 |
| Last post | 2016-08-19 18:50 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH 1/2] x86: Set up resources correctly on Hyper-V Generation 2 Matthew Wilcox <mawilcox@linuxonhyperv.com> - 2016-08-19 04:00 +0200
Re: [PATCH 1/2] x86: Set up resources correctly on Hyper-V Generation 2 Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> - 2016-08-19 18:10 +0200
RE: [PATCH 1/2] x86: Set up resources correctly on Hyper-V Generation 2 Matthew Wilcox <mawilcox@microsoft.com> - 2016-08-19 18:50 +0200
| From | Matthew Wilcox <mawilcox@linuxonhyperv.com> |
|---|---|
| Date | 2016-08-19 04:00 +0200 |
| Subject | [PATCH 1/2] x86: Set up resources correctly on Hyper-V Generation 2 |
| Message-ID | <s7GtR-7go-49@gated-at.bofh.it> |
From: Matthew Wilcox <mawilcox@microsoft.com>
The Generation 2 Hyper-V virtual machine does not emulate PCI.
This check causes the call to pcibios_resource_survey() to be skipped,
and pcibios_resource_survey() calls e820_reserve_resources_late(), which
is where PMEM resources are added to the resource tree. With this patch,
the PMEM devices now show up.
Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
---
arch/x86/pci/common.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c
index 7b6a9d1..d39e799 100644
--- a/arch/x86/pci/common.c
+++ b/arch/x86/pci/common.c
@@ -516,11 +516,6 @@ void __init pcibios_set_cache_line_size(void)
int __init pcibios_init(void)
{
- if (!raw_pci_ops && !raw_pci_ext_ops) {
- printk(KERN_WARNING "PCI: System does not support PCI\n");
- return 0;
- }
-
pcibios_set_cache_line_size();
pcibios_resource_survey();
--
2.8.1
[toc] | [next] | [standalone]
| From | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> |
|---|---|
| Date | 2016-08-19 18:10 +0200 |
| Subject | Re: [PATCH 1/2] x86: Set up resources correctly on Hyper-V Generation 2 |
| Message-ID | <s7UwN-7Nv-5@gated-at.bofh.it> |
| In reply to | #1465860 |
On Thu, Aug 18, 2016 at 12:12:54PM -0700, Matthew Wilcox wrote:
> From: Matthew Wilcox <mawilcox@microsoft.com>
>
> The Generation 2 Hyper-V virtual machine does not emulate PCI.
> This check causes the call to pcibios_resource_survey() to be skipped,
> and pcibios_resource_survey() calls e820_reserve_resources_late(), which
> is where PMEM resources are added to the resource tree. With this patch,
> the PMEM devices now show up.
>
> Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
> ---
> arch/x86/pci/common.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c
> index 7b6a9d1..d39e799 100644
> --- a/arch/x86/pci/common.c
> +++ b/arch/x86/pci/common.c
> @@ -516,11 +516,6 @@ void __init pcibios_set_cache_line_size(void)
>
> int __init pcibios_init(void)
> {
> - if (!raw_pci_ops && !raw_pci_ext_ops) {
> - printk(KERN_WARNING "PCI: System does not support PCI\n");
> - return 0;
> - }
So shouldn't this be gated on whether the platform is HyperV?
> -
> pcibios_set_cache_line_size();
> pcibios_resource_survey();
>
> --
> 2.8.1
>
> _______________________________________________
> Linux-nvdimm mailing list
> Linux-nvdimm@lists.01.org
> https://lists.01.org/mailman/listinfo/linux-nvdimm
[toc] | [prev] | [next] | [standalone]
| From | Matthew Wilcox <mawilcox@microsoft.com> |
|---|---|
| Date | 2016-08-19 18:50 +0200 |
| Subject | RE: [PATCH 1/2] x86: Set up resources correctly on Hyper-V Generation 2 |
| Message-ID | <s7V9v-82q-3@gated-at.bofh.it> |
| In reply to | #1466534 |
I don't think we need to gate this based on the platform. If you look at the differences between what is done:
- The printk is no longer called. That's fine; we already did the printk modified in patch 2/2. The user is aware there machine doesn't have PCI :-)
- We set the cacheline size. That's copying a value from the cpuinfo to a global __read_mostly variable and emitting a printk. No big deal.
- In pcibios_resource_survey, we iterate over three empty lists, call e820_reserve_resources_late() (which is what we want!) and call ioapic_insert_resources() (which I rather think we want too)
In short, not calling these functions is a bug. We just haven't noticed before now because PCI is so omnipresent.
-----Original Message-----
From: Konrad Rzeszutek Wilk [mailto:konrad.wilk@oracle.com]
Sent: Friday, August 19, 2016 12:07 PM
To: Matthew Wilcox <mawilcox@linuxonhyperv.com>
Cc: x86@kernel.org; linux-kernel@vger.kernel.org; linux-nvdimm@ml01.01.org; Matthew Wilcox <mawilcox@microsoft.com>
Subject: Re: [PATCH 1/2] x86: Set up resources correctly on Hyper-V Generation 2
On Thu, Aug 18, 2016 at 12:12:54PM -0700, Matthew Wilcox wrote:
> @@ -516,11 +516,6 @@ void __init pcibios_set_cache_line_size(void)
>
> int __init pcibios_init(void)
> {
> - if (!raw_pci_ops && !raw_pci_ext_ops) {
> - printk(KERN_WARNING "PCI: System does not support PCI\n");
> - return 0;
> - }
So shouldn't this be gated on whether the platform is HyperV?
> -
> pcibios_set_cache_line_size();
> pcibios_resource_survey();
>
> --
> 2.8.1
>
> _______________________________________________
> Linux-nvdimm mailing list
> Linux-nvdimm@lists.01.org
> https://lists.01.org/mailman/listinfo/linux-nvdimm
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web