Commit fcfa0d5
committed
femu/zns: bound the write cache count by the zones there are
The count comes straight from a property and sizes an allocation, so a
large value failed it and aborted QEMU at realize. It is bounded twice:
before the allocation by the most zones the geometry could have, and
once the zones exist by their actual count, since a cache past that is
never used. Only an explicit count is held to the second bound; the
default of three predates the property, and a device with fewer zones
has always come up with it.1 parent 2ae58aa commit fcfa0d5
1 file changed
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
85 | 96 | | |
86 | 97 | | |
87 | 98 | | |
| |||
1990 | 2001 | | |
1991 | 2002 | | |
1992 | 2003 | | |
| 2004 | + | |
| 2005 | + | |
| 2006 | + | |
| 2007 | + | |
| 2008 | + | |
| 2009 | + | |
| 2010 | + | |
| 2011 | + | |
| 2012 | + | |
| 2013 | + | |
| 2014 | + | |
| 2015 | + | |
1993 | 2016 | | |
1994 | 2017 | | |
1995 | 2018 | | |
| |||
0 commit comments