[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 08/26] hw/display/apple-gfx: Adds migration blocker
From: |
Phil Dennis-Jordan |
Subject: |
[PATCH 08/26] hw/display/apple-gfx: Adds migration blocker |
Date: |
Mon, 15 Jul 2024 23:06:47 +0200 |
Although the underlying ParavirtualizedGraphics.framework does support
state (de-)serialisation, this is currently not yet integrated. We
therefore add a migration blocker for now.
Signed-off-by: Phil Dennis-Jordan <phil@philjordan.eu>
---
hw/display/apple-gfx.m | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/hw/display/apple-gfx.m b/hw/display/apple-gfx.m
index 39aba8d143..c97bd40cb5 100644
--- a/hw/display/apple-gfx.m
+++ b/hw/display/apple-gfx.m
@@ -24,6 +24,8 @@
#include "sysemu/cpus.h"
#include "ui/console.h"
#include "monitor/monitor.h"
+#include "qapi/error.h"
+#include "migration/blocker.h"
#import <ParavirtualizedGraphics/ParavirtualizedGraphics.h>
#define TYPE_APPLE_GFX "apple-gfx"
@@ -109,6 +111,8 @@ -(void)mmioWriteAtOffset:(size_t) offset
value:(uint32_t)value;
OBJECT_DECLARE_SIMPLE_TYPE(AppleGFXState, APPLE_GFX)
+static Error *apple_gfx_mig_blocker;
+
static AppleGFXTask *apple_gfx_new_task(AppleGFXState *s, uint64_t len)
{
void *base = APPLE_GFX_BASE_VA;
@@ -362,6 +366,8 @@ static void apple_gfx_reset(DeviceState *d)
static void apple_gfx_init(Object *obj)
{
AppleGFXState *s = APPLE_GFX(obj);
+ Error *local_err = NULL;
+ int r;
memory_region_init_io(&s->iomem_gfx, obj, &apple_gfx_ops, s,
TYPE_APPLE_GFX, 0x4000);
memory_region_init_io(&s->iomem_iosfc, obj, &apple_iosfc_ops, s,
TYPE_APPLE_GFX, 0x10000);
@@ -369,6 +375,16 @@ static void apple_gfx_init(Object *obj)
sysbus_init_mmio(SYS_BUS_DEVICE(s), &s->iomem_iosfc);
sysbus_init_irq(SYS_BUS_DEVICE(s), &s->irq_gfx);
sysbus_init_irq(SYS_BUS_DEVICE(s), &s->irq_iosfc);
+
+ /* TODO: PVG framework supports serialising device state: integrate it! */
+ if (apple_gfx_mig_blocker == NULL) {
+ error_setg(&apple_gfx_mig_blocker,
+ "Migration state blocked by apple-gfx display device");
+ r = migrate_add_blocker(&apple_gfx_mig_blocker, &local_err);
+ if (r < 0) {
+ error_report_err(local_err);
+ }
+ }
}
static void apple_gfx_realize(DeviceState *dev, Error **errp)
--
2.39.3 (Apple Git-146)
- [no subject], Phil Dennis-Jordan, 2024/07/17
- Re:, Akihiko Odaki, 2024/07/16
- Re:, Phil Dennis-Jordan, 2024/07/17
- [PATCH 09/26] hw/display/apple-gfx: Wraps ObjC autorelease code in pool, Phil Dennis-Jordan, 2024/07/17
- [PATCH 10/26] hw/display/apple-gfx: Fixes ObjC new/init misuse, plugs leaks, Phil Dennis-Jordan, 2024/07/17
- [PATCH 08/26] hw/display/apple-gfx: Adds migration blocker,
Phil Dennis-Jordan <=
- [PATCH 24/26] hw/display/apple-gfx: Adds configurable mode list, Phil Dennis-Jordan, 2024/07/17
- [PATCH 25/26] MAINTAINERS: Add myself as maintainer for apple-gfx, reviewer for HVF, Phil Dennis-Jordan, 2024/07/17
- [PATCH 21/26] hw/display/apple-gfx: Implements texture syncing for non-UMA GPUs, Phil Dennis-Jordan, 2024/07/17
- [PATCH 04/26] hw/display/apple-gfx: uses DEFINE_TYPES macro, Phil Dennis-Jordan, 2024/07/17
- [PATCH 23/26] hw/display/apple-gfx: Host GPU picking improvements, Phil Dennis-Jordan, 2024/07/17
- [PATCH 01/26] hw/vmapple/apple-gfx: Introduce ParavirtualizedGraphics.Framework support, Phil Dennis-Jordan, 2024/07/17
- [PATCH 02/26] hw/vmapple/apple-gfx: BQL renaming update, Phil Dennis-Jordan, 2024/07/17
- [PATCH 05/26] hw/display/apple-gfx: native -> little endian memory ops, Phil Dennis-Jordan, 2024/07/17
- [PATCH 07/26] hw/display/apple-gfx: Makes set_mode thread & memory safe, Phil Dennis-Jordan, 2024/07/17
- [PATCH 20/26] hw/display/apple-gfx: Fixes cursor hotspot handling, Phil Dennis-Jordan, 2024/07/17