From patchwork Mon Feb 15 12:45:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 382953 Delivered-To: patch@linaro.org Received: by 2002:a02:c80e:0:0:0:0:0 with SMTP id p14csp1051083jao; Mon, 15 Feb 2021 04:56:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJxobpDudKP/Uq1S3a6M7XXaz/4nrdYYBhb/FG07fAhNkk6JSzJaOoE6qv+eANGxxfr2fBvo X-Received: by 2002:a25:83cc:: with SMTP id v12mr22211085ybm.293.1613393766063; Mon, 15 Feb 2021 04:56:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613393766; cv=none; d=google.com; s=arc-20160816; b=XxUOXMSAZJ8T8E4iXPqOJlteSEs+geR9Gez4wkzLKjnsBWToGG68413EeDKCE8gTBJ pNeJMG13QmhSnOvpCm759KIkO2rkop4D6b1BDnz2mV2FTWQddAqM9qzFdemfvS3B9nTX FuO3OcBdg7EdPdHIWRp8u6M9gKCw5TdR2OKCOevBQXg63yYdKuuYdBLOs6Zjc7g8KuNU y7uFkWenxBt7pIehCmjP/f64BDGAzdL4zl6hWR6j387rDzqYQVK/XaLofEqCITgSDP/c FbQJsBSS6n8Xproe0wt0VRngn6xZNBOYTToYDnQZnSjhCpcexn8h+yQKAEuDzGsCYLEA xgKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from; bh=6RK+Cmr4vg7QI0iVuWuMnA+k6lf8QwJ2oMoWfevqQJE=; b=OvcMYgrF92QTB/fCKibHRtHBt6JEkxZMBbaxBO7Z13hv8tixi5zLKvtk5uB7rxWmye SCdRWTFiqyk2QS8aVyCwM6NnTAc5D2NmfHUjIhsSu7brGJEU+Nj59batTQy3En82Qnvw ZTCW+wLZy/selBEFq8BOW+YSG5GLcpTpn3v0aYUevkuXsAQ7v7nFG+fGR8OzZUkexBQl b7tSo46AFRALQAZwbYWDBEdmn2GLh8K5N74OEnLXZpSi0grT0G9kmItUu4OYH2xYoMF/ n4wHA/aNM8oVArzgZoRfc4eXSv/WsWcd2luVVz9qjkIVIMUJKY+dYkJG76LNBGR6MLWb jlJg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id f34si10972326ybj.252.2021.02.15.04.56.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 15 Feb 2021 04:56:06 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([::1]:42974 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lBdQ5-0005oo-Gw for patch@linaro.org; Mon, 15 Feb 2021 07:56:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52742) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lBdFu-00046m-Oj for qemu-devel@nongnu.org; Mon, 15 Feb 2021 07:45:35 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:45939) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lBdFs-0000h7-9V for qemu-devel@nongnu.org; Mon, 15 Feb 2021 07:45:34 -0500 Received: from localhost.localdomain ([82.252.134.158]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1M7JrG-1lEw712H7s-007ilw; Mon, 15 Feb 2021 13:45:27 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 10/13] linux-user: add TARGET_SO_{DOMAIN,PROTOCOL} Date: Mon, 15 Feb 2021 13:45:16 +0100 Message-Id: <20210215124519.720265-11-laurent@vivier.eu> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210215124519.720265-1-laurent@vivier.eu> References: <20210215124519.720265-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:GwU5AIfnjXwqiQnRUu01L9zbf2sUn+yNm7ljvRd5+3JegSBRu1q kZ9fP5PTTi0LaCnGuPdqlMVxjacTTvW3+HxKhaRomC4Cn/7h/kETQhDDBjZP7x2hfomLzZQ 7ztt6slPiAZaNx6pPfIi4G98utRGSk1vLgWHOp5Okz7jNd5hB4OICiU7PYYAeM1cfqcqw1v lANe+k8MqaSwqaiQ098Vg== X-UI-Out-Filterresults: notjunk:1; V03:K0:LgA0ZQtHN1M=:66bebjpOYbFqkW3svWk1tw Q4NFRcy0T8OHt3z2kINiWER1R/Y9ui8IOAPCm946eWhb0+XvAlDNSl2bG58E4oOVZHGHUgff3 y0cXcyn+NZakUv+KkA8dJg7przAkhbwOywiFxCCvQI2miuC8525BvvygM9vMIn7RCOxF06on4 w9J9H/NSm49Qru2EPg3lvDQrwg1h+mu2w8l9XzzyNw3Eicrp4eE/WtGQObKWuX35xCWbj3ZBn kAEXS18s3RwRkEF6Q26welt3KF3b9mmtV0LZhWsFaRSErCZlw3v3lLaj9Bu+89nfxGlX3s8Is P2HWsiPuEOFVf6/f7kp3SR1MWqqSmF7DM/uV/ux3Shq3YN/B42PNApNwBwJXpDd0zQ9myPEV8 Ma8whs8jIWBGW5bniOZ8F7cW32XjyZJdH+AxNwSOjOLZjwBOIzxNnS30vJXQOkrz+Ir12fEoZ XE5KZclU6w== Received-SPF: none client-ip=217.72.192.74; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Jason A. Donenfeld" , Laurent Vivier Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: "Jason A. Donenfeld" These were defined for other platforms but mistakenly left out of mips and generic, so this commit adds them to the places missing. Then it makes them be translated in getsockopt. Signed-off-by: Jason A. Donenfeld Reviewed-by: Laurent Vivier Message-Id: <20210204153925.2030606-1-Jason@zx2c4.com> Signed-off-by: Laurent Vivier --- linux-user/generic/sockbits.h | 3 +++ linux-user/mips/sockbits.h | 2 ++ linux-user/syscall.c | 6 ++++++ 3 files changed, 11 insertions(+) -- 2.29.2 diff --git a/linux-user/generic/sockbits.h b/linux-user/generic/sockbits.h index e44733c601a4..b3b4a8e44c6d 100644 --- a/linux-user/generic/sockbits.h +++ b/linux-user/generic/sockbits.h @@ -55,4 +55,7 @@ #define TARGET_SO_ACCEPTCONN 30 #define TARGET_SO_PEERSEC 31 + +#define TARGET_SO_PROTOCOL 38 +#define TARGET_SO_DOMAIN 39 #endif diff --git a/linux-user/mips/sockbits.h b/linux-user/mips/sockbits.h index 0f022cd598a9..562cad88e2f8 100644 --- a/linux-user/mips/sockbits.h +++ b/linux-user/mips/sockbits.h @@ -40,6 +40,8 @@ #define TARGET_SO_SNDTIMEO 0x1005 /* send timeout */ #define TARGET_SO_RCVTIMEO 0x1006 /* receive timeout */ #define TARGET_SO_ACCEPTCONN 0x1009 +#define TARGET_SO_PROTOCOL 0x1028 /* protocol type */ +#define TARGET_SO_DOMAIN 0x1029 /* domain/socket family */ /* linux-specific, might as well be the same as on i386 */ #define TARGET_SO_NO_CHECK 11 diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 6fea00869e6b..36b090105522 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -2837,6 +2837,12 @@ get_timeout: case TARGET_SO_ACCEPTCONN: optname = SO_ACCEPTCONN; goto int_case; + case TARGET_SO_PROTOCOL: + optname = SO_PROTOCOL; + goto int_case; + case TARGET_SO_DOMAIN: + optname = SO_DOMAIN; + goto int_case; default: goto int_case; } From patchwork Mon Feb 15 12:45:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 382954 Delivered-To: patch@linaro.org Received: by 2002:a02:c80e:0:0:0:0:0 with SMTP id p14csp1051472jao; Mon, 15 Feb 2021 04:56:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJxaKNAsh+obPxQnEXnrIUdr73W7xlGDASy2aHasyiZKufXWaKsgdg2n1X2Tl1g6p9saKwp3 X-Received: by 2002:a25:9d0b:: with SMTP id i11mr21705910ybp.272.1613393809858; Mon, 15 Feb 2021 04:56:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613393809; cv=none; d=google.com; s=arc-20160816; b=B38EUM/kn1OJud2QS5crVtXOMrsGwv5f5jEjzdg2ige0Z2gg76xAkASWqxW9C6xHOD b06Y34VgM5I7H5JuX6qYmOegAL8fQKwcPXCt18czMbtF+0QGMcrcbm0BfQhGu3z9wtQL riFaU7EVNV7CGxzYboyzuJkUb4e5I99E3zgJ9Bv3XaFsrHHxJN+p4g97SuXF2J+S1eVo ygnpGLSso5r7Q9ezTQX8haGq7JF+PK+/yq3VrTaZSagHaFPScGVm3jxzNVZH82Lbac5o FK/+fBS942jjXtquWOAo5RMXujg8l5HiumDQaxWCOs1T73g6WUdgwJvLxbVMaSDRLREK Xbyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from; bh=5cnpL4Rm8Nk1KvUzmRFJBZ0z1OYv+KytsKTT402I7v0=; b=yT1efhvhtwZylPF8GvKrp4VIiKvGHSErNJoKrdqbfQSQI6WpuSOLfD7jBhIrMXlvM9 0B1ieHBo9N9/dWJ3hLZgxPmDdGq35Cghz85HJDzezf5cBpAxjMrap0Jhic1DShef+1VD oA3BraRDYbVqxbd9gWhfqCQmcclJl3djWyBk35N5nbCZKOMwt1zyrYUg0KFN4XebSSfK ie09mNespk7tmamndjvehgDPukOIBFTTTk89qDIPpKxI5IPsmcIA19Z5fKq/wlkWK2D3 3uTC1aFOgvIVhNoyAeruKYJcdjnrGGCvMSz1o3gc0JEv+8iXGUoVnwd5B+udZ1I2XCzI Ifrw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t16si15356895ybb.291.2021.02.15.04.56.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 15 Feb 2021 04:56:49 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([::1]:46296 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lBdQn-0007EO-CN for patch@linaro.org; Mon, 15 Feb 2021 07:56:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52776) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lBdFx-00048G-Fw for qemu-devel@nongnu.org; Mon, 15 Feb 2021 07:45:37 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:42653) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lBdFr-0000gy-MM for qemu-devel@nongnu.org; Mon, 15 Feb 2021 07:45:37 -0500 Received: from localhost.localdomain ([82.252.134.158]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1M593i-1lCjBV1oPs-001740; Mon, 15 Feb 2021 13:45:29 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 12/13] docs/user: Remove outdated 'Quick Start' section Date: Mon, 15 Feb 2021 13:45:18 +0100 Message-Id: <20210215124519.720265-13-laurent@vivier.eu> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210215124519.720265-1-laurent@vivier.eu> References: <20210215124519.720265-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:6JmhkBcIZLNPBn5cQjoXcxgzYkCgWEsbXlKbj5wtk1wH130ruv5 mhhYbg+vg5aSa5uzBdM+hPcA/TUiYN+lrpQPbZPNW/NEstmYhHN/4ZpZ5LaZ0XXn6WuV7xu LOEOgLjwS1ji9CrgL6KkcjyNDdirny7l+J8tbCKwQ1M1gLSg2FSMe+86HFgrNr2S/ju/U6B s/R22SKI5hOS0XK4tdzlw== X-UI-Out-Filterresults: notjunk:1; V03:K0:Mvn1i4mtv0Q=:AePhWnZLnLpth0GIZiM6u5 mYtLW9o4uX7VGT2l7slKv+cpVWqD5UEh2KRO/PY7VUQwb7+AofC9TyYWUCGv8aaHwc4Vnzkzm PCnFPwQU0+Pp60vKAbT01sB7I8uTE2IHEOW3jZmxt0pDGzA9xvBC7etKS89cwI94A1Sdcr0FD GlPKMJVNL7EKKnMhHnpqeMFFIUybRyIb0ZxF0MAfCtqQAQW3o9VFZzhdnwe9JdWMC3OwCbtHV wHq/T7X+QdN5xI22/uviPC3lvy8iLFDY+cmuLZhgiYRZLAMY5bSGvT6OEEn/nb2tVukH5s54z xY0gakNtF/8gxkVLrCiGGwAJV2zjeYJPdUEqIRhR5LtR+ETUw9vDyHcoeEX3wbW9A1yrSTDD+ ev1qj4QtBfhLokJ8rQtWaQFJ9ruUOZpFy0eFWcvGHoSl5zpwDyplAZkLfMBms4jF6B0z9RiTG od60lp5YGw== Received-SPF: none client-ip=217.72.192.74; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Richard Henderson , Laurent Vivier Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell The 'Quick Start' section of the userspace emulator documentation is very old and outdated. In particular: - it suggests running x86-on-x86 emulation, which is the least interesting possible use case - it recommends that users download tarballs of guest binaries from the QEMU web page which we no longer provide there There's nothing salvageable here; delete it all. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Acked-by: Laurent Vivier Message-Id: <20201122000131.18487-1-peter.maydell@linaro.org> Signed-off-by: Laurent Vivier --- docs/user/main.rst | 61 ---------------------------------------------- 1 file changed, 61 deletions(-) -- 2.29.2 diff --git a/docs/user/main.rst b/docs/user/main.rst index 8dfe232a3af1..e08d4be63b71 100644 --- a/docs/user/main.rst +++ b/docs/user/main.rst @@ -45,67 +45,6 @@ emulator. Linux User space emulator ------------------------- -Quick Start -~~~~~~~~~~~ - -In order to launch a Linux process, QEMU needs the process executable -itself and all the target (x86) dynamic libraries used by it. - -- On x86, you can just try to launch any process by using the native - libraries:: - - qemu-i386 -L / /bin/ls - - ``-L /`` tells that the x86 dynamic linker must be searched with a - ``/`` prefix. - -- Since QEMU is also a linux process, you can launch QEMU with QEMU - (NOTE: you can only do that if you compiled QEMU from the sources):: - - qemu-i386 -L / qemu-i386 -L / /bin/ls - -- On non x86 CPUs, you need first to download at least an x86 glibc - (``qemu-runtime-i386-XXX-.tar.gz`` on the QEMU web page). Ensure that - ``LD_LIBRARY_PATH`` is not set:: - - unset LD_LIBRARY_PATH - - Then you can launch the precompiled ``ls`` x86 executable:: - - qemu-i386 tests/i386/ls - - You can look at ``scripts/qemu-binfmt-conf.sh`` so that QEMU is - automatically launched by the Linux kernel when you try to launch x86 - executables. It requires the ``binfmt_misc`` module in the Linux - kernel. - -- The x86 version of QEMU is also included. You can try weird things - such as:: - - qemu-i386 /usr/local/qemu-i386/bin/qemu-i386 \ - /usr/local/qemu-i386/bin/ls-i386 - -Wine launch -~~~~~~~~~~~ - -- Ensure that you have a working QEMU with the x86 glibc distribution - (see previous section). In order to verify it, you must be able to - do:: - - qemu-i386 /usr/local/qemu-i386/bin/ls-i386 - -- Download the binary x86 Wine install (``qemu-XXX-i386-wine.tar.gz`` - on the QEMU web page). - -- Configure Wine on your account. Look at the provided script - ``/usr/local/qemu-i386/bin/wine-conf.sh``. Your previous - ``${HOME}/.wine`` directory is saved to ``${HOME}/.wine.org``. - -- Then you can try the example ``putty.exe``:: - - qemu-i386 /usr/local/qemu-i386/wine/bin/wine \ - /usr/local/qemu-i386/wine/c/Program\ Files/putty.exe - Command line options ~~~~~~~~~~~~~~~~~~~~