All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: David Matlack <dmatlack@google.com>
Cc: kernel test robot <lkp@intel.com>,
	kvm@vger.kernel.org, kbuild-all@lists.01.org,
	Ben Gardon <bgardon@google.com>, Joerg Roedel <joro@8bytes.org>,
	Jim Mattson <jmattson@google.com>,
	Wanpeng Li <wanpengli@tencent.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	Sean Christopherson <seanjc@google.com>,
	Junaid Shahid <junaids@google.com>
Subject: Re: [PATCH 2/4] KVM: x86/mmu: Remove redundant is_tdp_mmu_enabled check
Date: Fri, 18 Jun 2021 18:55:58 +0200	[thread overview]
Message-ID: <27d5b8eb-1f17-d981-064c-dedae18b6290@redhat.com> (raw)
In-Reply-To: <YMzOLu2OYn8GC/WD@google.com>

On 18/06/21 18:47, David Matlack wrote:
> On Fri, Jun 18, 2021 at 12:42:56PM +0200, Paolo Bonzini wrote:
>> On 18/06/21 09:17, kernel test robot wrote:
>>>      ld: arch/x86/kvm/mmu/mmu.o: in function `get_mmio_spte':
>>>>> arch/x86/kvm/mmu/mmu.c:3612: undefined reference to `kvm_tdp_mmu_get_walk'
>>>      ld: arch/x86/kvm/mmu/mmu.o: in function `direct_page_fault':
>>>>> arch/x86/kvm/mmu/mmu.c:3830: undefined reference to `kvm_tdp_mmu_map'
>>
>> Turns out sometimes is_tdp_mmu_root is not inlined after this patch.
>> Fixed thusly:
> 
> Thanks for the fix. I guess after I removed the is_tdp_mmu_enabled()
> check the compiler couldn't determine what is_tdp_mmu_root() would
> return on 32-bit builds anymore.

It still could, but only as long as is_tdp_mmu_root was inlined.  Your 
patch caused the final "return false" to only appear after a few WARN_ON 
checks that obviously can't be removed, and therefore tipped the balance 
towards not inlining it!

Paolo


WARNING: multiple messages have this Message-ID (diff)
From: Paolo Bonzini <pbonzini@redhat.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH 2/4] KVM: x86/mmu: Remove redundant is_tdp_mmu_enabled check
Date: Fri, 18 Jun 2021 18:55:58 +0200	[thread overview]
Message-ID: <27d5b8eb-1f17-d981-064c-dedae18b6290@redhat.com> (raw)
In-Reply-To: <YMzOLu2OYn8GC/WD@google.com>

[-- Attachment #1: Type: text/plain, Size: 989 bytes --]

On 18/06/21 18:47, David Matlack wrote:
> On Fri, Jun 18, 2021 at 12:42:56PM +0200, Paolo Bonzini wrote:
>> On 18/06/21 09:17, kernel test robot wrote:
>>>      ld: arch/x86/kvm/mmu/mmu.o: in function `get_mmio_spte':
>>>>> arch/x86/kvm/mmu/mmu.c:3612: undefined reference to `kvm_tdp_mmu_get_walk'
>>>      ld: arch/x86/kvm/mmu/mmu.o: in function `direct_page_fault':
>>>>> arch/x86/kvm/mmu/mmu.c:3830: undefined reference to `kvm_tdp_mmu_map'
>>
>> Turns out sometimes is_tdp_mmu_root is not inlined after this patch.
>> Fixed thusly:
> 
> Thanks for the fix. I guess after I removed the is_tdp_mmu_enabled()
> check the compiler couldn't determine what is_tdp_mmu_root() would
> return on 32-bit builds anymore.

It still could, but only as long as is_tdp_mmu_root was inlined.  Your 
patch caused the final "return false" to only appear after a few WARN_ON 
checks that obviously can't be removed, and therefore tipped the balance 
towards not inlining it!

Paolo

  reply	other threads:[~2021-06-18 16:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-17 23:19 [PATCH 0/5] KVM: x86/mmu: Clean up is_tdp_mmu_root and root_hpa checks David Matlack
2021-06-17 23:19 ` [PATCH 1/4] KVM: x86/mmu: Remove redundant is_tdp_mmu_root check David Matlack
2021-06-17 23:19 ` [PATCH 2/4] KVM: x86/mmu: Remove redundant is_tdp_mmu_enabled check David Matlack
2021-06-18  7:17   ` kernel test robot
2021-06-18  7:17     ` kernel test robot
2021-06-18 10:42     ` Paolo Bonzini
2021-06-18 10:42       ` Paolo Bonzini
2021-06-18 16:47       ` David Matlack
2021-06-18 16:47         ` David Matlack
2021-06-18 16:55         ` Paolo Bonzini [this message]
2021-06-18 16:55           ` Paolo Bonzini
2021-06-17 23:19 ` [PATCH 3/4] KVM: x86/mmu: Refactor is_tdp_mmu_root into is_tdp_mmu David Matlack
2021-06-17 23:19 ` [PATCH 4/4] KVM: x86/mmu: Remove redundant root_hpa checks David Matlack
2021-06-18 10:45 ` [PATCH 0/5] KVM: x86/mmu: Clean up is_tdp_mmu_root and " Paolo Bonzini

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=27d5b8eb-1f17-d981-064c-dedae18b6290@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=bgardon@google.com \
    --cc=dmatlack@google.com \
    --cc=jmattson@google.com \
    --cc=joro@8bytes.org \
    --cc=junaids@google.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kvm@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=seanjc@google.com \
    --cc=vkuznets@redhat.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.