LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Sean Christopherson <seanjc@google.com>,
	Mingwei Zhang <mizhang@google.com>
Cc: Vitaly Kuznetsov <vkuznets@redhat.com>,
	Wanpeng Li <wanpengli@tencent.com>,
	Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Tom Lendacky <thomas.lendacky@amd.com>,
	Marc Orr <marcorr@google.com>,
	David Rientjes <rientjes@google.com>,
	Alper Gun <alpergun@google.com>,
	Dionna Glaze <dionnaglaze@google.com>,
	Vipin Sharma <vipinsh@google.com>
Subject: Re: [PATCH] KVM: SEV: improve the code readability for ASID management
Date: Mon, 2 Aug 2021 18:52:54 +0200	[thread overview]
Message-ID: <71a905a1-0a6f-0d7a-f8fe-237b9e5af05c@redhat.com> (raw)
In-Reply-To: <YQgamDDn6TVY/BoV@google.com>

On 02/08/21 18:17, Sean Christopherson wrote:
> 
> Rather than adjusting the bitmap index, what about simply umping the bitmap size?
> IIRC, current CPUs have 512 ASIDs, counting ASID 0, i.e. bumping the size won't
> consume any additional memory.  And if it does, the cost is 8 bytes...
> 
> It'd be a bigger refactoring, but it should completely eliminate the mod-by-1
> shenanigans, e.g. a partial patch could look like

This is also okay by me if Mingwei agrees, of course.  I have already 
queued his patch, but I can replace it with one using a nr_asids-sized 
bitmap too.

Paolo


  reply	other threads:[~2021-08-02 16:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-31  1:13 Mingwei Zhang
2021-08-02 13:38 ` Joerg Roedel
2021-08-02 16:00   ` Mingwei Zhang
2021-08-02 16:17 ` Sean Christopherson
2021-08-02 16:52   ` Paolo Bonzini [this message]
2021-08-02 17:25     ` Mingwei Zhang

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=71a905a1-0a6f-0d7a-f8fe-237b9e5af05c@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=alpergun@google.com \
    --cc=dionnaglaze@google.com \
    --cc=jmattson@google.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcorr@google.com \
    --cc=mizhang@google.com \
    --cc=rientjes@google.com \
    --cc=seanjc@google.com \
    --cc=thomas.lendacky@amd.com \
    --cc=vipinsh@google.com \
    --cc=vkuznets@redhat.com \
    --cc=wanpengli@tencent.com \
    --subject='Re: [PATCH] KVM: SEV: improve the code readability for ASID management' \
    /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

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).