qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

sm501: Do not allow guest to set invalid format

Prevent guest setting invalid format value that might trip checks in
sm501_2d_operation().

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 26d4fa9b8ce81e2723e98d592ccba7550042752c.1592686588.git.balaton@eik.bme.hu
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>

authored by

BALATON Zoltan and committed by
Gerd Hoffmann
f018edc3 ba27110f

+3
+3
hw/display/sm501.c
··· 1503 1503 s->twoD_background = value; 1504 1504 break; 1505 1505 case SM501_2D_STRETCH: 1506 + if (((value >> 20) & 3) == 3) { 1507 + value &= ~BIT(20); 1508 + } 1506 1509 s->twoD_stretch = value; 1507 1510 break; 1508 1511 case SM501_2D_COLOR_COMPARE: