target-mips queue
The following changes since commit b5ed2e11ef39a308dcbef46f66774557b4a41fce:
build: disable Xen on ARM (2017-07-11 11:23:47 +0100)
are available in the git repository at:
git://github.com/yongbok/upstream-qemu.git tags/mips-20170711
for you to fetch changes up to 9768e2abf7ca3ef181f7cec134d7305c1643f78a:
mips/malta: load the initrd at the end of the low memory (2017-07-11 15:06:34 +0100)
----------------------------------------------------------------
MIPS patches 2017-07-11
Changes:
* Fix MSA copy_[s|u]_df corner case of rd = 0
* Update malta to load the initrd at the end of the low memory
----------------------------------------------------------------
Aurelien Jarno (1):
mips/malta: load the initrd at the end of the low memory
Miodrag Dinic (1):
target/mips: fix msa copy_[s|u]_df rd = 0 corner case
hw/mips/mips_malta.c | 5 +++-- target/mips/translate.c | 8 ++++++-- 2 files changed, 9 insertions(+), 4 deletions(-)
Signature · 1 line
2.7.4
[Qemu-devel] [PULL 1/2] target/mips: fix msa copy_[s|u]_df rd = 0 corner case
From: Miodrag Dinic <[email protected]>
This patch fixes the msa copy_[s|u]_df instruction emulation when the destination register rd is zero. Without this patch the zero register would get clobbered, which should never happen because it is supposed to be hardwired to 0.
Fix this corner case by explicitly checking rd = 0 and effectively making these instructions emulation no-op in that case.
--- target/mips/translate.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
target/mips/translate.c +6 -2
@@ -18712,10 +18712,14 @@ static void gen_msa_elm_df(CPUMIPSState *env, DisasContext *ctx, uint32_t df,#endif switch (MASK_MSA_ELM (ctx->opcode)) {case OPC_COPY_S_df: -gen_helper_msa_copy_s_df (cpu_env, tdf, twd, tws, tn); +if (likely (wd !=0 )) { +gen_helper_msa_copy_s_df (cpu_env, tdf, twd, tws, tn); + }break ;case OPC_COPY_U_df: -gen_helper_msa_copy_u_df (cpu_env, tdf, twd, tws, tn); +if (likely (wd !=0 )) { +gen_helper_msa_copy_u_df (cpu_env, tdf, twd, tws, tn); + }break ;case OPC_INSERT_df:gen_helper_msa_insert_df (cpu_env, tdf, twd, tws, tn);
Signature · 1 line
2.7.4
[Qemu-devel] [PULL 2/2] mips/malta: load the initrd at the end of the low memory
In reply to Yongbok KimFrom: Aurelien Jarno <[email protected]>
Currently the malta board is loading the initrd just after the kernel. This doesn't work for kaslr enabled kernels, as the initrd ends-up being overwritten.
Move the initrd at the end of the low memory, that should leave a sufficient gap for kaslr.
--- hw/mips/mips_malta.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
hw/mips/mips_malta.c +3 -2
@@ -841,8 +841,9 @@ static int64_t load_kernel (void)if (loaderparams.initrd_filename) { initrd_size =get_image_size (loaderparams.initrd_filename);if (initrd_size >0 ) { - initrd_offset = (kernel_high + ~INITRD_PAGE_MASK ) &INITRD_PAGE_MASK ; -if (initrd_offset + initrd_size > ram_size) { + initrd_offset = (loaderparams.ram_low_size - initrd_size + - ~INITRD_PAGE_MASK ) &INITRD_PAGE_MASK ; +if (kernel_high >= initrd_offset) {fprintf (stderr,"qemu: memory too small for initial ram disk '%s'\n" , loaderparams.initrd_filename);
Signature · 1 line
2.7.4
Peter Maydell
AppliedQuoted 24 lines · Yongbok Kim
The following changes since commit
b5ed2e11ef39a308dcbef46f66774557b4a41fce:build: disable Xen on ARM (2017-07-11 11:23:47 +0100)
are available in the git repository at:
git://github.com/yongbok/upstream-qemu.gittags/mips-20170711for you to fetch changes up to
9768e2abf7ca3ef181f7cec134d7305c1643f78a:mips/malta: load the initrd at the end of the low memory (2017-07-11 15:06:34 +0100)
----------------------------------------------------------------
MIPS patches 2017-07-11Changes:
* Fix MSA copy_[s|u]_df corner case of rd = 0
* Update malta to load the initrd at the end of the low memory----------------------------------------------------------------
Aurelien Jarno (1):
mips/malta: load the initrd at the end of the low memory
Quoted 6 lines
Miodrag Dinic (1):
target/mips: fix msa copy_[s|u]_df rd = 0 corner casehw/mips/mips_malta.c | 5 +++-- target/mips/translate.c | 8 ++++++-- 2 files changed, 9 insertions(+), 4 deletions(-)
Applied, thanks.
-- PMM