OSDN Git Service

cirrus: handle wraparound in cirrus_invalidate_region
authorGerd Hoffmann <kraxel@redhat.com>
Tue, 1 Sep 2020 14:09:44 +0000 (16:09 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 4 Sep 2020 08:12:56 +0000 (10:12 +0200)
commit5fcf787582dd911df3a971718010bfca5a20e61d
treebe5dc084ffcb1313227889fe2df840a2337d4e11
parenteb398a54e33ab2ac9701839be9b660af3e50a32e
cirrus: handle wraparound in cirrus_invalidate_region

Code simply asserts that there is no wraparound instead of handling
it properly.  The assert() can be triggered by the guest (must be
privilidged inside the guest though).  Fix it.

Buglink: https://bugs.launchpad.net/qemu/+bug/1880189
Cc: Li Qiang <liq3ea@163.com>
Reported-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Li Qiang <liq3ea@163.com>
Message-id: 20200901140944.24101-1-kraxel@redhat.com
hw/display/cirrus_vga.c