Re: [PATCH 1/2] hw/gpio/aspeed: Don't let guests modify input pins

2022-07-17 Thread Andrew Jeffery
I think we've sorted this out, but replying to finalise the conversation On Tue, 12 Jul 2022, at 11:27, Peter Delevoryas wrote: > On Mon, Jul 11, 2022 at 10:56:08PM +0930, Andrew Jeffery wrote: >> >> /* >> @@ -607,7 +608,7 @@ static void aspeed_gpio_write(void *opaque, hwaddr >> offset,

Re: [PATCH 1/2] hw/gpio/aspeed: Don't let guests modify input pins

2022-07-11 Thread Peter Delevoryas
On Mon, Jul 11, 2022 at 10:56:08PM +0930, Andrew Jeffery wrote: > > > On Fri, 8 Jul 2022, at 04:34, Peter Delevoryas wrote: > > On Thu, Jul 07, 2022 at 10:53:57AM -0700, Peter Delevoryas wrote: > >> On Thu, Jul 07, 2022 at 10:56:02AM +0200, Cédric Le Goater wrote: > >> > On 7/7/22 09:17, Peter

Re: [PATCH 1/2] hw/gpio/aspeed: Don't let guests modify input pins

2022-07-11 Thread Andrew Jeffery
On Fri, 8 Jul 2022, at 04:34, Peter Delevoryas wrote: > On Thu, Jul 07, 2022 at 10:53:57AM -0700, Peter Delevoryas wrote: >> On Thu, Jul 07, 2022 at 10:56:02AM +0200, Cédric Le Goater wrote: >> > On 7/7/22 09:17, Peter Delevoryas wrote: >> > > It seems that aspeed_gpio_update is allowing the

Re: [PATCH 1/2] hw/gpio/aspeed: Don't let guests modify input pins

2022-07-11 Thread Andrew Jeffery
On Thu, 7 Jul 2022, at 17:50, Joel Stanley wrote: > On Thu, 7 Jul 2022 at 07:17, Peter Delevoryas wrote: >> >> It seems that aspeed_gpio_update is allowing the value for input pins to be >> modified through register writes and QOM property modification. >> >> The QOM property modification is

Re: [PATCH 1/2] hw/gpio/aspeed: Don't let guests modify input pins

2022-07-11 Thread Cédric Le Goater
On 7/7/22 21:04, Peter Delevoryas wrote: On Thu, Jul 07, 2022 at 10:53:57AM -0700, Peter Delevoryas wrote: On Thu, Jul 07, 2022 at 10:56:02AM +0200, Cédric Le Goater wrote: On 7/7/22 09:17, Peter Delevoryas wrote: It seems that aspeed_gpio_update is allowing the value for input pins to be

Re: [PATCH 1/2] hw/gpio/aspeed: Don't let guests modify input pins

2022-07-07 Thread Peter Delevoryas
On Thu, Jul 07, 2022 at 10:53:57AM -0700, Peter Delevoryas wrote: > On Thu, Jul 07, 2022 at 10:56:02AM +0200, Cédric Le Goater wrote: > > On 7/7/22 09:17, Peter Delevoryas wrote: > > > It seems that aspeed_gpio_update is allowing the value for input pins to > > > be > > > modified through

Re: [PATCH 1/2] hw/gpio/aspeed: Don't let guests modify input pins

2022-07-07 Thread Peter Delevoryas
On Thu, Jul 07, 2022 at 10:56:02AM +0200, Cédric Le Goater wrote: > On 7/7/22 09:17, Peter Delevoryas wrote: > > It seems that aspeed_gpio_update is allowing the value for input pins to be > > modified through register writes and QOM property modification. > > > > The QOM property modification is

Re: [PATCH 1/2] hw/gpio/aspeed: Don't let guests modify input pins

2022-07-07 Thread Peter Delevoryas
On Thu, Jul 07, 2022 at 08:20:01AM +, Joel Stanley wrote: > On Thu, 7 Jul 2022 at 07:17, Peter Delevoryas wrote: > > > > It seems that aspeed_gpio_update is allowing the value for input pins to be > > modified through register writes and QOM property modification. > > > > The QOM property

Re: [PATCH 1/2] hw/gpio/aspeed: Don't let guests modify input pins

2022-07-07 Thread Cédric Le Goater
On 7/7/22 09:17, Peter Delevoryas wrote: It seems that aspeed_gpio_update is allowing the value for input pins to be modified through register writes and QOM property modification. The QOM property modification is fine, but modifying the value through register writes from the guest OS seems

Re: [PATCH 1/2] hw/gpio/aspeed: Don't let guests modify input pins

2022-07-07 Thread Joel Stanley
On Thu, 7 Jul 2022 at 07:17, Peter Delevoryas wrote: > > It seems that aspeed_gpio_update is allowing the value for input pins to be > modified through register writes and QOM property modification. > > The QOM property modification is fine, but modifying the value through > register writes from

[PATCH 1/2] hw/gpio/aspeed: Don't let guests modify input pins

2022-07-07 Thread Peter Delevoryas
It seems that aspeed_gpio_update is allowing the value for input pins to be modified through register writes and QOM property modification. The QOM property modification is fine, but modifying the value through register writes from the guest OS seems wrong if the pin's direction is set to input.