linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Juergen Gross <jgross@suse.com>,
	Julien Grall <julien.grall@arm.com>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Matthew Wilcox <willy@infradead.org>
Cc: k.khlebnikov@samsung.com,
	Stefano Stabellini <sstabellini@kernel.org>,
	Kees Cook <keescook@chromium.org>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	"VMware, Inc." <pv-drivers@vmware.com>,
	osstest service owner <osstest-admin@xenproject.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-mm@kvack.org, Julien Freche <jfreche@vmware.com>,
	Nadav Amit <namit@vmware.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [Xen-devel] xen: Can't insert balloon page into VM userspace (WAS Re: [linux-linus bisection] complete test-arm64-arm64-xl-xsm)
Date: Thu, 14 Mar 2019 15:16:37 +0100	[thread overview]
Message-ID: <7ab068a3-2eaf-0eb0-cf25-43635e198ef7@redhat.com> (raw)
In-Reply-To: <d3e87824-b3a2-ed8a-d2ca-1a9fd439a204@suse.com>

On 14.03.19 15:15, Juergen Gross wrote:
> On 14/03/2019 15:12, Julien Grall wrote:
>> Hi,
>>
>> On 3/14/19 8:37 AM, Juergen Gross wrote:
>>> On 12/03/2019 20:46, David Hildenbrand wrote:
>>>> On 12.03.19 19:23, David Hildenbrand wrote:
>>>>
>>>> I guess something like this could do the trick if I understood it
>>>> correctly:
>>>>
>>>> diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c
>>>> index 39b229f9e256..d37dd5bb7a8f 100644
>>>> --- a/drivers/xen/balloon.c
>>>> +++ b/drivers/xen/balloon.c
>>>> @@ -604,6 +604,7 @@ int alloc_xenballooned_pages(int nr_pages, struct
>>>> page **pages)
>>>>          while (pgno < nr_pages) {
>>>>                  page = balloon_retrieve(true);
>>>>                  if (page) {
>>>> +                       __ClearPageOffline(page);
>>>>                          pages[pgno++] = page;
>>>>   #ifdef CONFIG_XEN_HAVE_PVMMU
>>>>                          /*
>>>> @@ -645,8 +646,10 @@ void free_xenballooned_pages(int nr_pages, struct
>>>> page **pages)
>>>>          mutex_lock(&balloon_mutex);
>>>>
>>>>          for (i = 0; i < nr_pages; i++) {
>>>> -               if (pages[i])
>>>> +               if (pages[i]) {
>>>> +                       __SetPageOffline(pages[i]);
>>>>                          balloon_append(pages[i]);
>>>> +               }
>>>>          }
>>>>
>>>>          balloon_stats.target_unpopulated -= nr_pages;
>>>>
>>>>
>>>> At least this way, the pages allocated (and thus eventually mapped to
>>>> user space) would not be marked, but the other ones would remain marked
>>>> and could be excluded by makedumptool.
>>>>
>>>
>>> I think this patch should do the trick. Julien, could you give it a
>>> try? On x86 I can't reproduce your problem easily as dom0 is PV with
>>> plenty of unpopulated pages for grant memory not suffering from
>>> missing "offline" bit.
>>
>> Sure. I managed to get the console working with the patch suggested by
>> David. Feel free to add my tested-by if when you resend it as is.
> 
> David, could you please send a proper patch with your Sob?
> 

Yes, on it :)

Cheers!

> 
> Juergen
> 


-- 

Thanks,

David / dhildenb

  reply	other threads:[~2019-03-14 14:16 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1h3Uiq-0002L6-Ij@osstest.test-lab.xenproject.org>
     [not found] ` <80211e70-5f54-9421-8e8f-2a4fc758ce39@arm.com>
2019-03-12 17:05   ` xen: Can't insert balloon page into VM userspace (WAS Re: [Xen-devel] [linux-linus bisection] complete test-arm64-arm64-xl-xsm) Julien Grall
2019-03-12 17:14     ` Matthew Wilcox
2019-03-12 17:18       ` David Hildenbrand
2019-03-12 17:24         ` [Xen-devel] xen: Can't insert balloon page into VM userspace (WAS " Andrew Cooper
2019-03-12 18:02           ` Boris Ostrovsky
2019-03-12 18:11             ` Andrew Cooper
2019-03-12 18:23             ` David Hildenbrand
2019-03-12 19:46               ` David Hildenbrand
2019-03-14  8:37                 ` Juergen Gross
2019-03-14 14:12                   ` Julien Grall
2019-03-14 14:14                     ` David Hildenbrand
2019-03-14 14:15                     ` Juergen Gross
2019-03-14 14:16                       ` David Hildenbrand [this message]
2019-03-12 17:39         ` xen: Can't insert balloon page into VM userspace (WAS Re: [Xen-devel] " Julien Grall
2019-03-12 17:49           ` David Hildenbrand
2019-03-12 17:23       ` David Hildenbrand
2019-03-12 17:25         ` Nadav Amit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7ab068a3-2eaf-0eb0-cf25-43635e198ef7@redhat.com \
    --to=david@redhat.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=jfreche@vmware.com \
    --cc=jgross@suse.com \
    --cc=julien.grall@arm.com \
    --cc=k.khlebnikov@samsung.com \
    --cc=keescook@chromium.org \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=namit@vmware.com \
    --cc=osstest-admin@xenproject.org \
    --cc=pv-drivers@vmware.com \
    --cc=sstabellini@kernel.org \
    --cc=willy@infradead.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).