[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] translate-all: fix locking of TBs whose two pag
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH] translate-all: fix locking of TBs whose two pages share the same physical page |
Date: |
Tue, 26 Jun 2018 19:28:19 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 |
On 06/25/2018 09:31 AM, Emilio G. Cota wrote:
> + } else if (page1 == page2) {
> + page_lock(p1);
> + if (ret_p2) {
> + *ret_p2 = p1;
I think you should set NULL here...
> @@ -1623,7 +1641,7 @@ tb_link_page(TranslationBlock *tb, tb_page_addr_t
> phys_pc,
> tb = existing_tb;
> }
>
> - if (p2) {
> + if (p2 && p2 != p) {
> page_unlock(p2);
... so that you need no change here.
Otherwise it looks good.
r~