> -----Original Message----- > From: Paolo Bonzini <pbonz...@redhat.com> > Sent: Wednesday, November 13, 2019 7:00 AM > To: Sunil Muthuswamy <sunil...@microsoft.com>; Richard Henderson > <r...@twiddle.net>; Eduardo Habkost <ehabk...@redhat.com>; > Stefan Weil <s...@weilnetz.de> > Cc: qemu-devel@nongnu.org; Justin Terry (VM) <jute...@microsoft.com> > 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.