[PATCH v2 27/32] i386: Add sgx_get_info() interface

2021-05-10 Thread Yang Zhong
Add the sgx_get_info() interface for hmp and QMP usage, which will get the SGX info from this API. Signed-off-by: Yang Zhong --- hw/i386/sgx-epc.c | 22 ++ include/hw/i386/pc.h | 1 + include/hw/i386/sgx-epc.h | 1 + monitor/hmp-cmds.c| 20 +

Re: [RFC PATCH 14/15] gitlab-ci: Allow forks to use different set of jobs

2021-05-10 Thread Philippe Mathieu-Daudé
+Stefan/Peter On 4/19/21 12:59 PM, Thomas Huth wrote: > On 19/04/2021 12.51, Daniel P. Berrangé wrote: >> On Mon, Apr 19, 2021 at 12:48:25PM +0200, Thomas Huth wrote: >>> On 19/04/2021 12.36, Daniel P. Berrangé wrote: On Mon, Apr 19, 2021 at 12:20:55PM +0200, Thomas Huth wrote: > On 19/04

[PATCH v2 31/32] sgx-epc: Add the fill_device_info() callback support

2021-05-10 Thread Yang Zhong
Since there is no fill_device_info() callback support, and when we execute "info memory-devices" command in the monitor, the segfault will be found. This patch will add this callback support and "info memory-devices" will show sgx epc memory exposed to guest. The result as below: qemu) info memor

[PATCH v2 25/32] qmp: Add query-sgx command

2021-05-10 Thread Yang Zhong
This QMP query command can be used by some userspaces to retrieve the SGX information when SGX is enabled on Intel platform. Signed-off-by: Yang Zhong v1-->v2: - "Since: 5.1" to "Since: 6.1", and grammar error(Eric Blake). --- monitor/qmp-cmds.c | 6 ++ qapi/misc.json

[PATCH v2 22/32] i440fx: Add support for SGX EPC

2021-05-10 Thread Yang Zhong
From: Sean Christopherson Enable SGX EPC virtualization, which is currently only support by KVM. Signed-off-by: Sean Christopherson Signed-off-by: Yang Zhong --- hw/i386/pc_piix.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 5ac2edbf1f..4

[PATCH v2 29/32] qmp: Add the qmp_query_sgx_capabilities()

2021-05-10 Thread Yang Zhong
Libvirt can use qmp_query_sgx_capabilities() to get the host sgx capabilities. Signed-off-by: Yang Zhong v1-->v2: - Changed the blurb error and "Since: 5.1" to "Since: 6.1"(Eric Blake). --- hw/i386/sgx-epc.c | 66 ++ include/hw/i386/pc.h |

[PATCH v2 21/32] q35: Add support for SGX EPC

2021-05-10 Thread Yang Zhong
From: Sean Christopherson Enable SGX EPC virtualization, which is currently only support by KVM. Signed-off-by: Sean Christopherson Signed-off-by: Yang Zhong --- hw/i386/pc_q35.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 46a0f196f4..217c8

[PATCH v2 28/32] bitops: Support 32 and 64 bit mask macro

2021-05-10 Thread Yang Zhong
The Qemu should enable bit mask macro like Linux did in the kernel, the GENMASK(h, l) and GENMASK_ULL(h, l) will set the bit to 1 from l to h bit in the 32 bit or 64 bit long type. Signed-off-by: Yang Zhong --- include/qemu/bitops.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/incl

[PATCH v2 30/32] Kconfig: Add CONFIG_SGX support

2021-05-10 Thread Yang Zhong
Add new CONFIG_SGX for sgx support in the Qemu, and the Kconfig default enable sgx in the i386 platform. Signed-off-by: Yang Zhong --- backends/meson.build | 2 +- default-configs/devices/i386-softmmu.mak | 1 + hw/i386/Kconfig | 5 + hw/i386/m

[PATCH v2 17/32] hw/i386/fw_cfg: Set SGX bits in feature control fw_cfg accordingly

2021-05-10 Thread Yang Zhong
From: Sean Christopherson Request SGX an SGX Launch Control to be enabled in FEATURE_CONTROL when the features are exposed to the guest. Our design is the SGX Launch Control bit will be unconditionally set in FEATURE_CONTROL, which is unlike host bios. Signed-off-by: Sean Christopherson Signed-

[PATCH v2 23/32] hostmem: Add the reset interface for EPC backend reset

2021-05-10 Thread Yang Zhong
Add the sgx_memory_backend_reset() interface to handle EPC backend reset when VM is reset. This reset function will destroy previous backend memory region and re-mmap the EPC section for guest. Signed-off-by: Yang Zhong --- backends/hostmem-epc.c | 16 include/hw/i386/pc.h |

[PATCH v2 19/32] i386/pc: Add e820 entry for SGX EPC section(s)

2021-05-10 Thread Yang Zhong
From: Sean Christopherson Note that SGX EPC is currently guaranteed to reside in a single contiguous chunk of memory regardless of the number of EPC sections. Signed-off-by: Sean Christopherson Signed-off-by: Yang Zhong --- hw/i386/pc.c | 4 1 file changed, 4 insertions(+) diff --git a/

[PATCH v2 12/32] i386: Update SGX CPUID info according to hardware/KVM/user input

2021-05-10 Thread Yang Zhong
From: Sean Christopherson Expose SGX to the guest if and only if KVM is enabled and supports virtualization of SGX. While the majority of ENCLS can be emulated to some degree, because SGX uses a hardware-based root of trust, the attestation aspects of SGX cannot be emulated in software, i.e. ult

[PATCH v2 24/32] sgx-epc: Add the reset interface for sgx-epc virt device

2021-05-10 Thread Yang Zhong
If the VM is reset, we need make sure sgx virt epc in clean status. Once the VM is reset, and sgx epc virt device will be reseted by reset callback registered by qemu_register_reset(). Since this epc virt device depend on backend, this reset will call backend reset interface to re-mmap epc to guest

[PATCH v2 18/32] hw/i386/pc: Account for SGX EPC sections when calculating device memory

2021-05-10 Thread Yang Zhong
From: Sean Christopherson Add helpers to detect if SGX EPC exists above 4g, and if so, where SGX EPC above 4g ends. Use the helpers to adjust the device memory range if SGX EPC exists above 4g. For multiple virtual EPC sections, we just put them together physically contiguous for the simplicity

[PATCH v2 32/32] doc: Add the SGX doc

2021-05-10 Thread Yang Zhong
From: Sean Christopherson Signed-off-by: Sean Christopherson Signed-off-by: Yang Zhong --- docs/intel-sgx.txt | 173 + 1 file changed, 173 insertions(+) create mode 100644 docs/intel-sgx.txt diff --git a/docs/intel-sgx.txt b/docs/intel-sgx.txt new

[PATCH v2 10/32] i386: Add get/set/migrate support for SGX_LEPUBKEYHASH MSRs

2021-05-10 Thread Yang Zhong
From: Sean Christopherson On real hardware, on systems that supports SGX Launch Control, those MSRs are initialized to digest of Intel's signing key; on systems that don't support SGX Launch Control, those MSRs are not available but hardware always uses digest of Intel's signing key in EINIT. KV

[PATCH v2 20/32] i386: acpi: Add SGX EPC entry to ACPI tables

2021-05-10 Thread Yang Zhong
From: Sean Christopherson The ACPI Device entry for SGX EPC is essentially a hack whose primary purpose is to provide software with a way to autoprobe SGX support, e.g. to allow software to implement SGX support as a driver. Details on the individual EPC sections are not enumerated through ACPI

[PATCH v2 26/32] hmp: Add 'info sgx' command

2021-05-10 Thread Yang Zhong
The command can be used to show the SGX information in the monitor when SGX is enabled on intel platform. Signed-off-by: Yang Zhong --- hmp-commands-info.hx | 15 +++ include/monitor/hmp.h | 1 + monitor/hmp-cmds.c| 6 ++ 3 files changed, 22 insertions(+) diff --git a/hmp

[PATCH v2 07/32] i386: Add SGX CPUID leaf FEAT_SGX_12_0_EAX

2021-05-10 Thread Yang Zhong
From: Sean Christopherson CPUID leaf 12_0_EAX is an Intel-defined feature bits leaf enumerating the CPU's SGX capabilities, e.g. supported SGX instruction sets. Currently there are four enumerated capabilities: - SGX1 instruction set, i.e. "base" SGX - SGX2 instruction set for dynamic EPC ma

[PATCH v2 16/32] Adjust min CPUID level to 0x12 when SGX is enabled

2021-05-10 Thread Yang Zhong
From: Sean Christopherson SGX capabilities are enumerated through CPUID_0x12. Signed-off-by: Sean Christopherson Signed-off-by: Yang Zhong --- target/i386/cpu.c | 5 + 1 file changed, 5 insertions(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 63253bf606..41050960c5 100644 -

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

2021-05-10 Thread Yang Zhong
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 Signed-off-by: Yang Zhong v1-->v2: - Changed the KVM_CAP_SGX_ATTRIBUTE f

[PATCH v2 15/32] i386: Propagate SGX CPUID sub-leafs to KVM

2021-05-10 Thread Yang Zhong
From: Sean Christopherson The SGX sub-leafs are enumerated at CPUID 0x12. Indices 0 and 1 are always present when SGX is supported, and enumerate SGX features and capabilities. Indices >=2 are directly correlated with the platform's EPC sections. Because the number of EPC sections is dynamic a

[PATCH v2 09/32] i386: Add SGX CPUID leaf FEAT_SGX_12_1_EAX

2021-05-10 Thread Yang Zhong
From: Sean Christopherson CPUID leaf 12_1_EAX is an Intel-defined feature bits leaf enumerating the platform's SGX capabilities that may be utilized by an enclave, e.g. whether or not an enclave can gain access to the provision key. Currently there are six capabilities: - INIT: set when the en

[PATCH v2 03/32] qom: Add memory-backend-epc ObjectOptions support

2021-05-10 Thread Yang Zhong
Add the new 'memory-backend-epc' user creatable QOM object in the ObjectOptions to support SGX since v6.1, or the sgx backend object cannot bootup. Signed-off-by: Yang Zhong v1-->v2: - Added the new MemoryBackendEpcProperties and related documents, and updated the blurb(Eric Blake). ---

[PATCH v2 08/32] i386: Add SGX CPUID leaf FEAT_SGX_12_0_EBX

2021-05-10 Thread Yang Zhong
From: Sean Christopherson CPUID leaf 12_0_EBX is an Intel-defined feature bits leaf enumerating the platform's SGX extended capabilities. Currently there is a single capabilitiy: - EXINFO: record information about #PFs and #GPs in the enclave's SSA Signed-off-by: Sean Christopherson Signed-

[PATCH v2 14/32] i386: kvm: Add support for exposing PROVISIONKEY to guest

2021-05-10 Thread Yang Zhong
From: Sean Christopherson If the guest want to fully use SGX, the guest needs to be able to access provisioning key. Add a new KVM_CAP_SGX_ATTRIBUTE to KVM to support provisioning key to KVM guests. Signed-off-by: Sean Christopherson Signed-off-by: Yang Zhong --- target/i386/cpu.c |

[PATCH v2 04/32] i386: Add 'sgx-epc' device to expose EPC sections to guest

2021-05-10 Thread Yang Zhong
From: Sean Christopherson SGX EPC is enumerated through CPUID, i.e. EPC "devices" need to be realized prior to realizing the vCPUs themselves, which occurs long before generic devices are parsed and realized. Because of this, do not allow 'sgx-epc' devices to be instantiated after vCPUS have bee

[PATCH v2 00/32] Qemu SGX virtualization

2021-05-10 Thread Yang Zhong
Since Sean Christopherson has left Intel and i am responsible for Qemu SGX upstream work. His @intel.com address will be bouncing and his new email( sea...@google.com) is also in CC lists. This series is Qemu SGX virtualization implementation rebased on latest Qemu release. You can find Qemu repo

[PATCH v2 05/32] vl: Add "sgx-epc" option to expose SGX EPC sections to guest

2021-05-10 Thread Yang Zhong
From: Sean Christopherson Because SGX EPC is enumerated through CPUID, EPC "devices" need to be realized prior to realizing the vCPUs themselves, i.e. long before generic devices are parsed and realized. From a virtualization perspective, the CPUID aspect also means that EPC sections cannot be h

[PATCH v2 11/32] i386: Add feature control MSR dependency when SGX is enabled

2021-05-10 Thread Yang Zhong
From: Sean Christopherson SGX adds multiple flags to FEATURE_CONTROL to enable SGX and Flexible Launch Control. Signed-off-by: Sean Christopherson Signed-off-by: Yang Zhong --- target/i386/kvm/kvm.c | 5 + 1 file changed, 5 insertions(+) diff --git a/target/i386/kvm/kvm.c b/target/i386/k

[PATCH v2 06/32] i386: Add primary SGX CPUID and MSR defines

2021-05-10 Thread Yang Zhong
From: Sean Christopherson Add CPUID defines for SGX and SGX Launch Control (LC), as well as defines for their associated FEATURE_CONTROL MSR bits. Define the Launch Enclave Public Key Hash MSRs (LE Hash MSRs), which exist when SGX LC is present (in CPUID), and are writable when SGX LC is enabled

[PATCH v2 02/32] hostmem: Add hostmem-epc as a backend for SGX EPC

2021-05-10 Thread Yang Zhong
From: Sean Christopherson EPC (Enclave Page Cahe) is a specialized type of memory used by Intel SGX (Software Guard Extensions). The SDM desribes EPC as: The Enclave Page Cache (EPC) is the secure storage used to store enclave pages when they are a part of an executing enclave. For an

[PATCH v2 01/32] memory: Add RAM_PROTECTED flag to skip IOMMU mappings

2021-05-10 Thread Yang Zhong
From: Sean Christopherson Add a new RAMBlock flag to denote "protected" memory, i.e. memory that looks and acts like RAM but is inaccessible via normal mechanisms, including DMA. Use the flag to skip protected memory regions when mapping RAM for DMA in VFIO. Signed-off-by: Sean Christopherson

[PATCH v2] block: Improve backing file validation

2021-05-10 Thread Li Zhijian
Image below user cases: case 1: ``` $ qemu-img create -f raw source.raw 1G $ qemu-img create -f qcow2 -F raw -b source.raw ./source.raw qemu-img info source.raw image: source.raw file format: qcow2 virtual size: 193K (197120 bytes) disk size: 196K cluster_size: 65536 backing file: source.raw <<

[Bug 1862986] Re: qemu-s390x segfaults

2021-05-10 Thread Marco
Fixed in qemu-s390x version 5.2.0 (Debian 1:5.2+dfsg-10) ** Changed in: qemu Status: Incomplete => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1862986 Title: qemu-s390x segf

Re: [PULL 0/9] scripts/simplebench patches

2021-05-10 Thread Vladimir Sementsov-Ogievskiy
Hi! Kindly ping, or what's wrong with it? 04.05.2021 12:01, Vladimir Sementsov-Ogievskiy wrote: The following changes since commit 53c5433e84e8935abed8e91d4a2eb813168a0ecf: Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20210501' into staging (2021-05-02 12:02:46 +0100) ar

[Bug 1805913] Re: readdir() returns NULL (errno=EOVERFLOW) for 32-bit user-static qemu on 64-bit host

2021-05-10 Thread Thomas Huth
This is an automated cleanup. This bug report has been moved to QEMU's new bug tracker on gitlab.com and thus gets marked as 'expired' now. Please continue with the discussion here: https://gitlab.com/qemu-project/qemu/-/issues/263 ** Changed in: qemu Status: Confirmed => Expired ** Bug

[Bug 1824344] Re: x86: retf or iret pagefault sets wrong error code

2021-05-10 Thread Thomas Huth
This is an automated cleanup. This bug report has been moved to QEMU's new bug tracker on gitlab.com and thus gets marked as 'expired' now. Please continue with the discussion here: https://gitlab.com/qemu-project/qemu/-/issues/265 ** Changed in: qemu Status: New => Expired ** Bug watch

[Bug 1843795] Re: 'mtfsf' instruction can clear FI incorrectly

2021-05-10 Thread Thomas Huth
This is an automated cleanup. This bug report has been moved to QEMU's new bug tracker on gitlab.com and thus gets marked as 'expired' now. Please continue with the discussion here: https://gitlab.com/qemu-project/qemu/-/issues/266 ** Changed in: qemu Status: New => Expired ** Bug watch

[Bug 1883083] Re: QEMU: block/vvfat driver issues

2021-05-10 Thread Thomas Huth
This ticket has been transferred to QEMU's new bug tracker here: https://gitlab.com/qemu-project/qemu/-/issues/272 ... thus closing the issue on Launchpad now. ** Bug watch added: gitlab.com/qemu-project/qemu/-/issues #272 https://gitlab.com/qemu-project/qemu/-/issues/272 ** Changed in: qemu

[Bug 1847467] Re: qemu-x86_64 segment prefixes error

2021-05-10 Thread Thomas Huth
This is an automated cleanup. This bug report has been moved to QEMU's new bug tracker on gitlab.com and thus gets marked as 'expired' now. Please continue with the discussion here: https://gitlab.com/qemu-project/qemu/-/issues/267 ** Changed in: qemu Status: Confirmed => Expired ** Bug

[Bug 1874264] Re: AIX 7.2 TL4 SP1 cannot IPL with QEMU >2.11.2 ppc64-softmmu

2021-05-10 Thread Thomas Huth
This is an automated cleanup. This bug report has been moved to QEMU's new bug tracker on gitlab.com and thus gets marked as 'expired' now. Please continue with the discussion here: https://gitlab.com/qemu-project/qemu/-/issues/269 ** Changed in: qemu Status: Confirmed => Expired ** Bug

[Bug 1859384] Re: arm gic: gic_acknowledge_irq doesn't clear line level for other cores for 1-n level-sensitive interrupts and gic_clear_pending uses GIC_DIST_TEST_MODEL (even on v2 where it always re

2021-05-10 Thread Thomas Huth
This is an automated cleanup. This bug report has been moved to QEMU's new bug tracker on gitlab.com and thus gets marked as 'expired' now. Please continue with the discussion here: https://gitlab.com/qemu-project/qemu/-/issues/268 ** Changed in: qemu Status: Confirmed => Expired ** Bug

[Bug 1681439] Re: dma_blk_cb leaks memory map handles on misaligned IO

2021-05-10 Thread Thomas Huth
This is an automated cleanup. This bug report has been moved to QEMU's new bug tracker on gitlab.com and thus gets marked as 'expired' now. Please continue with the discussion here: https://gitlab.com/qemu-project/qemu/-/issues/259 ** Tags added: fuzzer ** Changed in: qemu Status: Confi

[Bug 1806196] Re: qed leaked clusters

2021-05-10 Thread Thomas Huth
This is an automated cleanup. This bug report has been moved to QEMU's new bug tracker on gitlab.com and thus gets marked as 'expired' now. Please continue with the discussion here: https://gitlab.com/qemu-project/qemu/-/issues/264 ** Changed in: qemu Status: New => Expired ** Bug watch

[Bug 1699824] Re: qemu-system-sparc64 -M sun4v aborts on tribblix-sparc-0m16.iso

2021-05-10 Thread Thomas Huth
This is an automated cleanup. This bug report has been moved to QEMU's new bug tracker on gitlab.com and thus gets marked as 'expired' now. Please continue with the discussion here: https://gitlab.com/qemu-project/qemu/-/issues/260 ** Changed in: qemu Status: Confirmed => Expired ** Bug

[Bug 1877015] Re: virtio only support packed ring size power of 2

2021-05-10 Thread Thomas Huth
This is an automated cleanup. This bug report has been moved to QEMU's new bug tracker on gitlab.com and thus gets marked as 'expired' now. Please continue with the discussion here: https://gitlab.com/qemu-project/qemu/-/issues/270 ** Changed in: qemu Status: New => Expired ** Bug watch

[Bug 1882123] Re: ARM cpu emulation regression on QEMU 4.2.0

2021-05-10 Thread Thomas Huth
This is an automated cleanup. This bug report has been moved to QEMU's new bug tracker on gitlab.com and thus gets marked as 'expired' now. Please continue with the discussion here: https://gitlab.com/qemu-project/qemu/-/issues/271 ** Changed in: qemu Status: Confirmed => Expired ** Bug

[Bug 1791763] Re: broken signal handling in nios2 user-mode emulation

2021-05-10 Thread Thomas Huth
This is an automated cleanup. This bug report has been moved to QEMU's new bug tracker on gitlab.com and thus gets marked as 'expired' now. Please continue with the discussion here: https://gitlab.com/qemu-project/qemu/-/issues/261 ** Changed in: qemu Status: Confirmed => Expired ** Bug

[Bug 1883729] Re: xhci_find_stream: Assertion `streamid != 0' failed.

2021-05-10 Thread Thomas Huth
** Tags added: usb -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1883729 Title: xhci_find_stream: Assertion `streamid != 0' failed. Status in QEMU: New Bug description: To reproduce run the Q

[Bug 1799792] Re: Broken scaling with gtk,gl=on on a hidpi display

2021-05-10 Thread Thomas Huth
This is an automated cleanup. This bug report has been moved to QEMU's new bug tracker on gitlab.com and thus gets marked as 'expired' now. Please continue with the discussion here: https://gitlab.com/qemu-project/qemu/-/issues/262 ** Changed in: qemu Status: New => Expired ** Bug watch

Re: [PATCH] cutils: fix memory leak in get_relocated_path()

2021-05-10 Thread Markus Armbruster
Stefano Garzarella writes: > Ping :-) > > Should I resend for 6.1? I'm cc'ing qemu-trivial. For good measure: Reviewed-by: Markus Armbruster

[Bug 1883733] Re: FIXME xhci_alloc_device_streams:972 guest streams config not identical for all eps

2021-05-10 Thread Thomas Huth
** Tags added: fuzzer -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1883733 Title: FIXME xhci_alloc_device_streams:972 guest streams config not identical for all eps Status in QEMU: New Bug d

[Bug 1860914] Re: QEMU prepends pathnames to command lines of Multiboot kernels and modules, contrary to the specification

2021-05-10 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 the bug state to "Incomplete" now. If the bug has already been fixed in the latest upstream version of QEMU, then plea

[Bug 1862986] Re: qemu-s390x segfaults

2021-05-10 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 the bug state to "Incomplete" now. If the bug has already been fixed in the latest upstream version of QEMU, then plea

[Bug 1869006] Re: PCIe cards passthrough to TCG guest works on 2GB of guest memory but fails on 4GB (vfio_dma_map invalid arg)

2021-05-10 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 the bug state to "Incomplete" now. If the bug has already been fixed in the latest upstream version of QEMU, then plea

[Bug 1862874] Re: java may stuck for a long time in system mode with "-cpu max"

2021-05-10 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 the bug state to "Incomplete" now. If the bug has already been fixed in the latest upstream version of QEMU, then plea

[Bug 1873769] Re: SB16 audio playback freezes emulation in Windows 95 guest

2021-05-10 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 the bug state to "Incomplete" now. If the bug has already been fixed in the latest upstream version of QEMU, then plea

[Bug 1870331] Re: default nic device created even though supplied by configfile

2021-05-10 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 the bug state to "Incomplete" now. If the bug has already been fixed in the latest upstream version of QEMU, then plea

[Bug 1705118] Re: qemu user mode: rt signals not implemented for sparc guests

2021-05-10 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 the bug state to "Incomplete" now. If the bug has already been fixed in the latest upstream version of QEMU, then plea

[Bug 1785734] Re: movdqu partial write at page boundary

2021-05-10 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 the bug state to "Incomplete" now. If the bug has already been fixed in the latest upstream version of QEMU, then plea

[Bug 1779955] Re: qemu linux-user requires read permissions on memory passed to syscalls that should only need write access

2021-05-10 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 the bug state to "Incomplete" now. If the bug has already been fixed in the latest upstream version of QEMU, then plea

[Bug 1819182] Re: info does not recognize file format of vpc with subformat=fixed

2021-05-10 Thread Thomas Huth
** Changed in: qemu Status: Confirmed => In Progress -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1819182 Title: info does not recognize file format of vpc with subformat=fixed Status in Q

[Bug 1878501] Re: qemu-i386 does not define AT_SYSINFO

2021-05-10 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 the bug state to "Incomplete" now. If the bug has already been fixed in the latest upstream version of QEMU, then plea

[Bug 1886210] Re: [Feature request] Illumnos VM image

2021-05-10 Thread Philippe Mathieu-Daudé
This is an automated cleanup. This bug report has been moved to QEMU's new bug tracker on gitlab.com and thus gets marked as 'invalid' now. Please continue with the discussion here: https://gitlab.com/qemu-project/qemu/-/issues/258 ** Changed in: qemu Status: New => Invalid ** Bug watch

[PATCH v2 5/6] hw/ide/via: Connect IDE function output IRQs to the ISA function input

2021-05-10 Thread Philippe Mathieu-Daudé
To avoid abusing isa_get_irq(NULL) using a hidden ISA bridge under the hood, let the IDE function expose 2 output IRQs, and connect them to the ISA function inputs when creating the south bridge chipset model in vt82c686b_southbridge_init. Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/via.c

[PATCH v2 3/6] hw/isa/vt82c686: Let ISA function expose ISA IRQs

2021-05-10 Thread Philippe Mathieu-Daudé
The 2 cascaded 8259 PIC are managed by the PCI function #0 (ISA bridge). Expose the 16 IRQs on this function, so other functions from the same chipset can access them. Signed-off-by: Philippe Mathieu-Daudé --- hw/isa/vt82c686.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-)

[PATCH v2 4/6] hw/ide/via: Replace magic 2 value by ARRAY_SIZE / MAX_IDE_DEVS

2021-05-10 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/via.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/ide/via.c b/hw/ide/via.c index be09912b334..6c667a92130 100644 --- a/hw/ide/via.c +++ b/hw/ide/via.c @@ -90,7 +90,7 @@ static void bmdma_setup_bar(PCIIDEState

[PATCH v2 6/6] hw/southbridge/vt82c686: Introduce VT82C686B_SOUTHBRIDGE

2021-05-10 Thread Philippe Mathieu-Daudé
The VT82C686B south bridge is a single chipset. Model it as a single sysbus device. Move the vt82c686b_southbridge_init as via_southbridge_realize, add the QOM state: ViaSouthBridgeState. This device needs 2 properties to be realized: the PCI bus and its slot number. 2 aliases are exposed: the ISA

[PATCH v2 2/6] hw/isa/vt82c686: Simplify removing unuseful qemu_allocate_irqs() call

2021-05-10 Thread Philippe Mathieu-Daudé
Instead of creating an input IRQ with qemu_allocate_irqs() to pass it as output IRQ of the PIC, with its handler simply dispatching into the "intr" output IRQ, simplify by directly connecting the PIC to the "intr" named output. Fixes: 3dc31cb8490 ("vt82c686: Move creation of ISA devices to the ISA

[PATCH v2 1/6] hw/isa/vt82c686: Name output IRQ as 'intr'

2021-05-10 Thread Philippe Mathieu-Daudé
Named IRQs are easier to understand in the monitor. Name the single output interrupt as 'intr'. Signed-off-by: Philippe Mathieu-Daudé --- hw/isa/vt82c686.c | 2 +- hw/mips/fuloong2e.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c i

[PATCH v2 0/6] hw/southbridge: QOM'ify vt82c686 as VT82C686B_SOUTHBRIDGE

2021-05-10 Thread Philippe Mathieu-Daudé
The motivation behind this series is to remove the isa_get_irq(NULL) call to simplify the ISA generic model. Since v1: - rebased on top of remotes/dg-gitlab/tags/ppc-for-6.1-20210504 Philippe Mathieu-Daudé (6): hw/isa/vt82c686: Name output IRQ as 'intr' hw/isa/vt82c686: Simplify removing unus

[PATCH v2 3/4] hw/isa/i82378: Rename output IRQ variable

2021-05-10 Thread Philippe Mathieu-Daudé
The i82378 has 2 output IRQs: "INT" and "NMI". We do not model the NMI, so simplify I82378State by removing the unused IRQ. To avoid keeping an array of one element, remove the array and rename the variable. Signed-off-by: Philippe Mathieu-Daudé --- hw/isa/i82378.c | 6 +++--- 1 file changed, 3

[PATCH v2 2/4] hw/isa/i82378: Simplify removing unuseful qemu_allocate_irqs() call

2021-05-10 Thread Philippe Mathieu-Daudé
When the i82378 model was added in commit a04ff940974 ("prep: Add i82378 PCI-to-ISA bridge emulation") the i8259 model was not yet QOM'ified. This happened later in commit 747c70af78f ("i8259: Convert to qdev"). Instead of creating an input IRQ with qemu_allocate_irqs() to pass it as output IRQ of

[PATCH v2 1/4] hw/isa/i82378: Name output IRQ as 'intr'

2021-05-10 Thread Philippe Mathieu-Daudé
Named IRQs are easier to understand in the monitor. Name the single output interrupt as 'intr'. Signed-off-by: Philippe Mathieu-Daudé --- hw/isa/i82378.c | 2 +- hw/ppc/prep.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/isa/i82378.c b/hw/isa/i82378.c index 2a2ff

[PATCH v2 4/4] hw/isa/piix4: Fix leak removing unuseful qemu_allocate_irqs() call

2021-05-10 Thread Philippe Mathieu-Daudé
We locally create an input IRQ with qemu_allocate_irqs() to pass it as output IRQ of the PIC, but its handler simply dispatch into another of our output IRQ ("intr" output). Simplify by directly connecting the PIC output to our "intr" output. This fixes when using QEMU built with --enable-sanitiz

[PATCH v2 0/4] hw/isa: Remove unuseful qemu_allocate_irqs() call

2021-05-10 Thread Philippe Mathieu-Daudé
I started to fix the LeakSanitizer error in piix4_realize(), then looked for similar pattern and found 2 other places. The older is i82378 (historically the first one) which then spread. Since v1: - rebased - removed vt82c686 patches Philippe Mathieu-Daudé (4): hw/isa/i82378: Name output IRQ as

Re: [RFC PATCH 1/5] target/riscv: Add Nuclei CSR and Update interrupt handling

2021-05-10 Thread Alistair Francis
On Tue, May 11, 2021 at 2:01 PM Wang Junqiang wrote: > > > > On 2021/5/11 上午11:43, Alistair Francis wrote: > > On Tue, May 11, 2021 at 1:14 PM Wang Junqiang > > wrote: > >> > >> > >> > >> On 2021/5/10 上午10:17, Alistair Francis wrote: > >>>C isOn Fri, May 7, 2021 at 11:25 PM wangjunqiang > >>

Re: [RFC PATCH 1/5] target/riscv: Add Nuclei CSR and Update interrupt handling

2021-05-10 Thread Wang Junqiang
On 2021/5/11 上午11:43, Alistair Francis wrote: On Tue, May 11, 2021 at 1:14 PM Wang Junqiang wrote: On 2021/5/10 上午10:17, Alistair Francis wrote: C isOn Fri, May 7, 2021 at 11:25 PM wangjunqiang wrote: This patch adds Nuclei CSR support for ECLIC and update the related interrupt han

Re: [PATCH-for-6.0] hw/mem/meson: Fix linking sparse-mem device with fuzzer

2021-05-10 Thread Philippe Mathieu-Daudé
Cc'ing qemu-trivial (patch reviewed). On 4/12/21 1:07 PM, Philippe Mathieu-Daudé wrote: > ping? > > On 4/6/21 4:39 PM, Alexander Bulekov wrote: >> On 210406 1539, Philippe Mathieu-Daudé wrote: >>> sparse-mem.c is added to the 'mem_ss' source set, which itself >>> is conditionally added to softmmu

Re: [RFC PATCH 1/5] target/riscv: Add Nuclei CSR and Update interrupt handling

2021-05-10 Thread Alistair Francis
On Tue, May 11, 2021 at 1:14 PM Wang Junqiang wrote: > > > > On 2021/5/10 上午10:17, Alistair Francis wrote: > > C isOn Fri, May 7, 2021 at 11:25 PM wangjunqiang > > wrote: > >> > >> This patch adds Nuclei CSR support for ECLIC and update the > >> related interrupt handling. > >> > >> https://doc

Re: [PATCH] hw/pci-host: Do not build gpex-acpi.c if GPEX is not selected

2021-05-10 Thread Philippe Mathieu-Daudé
Cc'ing qemu-trivial (patch reviewed). On 4/25/21 8:21 PM, Philippe Mathieu-Daudé wrote: > Since its introduction in commit 5b85eabe68f ("acpi: add > acpi_dsdt_add_gpex") we build gpex-acpi.c if ACPI is selected, > even if the GPEX_HOST device isn't build. Add the missing > Kconfig dependency. > >

Re: [PATCH v2 0/8] hw/block/fdc: Allow Kconfig-selecting ISA bus/SysBus floppy controllers

2021-05-10 Thread Philippe Mathieu-Daudé
Hi John, This series is fully reviewed; can it go via your block tree? On 4/28/21 2:50 PM, Philippe Mathieu-Daudé wrote: > Hi, > > The floppy disc controllers pulls in irrelevant devices (sysbus in > an ISA-only machine, ISA bus + isa devices on a sysbus-only machine). > > This series clean tha

Re: [PATCH v3 0/2] hw: Convert mc146818rtc & etraxfs_timer to 3-phase reset interface

2021-05-10 Thread Philippe Mathieu-Daudé
Hi Laurent, I addressed your comments from v1, and this series is now reviewed. Can it get merged via your qemu-trivial tree? On 5/2/21 6:39 PM, Philippe Mathieu-Daudé wrote: > Remove qemu_register_reset() when a qdev type has a qbus parent, > implementing the 3-phase Resettable interface. > > S

Re: [PATCH] hw/arm/raspi: Remove deprecated raspi2/raspi3 aliases

2021-05-10 Thread Philippe Mathieu-Daudé
Hi Peter, Can this patch go via your qemu-arm tree (it is reviewed)? On 5/3/21 12:57 PM, Philippe Mathieu-Daudé wrote: > Remove the raspi2/raspi3 machine aliases, > deprecated since commit 155e1c82ed0. > > Signed-off-by: Philippe Mathieu-Daudé > --- > docs/system/deprecated.rst | 7 -

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

2021-05-10 Thread Philippe Mathieu-Daudé
On 5/5/21 11:51 PM, Philippe Mathieu-Daudé wrote: > 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" >

Re: [RFC PATCH 2/5] hw/intc: Add Nuclei ECLIC device

2021-05-10 Thread Wang Junqiang
On 2021/5/10 下午1:26, Bin Meng wrote: On Mon, May 10, 2021 at 10:27 AM Bin Meng wrote: On Mon, May 10, 2021 at 10:21 AM Alistair Francis wrote: On Fri, May 7, 2021 at 11:24 PM wangjunqiang wrote: This patch provides an implementation of Nuclei ECLIC Device. Nuclei processor core have b

Re: [RFC PATCH 1/5] target/riscv: Add Nuclei CSR and Update interrupt handling

2021-05-10 Thread Wang Junqiang
On 2021/5/10 上午10:17, Alistair Francis wrote: C isOn Fri, May 7, 2021 at 11:25 PM wangjunqiang wrote: This patch adds Nuclei CSR support for ECLIC and update the related interrupt handling. https://doc.nucleisys.com/nuclei_spec/isa/core_csr.html Hello, Thanks for the patches! This pa

Re: [PATCH v3 1/2] ui/cocoa: capture all keys and combos when mouse is grabbed

2021-05-10 Thread Akihiko Odaki
On 2021/05/05 8:32, gust...@noronha.eti.br wrote:> @@ -344,6 +361,32 @@ - (id)initWithFrame:(NSRect)frameRect kbd = qkbd_state_init(dcl.con); } + +CGEventMask mask = CGEventMaskBit(kCGEventKeyDown) | CGEventMaskBit(kCGEventKeyUp) | CGEventMaskBit(kCGEventFlagsChanged); +

Re: [PATCH 0/7] vhost-user-gpu: fix several security issues

2021-05-10 Thread Li Qiang
Philippe Mathieu-Daudé 于2021年5月11日周二 上午3:25写道: > > On 5/5/21 11:35 AM, Marc-André Lureau wrote: > > Hi > > > > On Wed, May 5, 2021 at 1:28 PM Li Qiang > > wrote: > > > > Marc-André Lureau > > 于2021年5月5日周三 下午5:10写道: > > > > >

Re: [RFC PATCH v2 0/4] Add migration support for VFIO PCI devices in SMMUv3 nested stage mode

2021-05-10 Thread Kunkun Jiang
Hi all, This series has been updated to v3.[1] Any comments and reviews are welcome. Thanks, Kunkun Jiang [1] [RFC PATCH v3 0/4] Add migration support for VFIO PCI devices in SMMUv3 nested mode https://lore.kernel.org/qemu-devel/20210511020816.2905-1-jiangkun...@huawei.com/ On 2021/3/31 18:1

[RFC PATCH v3 1/4] vfio: Introduce helpers to mark dirty pages of a RAM section

2021-05-10 Thread Kunkun Jiang
Extract part of the code from vfio_sync_dirty_bitmap to form a new helper, which allows to mark dirty pages of a RAM section. This helper will be called for nested stage. Signed-off-by: Kunkun Jiang --- hw/vfio/common.c | 22 ++ 1 file changed, 14 insertions(+), 8 deletions(-

[RFC PATCH v3 4/4] hw/arm/smmuv3: Post-load stage 1 configurations to the host

2021-05-10 Thread Kunkun Jiang
In nested mode, we call the set_pasid_table() callback on each STE update to pass the guest stage 1 configuration to the host and apply it at physical level. In the case of live migration, we need to manually call the set_pasid_table() to load the guest stage 1 configurations to the host. If this

[RFC PATCH v3 2/4] vfio: Add vfio_prereg_listener_log_sync in nested stage

2021-05-10 Thread Kunkun Jiang
In nested mode, we set up the stage 2 (gpa->hpa)and stage 1 (giova->gpa) separately by vfio_prereg_listener_region_add() and vfio_listener_region_add(). So when marking dirty pages we just need to pay attention to stage 2 mappings. Legacy vfio_listener_log_sync cannot be used in nested stage. This

[RFC PATCH v3 3/4] vfio: Add vfio_prereg_listener_global_log_start/stop in nested stage

2021-05-10 Thread Kunkun Jiang
In nested mode, we set up the stage 2 and stage 1 separately. In my opinion, vfio_memory_prereg_listener is used for stage 2 and vfio_memory_listener is used for stage 1. So it feels weird to call the global_log_start/stop interface in vfio_memory_listener to switch dirty tracking, although this wo

[RFC PATCH v3 0/4] Add migration support for VFIO PCI devices in SMMUv3 nested mode

2021-05-10 Thread Kunkun Jiang
Hi all, Since the SMMUv3's nested translation stages has been introduced by Eric, we need to pay attention to the migration of VFIO PCI devices in SMMUv3 nested stage mode. At present, it is not yet supported in QEMU. There are two problems in the existing framework. First, the current way to get

Re: [PATCH] block: Improve backing file validation

2021-05-10 Thread lizhij...@fujitsu.com
On 2021/5/10 16:41, Daniel P. Berrangé wrote: > On Mon, May 10, 2021 at 12:30:45PM +0800, Li Zhijian wrote: >> Image below user cases: >> case 1: >> ``` >> $ qemu-img create -f raw source.raw 1G >> $ qemu-img create -f qcow2 -F raw -b source.raw ./source.raw >> qemu-img info source.raw >> image: s

Re: [PATCH v8] introduce vfio-user protocol specification

2021-05-10 Thread John Levon
On Mon, May 10, 2021 at 05:57:37PM +0100, Stefan Hajnoczi wrote: > On Wed, Apr 14, 2021 at 04:41:22AM -0700, Thanos Makatos wrote: > > Elena A: I CCed you in case you want to review the Sorry, we should have included Elena already. > > +VFIO sparse mmap > > + > > + > > ++---

Re: [PATCH 0/3] bsd-user cleanup

2021-05-10 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210510221511.14205-1-...@bsdimp.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210510221511.14205-1-...@bsdimp.com Subject: [PATCH 0/3] bsd-user cleanup === TEST SCRIPT BE

  1   2   3   4   >