[Bug 1863710] Re: qemu 4.2 does not process discard(trim) commands

2021-05-05 Thread Thomas Huth
I mean: Please provide the QEMU command line parameters ... is this also reproducible without libvirt? ... otherwise it might also be a problem in libvirt instead... -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

[Bug 1864955] Re: bundle QEMU installer with HAXM accelerator for Windows

2021-05-05 Thread Thomas Huth
The QEMU project itself does not provide any binaries for Windows, so I'm closing this ticket now. There are several people who provide binaries for Windows, so if you want to get one of these changed, please get in touch with the corresponding person who offers that binary instead. ** Changed

[Bug 1863710] Re: qemu 4.2 does not process discard(trim) commands

2021-05-05 Thread Thomas Huth
How did you start QEMU? Does this still happen with the latest version of QEMU? ** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1863710 Title:

Re: [PATCH 1/7] vhost-user-gpu: fix memory disclosure in virgl_cmd_get_capset_info

2021-05-05 Thread P J P
+-- On Wed, 5 May 2021, Li Qiang wrote --+ | P J P 于2021年5月5日周三 下午3:24写道: | > - vg_ctrl_response(g, cmd, , sizeof(resp)); | > + vg_ctrl_response(g, cmd, , sizeof(resp.hdr)); | > | > * While memset(3) is okay, should it also send header(hdr) size as 'resp_len'? | | I don't think so. This

[Bug 1864704] Re: No compatible -machine option in qemu-system-ppc64 for e6500 core

2021-05-05 Thread Thomas Huth
You could try to build an image for this machine with buildroot (see https://buildroot.org/). Anyway, I'm closing this ticket now since this was not a bug. ** Changed in: qemu Status: New => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which

[Bug 1864814] Re: Improve UX for macOS when launching from a fullscreen app

2021-05-05 Thread Thomas Huth
The QEMU project is currently moving its bug tracking to another system. For this we need to know which bugs are still valid and which could be closed already. Thus we are setting older bugs to "Incomplete" now. If you still think this bug report here is valid, then please switch the state back

[Bug 1864536] Re: Support for XSAVES intel instructions in QEMU

2021-05-05 Thread Thomas Huth
The QEMU project is currently moving its bug tracking to another system. For this we need to know which bugs are still valid and which could be closed already. Thus we are setting older bugs to "Incomplete" now. If you still think this bug report here is valid, then please switch the state back

[Bug 1863601] Re: unable to type "|" character in french keyboard.

2021-05-05 Thread Thomas Huth
Aditya, does the problem still persist? If so, could you please provide the QEMU command line as requested by Daniel? ** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

[Bug 1863678] Re: qemu and virtio-vga black screen in Android

2021-05-05 Thread Thomas Huth
I'm closing this now. If the problem still persists, please report it to libslirp instead. ** Changed in: qemu Status: New => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1863678

[Bug 1891749] Re: CGA Mode 6 is only 100 pixels tall, when it's supposed to be 200

2021-05-05 Thread Thomas Huth
Could you please provide a test program for this issue? ** Tags added: graphics ** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1891749 Title:

Re: [PATCH 09/23] hw/net/e1000e_core: Use definition to avoid dynamic stack allocation

2021-05-05 Thread Jason Wang
在 2021/5/6 上午5:10, Philippe Mathieu-Daudé 写道: The compiler isn't clever enough to figure 'min_buf_size' is a constant, so help it by using a definitions instead. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Jason Wang --- hw/net/e1000e_core.c | 7 --- 1 file changed, 4

Re: [PATCH] virtio-net: failover: add missing remove_migration_state_change_notifier()

2021-05-05 Thread Jason Wang
在 2021/5/5 下午3:46, Laurent Vivier 写道: On 29/04/2021 09:26, Jason Wang wrote: 在 2021/4/28 下午6:14, Michael S. Tsirkin 写道: On Tue, Apr 27, 2021 at 03:02:34PM +0100, Dr. David Alan Gilbert wrote: * Laurent Vivier (lviv...@redhat.com) wrote: In the failover case configuration,

Re: [RFC-PATCH] ppc/spapr: Add support for H_SCM_PERFORMANCE_STATS hcall

2021-05-05 Thread Vaibhav Jain
Hi David, Firstly, apologies for responding so late. I have spinned off a v2 of this RFC patch addressing your recent review comments at https://lore.kernel.org/qemu-devel/20210506024924.85526-1-vaib...@linux.ibm.com -- Cheers ~ Vaibhav David Gibson writes: > On Tue, Apr 20, 2021 at

Re: [PATCH] tap-bsd: Remove special casing for older OpenBSD releases

2021-05-05 Thread Brad Smith
On 5/5/2021 10:19 PM, Jason Wang wrote: 在 2021/5/2 下午12:10, Brad Smith 写道: On 4/1/2021 3:24 AM, Jason Wang wrote: 在 2021/3/30 上午4:38, Brad Smith 写道: On 3/28/2021 11:58 PM, Jason Wang wrote: 在 2021/3/29 上午11:03, Brad Smith 写道: It very much is correct. We don't care about such releases

Re: [PATCH v2] hw/net/imx_fec: return 0xffff when accessing non-existing PHY

2021-05-05 Thread Jason Wang
在 2021/5/3 下午9:53, Guenter Roeck 写道: If a PHY does not exist, attempts to read from it should return 0x. Otherwise the Linux kernel will believe that a PHY is there and select the non-existing PHY. This in turn will result in network errors later on since the real PHY is not selected or

Re: [PATCH 1/7] migration: use GDateTime for formatting timestamp in snapshot names

2021-05-05 Thread Brad Smith
Thank you. On 5/5/2021 6:36 AM, Daniel P. Berrangé wrote: The GDateTime APIs provided by GLib avoid portability pitfalls, such as some platforms where 'struct timeval.tv_sec' field is still 'long' instead of 'time_t'. When combined with automatic cleanup, GDateTime often results in simpler code

Re: [PATCH] hw/net/imx_fec: return 0xffff when accessing non-existing PHY

2021-05-05 Thread Guenter Roeck
On Thu, May 06, 2021 at 10:24:52AM +0800, Jason Wang wrote: [ ... ] > Ok, please send V2. > You should have it by now. Please let me know if it got lost. Thanks, Guenter

[RFC PATCH v2] ppc/spapr: Add support for H_SCM_PERFORMANCE_STATS hcall

2021-05-05 Thread Vaibhav Jain
Add support for H_SCM_PERFORMANCE_STATS described at [1] for spapr nvdimms. This enables guest to fetch performance stats[2] like expected life of an nvdimm ('MemLife ') etc and display them to the user. Linux kernel support for fetching these performance stats and exposing them to the user-space

Re: [PATCH] hw/arm/xlnx: Fix PHY address for xilinx-zynq-a9

2021-05-05 Thread Guenter Roeck
On 5/5/21 6:58 PM, Bin Meng wrote: > Hi Guenter, > > On Tue, May 4, 2021 at 8:41 PM Guenter Roeck wrote: >> >> Commit dfc388797cc4 ("hw/arm: xlnx: Set all boards' GEM 'phy-addr' >> property value to 23") configured the PHY address for xilinx-zynq-a9 >> to 23. When trying to boot xilinx-zynq-a9

Re: [PATCH] hw/net/imx_fec: return 0xffff when accessing non-existing PHY

2021-05-05 Thread Jason Wang
在 2021/5/3 上午12:14, Guenter Roeck 写道: On 5/2/21 9:09 AM, Bin Meng wrote: On Mon, May 3, 2021 at 12:03 AM Guenter Roeck wrote: If a PHY does not exist, attempts to read from it should return 0x. Otherwise the Linux kernel will believe that a PHY is there and select the non-existing PHY.

Re: [PATCH] hw/net/imx_fec: return 0xffff when accessing non-existing PHY

2021-05-05 Thread Jason Wang
在 2021/5/3 上午12:03, Guenter Roeck 写道: If a PHY does not exist, attempts to read from it should return 0x. Otherwise the Linux kernel will believe that a PHY is there and select the non-existing PHY. This in turn will result in network errors later on since the real PHY is not selected or

Re: [PATCH 5/5] target/ppc/kvm: Replace alloca() by g_malloc()

2021-05-05 Thread David Gibson
On Wed, May 05, 2021 at 07:00:55PM +0200, Philippe Mathieu-Daudé wrote: > The ALLOCA(3) man-page mentions its "use is discouraged". > > Replace it by a g_malloc() call. > > Signed-off-by: Philippe Mathieu-Daudé Acked-by: David Gibson > --- > target/ppc/kvm.c | 10 +- > 1 file

Re: [PATCH] tap-bsd: Remove special casing for older OpenBSD releases

2021-05-05 Thread Jason Wang
在 2021/5/2 下午12:10, Brad Smith 写道: On 4/1/2021 3:24 AM, Jason Wang wrote: 在 2021/3/30 上午4:38, Brad Smith 写道: On 3/28/2021 11:58 PM, Jason Wang wrote: 在 2021/3/29 上午11:03, Brad Smith 写道: It very much is correct. We don't care about such releases anymore. So is there a doc/wiki to say

Re: [PATCH 11/23] hw/intc/xics: Avoid dynamic stack allocation

2021-05-05 Thread David Gibson
On Wed, May 05, 2021 at 11:10:35PM +0200, Philippe Mathieu-Daudé wrote: > Use autofree heap allocation instead of variable-length > array on the stack. > > Signed-off-by: Philippe Mathieu-Daudé Acked-by: David Gibson > --- > hw/intc/xics.c | 2 +- > 1 file changed, 1 insertion(+), 1

Re: [PATCH 15/23] net: Avoid dynamic stack allocation

2021-05-05 Thread David Gibson
On Wed, May 05, 2021 at 11:10:39PM +0200, Philippe Mathieu-Daudé wrote: > Use autofree heap allocation instead of variable-length > array on the stack. > > Signed-off-by: Philippe Mathieu-Daudé fsl_etsec parts Acked-by: David Gibson > --- > hw/net/fsl_etsec/rings.c | 9 - >

Re: [RFC PATCH v2 1/2] target/ppc: Moved functions out of mmu-hash64

2021-05-05 Thread David Gibson
On Wed, May 05, 2021 at 02:30:35PM -0300, Lucas Mateus Martins Araujo e Castro wrote: > > On 03/05/2021 01:24, David Gibson wrote: > > On Fri, Apr 30, 2021 at 03:40:46PM -0300, Lucas Mateus Castro (alqotel) > > wrote: > > > The functions ppc_store_lpcr, ppc_hash64_filter_pagesizes and > > >

Re: [PATCH 21/23] target/ppc/kvm: Avoid dynamic stack allocation

2021-05-05 Thread David Gibson
On Wed, May 05, 2021 at 11:10:45PM +0200, Philippe Mathieu-Daudé wrote: > Use autofree heap allocation instead of variable-length > array on the stack. > > Signed-off-by: Philippe Mathieu-Daudé Acked-by: David Gibson > --- > target/ppc/kvm.c | 2 +- > 1 file changed, 1 insertion(+), 1

Re: [PATCH 10/23] hw/ppc/pnv: Avoid dynamic stack allocation

2021-05-05 Thread David Gibson
On Wed, May 05, 2021 at 11:10:34PM +0200, Philippe Mathieu-Daudé wrote: > Use autofree heap allocation instead of variable-length > array on the stack. > > Signed-off-by: Philippe Mathieu-Daudé Acked-by: David Gibson > --- > hw/ppc/pnv.c | 4 ++-- > hw/ppc/spapr.c |

Re: [PATCH 2/2] vhost-vdpa: doorbell mapping support

2021-05-05 Thread Jason Wang
在 2021/5/1 上午6:32, Si-Wei Liu 写道: On 4/15/2021 1:04 AM, Jason Wang wrote: This patch implements the doorbell mapping support for vhost-vDPA. This is simply done by using mmap()/munmap() for the vhost-vDPA fd during device start/stop. For the device without doorbell support, we fall back to

Re: [RESEND PATCH 13/32] linux-headers: Add placeholder for KVM_CAP_SGX_ATTRIBUTE

2021-05-05 Thread Kai Huang
On Fri, 2021-04-30 at 14:24 +0800, Yang Zhong wrote: > From: Sean Christopherson > > KVM_CAP_SGX_ATTRIBUTE is a proposed capability for Intel SGX that can be > used by userspace to enable privileged attributes, e.g. access to the > PROVISIONKEY. > > Signed-off-by: Sean Christopherson >

Re: [PATCH 07/23] hw/block/nvme: Use definition to avoid dynamic stack allocation

2021-05-05 Thread Keith Busch
On Wed, May 05, 2021 at 06:09:10PM -0500, Eric Blake wrote: > On 5/5/21 5:07 PM, Philippe Mathieu-Daudé wrote: > > +Eric > > > > On 5/5/21 11:22 PM, Keith Busch wrote: > >> On Wed, May 05, 2021 at 11:10:31PM +0200, Philippe Mathieu-Daudé wrote: > >>> The compiler isn't clever enough to figure

Re: [PATCH 1/2] Consistent function names for sifive uart read and write function

2021-05-05 Thread Alistair Francis
On Wed, May 5, 2021 at 2:50 AM Lukas Jünger wrote: > > Signed-off-by: Lukas Jünger Reviewed-by: Alistair Francis Alistair > --- > hw/char/sifive_uart.c | 14 +++--- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/hw/char/sifive_uart.c b/hw/char/sifive_uart.c >

Re: [PATCH v2] target/riscv: fix wfi exception behavior

2021-05-05 Thread Alistair Francis
On Wed, Apr 21, 2021 at 7:37 AM Jose Martins wrote: > > The wfi exception trigger behavior should take into account user mode, > hstatus.vtw, and the fact the an wfi might raise different types of > exceptions depending on various factors: > > If supervisor mode is not present: > > - an illegal

Re: [PATCH 16/22] qapi/parser: add docstrings

2021-05-05 Thread John Snow
On 4/27/21 5:03 AM, Markus Armbruster wrote: John Snow writes: On 4/25/21 9:27 AM, Markus Armbruster wrote: John Snow writes: Signed-off-by: John Snow --- My hubris is infinite. Score one of the three principal virtues of a programmer ;) It was written before the prior review, but

Re: [PATCH v6 02/17] target/riscv: rvb: count leading/trailing zeros

2021-05-05 Thread Alistair Francis
On Thu, May 6, 2021 at 2:24 AM wrote: > > From: Kito Cheng > > Signed-off-by: Kito Cheng > Signed-off-by: Frank Chang > Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis Alistair > --- > target/riscv/cpu.h | 1 + > target/riscv/insn32.decode

Re: [PATCH] hw/arm/xlnx: Fix PHY address for xilinx-zynq-a9

2021-05-05 Thread Bin Meng
Hi Guenter, On Tue, May 4, 2021 at 8:41 PM Guenter Roeck wrote: > > Commit dfc388797cc4 ("hw/arm: xlnx: Set all boards' GEM 'phy-addr' > property value to 23") configured the PHY address for xilinx-zynq-a9 > to 23. When trying to boot xilinx-zynq-a9 with zynq-zc702.dtb or > zynq-zc706.dtb, this

[RFC][PATCH v1 10/10] Introduce new CPUClass::get_phys_page_attrs_debug implementation for encrypted guests

2021-05-05 Thread Yuan Yao
From: Yuan Yao Add new function x86_cpu_get_phys_page_attrs_encrypted_debug() to walking guset page tables to do VA -> PA translation for encrypted guests. Now install this to cc->get_phys_page_attrs_debug for INTEL TD guests only. Signed-off-by: Yuan Yao diff --git a/target/i386/cpu.h

Re: [PATCH 12/22] qapi/parser: add type hint annotations

2021-05-05 Thread John Snow
On 4/27/21 4:43 AM, Markus Armbruster wrote: John Snow writes: On 4/25/21 8:34 AM, Markus Armbruster wrote: value: object isn't wrong, but why not _ExprValue? Updated excuse: because all the way back outside in _parse, we know that: 1. expr is a dict (because of get_expr(False)) 2.

[RFC][PATCH v1 08/10] Introduce debug version of physical memory read/write API

2021-05-05 Thread Yuan Yao
From: Yuan Yao Add below APIs for reading/writing the physical memory, subsequent patch will use them in monitor commands and gdbstub to support encrypted guest debugging. uint32_t x86_ldl_phys_debug(CPUState *cs, hwaddr addr); uint64_t x86_ldq_phys_debug(CPUState *cs, hwaddr addr); void

[RFC][PATCH v1 05/10] Set the RAM's MemoryRegion::debug_ops for INTEL TD guests

2021-05-05 Thread Yuan Yao
From: Yuan Yao Now only set the RAM's debug_ops for INTEL TD guests, SEV can also rely on the common part introduced in previous patch or introduce new debug_ops implementation if it's necessary. Signed-off-by: Yuan Yao diff --git a/hw/i386/pc.c b/hw/i386/pc.c index d5a4345f44..772b19c524

[RFC][PATCH v1 02/10] Currently, guest memory access for debugging purposes is performed using memcpy(). Extend the 'struct MemoryRegion' to include new callbacks that can be used to override the use

2021-05-05 Thread Yuan Yao
From: Brijesh Singh The new callbacks can be used to display the guest memory of an SEV guest by registering callbacks to the SEV memory encryption/decryption APIs. Typical usage: mem_read(uint8_t *dest, const uint8_t *hva_src, hwaddr gpa_src, uint32_t len, MemTxAttrs attrs);

[RFC][PATCH v1 09/10] Change the monitor and other commands and gdbstub to use the debug API

2021-05-05 Thread Yuan Yao
From: Yuan Yao Please comment if some changes are incorrect or I missed something here. Signed-off-by: Yuan Yao diff --git a/dump/dump.c b/dump/dump.c index 929138e91d..21eb018092 100644 --- a/dump/dump.c +++ b/dump/dump.c @@ -1746,7 +1746,7 @@ static void dump_init(DumpState *s, int fd, bool

[RFC][PATCH v1 04/10] Implements the common MemoryRegion::ram_debug_ops for encrypted guests

2021-05-05 Thread Yuan Yao
From: Yuan Yao The new functions are added into target/i386/kvm/kvm.c as common functions to support encrypted guest for KVM on x86. Now we enable these only for INTEL TD guests. Signed-off-by: Yuan Yao diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c index 05bf4f8b8b..5050b2a82f

[RFC][PATCH v1 01/10] Extend the MemTxAttrs to include a 'debug' flag. The flag can be used as general indicator that operation was triggered by the debugger.

2021-05-05 Thread Yuan Yao
From: Brijesh Singh A subsequent patch will set the debug=1 when issuing a memory access from the gdbstub or HMP commands. This is a prerequisite to support debugging an encrypted guest. When a request with debug=1 is seen, the encryption APIs will be used to access the guest memory.

[RFC][PATCH v1 07/10] Add new address_space_read and address_space_write debug helper interfaces which can be invoked by vendor specific guest memory debug assist/hooks to do guest RAM memory accesses

2021-05-05 Thread Yuan Yao
From: Ashish Kalra Yuan Yao: - Fixed fuzz_dma_read_cb() parameter issue for QEMU 5.2.91. - Move the caller of encrypted_memory_debug_ops into phymem.c as common callbacks for encrypted guests. - Adapted address_space_read_debug/address_space_wirte_rom_debug with new

[RFC][PATCH v1 06/10] Introduce new MemoryDebugOps which hook into guest virtual and physical memory debug interfaces such as cpu_memory_rw_debug, to allow vendor specific assist/hooks for debugging a

2021-05-05 Thread Yuan Yao
From: Ashish Kalra The MemoryDebugOps are used by cpu_memory_rw_debug() and default to address_space_read and address_space_write_rom. Yuan Yao: Exports the physical_memory_debug_ops variable for functions in target/i386/helper.c Signed-off-by: Ashish Kalra Signed-off-by: Yuan Yao diff

[RFC][PATCH v1 03/10] Introduce new interface KVMState::set_mr_debug_ops and its wrapper

2021-05-05 Thread Yuan Yao
From: Yuan Yao This interface is designed to setup the MemoryRegion::debug_ops. Also introduced 2 wrapper functions for installing/calling the KVMState::set_mr_debug_ops from different targets easily. Signed-off-by: Yuan Yao diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index

[RFC][PATCH v1 00/10] Enable encrypted guest memory access in QEMU

2021-05-05 Thread Yuan Yao
From: Yuan Yao This RFC series introduces the basic framework and a common implementation on x86 to handle encrypted guest memory reading/writing, to support QEMU's built-in guest debugging features, like the monitor command xp and gdbstub. The encrypted guest which its memory and/or register

Re: [PATCH 12/22] qapi/parser: add type hint annotations

2021-05-05 Thread John Snow
On 4/21/21 11:07 PM, John Snow wrote: +self.exprs: List[Expression] = [] I did indeed intend to use Expression to mean TopLevelExpr ... However, in this case, that's not what actually gets stored here. I tricked myself! This stores the dict that associates 'expr', 'doc' and 'info'.

Re: [PATCH 07/23] hw/block/nvme: Use definition to avoid dynamic stack allocation

2021-05-05 Thread Warner Losh
On Wed, May 5, 2021, 5:10 PM Eric Blake wrote: > On 5/5/21 5:07 PM, Philippe Mathieu-Daudé wrote: > > +Eric > > > > On 5/5/21 11:22 PM, Keith Busch wrote: > >> On Wed, May 05, 2021 at 11:10:31PM +0200, Philippe Mathieu-Daudé wrote: > >>> The compiler isn't clever enough to figure

[Bug 1921061] Re: Corsair iCUE Install Fails, qemu VM Reboots

2021-05-05 Thread Russell Morris
FYI, to provide an update - I found a workaround! It's related to the CPU selection. I can't seem to pass through my host CPU, even with v6.0.0 of qemu. Rather, I have to use the qemu64 CPU. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to

[PULL v2 35/42] target/riscv: Remove the hardcoded HGATP_MODE macro

2021-05-05 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Richard Henderson Reviewed-by: Bin Meng Message-id: 665f624bfdc2e3ca64265004b07de7489c77a766.1619234854.git.alistair.fran...@wdc.com --- target/riscv/cpu_bits.h | 11 --- target/riscv/cpu_helper.c | 24 +++- 2 files

[PULL v2 32/42] target/riscv: fix a typo with interrupt names

2021-05-05 Thread Alistair Francis
From: Emmanuel Blot Interrupt names have been swapped in 205377f8 and do not follow IRQ_*_EXT definition order. Signed-off-by: Emmanuel Blot Reviewed-by: Alistair Francis Message-id: 20210421133236.11323-1-emmanuel.b...@sifive.com Signed-off-by: Alistair Francis --- target/riscv/cpu.c | 2

[PULL v2 39/42] target/riscv: Remove an unused CASE_OP_32_64 macro

2021-05-05 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Richard Henderson Reviewed-by: Bin Meng Message-id: 4853459564af35a6690120c74ad892f60cec35ff.1619234854.git.alistair.fran...@wdc.com --- target/riscv/translate.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/target/riscv/translate.c

[PULL v2 28/42] target/riscv: fix vrgather macro index variable type bug

2021-05-05 Thread Alistair Francis
From: Frank Chang ETYPE may be type of uint64_t, thus index variable has to be declared as type of uint64_t, too. Otherwise the value read from vs1 register may be truncated to type of uint32_t. Signed-off-by: Frank Chang Reviewed-by: Richard Henderson Message-id:

[PULL v2 34/42] target/riscv: Remove the hardcoded SSTATUS_SD macro

2021-05-05 Thread Alistair Francis
This also ensures that the SD bit is not writable. Signed-off-by: Alistair Francis Reviewed-by: Richard Henderson Reviewed-by: Bin Meng Message-id: 9ea842309f0fd7adff172790f5b5fc058b40f2f1.1619234854.git.alistair.fran...@wdc.com --- target/riscv/cpu_bits.h | 6 -- target/riscv/csr.c

[PULL v2 18/42] target/riscv: Fixup saturate subtract function

2021-05-05 Thread Alistair Francis
From: LIU Zhiwei The overflow predication ((a - b) ^ a) & (a ^ b) & INT64_MIN is right. However, when the predication is ture and a is 0, it should return maximum. Signed-off-by: LIU Zhiwei Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis Message-id:

[PULL v2 41/42] target/riscv: Consolidate RV32/64 16-bit instructions

2021-05-05 Thread Alistair Francis
This patch removes the insn16-32.decode and insn16-64.decode decode files and consolidates the instructions into the general RISC-V insn16.decode decode tree. This means that all of the instructions are avaliable in both the 32-bit and 64-bit builds. This also means that we run a check to ensure

[PULL v2 33/42] target/riscv: Remove the hardcoded RVXLEN macro

2021-05-05 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Richard Henderson Reviewed-by: Bin Meng Message-id: a07bc0c6dc4958681b4f93cbc5d0acc31ed3344a.1619234854.git.alistair.fran...@wdc.com --- target/riscv/cpu.h | 6 -- target/riscv/cpu.c | 6 +- 2 files changed, 5 insertions(+), 7 deletions(-)

[PULL v2 15/42] hw/opentitan: Update the interrupt layout

2021-05-05 Thread Alistair Francis
Update the OpenTitan interrupt layout to match the latest OpenTitan bitstreams. This involves changing the Ibex PLIC memory layout and the UART interrupts. Signed-off-by: Alistair Francis Reviewed-by: Bin Meng Message-id:

[PULL v2 40/42] target/riscv: Consolidate RV32/64 32-bit instructions

2021-05-05 Thread Alistair Francis
This patch removes the insn32-64.decode decode file and consolidates the instructions into the general RISC-V insn32.decode decode tree. This means that all of the instructions are avaliable in both the 32-bit and 64-bit builds. This also means that we run a check to ensure we are running a

[PULL v2 30/42] hw/riscv: Fix OT IBEX reset vector

2021-05-05 Thread Alistair Francis
From: Alexander Wagner The IBEX documentation [1] specifies the reset vector to be "the most significant 3 bytes of the boot address and the reset value (0x80) as the least significant byte". [1] https://github.com/lowRISC/ibex/blob/master/doc/03_reference/exception_interrupts.rst

[PULL v2 13/42] target/riscv: Use RISCVException enum for CSR access

2021-05-05 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Richard Henderson Reviewed-by: Bin Meng Message-id: 302b208f40373557fa11b351b5c9f43039ca8ea3.1617290165.git.alistair.fran...@wdc.com --- target/riscv/cpu.h | 11 +++ target/riscv/csr.c | 37 ++---

[PULL v2 29/42] target/riscv: fix exception index on instruction access fault

2021-05-05 Thread Alistair Francis
From: Emmanuel Blot When no MMU is used and the guest code attempts to fetch an instruction from an invalid memory location, the exception index defaults to a data load access fault, rather an instruction access fault. Signed-off-by: Emmanuel Blot Reviewed-by: Alistair Francis Message-id:

[PULL v2 37/42] target/riscv: Remove the hardcoded SATP_MODE macro

2021-05-05 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Richard Henderson Message-id: 6b701769d6621f45ba1739334198e36a64fe04df.1619234854.git.alistair.fran...@wdc.com --- target/riscv/cpu_bits.h | 11 --- target/riscv/cpu_helper.c | 32 target/riscv/csr.c

[PULL v2 31/42] fpu/softfloat: set invalid excp flag for RISC-V muladd instructions

2021-05-05 Thread Alistair Francis
From: Frank Chang In IEEE 754-2008 spec: Invalid operation exception is signaled when doing: fusedMultiplyAdd(0, Inf, c) or fusedMultiplyAdd(Inf, 0, c) unless c is a quiet NaN; if c is a quiet NaN then it is implementation defined whether the invalid operation exception is signaled.

[PULL v2 25/42] target/riscv: Add a config option for ePMP

2021-05-05 Thread Alistair Francis
From: Hou Weiying Add a config option to enable experimental support for ePMP. This is disabled by default and can be enabled with 'x-epmp=true'. Signed-off-by: Hongzheng-Li Signed-off-by: Hou Weiying Signed-off-by: Myriad-Dreamin Signed-off-by: Alistair Francis Reviewed-by: Bin Meng

[PULL v2 12/42] target/riscv: Use the RISCVException enum for CSR operations

2021-05-05 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Richard Henderson Reviewed-by: Bin Meng Message-id: 8566c4c271723f27f3ae8fc2429f906a459f17ce.1617290165.git.alistair.fran...@wdc.com --- target/riscv/cpu.h | 14 +- target/riscv/csr.c | 629 +++-- 2 files

[PULL v2 10/42] target/riscv: Use the RISCVException enum for CSR predicates

2021-05-05 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Richard Henderson Reviewed-by: Bin Meng Message-id: 187261fa671c3a77cf5aa482adb2a558c02a7cad.1617290165.git.alistair.fran...@wdc.com --- target/riscv/cpu.h | 3 +- target/riscv/csr.c | 80 +- 2 files

[PULL v2 24/42] target/riscv: Implementation of enhanced PMP (ePMP)

2021-05-05 Thread Alistair Francis
From: Hou Weiying This commit adds support for ePMP v0.9.1. The ePMP spec can be found in: https://docs.google.com/document/d/1Mh_aiHYxemL0umN3GTTw8vsbmzHZ_nxZXgjgOUzbvc8 Signed-off-by: Hongzheng-Li Signed-off-by: Hou Weiying Signed-off-by: Myriad-Dreamin Signed-off-by: Alistair Francis

[PULL v2 22/42] target/riscv: Add the ePMP feature

2021-05-05 Thread Alistair Francis
The spec is avaliable at: https://docs.google.com/document/d/1Mh_aiHYxemL0umN3GTTw8vsbmzHZ_nxZXgjgOUzbvc8 Signed-off-by: Alistair Francis Reviewed-by: Bin Meng Message-id: 28c8855c80b0388a08c3ae009f5467e2b3960ce0.1618812899.git.alistair.fran...@wdc.com --- target/riscv/cpu.h | 1 + 1 file

[PULL v2 42/42] target/riscv: Fix the RV64H decode comment

2021-05-05 Thread Alistair Francis
BugLink: https://gitlab.com/qemu-project/qemu/-/issues/47 Signed-off-by: Alistair Francis Reviewed-by: Richard Henderson Message-id: 024ce841221c1d15c74b253512428c4baca7e4ba.1619234854.git.alistair.fran...@wdc.com --- target/riscv/insn32.decode | 2 +- 1 file changed, 1 insertion(+), 1

[PULL v2 23/42] target/riscv: Add ePMP CSR access functions

2021-05-05 Thread Alistair Francis
From: Hou Weiying Signed-off-by: Hongzheng-Li Signed-off-by: Hou Weiying Signed-off-by: Myriad-Dreamin Signed-off-by: Alistair Francis Reviewed-by: Bin Meng Message-id: 270762cb2507fba6a9eeb99a774cf49f7da9cc32.1618812899.git.alistair.fran...@wdc.com [ Changes by AF: - Rebase on master -

[PULL v2 21/42] target/riscv: Define ePMP mseccfg

2021-05-05 Thread Alistair Francis
From: Hou Weiying Use address 0x390 and 0x391 for the ePMP CSRs. Signed-off-by: Hongzheng-Li Signed-off-by: Hou Weiying Signed-off-by: Myriad-Dreamin Reviewed-by: Alistair Francis Signed-off-by: Alistair Francis Reviewed-by: Bin Meng Message-id:

[PULL v2 09/42] target/riscv: Convert the RISC-V exceptions to an enum

2021-05-05 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Bin Meng Reviewed-by: Richard Henderson Message-id: f191dcf08bf413a822e743a7c7f824d68879a527.1617290165.git.alistair.fran...@wdc.com --- target/riscv/cpu_bits.h | 44 --- target/riscv/cpu.c| 2 +-

[PULL v2 38/42] target/riscv: Remove the unused HSTATUS_WPRI macro

2021-05-05 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Richard Henderson Reviewed-by: Bin Meng Message-id: e095b57af0d419c8ed822958f04dfc732d7beb7e.1619234854.git.alistair.fran...@wdc.com --- target/riscv/cpu_bits.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/target/riscv/cpu_bits.h

[PULL v2 19/42] docs: Add documentation for shakti_c machine

2021-05-05 Thread Alistair Francis
From: Vijai Kumar K Add documentation for Shakti C reference platform. Signed-off-by: Vijai Kumar K Reviewed-by: Alistair Francis Message-id: 20210412174248.8668-1-vi...@behindbytes.com Signed-off-by: Bin Meng [ Changes from Bin Meng: - Add missing TOC Message-id:

[PULL v2 20/42] target/riscv: Fix the PMP is locked check when using TOR

2021-05-05 Thread Alistair Francis
The RISC-V spec says: if PMP entry i is locked and pmpicfg.A is set to TOR, writes to pmpaddri-1 are ignored. The current QEMU code ignores accesses to pmpaddri-1 and pmpcfgi-1 which is incorrect. Update the pmp_is_locked() function to not check the supporting fields and instead enforce

[PULL v2 08/42] hw/riscv: Connect Shakti UART to Shakti platform

2021-05-05 Thread Alistair Francis
From: Vijai Kumar K Connect one shakti uart to the shakti_c machine. Signed-off-by: Vijai Kumar K Reviewed-by: Alistair Francis Message-id: 20210401181457.73039-5-vi...@behindbytes.com Signed-off-by: Alistair Francis --- include/hw/riscv/shakti_c.h | 2 ++ hw/riscv/shakti_c.c | 8

[PULL v2 36/42] target/riscv: Remove the hardcoded MSTATUS_SD macro

2021-05-05 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Richard Henderson Message-id: fcc125d96da941b56c817c9dd6068dc36478fc53.1619234854.git.alistair.fran...@wdc.com --- target/riscv/cpu_bits.h | 10 -- target/riscv/csr.c | 12 ++-- target/riscv/translate.c | 19

[PULL v2 17/42] riscv: don't look at SUM when accessing memory from a debugger context

2021-05-05 Thread Alistair Francis
From: Jade Fink Previously the qemu monitor and gdbstub looked at SUM and refused to perform accesses to user memory if it is off, which was an impediment to debugging. Signed-off-by: Jade Fink Reviewed-by: Alistair Francis Message-id: 20210406113109.1031033-1-q...@jade.fyi Signed-off-by:

[PULL v2 16/42] hw/riscv: Enable VIRTIO_VGA for RISC-V virt machine

2021-05-05 Thread Alistair Francis
imply VIRTIO_VGA for the virt machine, this fixes the following error when specifying `-vga virtio` as a command line argument: qemu-system-riscv64: Virtio VGA not available Signed-off-by: Alistair Francis Reviewed-by: Bin Meng Message-id:

[PULL v2 06/42] riscv: Add initial support for Shakti C machine

2021-05-05 Thread Alistair Francis
From: Vijai Kumar K Add support for emulating Shakti reference platform based on C-class running on arty-100T board. https://gitlab.com/shaktiproject/cores/shakti-soc/-/blob/master/README.rst Signed-off-by: Vijai Kumar K Reviewed-by: Alistair Francis Message-id:

[PULL v2 07/42] hw/char: Add Shakti UART emulation

2021-05-05 Thread Alistair Francis
From: Vijai Kumar K This is the initial implementation of Shakti UART. Signed-off-by: Vijai Kumar K Reviewed-by: Alistair Francis Message-id: 20210401181457.73039-4-vi...@behindbytes.com Signed-off-by: Alistair Francis --- include/hw/char/shakti_uart.h | 74 ++

[PULL v2 14/42] MAINTAINERS: Update the RISC-V CPU Maintainers

2021-05-05 Thread Alistair Francis
Update the RISC-V maintainers by removing Sagar and Bastian who haven't been involved recently. Also add Bin who has been helping with reviews. Signed-off-by: Alistair Francis Acked-by: Bin Meng Acked-by: Bastian Koppelmann Reviewed-by: Philippe Mathieu-Daudé Message-id:

[PULL v2 04/42] hw/riscv: sifive_e: Add 'const' to sifive_e_memmap[]

2021-05-05 Thread Alistair Francis
From: Bin Meng This was accidentally dropped before. Add it back. Fixes: 732612856a8 ("hw/riscv: Drop 'struct MemmapEntry'") Reported-by: Emmanuel Blot Signed-off-by: Bin Meng Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Message-id:

[PULL v2 27/42] target/riscv: Add ePMP support for the Ibex CPU

2021-05-05 Thread Alistair Francis
The physical Ibex CPU has ePMP support and it's enabled for the OpenTitan machine so let's enable ePMP support for the Ibex CPU in QEMU. Signed-off-by: Alistair Francis Reviewed-by: Bin Meng Message-id: d426baabab0c9361ed2e989dbe416e417a551fd1.1618812899.git.alistair.fran...@wdc.com ---

[PULL v2 11/42] target/riscv: Fix 32-bit HS mode access permissions

2021-05-05 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Richard Henderson Reviewed-by: Bin Meng Message-id: cb1ef2061547dc9028ce3cf4f6622588f9c09149.1617290165.git.alistair.fran...@wdc.com --- target/riscv/csr.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/target/riscv/csr.c

[PULL v2 05/42] target/riscv: Add Shakti C class CPU

2021-05-05 Thread Alistair Francis
From: Vijai Kumar K C-Class is a member of the SHAKTI family of processors from IIT-M. It is an extremely configurable and commercial-grade 5-stage in-order core supporting the standard RV64GCSUN ISA extensions. Signed-off-by: Vijai Kumar K Reviewed-by: Alistair Francis Message-id:

[PULL v2 02/42] docs/system/generic-loader.rst: Fix style

2021-05-05 Thread Alistair Francis
From: Axel Heider Fix style to have a proper description of the parameter 'force-raw'. Signed-off-by: Axel Heider Reviewed-by: Alistair Francis Message-id: a7e50a64-1c7c-2d41-96d3-d8a417a65...@gmx.de Signed-off-by: Alistair Francis --- docs/system/generic-loader.rst | 9 ++--- 1 file

[PULL v2 26/42] target/riscv/pmp: Remove outdated comment

2021-05-05 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Bin Meng Message-id: 10387eec21d2f17c499a78fdba85280cab4dd27f.1618812899.git.alistair.fran...@wdc.com --- target/riscv/pmp.c | 4 1 file changed, 4 deletions(-) diff --git a/target/riscv/pmp.c b/target/riscv/pmp.c index e1f5776316..78203291de

[PULL v2 01/42] target/riscv: Remove privilege v1.9 specific CSR related code

2021-05-05 Thread Alistair Francis
From: Atish Patra Qemu doesn't support RISC-V privilege specification v1.9. Remove the remaining v1.9 specific references from the implementation. Signed-off-by: Atish Patra Reviewed-by: Alistair Francis Message-Id: <20210319194534.2082397-2-atish.pa...@wdc.com> [Changes by AF: - Rebase on

[PULL v2 03/42] target/riscv: Align the data type of reset vector address

2021-05-05 Thread Alistair Francis
From: Dylan Jhong Use target_ulong to instead of uint64_t on reset vector address to adapt on both 32/64 machine. Signed-off-by: Dylan Jhong Signed-off-by: Ruinland ChuanTzu Tsai Reviewed-by: Bin Meng Reviewed-by: Alistair Francis Message-id: 20210329034801.22667-1-dy...@andestech.com

[PULL v2 00/42] riscv-to-apply queue

2021-05-05 Thread Alistair Francis
The following changes since commit d45a5270d075ea589f0b0ddcf963a5fea1f500ac: Merge remote-tracking branch 'remotes/vivier2/tags/trivial-branch-for-6.1-pull-request' into staging (2021-05-05 13:52:00 +0100) are available in the Git repository at: g...@github.com:alistair23/qemu.git

Re: [PULL 00/42] riscv-to-apply queue

2021-05-05 Thread Alistair Francis
On Thu, May 6, 2021 at 5:28 AM Peter Maydell wrote: > > On Mon, 3 May 2021 at 23:13, Alistair Francis > wrote: > > > > The following changes since commit 15106f7dc3290ff3254611f265849a314a93eb0e: > > > > Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-hex-20210502' > > into

Re: [PATCH 07/23] hw/block/nvme: Use definition to avoid dynamic stack allocation

2021-05-05 Thread Eric Blake
On 5/5/21 5:07 PM, Philippe Mathieu-Daudé wrote: > +Eric > > On 5/5/21 11:22 PM, Keith Busch wrote: >> On Wed, May 05, 2021 at 11:10:31PM +0200, Philippe Mathieu-Daudé wrote: >>> The compiler isn't clever enough to figure 'SEG_CHUNK_SIZE' is >>> a constant! Help it by using a definitions instead.

Re: [PATCH] docs/system: riscv: Include shakti_c machine documentation

2021-05-05 Thread Alistair Francis
On Fri, Apr 30, 2021 at 5:08 PM Bin Meng wrote: > > shakti_c machine documentation was missed in the riscv target doc. > > Signed-off-by: Bin Meng In order to not break the doc build I squashed this commit into the original one adding the documentation. Alistair > --- > >

Re: [PATCH] docs/system: riscv: Include shakti_c machine documentation

2021-05-05 Thread Alistair Francis
On Fri, Apr 30, 2021 at 5:08 PM Bin Meng wrote: > > shakti_c machine documentation was missed in the riscv target doc. > > Signed-off-by: Bin Meng Reviewed-by: Alistair Francis Alistair > --- > > docs/system/target-riscv.rst | 1 + > 1 file changed, 1 insertion(+) > > diff --git

Re: [PATCH 07/23] hw/block/nvme: Use definition to avoid dynamic stack allocation

2021-05-05 Thread Philippe Mathieu-Daudé
+Eric On 5/5/21 11:22 PM, Keith Busch wrote: > On Wed, May 05, 2021 at 11:10:31PM +0200, Philippe Mathieu-Daudé wrote: >> The compiler isn't clever enough to figure 'SEG_CHUNK_SIZE' is >> a constant! Help it by using a definitions instead. > > I don't understand. Neither do I TBH... > It's

[PATCH] target/mips: Fix potential integer overflow (CID 1452921)

2021-05-05 Thread Philippe Mathieu-Daudé
Use the BIT_ULL() macro to ensure we use 64-bit arithmetic. This fixes the following Coverity issue (OVERFLOW_BEFORE_WIDEN): CID 1452921: Integer handling issues: Potentially overflowing expression "1 << w" with type "int" (32 bits, signed) is evaluated using 32-bit arithmetic, and

  1   2   3   4   5   6   >