Re: [Qemu-devel] [PATCH v3] implementing victim TLB for QEMU system emulated TLB

2014-02-02 Thread Peter Maydell
On 2 February 2014 19:39, Xin Tong wrote: > what should i do here? i want to pass the ADDR_READ/addr_write into > the macro. But i do not know how I can convert it into > env->tlb_v_table[mmu_idx][vidx].ADDR_READ/env->tlb_v_table[mmu_idx][vidx].addr_write. I told you what you were doing wrong. Ju

Re: [Qemu-devel] [PATCH v3] implementing victim TLB for QEMU system emulated TLB

2014-02-02 Thread Xin Tong
what should i do here? i want to pass the ADDR_READ/addr_write into the macro. But i do not know how I can convert it into env->tlb_v_table[mmu_idx][vidx].ADDR_READ/env->tlb_v_table[mmu_idx][vidx].addr_write. Thanks a lot, Xin On Sun, Feb 2, 2014 at 1:29 PM, Peter Maydell wrote: > On 2 February

Re: [Qemu-devel] [PATCH v3] implementing victim TLB for QEMU system emulated TLB

2014-02-02 Thread Peter Maydell
On 2 February 2014 19:01, Xin Tong wrote: > I am getting some compilation errors while stringnifying the > ADDR_READ, addr_write. > > function helper_be_ldq_cmmu > > if (!VICTIM_TLB_HIT(ADDR_READ)) { > > > macro > > #define VICTIM_TLB_HIT(ACCESS_TYPE) >

Re: [Qemu-devel] [PATCH v3] implementing victim TLB for QEMU system emulated TLB

2014-02-02 Thread Xin Tong
I am getting some compilation errors while stringnifying the ADDR_READ, addr_write. function helper_be_ldq_cmmu if (!VICTIM_TLB_HIT(ADDR_READ)) { macro #define VICTIM_TLB_HIT(ACCESS_TYPE) \ ({

Re: [Qemu-devel] [PATCH v3] implementing victim TLB for QEMU system emulated TLB

2014-02-02 Thread Peter Maydell
On 2 February 2014 18:27, Xin Tong wrote: > On Sun, Feb 2, 2014 at 10:19 AM, Peter Maydell > wrote: >> Statement expressions are supported by both gcc and clang, >> which is the set of compilers we care about. > > Ok got it. would moving vtlb_idx inside the macro break the C89 rule > of "No Vari

Re: [Qemu-devel] [PATCH v3] implementing victim TLB for QEMU system emulated TLB

2014-02-02 Thread Xin Tong
On Sun, Feb 2, 2014 at 10:19 AM, Peter Maydell wrote: > On 2 February 2014 15:15, Xin Tong wrote: >> Hi Peter >> >> Thank you for your reviews , i have 2 questions. >> >> On Sat, Feb 1, 2014 at 4:14 PM, Peter Maydell >> wrote: >>> On 28 January 2014 17:31, Xin Tong wrote: +/* macro to che

Re: [Qemu-devel] [PATCH v3] implementing victim TLB for QEMU system emulated TLB

2014-02-02 Thread Peter Maydell
On 2 February 2014 15:15, Xin Tong wrote: > Hi Peter > > Thank you for your reviews , i have 2 questions. > > On Sat, Feb 1, 2014 at 4:14 PM, Peter Maydell > wrote: >> On 28 January 2014 17:31, Xin Tong wrote: >>> +/* macro to check the victim tlb */ >>> +#define HELPER_CHECK_VICTIM_TLB(ACCESS_

Re: [Qemu-devel] [PATCH v3] implementing victim TLB for QEMU system emulated TLB

2014-02-02 Thread Xin Tong
Hi Peter Thank you for your reviews , i have 2 questions. On Sat, Feb 1, 2014 at 4:14 PM, Peter Maydell wrote: > On 28 January 2014 17:31, Xin Tong wrote: >> This patch adds a victim TLB to the QEMU system mode TLB. >> >> QEMU system mode page table walks are expensive. Taken by running QEMU >>

Re: [Qemu-devel] [PATCH v3] implementing victim TLB for QEMU system emulated TLB

2014-02-01 Thread Peter Maydell
On 28 January 2014 17:31, Xin Tong wrote: > This patch adds a victim TLB to the QEMU system mode TLB. > > QEMU system mode page table walks are expensive. Taken by running QEMU > qemu-system-x86_64 system mode on Intel PIN , a TLB miss and walking a > 4-level page tables in guest Linux OS takes ~4

Re: [Qemu-devel] [PATCH v3] implementing victim TLB for QEMU system emulated TLB

2014-02-01 Thread Paolo Bonzini
Il 01/02/2014 17:35, Xin Tong ha scritto: Hi QEMU Community This patch provides significant performance improvement (10.76% on average) for QEMU system emulation. so I urge the someone in the QEMU community to review this patch so that it has the hope of making into the mainline. I understand th

Re: [Qemu-devel] [PATCH v3] implementing victim TLB for QEMU system emulated TLB

2014-02-01 Thread Xin Tong
Hi QEMU Community This patch provides significant performance improvement (10.76% on average) for QEMU system emulation. so I urge the someone in the QEMU community to review this patch so that it has the hope of making into the mainline. I understand that I have made mistakes in patch submission

Re: [Qemu-devel] [PATCH v3] implementing victim TLB for QEMU system emulated TLB

2014-01-29 Thread Xin Tong
can someone please review this patch ? Thank you, Xin On Tue, Jan 28, 2014 at 11:31 AM, Xin Tong wrote: > This patch adds a victim TLB to the QEMU system mode TLB. > > QEMU system mode page table walks are expensive. Taken by running QEMU > qemu-system-x86_64 system mode on Intel PIN , a TLB mis

[Qemu-devel] [PATCH v3] implementing victim TLB for QEMU system emulated TLB

2014-01-28 Thread Xin Tong
This patch adds a victim TLB to the QEMU system mode TLB. QEMU system mode page table walks are expensive. Taken by running QEMU qemu-system-x86_64 system mode on Intel PIN , a TLB miss and walking a 4-level page tables in guest Linux OS takes ~450 X86 instructions on average. QEMU system mode TL