[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 11/13] hvf: move fields from CPUState to CPUX
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH v2 11/13] hvf: move fields from CPUState to CPUX86State |
Date: |
Thu, 31 Aug 2017 10:18:17 +0100 |
User-agent: |
Mutt/1.8.3 (2017-05-23) |
On Wed, Aug 30, 2017 at 03:27:00AM -0500, Sergio Andres Gomez Del Real wrote:
> @@ -1187,11 +1190,15 @@ typedef struct CPUX86State {
> int32_t interrupt_injected;
> uint8_t soft_interrupt;
> uint8_t has_error_code;
> + uint32_t ins_len;
This field seems unused in this patch?
> @@ -678,15 +687,15 @@ int hvf_init_vcpu(CPUState *cpu)
> sigdelset(&set, SIG_IPI);
>
> int r;
> - init_emu(cpu);
> - init_decoder(cpu);
> + init_emu();
> + init_decoder();
> init_cpuid(cpu);
>
> hvf_state->hvf_caps = (struct hvf_vcpu_caps *)g_malloc0(sizeof(struct
> hvf_vcpu_caps));
> - cpu->hvf_x86 = (struct hvf_x86_state *)g_malloc0(sizeof(struct
> hvf_x86_state));
> + env->hvf_emul = (HVFX86EmulatorState
> *)g_malloc0(sizeof(HVFX86EmulatorState));
Please use g_new0(). The cast isn't necessary because the C compiler
casts void * to any other pointer type without a warning:
env->hvf_emul = g_new0(HVFX86EmulatorState, 1);
>
> r = hv_vcpu_create((hv_vcpuid_t *)&cpu->hvf_fd, HV_VCPU_DEFAULT);
> - cpu->hvf_vcpu_dirty = 1;
> + cpu->vcpu_dirty = 1;
cpu->vcpu_dirty is bool. Please use true/false consistently instead of
1/0.
> @@ -356,13 +356,14 @@ typedef struct x68_segment_selector {
> };
> } __attribute__ ((__packed__)) x68_segment_selector;
>
> -/* Definition of hvf_x86_state is here */
> -struct hvf_x86_state {
> - int hlt;
> - uint64_t init_tsc;
> +typedef struct lazy_flags {
> + addr_t result;
> + addr_t auxbits;
> +} lazy_flags;
>
> +/* Definition of hvf_x86_state is here */
hvf_x86_state no longer exists. This comment is outdated now?
- [Qemu-devel] [PATCH v2 06/13] hvf: use new helper functions for put/get xsave, (continued)
- [Qemu-devel] [PATCH v2 06/13] hvf: use new helper functions for put/get xsave, Sergio Andres Gomez Del Real, 2017/08/30
- [Qemu-devel] [PATCH v2 05/13] hvf: add fields to CPUState and CPUX86State; add definitions, Sergio Andres Gomez Del Real, 2017/08/30
- [Qemu-devel] [PATCH v2 10/13] hvf: implement vga dirty page tracking, Sergio Andres Gomez Del Real, 2017/08/30
- [Qemu-devel] [PATCH v2 09/13] hvf: refactor cpuid code, Sergio Andres Gomez Del Real, 2017/08/30
- [Qemu-devel] [PATCH v2 13/13] hvf: inject General Protection Fault when vmexit through vmcall, Sergio Andres Gomez Del Real, 2017/08/30
- [Qemu-devel] [PATCH v2 12/13] hvf: refactor event injection code for hvf, Sergio Andres Gomez Del Real, 2017/08/30
- [Qemu-devel] [PATCH v2 11/13] hvf: move fields from CPUState to CPUX86State, Sergio Andres Gomez Del Real, 2017/08/30
- Re: [Qemu-devel] [PATCH v2 11/13] hvf: move fields from CPUState to CPUX86State,
Stefan Hajnoczi <=
- [Qemu-devel] [PATCH v2 04/13] hvf: run hvf code through checkpatch.pl and fix style issues, Sergio Andres Gomez Del Real, 2017/08/30
- [Qemu-devel] [PATCH v2 02/13] hvf: add code base from Google's QEMU repository, Sergio Andres Gomez Del Real, 2017/08/30
- Re: [Qemu-devel] [PATCH v2 02/13] hvf: add code base from Google's QEMU repository, Daniel P. Berrange, 2017/08/30
- Re: [Qemu-devel] [PATCH v2 02/13] hvf: add code base from Google's QEMU repository, Stefan Hajnoczi, 2017/08/31
- Re: [Qemu-devel] [PATCH v2 02/13] hvf: add code base from Google's QEMU repository, Paolo Bonzini, 2017/08/31
- Re: [Qemu-devel] [PATCH v2 02/13] hvf: add code base from Google's QEMU repository, Izik Eidus, 2017/08/31
- Re: [Qemu-devel] [PATCH v2 02/13] hvf: add code base from Google's QEMU repository, Paolo Bonzini, 2017/08/31
- Re: [Qemu-devel] [PATCH v2 02/13] hvf: add code base from Google's QEMU repository, Izik Eidus, 2017/08/31
- Re: [Qemu-devel] [PATCH v2 02/13] hvf: add code base from Google's QEMU repository, Sergio Andrés Gómez del Real, 2017/08/31