[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1a920cd0-530b-f380-a81a-da7cc6969f3e@redhat.com>
Date: Wed, 5 Feb 2020 15:37:18 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: Vitaly Kuznetsov <vkuznets@...hat.com>,
Ben Gardon <bgardon@...gle.com>
Cc: Peter Xu <peterx@...hat.com>,
Sean Christopherson <sean.j.christopherson@...el.com>,
Peter Shier <pshier@...gle.com>,
Oliver Upton <oupton@...gle.com>, linux-kernel@...r.kernel.org,
kvm@...r.kernel.org, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH 2/3] kvm: mmu: Separate generating and setting mmio ptes
On 05/02/20 14:37, Vitaly Kuznetsov wrote:
>> +static void mark_mmio_spte(struct kvm_vcpu *vcpu, u64 *sptep, u64 gfn,
>> + unsigned int access)
>> +{
>> + u64 mask = make_mmio_spte(vcpu, gfn, access);
>> + unsigned int gen = get_mmio_spte_generation(mask);
>> +
>> + access = mask & ACC_ALL;
>> +
>> trace_mark_mmio_spte(sptep, gfn, access, gen);
> 'access' and 'gen' are only being used for tracing, would it rather make
> sense to rename&move it to the newly introduced make_mmio_spte()? Or do
> we actually need tracing for both?
You would have the same issue with sptep.
> Also, I dislike re-purposing function parameters.
Yes, "trace_mark_mmio_spte(sptep, gfn, mask & ACC_ALL, gen);" is
slightly better.
Paolo
Powered by blists - more mailing lists