Re: [PATCH] hw/usb/hcd-dwc2: Handle invalid address access in read and write functions

2024-06-20 Thread Peter Maydell
On Tue, 18 Jun 2024 at 22:33, Paul Zimmerman wrote: > > On Tue, Jun 18, 2024 at 1:37 PM Philippe Mathieu-Daudé > wrote: >> >> Hi Paul, >> >> On 18/6/24 20:58, Paul Zimmerman wrote: >> > On Tue, Jun 18, 2024 at 6:56 AM Zheyu Ma > > > wrote: >> > > >> > > This commit

Re: [PATCH] hw/usb/hcd-dwc2: Handle invalid address access in read and write functions

2024-06-18 Thread Paul Zimmerman
On Tue, Jun 18, 2024 at 1:37 PM Philippe Mathieu-Daudé wrote: > Hi Paul, > > On 18/6/24 20:58, Paul Zimmerman wrote: > > On Tue, Jun 18, 2024 at 6:56 AM Zheyu Ma > > wrote: > > > > > > This commit modifies the dwc2_hsotg_read() and dwc2_hsotg_write() > > functions >

Re: [PATCH] hw/usb/hcd-dwc2: Handle invalid address access in read and write functions

2024-06-18 Thread Philippe Mathieu-Daudé
Hi Paul, On 18/6/24 20:58, Paul Zimmerman wrote: On Tue, Jun 18, 2024 at 6:56 AM Zheyu Ma > wrote: > > This commit modifies the dwc2_hsotg_read() and dwc2_hsotg_write() functions > to handle invalid address access gracefully. Instead of using > g_assert_not_reac

Re: [PATCH] hw/usb/hcd-dwc2: Handle invalid address access in read and write functions

2024-06-18 Thread Paul Zimmerman
On Tue, Jun 18, 2024 at 6:56 AM Zheyu Ma wrote: > > This commit modifies the dwc2_hsotg_read() and dwc2_hsotg_write() functions > to handle invalid address access gracefully. Instead of using > g_assert_not_reached(), which causes the program to abort, the functions > now log an error message and

Re: [PATCH] hw/usb/hcd-dwc2: Handle invalid address access in read and write functions

2024-06-18 Thread Philippe Mathieu-Daudé
Cc'ing Paul. On 18/6/24 15:56, Zheyu Ma wrote: This commit modifies the dwc2_hsotg_read() and dwc2_hsotg_write() functions to handle invalid address access gracefully. Instead of using g_assert_not_reached(), which causes the program to abort, the functions now log an error message and return a

[PATCH] hw/usb/hcd-dwc2: Handle invalid address access in read and write functions

2024-06-18 Thread Zheyu Ma
This commit modifies the dwc2_hsotg_read() and dwc2_hsotg_write() functions to handle invalid address access gracefully. Instead of using g_assert_not_reached(), which causes the program to abort, the functions now log an error message and return a default value for reads or do nothing for writes.