mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Sean Christopherson <seanjc@google.com>,
	Dionna Glaze <dionnaglaze@google.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org
Subject: Re: [PATCH] kvm: x86: use a uapi-friendly macro for BIT
Date: Tue, 12 Dec 2023 17:07:30 +0100	[thread overview]
Message-ID: <4a26883e-1acf-421a-9055-07ba9fea783c@redhat.com> (raw)
In-Reply-To: <ZXh78TApz80DAWUb@google.com>

On 12/12/23 16:27, Sean Christopherson wrote:
>> -#define KVM_PMU_EVENT_FLAG_MASKED_EVENTS BIT(0)
>> +#define KVM_PMU_EVENT_FLAG_MASKED_EVENTS _BITUL(0)
> It's not just BIT(), won't BIT_ULL() and GENMASK_ULL() also be problematic?  And
> sadly, I don't see an existing equivalent for GENMASK_ULL().

BIT_ULL() is easy enough, as you point out:

@@ -550,7 +550,7 @@ struct kvm_pmu_event_filter {
         (GENMASK_ULL(7, 0) | GENMASK_ULL(35, 32))
  #define KVM_PMU_MASKED_ENTRY_UMASK_MASK                (GENMASK_ULL(63, 56))
  #define KVM_PMU_MASKED_ENTRY_UMASK_MATCH       (GENMASK_ULL(15, 8))
-#define KVM_PMU_MASKED_ENTRY_EXCLUDE           (BIT_ULL(55))
+#define KVM_PMU_MASKED_ENTRY_EXCLUDE           (_BITULL(55))
  #define KVM_PMU_MASKED_ENTRY_UMASK_MASK_SHIFT  (56)

  /* for KVM_{GET,SET,HAS}_DEVICE_ATTR */

And I'll squash it into Dionna's patch since she has already a conversion
for KVM_EXIT_HYPERCALL_LONG_MODE.  For the others, I'll send a patch.

Paolo


      reply	other threads:[~2023-12-12 16:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-07  0:11 Dionna Glaze
2023-12-12 15:27 ` Sean Christopherson
2023-12-12 16:07   ` Paolo Bonzini [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=4a26883e-1acf-421a-9055-07ba9fea783c@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=dionnaglaze@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=seanjc@google.com \
    --cc=x86@kernel.org \
    /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

all inboxes | Powered by JetHome®