Messages in this thread | | | From | Yu Zhao <> | Date | Fri, 14 Jul 2023 22:30:37 -0600 | Subject | Re: [RFC PATCH v3 09/11] KVM: Add new members to struct kvm_gfn_range to operate on |
| |
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.
| |