diff options
| author | 项小羽 <[email protected]> | 2022-07-24 09:59:37 +0000 |
|---|---|---|
| committer | 项小羽 <[email protected]> | 2022-07-24 09:59:37 +0000 |
| commit | 86b69eecc826d23c29eec5c10860e02987223e83 (patch) | |
| tree | 5f3e9b6ab5ede38a2e8956d329f580cc6caff965 | |
| parent | c54215b07299f28d5c2414bce9aa63d6a566c369 (diff) | |
temp work, but still have some problem
| -rw-r--r-- | hw/intc/apic.c | 3 | ||||
| -rw-r--r-- | target/i386/tcg/misc_helper.c | 4 | ||||
| -rw-r--r-- | target/i386/tcg/seg_helper.c | 3 | ||||
| -rw-r--r-- | target/i386/tcg/sysemu/misc_helper.c | 1 |
4 files changed, 7 insertions, 4 deletions
diff --git a/hw/intc/apic.c b/hw/intc/apic.c index c8435a88b2..f1c79c074b 100644 --- a/hw/intc/apic.c +++ b/hw/intc/apic.c @@ -872,7 +872,7 @@ static const MemoryRegionOps apic_io_ops = { static void apic_realize(DeviceState *dev, Error **errp) { - if(Debug)qemu_log("~ ~ ~ ~apic realize called\n"); + APICCommonState *s = APIC(dev); if (s->id >= MAX_APICS) { @@ -958,7 +958,6 @@ static void apic_deliver2(uint8_t dest, uint8_t dest_mode, uint32_t deliver_bitmask[MAX_APIC_WORDS]; int dest_shorthand = (s->icr[0] >> 18) & 3; APICCommonState *apic_iter; - qemu_log("dest_shorthand:%d\n", dest_shorthand); switch (dest_shorthand) { case 0: apic_get_delivery_bitmask(deliver_bitmask, dest, dest_mode); diff --git a/target/i386/tcg/misc_helper.c b/target/i386/tcg/misc_helper.c index 663a3b8086..2e35d6c24f 100644 --- a/target/i386/tcg/misc_helper.c +++ b/target/i386/tcg/misc_helper.c @@ -91,6 +91,7 @@ void helper_senduipi(CPUX86State *env ,int reg_index){ if (uitte_index > uittsz){ raise_exception_ra(env, EXCP0D_GPF, GETPC()); } + qemu_log("uitte index:%d\n", uitte_index); CPUState *cs = env_cpu(env); @@ -102,6 +103,7 @@ void helper_senduipi(CPUX86State *env ,int reg_index){ // read tempUPID from 16 bytes at tempUITTE.UPIDADDR;// under lock qemu_mutex_lock_iothread(); uint64_t upid_phyaddress = get_hphys2(cs, uitte.target_upid_addr, MMU_DATA_LOAD, NULL); + qemu_log("uitt addr: 0x%lx upid addr: 0x%lx\n", env->uintr_tt, uitte.target_upid_addr); struct uintr_upid upid; cpu_physical_memory_rw(upid_phyaddress, &upid, 16, false); // tempUPID.PIR[tempUITTE.UV] := 1; @@ -124,7 +126,7 @@ void helper_senduipi(CPUX86State *env ,int reg_index){ if(sendNotify){ uint8_t realdst = upid.nc.ndst >> 8; - send_ipi(realdst, 0xec); + send_ipi(realdst, upid.nc.nv); } diff --git a/target/i386/tcg/seg_helper.c b/target/i386/tcg/seg_helper.c index d79f1caa07..e09ffed46c 100644 --- a/target/i386/tcg/seg_helper.c +++ b/target/i386/tcg/seg_helper.c @@ -935,6 +935,7 @@ void helper_uiret(CPUX86State *env){ env->eip = temprip; env->regs[R_ESP] = temprsp; env->eflags = (env->eflags & ~0x254dd5) |(temprfalgs & 0x254dd5); + qemu_log("XXXuiret \n"); switch_uif(env, true); } @@ -977,7 +978,7 @@ static void do_interrupt64(CPUX86State *env, int intno, int is_int, int id = get_apic_id(dev); qemu_log("--uif zero,prev:%d | id:%d return\n",cpl, id); rrzero_count +=1; - if(rrzero_count > 200){ + if(rrzero_count > 2000){ qemu_log("too many zeros, exit\n"); exit(2); } diff --git a/target/i386/tcg/sysemu/misc_helper.c b/target/i386/tcg/sysemu/misc_helper.c index 6042f96143..c84ce1ca41 100644 --- a/target/i386/tcg/sysemu/misc_helper.c +++ b/target/i386/tcg/sysemu/misc_helper.c @@ -248,6 +248,7 @@ void helper_wrmsr(CPUX86State *env) env->uintr_pd = val; break; case MSR_IA32_UINTR_TT: + qemu_log("write tt %lx core:%d\n", val,get_apic_id(cpu_get_current_apic())); env->uintr_tt = val; break; case MSR_MTRRphysBase(0): |
