By default, the backing shmem file for a restrictedmem fd is created
on shmem's kernel space mount.
With this patch, an optional tmpfs mount can be specified via an fd,
which will be used as the mountpoint for backing the shmem file
associated with a restrictedmem fd.
This will help restrictedmem
Hello,
This patchset builds upon the memfd_restricted() system call that was
discussed in the ‘KVM: mm: fd-based approach for supporting KVM’ patch
series, at
https://lore.kernel.org/lkml/20221202061347.1070246-1-chao.p.p...@linux.intel.com/T/
The tree can be found at:
https://github.com/googlepr
For memfd_restricted() calls without a userspace mount, the backing
file should be the shmem mount in the kernel, and the size of backing
pages should be as defined by system-wide shmem configuration.
If a userspace mount is provided, the size of backing pages should be
as defined in the mount.
A
Christian Brauner writes:
On Tue, Mar 21, 2023 at 08:15:32PM +, Ackerley Tng wrote:
By default, the backing shmem file for a restrictedmem fd is created
on shmem's kernel space mount.
...
Thanks for reviewing this patch!
This looks like you can just pass in some tmpfs fd and you ju
On 3/31/23 08:06, Weiwei Li wrote:
Compute the target address before storing it into badaddr
when mis-aligned exception is triggered.
Use a target_pc temp to store the target address to avoid
the confusing operation that udpate target address into
cpu_pc before misalign check, then update it int
On 3/31/23 08:06, Weiwei Li wrote:
Add a base save_pc For PC-relative translation(CF_PCREL).
Diable the directly sync pc from tb by riscv_cpu_synchronize_from_tb.
Sync pc before it's used or updated from tb related pc:
real_pc = (old)env->pc + target_pc(from tb) - ctx->save_pc
Signed-off-by:
On 3/31/23 08:06, Weiwei Li wrote:
CPUs often set CF_PCREL in tcg_cflags before qemu_init_vcpu(), in which
tcg_cflags will be overwrited by tcg_cpu_init_cflags().
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
---
accel/tcg/tcg-accel-ops.c | 2 +-
1 file changed, 1 insertion(+), 1 dele
On 3/31/23 08:06, Weiwei Li wrote:
A corner case is triggered when tb block with first_pc = 0x8008
and first_pc = 0x80200 has the same jump cache hash, and share
the same tb entry with the same tb information except PC.
The executed sequence is as follows:
tb(0x8008) -> tb(0x8008
On 3/31/23 18:18, Richard Henderson wrote:
On 3/31/23 08:06, Weiwei Li wrote:
CPUs often set CF_PCREL in tcg_cflags before qemu_init_vcpu(), in which
tcg_cflags will be overwrited by tcg_cpu_init_cflags().
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
---
accel/tcg/tcg-accel-ops.c | 2
On 3/31/23 18:33, Richard Henderson wrote:
On 3/31/23 18:18, Richard Henderson wrote:
On 3/31/23 08:06, Weiwei Li wrote:
CPUs often set CF_PCREL in tcg_cflags before qemu_init_vcpu(), in which
tcg_cflags will be overwrited by tcg_cpu_init_cflags().
Signed-off-by: Weiwei Li
Signed-off-by: Junqi
On 3/31/23 18:26, Richard Henderson wrote:
On 3/31/23 08:06, Weiwei Li wrote:
A corner case is triggered when tb block with first_pc = 0x8008
and first_pc = 0x80200 has the same jump cache hash, and share
the same tb entry with the same tb information except PC.
The executed sequence is
On 3/31/23 08:06, Weiwei Li wrote:
The existence of CF_PCREL can improve performance with the guest
kernel's address space randomization. Each guest process maps
libc.so (et al) at a different virtual address, and this allows
those translations to be shared.
Signed-off-by: Weiwei Li
Signed-off-
On 3/31/23 08:06, Weiwei Li wrote:
Transform the fetch address in cpu_get_tb_cpu_state() when pointer
mask for instruction is enabled.
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
---
target/riscv/cpu.h| 1 +
target/riscv/cpu_helper.c | 20 +++-
target/riscv
在 2023/3/31 下午8:12, Gerd Hoffmann 写道:
On Fri, Mar 31, 2023 at 08:54:16AM +0800, maobibo wrote:
Xuerui,
Thanks for your mail, it is a good suggestion. Now we are planing to
move LoongArch uefi bios from edk2-platform to edk2 repo, so that uefi
bios supporting LoongArch can be auto compiled and
This reverts commit 4f5c67f8df7f26e559509c68c45e652709edd23f.
This exposes bugs in target_mmap et al with respect to overflow
with the final page of the guest address space. To be fixed in
the next development cycle.
Signed-off-by: Richard Henderson
---
linux-user/elfload.c | 37 ++
Fix a bug just exposed concerning qemu-arm commpage, leading to an
immediate crash on any 64k page host. Fix two bugs regressing
pc-relative tb generation, found by Weiwei Li.
r~
Richard Henderson (2):
Revert "linux-user/arm: Take more care allocating commpage"
accel/tcg: Fix jump cache se
Assign pc and use store_release to assign tb.
Fixes: 2dd5b7a1b91 ("accel/tcg: Move jmp-cache `CF_PCREL` checks to caller")
Reported-by: Weiwei Li
Signed-off-by: Richard Henderson
---
accel/tcg/cpu-exec.c | 17 +
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/acce
From: Weiwei Li
CPUs often set CF_PCREL in tcg_cflags before qemu_init_vcpu(), in which
tcg_cflags will be overwrited by tcg_cpu_init_cflags().
Fixes: 4be790263ffc ("accel/tcg: Replace `TARGET_TB_PCREL` with `CF_PCREL`")
Reviewed-by: Richard Henderson
Signed-off-by: Weiwei Li
Signed-off-by: Ju
On 3/27/23 20:06, Song Gao wrote:
+static void gen_vsat_s(unsigned vece, TCGv_vec t, TCGv_vec a, int64_t imm)
+{
+TCGv_vec t1;
+int64_t max = (1l << imm) - 1;
This needed 1ull, but better to just use
max = MAKE_64BIT_MASK(0, imm - 1);
+int64_t min = ~max;
Extra space.
+
On 3/27/23 20:06, Song Gao wrote:
This patch includes:
- VEXTH.{H.B/W.H/D.W/Q.D};
- VEXTH.{HU.BU/WU.HU/DU.WU/QU.DU}.
Signed-off-by: Song Gao
---
target/loongarch/disas.c| 9 ++
target/loongarch/helper.h | 9 ++
target/loongarch/insn_trans/trans
On 3/27/23 20:06, Song Gao wrote:
+static void gen_vsigncov(unsigned vece, TCGv_vec t, TCGv_vec a, TCGv_vec b)
+{
+TCGv_vec t1, t2;
+
+t1 = tcg_temp_new_vec_matching(t);
+t2 = tcg_temp_new_vec_matching(t);
+
+tcg_gen_neg_vec(vece, t1, b);
+tcg_gen_dupi_vec(vece, t2, 0);
tcg_
On 2023/3/31 20:12, Gerd Hoffmann wrote:
On Fri, Mar 31, 2023 at 08:54:16AM +0800, maobibo wrote:
Xuerui,
Thanks for your mail, it is a good suggestion. Now we are planing to
move LoongArch uefi bios from edk2-platform to edk2 repo, so that uefi
bios supporting LoongArch can be auto compiled
On 3/27/23 20:06, Song Gao wrote:
+void HELPER(vmskltz_b)(CPULoongArchState *env, uint32_t vd, uint32_t vj)
+{
+VReg temp;
+VReg *Vd = &(env->fpr[vd].vreg);
+VReg *Vj = &(env->fpr[vj].vreg);
+
+temp.D(0) = 0;
+temp.D(1) = 0;
+temp.H(0) = do_vmskltz_b(Vj->D(0));
+temp.H
On 3/27/23 20:06, Song Gao wrote:
+static void gen_vnori(unsigned vece, TCGv_vec t, TCGv_vec a, int64_t imm)
+{
+TCGv_vec t1;
+
+t1 = tcg_temp_new_vec_matching(t);
+tcg_gen_dupi_vec(vece, t1, imm);
+tcg_gen_nor_vec(vece, t, a, t1);
+}
tcg_constant_vec_matching.
+
+static void
On 3/27/23 20:06, Song Gao wrote:
This patch includes:
- VSLL[I].{B/H/W/D};
- VSRL[I].{B/H/W/D};
- VSRA[I].{B/H/W/D};
- VROTR[I].{B/H/W/D}.
Signed-off-by: Song Gao
---
target/loongarch/disas.c| 36 +
target/loongarch/insn_trans/trans_lsx.c.inc | 36
On 3/27/23 20:06, Song Gao wrote:
This patch includes:
- VSLLWIL.{H.B/W.H/D.W};
- VSLLWIL.{HU.BU/WU.HU/DU.WU};
- VEXTL.Q.D, VEXTL.QU.DU.
Signed-off-by: Song Gao
---
target/loongarch/disas.c| 9 +
target/loongarch/helper.h | 9 +
target/loongarc
On 3/27/23 20:06, Song Gao wrote:
This patch includes:
- VSRLR[I].{B/H/W/D};
- VSRAR[I].{B/H/W/D}.
Signed-off-by: Song Gao
---
target/loongarch/disas.c| 18
target/loongarch/helper.h | 18
target/loongarch/insn_trans/trans_lsx.c.inc | 18 +++
On 3/27/23 20:06, Song Gao wrote:
This patch includes:
- VSRLN.{B.H/H.W/W.D};
- VSRAN.{B.H/H.W/W.D};
- VSRLNI.{B.H/H.W/W.D/D.Q};
- VSRANI.{B.H/H.W/W.D/D.Q}.
Signed-off-by: Song Gao
---
target/loongarch/disas.c| 16 +++
target/loongarch/helper.h | 16 ++
On 3/27/23 20:06, Song Gao wrote:
+temp.D(1) = int128_getlo(Vd->D(0));
Typo here.
You should build i386 host. E.g.
make docker-test-build@fedora-i386-cross
r~
101 - 129 of 129 matches
Mail list logo