|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] hvmloader: Allocate 3 pages for Intel GPU OpRegion passthrough.
# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1357838784 0
# Node ID d912bf7f6d220da455831c671e89375b7e92ee64
# Parent b9c38bea15b117552ecb51809779c7cfef82dd44
hvmloader: Allocate 3 pages for Intel GPU OpRegion passthrough.
The 8kB region may not be page aligned, hence requiring 3 pages to
be mapped through.
Signed-off-by: Keir Fraser <keir@xxxxxxx>
---
diff -r b9c38bea15b1 -r d912bf7f6d22 tools/firmware/hvmloader/config.h
--- a/tools/firmware/hvmloader/config.h Thu Jan 10 17:18:43 2013 +0000
+++ b/tools/firmware/hvmloader/config.h Thu Jan 10 17:26:24 2013 +0000
@@ -5,7 +5,9 @@
enum virtual_vga { VGA_none, VGA_std, VGA_cirrus, VGA_pt };
extern enum virtual_vga virtual_vga;
+
extern unsigned long igd_opregion_pgbase;
+#define IGD_OPREGION_PAGES 3
struct bios_config {
const char *name;
diff -r b9c38bea15b1 -r d912bf7f6d22 tools/firmware/hvmloader/e820.c
--- a/tools/firmware/hvmloader/e820.c Thu Jan 10 17:18:43 2013 +0000
+++ b/tools/firmware/hvmloader/e820.c Thu Jan 10 17:26:24 2013 +0000
@@ -142,11 +142,11 @@ int build_e820_table(struct e820entry *e
nr++;
e820[nr].addr = igd_opregion_base;
- e820[nr].size = 2 * PAGE_SIZE;
+ e820[nr].size = IGD_OPREGION_PAGES * PAGE_SIZE;
e820[nr].type = E820_NVS;
nr++;
- e820[nr].addr = igd_opregion_base + 2 * PAGE_SIZE;
+ e820[nr].addr = igd_opregion_base + IGD_OPREGION_PAGES * PAGE_SIZE;
e820[nr].size = (uint32_t)-e820[nr].addr;
e820[nr].type = E820_RESERVED;
nr++;
diff -r b9c38bea15b1 -r d912bf7f6d22 tools/firmware/hvmloader/pci.c
--- a/tools/firmware/hvmloader/pci.c Thu Jan 10 17:18:43 2013 +0000
+++ b/tools/firmware/hvmloader/pci.c Thu Jan 10 17:26:24 2013 +0000
@@ -104,7 +104,7 @@ void pci_setup(void)
virtual_vga = VGA_pt;
if ( vendor_id == 0x8086 )
{
- igd_opregion_pgbase = mem_hole_alloc(2);
+ igd_opregion_pgbase = mem_hole_alloc(IGD_OPREGION_PAGES);
/*
* Write the the OpRegion offset to give the opregion
* address to the device model. The device model will trap
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |