Skip to content

Commit 194f8ca

Browse files
committed
Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20200725' into staging
Fix some cputlb commentary Fix an hppa temporary leak Fix an i386 translation issue with loop insns # gpg: Signature made Sat 25 Jul 2020 17:03:59 BST # gpg: using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F # gpg: issuer "[email protected]" # gpg: Good signature from "Richard Henderson <[email protected]>" [full] # Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A 05C0 64DF 38E8 AF7E 215F * remotes/rth/tags/pull-tcg-20200725: target/i386: Save cc_op before loop insns target/hppa: Free some temps in do_sub tcg: update comments for save_iotlb_data in cputlb Signed-off-by: Peter Maydell <[email protected]>
2 parents 57cdde4 + 3cb3a77 commit 194f8ca

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

accel/tcg/cputlb.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,10 +1075,8 @@ static uint64_t io_readx(CPUArchState *env, CPUIOTLBEntry *iotlbentry,
10751075

10761076
/*
10771077
* Save a potentially trashed IOTLB entry for later lookup by plugin.
1078-
*
1079-
* We also need to track the thread storage address because the RCU
1080-
* cleanup that runs when we leave the critical region (the current
1081-
* execution) is actually in a different thread.
1078+
* This is read by tlb_plugin_lookup if the iotlb entry doesn't match
1079+
* because of the side effect of io_writex changing memory layout.
10821080
*/
10831081
static void save_iotlb_data(CPUState *cs, hwaddr addr,
10841082
MemoryRegionSection *section, hwaddr mr_offset)
@@ -1408,8 +1406,9 @@ void *tlb_vaddr_to_host(CPUArchState *env, abi_ptr addr,
14081406
* This almost never fails as the memory access being instrumented
14091407
* should have just filled the TLB. The one corner case is io_writex
14101408
* which can cause TLB flushes and potential resizing of the TLBs
1411-
* loosing the information we need. In those cases we need to recover
1412-
* data from a copy of the io_tlb entry.
1409+
* losing the information we need. In those cases we need to recover
1410+
* data from a copy of the iotlbentry. As long as this always occurs
1411+
* from the same thread (which a mem callback will be) this is safe.
14131412
*/
14141413

14151414
bool tlb_plugin_lookup(CPUState *cpu, target_ulong addr, int mmu_idx,

target/hppa/translate.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1294,6 +1294,8 @@ static void do_sub(DisasContext *ctx, unsigned rt, TCGv_reg in1,
12941294
save_or_nullify(ctx, cpu_psw_cb_msb, cb_msb);
12951295
save_gpr(ctx, rt, dest);
12961296
tcg_temp_free(dest);
1297+
tcg_temp_free(cb);
1298+
tcg_temp_free(cb_msb);
12971299

12981300
/* Install the new nullification. */
12991301
cond_free(&ctx->null_cond);

target/i386/translate.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7148,6 +7148,7 @@ static target_ulong disas_insn(DisasContext *s, CPUState *cpu)
71487148
l1 = gen_new_label();
71497149
l2 = gen_new_label();
71507150
l3 = gen_new_label();
7151+
gen_update_cc_op(s);
71517152
b &= 3;
71527153
switch(b) {
71537154
case 0: /* loopnz */

0 commit comments

Comments
 (0)