> -----Original Message----- > From: Sitsofe Wheeler > Sent: Friday, August 29, 2014 19:20 PM > Because this particular return code is overloaded with multiple meanings > that can't necessarily be deduced from its name perhaps this > documentation patch would be helpful: > > diff --git a/arch/x86/include/uapi/asm/hyperv.h > b/arch/x86/include/uapi/asm/hyperv.h > index 462efe7..04894d5 100644 > --- a/arch/x86/include/uapi/asm/hyperv.h > +++ b/arch/x86/include/uapi/asm/hyperv.h > @@ -213,6 +213,12 @@ > #define HV_STATUS_SUCCESS 0 > #define HV_STATUS_INVALID_HYPERCALL_CODE 2 > #define HV_STATUS_INVALID_HYPERCALL_INPUT 3 > +/* > + * HV_STATUS_INVALID_ALIGNMENT indicates one of the following: > + * The input or output pointer is not aligned to 8 bytes. > + * The input or output lists span more than one page. > + * The input or output pointer is out of bounds. > + */ > #define HV_STATUS_INVALID_ALIGNMENT 4 > #define HV_STATUS_INSUFFICIENT_BUFFERS 19 > > Dexuan: Does this mean that if input/output pointer is well aligned and > the (payload start) is in the same page as (payload start + payload > size) all will be well? If so it won't matter what the length of payload > size is right? > > -- > Sitsofe | http://sucs.org/~sits/ Hi Sitsofe, I personally think so, but I'm not 100% sure about the exact behavior of the hypervisor here: my previous patch tried to only use page-aligned-allocation when payload_start and payload_end are not on the same page, but I still got the "invalid alignment" error code occasionally, which makes me a little upset, honestly speaking. Thanks, -- Dexuan _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel