Re: [Qemu-devel] [PATCH 2/6] exec.c: remove an unnecessary assert on PHYS_MAP_NODE_NIL in phys_map_node_alloc()

2019-09-16 Thread Paolo Bonzini
On 16/09/19 04:02, Wei Yang wrote: > On Fri, Sep 13, 2019 at 11:12:05AM +0200, Paolo Bonzini wrote: >> On 13/09/19 01:02, Wei Yang wrote: >>> It shows PHYS_MAP_NODE_NIL may represents more node the tree could hold. >> >> Which is good, it means the assert can trigger. >> > > Per my understanding,

Re: [Qemu-devel] [PATCH 2/6] exec.c: remove an unnecessary assert on PHYS_MAP_NODE_NIL in phys_map_node_alloc()

2019-09-15 Thread Wei Yang
On Fri, Sep 13, 2019 at 11:12:05AM +0200, Paolo Bonzini wrote: >On 13/09/19 01:02, Wei Yang wrote: >> It shows PHYS_MAP_NODE_NIL may represents more node the tree could hold. > >Which is good, it means the assert can trigger. > Per my understanding, it means the assert can't trigger. >> The

Re: [Qemu-devel] [PATCH 2/6] exec.c: remove an unnecessary assert on PHYS_MAP_NODE_NIL in phys_map_node_alloc()

2019-09-13 Thread Paolo Bonzini
On 13/09/19 01:02, Wei Yang wrote: > It shows PHYS_MAP_NODE_NIL may represents more node the tree could hold. Which is good, it means the assert can trigger. > The assert here is not harmful, while maybe we can have a better way to handle > it? I don't know... The assert just says "careful,

Re: [Qemu-devel] [PATCH 2/6] exec.c: remove an unnecessary assert on PHYS_MAP_NODE_NIL in phys_map_node_alloc()

2019-09-12 Thread Wei Yang
On Thu, Sep 12, 2019 at 02:42:26PM +0200, Paolo Bonzini wrote: >On 12/09/19 04:51, Wei Yang wrote: >> On Fri, Aug 23, 2019 at 09:07:50AM +0800, Wei Yang wrote: >>> On Thu, Aug 22, 2019 at 12:24:32PM +0200, Paolo Bonzini wrote: On 21/03/19 09:25, Wei Yang wrote: > PHYS_MAP_NODE_NIL is

Re: [Qemu-devel] [PATCH 2/6] exec.c: remove an unnecessary assert on PHYS_MAP_NODE_NIL in phys_map_node_alloc()

2019-09-12 Thread Paolo Bonzini
On 12/09/19 04:51, Wei Yang wrote: > On Fri, Aug 23, 2019 at 09:07:50AM +0800, Wei Yang wrote: >> On Thu, Aug 22, 2019 at 12:24:32PM +0200, Paolo Bonzini wrote: >>> On 21/03/19 09:25, Wei Yang wrote: PHYS_MAP_NODE_NIL is assigned to PhysPageEntry.ptr in case this is not a leaf entry,

Re: [Qemu-devel] [PATCH 2/6] exec.c: remove an unnecessary assert on PHYS_MAP_NODE_NIL in phys_map_node_alloc()

2019-09-11 Thread Wei Yang
On Fri, Aug 23, 2019 at 09:07:50AM +0800, Wei Yang wrote: >On Thu, Aug 22, 2019 at 12:24:32PM +0200, Paolo Bonzini wrote: >>On 21/03/19 09:25, Wei Yang wrote: >>> PHYS_MAP_NODE_NIL is assigned to PhysPageEntry.ptr in case this is not a >>> leaf entry, while map->nodes_nb range in [0,

Re: [Qemu-devel] [PATCH 2/6] exec.c: remove an unnecessary assert on PHYS_MAP_NODE_NIL in phys_map_node_alloc()

2019-08-22 Thread Wei Yang
On Thu, Aug 22, 2019 at 12:24:32PM +0200, Paolo Bonzini wrote: >On 21/03/19 09:25, Wei Yang wrote: >> PHYS_MAP_NODE_NIL is assigned to PhysPageEntry.ptr in case this is not a >> leaf entry, while map->nodes_nb range in [0, nodes_nb_alloc). >> >> Seems we are asserting on two different things,

Re: [Qemu-devel] [PATCH 2/6] exec.c: remove an unnecessary assert on PHYS_MAP_NODE_NIL in phys_map_node_alloc()

2019-08-22 Thread Paolo Bonzini
On 21/03/19 09:25, Wei Yang wrote: > PHYS_MAP_NODE_NIL is assigned to PhysPageEntry.ptr in case this is not a > leaf entry, while map->nodes_nb range in [0, nodes_nb_alloc). > > Seems we are asserting on two different things, just remove it. The assertion checks that this "if" is not entered