All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: Sean Christopherson <seanjc@google.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org, Wanpeng Li <wanpengli@tencent.com>,
	Jim Mattson <jmattson@google.com>,
	Tom Lendacky <thomas.lendacky@amd.com>,
	David Matlack <dmatlack@google.com>,
	linux-kernel@vger.kernel.org,
	Maxim Levitsky <mlevitsk@redhat.com>
Subject: Re: [PATCH RFC] KVM: SVM: reduce guest MAXPHYADDR by one in case C-bit is a physical bit
Date: Mon, 18 Oct 2021 13:23:04 +0200	[thread overview]
Message-ID: <874k9ey3tz.fsf@vitty.brq.redhat.com> (raw)
In-Reply-To: <87ee8iye6b.fsf@vitty.brq.redhat.com>

Vitaly Kuznetsov <vkuznets@redhat.com> writes:

> Sean Christopherson <seanjc@google.com> writes:
>
>> On Fri, Oct 15, 2021, Vitaly Kuznetsov wrote:
>>> Several selftests (memslot_modification_stress_test, kvm_page_table_test,
>>> dirty_log_perf_test,.. ) which rely on vm_get_max_gfn() started to fail
>>> since commit ef4c9f4f65462 ("KVM: selftests: Fix 32-bit truncation of
>>> vm_get_max_gfn()") on AMD EPYC 7401P:
>>> 
>>>  ./tools/testing/selftests/kvm/demand_paging_test
>>>  Testing guest mode: PA-bits:ANY, VA-bits:48,  4K pages
>>>  guest physical test memory offset: 0xffffbffff000
>>
>> This look a lot like the signature I remember from the original bug[1].  I assume
>> you're hitting the magic HyperTransport region[2].  I thought that was fixed, but
>> the hack-a-fix for selftests never got applied[3].
>>
>> [1] https://lore.kernel.org/lkml/20210623230552.4027702-4-seanjc@google.com/
>
> Hey,
>
> it seems I'm only three months late to the party!
>
>> [2] https://lkml.kernel.org/r/7e3a90c0-75a1-b8fe-dbcf-bda16502ace9@amd.com
>> [3] https://lkml.kernel.org/r/20210805105423.412878-1-pbonzini@redhat.com
>>
>
> This patch helps indeed

FWIW, 'access_tracking_perf_test' remains broken even after the patch is
applied:

# ./access_tracking_perf_test 
Testing guest mode: PA-bits:ANY, VA-bits:48,  4K pages
guest physical test memory offset: 0xfffcbffff000

Populating memory             : 3.858448918s
Writing to populated memory   : 0.937319626s
Reading from populated memory : 0.003073207s
==== Test Assertion Failure ====
  lib/kvm_util.c:1382: false
  pid=6422 tid=6425 errno=4 - Interrupted system call
     1	0x000000000040667d: addr_gpa2hva at kvm_util.c:1382
     2	 (inlined by) addr_gpa2hva at kvm_util.c:1376
     3	 (inlined by) addr_gva2hva at kvm_util.c:2245
     4	0x0000000000402909: lookup_pfn at access_tracking_perf_test.c:98
     5	 (inlined by) mark_vcpu_memory_idle at access_tracking_perf_test.c:152
     6	 (inlined by) vcpu_thread_main at access_tracking_perf_test.c:232
     7	0x00007fd02d1cb431: ?? ??:0
     8	0x00007fd02d0f9912: ?? ??:0
  No vm physical memory at 0xfcbffff000

(and my cpuid hack reducing guest physical address space by half doesn't
seem to help either)

-- 
Vitaly


      reply	other threads:[~2021-10-18 11:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-15 15:05 [PATCH RFC] KVM: SVM: reduce guest MAXPHYADDR by one in case C-bit is a physical bit Vitaly Kuznetsov
2021-10-15 15:24 ` Sean Christopherson
2021-10-17  7:54   ` Maxim Levitsky
2021-10-18  7:42     ` Vitaly Kuznetsov
2021-10-18 11:44     ` Paolo Bonzini
2021-10-18  7:39   ` Vitaly Kuznetsov
2021-10-18 11:23     ` Vitaly Kuznetsov [this message]

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=874k9ey3tz.fsf@vitty.brq.redhat.com \
    --to=vkuznets@redhat.com \
    --cc=dmatlack@google.com \
    --cc=jmattson@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mlevitsk@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=thomas.lendacky@amd.com \
    --cc=wanpengli@tencent.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.