Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234221
b: refs/heads/master
c: 53d5522
h: refs/heads/master
i:
  234219: b0bc7f7
v: v3
  • Loading branch information
Stefano Stabellini committed Feb 25, 2011
1 parent 6706498 commit a8fa922
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c80a420995e721099906607b07c09a24543b31d9
refs/heads/master: 53d5522cad291a0e93a385e0594b6aea6b54a071
14 changes: 9 additions & 5 deletions trunk/drivers/xen/balloon.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ static int increase_reservation(unsigned long nr_pages)
set_phys_to_machine(pfn, frame_list[i]);

/* Link back into the page tables if not highmem. */
if (pfn < max_low_pfn) {
if (!xen_hvm_domain() && pfn < max_low_pfn) {
int ret;
ret = HYPERVISOR_update_va_mapping(
(unsigned long)__va(pfn << PAGE_SHIFT),
Expand Down Expand Up @@ -280,7 +280,7 @@ static int decrease_reservation(unsigned long nr_pages)

scrub_page(page);

if (!PageHighMem(page)) {
if (!xen_hvm_domain() && !PageHighMem(page)) {
ret = HYPERVISOR_update_va_mapping(
(unsigned long)__va(pfn << PAGE_SHIFT),
__pte_ma(0), 0);
Expand Down Expand Up @@ -392,15 +392,19 @@ static struct notifier_block xenstore_notifier;

static int __init balloon_init(void)
{
unsigned long pfn, extra_pfn_end;
unsigned long pfn, nr_pages, extra_pfn_end;
struct page *page;

if (!xen_pv_domain())
if (!xen_domain())
return -ENODEV;

pr_info("xen_balloon: Initialising balloon driver.\n");

balloon_stats.current_pages = min(xen_start_info->nr_pages, max_pfn);
if (xen_pv_domain())
nr_pages = xen_start_info->nr_pages;
else
nr_pages = max_pfn;
balloon_stats.current_pages = min(nr_pages, max_pfn);
balloon_stats.target_pages = balloon_stats.current_pages;
balloon_stats.balloon_low = 0;
balloon_stats.balloon_high = 0;
Expand Down

0 comments on commit a8fa922

Please sign in to comment.