[v2] x86,xen,pci: don't use PCI BIOS service for configuration space accesses

Submitted by David Vrabel on May 4, 2012, 1:29 p.m.

Details

Message ID 1336138186-11423-1-git-send-email-david.vrabel@citrix.com
State Not Applicable
Headers show

Commit Message

David Vrabel May 4, 2012, 1:29 p.m.
From: David Vrabel <david.vrabel@citrix.com>

The accessing PCI configuration space with the PCI BIOS32 service does
not work in PV guests.

On systems without MMCONFIG or where the BIOS hasn't marked the
MMCONFIG region as reserved in the e820 map, the BIOS service is
probed (even though direct access is preferred) and this hangs.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
---
Changes in v2:
- improve commit message

---
 arch/x86/xen/enlighten.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

Comments

Jan Beulich May 4, 2012, 1:58 p.m.
>>> On 04.05.12 at 15:29, David Vrabel <david.vrabel@citrix.com> wrote:
> From: David Vrabel <david.vrabel@citrix.com>
> 
> The accessing PCI configuration space with the PCI BIOS32 service does
> not work in PV guests.
> 
> On systems without MMCONFIG or where the BIOS hasn't marked the
> MMCONFIG region as reserved in the e820 map, the BIOS service is
> probed (even though direct access is preferred) and this hangs.
> 
> Signed-off-by: David Vrabel <david.vrabel@citrix.com>

Acked-by: Jan Beulich <jbeulich@suse.com>

> ---
> Changes in v2:
> - improve commit message
> 
> ---
>  arch/x86/xen/enlighten.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
> index a8f8844..7ce2c78 100644
> --- a/arch/x86/xen/enlighten.c
> +++ b/arch/x86/xen/enlighten.c
> @@ -63,6 +63,7 @@
>  #include <asm/stackprotector.h>
>  #include <asm/hypervisor.h>
>  #include <asm/mwait.h>
> +#include <asm/pci_x86.h>
>  
>  #ifdef CONFIG_ACPI
>  #include <linux/acpi.h>
> @@ -1365,7 +1366,9 @@ asmlinkage void __init xen_start_kernel(void)
>  		/* Make sure ACS will be enabled */
>  		pci_request_acs();
>  	}
> -		
> +
> +	/* PCI BIOS service won't work from a PV guest. */
> +	pci_probe &= ~PCI_PROBE_BIOS;
>  
>  	xen_raw_console_write("about to get started...\n");
>  
> -- 
> 1.7.2.5
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org 
> http://lists.xen.org/xen-devel 



--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch hide | download patch | download mbox

diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index a8f8844..7ce2c78 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -63,6 +63,7 @@ 
 #include <asm/stackprotector.h>
 #include <asm/hypervisor.h>
 #include <asm/mwait.h>
+#include <asm/pci_x86.h>
 
 #ifdef CONFIG_ACPI
 #include <linux/acpi.h>
@@ -1365,7 +1366,9 @@  asmlinkage void __init xen_start_kernel(void)
 		/* Make sure ACS will be enabled */
 		pci_request_acs();
 	}
-		
+
+	/* PCI BIOS service won't work from a PV guest. */
+	pci_probe &= ~PCI_PROBE_BIOS;
 
 	xen_raw_console_write("about to get started...\n");