microvm: turn off io reservations for pcie root ports
PATCH 1/1 microvm: turn off io reservations for pcie root ports
The pcie host bridge has no io window on microvm,
so io reservations will not work.
--- hw/i386/microvm.c | 6 ++++++ 1 file changed, 6 insertions(+)
hw/i386/microvm.c +6 -0
@@ -757,6 +757,12 @@ static void microvm_class_init(ObjectClass *oc, void *data) "Set off to disable adding virtio-mmio devices to the kernel cmdline");machine_class_allow_dynamic_sysbus_dev (mc,TYPE_RAMFB_DEVICE ); + +/* +* pcie host bridge (gpex) on microvm has no io address window, +* so reserving io space is not going to work. Turn it off. +*/ +object_register_sugar_prop ("pcie-root-port" ,"io-reserve" ,"0" , true); }static const TypeInfo microvm_machine_info = {
Signature · 1 line
2.36.1
Quoted 7 lines · Gerd Hoffmann
The pcie host bridge has no io window on microvm,
so io reservations will not work.Signed-off-by Gerd Hoffmann <[email protected]>--- hw/i386/microvm.c | 6 ++++++ 1 file changed, 6 insertions(+)
Quoted 7 lines · Gerd Hoffmann
The pcie host bridge has no io window on microvm,
so io reservations will not work.Signed-off-by Gerd Hoffmann <[email protected]>--- hw/i386/microvm.c | 6 ++++++ 1 file changed, 6 insertions(+)
Quoted 4 lines · Gerd Hoffmann
The pcie host bridge has no io window on microvm,
so io reservations will not work.Signed-off-by Gerd Hoffmann <[email protected]>
I don't much like overriding user like this. We end up users setting it to silly values and then if we do want to support this things just break. Thoughts?
Quoted 23 lines
--- hw/i386/microvm.c | 6 ++++++ 1 file changed, 6 insertions(+)hw/i386/microvm.c +6
-0@@ -757,6 +757,12 @@ static void microvm_class_init(ObjectClass *oc, void *data) "Set off to disable adding virtio-mmio devices to the kernel cmdline");machine_class_allow_dynamic_sysbus_dev (mc,TYPE_RAMFB_DEVICE ); + +/* +* pcie host bridge (gpex) on microvm has no io address window, +* so reserving io space is not going to work. Turn it off. +*/ +object_register_sugar_prop ("pcie-root-port" ,"io-reserve" ,"0" , true); }static const TypeInfo microvm_machine_info = {Signature · 1 line
2.36.1
Quoted 9 lines · Michael S. Tsirkin
Quoted 4 lines · Gerd Hoffmann
The pcie host bridge has no io window on microvm,
so io reservations will not work.Signed-off-by Gerd Hoffmann <[email protected]>I don't much like overriding user like this. We end up users setting it to silly values and then if we do want to support this things just break. Thoughts?
Well, it just looked like the simplest way to tell the firmware that io reservations are pointless. Do you have a better idea?
take care,
Gerd
Quoted 11 lines · Gerd Hoffmann
Quoted 9 lines · Michael S. Tsirkin
Quoted 4 lines · Gerd Hoffmann
The pcie host bridge has no io window on microvm,
so io reservations will not work.Signed-off-by Gerd Hoffmann <[email protected]>I don't much like overriding user like this. We end up users setting it to silly values and then if we do want to support this things just break. Thoughts?
Quoted 5 lines
Well, it just looked like the simplest way to tell the firmware that io reservations are pointless. Do you have a better idea?
take care,
Gerd
Fail if user supplies values we can't support.
Signature · 1 line
MST
Quoted 12 lines · Michael S. Tsirkin
Quoted 11 lines · Gerd Hoffmann
Quoted 9 lines · Michael S. Tsirkin
Quoted 4 lines · Gerd Hoffmann
The pcie host bridge has no io window on microvm,
so io reservations will not work.Signed-off-by Gerd Hoffmann <[email protected]>I don't much like overriding user like this. We end up users setting it to silly values and then if we do want to support this things just break. Thoughts?
Quoted 7 lines
Quoted 5 lines
Well, it just looked like the simplest way to tell the firmware that io reservations are pointless. Do you have a better idea?
take care,
GerdFail if user supplies values we can't support.
Well, it is the *default* value which doesn't work on microvm.
take care,
Gerd
Quoted 19 lines · Gerd Hoffmann
Quoted 18 lines · Michael S. Tsirkin
Quoted 16 lines · Gerd Hoffmann
Quoted 9 lines · Michael S. Tsirkin
Quoted 4 lines · Gerd Hoffmann
The pcie host bridge has no io window on microvm,
so io reservations will not work.Signed-off-by Gerd Hoffmann <[email protected]>I don't much like overriding user like this. We end up users setting it to silly values and then if we do want to support this things just break. Thoughts?
Well, it just looked like the simplest way to tell the firmware that io reservations are pointless. Do you have a better idea?
take care,
Gerd
Quoted 6 lines
Quoted 1 line
Fail if user supplies values we can't support.
Well, it is the *default* value which doesn't work on microvm.
take care,
Gerd
Changing defaults is ok of course. Let's just not override the user.
Signature · 1 line
MST
Quoted 20 lines · Michael S. Tsirkin
Quoted 19 lines · Gerd Hoffmann
Quoted 18 lines · Michael S. Tsirkin
Quoted 16 lines · Gerd Hoffmann
Quoted 9 lines · Michael S. Tsirkin
Quoted 4 lines · Gerd Hoffmann
The pcie host bridge has no io window on microvm,
so io reservations will not work.Signed-off-by Gerd Hoffmann <[email protected]>I don't much like overriding user like this. We end up users setting it to silly values and then if we do want to support this things just break. Thoughts?
Well, it just looked like the simplest way to tell the firmware that io reservations are pointless. Do you have a better idea?
take care,
Gerd
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
Fail if user supplies values we can't support.
Well, it is the *default* value which doesn't work on microvm.
take care,
GerdChanging defaults is ok of course. Let's just not override the user.
Ok, so I could use a compat property instead and change the default for microvm that way. That would allow the user set any value it wants.
I still don't see the point though. There is only a single value which makes sense on microvm. Which is zero. The only effect the user could archive is make the firmware throwing errors ...
take care,
Gerd
Quoted 25 lines · Gerd Hoffmann
Quoted 24 lines · Michael S. Tsirkin
Quoted 23 lines · Gerd Hoffmann
Quoted 12 lines · Michael S. Tsirkin
Quoted 11 lines · Gerd Hoffmann
Quoted 9 lines · Michael S. Tsirkin
Quoted 4 lines · Gerd Hoffmann
The pcie host bridge has no io window on microvm,
so io reservations will not work.Signed-off-by Gerd Hoffmann <[email protected]>I don't much like overriding user like this. We end up users setting it to silly values and then if we do want to support this things just break. Thoughts?
Quoted 7 lines
Quoted 5 lines
Well, it just looked like the simplest way to tell the firmware that io reservations are pointless. Do you have a better idea?
take care,
GerdFail if user supplies values we can't support.
Well, it is the *default* value which doesn't work on microvm.
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
take care,
GerdChanging defaults is ok of course. Let's just not override the user.
Ok, so I could use a compat property instead and change the default for microvm that way. That would allow the user set any value it wants.
And if you like check the value and fail init if not 0.
Quoted 6 lines
I still don't see the point though. There is only a single value which makes sense on microvm. Which is zero. The only effect the user could archive is make the firmware throwing errors ...
take care,
Gerd
My concern is simple: if right now we override the value then some users might set it to != 0 by mistake. Then if down the road we want to intepret != 0 in some way, these setups
will start failing. I don't claim to see a use-case why we'd want to but it's hard to predict the future with certainty.
Signature · 1 line
MST