linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mingwei Zhang <mizhang@google.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Sean Christopherson <seanjc@google.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	Wanpeng Li <wanpengli@tencent.com>,
	Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>,
	kvm <kvm@vger.kernel.org>, LKML <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 10:25:38 -0700	[thread overview]
Message-ID: <CAL715WKVZqHG0sJhTn-ebJKjdj5pUQedL9kJjVRWMWoZGbzHFg@mail.gmail.com> (raw)
In-Reply-To: <71a905a1-0a6f-0d7a-f8fe-237b9e5af05c@redhat.com>

Hi Paolo,

Thanks. I think Sean's suggestion makes sense. I will update it with
that one and remove the 'fixes' line.

Regards
-Mingwei

On Mon, Aug 2, 2021 at 9:53 AM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> 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 17:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-31  1:13 [PATCH] KVM: SEV: improve the code readability for ASID management 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
2021-08-02 17:25     ` Mingwei Zhang [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=CAL715WKVZqHG0sJhTn-ebJKjdj5pUQedL9kJjVRWMWoZGbzHFg@mail.gmail.com \
    --to=mizhang@google.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=pbonzini@redhat.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 \
    /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).