From: Yu Zhao <yuzhao@google.com>
To: Sean Christopherson <seanjc@google.com>
Cc: isaku.yamahata@intel.com, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org, isaku.yamahata@gmail.com,
Paolo Bonzini <pbonzini@redhat.com>,
erdemaktas@google.com, Sagi Shahar <sagis@google.com>,
David Matlack <dmatlack@google.com>,
Kai Huang <kai.huang@intel.com>,
Zhi Wang <zhi.wang.linux@gmail.com>,
chen.bo@intel.com, linux-coco@lists.linux.dev,
Chao Peng <chao.p.peng@linux.intel.com>,
Ackerley Tng <ackerleytng@google.com>,
Vishal Annapurve <vannapurve@google.com>,
Michael Roth <michael.roth@amd.com>,
Yuan Yao <yuan.yao@linux.intel.com>
Subject: Re: [RFC PATCH v3 09/11] KVM: Add new members to struct kvm_gfn_range to operate on
Date: Fri, 14 Jul 2023 22:30:37 -0600 [thread overview]
Message-ID: <CAOUHufady0XkgFWSL6-Mb+HFEyaQ33DJCinsjidRw2DTR9F8yQ@mail.gmail.com> (raw)
In-Reply-To: <ZLB2Ro55dKGElB9B@google.com>
On Thu, Jul 13, 2023 at 4:10 PM Sean Christopherson <seanjc@google.com> wrote:
>
> +Yu
>
> On Wed, Jun 28, 2023, isaku.yamahata@intel.com wrote:
> > void kvm_mmu_init_memslot_memory_attributes(struct kvm *kvm,
> > diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
> > index 1a47cedae8a1..5ca0c8ee4292 100644
> > --- a/include/linux/kvm_host.h
> > +++ b/include/linux/kvm_host.h
> > @@ -260,7 +260,13 @@ struct kvm_gfn_range {
> > struct kvm_memory_slot *slot;
> > gfn_t start;
> > gfn_t end;
> > - pte_t pte;
> > + union {
> > + unsigned long attributes;
> > + pte_t pte;
> > + unsigned long callback_arg; /* needs a better name */
> > + };
>
> Making the union needs to be done in a separate patch. And coming back to this
> with fresh eyes, I think it makes sense to give the union a name. I think an
> anonymous union is actually worse in the long run, and there aren't _that_ many
> instances to update. E.g. that way a single build-time assertion can capture
> all uses, and it makes it more obvious that the usage is poking into a union.
>
> I'll post a patch separately so that it can be picked up for the MGLRU series
> (and maybe even merged ahead of both).
Thanks a lot, Sean. And sorry for having not addressed your comments
on v2 -- I'm wrapping up a few other projects and will be focusing on
addressing all pending comments in a couple of weeks.
next prev parent reply other threads:[~2023-07-15 4:31 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-28 22:42 [RFC PATCH v3 00/11] KVM: guest memory: Misc enhacnement isaku.yamahata
2023-06-28 22:43 ` [RFC PATCH v3 01/11] KVM: selftests: Fix test_add_overlapping_private_memory_regions() isaku.yamahata
2023-06-28 22:43 ` [RFC PATCH v3 02/11] KVM: selftests: Fix guest_memfd() isaku.yamahata
2023-06-28 22:43 ` [RFC PATCH v3 03/11] KVM: selftests: x86: typo in private_mem_conversions_test.c isaku.yamahata
2023-06-28 22:43 ` [RFC PATCH v3 04/11] KVM: x86: Add is_vm_type_supported callback isaku.yamahata
2023-06-28 22:43 ` [RFC PATCH v3 05/11] KVM: x86/mmu: Pass around full 64-bit error code for the KVM page fault isaku.yamahata
2023-06-28 22:43 ` [RFC PATCH v3 06/11] KVM: x86: Introduce PFERR_GUEST_ENC_MASK to indicate fault is private isaku.yamahata
2023-06-28 22:43 ` [RFC PATCH v3 07/11] KVM: x86: Export the kvm_zap_gfn_range() for the SNP use isaku.yamahata
2023-06-28 22:43 ` [RFC PATCH v3 08/11] KVM: Fix set_mem_attr ioctl when error case isaku.yamahata
2023-07-13 22:03 ` Sean Christopherson
2023-07-14 8:57 ` Zhi Wang
2023-07-14 22:35 ` Sean Christopherson
2023-06-28 22:43 ` [RFC PATCH v3 09/11] KVM: Add new members to struct kvm_gfn_range to operate on isaku.yamahata
2023-07-13 22:10 ` Sean Christopherson
2023-07-15 4:30 ` Yu Zhao [this message]
2023-06-28 22:43 ` [RFC PATCH v3 10/11] KVM: x86: Add gmem hook for initializing private memory isaku.yamahata
2023-06-28 22:43 ` [RFC PATCH v3 11/11] KVM: x86: Add gmem hook for invalidating " isaku.yamahata
2023-07-19 14:20 ` [RFC PATCH v3 00/11] KVM: guest memory: Misc enhacnement Sean Christopherson
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=CAOUHufady0XkgFWSL6-Mb+HFEyaQ33DJCinsjidRw2DTR9F8yQ@mail.gmail.com \
--to=yuzhao@google.com \
--cc=ackerleytng@google.com \
--cc=chao.p.peng@linux.intel.com \
--cc=chen.bo@intel.com \
--cc=dmatlack@google.com \
--cc=erdemaktas@google.com \
--cc=isaku.yamahata@gmail.com \
--cc=isaku.yamahata@intel.com \
--cc=kai.huang@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-coco@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.roth@amd.com \
--cc=pbonzini@redhat.com \
--cc=sagis@google.com \
--cc=seanjc@google.com \
--cc=vannapurve@google.com \
--cc=yuan.yao@linux.intel.com \
--cc=zhi.wang.linux@gmail.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).