Re: [PATCH 2/4] KVM: PPC: Book3S HV: Add a mechanism for recording modified HPTEs

2012-11-19 Thread Paul Mackerras
On Mon, Nov 19, 2012 at 01:36:42PM +0100, Alexander Graf wrote: > > Aren't atomic reads expensive? Doing one on every guest HPTE modification > (when nobody is listening) sounds quite excessive. Wouldn't it be cheaper to > just always update the bit? As Scott said, it's just an ordinary load.

Re: [PATCH 2/4] KVM: PPC: Book3S HV: Add a mechanism for recording modified HPTEs

2012-11-19 Thread Alexander Graf
On 19.11.2012, at 18:20, Scott Wood wrote: > On 11/19/2012 06:36:42 AM, Alexander Graf wrote: >> On 14.11.2012, at 05:32, Paul Mackerras wrote: >> > +/* >> > + * Note modification of an HPTE; set the HPTE modified bit >> > + * if it wasn't modified before and anyone is interested. >> > + */ >> >

Re: [PATCH 2/4] KVM: PPC: Book3S HV: Add a mechanism for recording modified HPTEs

2012-11-19 Thread Scott Wood
On 11/19/2012 06:36:42 AM, Alexander Graf wrote: On 14.11.2012, at 05:32, Paul Mackerras wrote: > +/* > + * Note modification of an HPTE; set the HPTE modified bit > + * if it wasn't modified before and anyone is interested. > + */ > +static inline void note_hpte_modification(struct kvm *kvm, >

Re: [PATCH 2/4] KVM: PPC: Book3S HV: Add a mechanism for recording modified HPTEs

2012-11-19 Thread Alexander Graf
On 14.11.2012, at 05:32, Paul Mackerras wrote: > This uses a bit in our record of the guest view of the HPTE to record > when the HPTE gets modified. We use a reserved bit for this, and ensure > that this bit is always cleared in HPTE values returned to the guest. > The recording of modified HPT

[PATCH 2/4] KVM: PPC: Book3S HV: Add a mechanism for recording modified HPTEs

2012-11-13 Thread Paul Mackerras
This uses a bit in our record of the guest view of the HPTE to record when the HPTE gets modified. We use a reserved bit for this, and ensure that this bit is always cleared in HPTE values returned to the guest. The recording of modified HPTEs is only done if other code indicates its interest by s