[PATCH 1/1] pcie-root-port: Fast PCIe root ports for new machine

2024-11-17 Thread Gao Shiyuan via
Some hardware devices now support PCIe 5.0, so change the default speed of the PCIe root port on new machine types. For passthrough Nvidia H20, this will be able to increase the h2d/d2h bandwidth ~17%. Origin: [CUDA Bandwidth Test] - Starting... Running on... Device 0: NVIDIA H20 Quick Mode

[PATCH v3 1/1] virtio-pci: fix memory_region_find for VirtIOPCIRegion's MR

2024-10-30 Thread Gao Shiyuan via
As shown below, if a virtio PCI device is attached under a pci-bridge, the MR of VirtIOPCIRegion does not belong to any address space. So memory_region_find cannot be used to search for this MR. Introduce the virtio-pci and pci_bridge address spaces to solve this problem. Before: memory-region: p

[PATCH v2 1/1] virtio-pci: fix memory_region_find for VirtIOPCIRegion's MR

2024-10-09 Thread Gao Shiyuan via
As shown below, if a virtio PCI device is attached under a pci-bridge, the MR of VirtIOPCIRegion does not belong to any address space. So memory_region_find cannot be used to search for this MR. Introduce the virtio-pci and pci_bridge address spaces to solve this problem. Before: memory-region: p

[PATCH v2 1/1] x86: Add support save/load HWCR MSR

2024-10-09 Thread Gao Shiyuan via
KVM commit 191c8137a939 ("x86/kvm: Implement HWCR support") introduced support for emulating HWCR MSR. Add support for QEMU to save/load this MSR for migration purposes. Signed-off-by: Gao Shiyuan Signed-off-by: Wang Liang --- target/i386/cpu.h | 5 + target/i386/kvm/kvm.c | 12 ++

[PATCH v1 1/1] x86: Add support save/load HWCR MSR

2024-09-25 Thread Gao Shiyuan via
KVM commit 191c8137a939 ("x86/kvm: Implement HWCR support") introduced support for emulating HWCR MSR. Add support for QEMU to save/load this MSR for migration purposes. Signed-off-by: Gao Shiyuan --- target/i386/cpu.c | 1 + target/i386/cpu.h | 5 + target/i386/kvm/kvm.c | 12 +++

[PATCH 1/1] virtio-pci: fix memory_region_find for VirtIOPCIRegion's MR

2024-09-23 Thread Gao Shiyuan via
As shown below, if a virtio PCI device is attached under a pci-bridge, the MR of VirtIOPCIRegion does not belong to any address space. So memory_region_find cannot be used to search for this MR. Introduce the virtio-pci and pci_bridge_pci address spaces to solve this problem. Before: memory-regi

[PATCH v3 1/1] virtio-pci: Add lookup subregion of VirtIOPCIRegion MR

2024-09-03 Thread Gao Shiyuan via
Now virtio_address_space_lookup only lookup common/isr/device/notify MR and exclude their subregions. When VHOST_USER_PROTOCOL_F_HOST_NOTIFIER enable, the notify MR has host-notifier subregions and we need use host-notifier MR to notify the hardware accelerator directly instead of eventfd notify.

[PATCH 1/1] platform-bus: fix refcount leak

2024-08-29 Thread Gao Shiyuan via
Temporary object causes reference count leakage. Signed-off-by: Gao Shiyuan --- hw/core/platform-bus.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/core/platform-bus.c b/hw/core/platform-bus.c index b8487b26b6..dc58bf505a 100644 --- a/hw/core/platform-bus.c +++ b/hw

[PATCH V2 1/1] virtio-pci: Add lookup subregion of VirtIOPCIRegion MR

2024-08-20 Thread Gao Shiyuan via
When VHOST_USER_PROTOCOL_F_HOST_NOTIFIER feature negotiated and virtio_queue_set_host_notifier_mr success on system blk device's queue, the VM can't load MBR if the notify region's address above 4GB. Assign the address of notify region in the modern bar above 4G, the vp_notify in SeaBIOS will use

[PATCH 1/1] virtio-pci: return RAM device MR when set host notifier success

2024-08-12 Thread Gao Shiyuan via
When vhost-user backend register memory region based host notifiers, we should return RAM device MR of notify region MR's subregion in virtio_address_space_lookup. In seabios, it will use virtio PCI Configration Access Capability access notify region when assign notify region above 4GB. This will