aboutsummaryrefslogtreecommitdiffstats
path: root/tools/firmware/hvmloader
Commit message (Collapse)AuthorAgeFilesLines
* hvmloader/smbios: Change strncpy to memcpy for anchor stringsAndrew Cooper2013-09-271-4/+4
| | | | | | | | | | | | | | | Coverity complains about the use of strncpy() to completely fill the anchor strings, resulting in an unterminated string. Although the strncpy result is correct, the anchor strings are not strings in the C sense, and use of memcpy is the prevaling style elsewhere in hvmloader anyway. While tidying up the style in this function, also remove some trailing whitespace and gratuitous cast. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Keir Fraser <keir@xen.org>
* tools: allow user to specify a system seabios binaryFabio Fantoni2013-09-091-1/+5
| | | | | | | | | If this option is given don't bother building seabios ourselves. Likely to be handy for distros who have an existing seabios package which they want to reuse. Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* hvmloader: fix SeaBIOS interfaceJan Beulich2013-09-054-7/+7
| | | | | | | | | | | | | | | The SeaBIOS ROM image may validly exceed 128k in size, it's only our interface code that so far assumed that it wouldn't. Remove that restriction by setting the base address depending on image size. Add a check to HVM loader so that too big images won't result in silent guest failure anymore. Uncomment the intended build-time size check for rombios, moving it into a function so that it would actually compile. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* hvmloader/smbios: Correctly count the number of tables writtenAndrew Cooper2013-08-301-1/+2
| | | | | | | | | | | | Fixes regression indirectly introduced by c/s 4d23036e709627 That changeset added some smbios tables which were option based on the toolstack providing appropriate xenstore keys. The do_struct() macro would unconditionally increment nr_structs, even if a table was not actually written. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Keir Fraser <keir@xen.org>
* Revert "hvmloader: always include HPET table"Jan Beulich2013-07-081-5/+7
| | | | | | | | | | This reverts commit e4fd0475a08fda414da27c4e57b568f147cfc07e. Conflicts: tools/firmware/hvmloader/acpi/build.c Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir.xen@gmail.com>
* Revert "/home/jbeulich/tmp/commit.txt"Jan Beulich2013-07-081-7/+5
| | | | This reverts commit 80e3eddcc4896ab40c24506fd05f9795c4039b48.
* /home/jbeulich/tmp/commit.txtJan Beulich2013-07-081-5/+7
|
* libxl,hvmloader: Don't relocate memory for MMIO holeGeorge Dunlap2013-06-241-2/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the moment, qemu-xen can't handle memory being relocated by hvmloader. This may happen if a device with a large enough memory region is passed through to the guest. At the moment, if this happens, then at some point in the future qemu will crash and the domain will hang. (qemu-traditional is fine.) It's too late in the release to do a proper fix, so we try to do damage control. hvmloader already has mechanisms to relocate memory to 64-bit space if it can't make a big enough MMIO hole. By default this is 2GiB; if we just refuse to make the hole bigger if it will overlap with guest memory, then the relocation will happen by default. v5: - Update comment to not refer to "this series". v4: - Wrap long line in libxl_dm.c - Fix comment v3: - Fix polarity of comparison - Move diagnostic messages to another patch - Tested with xen platform pci device hacked to have different BAR sizes {256MiB, 1GiB} x {qemu-xen, qemu-traditional} x various memory configurations - Add comment explaining why we default to "allow" - Remove cast to bool v2: - style fixes - fix and expand comment on the MMIO hole loop - use "%d" rather than "%s" -> (...)?"1":"0" - use bool instead of uint8_t - Move 64-bit bar relocate detection to another patch - Add more diagnostic messages Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> CC: Ian Campbell <ian.campbell@citrix.com> CC: Stefano Stabellini <stefano.stabellini@citrix.com> CC: Hanweidong <hanweidong@huawei.com> CC: Keir Fraser <keir@xen.org> CC: Keir Fraser <keir@xen.org>
* hvmloader: Remove minimum size for BARs to relocate to 64-bit spaceGeorge Dunlap2013-06-242-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | Allow devices with BARs less than 512MiB to be relocated to high memory. This will only be invoked if there is not enough low MMIO space to map the device, and will be done preferentially to large devices first; so in all likelihood only large devices will be remapped anyway. This is needed to work-around the issue of qemu-xen not being able to handle moving guest memory around to resize the MMIO hole. The default MMIO hole size is less than 256MiB. v3: - Fixed minor style issue Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Reviewed-by: Jan Beulich <jbeulich@suse.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> CC: Ian Campbell <ian.campbell@citrix.com> CC: Hanweidong <hanweidong@huawei.com> CC: Keir Fraser <keir@xen.org>
* hvmloader: Load large devices into high MMIO space as neededGeorge Dunlap2013-06-241-1/+7
| | | | | | | | | | | | | | | | | | | | | | | Keep track of how much mmio space is left total, as well as the amount of "low" MMIO space (<4GiB), and only load devices into high memory if there is not enough low memory for the rest of the devices to fit. Because devices are processed by size in order from large to small, this should preferentially relocate devices with large BARs to 64-bit space. v3: - Just use mmio_total rather than introducing a new variable. - Port to using mem_resource directly rather than low_mmio_left Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Reviewed-by: Jan Beulich <jbeulich@suse.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> CC: Ian Campbell <ian.campbell@citrix.com> CC: Stefano Stabellini <stefano.stabellini@citrix.com> CC: Hanweidong <hanweidong@huawei.com> CC: Keir Fraser <keir@xen.org>
* hvmloader: Correct bug in low mmio region accountingGeorge Dunlap2013-06-241-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When deciding whether to map a device in low MMIO space (<4GiB), hvmloader compares it with "mmio_left", which is set to the size of the low MMIO range (pci_mem_end - pci_mem_start). However, even if it does map a device in high MMIO space, it still removes the size of its BAR from mmio_left. In reality we don't need to do a separate accounting of the low memory available -- this can be calculated from mem_resource. Just get rid of the variable and the duplicate accounting entirely. This will make the code more robust. Note also that the calculation of whether to move a device to 64-bit is fragile at the moment, depending on some unstated assumptions. State those assumptions in a comment for future reference. v5: - Add comment documenting fragility of the move-to-highmem check v3: - Use mem_resource values directly instead of doing duplicate accounting Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Reviewed-by: Jan Beulich <jbeulich@suse.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> CC: Ian Campbell <ian.campbell@citrix.com> CC: Stefano Stabellini <stefano.stabellini@citrix.com> CC: Hanweidong <hanweidong@huawei.com> CC: Keir Fraser <keir@xen.org>
* hvmloader: Fix check for needing a 64-bit barGeorge Dunlap2013-06-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | After attempting to resize the MMIO hole, the check to determine whether there is a need to relocate BARs into 64-bit space checks the specific thing that caused the loop to exit (MMIO hole == 2GiB) rather than checking whether the required MMIO will fit in the hole. But even then it does it wrong: the polarity of the check is backwards. Check for the actual condition we care about (the sizeof the MMIO hole) rather than checking for the loop exit condition. v3: - Move earlier in the series, before other functional changes Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Reviewed-by: Jan Beulich <jbeulich@suse.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> CC: Ian Jackson <ian.jackson@citrix.com> CC: Ian Campbell <ian.campbell@citrix.com> CC: Stefano Stabellini <stefano.stabellini@citrix.com> CC: Hanweidong <hanweidong@huawei.com> CC: Keir Fraser <keir@xen.org>
* hvmloader: Set up highmem resouce appropriately if there is no RAM above 4GGeorge Dunlap2013-06-241-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | hvmloader will read hvm_info->high_mem_pgend to calculate where to start the highmem PCI region. However, if the guest does not have any memory in the high region, this is set to zero, which will cause hvmloader to use the "0" for the base of the highmem region, rather than 1 << 32. Check to see whether hvm_info->high_mem_pgend is set; if so, do the normal calculation; otherwise, use 1<<32. v4: - Handle case where hfm_info->high_mem_pgend is non-zero but doesn't point into high memory, throwing a warning. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> CC: Ian Campbell <ian.campbell@citrix.com> CC: Ian Jackson <ian.jackson@citrix.com> CC: Stefano Stabellini <stefano.stabellini@citrix.com> CC: Hanweidong <hanweidong@huawei.com> CC: Keir Fraser <keir@xen.org>
* hvmloader: Make the printfs more informativeGeorge Dunlap2013-06-241-2/+11
| | | | | | | | | | | | | | | | | | | | | | | * Warn that you're relocating some BARs to 64-bit * Warn that you're relocating guest pages, and how many * Include upper 32-bits of the base register when printing the bar placement info v4: - Move message about relocating guest pages into loop, include number of pages and guest paddr - Fixed minor brace style issue Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> CC: Ian Campbell <ian.campbell@citrix.com> CC: Ian Jackson <ian.jackson@citrix.com> CC: Stefano Stabellini <stefano.stabellini@citrix.com> CC: Hanweidong <hanweidong@huawei.com> CC: Keir Fraser <keir@xen.org>
* hvmloader: Remove all 64-bit print argumentsGeorge Dunlap2013-06-242-4/+9
| | | | | | | | | | | | | | | | | | The printf() available to hvmloader does not handle 64-bit data types; manually break them down as two 32-bit strings. v4: - Make macros for the requisite format and bit shifting Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> CC: Ian Campbell <ian.campbell@citrix.com> CC: Ian Jackson <ian.jackson@citrix.com> CC: Stefano Stabellini <stefano.stabellini@citrix.com> CC: Hanweidong <hanweidong@huawei.com> CC: Keir Fraser <keir@xen.org>
* x86/HVM: RTC code must be in line with WAET flags passed by hvmloaderJan Beulich2013-05-211-4/+8
| | | | | | | | | | | | With hvmloader telling the guest that it may skip REG_C reads during the processing of RTC interrupts, the emulation code must not depend upon these reads to occur. Introduce two modes of operation for the emulation code, and short of a HVM parameter (too late to be introduced for 4.3) hard code the mode determination to always assume that Windows-conforming one for the time being. Signed-off-by: Jan Beulich <jbeulich@suse.com> Tested-by: Roger Pau Monné <roger.pau@citrix.com> (FreeBSD guest)
* genid: Introduce again Windows generation ID deviceFrediano Ziglio2013-02-211-0/+25
| | | | | | | | This device was removed due to change in specifications. Original patch written by Paul Durrant Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
* genid: Update Windows generation IDFrediano Ziglio2013-02-211-15/+34
| | | | | | | | | | | First draft specification document it as a 64bit counter, now are a 128bit value handled as a couple of 64bit values. Allow to disable the device is values are all zeroes. Add documentation for platform/generation-id key. Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
* Fix emacs local variable block to use correct C style variable.David Vrabel2013-02-2129-29/+29
| | | | | | | The emacs variable to set the C style from a local variable block is c-file-style, not c-set-style. Signed-off-by: David Vrabel <david.vrabel@citrix.com
* trivial: Optimize printnumFrediano Ziglio2013-02-151-14/+6
| | | | | | | | Reuse the string of hexadecimal numbers to simplify printnum implementation Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com> Acked-by: Keir Fraser <keir@xen.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* hvmloader: Allocate 3 pages for Intel GPU OpRegion passthrough.Keir Fraser2013-01-103-3/+5
| | | | | | | The 8kB region may not be page aligned, hence requiring 3 pages to be mapped through. Signed-off-by: Keir Fraser <keir@xen.org>
* HVM firmware passthrough ACPI processingRoss Philipson2013-01-101-1/+53
| | | | | | | | | ACPI table passthrough support allowing additional static tables and SSDTs (AML code) to be loaded. These additional tables are added at the end of the secondary table list in the RSDT/XSDT tables. Signed-off-by: Ross Philipson <ross.philipson@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* HVM firmware passthrough SMBIOS processingRoss Philipson2013-01-102-25/+363
| | | | | | | | | | | | Passthrough support for the SMBIOS structures including three new DMTF defined types and support for OEM defined tables. Passed in SMBIOS types override the default internal values. Default values can be enabled for the new type 22 portable battery using a xenstore flag. All other new DMTF defined and OEM structures will only be added to the SMBIOS table if passthrough values are present. Signed-off-by: Ross Philipson <ross.philipson@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader: Reserve FE700000-FE800000 in physical memory map for guest use.Keir Fraser2012-10-252-11/+22
| | | | | | | | | | | Xen platform promises never to use this physical address region, and will always mark it as reserved in the physical memory map presented to the OS (preventing its use by generic OS services such as BAR remapping). Linux will use this region for mapping the shared-info page. Signed-off-by: Keir Fraser <keir@xen.org>
* hvmloader: Add 64 bits big bar supportXiantao Zhang2012-10-014-25/+80
| | | | | | | | | | | Currently it is assumed PCI device BAR access < 4G memory. If there is such a device whose BAR size is larger than 4G, it must access > 4G memory address. This patch enable the 64bits big BAR support on hvmloader. Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Xudong Hao <xudong.hao@intel.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader: Do not zero the wallclock fields in shared-info.Keir Fraser2012-09-141-1/+5
| | | | | | | | | | | | | These fields need to be valid at all times. Hypervisor ensures this even across 32/64-bit guest transitions. This fixes a bug where wallclock time is incorrect for booting 32-bit HVM guests. This should be backported to Xen 4.1 and 4.2. Signed-off-by: Keir Fraser <keir@xen.org> Tested-and-Reported-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
* hvm: Remove VM genearation ID device and incr_generationid from build_info.Paul Durrant2012-08-221-25/+0
| | | | | | | | | | | | | | | | Microsoft have now published their VM generation ID specification at https://www.microsoft.com/en-us/download/details.aspx?id=30707. It differs from the original specification upon which I based my implementation in several key areas. Particularly, it is no longer an incrementing 64-bit counter and so this patch is to remove the incr_generationid field from the build_info and also disable the ACPI device before 4.2 is released. I will follow up with further patches to implement the VM generation ID to the new specification. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader: drop the ovmf32 support and rename ovmf64 -> ovmf.Attilio Rao2012-02-294-52/+18
| | | | | | | | | - Remove the 15cpus hack from ovmf because it should be unnecessary on nowadays windows/EFI supported. Signed-off-by: Attilio Rao <attilio.rao@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader: Add OVMF UEFI support and directly use itAttilio Rao2012-02-234-1/+179
| | | | | | | | | | | | | | | | | | | | | | | ...when specified in the guest configuration file. This work is somewhat based on Bei Guan effort during the SoC 2011 and relies on upstream edk2/ovmf Tianocore ROM to be built separately and manually copied as: Build/OvmfX64/DEBUG_GCC44/FV/OVMF.fd -> tools/firmware/ovmf/ovmf-x64.bin Build/OvmfIa32/DEBUG_GCC44/FV/OVMF.fd -> toolf/firmware/ovmf/ovmf-ia32.bin A way to integrate OVMF build directly into XEN has still be discussed on the mailing list appropriately. Signed-off-by: Attilio Rao <attilio.rao@citrix.com> Disable CONFIG_OVMF by default as ovmf is not integrated into the build. Signed-off-by: Keir Fraser <keir@xen.org> Committed-by: Keir Fraser <keir@xen.org>
* firmware: Introduce CONFIG_ROMBIOS and CONFIG_SEABIOS optionsJulian Pidancet2012-02-131-13/+19
| | | | | | | | | | | | | | | | | | | This patch introduces configuration options allowing to built either a rombios only or a seabios only hvmloader. Building option ROMs like vgabios or etherboot is only enabled for a rombios hvmloader, since SeaBIOS takes care or extracting option ROMs itself from the PCI devices (these option ROMs are provided by the device model and do not need to be built in hvmloader). The Makefile in tools/firmware/ now only checks for bcc if rombios is enabled. These two configuration options are left on by default to remain compatible. Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* hvmloader: Move option ROM loading into a separate optionnal fileJulian Pidancet2012-02-137-228/+259
| | | | | | | | | | | | Make load_rom field in struct bios_config an optionnal callback rather than a boolean value. It allow BIOS specific code to implement it's own option ROM loading methods. Facilities to scan PCI devices, extract an deploy ROMs are moved into a separate file that can be compiled optionnaly. Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* firmware: Use mkhex from hvmloader directory for etherboot ROMsJulian Pidancet2012-02-131-3/+6
| | | | | | | | | | | | | To remain consistent with how other ROMs are built into hvmloader, call mkhex on etherboot ROMs from the hvmloader directory, instead of the etherboot directory. In other words, eb-roms.h is not used any more. Introduce ETHERBOOT_NICS config option to choose which ROMs should be built (kept rtl8139 and 8086100e per default as before). Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* hvmloader: Allow the mkhex command to take several file argumentsJulian Pidancet2012-02-131-1/+2
| | | | | Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* hvmloader: Only compile 32bitbios_support.c when rombios is enabledJulian Pidancet2012-02-131-2/+2
| | | | | | | | | 32bitbios_support.c only contains code specific to rombios, and should not be built-in when building hvmloader for SeaBIOS only (as for rombios.c). Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* Clone and build Seabios by default2012-01-241-0/+1
| | | | | | | | From: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* hvmloader: Re-name xenstore key used to save VM generation ID buffer address.Paul Durrant2011-12-181-1/+1
| | | | Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
* tools/firmware: remove "_PS0/3" MethodXudong Hao2011-12-051-10/+0
| | | | | | | | | | | | | | | | Do not expose the ACPI power management "_PS0/3" Method to guest firmware. According to section 3.4 of the APCI specification 4.0, PCI device control the device power through its own specification but not through APCI. Qemu pushes "_PS0/3" to guest will cause a mess between ACPI PM and PCI PM as a result of incorrect ACPI table shipped with the guest BIOS, it may cause a failure of PCI device PM state transition(from PCI_UNKNOWN to PCI_D0). Signed-off-by: Xudong Hao <xudong.hao@intel.com> Signed-off-by: Haitao Shan <haitao.shan@intel.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader: Change VM Generation Id Device HID.Paul Durrant2011-12-021-1/+1
| | | | | | | | | Unfortunately a HID of PNP0A06 will not work for an existing client driver so this patch aims to choose something that's pretty certain not to class with anything else. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader: Write address of VM generation id buffer into xenstorePaul Durrant2011-11-301-0/+6
| | | | | Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader: Add xenstore-write supportPaul Durrant2011-11-302-16/+65
| | | | | Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader: Add snprintf()Paul Durrant2011-11-302-13/+60
| | | | | Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader: Allocate an 8 byte buffer to contain the VM generation idPaul Durrant2011-11-303-0/+92
| | | | | | | | | | | | | and populate it at boot time with a value read from "platform/generation_id". Also add code to libxl to populate this xenstore key with the value of a new 'generation_id' parameter in the VM config file. Populate the ADDR package of VM_Gen_Counter ACPI device such that the first integer evaluates to the low order 32 bits of the buffer address and the second integer evaluates to the high order 32 bits of the buffer address. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader: Add 'ctype' infrastructurePaul Durrant2011-11-305-3/+58
| | | | | Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader: Add an ACPI device exposing a package called ADDR,Paul Durrant2011-11-302-1/+28
| | | | | | | | evaluating to two integers, and with _CID and _DDN set to "VM_Gen_Counter". Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader: Intel GPU passthrough, reverse OpRegionJean Guyader2011-11-244-4/+45
| | | | | | | | | | | | | | The Intel GPU uses a two pages NVS region called OpRegion. In order to get full support for the driver in the guest we need to map this region. This patch reserves 2 pages on the top of the memory in the reserved area and mark this region as NVS in the e820. Then we write the address to the config space (offset 0xfc) so the device model can map the OpRegion at this address in the guest. Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader: Fix memory relocation loop.Keir Fraser2011-11-212-13/+18
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* hvmloader: Change memory relocation loop when overlap with PCI holeJean Guyader2011-11-181-6/+14
| | | | | | | | | | | | | | | | Change the way we relocate the memory page if they overlap with pci hole. Use new map space (XENMAPSPACE_gmfn_range) to move the loop into xen. This code usually get triggered when a device is pass through to a guest and the PCI hole has to be extended to have enough room to map the device BARs. The PCI hole will starts lower and it might overlap with some RAM that has been alocated for the guest. That usually happen if the guest has more than 4G of RAM. We have to relocate those pages in high mem otherwise they won't be accessible. Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader: Add configuration options to selectively disable S3 and S4 ACPI ↵Paul Durrant2011-11-185-20/+89
| | | | | | | | | | | power states. Introduce acpi_s3 and acpi_s4 configuration options (default=1). The S3 and S4 packages are moved into separate SSDTs and their inclusion is controlled by the new configuration options. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader: Move acpi_enabled out of hvm_info_table into xenstorePaul Durrant2011-11-181-1/+4
| | | | | | | | | Since hvmloader has a xentore client, use a platform key in xenstore to indicate whether ACPI is enabled or not rather than the shared hvm_info_table structure. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader: Move acpi_info structure out from low memory.Keir Fraser2011-11-146-54/+24
| | | | | | | | This avoids a conflict with SeaBIOS's memory management. Moreover there is no reason that acp_info must live below 1MB, and moving it out actually simplifies our code. Signed-off-by: Keir Fraser <keir@xen.org>