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. _______________________________________________ Virtualization mailing list Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/virtualization