[MODERATED] Re: [PATCH v5 8/8] NX 8

Paolo Bonzini <[email protected]>
Newsgroups org.kernel.lore.historical-speck
Message-ID <[email protected]>
On 10/10/19 07:53, speck for Pawan Gupta wrote:
> On Wed, Oct 09, 2019 at 05:10:44PM +0200, speck for Paolo Bonzini wrote:
>> On 09/10/19 16:41, speck for Pawan Gupta wrote:
>>> On Wed, Oct 09, 2019 at 08:13:49AM +0200, speck for Paolo Bonzini wrote:
>>>> On 07/10/19 21:45, speck for Pawan Gupta wrote:
>>>>>> Yes, I have other small changes I made so I'll send it out soon together
>>>>>> with a list of preparatory patches that were committed in the past months.
>>>>> Just wanted to add that we would also need to do the backporting and
>>>>> testing soon.
>>>>
>>>> Sure.  With the full list of required patches it shouldn't be an issue.
>>>
>>> When do you think you can post a v6?
>>
>> I have gotten a report of a crash, I'm trying to understand if it's my
>> patches or something pre-existing.  I believe it's the latter, but I'd
>> rather be sure.  I can post v6 right now though.
> 
> We can help debug the crash. Can you please share the series,
> reproduction steps and the crash signature.

The reproduction steps for v5 are as follows:

- grab the next branch of kvm-unit-tests.git[1] and build it

- create a lot of hugepages, on my machine I use 40 GiB worth of them:

  echo 20480 > /proc/sys/vm/nr_hugepages

- load KVM with kvm.nx_huge_pages_recovery_period_secs=3

- run the following script

  while true; do
    echo N > /sys/module/kvm/parameters/nx_huge_pages; sleep 1
    echo Y > /sys/module/kvm/parameters/nx_huge_pages; sleep 5
  done

- run the testcase with

  MEM=40960  # in megabytes
  qemu-kvm -nodefaults -vnc none -serial stdio -kernel x86/hugetext.flat
    -m $MEM -mem-path /dev/hugepages

You can also add a WARN_ON_ONCE(!sp->lpage_disallowed) to
kvm_recover_nx_lpages before the call to kvm_mmu_prepare_zap_page.  As
soon as it triggers, of course everything will go downhill.

Paolo

[1] git://git.kernel.org/pub/scm/virt/kvm/kvm-unit-tests.git
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.