> -----Original Message-----
> From: Paolo Bonzini <[email protected]>
> Sent: Wednesday, November 13, 2019 7:00 AM
> To: Sunil Muthuswamy <[email protected]>; Richard Henderson
> <[email protected]>; Eduardo Habkost <[email protected]>;
> Stefan Weil <[email protected]>
> Cc: [email protected]; Justin Terry (VM) <[email protected]>
> Subject: Re: [PATCH] WHPX: refactor load library
>
> On 08/11/19 21:31, Sunil Muthuswamy wrote:
> >
> > +typedef enum WHPFunctionList {
> > + WINHV_PLATFORM_FNS_DEFAULT,
> > + WINHV_EMULATION_FNS_DEFAULT,
> > +} WHPFunctionList;
> >
>
> What does "default" stand for? I assume you have more changes to this
> function in the future.
>
Yes, there are more functions coming, such as for XSAVE. I used "default" to
represent
whatever is there currently, for lack of a better term.
> > + * Load the functions from the given library, using the given handle. If a
> > + * handle is provided, it is used, otherwise the library is opened. The
> > + * handle will be updated on return with the opened one.
> > + */
> > +static bool load_whp_dipatch_fns(HMODULE *handle, WHPFunctionList
> > function_list)
> > +{
>
> Typo, "dipatch" instead of "dispatch".
> >
> > + if (hLib) {
> > + FreeLibrary(hWinHvEmulation);
> > + }
>
> The argument to FreeLibrary should be hLib.
>
Thanks, will fix these in the next version.