[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 02/14] hvf: add code base from Google's QEMU rep
From: |
Daniel P. Berrange |
Subject: |
Re: [Qemu-devel] [PATCH 02/14] hvf: add code base from Google's QEMU repository |
Date: |
Tue, 29 Aug 2017 12:22:19 +0100 |
User-agent: |
Mutt/1.8.3 (2017-05-23) |
On Sun, Aug 27, 2017 at 08:56:42PM -0500, Sergio Andres Gomez Del Real wrote:
> This file begins tracking the files that will be the code base for HVF
> support in QEMU.
>
> Signed-off-by: Sergio Andres Gomez Del Real <address@hidden>
> ---
> diff --git a/target/i386/hvf-all.c b/target/i386/hvf-all.c
> new file mode 100644
> index 0000000000..06cd8429eb
> --- /dev/null
> +++ b/target/i386/hvf-all.c
> @@ -0,0 +1,982 @@
There's no copyright header on this file.
A few others a missing copyright headers too, but they're all simple
.h files, so not critical. This, though, is a major .c file so I think
it really should have a copyright header present. IIUC, this is not
your code, but rather copied from the google repo, so ought to get the
original author to update this.
> +#include "qemu/osdep.h"
> +#include "qemu-common.h"
> +
> +#include "sysemu/hvf.h"
> +#include "hvf-i386.h"
> +#include "hvf-utils/vmcs.h"
> +#include "hvf-utils/vmx.h"
> +#include "hvf-utils/x86.h"
> +#include "hvf-utils/x86_descr.h"
> +#include "hvf-utils/x86_mmu.h"
> +#include "hvf-utils/x86_decode.h"
> +#include "hvf-utils/x86_emu.h"
> +#include "hvf-utils/x86_cpuid.h"
> +#include "hvf-utils/x86hvf.h"
> +
> +#include <Hypervisor/hv.h>
> +#include <Hypervisor/hv_vmx.h>
> +
> +#include "exec/address-spaces.h"
> +#include "exec/exec-all.h"
> +#include "exec/ioport.h"
> +#include "hw/i386/apic_internal.h"
> +#include "hw/boards.h"
> +#include "qemu/main-loop.h"
> +#include "strings.h"
> +#include "trace.h"
> +#include "sysemu/accel.h"
> +#include "sysemu/sysemu.h"
> +#include "target/i386/cpu.h"
> +
> +pthread_rwlock_t mem_lock = PTHREAD_RWLOCK_INITIALIZER;
> +HVFState *hvf_state;
> +static int hvf_disabled = 1;
> +
> +static void assert_hvf_ok(hv_return_t ret)
> +{
> + if (ret == HV_SUCCESS)
> + return;
> +
> + switch (ret) {
> + case HV_ERROR:
> + fprintf(stderr, "Error: HV_ERROR\n");
> + break;
> + case HV_BUSY:
> + fprintf(stderr, "Error: HV_BUSY\n");
> + break;
> + case HV_BAD_ARGUMENT:
> + fprintf(stderr, "Error: HV_BAD_ARGUMENT\n");
> + break;
> + case HV_NO_RESOURCES:
> + fprintf(stderr, "Error: HV_NO_RESOURCES\n");
> + break;
> + case HV_NO_DEVICE:
> + fprintf(stderr, "Error: HV_NO_DEVICE\n");
> + break;
> + case HV_UNSUPPORTED:
> + fprintf(stderr, "Error: HV_UNSUPPORTED\n");
> + break;
> + default:
> + fprintf(stderr, "Unknown Error\n");
> + }
> +
> + abort();
> +}
There's loads of fprintfs() throughout this file - it really needs to
be fixed to use error_report()
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
- [Qemu-devel] [PATCH 08/14] apic: add function to apic that will be used by hvf, (continued)
- [Qemu-devel] [PATCH 08/14] apic: add function to apic that will be used by hvf, Sergio Andres Gomez Del Real, 2017/08/27
- [Qemu-devel] [PATCH 09/14] hvf: implement hvf_get_supported_cpuid, Sergio Andres Gomez Del Real, 2017/08/27
- [Qemu-devel] [PATCH 11/14] hvf: implement vga dirty page tracking, Sergio Andres Gomez Del Real, 2017/08/27
- [Qemu-devel] [PATCH 10/14] hvf: refactor cpuid code, Sergio Andres Gomez Del Real, 2017/08/27
- [Qemu-devel] [PATCH 14/14] hvf: inject General Protection Fault when vmexit through vmcall, Sergio Andres Gomez Del Real, 2017/08/27
- [Qemu-devel] [PATCH 13/14] hvf: refactor event injection code for hvf, Sergio Andres Gomez Del Real, 2017/08/27
- [Qemu-devel] [PATCH 12/14] hvf: move fields from CPUState to CPUX86State, Sergio Andres Gomez Del Real, 2017/08/27
- [Qemu-devel] [PATCH 02/14] hvf: add code base from Google's QEMU repository, Sergio Andres Gomez Del Real, 2017/08/28
- [Qemu-devel] [PATCH 07/14] hvf: run hvf code through checkpatch.pl and fix style issues, Sergio Andres Gomez Del Real, 2017/08/28
- Re: [Qemu-devel] [PATCH 00/14] add support for Hypervisor.framework in QEMU, no-reply, 2017/08/28
- Re: [Qemu-devel] [PATCH 00/14] add support for Hypervisor.framework in QEMU, Stefan Hajnoczi, 2017/08/29
- Re: [Qemu-devel] [PATCH 00/14] add support for Hypervisor.framework in QEMU, Stefan Hajnoczi, 2017/08/29