On 08/29/2011 11:15 AM, Sasha Levin wrote:
> > +#define APIC_ACCESS_TYPE_W 1 /* Linear write access during inst execution */ > static int handle_apic_access(struct kvm_vcpu *vcpu) > { > + unsigned long exit_qualification = vmcs_readl(EXIT_QUALIFICATION); > + int access_type, offset; > + > + access_type = (exit_qualification>> 12)& 0xf; > + offset = exit_qualification& 0xfff; Maybe it's worth moving that #define above, and '#define'ing all the magic that happens in these 2 lines in vmx.h along with all the other exit qualification parameters?
Sure, that's what vmx.h is for. And 0xfff is ~PAGE_MASK. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html