aboutsummaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
Diffstat (limited to 'target')
-rw-r--r--target/i386/sev.c11
-rw-r--r--target/i386/whpx-all.c4
-rw-r--r--target/mips/translate.c5
3 files changed, 18 insertions, 2 deletions
diff --git a/target/i386/sev.c b/target/i386/sev.c
index 6dbdc3cdf1..5ba1384ea1 100644
--- a/target/i386/sev.c
+++ b/target/i386/sev.c
@@ -161,6 +161,17 @@ sev_ram_block_removed(RAMBlockNotifier *n, void *host, size_t size)
{
int r;
struct kvm_enc_region range;
+ ram_addr_t offset;
+ MemoryRegion *mr;
+
+ /*
+ * The RAM device presents a memory region that should be treated
+ * as IO region and should not have been pinned.
+ */
+ mr = memory_region_from_host(host, &offset);
+ if (mr && memory_region_is_ram_device(mr)) {
+ return;
+ }
range.addr = (__u64)(unsigned long)host;
range.size = size;
diff --git a/target/i386/whpx-all.c b/target/i386/whpx-all.c
index 31d47320e4..ed95105eae 100644
--- a/target/i386/whpx-all.c
+++ b/target/i386/whpx-all.c
@@ -1396,7 +1396,7 @@ static int whpx_accel_init(MachineState *ms)
}
memset(&prop, 0, sizeof(WHV_PARTITION_PROPERTY));
- prop.ProcessorCount = smp_cpus;
+ prop.ProcessorCount = ms->smp.cpus;
hr = whp_dispatch.WHvSetPartitionProperty(
whpx->partition,
WHvPartitionPropertyCodeProcessorCount,
@@ -1405,7 +1405,7 @@ static int whpx_accel_init(MachineState *ms)
if (FAILED(hr)) {
error_report("WHPX: Failed to set partition core count to %d,"
- " hr=%08lx", smp_cores, hr);
+ " hr=%08lx", ms->smp.cores, hr);
ret = -EINVAL;
goto error;
}
diff --git a/target/mips/translate.c b/target/mips/translate.c
index f96f141cdf..3575eff0ae 100644
--- a/target/mips/translate.c
+++ b/target/mips/translate.c
@@ -6745,6 +6745,7 @@ static void gen_mthc0(DisasContext *ctx, TCGv arg, int reg, int sel)
default:
goto cp0_unimplemented;
}
+ break;
case CP0_REGISTER_17:
switch (sel) {
case 0:
@@ -9825,6 +9826,7 @@ static void gen_mftr(CPUMIPSState *env, DisasContext *ctx, int rt, int rd,
gen_mfc0(ctx, t0, rt, sel);
break;
}
+ break;
case 12:
switch (sel) {
case 0:
@@ -9834,6 +9836,7 @@ static void gen_mftr(CPUMIPSState *env, DisasContext *ctx, int rt, int rd,
gen_mfc0(ctx, t0, rt, sel);
break;
}
+ break;
case 13:
switch (sel) {
case 0:
@@ -10052,6 +10055,7 @@ static void gen_mttr(CPUMIPSState *env, DisasContext *ctx, int rd, int rt,
gen_mtc0(ctx, t0, rd, sel);
break;
}
+ break;
case 12:
switch (sel) {
case 0:
@@ -10061,6 +10065,7 @@ static void gen_mttr(CPUMIPSState *env, DisasContext *ctx, int rd, int rt,
gen_mtc0(ctx, t0, rd, sel);
break;
}
+ break;
case 13:
switch (sel) {
case 0: