blob: cac62d974916123d6a900fdc195b3450e97179a2 [file] [log] [blame]
Paolo Bonzini00f6da62016-03-15 13:16:36 +01001/*
2 * Internal structs that QEMU exports to TCG
3 *
4 * Copyright (c) 2003 Fabrice Bellard
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
Chetan Pant61f3c912020-10-23 12:44:24 +00009 * version 2.1 of the License, or (at your option) any later version.
Paolo Bonzini00f6da62016-03-15 13:16:36 +010010 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
18 */
19
Markus Armbruster2a6a4072016-06-29 13:47:03 +020020#ifndef QEMU_TB_CONTEXT_H
21#define QEMU_TB_CONTEXT_H
Paolo Bonzini00f6da62016-03-15 13:16:36 +010022
23#include "qemu/thread.h"
Emilio G. Cota909eaac2016-06-08 14:55:32 -040024#include "qemu/qht.h"
Paolo Bonzini00f6da62016-03-15 13:16:36 +010025
Emilio G. Cota909eaac2016-06-08 14:55:32 -040026#define CODE_GEN_HTABLE_BITS 15
27#define CODE_GEN_HTABLE_SIZE (1 << CODE_GEN_HTABLE_BITS)
Paolo Bonzini00f6da62016-03-15 13:16:36 +010028
Paolo Bonzini00f6da62016-03-15 13:16:36 +010029typedef struct TBContext TBContext;
30
31struct TBContext {
32
Emilio G. Cota909eaac2016-06-08 14:55:32 -040033 struct qht htable;
Paolo Bonzini00f6da62016-03-15 13:16:36 +010034
35 /* statistics */
Sergey Fedorov3359baa2016-08-02 18:27:43 +010036 unsigned tb_flush_count;
Richard Hendersona4390642021-07-06 20:54:56 -070037 unsigned tb_phys_invalidate_count;
Paolo Bonzini00f6da62016-03-15 13:16:36 +010038};
39
Emilio G. Cota44ded3d2017-06-23 20:04:43 -040040extern TBContext tb_ctx;
41
Paolo Bonzini00f6da62016-03-15 13:16:36 +010042#endif