All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] linux-user: main: Let each env have its own gdt table
@ 2020-03-31  8:15 chengang
  2020-03-31 11:23 ` no-reply
  0 siblings, 1 reply; 2+ messages in thread
From: chengang @ 2020-03-31  8:15 UTC (permalink / raw)
  To: riku.voipio, laurent; +Cc: chengang, qemu-devel, gang.chen.5i5j

From: Chen Gang <chengang@emindsoft.com.cn>

It is a temporary fix for thread LTS which need switch the ldt related
index in gdt table for stable-4.1 branch.

Welcome anyone providing the complete fix.

Signed-off-by: Chen Gang <chengang@emindsoft.com.cn>
---
 linux-user/main.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/linux-user/main.c b/linux-user/main.c
index 8ffc525195..cad261fc7b 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -194,12 +194,17 @@ CPUArchState *cpu_copy(CPUArchState *env)
     CPUArchState *new_env = new_cpu->env_ptr;
     CPUBreakpoint *bp;
     CPUWatchpoint *wp;
+    int size = sizeof(uint64_t) * TARGET_GDT_ENTRIES;
 
     /* Reset non arch specific state */
     cpu_reset(new_cpu);
 
     memcpy(new_env, env, sizeof(CPUArchState));
 
+    new_env->gdt.base = target_mmap(0, size, PROT_READ | PROT_WRITE,
+                                     MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
+    memcpy(g2h(new_env->gdt.base), g2h(env->gdt.base), size);
+
     /* Clone all break/watchpoints.
        Note: Once we support ptrace with hw-debug register access, make sure
        BP_CPU break/watchpoints are handled correctly on clone. */
-- 
2.24.0.308.g228f53135a





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] linux-user: main: Let each env have its own gdt table
  2020-03-31  8:15 [PATCH] linux-user: main: Let each env have its own gdt table chengang
@ 2020-03-31 11:23 ` no-reply
  0 siblings, 0 replies; 2+ messages in thread
From: no-reply @ 2020-03-31 11:23 UTC (permalink / raw)
  To: chengang; +Cc: chengang, riku.voipio, gang.chen.5i5j, laurent, qemu-devel

Patchew URL: https://patchew.org/QEMU/20200331081506.29037-1-chengang@emindsoft.com.cn/



Hi,

This series failed the docker-mingw@fedora build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.

=== TEST SCRIPT BEGIN ===
#! /bin/bash
export ARCH=x86_64
make docker-image-fedora V=1 NETWORK=1
time make docker-test-mingw@fedora J=14 NETWORK=1
=== TEST SCRIPT END ===

  GEN     /var/tmp/patchew-tester-tmp-3vo4s26o/src/docker-src.2020-03-31-07.20.41.28179/qemu.tar
Submodule 'dtc' (https://git.qemu.org/git/dtc.git) registered for path 'dtc'
Cloning into 'dtc'...
error: RPC failed; result=7, HTTP code = 0
fatal: The remote end hung up unexpectedly
Clone of 'https://git.qemu.org/git/dtc.git' into submodule path 'dtc' failed
failed to update submodule dtc
Submodule 'dtc' (https://git.qemu.org/git/dtc.git) unregistered for path 'dtc'
make[1]: *** [/var/tmp/patchew-tester-tmp-3vo4s26o/src/docker-src.2020-03-31-07.20.41.28179] Error 1
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-3vo4s26o/src'
make: *** [docker-run-test-mingw@fedora] Error 2

real    2m13.209s
user    0m2.324s


The full log is available at
http://patchew.org/logs/20200331081506.29037-1-chengang@emindsoft.com.cn/testing.docker-mingw@fedora/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-31 11:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-31  8:15 [PATCH] linux-user: main: Let each env have its own gdt table chengang
2020-03-31 11:23 ` no-reply

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.