[PATCH V3 6/8] hw/block/nvme: support namespace attachment command

2021-02-28 Thread Minwoo Im
This patch supports Namespace Attachment command for the pre-defined nvme-ns device nodes. Of course, attach/detach namespace should only be supported in case 'subsys' is given. This is because if we detach a namespace from a controller, somebody needs to manage the detached, but allocated

[PATCH v3 17/21] sd: emmc: Subtract bootarea size from blk

2021-02-28 Thread Sai Pavan Boddu
From: Joel Stanley The userdata size is derived from the file the user passes on the command line, but we must take into account the boot areas. Signed-off-by: Joel Stanley Signed-off-by: Cédric Le Goater --- hw/sd/sd.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/sd/sd.c

Re: [PATCH 1/2] i386/acpi: fix inconsistent QEMU/OVMF device paths

2021-02-28 Thread vit9696 via
Thomas, macOS is not really "special" here, it is rather that you will not frequently use boot options in a VM. One of the most popular uses for boot options is to switch between the operating systems, but for virtual machines it is rarely the case. However, macOS does indeed use boot options

[PATCH 21/50] target/i386: Reduce DisasContext.override to int8_t

2021-02-28 Thread Richard Henderson
The range of values is -1 (none) to 5 (R_GS). Signed-off-by: Richard Henderson --- target/i386/tcg/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index 39af69585f..19c2034344 100644 ---

[PATCH 29/50] target/i386: Add stub generator for helper_set_dr

2021-02-28 Thread Richard Henderson
This removes an ifdef from the middle of disas_insn, and ensures that the branch is not reachable. Signed-off-by: Richard Henderson --- target/i386/tcg/translate.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/target/i386/tcg/translate.c

[PATCH 33/50] target/i386: Eliminate SVM helpers for user-only

2021-02-28 Thread Richard Henderson
Use STUB_HELPER to ensure that such calls are always eliminated. Signed-off-by: Richard Henderson --- target/i386/helper.h | 3 +-- target/i386/tcg/translate.c | 9 target/i386/tcg/user/svm_stubs.c | 38 3 files changed, 10

[PATCH V3 1/8] hw/block/nvme: support namespace detach

2021-02-28 Thread Minwoo Im
Given that now we have nvme-subsys device supported, we can manage namespace allocated, but not attached: detached. This patch introduced a parameter for nvme-ns device named 'detached'. This parameter indicates whether the given namespace device is detached from a entire NVMe subsystem('subsys'

[PATCH v3 10/21] sd: emmc: support idle state in CMD2

2021-02-28 Thread Sai Pavan Boddu
eMMC is expected to be in idle-state post CMD1. Ready state is an intermediate stage which we don't come across in Device identification mode. Signed-off-by: Sai Pavan Boddu Signed-off-by: Edgar E. Iglesias Reviewed-by: Alistair Francis --- hw/sd/sd.c | 4 1 file changed, 4 insertions(+)

[PATCH v3 00/21] eMMC support

2021-02-28 Thread Sai Pavan Boddu
Hi, This patch series add support for eMMC cards. This work was previosly submitted by Vincent, rebased few changes on top. Cedric & Joel has helped to added boot partition access support. I expect them to make a follow-up series to use it with aspeed machines. Present series adds eMMC support

[PATCH v3 19/21] arm: xlnx-versal: Add emmc to versal

2021-02-28 Thread Sai Pavan Boddu
Configuring SDHCI-0 to act as eMMC controller. Signed-off-by: Sai Pavan Boddu --- include/hw/arm/xlnx-versal.h | 1 + hw/arm/xlnx-versal-virt.c| 29 + hw/arm/xlnx-versal.c | 14 -- 3 files changed, 38 insertions(+), 6 deletions(-) diff --git

[PATCH v3 21/21] docs: arm: xlnx-versal-virt: Add eMMC support documentation

2021-02-28 Thread Sai Pavan Boddu
Add details of eMMC specific machine property and example for passing eMMC device. Signed-off-by: Sai Pavan Boddu --- docs/system/arm/xlnx-versal-virt.rst | 14 ++ 1 file changed, 14 insertions(+) diff --git a/docs/system/arm/xlnx-versal-virt.rst

[PATCH v3 18/21] sd: sdhci: Support eMMC devices

2021-02-28 Thread Sai Pavan Boddu
Embedded device slots should be allowed as support of eMMC is available. Signed-off-by: Sai Pavan Boddu --- hw/sd/sdhci.c | 4 1 file changed, 4 deletions(-) diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c index 8ffa539..771212a 100644 --- a/hw/sd/sdhci.c +++ b/hw/sd/sdhci.c @@ -99,10 +99,6 @@

Re: [PATCH 1/2] i386/acpi: fix inconsistent QEMU/OVMF device paths

2021-02-28 Thread Michael S. Tsirkin
On Sat, Feb 27, 2021 at 08:41:11PM +0100, Thomas Lamprecht wrote: > On 30.07.20 17:58, Michael S. Tsirkin wrote: > > macOS uses ACPI UIDs to build the DevicePath for NVRAM boot options, > > while OVMF firmware gets them via an internal channel through QEMU. > > Due to a bug in QEMU ACPI currently

Re: [PATCH] hw/sd: sd: Fix build error when DEBUG_SD is on

2021-02-28 Thread Philippe Mathieu-Daudé
On 2/28/21 6:06 AM, Bin Meng wrote: > From: Bin Meng > > "qemu-common.h" should be included to provide the forward declaration > of qemu_hexdump() when DEBUG_SD is on. > > Signed-off-by: Bin Meng > --- > > hw/sd/sd.c | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Philippe

[PATCH v3 13/21] sd: emmc: Make ACMD41 illegal for mmc

2021-02-28 Thread Sai Pavan Boddu
ACMD41 is not applicable for eMMC. Signed-off-by: Sai Pavan Boddu Signed-off-by: Edgar E. Iglesias --- hw/sd/sd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 174c28e..09c1222 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -1737,6 +1737,9 @@ static

[PATCH v3 05/21] sd: emmc: Add support for EXT_CSD & CSD for eMMC

2021-02-28 Thread Sai Pavan Boddu
From: Vincent Palatin eMMC CSD is similar to SD with an option to refer EXT_CSD for larger devices. Signed-off-by: Vincent Palatin [clg: Add user friendly macros for EXT_CSD register] Signed-off-by: Cédric Le Goater [spb: updated commit message] Signed-off-by: Sai Pavan Boddu ---

Re: [PATCH v4 2/4] util/qemu-sockets.c: Split host:port parsing out of inet_parse

2021-02-28 Thread Samuel Thibault
Samuel Thibault, le dim. 28 févr. 2021 22:39:57 +0100, a ecrit: > It was simpler to have e.g. udp_listen and udp6_listen separate to keep > uint32_t / in6_addr parameters, but there is no strict reason for this: > the haddr is only passed to the bind() call, and the laddr is only > recorded in the

[PATCH V3 8/8] hw/block/nvme: support Identify NS Attached Controller List

2021-02-28 Thread Minwoo Im
Support Identify command for Namespace attached controller list. This command handler will traverse the controller instances in the given subsystem to figure out whether the specified nsid is attached to the controllers or not. The 4096bytes Identify data will return with the first entry

[PATCH V3 2/8] hw/block/nvme: fix namespaces array to 1-based

2021-02-28 Thread Minwoo Im
subsys->namespaces array used to be sized to NVME_SUBSYS_MAX_NAMESPACES. But subsys->namespaces are being accessed with 1-based namespace id which means the very first array entry will always be empty(NULL). Signed-off-by: Minwoo Im Tested-by: Klaus Jensen Reviewed-by: Klaus Jensen ---

[Bug 1906948] Re: Enabling OpenGL for GUI doesn't work on old laptop

2021-02-28 Thread johannes
Still happens in 5.2.0 (Debian 1:5.2+dfsg-3~bpo10+1). Is this just due to hardware which is too old? ** Changed in: qemu Status: Expired => New -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

[PATCH v3 01/21] sd: sd: Remove usage of tabs in the file

2021-02-28 Thread Sai Pavan Boddu
Set tabstop as 4 and used expandtabs Signed-off-by: Sai Pavan Boddu --- hw/sd/sd.c | 190 ++--- 1 file changed, 95 insertions(+), 95 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 8517dbc..74b9162 100644 --- a/hw/sd/sd.c +++

[PATCH v3 08/21] sd: emmc: Dont not update CARD_CAPACITY for eMMC cards

2021-02-28 Thread Sai Pavan Boddu
OCR.CARD_CAPACITY field is only valid for sd cards, So skip it for eMMC. Signed-off-by: Sai Pavan Boddu Signed-off-by: Edgar E. Iglesias Reviewed-by: Alistair Francis --- hw/sd/sd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index

[PATCH v3 03/21] sd: emmc: Update SET_RELATIVE_ADDR command

2021-02-28 Thread Sai Pavan Boddu
From: Vincent Palatin Change SET_RELATIVE_ADDR command to assign relative address as requested by user. Signed-off-by: Vincent Palatin Signed-off-by: Joel Stanley Signed-off-by: Cédric Le Goater [spb: Split original patch series] Signed-off-by: Sai Pavan Boddu --- hw/sd/sd.c | 12

[PATCH v3 11/21] sd: emmc: Add mmc switch function support

2021-02-28 Thread Sai Pavan Boddu
switch operation in eMMC card updates the ext_csd register to request changes in card operations. Here we implement similar sequence but requests are mostly dummy and make no change. Implement SWITCH_ERROR if the write operation extends goes beyond length of ext_csd. Signed-off-by: Sai Pavan

Re: [PATCH 1/2] i386/acpi: fix inconsistent QEMU/OVMF device paths

2021-02-28 Thread Michael S. Tsirkin
On Sun, Feb 28, 2021 at 11:43:55AM +0100, Thomas Lamprecht wrote: > Hi Vitaly, > > On 28.02.21 10:11, vit9696 wrote: > > For us this breaks the ability to control the boot options between the > > operating system and the OVMF. It happens because the operating system > > builds the DPs based on

Re: [PATCH 1/2] i386/acpi: fix inconsistent QEMU/OVMF device paths

2021-02-28 Thread Michael S. Tsirkin
On Sun, Feb 28, 2021 at 09:28:26PM +, vit9696 wrote: > Thomas, macOS is not really "special" here, it is rather that you will not > frequently use boot options in a VM. One of the most popular uses for boot > options is to switch between the operating systems, but for virtual machines > it is

Re: [PATCH 4/4] hw/misc: Model KCS devices in the Aspeed LPC controller

2021-02-28 Thread Andrew Jeffery
On Fri, 26 Feb 2021, at 20:21, Cédric Le Goater wrote: > On 2/26/21 7:57 AM, Andrew Jeffery wrote: > > Keyboard-Controller-Style devices for IPMI purposes are exposed via LPC > > IO cycles from the BMC to the host. > > > > Expose support on the BMC side by implementing the usual MMIO > >

[PATCH 17/50] target/i386: Move rex_r into DisasContext

2021-02-28 Thread Richard Henderson
Treat this flag exactly like we treat rex_b and rex_x. Signed-off-by: Richard Henderson --- target/i386/tcg/translate.c | 84 - 1 file changed, 45 insertions(+), 39 deletions(-) diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index

[PATCH 16/50] target/i386: Tidy REX_B, REX_X definition

2021-02-28 Thread Richard Henderson
Change the storage from int to uint8_t since the value is in {0,8}. For x86_64 add 0 in the macros to (1) promote the type back to int, and (2) make the macro an rvalue. Signed-off-by: Richard Henderson --- target/i386/tcg/translate.c | 17 +++-- 1 file changed, 7 insertions(+), 10

[PATCH 13/50] target/i386: Assert LMA for x86_64 user-only

2021-02-28 Thread Richard Henderson
LMA is a pre-requisite for CODE64, so there is no way to disable it for x86_64-linux-user, and there is no way to enable it for i386. Since we're adding an accessor macro, pull the value directly out of flags when we're not assuming a constant. Signed-off-by: Richard Henderson ---

[PATCH 32/50] target/i386: Implement skinit in translate.c

2021-02-28 Thread Richard Henderson
Our sysemu implementation is a stub. We can already intercept instructions for vmexit, and raising #UD is trivial. Signed-off-by: Richard Henderson --- target/i386/helper.h| 1 - target/i386/tcg/sysemu/svm_helper.c | 7 --- target/i386/tcg/translate.c | 7 +++

[PATCH 46/50] target/i386: Tidy gen_check_io

2021-02-28 Thread Richard Henderson
Get cur_eip from DisasContext. Do not require the caller to use svm_is_rep; get prefix from DisasContext. Use the proper symbolic constants for SVM_IOIO_*. While we're touching all call sites, return bool in preparation for gen_check_io raising #GP. Signed-off-by: Richard Henderson ---

Re: [PATCH 2/2] hw/core: Constify TCGCPUOps

2021-02-28 Thread Philippe Mathieu-Daudé
On 2/28/21 12:25 AM, Richard Henderson wrote: > We no longer have any runtime modifications to this struct, > so declare them all const. > > Signed-off-by: Richard Henderson > --- > include/hw/core/cpu.h | 2 +- > target/alpha/cpu.c | 2 +- > target/arm/cpu.c

[Bug 1906180] Re: Keyboard keys get stuck

2021-02-28 Thread johannes
This might be less common in 5.2.0 but I have still had some strange issues with keyboard. ** Changed in: qemu Status: Expired => New -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1906180

Re: [PATCH 1/2] target/mips: Fold jazz behaviour into mips_cpu_do_transaction_failed

2021-02-28 Thread Richard Henderson
On 2/28/21 8:14 AM, Philippe Mathieu-Daudé wrote: >> +/* Used for the jazz board to modify mips_cpu_do_transaction_failed. */ > > Isn't it possible to have other (old) boards doing something similar? It's possible, but I doubt any need to. I think the comment in hw/mips/jazz.c is correct,

[PATCH 3/4] gitlab-ci: Build Hexagon cross-toolchain

2021-02-28 Thread Philippe Mathieu-Daudé
Add a job to build the Debian based Hexagon cross-toolchain image. This image requires a lot of compute time, too much for the common shared runners. To avoid having the job to timeout, it has to be built with custom unlimited runner. For this reason we restrict this job to manual runs.

Re: [PATCH 2/4] arm: ast2600: Fix iBT IRQ ID

2021-02-28 Thread Andrew Jeffery
On Fri, 26 Feb 2021, at 19:28, Philippe Mathieu-Daudé wrote: > On 2/26/21 7:57 AM, Andrew Jeffery wrote: > > The AST2600 allocates individual GIC IRQ lines for the LPC sub-devices. > > This is a contrast to the AST2400 and AST2500 which use one shared VIC > > IRQ line for the LPC sub-devices.

[PATCH 00/50] i386 cleanup part 3

2021-02-28 Thread Richard Henderson
Based-on: 20210226175143.22388-1-cfont...@suse.de ("[PATCH v25 00/20] i386 cleanup PART 2") This started out to address a fixme in Claudio's patch set, then wandered a bit, with cleanups and bug fixes in the code that I was touching. I stopped when I reached my original goal of removing

[PATCH 02/50] target/i386: Split out check_cpl0

2021-02-28 Thread Richard Henderson
Split out the check for CPL != 0 and the raising of #GP. Signed-off-by: Richard Henderson --- target/i386/tcg/translate.c | 79 ++--- 1 file changed, 30 insertions(+), 49 deletions(-) diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index

[PATCH 05/50] target/i386: Split out check_iopl

2021-02-28 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/i386/tcg/translate.c | 28 +--- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index 75ee87fe84..176c95c02b 100644 --- a/target/i386/tcg/translate.c +++

[PATCH 11/50] target/i386: Assert SS32 for x86_64 user-only

2021-02-28 Thread Richard Henderson
For user-only, SS32 == !VM86, because we are never in real-mode. Since we cannot enter vm86 mode for x86_64 user-only, SS32 is always set. Since we're adding an accessor macro, pull the value directly out of flags otherwise. Signed-off-by: Richard Henderson --- target/i386/tcg/translate.c |

[PATCH 41/50] target/i386: Move invlpg, hlt, monitor, mwait to sysemu

2021-02-28 Thread Richard Henderson
These instructions are all privileged. Signed-off-by: Richard Henderson --- target/i386/helper.h | 8 ++-- target/i386/tcg/helper-tcg.h | 1 + target/i386/tcg/misc_helper.c| 55 +--- target/i386/tcg/sysemu/misc_helper.c | 53

[PATCH 26/50] target/i386: Reduce DisasContext jmp_opt, repz_opt to bool

2021-02-28 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/i386/tcg/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index 92669bc142..6877873bee 100644 --- a/target/i386/tcg/translate.c +++

[PATCH 14/50] target/i386: Assert !ADDSEG for x86_64 user-only

2021-02-28 Thread Richard Henderson
LMA disables traditional segmentation, exposing a flat address space. This means that ADDSEG is off. Since we're adding an accessor macro, pull the value directly out of flags otherwise. Signed-off-by: Richard Henderson --- target/i386/tcg/translate.c | 11 ++- 1 file changed, 6

[PATCH 15/50] target/i386: Introduce REX_PREFIX

2021-02-28 Thread Richard Henderson
The existing flag, x86_64_hregs, does not accurately describe its setting. It is true if and only if a REX prefix has been seen. Yes, that affects the "h" regs, but that's secondary. Add PREFIX_REX and include this bit in s->prefix. Add REX_PREFIX so that the check folds away when x86_64 is

[PATCH V3 4/8] hw/block/nvme: support allocated namespace type

2021-02-28 Thread Minwoo Im
>From NVMe spec 1.4b "6.1.5. NSID and Namespace Relationships" defines valid namespace types: - Unallocated: Not exists in the NVMe subsystem - Allocated: Exists in the NVMe subsystem - Inactive: Not attached to the controller - Active: Attached to the controller

[PATCH V3 3/8] hw/block/nvme: fix allocated namespace list to 256

2021-02-28 Thread Minwoo Im
Expand allocated namespace list (subsys->namespaces) to have 256 entries which is a value lager than at least NVME_MAX_NAMESPACES which is for attached namespace list in a controller. Allocated namespace list should at least larger than attached namespace list. n->num_namespaces =

[PATCH V3 7/8] hw/block/nvme: support changed namespace asyncrohous event

2021-02-28 Thread Minwoo Im
If namespace inventory is changed due to some reasons (e.g., namespace attachment/detachment), controller can send out event notifier to the host to manage namespaces. This patch sends out the AEN to the host after either attach or detach namespaces from controllers. To support clear of the

[PATCH v3 02/21] sd: emmc: Add support for eMMC cards

2021-02-28 Thread Sai Pavan Boddu
Add eMMC device built on top of SD card. Signed-off-by: Sai Pavan Boddu --- include/hw/sd/sd.h | 2 ++ hw/sd/sd.c | 20 2 files changed, 22 insertions(+) diff --git a/include/hw/sd/sd.h b/include/hw/sd/sd.h index 05ef9b7..b402dad 100644 --- a/include/hw/sd/sd.h

[PATCH v3 07/21] sd: sdmmc-internal: Add command string for SEND_OP_CMD

2021-02-28 Thread Sai Pavan Boddu
From: Cédric Le Goater This adds extra info to trace log. Signed-off-by: Sai Pavan Boddu --- hw/sd/sdmmc-internal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/sd/sdmmc-internal.c b/hw/sd/sdmmc-internal.c index 2053def..8648a78 100644 --- a/hw/sd/sdmmc-internal.c

[PATCH v3 09/21] sd: emmc: Update CMD1 definition for eMMC

2021-02-28 Thread Sai Pavan Boddu
Add support to Power up the card and send response r3 in case of eMMC. Signed-off-by: Sai Pavan Boddu Signed-off-by: Edgar E. Iglesias Reviewed-by: Alistair Francis --- hw/sd/sd.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index

[PATCH v3 15/21] sd: emmc: Update CID structure for eMMC

2021-02-28 Thread Sai Pavan Boddu
CID structure is little different for eMMC, w.r.t to product name and manufacturing date. Signed-off-by: Sai Pavan Boddu Signed-off-by: Edgar E. Iglesias --- hw/sd/sd.c | 47 ++- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git

[PATCH v3 06/21] sd: emmc: Update CMD8 to send EXT_CSD register

2021-02-28 Thread Sai Pavan Boddu
From: Vincent Palatin Sends the EXT_CSD register as response to CMD8. Signed-off-by: Vincent Palatin Signed-off-by: Sai Pavan Boddu --- hw/sd/sd.c | 52 1 file changed, 36 insertions(+), 16 deletions(-) diff --git a/hw/sd/sd.c

[PATCH v3 20/21] docs: devel: emmc: Add a doc for emmc card emulation

2021-02-28 Thread Sai Pavan Boddu
Add few simple steps to create emmc card with boot and user data partitions. Signed-off-by: Sai Pavan Boddu --- docs/devel/emmc.txt | 16 1 file changed, 16 insertions(+) create mode 100644 docs/devel/emmc.txt diff --git a/docs/devel/emmc.txt b/docs/devel/emmc.txt new file

[PATCH v3 12/21] sd: emmc: add CMD21 tuning sequence

2021-02-28 Thread Sai Pavan Boddu
eMMC cards support tuning sequence for entering HS200 mode. Signed-off-by: Sai Pavan Boddu Signed-off-by: Edgar E. Iglesias --- hw/sd/sd.c | 47 +++ 1 file changed, 47 insertions(+) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index bf963ec..174c28e 100644

[PATCH 07/50] target/i386: Assert CPL is 3 for user-only

2021-02-28 Thread Richard Henderson
A user-mode executable always runs in ring 3. Signed-off-by: Richard Henderson --- target/i386/tcg/translate.c | 32 +--- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index

[PATCH 12/50] target/i386: Assert CODE64 for x86_64 user-only

2021-02-28 Thread Richard Henderson
For x86_64 user-only, there is no way to leave 64-bit mode. Without x86_64, there is no way to enter 64-bit mode. There is an existing macro to aid with that; simply place it in the right place in the ifdef chain. Since we're adding an accessor macro, pull the value directly out of flags when

[PATCH 31/50] target/i386: Assert !GUEST for user-only

2021-02-28 Thread Richard Henderson
For user-only, we do not need to check for VMM intercept. Signed-off-by: Richard Henderson --- target/i386/tcg/translate.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index 3779da9042..cd376a2c07 100644

[PATCH 09/50] target/i386: Assert !VM86 for x86_64 user-only

2021-02-28 Thread Richard Henderson
For i386-linux-user, we can enter vm86 mode via the vm86(2) syscall. That syscall explicitly returns to 32-bit mode, and the syscall does not exist for a 64-bit x86_64 executable. Since we're adding an accessor macro, pull the value directly out of flags otherwise. Signed-off-by: Richard

[PATCH 25/50] target/i386: Leave TF in DisasContext.flags

2021-02-28 Thread Richard Henderson
It's just as easy to clear the flag with AND than assignment. In two cases the test for the bit can be folded together with the test for HF_INHIBIT_IRQ_MASK. Signed-off-by: Richard Henderson --- target/i386/tcg/translate.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-)

[PATCH V3 5/8] hw/block/nvme: refactor nvme_select_ns_iocs

2021-02-28 Thread Minwoo Im
This patch has no functional changes. This patch just refactored nvme_select_ns_iocs() to iterate the attached namespaces of the controlller and make it invoke __nvme_select_ns_iocs(). Signed-off-by: Minwoo Im Tested-by: Klaus Jensen Reviewed-by: Klaus Jensen --- hw/block/nvme.c | 36

[PATCH V3 0/8] hw/block/nvme: support namespace attachment

2021-02-28 Thread Minwoo Im
Hello, This series supports namespace attachment: attach and detach. This is the third version of series with fixing command events and asynchronous events based on Keith's review. Since command effects for the namespace attachment command is added in this version, we no longer need to rescan

[PATCH v3 14/21] sd: emmc: Add support for emmc erase

2021-02-28 Thread Sai Pavan Boddu
Add CMD35 and CMD36 which sets the erase start and end. Signed-off-by: Sai Pavan Boddu Signed-off-by: Edgar E. Iglesias --- hw/sd/sd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 09c1222..bba0446 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -1552,6

[PATCH v3 16/21] sd: emmc: Support boot area in emmc image

2021-02-28 Thread Sai Pavan Boddu
From: Joel Stanley This assumes a specially constructued image: dd if=/dev/zero of=mmc-bootarea.img count=2 bs=1M dd if=u-boot-spl.bin of=mmc-bootarea.img conv=notrunc dd if=u-boot.bin of=mmc-bootarea.img conv=notrunc count=64 bs=1K cat mmc-bootarea.img obmc-phosphor-image.wic > mmc.img

Re: [PATCH v5 1/1] virtio-net: Add check for mac address while peer is vdpa

2021-02-28 Thread Michael S. Tsirkin
On Thu, Feb 25, 2021 at 02:14:39PM -0500, Michael S. Tsirkin wrote: > On Fri, Feb 26, 2021 at 12:55:06AM +0800, Cindy Lu wrote: > > While peer is vdpa, sometime qemu get an all zero mac address from the > > hardware, > > This is not a legal value. Add the check for this.if we get an zero mac > >

Re: [PATCH v4 2/4] util/qemu-sockets.c: Split host:port parsing out of inet_parse

2021-02-28 Thread Samuel Thibault
Hello, Daniel P. Berrangé, le lun. 22 févr. 2021 09:39:41 +, a ecrit: > In general callers shouldn't care about which format was parsed. The use > of [] is just a mechanism to reliably separate the port from the address. > Once you have the address part getaddrinfo() will reliably parse the >

Re: [PATCH 1/2] i386/acpi: fix inconsistent QEMU/OVMF device paths

2021-02-28 Thread vit9696 via
I am afraid I may not be available for this till the next weekend, but if the time permits then, I can have a look. Actually have another patch to upstream.On Mon, Mar 1, 2021 at 00:37, Michael S. Tsirkin wrote: On Sun, Feb 28, 2021 at 09:28:26PM +, vit9696 wrote:>

Re: [PATCH 0/4] hexagon: Add Docker image & testing to gitlab-ci

2021-02-28 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210228222314.304787-1-f4...@amsat.org/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210228222314.304787-1-f4...@amsat.org Subject: [PATCH 0/4] hexagon: Add Docker image &

[PATCH 4/4] tests/tcg: Use Hexagon Docker image

2021-02-28 Thread Philippe Mathieu-Daudé
From: Alessandro Di Federico Signed-off-by: Alessandro Di Federico [PMD: Split from 'Add Hexagon Docker image' patch] Signed-off-by: Philippe Mathieu-Daudé --- tests/tcg/configure.sh | 4 1 file changed, 4 insertions(+) diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index

[PATCH] tests/acceptance: Use imgtec.com URL for Fedora 22 artifacts

2021-02-28 Thread Philippe Mathieu-Daudé
Having artifacts stored in personal namespace is not ideal, as these might get closed and disappear. Use the original URL where these artifacts could be found. For more references: https://fedoraproject.org/wiki/Architectures/MIPS/2015Bootstrap/mips64el Signed-off-by: Philippe Mathieu-Daudé ---

Re: [PATCH v2 1/2] net/slirp.c: Refactor address parsing

2021-02-28 Thread Samuel Thibault
Hello, Doug Evans, le lun. 08 févr. 2021 10:59:01 -0800, a ecrit: > Samuel, how do qemu patches involving libslirp changes usually work? Well, we haven't had many yet actually :) > Should I have held off submitting the qemu patch until the libslirp > prerequisite has been added to qemu's tree,

Re: [PATCH 1/4] arm: ast2600: Force a multiple of 32 of IRQs for the GIC

2021-02-28 Thread Andrew Jeffery
On Fri, 26 Feb 2021, at 19:26, Philippe Mathieu-Daudé wrote: > On 2/26/21 7:57 AM, Andrew Jeffery wrote: > > This appears to be a requirement of the GIC model. > > If so this should be adjusted in the GIC or a15mp_priv_realize(), > not in each caller, isn't it? > Maybe, let me look into it.

[PATCH 10/50] target/i386: Assert CODE32 for x86_64 user-only

2021-02-28 Thread Richard Henderson
For user-only, CODE32 == !VM86, because we are never in real-mode. Since we cannot enter vm86 mode for x86_64 user-only, CODE32 is always set. Since we're adding an accessor macro, pull the value directly out of flags otherwise. Signed-off-by: Richard Henderson --- target/i386/tcg/translate.c

[PATCH 06/50] target/i386: Assert PE is set for user-only

2021-02-28 Thread Richard Henderson
A user-mode executable is never in real-mode. Since we're adding an accessor macro, pull the value directly out of flags for sysemu. Signed-off-by: Richard Henderson --- target/i386/tcg/translate.c | 69 +++-- 1 file changed, 36 insertions(+), 33 deletions(-)

[PATCH 23/50] target/i386: Reduce DisasContext.vex_[lv] to uint8_t

2021-02-28 Thread Richard Henderson
Currently, vex_l is either {0,1}; if in the future we implement AVX-512, the max value will be 2. In vex_v we store a register number. This is 0-15 for SSE, and 0-31 for AVX-512. Signed-off-by: Richard Henderson --- target/i386/tcg/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH 03/50] target/i386: Unify code paths for IRET

2021-02-28 Thread Richard Henderson
In vm86 mode, we use the same helper as real-mode, but with an extra check for IOPL. All non-exceptional paths set EFLAGS. Signed-off-by: Richard Henderson --- target/i386/tcg/translate.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git

[PATCH 44/50] target/i386: Eliminate user stubs for read/write_crN, rd/wrmsr

2021-02-28 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/i386/helper.h | 8 target/i386/tcg/translate.c | 4 target/i386/tcg/user/misc_stubs.c | 20 3 files changed, 8 insertions(+), 24 deletions(-) diff --git a/target/i386/helper.h

[PATCH 18/50] target/i386: Move rex_w into DisasContext

2021-02-28 Thread Richard Henderson
Treat this flag exactly like we treat the other rex bits. The -1 initialization is unused; the two tests are > 0 and == 1, so the value can be reduced to a bool. Signed-off-by: Richard Henderson --- target/i386/tcg/translate.c | 16 +--- 1 file changed, 9 insertions(+), 7

[PATCH 22/50] target/i386: Reduce DisasContext.prefix to uint8_t

2021-02-28 Thread Richard Henderson
The highest bit in this set is 0x40 (PREFIX_REX). Signed-off-by: Richard Henderson --- target/i386/tcg/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index 19c2034344..79f987b2cf 100644 ---

Re: [PATCH 1/2] target/mips: Fold jazz behaviour into mips_cpu_do_transaction_failed

2021-02-28 Thread Philippe Mathieu-Daudé
Hi Richard, On 2/28/21 12:25 AM, Richard Henderson wrote: > Add a flag to MIPSCPUClass in order to avoid needing to > replace mips_tcg_ops.do_transaction_failed. > > Signed-off-by: Richard Henderson > --- > target/mips/cpu-qom.h | 3 +++ > hw/mips/jazz.c | 35

[PATCH v3 04/21] sd: emmc: update OCR fields for eMMC

2021-02-28 Thread Sai Pavan Boddu
From: Vincent Palatin eMMC OCR register doesn't has UHS-II field and voltage fields are different. Signed-off-by: Vincent Palatin Signed-off-by: Sai Pavan Boddu --- hw/sd/sd.c | 27 --- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/hw/sd/sd.c

[PATCH 0/4] hexagon: Add Docker image & testing to gitlab-ci

2021-02-28 Thread Philippe Mathieu-Daudé
Hi, This series is a rework of the 'Add Dockerfile for hexagon' patch from Alessandro/Brian that Taylor sent in v8: https://www.mail-archive.com/qemu-devel@nongnu.org/msg780330.html but adapted to mainstream. Gitlab shared runner are usually capped to 2/4 cores and timeout after 2h30 to 3h. We

[PATCH 1/4] docker: Add Hexagon image

2021-02-28 Thread Philippe Mathieu-Daudé
From: Alessandro Di Federico Signed-off-by: Alessandro Di Federico [PMD: Base on qemu/debian10, add missing EXTRA_FILES, remove X86] Signed-off-by: Philippe Mathieu-Daudé --- tests/docker/Makefile.include | 2 + .../dockerfiles/debian-hexagon-cross.docker | 23 +++

[PATCH 2/4] gitlab-ci: Pass optional EXTRA_FILES when building docker images

2021-02-28 Thread Philippe Mathieu-Daudé
Pass EXTRA_FILES to tests/docker/docker.py to use its --extra-files command line option. Signed-off-by: Philippe Mathieu-Daudé --- .gitlab-ci.d/containers.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.d/containers.yml b/.gitlab-ci.d/containers.yml index

[PATCH] hw/i2c/npcm7xx_smbus: Simplify npcm7xx_smbus_init()

2021-02-28 Thread Philippe Mathieu-Daudé
The STATUS register will be reset to IDLE in cnpcm7xx_smbus_enter_reset(), no need to preset it in instance_init(). Signed-off-by: Philippe Mathieu-Daudé --- hw/i2c/npcm7xx_smbus.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/i2c/npcm7xx_smbus.c b/hw/i2c/npcm7xx_smbus.c index

[PATCH 19/50] target/i386: Remove DisasContext.f_st as unused

2021-02-28 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/i386/tcg/translate.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index deb1e43430..f4af92886f 100644 --- a/target/i386/tcg/translate.c +++ b/target/i386/tcg/translate.c @@ -101,7 +101,6

[PATCH 08/50] target/i386: Assert IOPL is 0 for user-only

2021-02-28 Thread Richard Henderson
On real hardware, the linux kernel has the iopl(2) syscall which can set IOPL to 3, to allow e.g. the xserver to briefly disable interrupts while programming the graphics card. However, QEMU cannot and does not implement this syscall, so the IOPL is never changed from 0. Which means that all of

[PATCH 04/50] target/i386: Split out check_vm86_iopl

2021-02-28 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/i386/tcg/translate.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index 59c1212625..75ee87fe84 100644 --- a/target/i386/tcg/translate.c +++

[PATCH 01/50] target/i386: Split out gen_exception_gpf

2021-02-28 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/i386/tcg/translate.c | 68 - 1 file changed, 37 insertions(+), 31 deletions(-) diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index 6ecbbfa6c1..6af8bd219b 100644 ---

[PATCH 35/50] target/i386: Simplify gen_debug usage

2021-02-28 Thread Richard Henderson
Both invocations pass the start of the current instruction, which is available as s->base.pc_next. The function sets is_jmp, so we can eliminate a second setting. Signed-off-by: Richard Henderson --- target/i386/tcg/translate.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-)

Re: [PATCH 1/2] i386/acpi: fix inconsistent QEMU/OVMF device paths

2021-02-28 Thread Thomas Lamprecht
On 01.03.21 08:20, Michael S. Tsirkin wrote: > On Mon, Mar 01, 2021 at 08:12:35AM +0100, Thomas Lamprecht wrote: >> On 28.02.21 21:43, Michael S. Tsirkin wrote: >>> Sure. The way to do that is to tie old behaviour to old machine >>> versions. We'll need it in stable too ... >> >> Yeah, using

Re: [PATCH 49/50] target/i386: Move helper_check_io to sysemu

2021-02-28 Thread Philippe Mathieu-Daudé
On 3/1/21 12:23 AM, Richard Henderson wrote: > The we never allow i/o from user-only, and the tss check > that helper_check_io does will always fail. Use an ifdef > within gen_check_io and return false, indicating that an > exception is known to be raised. > > Signed-off-by: Richard Henderson >

Re: [PATCH 48/50] target/i386: Create helper_check_io

2021-02-28 Thread Philippe Mathieu-Daudé
On 3/1/21 12:23 AM, Richard Henderson wrote: > Drop helper_check_io[bwl] and expose their common > subroutine to tcg directly. > > Signed-off-by: Richard Henderson > --- > target/i386/helper.h | 4 +--- > target/i386/tcg/seg_helper.c | 21 +++-- >

Re: [PATCH v5 1/1] virtio-net: Add check for mac address while peer is vdpa

2021-02-28 Thread Adrian Moreno
On 3/1/21 2:36 AM, Cindy Lu wrote: > On Mon, Mar 1, 2021 at 4:40 AM Michael S. Tsirkin wrote: >> >> On Thu, Feb 25, 2021 at 02:14:39PM -0500, Michael S. Tsirkin wrote: >>> On Fri, Feb 26, 2021 at 12:55:06AM +0800, Cindy Lu wrote: While peer is vdpa, sometime qemu get an all zero mac

Re: [PATCH] iotests: Fix up python style in 300

2021-02-28 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > 16.02.2021 02:21, John Snow wrote: >> On 2/15/21 5:05 PM, Eric Blake wrote: >>> Break some long lines, and relax our type hints to be more generic to >>> any JSON, in order to more easily permit the additional JSON depth now >>> possible in migration

Re: [PATCH 1/2] i386/acpi: fix inconsistent QEMU/OVMF device paths

2021-02-28 Thread Thomas Lamprecht
On 28.02.21 21:43, Michael S. Tsirkin wrote: > Sure. The way to do that is to tie old behaviour to old machine > versions. We'll need it in stable too ... Yeah, using machine types is how its meant to be with solving migration breakage, sure. But that means we have to permanently pin the VM, and

Re: [PATCH 23/50] target/i386: Reduce DisasContext.vex_[lv] to uint8_t

2021-02-28 Thread Philippe Mathieu-Daudé
On 3/1/21 12:22 AM, Richard Henderson wrote: > Currently, vex_l is either {0,1}; if in the future we implement > AVX-512, the max value will be 2. In vex_v we store a register > number. This is 0-15 for SSE, and 0-31 for AVX-512. > > Signed-off-by: Richard Henderson > --- >

[PATCH 30/50] target/i386: Assert !SVME for user-only

2021-02-28 Thread Richard Henderson
Most of the VMM instructions are already disabled for user-only, by being usable only from ring 0. The spec is intentionally loose for VMMCALL, allowing the VMM to define syscalls for user-only. However, linux does not do so; VMMCALL is illegal. Signed-off-by: Richard Henderson ---

[PATCH 37/50] target/i386: Remove pc_start argument to gen_svm_check_intercept

2021-02-28 Thread Richard Henderson
When exiting helper_svm_check_intercept via exception, cpu_vmexit calls cpu_restore_state, which will recover eip and cc_op via unwind. Therefore we do not need to store eip or cc_op before the call. Signed-off-by: Richard Henderson --- target/i386/tcg/translate.c | 45

Re: [PATCH v2 03/24] hw/arm/mps2-tz: Correct the OSCCLK settings for mps2-an505 and mps2-an511

2021-02-28 Thread Richard Henderson
On 2/15/21 3:51 AM, Peter Maydell wrote: We were previously using the default OSCCLK settings, which are correct for the older MPS2 boards (mps2-an385, mps2-an386, mps2-an500, mps2-an511), but wrong for the mps2-an505 and mps2-511 implemented in mps2-tz.c. Now we're setting the values

  1   2   >