On Mon, Jun 8, 2020 at 3:17 PM Aleksandar Markovic <aleksandar.qemu.de...@gmail.com> wrote: > > пон, 8. јун 2020. у 15:05 Peter Maydell <peter.mayd...@linaro.org> је > написао/ла: > > > > On Sun, 7 Jun 2020 at 20:46, Aleksandar Markovic > > <aleksandar.qemu.de...@gmail.com> wrote: > > > > > > The following changes since commit > > > 175198ad91d8bac540159705873b4ffe4fb94eab: > > > > > > Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20200605' into > > > staging (2020-06-05 17:45:59 +0100) > > > > > > are available in the git repository at: > > > > > > https://github.com/AMarkovic/qemu tags/mips-queue-june-07-2020 > > > > > > for you to fetch changes up to ffbd8a88e8872d61fa5622a0075eddbe71951067: > > > > > > target/mips: Enable hardware page table walker and CMGCR features for > > > P5600 (2020-06-07 21:34:14 +0200) > > > > > > ---------------------------------------------------------------- > > > > > > MIPS queue for June 7th, 2020 > > > > > > Highlights: > > > > > > - Registring change of email address for two contributors > > > - Cleanup and improvements of FPU helpers > > > - Enabling some features of P5600 > > > - Adding two Loongson-3A CPU definitions > > > - Moving futher towards Loongson-3A KVM support > > > - Two checkpatch warnings are known and should be ignored > > > > > > > Hi; I'm afraid this fails to build on non-Linux hosts > > (OSx, BSDs, Windows): > > > > hw/mips/common.c:21:23: fatal error: linux/kvm.h: No such file or directory > > > > Looking at that file, it also makes the mistake of putting > > an include line before osdep.h, which should always be the > > first include in a C file. > > > > The more usual way to arrange this kind of "real implementation > > of a function for the compiled-with-KVM case, stub for > > the #ifndef CONFIG_KVM case" is to put the real implementation > > into a C file that's only built for the CONFIG_KVM case: > > obj-$(CONFIG_KVM) += whatever.o > > (it may be simplest to just put it in the existing target/mips/kvm.c?) > > and then either > > (a) provide the non-kvm stub version directly in the .h file > > that declares the prototype for the kvm case: > > #ifdef CONFIG_KVM > > int mips_kvm_type(MachineState *machine, const char *vm_type) > > #else > > static inline mips_kvm_type(MachineState *machine, const char *vm_type) > > { > > return 0; > > } > > #endif > > (b) alternatively put the stub code in a built-for-non-KVM > > source file: > > obj-$(call lnot,$(CONFIG_KVM)) += kvm-stub.o > > > > i386, s390x and arm all have examples of this kind of "stub > > version plus for-kvm version" function that may be useful > > as examples. > > > > Thanks for your detailed response and pointers! > > I am going to work with the original contributor on this. > > I am planning, of course, to send another, corrected, pull request, > but not sooner than in 5-6 days. >
I changed my mind. Since the offending patch is logically independent from other patches and vice versa, I am going to send a pull request this evening, without it, rather than wait for it to be fixed. Truly yours, Aleksandar > Aleksandar > > > thanks > > -- PMM >