Am Montag, 31. März 2008 schrieb Arnd Bergmann: Hello Arnd,
thanks for the review. > On Tuesday 25 March 2008, Carsten Otte wrote: > > > + > > +static inline void __user *__guestaddr_to_user(struct kvm_vcpu *vcpu, > > + u64 guestaddr) > > +{ > > + u64 prefix = vcpu->arch.sie_block->prefix; > > + u64 origin = vcpu->kvm->arch.guest_origin; > > + u64 memsize = vcpu->kvm->arch.guest_memsize; > > + > > + if (guestaddr < 2 * PAGE_SIZE) > > + guestaddr += prefix; > > + else if ((guestaddr >= prefix) && (guestaddr < prefix + 2 * PAGE_SIZE)) > > + guestaddr -= prefix; > > What happens if prefix is set to 4096? Does this do the right thing > according to the architecture definition? The z/architecture and the instructions (spx + sigp set prefix) dont allow 4096 as prefix address. When setting a prefix, bits 1-18 (IBM numbering scheme) are used and appended with 13 zero to the right. That means prefix address is always a multiple of 8192. ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel