diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2015-06-23 17:46:20 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2015-06-23 17:46:20 +0100 |
commit | 000d6042da0d73e5a71318b5fa96e5a084534d12 (patch) | |
tree | c1991a13a2941ca70dc032d419993b386fa1303c /xen-hvm.c | |
parent | 6966b2a07190004e18ede33ce50a65009b36f3a6 (diff) | |
parent | ffffbb369f3ed9bca5ff2867143f76d0c6e069c0 (diff) |
Merge remote-tracking branch 'remotes/sstabellini/tags/xen-220615-3' into staging
xen-220615, more SOB lines
# gpg: Signature made Tue Jun 23 17:19:08 2015 BST using RSA key ID 70E1AE90
# gpg: Good signature from "Stefano Stabellini <stefano.stabellini@eu.citrix.com>"
* remotes/sstabellini/tags/xen-220615-3:
Revert "xen-hvm: increase maxmem before calling xc_domain_populate_physmap"
xen/pass-through: constify some static data
xen/pass-through: log errno values rather than function return ones
xen/pass-through: ROM BAR handling adjustments
xen/pass-through: fold host PCI command register writes
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'xen-hvm.c')
-rw-r--r-- | xen-hvm.c | 24 |
1 files changed, 0 insertions, 24 deletions
@@ -87,12 +87,6 @@ static inline ioreq_t *xen_vcpu_ioreq(shared_iopage_t *shared_page, int vcpu) #endif #define BUFFER_IO_MAX_DELAY 100 -/* Leave some slack so that hvmloader does not complain about lack of - * memory at boot time ("Could not allocate order=0 extent"). - * Once hvmloader is modified to cope with that situation without - * printing warning messages, QEMU_SPARE_PAGES can be removed. - */ -#define QEMU_SPARE_PAGES 16 typedef struct XenPhysmap { hwaddr start_addr; @@ -250,8 +244,6 @@ void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size, MemoryRegion *mr) unsigned long nr_pfn; xen_pfn_t *pfn_list; int i; - xc_domaininfo_t info; - unsigned long free_pages; if (runstate_check(RUN_STATE_INMIGRATE)) { /* RAM already populated in Xen */ @@ -274,22 +266,6 @@ void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size, MemoryRegion *mr) pfn_list[i] = (ram_addr >> TARGET_PAGE_BITS) + i; } - if ((xc_domain_getinfolist(xen_xc, xen_domid, 1, &info) != 1) || - (info.domain != xen_domid)) { - hw_error("xc_domain_getinfolist failed"); - } - free_pages = info.max_pages - info.tot_pages; - if (free_pages > QEMU_SPARE_PAGES) { - free_pages -= QEMU_SPARE_PAGES; - } else { - free_pages = 0; - } - if ((free_pages < nr_pfn) && - (xc_domain_setmaxmem(xen_xc, xen_domid, - ((info.max_pages + nr_pfn - free_pages) - << (XC_PAGE_SHIFT - 10))) < 0)) { - hw_error("xc_domain_setmaxmem failed"); - } if (xc_domain_populate_physmap_exact(xen_xc, xen_domid, nr_pfn, 0, 0, pfn_list)) { hw_error("xen: failed to populate ram at " RAM_ADDR_FMT, ram_addr); } |