On Oct 2, 2006, at 6:18 PM, Hollis Blanchard wrote:
On Mon, 2006-10-02 at 22:02 +0000, Xen patchbot-xenppc-unstable wrote:
+ union hid1 hid1;
+ ulong flags;
+ ulong ra;
+ /* uses special processor mode that forces a real address
+ hid1.word = mfhid1();
+ hid1.bits.en_icbi = 1;
icbi uses effective addresses, not real addresses.
I'll fix it so it uses 'ea' not 'ra'.
The docs say that bit
is "Enable forced Instruction Cache Block Invalidate (icbi) match
which I don't understand.
See section "3.3.1Flushing the L1 I-Cache"
icbi finds "the line" by EA then consults the MMU for an RA to match
the 1 of 4 entries in the line.
HID1[en_icbi] will cause:
"all directory lookups on behalf of an icbi act as though there
was a real address match"
invalidating the whole line.
Are you saying that bit makes the invalidate work on real addresses
rather than effective? Why would we want that?
Doesn't this loop work just fine with effective addresses?
Apparently not, My understanding is, the original (EA,RA)
relationship established by the domain is unknown to the hypervisor,
so we would get the index but not match on the RA.
+ for (ra = 0; ra < cpu_caches.isize; ra += cpu_caches.iline_size)
+ hid1.bits.en_icbi = 0;
good catch, thanks
Xen-ppc-devel mailing list