mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-08-28 18:15:41 +00:00
7fca1897f9
Framebuffer memory which was mmap() is being free() at the shutdown of the guest, leading to glibc errors. Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
35 lines
666 B
C
35 lines
666 B
C
#ifndef KVM__FRAMEBUFFER_H
|
|
#define KVM__FRAMEBUFFER_H
|
|
|
|
#include <linux/types.h>
|
|
#include <linux/list.h>
|
|
|
|
struct framebuffer;
|
|
|
|
struct fb_target_operations {
|
|
int (*start)(struct framebuffer *fb);
|
|
};
|
|
|
|
#define FB_MAX_TARGETS 2
|
|
|
|
struct framebuffer {
|
|
struct list_head node;
|
|
|
|
u32 width;
|
|
u32 height;
|
|
u8 depth;
|
|
char *mem;
|
|
u64 mem_addr;
|
|
u64 mem_size;
|
|
|
|
unsigned long nr_targets;
|
|
struct fb_target_operations *targets[FB_MAX_TARGETS];
|
|
};
|
|
|
|
struct framebuffer *fb__register(struct framebuffer *fb);
|
|
int fb__attach(struct framebuffer *fb, struct fb_target_operations *ops);
|
|
int fb__start(void);
|
|
void fb__stop(void);
|
|
|
|
#endif /* KVM__FRAMEBUFFER_H */
|