[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 06/15] kvmvapic: remove tcg related code
From: |
Yang Zhong |
Subject: |
[Qemu-devel] [PATCH v2 06/15] kvmvapic: remove tcg related code |
Date: |
Mon, 3 Jul 2017 18:12:14 +0800 |
Since Paolo's below patch has fixed A20 issue
commit bbfa326fc8028e275eddf8c9965c2a1b59405b2e
target/i386: enable A20 automatically in system management mod
The tcg code in kvmvapic.c is NOT useful, those code need remove.
Signed-off-by: Yang Zhong <address@hidden>
---
hw/i386/kvmvapic.c | 24 ------------------------
1 file changed, 24 deletions(-)
diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c
index 82a4955..5b7be5a 100644
--- a/hw/i386/kvmvapic.c
+++ b/hw/i386/kvmvapic.c
@@ -18,7 +18,6 @@
#include "sysemu/kvm.h"
#include "hw/i386/apic_internal.h"
#include "hw/sysbus.h"
-#include "tcg/tcg.h"
#define VAPIC_IO_PORT 0x7e
@@ -396,13 +395,9 @@ static void patch_call(VAPICROMState *s, X86CPU *cpu,
target_ulong ip,
static void patch_instruction(VAPICROMState *s, X86CPU *cpu, target_ulong ip)
{
CPUState *cs = CPU(cpu);
- CPUX86State *env = &cpu->env;
VAPICHandlers *handlers;
uint8_t opcode[2];
uint32_t imm32 = 0;
- target_ulong current_pc = 0;
- target_ulong current_cs_base = 0;
- uint32_t current_flags = 0;
if (smp_cpus == 1) {
handlers = &s->rom_state.up;
@@ -410,17 +405,6 @@ static void patch_instruction(VAPICROMState *s, X86CPU
*cpu, target_ulong ip)
handlers = &s->rom_state.mp;
}
- if (!kvm_enabled()) {
- cpu_get_tb_cpu_state(env, ¤t_pc, ¤t_cs_base,
- ¤t_flags);
- /* Account this instruction, because we will exit the tb.
- This is the first instruction in the block. Therefore
- there is no need in restoring CPU state. */
- if (use_icount) {
- --cs->icount_decr.u16.low;
- }
- }
-
pause_all_vcpus();
cpu_memory_rw_debug(cs, ip, opcode, sizeof(opcode), 0);
@@ -455,14 +439,6 @@ static void patch_instruction(VAPICROMState *s, X86CPU
*cpu, target_ulong ip)
}
resume_all_vcpus();
-
- if (!kvm_enabled()) {
- /* Both tb_lock and iothread_mutex will be reset when
- * longjmps back into the cpu_exec loop. */
- tb_lock();
- tb_gen_code(cs, current_pc, current_cs_base, current_flags, 1);
- cpu_loop_exit_noexc(cs);
- }
}
void vapic_report_tpr_access(DeviceState *dev, CPUState *cs, target_ulong ip,
--
1.9.1
- Re: [Qemu-devel] [PATCH v2 01/15] configure: add the disable-tcg option, (continued)
[Qemu-devel] [PATCH v2 02/15] vl: add tcg_enabled() for tcg related code, Yang Zhong, 2017/07/03
[Qemu-devel] [PATCH v2 03/15] tcg: tcg_handle_interrupt() function, Yang Zhong, 2017/07/03
[Qemu-devel] [PATCH v2 04/15] tcg: change tcg_enabled(), Yang Zhong, 2017/07/03
[Qemu-devel] [PATCH v2 05/15] tcg: move page_size_init() function, Yang Zhong, 2017/07/03
[Qemu-devel] [PATCH v2 07/15] tcg: move cpu_sync_bndcs_hflags() function, Yang Zhong, 2017/07/03
[Qemu-devel] [PATCH v2 06/15] kvmvapic: remove tcg related code,
Yang Zhong <=
[Qemu-devel] [PATCH v2 08/15] tcg: make cpu_get_fp80()/cpu_set_fp80() static, Yang Zhong, 2017/07/03
[Qemu-devel] [PATCH v2 09/15] tcg: add the tcg-stub.c file into accel/stubs/, Yang Zhong, 2017/07/03
[Qemu-devel] [PATCH v2 10/15] tcg: move tb related lock functions, Yang Zhong, 2017/07/03
[Qemu-devel] [PATCH v2 11/15] tcg: split cpu_set_mxcsr() and make cpu_set_fpuc() inline, Yang Zhong, 2017/07/03
[Qemu-devel] [PATCH v2 12/15] tcg: disable tcg in CPUX86State struct, Yang Zhong, 2017/07/03
[Qemu-devel] [PATCH v2 13/15] tcg: add the CONFIG_TCG for header, Yang Zhong, 2017/07/03
[Qemu-devel] [PATCH v2 14/15] tcg: add the tcg_enabled() in target/i386/, Yang Zhong, 2017/07/03
[Qemu-devel] [PATCH v2 15/15] tcg: add the CONFIG_TCG into Makefiles, Yang Zhong, 2017/07/03