From: "Daniel P. Berrange" <berrange@redhat.com>
To: Sergio Andres Gomez Del Real <sergio.g.delreal@gmail.com>
Cc: qemu-devel@nongnu.org
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 [thread overview]
Message-ID: <20170829112219.GJ3783@redhat.com> (raw)
In-Reply-To: <20170828015654.2530-3-Sergio.G.DelReal@gmail.com>
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 <Sergio.G.DelReal@gmail.com>
> ---
> 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 :|
next prev parent reply other threads:[~2017-08-29 11:22 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-28 1:56 [Qemu-devel] [PATCH 00/14] add support for Hypervisor.framework in QEMU Sergio Andres Gomez Del Real
2017-08-28 1:56 ` [Qemu-devel] [PATCH 01/14] hvf: add support for Hypervisor.framework in the configure script Sergio Andres Gomez Del Real
2017-08-29 9:00 ` Stefan Hajnoczi
2017-08-28 1:56 ` [Qemu-devel] [PATCH 02/14] hvf: add code base from Google's QEMU repository Sergio Andres Gomez Del Real
2017-08-29 9:12 ` Stefan Hajnoczi
2017-08-29 11:22 ` Daniel P. Berrange [this message]
2017-08-28 1:56 ` [Qemu-devel] [PATCH 03/14] hvf: add conditional macros around hvf code in cpus.c Sergio Andres Gomez Del Real
2017-08-29 9:19 ` Stefan Hajnoczi
2017-08-28 1:56 ` [Qemu-devel] [PATCH 04/14] hvf: add fields to CPUState and CPUX86State; add definitions Sergio Andres Gomez Del Real
2017-08-29 9:31 ` Stefan Hajnoczi
2017-08-28 1:56 ` [Qemu-devel] [PATCH 05/14] hvf: use new helper functions for put/get xsave Sergio Andres Gomez Del Real
2017-08-28 1:56 ` [Qemu-devel] [PATCH 06/14] hvf: add compilation rules to Makefile.objs Sergio Andres Gomez Del Real
2017-08-29 9:34 ` Stefan Hajnoczi
2017-08-28 1:56 ` [Qemu-devel] [PATCH 07/14] hvf: run hvf code through checkpatch.pl and fix style issues Sergio Andres Gomez Del Real
2017-08-29 9:35 ` Stefan Hajnoczi
2017-08-28 1:56 ` [Qemu-devel] [PATCH 08/14] apic: add function to apic that will be used by hvf Sergio Andres Gomez Del Real
2017-08-29 9:36 ` Stefan Hajnoczi
2017-08-28 1:56 ` [Qemu-devel] [PATCH 09/14] hvf: implement hvf_get_supported_cpuid Sergio Andres Gomez Del Real
2017-08-28 1:56 ` [Qemu-devel] [PATCH 10/14] hvf: refactor cpuid code Sergio Andres Gomez Del Real
2017-08-29 9:44 ` Stefan Hajnoczi
2017-08-28 1:56 ` [Qemu-devel] [PATCH 11/14] hvf: implement vga dirty page tracking Sergio Andres Gomez Del Real
2017-08-28 1:56 ` [Qemu-devel] [PATCH 12/14] hvf: move fields from CPUState to CPUX86State Sergio Andres Gomez Del Real
2017-08-28 1:56 ` [Qemu-devel] [PATCH 13/14] hvf: refactor event injection code for hvf Sergio Andres Gomez Del Real
2017-08-28 1:56 ` [Qemu-devel] [PATCH 14/14] hvf: inject General Protection Fault when vmexit through vmcall Sergio Andres Gomez Del Real
2017-08-28 7:24 ` [Qemu-devel] [PATCH 00/14] add support for Hypervisor.framework in QEMU no-reply
2017-08-29 9:51 ` Stefan Hajnoczi
2017-08-29 9:53 ` Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170829112219.GJ3783@redhat.com \
--to=berrange@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=sergio.g.delreal@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).