aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2023-05-05 22:28:48 +0100
committerRichard Henderson <richard.henderson@linaro.org>2023-05-05 22:28:48 +0100
commit2149a21b2f21ccf2f9a49b23ac5d162152f15b01 (patch)
tree6c8eaa56fba6c932dbe77cbfb6ffc550b43573e1 /hw
parenteb5c3932a383ba1ef3a911232c644f2e053ef66c (diff)
parentb35261b1a6c2729fa7e7a6ca34b9489eda62b744 (diff)
downloadqemu-2149a21b2f21ccf2f9a49b23ac5d162152f15b01.zip
qemu-2149a21b2f21ccf2f9a49b23ac5d162152f15b01.tar.gz
qemu-2149a21b2f21ccf2f9a49b23ac5d162152f15b01.tar.bz2
Merge tag 'pull-ppc-20230505' of https://gitlab.com/danielhb/qemu into staging
ppc patch queue for 2023-05-05: This queue includes fixes for ppc and spapr emulation, a build fix for the pseries machine and a new reviewer for ppc/spapr. We're also carrying a Coverity fix for the sm501 display. # -----BEGIN PGP SIGNATURE----- # # iIwEABYKADQWIQQX6/+ZI9AYAK8oOBk82cqW3gMxZAUCZFUuGBYcZGFuaWVsaGI0 # MTNAZ21haWwuY29tAAoJEDzZypbeAzFk3X8A/33+EoBXO4ol5J+BxlQXLRdJkzxA # ok5zsm69K8VYl9eyAPkBlqqT0W7DyNP4eUU+cMi2vvQop5wt2iV1C2LbnaE2AA== # =iwNT # -----END PGP SIGNATURE----- # gpg: Signature made Fri 05 May 2023 05:26:00 PM BST # gpg: using EDDSA key 17EBFF9923D01800AF2838193CD9CA96DE033164 # gpg: issuer "danielhb413@gmail.com" # gpg: Good signature from "Daniel Henrique Barboza <danielhb413@gmail.com>" [unknown] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 17EB FF99 23D0 1800 AF28 3819 3CD9 CA96 DE03 3164 * tag 'pull-ppc-20230505' of https://gitlab.com/danielhb/qemu: hw/ppc/Kconfig: NVDIMM is a hard requirement for the pseries machine tests: tcg: ppc64: Add tests for Vector Extract Mask Instructions tcg: ppc64: Fix mask generation for vextractdm MAINTAINERS: Adding myself in the list for ppc/spapr ppc: spapr: cleanup cr get/set with helpers. hw/display/sm501: Remove unneeded increment from loop Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/display/sm501.c2
-rw-r--r--hw/ppc/Kconfig2
-rw-r--r--hw/ppc/spapr_hcall.c18
3 files changed, 4 insertions, 18 deletions
diff --git a/hw/display/sm501.c b/hw/display/sm501.c
index dbabbc4..0eecd00 100644
--- a/hw/display/sm501.c
+++ b/hw/display/sm501.c
@@ -901,7 +901,7 @@ static void sm501_2d_operation(SM501State *s)
/* fallback when pixman failed or we don't want to call it */
uint8_t *d = s->local_mem + dst_base;
unsigned int x, y, i;
- for (y = 0; y < height; y++, i += dst_pitch * bypp) {
+ for (y = 0; y < height; y++) {
i = (dst_x + (dst_y + y) * dst_pitch) * bypp;
for (x = 0; x < width; x++, i += bypp) {
stn_he_p(&d[i], bypp, color);
diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
index c898021..a689d9b 100644
--- a/hw/ppc/Kconfig
+++ b/hw/ppc/Kconfig
@@ -3,7 +3,7 @@ config PSERIES
imply PCI_DEVICES
imply TEST_DEVICES
imply VIRTIO_VGA
- imply NVDIMM
+ select NVDIMM
select DIMM
select PCI
select SPAPR_VSCSI
diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c
index ec4def6..1c102c8 100644
--- a/hw/ppc/spapr_hcall.c
+++ b/hw/ppc/spapr_hcall.c
@@ -1566,8 +1566,6 @@ static target_ulong h_enter_nested(PowerPCCPU *cpu,
struct kvmppc_hv_guest_state hv_state;
struct kvmppc_pt_regs *regs;
hwaddr len;
- uint64_t cr;
- int i;
if (spapr->nested_ptcr == 0) {
return H_NOT_AVAILABLE;
@@ -1616,12 +1614,7 @@ static target_ulong h_enter_nested(PowerPCCPU *cpu,
env->lr = regs->link;
env->ctr = regs->ctr;
cpu_write_xer(env, regs->xer);
-
- cr = regs->ccr;
- for (i = 7; i >= 0; i--) {
- env->crf[i] = cr & 15;
- cr >>= 4;
- }
+ ppc_set_cr(env, regs->ccr);
env->msr = regs->msr;
env->nip = regs->nip;
@@ -1698,8 +1691,6 @@ void spapr_exit_nested(PowerPCCPU *cpu, int excp)
struct kvmppc_hv_guest_state *hvstate;
struct kvmppc_pt_regs *regs;
hwaddr len;
- uint64_t cr;
- int i;
assert(spapr_cpu->in_nested);
@@ -1757,12 +1748,7 @@ void spapr_exit_nested(PowerPCCPU *cpu, int excp)
regs->link = env->lr;
regs->ctr = env->ctr;
regs->xer = cpu_read_xer(env);
-
- cr = 0;
- for (i = 0; i < 8; i++) {
- cr |= (env->crf[i] & 15) << (4 * (7 - i));
- }
- regs->ccr = cr;
+ regs->ccr = ppc_get_cr(env);
if (excp == POWERPC_EXCP_MCHECK ||
excp == POWERPC_EXCP_RESET ||