Re: [RFC PATCH v5 12/26] vhost: Route guest->host notification through shadow virtqueue

2021-11-01 Thread Jason Wang
在 2021/10/30 上午2:35, Eugenio Pérez 写道: +/** + * Enable or disable shadow virtqueue in a vhost vdpa device. + * + * This function is idempotent, to call it many times with the same value for + * enable_svq will simply return success. + * + * @v Vhost vdpa device + * @enable True to set

Re: [RFC PATCH v5 21/26] vhost: Add vhost_svq_valid_guest_features to shadow vq

2021-11-01 Thread Jason Wang
On Sat, Oct 30, 2021 at 2:44 AM Eugenio Pérez wrote: > > This allows it to test if the guest has aknowledge an invalid transport > feature for SVQ. This will include packed vq layout or event_idx, > where VirtIO device needs help from SVQ. > > There is not needed at this moment, but since SVQ

Re: [RFC PATCH v5 03/26] virtio: Add VIRTIO_F_QUEUE_STATE

2021-11-01 Thread Jason Wang
On Sat, Oct 30, 2021 at 2:36 AM Eugenio Pérez wrote: > > Implementation of RFC of device state capability: > https://lists.oasis-open.org/archives/virtio-comment/202012/msg5.html Considering this still requires time to be done, we need to think of a way to go without this. Thanks > >

Re: [RFC PATCH v5 00/26] vDPA shadow virtqueue

2021-11-01 Thread Jason Wang
在 2021/10/30 上午2:34, Eugenio Pérez 写道: This series enable shadow virtqueue (SVQ) for vhost-vdpa devices. This is intended as a new method of tracking the memory the devices touch during a migration process: Instead of relay on vhost device's dirty logging capability, SVQ intercepts the VQ

Re: [PATCH] vhost: Fix last queue index of devices with no cvq

2021-11-01 Thread Jason Wang
On Mon, Nov 1, 2021 at 4:59 PM Eugenio Perez Martin wrote: > > On Mon, Nov 1, 2021 at 4:34 AM Jason Wang wrote: > > > > On Fri, Oct 29, 2021 at 10:16 PM Eugenio Pérez wrote: > > > > > > The -1 assumes that all devices with no cvq have an spare vq allocated > > > for them, but with no offer of

Re: [PATCH v8 28/29] accel/tcg/user-exec: Implement CPU-specific signal handler for loongarch64 hosts

2021-11-01 Thread WANG Xuerui
Hi, On 2021/11/1 19:21, gaosong wrote: > Hi Xuerui, > > On 2021/11/1 下午6:45, WANG Xuerui wrote: >> While I can see this patch and the next one are clearly from me, my >> author info is lost as I didn't spot any "From:" line in the mail body? >> Also I don't remember seeing "Base-on" tags in QEMU

Re: [PATCH 02/13] target/riscv: Extend pc for runtime pc write

2021-11-01 Thread LIU Zhiwei
On 2021/11/1 下午6:33, Richard Henderson wrote: On 11/1/21 6:01 AM, LIU Zhiwei wrote: In some cases, we must restore the guest PC to the address of the start of the TB, such as when the instruction counter hit zero. So extend pc register according to current xlen for these cases.

Re: [PATCH v2 0/5] pci/iommu: Fail early if vfio-pci detected before vIOMMU

2021-11-01 Thread Peter Xu
On Thu, Oct 28, 2021 at 12:31:24PM +0800, Peter Xu wrote: > Note that patch 1-4 are cleanups for pci subsystem, and patch 5 is a fix to > fail early for mis-ordered qemu cmdline on vfio and vIOMMU. Logically they > should be posted separately and they're not directly related, however to make > it

[PATCH v5 09/10] target/ppc: PMU Event-Based exception support

2021-11-01 Thread Daniel Henrique Barboza
From: Gustavo Romero Following up the rfebb implementation, this patch adds the EBB exception support that are triggered by Performance Monitor alerts. This exception occurs when an enabled PMU condition or event happens and both MMCR0_EBE and BESCR_PME are set. The supported PM alerts will

[PATCH v5 06/10] target/ppc: PMU: handle setting of PMCs while running

2021-11-01 Thread Daniel Henrique Barboza
The initial PMU support were made under the assumption that the counters would be set before running the PMU and read after either freezing the PMU manually or via a performance monitor alert. Turns out that some EBB powerpc kernel tests set the counters after unfreezing the counters. Setting a

[PATCH v5 08/10] PPC64/TCG: Implement 'rfebb' instruction

2021-11-01 Thread Daniel Henrique Barboza
An Event-Based Branch (EBB) allows applications to change the NIA when a event-based exception occurs. Event-based exceptions are enabled by setting the Branch Event Status and Control Register (BESCR). If the event-based exception is enabled when the exception occurs, an EBB happens. The

[PATCH v5 02/10] target/ppc: PMU basic cycle count for pseries TCG

2021-11-01 Thread Daniel Henrique Barboza
This patch adds the barebones of the PMU logic by enabling cycle counting. The overall logic goes as follows: - a helper is added to control the PMU state on each MMCR0 write. This allows for the PMU to start/stop as the frozen counter bit (MMCR0_FC) is cleared or set; - MMCR0 reg initial value

[PATCH v5 00/10] PMU-EBB support for PPC64 TCG

2021-11-01 Thread Daniel Henrique Barboza
Hi, In this new version the concept of PMUEvent was removed. We're now using only the PMUEventType enum and retrieving it on demand via a new helper called getPMUEventType. This also means that we're not trapping MMCR1 writes. Changes from v4: - patches 1-4 from v4: already upstream - former

[PATCH v5 01/10] target/ppc: introduce PMUEventType and PMU overflow timers

2021-11-01 Thread Daniel Henrique Barboza
This patch starts an IBM Power8+ compatible PMU implementation by adding the representation of PMU events that we are going to sample, PMUEventType. This enum represents a Perf event that is being sampled by a specific counter 'sprn'. Events that aren't available (i.e. no event was set in MMCR1)

[PATCH v5 05/10] target/ppc/power8-pmu.c: add PM_RUN_INST_CMPL (0xFA) event

2021-11-01 Thread Daniel Henrique Barboza
PM_RUN_INST_CMPL, instructions completed with the run latch set, is the architected PowerISA v3.1 event defined with PMC4SEL = 0xFA. Implement it by checking for the CTRL RUN bit before incrementing the counter. To make this work properly we also need to force a new translation block each time

[PULL 9/9] hw/i386: fix vmmouse registration

2021-11-01 Thread Michael S. Tsirkin
From: Pavel Dovgalyuk According to the logic of vmmouse_update_handler function, vmmouse should be registered as an event handler when it's status is zero. vmmouse_read_id resets the status but does not register the handler. This patch adds vmmouse registration and activation when status is

[PATCH v5 10/10] target/ppc/excp_helper.c: EBB handling adjustments

2021-11-01 Thread Daniel Henrique Barboza
The current logic is only considering event-based exceptions triggered by the performance monitor. This is true now, but we might want to add support for external event-based exceptions in the future. Let's make it a bit easier to do so by adding the bit logic that would happen in case we were

[PATCH v5 07/10] target/ppc/power8-pmu.c: handle overflow bits when PMU is running

2021-11-01 Thread Daniel Henrique Barboza
Up until this moment we were assuming that the counter negative enabled bits, PMC1CE and PMCjCE, would never be changed when the PMU is already started. Turns out that there is no such restriction in the PowerISA v3.1, and software can enable/disable overflow conditions of the counters at any

Re: [PATCH v2] hw/arm/virt: Expose empty NUMA nodes through ACPI

2021-11-01 Thread Gavin Shan
On 11/1/21 7:44 PM, Igor Mammedov wrote: On Thu, 28 Oct 2021 22:32:09 +1100 Gavin Shan wrote: On 10/28/21 2:40 AM, Igor Mammedov wrote: On Wed, 27 Oct 2021 13:29:58 +0800 Gavin Shan wrote: The empty NUMA nodes, where no memory resides, aren't exposed through ACPI SRAT table. It's not

[PULL 8/9] pci: Export pci_for_each_device_under_bus*()

2021-11-01 Thread Michael S. Tsirkin
From: Peter Xu They're actually more commonly used than the helper without _under_bus, because most callers do have the pci bus on hand. After exporting we can switch a lot of the call sites to use these two helpers. Reviewed-by: David Hildenbrand Reviewed-by: Eric Auger Signed-off-by: Peter

[PATCH v5 03/10] target/ppc: enable PMU counter overflow with cycle events

2021-11-01 Thread Daniel Henrique Barboza
The PowerISA v3.1 defines that if the proper bits are set (MMCR0_PMC1CE for PMC1 and MMCR0_PMCjCE for the remaining PMCs), counter negative conditions are enabled. This means that if the counter value overflows (i.e. exceeds 0x8000) a performance monitor alert will occur. This alert can

[PULL 7/9] pci: Define pci_bus_dev_fn/pci_bus_fn/pci_bus_ret_fn

2021-11-01 Thread Michael S. Tsirkin
From: Peter Xu They're used in quite a few places of pci.[ch] and also in the rest of the code base. Define them so that it doesn't need to be defined all over the places. The pci_bus_fn is similar to pci_bus_dev_fn that only takes a PCIBus* and an opaque. The pci_bus_ret_fn is similar to

[PATCH v5 04/10] target/ppc: enable PMU instruction count

2021-11-01 Thread Daniel Henrique Barboza
The PMU is already counting cycles by calculating time elapsed in nanoseconds. Counting instructions is a different matter and requires another approach. This patch adds the capability of counting completed instructions (Perf event PM_INST_CMPL) by counting the amount of instructions translated

[PULL 4/9] hw/i386/pc: Remove x86_iommu_get_type()

2021-11-01 Thread Michael S. Tsirkin
From: Jean-Philippe Brucker To generate the IOMMU ACPI table, acpi-build.c can use base QEMU types instead of a special IommuType value. Reviewed-by: Eric Auger Reviewed-by: Igor Mammedov Signed-off-by: Jean-Philippe Brucker Message-Id: <20211026182024.2642038-3-jean-phili...@linaro.org>

[PULL 0/9] pc,pci,virtio: features, fixes

2021-11-01 Thread Michael S. Tsirkin
The following changes since commit af531756d25541a1b3b3d9a14e72e7fedd941a2e: Merge remote-tracking branch 'remotes/philmd/tags/renesas-20211030' into staging (2021-10-30 11:31:41 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git

[PULL 3/9] hw/acpi: Add VIOT table

2021-11-01 Thread Michael S. Tsirkin
From: Jean-Philippe Brucker Add a function that generates a Virtual I/O Translation table (VIOT), describing the topology of paravirtual IOMMUs. The table is created if a virtio-iommu device is present. It contains a virtio-iommu node and PCI Range nodes for endpoints managed by the IOMMU. By

[PULL 5/9] hw/i386/pc: Move IOMMU singleton into PCMachineState

2021-11-01 Thread Michael S. Tsirkin
From: Jean-Philippe Brucker We're about to support a third vIOMMU for x86, virtio-iommu which doesn't inherit X86IOMMUState. Move the IOMMU singleton into PCMachineState, so it can be shared between all three vIOMMUs. The x86_iommu_get_default() helper is still needed by KVM and IOAPIC to fetch

[PULL 1/9] qtest: fix 'expression is always false' build failure in qtest_has_accel()

2021-11-01 Thread Michael S. Tsirkin
From: Igor Mammedov If KVM is disabled or not present, qtest library build may fail with: libqtest.c: In function 'qtest_has_accel': comparison of unsigned expression < 0 is always false [-Werror=type-limits] for (i = 0; i < ARRAY_SIZE(targets); i++) { due to empty

[PULL 2/9] vhost-vdpa: Set discarding of RAM broken when initializing the backend

2021-11-01 Thread Michael S. Tsirkin
From: David Hildenbrand Similar to VFIO, vDPA will go ahead an map+pin all guest memory. Memory that used to be discarded will get re-populated and if we discard+re-access memory after mapping+pinning, the pages mapped into the vDPA IOMMU will go out of sync with the actual pages mapped into the

[PULL 6/9] hw/i386/pc: Allow instantiating a virtio-iommu device

2021-11-01 Thread Michael S. Tsirkin
From: Jean-Philippe Brucker Allow instantiating a virtio-iommu device by adding an ACPI Virtual I/O Translation table (VIOT), which describes the relation between the virtio-iommu and the endpoints it manages. Add a hotplug handler for virtio-iommu on x86 and set the necessary reserved region

Re: [PATCH v6 6/7] tests/acpi: add test case for VIOT on q35 machine

2021-11-01 Thread Michael S. Tsirkin
On Tue, Oct 26, 2021 at 07:20:25PM +0100, Jean-Philippe Brucker wrote: > Add a test case for VIOT on the q35 machine. To test complex topologies > it has two PCIe buses that bypass the IOMMU (and are therefore not > described by VIOT), and two buses that are translated by virtio-iommu. > >

[PATCH v3 5/6] hw/nvram: Update at24c EEPROM init function in NPCM7xx boards

2021-11-01 Thread Hao Wu
We made 3 changes to the at24c_eeprom_init function in npcm7xx_boards.c: 1. We allow the function to take a I2CBus* as parameter. This allows us to attach an EEPROM device behind an I2C mux which is not possible with the old method. 2. We make at24c EEPROMs are backed by drives so that we

[PATCH v3 4/6] hw/adc: Make adci[*] R/W in NPCM7XX ADC

2021-11-01 Thread Hao Wu
Our sensor test requires both reading and writing from a sensor's QOM property. So we need to make the input of ADC module R/W instead of write only for that to work. Signed-off-by: Hao Wu Reviewed-by: Titus Rwantare Reviewed-by: Peter Maydell --- hw/adc/npcm7xx_adc.c | 2 +- 1 file changed,

[PATCH v3 6/6] hw/arm: quanta-gbs-bmc add i2c devices

2021-11-01 Thread Hao Wu
From: Patrick Venture Adds supported i2c devices to the quanta-gbc-bmc board. Signed-off-by: Patrick Venture Reviewed-by: Hao Wu --- hw/arm/npcm7xx_boards.c | 82 - 1 file changed, 49 insertions(+), 33 deletions(-) diff --git a/hw/arm/npcm7xx_boards.c

[PATCH v3 2/6] hw/i2c: Read FIFO during RXF_CTL change in NPCM7XX SMBus

2021-11-01 Thread Hao Wu
Originally we read in from SMBus when RXF_STS is cleared. However, the driver clears RXF_STS before setting RXF_CTL, causing the SM bus module to read incorrect amount of bytes in FIFO mode when the number of bytes read changed. This patch fixes this issue. Signed-off-by: Hao Wu Reviewed-by:

[PATCH v3 3/6] hw/adc: Fix CONV bit in NPCM7XX ADC CON register

2021-11-01 Thread Hao Wu
The correct bit for the CONV bit in NPCM7XX ADC is bit 13. This patch fixes that in the module, and also lower the IRQ when the guest is done handling an interrupt event from the ADC module. Signed-off-by: Hao Wu Reviewed-by: Patrick Venture Reviewed-by: Peter Maydell --- hw/adc/npcm7xx_adc.c

[PATCH v3 1/6] hw/i2c: Clear ACK bit in NPCM7xx SMBus module

2021-11-01 Thread Hao Wu
The ACK bit in NPCM7XX SMBus module should be cleared each time it sends out a NACK signal. This patch fixes the bug that it fails to do so. Signed-off-by: Hao Wu Reviewed-by: Titus Rwantare Reviewed-by: Peter Maydell --- hw/i2c/npcm7xx_smbus.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v3 0/6] Misc NPCM7XX patches

2021-11-01 Thread Hao Wu
This patch set contains a few bug fixes and I2C devices for some NPCM7XX boards. Patch 1~2 fix a problem that causes the SMBus module to behave incorrectly when it's in FIFO mode and trying to receive more than 16 bytes at a time. Patch 3 fixes a error in a register for ADC module. Patch 4

Re: [PATCH v2] hmp: Add shortcut to stop command to match cont

2021-11-01 Thread BALATON Zoltan
Ping? This is really simple addition that sholdn't take long to review. On Sat, 30 Oct 2021, BALATON Zoltan wrote: Some commands such as quit or cont have one letter alternatives but stop is missing that. Add stop|s to match cont|c for consistency and convenience. Signed-off-by: BALATON Zoltan

Re: [PATCH v2 7/7] hw/arm: Add ID for NPCM7XX SMBus

2021-11-01 Thread Hao Wu
I was trying to allow attaching a device using "-device xxx,bus=smbus[0]" Maybe there's a better way to allow that? I guess I can drop this one from the patch set. On Mon, Nov 1, 2021 at 10:33 AM Peter Maydell wrote: > On Thu, 21 Oct 2021 at 19:40, Hao Wu wrote: > > > > The ID can be used to

Re: [PATCH v4 5/6] tests/acceptance: Add bFLT loader linux-user test

2021-11-01 Thread Philippe Mathieu-Daudé
On 11/1/21 18:51, Willian Rampazzo wrote: > Hi, Phill, > > On Mon, Sep 27, 2021 at 1:31 PM Philippe Mathieu-Daudé > wrote: >> >> Add a very quick test that runs a busybox binary in bFLT format: >> >> $ AVOCADO_ALLOW_UNTRUSTED_CODE=1 \ >> avocado --show=app run -t linux_user

Re: [PATCH v4 6/6] tests/acceptance: Rename avocado_qemu.Test -> QemuSystemTest

2021-11-01 Thread Philippe Mathieu-Daudé
On 11/1/21 20:11, Willian Rampazzo wrote: > On Mon, Sep 27, 2021 at 1:32 PM Philippe Mathieu-Daudé > wrote: >> >> To run user-mode emulation tests, we introduced the >> avocado_qemu.QemuUserTest which inherits from avocado_qemu.QemuBaseTest. >> System-mode emulation tests are based on the

Re: [PATCH v4 1/6] tests/acceptance: Extract QemuBaseTest from Test

2021-11-01 Thread Philippe Mathieu-Daudé
On 11/1/21 19:01, Willian Rampazzo wrote: > On Mon, Sep 27, 2021 at 1:31 PM Philippe Mathieu-Daudé > wrote: >> >> The Avocado Test::fetch_asset() is handy to download artifacts >> before running tests. The current class is named Test but only >> tests system emulation. As we want to test user

Re: [PATCH v3 0/3] pc: Support configuration of SMBIOS entry point type

2021-11-01 Thread Michael S. Tsirkin
On Tue, Oct 26, 2021 at 11:10:57AM -0400, Eduardo Habkost wrote: > This includes code previously submitted[1] by Daniel P. Berrangé > to add a "smbios-ep" machine property on PC. > > SMBIOS 3.0 is necessary to support more than ~720 VCPUs, as a > large number of VCPUs can easily hit the table

Re: [PATCH v7 1/2] memory: introduce total_dirty_pages to stat dirty pages

2021-11-01 Thread Juan Quintela
huang...@chinatelecom.cn wrote: > From: Hyman Huang(黄勇) > > introduce global var total_dirty_pages to stat dirty pages > along with memory_global_dirty_log_sync. > > Signed-off-by: Hyman Huang(黄勇) Reviewed-by: Juan Quintela

Re: [PATCH] hw/qdev-core: Add compatibility for (non)-transitional devs

2021-11-01 Thread Michael S. Tsirkin
On Tue, Oct 12, 2021 at 10:24:28AM +0200, Jean-Louis Dupond wrote: > hw_compat modes only take into account their base name. > But if a device is created with (non)-transitional, then the compat > values are not used, causing migrating issues. > > This commit adds their (non)-transitional entries

[PULL 15/20] migration/postcopy: Handle RAMBlocks with a RamDiscardManager on the destination

2021-11-01 Thread Juan Quintela
From: David Hildenbrand Currently, when someone (i.e., the VM) accesses discarded parts inside a RAMBlock with a RamDiscardManager managing the corresponding mapped memory region, postcopy will request migration of the corresponding page from the source. The source, however, will never answer,

[PULL 16/20] migration: Simplify alignment and alignment checks

2021-11-01 Thread Juan Quintela
From: David Hildenbrand Let's use QEMU_ALIGN_DOWN() and friends to make the code a bit easier to read. Reviewed-by: Peter Xu Signed-off-by: David Hildenbrand Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/migration.c| 6 +++---

[PULL 20/20] migration/dirtyrate: implement dirty-bitmap dirtyrate calculation

2021-11-01 Thread Juan Quintela
From: Hyman Huang(黄勇) introduce dirty-bitmap mode as the third method of calc-dirty-rate. implement dirty-bitmap dirtyrate calculation, which can be used to measuring dirtyrate in the absence of dirty-ring. introduce "dirty_bitmap:-b" option in hmp calc_dirty_rate to indicate dirty bitmap

Re: [PATCH v1 00/12] virtio-mem: Expose device memory via multiple memslots

2021-11-01 Thread Michael S. Tsirkin
On Wed, Oct 27, 2021 at 02:45:19PM +0200, David Hildenbrand wrote: > This is the follow-up of [1], dropping auto-detection and vhost-user > changes from the initial RFC. > > Based-on: 20211011175346.15499-1-da...@redhat.com > > A virtio-mem device is represented by a single large RAM memory

[PULL 13/20] migration/ram: Handle RAMBlocks with a RamDiscardManager on the migration source

2021-11-01 Thread Juan Quintela
From: David Hildenbrand We don't want to migrate memory that corresponds to discarded ranges as managed by a RamDiscardManager responsible for the mapped memory region of the RAMBlock. The content of these pages is essentially stale and without any guarantees for the VM ("logically unplugged").

[PULL 18/20] migration/ram: Handle RAMBlocks with a RamDiscardManager on background snapshots

2021-11-01 Thread Juan Quintela
From: David Hildenbrand We already don't ever migrate memory that corresponds to discarded ranges as managed by a RamDiscardManager responsible for the mapped memory region of the RAMBlock. virtio-mem uses this mechanism to logically unplug parts of a RAMBlock. Right now, we still populate

Re: gitlab-ci: clang-user job failed with run-tcg-tests-sh4-linux-user

2021-11-01 Thread Philippe Mathieu-Daudé
On 11/1/21 19:00, Richard Henderson wrote: > On 11/1/21 6:27 AM, Philippe Mathieu-Daudé wrote: >> Build failed running the 'clang-user' job: >> >>    TEST    linux-test on sh4 >> ../linux-user/syscall.c:10373:34: runtime error: member access within >> misaligned address 0x0048af34 for type

[PULL 19/20] memory: introduce total_dirty_pages to stat dirty pages

2021-11-01 Thread Juan Quintela
From: Hyman Huang(黄勇) introduce global var total_dirty_pages to stat dirty pages along with memory_global_dirty_log_sync. Signed-off-by: Hyman Huang(黄勇) Reviewed-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- include/exec/ram_addr.h | 9 +

[PULL 11/20] memory: Introduce replay_discarded callback for RamDiscardManager

2021-11-01 Thread Juan Quintela
From: David Hildenbrand Introduce replay_discarded callback similar to our existing replay_populated callback, to be used my migration code to never migrate discarded memory. Acked-by: Peter Xu Signed-off-by: David Hildenbrand Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela ---

[PULL 17/20] migration/ram: Factor out populating pages readable in ram_block_populate_pages()

2021-11-01 Thread Juan Quintela
From: David Hildenbrand Let's factor out prefaulting/populating to make further changes easier to review and add a comment what we are actually expecting to happen. While at it, use the actual page size of the ramblock, which defaults to qemu_real_host_page_size for anonymous memory. Further,

[PULL 12/20] virtio-mem: Implement replay_discarded RamDiscardManager callback

2021-11-01 Thread Juan Quintela
From: David Hildenbrand Implement it similar to the replay_populated callback. Acked-by: Peter Xu Signed-off-by: David Hildenbrand Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- hw/virtio/virtio-mem.c | 58 ++ 1 file changed, 58

[PULL 06/20] migration/dirtyrate: move init step of calculation to main thread

2021-11-01 Thread Juan Quintela
From: Hyman Huang(黄勇) since main thread may "query dirty rate" at any time, it's better to move init step into main thead so that synchronization overhead between "main" and "get_dirtyrate" can be reduced. Signed-off-by: Hyman Huang(黄勇) Message-Id:

[PULL 14/20] virtio-mem: Drop precopy notifier

2021-11-01 Thread Juan Quintela
From: David Hildenbrand Migration code now properly handles RAMBlocks which are indirectly managed by a RamDiscardManager. No need for manual handling via the free page optimization interface, let's get rid of it. Acked-by: Michael S. Tsirkin Acked-by: Peter Xu Signed-off-by: David

[PULL 07/20] migration/dirtyrate: implement dirty-ring dirtyrate calculation

2021-11-01 Thread Juan Quintela
From: Hyman Huang(黄勇) use dirty ring feature to implement dirtyrate calculation. introduce mode option in qmp calc_dirty_rate to specify what method should be used when calculating dirtyrate, either page-sampling or dirty-ring should be passed. introduce "dirty_ring:-r" option in hmp

[PULL 09/20] migration: Add migrate_add_blocker_internal()

2021-11-01 Thread Juan Quintela
From: Peter Xu An internal version that removes -only-migratable implications. It can be used for temporary migration blockers like dump-guest-memory. Reviewed-by: Marc-André Lureau Reviewed-by: Juan Quintela Signed-off-by: Peter Xu Signed-off-by: Juan Quintela ---

[PULL 10/20] dump-guest-memory: Block live migration

2021-11-01 Thread Juan Quintela
From: Peter Xu Both dump-guest-memory and live migration caches vm state at the beginning. Either of them entering the other one will cause race on the vm state, and even more severe on that (please refer to the crash report in the bug link). Let's block live migration in dump-guest-memory, and

[PULL 04/20] migration/dirtyrate: introduce struct and adjust DirtyRateStat

2021-11-01 Thread Juan Quintela
From: Hyman Huang(黄勇) introduce "DirtyRateMeasureMode" to specify what method should be used to calculate dirty rate, introduce "DirtyRateVcpu" to store dirty rate for each vcpu. use union to store stat data of specific mode Signed-off-by: Hyman Huang(黄勇) Message-Id:

[PULL 03/20] memory: make global_dirty_tracking a bitmask

2021-11-01 Thread Juan Quintela
From: Hyman Huang(黄勇) since dirty ring has been introduced, there are two methods to track dirty pages of vm. it seems that "logging" has a hint on the method, so rename the global_dirty_log to global_dirty_tracking would make description more accurate. dirty rate measurement may start or

[PULL 01/20] migration/rdma: Fix out of order wrid

2021-11-01 Thread Juan Quintela
From: Li Zhijian destination: ../qemu/build/qemu-system-x86_64 -enable-kvm -netdev tap,id=hn0,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown -device e1000,netdev=hn0,mac=50:52:54:00:11:22 -boot c -drive if=none,file=./Fedora-rdma-server-migration.qcow2,id=drive-virtio-disk0 -device

[PULL 08/20] migration: Make migration blocker work for snapshots too

2021-11-01 Thread Juan Quintela
From: Peter Xu save_snapshot() checks migration blocker, which looks sane. At the meantime we should also teach the blocker add helper to fail if during a snapshot, just like for migrations. Reviewed-by: Marc-André Lureau Signed-off-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by:

[PULL 00/20] Migration 20211031 patches

2021-11-01 Thread Juan Quintela
The following changes since commit af531756d25541a1b3b3d9a14e72e7fedd941a2e: Merge remote-tracking branch 'remotes/philmd/tags/renesas-20211030' into staging (2021-10-30 11:31:41 -0700) are available in the Git repository at: https://github.com/juanquintela/qemu.git

[PULL 05/20] migration/dirtyrate: adjust order of registering thread

2021-11-01 Thread Juan Quintela
From: Hyman Huang(黄勇) registering get_dirtyrate thread in advance so that both page-sampling and dirty-ring mode can be covered. Signed-off-by: Hyman Huang(黄勇) Message-Id: Reviewed-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/dirtyrate.c | 5

[PULL 02/20] KVM: introduce dirty_pages and kvm_dirty_ring_enabled

2021-11-01 Thread Juan Quintela
From: Hyman Huang(黄勇) dirty_pages is used to calculate dirtyrate via dirty ring, when enabled, kvm-reaper will increase the dirty pages after gfns being dirtied. kvm_dirty_ring_enabled shows if kvm-reaper is working. dirtyrate thread could use it to check if measurement can base on dirty

Re: [PATCH] Revert "elf: Relax MIPS' elf_check_arch() to accept EM_NANOMIPS too"

2021-11-01 Thread Philippe Mathieu-Daudé
On 11/1/21 22:40, Vince Del Vecchio wrote: > Philippe said: > >> So far QEMU only support the MIPS o32 / n32 / n64 ABIs. The p32 ABI is not >> implemented, therefore we can not run any nanoMIPS binary. > > We use it internally to run nanoMIPS binaries every day. I had thought > everything

[PULL 1/1] roms/openbios: update OpenBIOS images to b9062dea built from submodule

2021-11-01 Thread Mark Cave-Ayland
Signed-off-by: Mark Cave-Ayland --- pc-bios/openbios-ppc | Bin 696912 -> 696912 bytes pc-bios/openbios-sparc32 | Bin 382048 -> 382048 bytes pc-bios/openbios-sparc64 | Bin 1593408 -> 1593408 bytes roms/openbios| 2 +- 4 files changed, 1 insertion(+), 1 deletion(-) diff --git

[PULL 0/1] qemu-openbios queue 20211101

2021-11-01 Thread Mark Cave-Ayland
The following changes since commit af531756d25541a1b3b3d9a14e72e7fedd941a2e: Merge remote-tracking branch 'remotes/philmd/tags/renesas-20211030' into staging (2021-10-30 11:31:41 -0700) are available in the Git repository at: git://github.com/mcayland/qemu.git tags/qemu-openbios-20211101

Re: [PATCH 0/6] RfC: try improve native hotplug for pcie root ports

2021-11-01 Thread Michael S. Tsirkin
On Tue, Oct 19, 2021 at 08:29:19AM +0200, Gerd Hoffmann wrote: > Hi, > > > > Yes. Maybe ask rh qe to run the patch set through their hotplug test > > > suite (to avoid a apci-hotplug style disaster where qe found various > > > issues after release)? > > > > I'll poke around to see if they can

RE: [PATCH] Revert "elf: Relax MIPS' elf_check_arch() to accept EM_NANOMIPS too"

2021-11-01 Thread Vince Del Vecchio

[PULL 2/2] vfio/common: Add a trace point when a MMIO RAM section cannot be mapped

2021-11-01 Thread Alex Williamson
From: Kunkun Jiang The MSI-X structures of some devices and other non-MSI-X structures may be in the same BAR. They may share one host page, especially in the case of large page granularity, such as 64K. For example, MSIX-Table size of 82599 NIC is 0x30 and the offset in Bar 3(size 64KB) is

Re: [PATCH] target/i386: ensure EXCP0D_GPF is propagated back to the guest

2021-11-01 Thread Mark Cave-Ayland
On 30/10/2021 14:29, Mark Cave-Ayland wrote: In the case where mmu_translate() returns EXCP0D_GPF ensure that handle_mmu_fault() returns immediately to propagate the fault back to the guest instead of returning EXCP0E_PAGE. Signed-off-by: Mark Cave-Ayland Fixes: 661ff4879e ("target/i386:

Re: [PATCH 2/2] qtest/am53c974-test: add test for cancelling in-flight requests

2021-11-01 Thread Philippe Mathieu-Daudé
On 11/1/21 19:35, Mark Cave-Ayland wrote: > Based upon the qtest reproducer posted to Gitlab issue #663 at > https://gitlab.com/qemu-project/qemu/-/issues/663. > > Signed-off-by: Mark Cave-Ayland > --- > tests/qtest/am53c974-test.c | 36 > 1 file changed, 36

Re: [PATCH v6 1/2] vhost-user: remove VirtQ notifier restore

2021-11-01 Thread Michael S. Tsirkin
On Mon, Nov 01, 2021 at 04:38:12PM +0800, Xueming Li wrote: > When vhost-user vdpa client suspend, backend may close all resources, > VQ notifier mmap address become invalid, restore MR which contains > the invalid address is wrong. vdpa client will set VQ notifier after > reconnect. > > This

Re: [PATCH v6 2/2] vhost-user: fix VirtQ notifier cleanup

2021-11-01 Thread Michael S. Tsirkin
On Mon, Nov 01, 2021 at 04:38:13PM +0800, Xueming Li wrote: > When vhost-user device cleanup is executed and un-mmaps notifier > address, VM cpu thread writing the notifier fails by accessing invalid > address error. > > To avoid this concurrent issue, call RCU and wait for a memory flatview >

Re: [PATCH] vhost: Fix last queue index of devices with no cvq

2021-11-01 Thread Michael S. Tsirkin
On Mon, Nov 01, 2021 at 04:42:01PM +0100, Eugenio Perez Martin wrote: > On Mon, Nov 1, 2021 at 9:58 AM Eugenio Perez Martin > wrote: > > > > On Mon, Nov 1, 2021 at 4:34 AM Jason Wang wrote: > > > > > > On Fri, Oct 29, 2021 at 10:16 PM Eugenio Pérez > > > wrote: > > > > > > > > The -1 assumes

Re: [PATCH 00/31] passage: Define a standard for firmware data flow

2021-11-01 Thread François Ozog
Hi Mark, Le lun. 1 nov. 2021 à 19:19, Mark Kettenis a écrit : > > From: François Ozog > > Date: Mon, 1 Nov 2021 09:53:40 +0100 > > [...] > > > We could further leverage Passage to pass Operating Systems parameters > that > > could be removed from device tree (migration of /chosen to Passage).

[PULL 07/10] tests/unit: Add an unit test for smp parsing

2021-11-01 Thread Philippe Mathieu-Daudé
From: Yanan Wang Now that we have a generic parser smp_parse(), let's add an unit test for the code. All possible valid/invalid SMP configurations that the user can specify are covered. Signed-off-by: Yanan Wang Reviewed-by: Andrew Jones Tested-by: Philippe Mathieu-Daudé Message-Id:

[PATCH] escc: update transmit status bits when switching to async mode

2021-11-01 Thread Mark Cave-Ayland
The recent ESCC reset changes cause a regression when attemping to use a real SS-5 Sun PROM instead of OpenBIOS. The Sun PROM doesn't send an explicit reset command to the ESCC but gets stuck in a loop probing the keyboard waiting for STATUS_TXEMPTY to be set in R_STATUS followed by SPEC_ALLSENT

[PULL 03/10] hw/core: Declare meson source set

2021-11-01 Thread Philippe Mathieu-Daudé
As we want to be able to conditionally add files to the hw/core file list, use a source set. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Yanan Wang Tested-by: Yanan Wang Acked-by: Eduardo Habkost Message-Id: <20211028150521.1973821-3-phi...@redhat.com> --- meson.build | 4 +++-

Re: [PATCH v2 0/3] virtio: increase VIRTQUEUE_MAX_SIZE to 32k

2021-11-01 Thread Christian Schoenebeck
On Donnerstag, 28. Oktober 2021 11:00:48 CET Stefan Hajnoczi wrote: > On Mon, Oct 25, 2021 at 05:03:25PM +0200, Christian Schoenebeck wrote: > > On Montag, 25. Oktober 2021 12:30:41 CEST Stefan Hajnoczi wrote: > > > On Thu, Oct 21, 2021 at 05:39:28PM +0200, Christian Schoenebeck wrote: > > > > On

[PULL 0/2] VFIO update 2021-11-01 (for v6.2)

2021-11-01 Thread Alex Williamson
The following changes since commit af531756d25541a1b3b3d9a14e72e7fedd941a2e: Merge remote-tracking branch 'remotes/philmd/tags/renesas-20211030' into staging (2021-10-30 11:31:41 -0700) are available in the Git repository at: git://github.com/awilliam/qemu-vfio.git

[PATCH] MAINTAINERS: Change status to Odd Fixes

2021-11-01 Thread Cédric Le Goater
I haven't done any Aspeed development for a couple of years now and maintaining the Aspeed QEMU machines has been a side project since. I don't have time anymore. Signed-off-by: Cédric Le Goater --- MAINTAINERS | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/MAINTAINERS

Re: [PATCH v2] hvf: arm: Ignore cache operations on MMIO

2021-11-01 Thread Peter Maydell
On Tue, 26 Oct 2021 at 09:09, Alexander Graf wrote: > > Apple's Hypervisor.Framework forwards cache operations as MMIO traps > into user space. For MMIO however, these have no meaning: There is no > cache attached to them. > > So let's just treat cache data exits as nops. > > This fixes OpenBSD

Re: [PATCH v2] hvf: arm: Ignore cache operations on MMIO

2021-11-01 Thread Peter Maydell
On Mon, 1 Nov 2021 at 19:28, Richard Henderson wrote: > > On 10/26/21 3:12 AM, Alexander Graf wrote: > > Apple's Hypervisor.Framework forwards cache operations as MMIO traps > > into user space. For MMIO however, these have no meaning: There is no > > cache attached to them. > > > > So let's just

[PULL 1/2] vfio/pci: Add support for mmapping sub-page MMIO BARs after live migration

2021-11-01 Thread Alex Williamson
From: Kunkun Jiang We can expand MemoryRegions of sub-page MMIO BARs in vfio_pci_write_config() to improve IO performance for some devices. However, the MemoryRegions of destination VM are not expanded any more after live migration. Because their addresses have been updated in

Re: [PATCH 00/31] passage: Define a standard for firmware data flow

2021-11-01 Thread Mark Kettenis
> From: François Ozog > Date: Mon, 1 Nov 2021 09:53:40 +0100 [...] > We could further leverage Passage to pass Operating Systems parameters that > could be removed from device tree (migration of /chosen to Passage). Memory > inventory would still be in DT but allocations for CMA or GPUs would

Re: [PATCH v4 2/6] tests/acceptance: Make pick_default_qemu_bin() more generic

2021-11-01 Thread Willian Rampazzo
On Mon, Sep 27, 2021 at 1:31 PM Philippe Mathieu-Daudé wrote: > > Make pick_default_qemu_bin() generic to find qemu-system or > qemu-user binaries. > > Signed-off-by: Philippe Mathieu-Daudé > --- > tests/acceptance/avocado_qemu/__init__.py | 10 +- > 1 file changed, 5 insertions(+), 5

Re: [PATCH v5 06/26] arm: qemu: Add a devicetree file for qemu_arm64

2021-11-01 Thread Tom Rini
On Mon, Nov 01, 2021 at 06:33:35PM +0100, François Ozog wrote: > Hi Simon > > Le lun. 1 nov. 2021 à 17:58, Simon Glass a écrit : > > > Hi Peter, > > > > On Mon, 1 Nov 2021 at 04:48, Peter Maydell > > wrote: > > > > > > On Tue, 26 Oct 2021 at 01:33, Simon Glass wrote: > > > > > > > > Add this

[PATCH v5] tests: qtest: Add virtio-iommu test

2021-11-01 Thread Eric Auger
Add the framework to test the virtio-iommu-pci device and tests exercising the attach/detach, map/unmap API. Signed-off-by: Eric Auger Tested-by: Jean-Philippe Brucker Reviewed-by: Jean-Philippe Brucker --- v4 -> v5: - remove printf and move a comment - Added Jean-Philippe's T-b and R-b ---

Re: [PATCH v2] hvf: arm: Ignore cache operations on MMIO

2021-11-01 Thread Richard Henderson
On 11/1/21 1:55 PM, Peter Maydell wrote: On Tue, 26 Oct 2021 at 17:22, Richard Henderson wrote: On 10/26/21 12:12 AM, Alexander Graf wrote: +if (cm) { +/* We don't cache MMIO regions */ +advance_pc = true; +break; +} +

Re: [PATCH v4 4/6] tests/acceptance: Share useful helpers from virtiofs_submounts test

2021-11-01 Thread Willian Rampazzo
On Mon, Sep 27, 2021 at 1:31 PM Philippe Mathieu-Daudé wrote: > > Move the useful has_cmd()/has_cmds() helpers from the virtiofs > test to the avocado_qemu public class. > > Reviewed-by: Wainer dos Santos Moschetta > Signed-off-by: Philippe Mathieu-Daudé > --- >

[PULL 10/10] machine: remove the done notifier for dynamic sysbus device type check

2021-11-01 Thread Philippe Mathieu-Daudé
From: Damien Hedde Now that we check sysbus device types during device creation, we can remove the check in the machine init done notifier. This was the only thing done by this notifier, so we remove the whole sysbus_notifier structure of the MachineState. Note: This notifier was checking all

[PULL 06/10] hw/core/machine: Split out the smp parsing code

2021-11-01 Thread Philippe Mathieu-Daudé
From: Yanan Wang We are going to introduce an unit test for the parser smp_parse() in hw/core/machine.c, but now machine.c is only built in softmmu. In order to solve the build dependency on the smp parsing code and avoid building unrelated stuff for the unit tests, move the tested code from

[PULL 04/10] hw/core: Extract hotplug-related functions to qdev-hotplug.c

2021-11-01 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Yanan Wang Acked-by: Eduardo Habkost Message-Id: <20211028150521.1973821-4-phi...@redhat.com> --- hw/core/qdev-hotplug.c | 73 ++ hw/core/qdev.c | 60 --

[PULL 08/10] machine: add device_type_is_dynamic_sysbus function

2021-11-01 Thread Philippe Mathieu-Daudé
From: Damien Hedde Right now the allowance check for adding a sysbus device using -device cli option (or device_add qmp command) is done well after the device has been created. It is done during the machine init done notifier: machine_init_notify() in hw/core/machine.c This new function will

  1   2   3   4   5   >