easily.)
Signed-off-by: John Snow
Reviewed-by: Akihiko Odaki
ny time. I figured now was a good time as any to
get rid of them before they become a problem randomly some day in the
future.
I guess you meant that the old style type hints are deprecated.
Regards,
Akihiko Odaki
On 2025/06/13 5:54, John Snow wrote:
The next patch will synchronize the qemu.qmp library with the external,
standalone version. That synchronization will require an extra ignore
for pylint, so do that now.
Signed-off-by: John Snow
Reviewed-by: Akihiko Odaki
On 2025/06/13 5:54, John Snow wrote:
\{ is an illegal escape sequence, to get a literal backslash we need to
use \\.
This is being fixed because of an issue spotted when attempting to use
the pyupgrade script.
Signed-off-by: John Snow
Reviewed-by: Akihiko Odaki
erent repositories.
Signed-off-by: John Snow
Reviewed-by: Akihiko Odaki
the alignment of holes.
So stop asserting the assumption on the holes and handle unaligned holes
properly.
Signed-off-by: Akihiko Odaki
---
Changes in v2:
- Changed to round the number also when the specified offset in a hole.
- Changed to iterate until finding an aligned location.
- Link to v1:
On 2025/05/28 22:00, 'Eric Blake' via devel wrote:
On Wed, May 28, 2025 at 08:30:05PM +0900, Akihiko Odaki wrote:
file-posix used to assume that existing holes satisfy the requested
alignment, which equals to the estimated direct I/O alignment
requirement if direct I/O is requested,
the alignment of holes.
So stop asserting the assumption on the holes and tolerate them being
unaligned.
Signed-off-by: Akihiko Odaki
---
block/file-posix.c | 19 +--
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/block/file-posix.c b/block/file-posix.c
index ec95b7
On 2025/05/02 12:04, Nicholas Piggin wrote:
This function is duplicated 3 times, with more potential future users.
Factor it into libqos, using qtest_memset instead of qtest_writel to
clear the message just because that looks nicer with the qtest_memread
used to read it.
Reviewed-by: Philippe Ma
On 2025/05/02 12:04, Nicholas Piggin wrote:
ahci-test has a bunch of tests where the pci bar was not mapped. Avoid
unmapping it in these cases, to keep iomaps balanced.
Cc: Michael S. Tsirkin
Cc: Marcel Apfelbaum
Cc: Akihiko Odaki
Cc: Fabiano Rosas
Signed-off-by: Nicholas Piggin
On 2025/05/02 12:04, Nicholas Piggin wrote:
msix messages are written to memory in little-endian order, so they
should not be byteswapped depending on target endianness, but read
as le and converted to host endian by the qtest.
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Fabiano Rosas
Sig
On 2025/05/02 12:04, Nicholas Piggin wrote:
ahci-test double-maps the hba bar in the pending_callback test.
Unmap it first, to keep iomaps balanced.
Cc: Michael S. Tsirkin
Cc: Marcel Apfelbaum
Cc: Akihiko Odaki
Reviewed-by: Akihiko Odaki
Reviewed-by: Fabiano Rosas
Signed-off-by: Nicholas
noop and will be used subsequently.
Signed-off-by: Nicholas Piggin
Reviewed-by: Akihiko Odaki
On 2025/04/11 13:41, Nicholas Piggin wrote:
ahci-test has a bunch of tests where the pci bar was not mapped. Avoid
unmapping it in these cases, to keep iomaps balanced.
Cc: Michael S. Tsirkin
Cc: Marcel Apfelbaum
Cc: Akihiko Odaki
Cc: Akihiko Odaki
My address is duplicated.
Cc: Fabiano
tested changes you found significant,
- you found no problems with them, and
- you are fine to record that in Git commit logs
Pasha Tatashin (who told me they tried the patches), it would be nice if
you do the same.
Regards,
Akihiko Odaki
Yui
On 2025/03/14 15:14, Akihiko Odaki wrote
Signed-off-by: Akihiko Odaki
---
MAINTAINERS | 1 +
docs/system/index.rst | 1 +
docs/system/sriov.rst | 36
3 files changed, 38 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 0e5db7a57449..4cde71687645 100644
--- a/MAINTAINERS
+++ b
pci_config_get_bar_addr() had a division by vf_stride. vf_stride needs
to be non-zero when there are multiple VFs, but the specification does
not prohibit to make it zero when there is only one VF.
Do not perform the division for the first VF to avoid division by zero.
Signed-off-by: Akihiko
A SR-IOV VF cannot have a ROM BAR.
Co-developed-by: Yui Washizu
Signed-off-by: Akihiko Odaki
---
hw/pci/pci.c | 8
1 file changed, 8 insertions(+)
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 2844ec55560f..8460b6105338 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -2522,6
A device cannot be a SR-IOV PF and a VF at the same time.
Signed-off-by: Akihiko Odaki
---
hw/pci/pcie_sriov.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/hw/pci/pcie_sriov.c b/hw/pci/pcie_sriov.c
index 1eb4358256de..109b2ebcccba 100644
--- a/hw/pci/pcie_sriov.c
+++ b/hw/pci
-creatable VFs can be attached calls
pcie_sriov_pf_init_from_user_created_vfs() during realization and
pcie_sriov_pf_exit() when exiting.
Signed-off-by: Akihiko Odaki
---
include/hw/pci/pci_device.h | 6 +-
include/hw/pci/pcie_sriov.h | 18 +++
hw/pci/pci.c| 62 ++
hw/pci
A virtio-net device can be added as a SR-IOV VF to another virtio-pci
device that will be the PF.
Signed-off-by: Akihiko Odaki
---
hw/virtio/virtio-net-pci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/virtio/virtio-net-pci.c b/hw/virtio/virtio-net-pci.c
index e18953ad674b
SR-IOV requires PCI Express.
Signed-off-by: Akihiko Odaki
---
hw/pci/pcie_sriov.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/hw/pci/pcie_sriov.c b/hw/pci/pcie_sriov.c
index 109b2ebcccba..a5b546abe8bb 100644
--- a/hw/pci/pcie_sriov.c
+++ b/hw/pci/pcie_sriov.c
@@ -42,6 +42,11
Signed-off-by: Akihiko Odaki
---
docs/system/sriov.rst | 3 ++-
include/hw/pci/pcie_sriov.h | 7 +--
hw/pci/pcie_sriov.c | 8 +++-
hw/virtio/virtio-pci.c | 16 ++--
4 files changed, 24 insertions(+), 10 deletions(-)
diff --git a/docs/system/sriov.rst b
Allow user to attach SR-IOV VF to a virtio-pci PF.
Signed-off-by: Akihiko Odaki
---
include/hw/virtio/virtio-pci.h | 1 +
hw/virtio/virtio-pci.c | 20 +++-
2 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/include/hw/virtio/virtio-pci.h b/include/hw/virtio
OV VFs with virtio-net-pci.
[1]
https://patchew.org/QEMU/1689731808-3009-1-git-send-email-yui.wash...@gmail.com/
[2] https://lore.kernel.org/all/5d46f455-f530-4e5e-9ae7-13a2297d4...@daynix.com/
Co-developed-by: Yui Washizu
Signed-off-by: Akihiko Odaki
---
Changes in v9:
- Rebased.
- Link to
Hi Michael,
It has been a while since this series was reviewed by maintainers of
relevant architectures. Can you check if this series is ready to pull?
Regards,
Akihiko Odaki
On 2025/01/16 18:00, Akihiko Odaki wrote:
Supersedes: <20240714-rombar-v2-0-af1504ef5...@daynix.com>
("[P
On 2025/01/18 2:46, Peter Xu wrote:
On Fri, Jan 17, 2025 at 03:24:34PM +0900, Akihiko Odaki wrote:
On 2025/01/16 23:33, Peter Xu wrote:
On Thu, Jan 16, 2025 at 02:37:38PM +0900, Akihiko Odaki wrote:
On 2025/01/16 1:14, Peter Xu wrote:
On Thu, Jan 16, 2025 at 12:52:56AM +0900, Akihiko Odaki
,
Reviewed-by: Akihiko Odaki
Thanks,
Nick
Nicholas Piggin (4):
qtest/libqos/pci: Do not write to PBA memory
qtest/libqos/pci: Enforce balanced iomap/unmap
qtest/libqos/pci: Fix qpci_msix_enable sharing bar0
qtest/libqos/pci: Factor msix entry helpers into pci common code
tests/qtest
On 2025/01/16 23:33, Peter Xu wrote:
On Thu, Jan 16, 2025 at 02:37:38PM +0900, Akihiko Odaki wrote:
On 2025/01/16 1:14, Peter Xu wrote:
On Thu, Jan 16, 2025 at 12:52:56AM +0900, Akihiko Odaki wrote:
Functionally, the ordering of container/subregion finalization matters if
some device tries to
On 2025/01/17 1:13, BALATON Zoltan wrote:
On Thu, 16 Jan 2025, Peter Maydell wrote:
On Tue, 14 Jan 2025 at 19:12, Peter Xu wrote:
On Tue, Jan 14, 2025 at 05:42:57PM +, Peter Maydell wrote:
There's at least one test in the arm qtests that will hit this.
I suspect that you'll find that mos
On 2025/01/09 19:51, Philippe Mathieu-Daudé wrote:
Hi Akihiko,
On 9/1/25 07:29, Akihiko Odaki wrote:
Disable SR-IOV VF devices by reusing code to power down PCI devices
instead of removing them when the guest requests to disable VFs. This
allows to realize devices and report VF realization
rovements that I think are independently
useful. This series extracts those fixes and improvements from the RFC
series.
[1]: https://patchew.org/QEMU/20231210-sriov-v2-0-b959e8a6d...@daynix.com/
Signed-off-by: Akihiko Odaki
---
Changes in v20:
- Use qdev_is_realized().
- Link to v19:
https://l
The guest cannot use VFs due to the lack of multifunction support but
can use PFs.
Signed-off-by: Akihiko Odaki
---
hw/s390x/s390-pci-bus.c | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c
index 8c5eb69f7d76
A device gets automatically unrealized when being unparented.
Signed-off-by: Akihiko Odaki
---
hw/pci/pcie_sriov.c | 4
1 file changed, 4 deletions(-)
diff --git a/hw/pci/pcie_sriov.c b/hw/pci/pcie_sriov.c
index e9b23221d713..499becd5273f 100644
--- a/hw/pci/pcie_sriov.c
+++ b/hw/pci
Disable SR-IOV VF devices by reusing code to power down PCI devices
instead of removing them when the guest requests to disable VFs. This
allows to realize devices and report VF realization errors at PF
realization time.
Signed-off-by: Akihiko Odaki
---
include/hw/pci/pcie_sriov.h | 1 -
hw
pcie_sriov doesn't have code to restore its state after migration, but
igb, which uses pcie_sriov, naively claimed its migration capability.
Add code to register VFs after migration and fix igb migration.
Fixes: 3a977deebe6b ("Intrdocue igb device emulation")
Signed-off-by
num_vfs is not migrated so use PCI_SRIOV_CTRL_VFE and PCI_SRIOV_NUM_VF
instead.
Signed-off-by: Akihiko Odaki
---
include/hw/pci/pcie_sriov.h | 1 -
hw/pci/pcie_sriov.c | 38 +++---
hw/pci/trace-events | 2 +-
3 files changed, 28 insertions
The SR-IOV PFs set the multifunction bit during device realization so
check them after that. There is no functional change because we
explicitly ignore the multifunction bit for SR-IOV devices.
Signed-off-by: Akihiko Odaki
---
hw/s390x/s390-pci-bus.c | 28 +---
1 file
Release VFs failed to realize just as we do in unregister_vfs().
Fixes: 7c0fa8dff811 ("pcie: Add support for Single Root I/O Virtualization
(SR/IOV)")
Signed-off-by: Akihiko Odaki
---
hw/pci/pcie_sriov.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/pci/pcie_sriov.
VFs are automatically created by PF, and creating zpci for them will
result in unexpected usage of fids. Currently QEMU does not support
multifunction for s390x so we don't need zpci for VFs anyway.
Signed-off-by: Akihiko Odaki
---
hw/s390x/s390-pci-bus.c | 21 +++--
1
pci_new() aborts when creating a VF with addr >= PCI_DEVFN_MAX.
Signed-off-by: Akihiko Odaki
---
docs/pcie_sriov.txt | 8 +---
include/hw/pci/pcie_sriov.h | 5 +++--
hw/net/igb.c| 10 +++---
hw/nvme/ctrl.c | 22 ++
hw/
A PF may automatically create VFs and the PF may be function 0.
Signed-off-by: Akihiko Odaki
Reviewed-by: Shivaprasad G Bhat
Tested-by: Shivaprasad G Bhat
---
hw/ppc/spapr_pci.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
Disabled means it is a disabled SR-IOV VF and hidden from the guest.
Do not create DT when starting the system and also keep the disabled PCI
device not linked to DRC, which generates DT in case of hotplug.
Signed-off-by: Akihiko Odaki
Reviewed-by: Shivaprasad G Bhat
Tested-by: Shivaprasad G
sirkin
Cc: Marcel Apfelbaum
Cc: Dmitry Fleytman
Cc: Akihiko Odaki
Cc: Sriram Yagnaraman
Signed-off-by: Nicholas Piggin
---
tests/qtest/libqos/e1000e.h | 11 -
tests/qtest/libqos/e1000e.c | 87 +++--
tests/qtest/libqos/igb.c| 9
3 files ch
On 2025/01/16 1:14, Peter Xu wrote:
On Thu, Jan 16, 2025 at 12:52:56AM +0900, Akihiko Odaki wrote:
Functionally, the ordering of container/subregion finalization matters if
some device tries to a container during finalization. In such a case
On 2025/01/16 0:40, Peter Xu wrote:
On Wed, Jan 15, 2025 at 11:54:56PM +0900, Akihiko Odaki wrote:
On 2025/01/15 22:43, Peter Xu wrote:
On Wed, Jan 15, 2025 at 01:46:29PM +0900, Akihiko Odaki wrote:
On 2025/01/15 2:02, Peter Xu wrote:
On Tue, Jan 14, 2025 at 05:43:09PM +0900, Akihiko Odaki
On 2025/01/15 22:43, Peter Xu wrote:
On Wed, Jan 15, 2025 at 01:46:29PM +0900, Akihiko Odaki wrote:
On 2025/01/15 2:02, Peter Xu wrote:
On Tue, Jan 14, 2025 at 05:43:09PM +0900, Akihiko Odaki wrote:
memory_region_finalize() is not a function to tell the owner is leaving, but
the memory region
#x27; device type are selected using the 'variant' property.
Signed-off-by: Alexander Graf
Signed-off-by: Phil Dennis-Jordan
Reviewed-by: Akihiko Odaki
Tested-by: Akihiko Odaki
v4:
* Use recommended object type declaration pattern.
* Correctly log unimplemented code paths.
*
On 2025/01/15 2:02, Peter Xu wrote:
On Tue, Jan 14, 2025 at 05:43:09PM +0900, Akihiko Odaki wrote:
memory_region_finalize() is not a function to tell the owner is leaving, but
the memory region itself is being destroyed.
It is when the lifecycle of the MR is the same as the owner. That holds
On 2025/01/14 0:57, Peter Xu wrote:
On Sat, Jan 11, 2025 at 01:15:24PM +0900, Akihiko Odaki wrote:
On 2025/01/11 0:18, Peter Xu wrote:
On Fri, Jan 10, 2025 at 05:43:15PM +0900, Akihiko Odaki wrote:
On 2025/01/10 4:37, Peter Xu wrote:
On Thu, Jan 09, 2025 at 02:29:21PM -0500, Peter Xu wrote
Hi,
It seems this series has been forgotten for a while. Can anyone take a
look at it?
Regards,
Akihiko Odaki
On 2024/07/16 16:27, Akihiko Odaki wrote:
qemu_get_runtime_dir() returns a dynamically allocated directory path
that is appropriate for storing runtime files. It corresponds to &quo
On 2025/01/11 0:18, Peter Xu wrote:
On Fri, Jan 10, 2025 at 05:43:15PM +0900, Akihiko Odaki wrote:
On 2025/01/10 4:37, Peter Xu wrote:
On Thu, Jan 09, 2025 at 02:29:21PM -0500, Peter Xu wrote:
On Thu, Jan 09, 2025 at 01:30:35PM +0100, BALATON Zoltan wrote:
On Thu, 9 Jan 2025, Akihiko Odaki
f() and
memory_region_unref() do nothing for such.
memory: Clarify owner must not call memory_region_ref()
--------
The owner must not call this function as it results in a circular
reference.
Signed-off-by: Akihiko Odaki
Reviewed-by: Peter Xu
---
incl
instead ot its
owner in such a case; the reference to the subregion is still necessary
to ensure that the subregion gets finalized after the container.
Signed-off-by: Akihiko Odaki
Reviewed-by: Peter Xu
---
system/memory.c | 24 ++--
1 file changed, 22 insertions(+), 2 deletions
this patch series combined with the following change for GLib:
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4120
Signed-off-by: Akihiko Odaki
---
Changes in v8:
- Clarified that the memory region should be passed to object_ref()
when creating a reference internal to owner.
- Link to v7
On 2025/01/10 4:37, Peter Xu wrote:
On Thu, Jan 09, 2025 at 02:29:21PM -0500, Peter Xu wrote:
On Thu, Jan 09, 2025 at 01:30:35PM +0100, BALATON Zoltan wrote:
On Thu, 9 Jan 2025, Akihiko Odaki wrote:
Do not refer to "memory region's refer
VFs are automatically created by PF, and creating zpci for them will
result in unexpected usage of fids. Currently QEMU does not support
multifunction for s390x so we don't need zpci for VFs anyway.
Signed-off-by: Akihiko Odaki
---
hw/s390x/s390-pci-bus.c | 21 +++--
1
pci_new() aborts when creating a VF with addr >= PCI_DEVFN_MAX.
Signed-off-by: Akihiko Odaki
---
docs/pcie_sriov.txt | 8 +---
include/hw/pci/pcie_sriov.h | 5 +++--
hw/net/igb.c| 10 +++---
hw/nvme/ctrl.c | 22 ++
hw/
It is no longer used.
Signed-off-by: Akihiko Odaki
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Markus Armbruster
---
include/hw/qdev-core.h | 4
hw/core/qdev.c | 1 -
system/qdev-monitor.c | 12 +++-
3 files changed, 7 insertions(+), 10 deletions(-)
diff --git a
The guest cannot use VFs due to the lack of multifunction support but
can use PFs.
Signed-off-by: Akihiko Odaki
---
hw/s390x/s390-pci-bus.c | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c
index 8c5eb69f7d76
num_vfs is not migrated so use PCI_SRIOV_CTRL_VFE and PCI_SRIOV_NUM_VF
instead.
Signed-off-by: Akihiko Odaki
---
include/hw/pci/pcie_sriov.h | 1 -
hw/pci/pcie_sriov.c | 38 +++---
hw/pci/trace-events | 2 +-
3 files changed, 28 insertions
Disable SR-IOV VF devices by reusing code to power down PCI devices
instead of removing them when the guest requests to disable VFs. This
allows to realize devices and report VF realization errors at PF
realization time.
Signed-off-by: Akihiko Odaki
---
include/hw/pci/pcie_sriov.h | 1 -
hw
Release VFs failed to realize just as we do in unregister_vfs().
Fixes: 7c0fa8dff811 ("pcie: Add support for Single Root I/O Virtualization
(SR/IOV)")
Signed-off-by: Akihiko Odaki
---
hw/pci/pcie_sriov.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/pci/pcie_sriov.
pcie_sriov doesn't have code to restore its state after migration, but
igb, which uses pcie_sriov, naively claimed its migration capability.
Add code to register VFs after migration and fix igb migration.
Fixes: 3a977deebe6b ("Intrdocue igb device emulation")
Signed-off-by
A PF may automatically create VFs and the PF may be function 0.
Signed-off-by: Akihiko Odaki
Reviewed-by: Shivaprasad G Bhat
Tested-by: Shivaprasad G Bhat
---
hw/ppc/spapr_pci.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
The SR-IOV PFs set the multifunction bit during device realization so
check them after that. There is no functional change because we
explicitly ignore the multifunction bit for SR-IOV devices.
Signed-off-by: Akihiko Odaki
---
hw/s390x/s390-pci-bus.c | 28 +---
1 file
it is safe to give it a new meaning. The values in
[2 ^ 31, 2 ^ 32) become invalid, but nobody should have typed these
values by chance.
Suggested-by: Markus Armbruster
Signed-off-by: Akihiko Odaki
Reviewed-by: Markus Armbruster
Reviewed-by: Philippe Mathieu-Daudé
---
include/hw/pci/pci_devic
A device gets automatically unrealized when being unparented.
Signed-off-by: Akihiko Odaki
---
hw/pci/pcie_sriov.c | 4
1 file changed, 4 deletions(-)
diff --git a/hw/pci/pcie_sriov.c b/hw/pci/pcie_sriov.c
index e9b23221d713..499becd5273f 100644
--- a/hw/pci/pcie_sriov.c
+++ b/hw/pci
Disabled means it is a disabled SR-IOV VF and hidden from the guest.
Do not create DT when starting the system and also keep the disabled PCI
device not linked to DRC, which generates DT in case of hotplug.
Signed-off-by: Akihiko Odaki
Reviewed-by: Shivaprasad G Bhat
Tested-by: Shivaprasad G
The renamed state will not only represent powering state of PFs, but
also represent SR-IOV VF enablement in the future.
Signed-off-by: Akihiko Odaki
Reviewed-by: Philippe Mathieu-Daudé
---
include/hw/pci/pci.h| 1 +
include/hw/pci/pci_device.h | 2 +-
hw/pci/pci.c| 17
rovements that I think are independently
useful. This series extracts those fixes and improvements from the RFC
series.
[1]: https://patchew.org/QEMU/20231210-sriov-v2-0-b959e8a6d...@daynix.com/
Signed-off-by: Akihiko Odaki
---
Changes in v19:
- Avoided inling pci_set_power().
- Link to v18:
https:/
instead ot its
owner in such a case; the reference to the subregion is still necessary
to ensure that the subregion gets finalized after the container.
Signed-off-by: Akihiko Odaki
---
system/memory.c | 24 ++--
1 file changed, 22 insertions(+), 2 deletions(-)
diff --git a
this patch series combined with the following change for GLib:
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4120
Signed-off-by: Akihiko Odaki
---
Changes in v7:
- Don't open code memory_region_ref(). (Peter Xu)
- Link to v6:
https://lore.kernel.org/r/20250105-san-v6-0-11fc859b9...@dayni
f() and
memory_region_unref() do nothing for such.
memory: Clarify owner must not call memory_region_ref()
--------
The owner must not call this function as it results in a circular
reference.
Signed-off-by: Akihiko Odaki
Reviewed-by: Peter Xu
---
incl
On 2025/01/04 21:51, BALATON Zoltan wrote:
On Sat, 4 Jan 2025, Akihiko Odaki wrote:
Do not refer to "memory region's reference count"
-
Now MemoryRegions do have their own reference counts, but they will not
be used when their
f() and
memory_region_unref() do nothing for such.
memory: Clarify owner must not call memory_region_ref()
--------
The owner must not call this function as it results in a circular
reference.
Signed-off-by: Akihiko Odaki
---
include/exec/memory.h | 59 +++
instead ot its
owner in such a case; the reference to the subregion is still necessary
to ensure that the subregion gets finalized after the container.
Signed-off-by: Akihiko Odaki
---
system/memory.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/system/memory.c b
this patch series combined with the following change for GLib:
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4120
Signed-off-by: Akihiko Odaki
---
Changes in v6:
- Avoid referring owner as "the object that tracks the region's
reference count".
- Noted that memroy_r
hew.org/QEMU/
docs/devel/submitting-a-patch.rst describes the details.
Regards,
Akihiko Odaki
Allow user to attach SR-IOV VF to a virtio-pci PF.
Signed-off-by: Akihiko Odaki
---
include/hw/virtio/virtio-pci.h | 1 +
hw/virtio/virtio-pci.c | 20 +++-
2 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/include/hw/virtio/virtio-pci.h b/include/hw/virtio
Signed-off-by: Akihiko Odaki
---
docs/system/sriov.rst | 3 ++-
include/hw/pci/pcie_sriov.h | 7 +--
hw/pci/pcie_sriov.c | 8 +++-
hw/virtio/virtio-pci.c | 16 ++--
4 files changed, 24 insertions(+), 10 deletions(-)
diff --git a/docs/system/sriov.rst b
A device cannot be a SR-IOV PF and a VF at the same time.
Signed-off-by: Akihiko Odaki
---
hw/pci/pcie_sriov.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/hw/pci/pcie_sriov.c b/hw/pci/pcie_sriov.c
index 1eb4358256de..109b2ebcccba 100644
--- a/hw/pci/pcie_sriov.c
+++ b/hw/pci
SR-IOV requires PCI Express.
Signed-off-by: Akihiko Odaki
---
hw/pci/pcie_sriov.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/hw/pci/pcie_sriov.c b/hw/pci/pcie_sriov.c
index 109b2ebcccba..a5b546abe8bb 100644
--- a/hw/pci/pcie_sriov.c
+++ b/hw/pci/pcie_sriov.c
@@ -42,6 +42,11
A virtio-net device can be added as a SR-IOV VF to another virtio-pci
device that will be the PF.
Signed-off-by: Akihiko Odaki
---
hw/virtio/virtio-net-pci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/virtio/virtio-net-pci.c b/hw/virtio/virtio-net-pci.c
index e18953ad674b
-creatable VFs can be attached calls
pcie_sriov_pf_init_from_user_created_vfs() during realization and
pcie_sriov_pf_exit() when exiting.
Signed-off-by: Akihiko Odaki
---
include/hw/pci/pci_device.h | 6 +-
include/hw/pci/pcie_sriov.h | 18 +++
hw/pci/pci.c| 62 ++
hw/pci
OV VFs with virtio-net-pci.
[1]
https://patchew.org/QEMU/1689731808-3009-1-git-send-email-yui.wash...@gmail.com/
[2] https://lore.kernel.org/all/5d46f455-f530-4e5e-9ae7-13a2297d4...@daynix.com/
Co-developed-by: Yui Washizu
Signed-off-by: Akihiko Odaki
---
Changes in v8:
- Rebased.
- Link to
Signed-off-by: Akihiko Odaki
---
MAINTAINERS | 1 +
docs/system/index.rst | 1 +
docs/system/sriov.rst | 36
3 files changed, 38 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 38a290e9c2ce..b0821a17c4fa 100644
--- a/MAINTAINERS
+++ b
A SR-IOV VF cannot have a ROM BAR.
Co-developed-by: Yui Washizu
Signed-off-by: Akihiko Odaki
---
hw/pci/pci.c | 8
1 file changed, 8 insertions(+)
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 8f160c0c0d8a..c4fa32dc987a 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -2432,6
pci_config_get_bar_addr() had a division by vf_stride. vf_stride needs
to be non-zero when there are multiple VFs, but the specification does
not prohibit to make it zero when there is only one VF.
Do not perform the division for the first VF to avoid division by zero.
Signed-off-by: Akihiko
pci_new() aborts when creating a VF with addr >= PCI_DEVFN_MAX.
Signed-off-by: Akihiko Odaki
---
docs/pcie_sriov.txt | 8 +---
include/hw/pci/pcie_sriov.h | 5 +++--
hw/net/igb.c| 10 +++---
hw/nvme/ctrl.c | 22 ++
hw/
It is no longer used.
Signed-off-by: Akihiko Odaki
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Markus Armbruster
---
include/hw/qdev-core.h | 4
hw/core/qdev.c | 1 -
system/qdev-monitor.c | 12 +++-
3 files changed, 7 insertions(+), 10 deletions(-)
diff --git a
it is safe to give it a new meaning. The values in
[2 ^ 31, 2 ^ 32) become invalid, but nobody should have typed these
values by chance.
Suggested-by: Markus Armbruster
Signed-off-by: Akihiko Odaki
Reviewed-by: Markus Armbruster
---
include/hw/pci/pci_device.h | 2 +-
hw/pci/pc
VFs are automatically created by PF, and creating zpci for them will
result in unexpected usage of fids. Currently QEMU does not support
multifunction for s390x so we don't need zpci for VFs anyway.
Signed-off-by: Akihiko Odaki
---
hw/s390x/s390-pci-bus.c | 21 +++--
1
num_vfs is not migrated so use PCI_SRIOV_CTRL_VFE and PCI_SRIOV_NUM_VF
instead.
Signed-off-by: Akihiko Odaki
---
include/hw/pci/pcie_sriov.h | 1 -
hw/pci/pcie_sriov.c | 38 +++---
hw/pci/trace-events | 2 +-
3 files changed, 28 insertions
pcie_sriov doesn't have code to restore its state after migration, but
igb, which uses pcie_sriov, naively claimed its migration capability.
Add code to register VFs after migration and fix igb migration.
Fixes: 3a977deebe6b ("Intrdocue igb device emulation")
Signed-off-by
Disable SR-IOV VF devices by reusing code to power down PCI devices
instead of removing them when the guest requests to disable VFs. This
allows to realize devices and report VF realization errors at PF
realization time.
Signed-off-by: Akihiko Odaki
---
include/hw/pci/pci.h| 5
A device gets automatically unrealized when being unparented.
Signed-off-by: Akihiko Odaki
---
hw/pci/pcie_sriov.c | 4
1 file changed, 4 deletions(-)
diff --git a/hw/pci/pcie_sriov.c b/hw/pci/pcie_sriov.c
index e9b23221d713..499becd5273f 100644
--- a/hw/pci/pcie_sriov.c
+++ b/hw/pci
Release VFs failed to realize just as we do in unregister_vfs().
Fixes: 7c0fa8dff811 ("pcie: Add support for Single Root I/O Virtualization
(SR/IOV)")
Signed-off-by: Akihiko Odaki
---
hw/pci/pcie_sriov.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/pci/pcie_sriov.
A PF may automatically create VFs and the PF may be function 0.
Signed-off-by: Akihiko Odaki
Reviewed-by: Shivaprasad G Bhat
Tested-by: Shivaprasad G Bhat
---
hw/ppc/spapr_pci.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
The renamed state will not only represent powering state of PFs, but
also represent SR-IOV VF enablement in the future.
Signed-off-by: Akihiko Odaki
---
include/hw/pci/pci.h| 7 ++-
include/hw/pci/pci_device.h | 2 +-
hw/pci/pci.c| 14 +++---
hw/pci
1 - 100 of 913 matches
Mail list logo