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

2024-10-30 Thread Gao Shiyuan via
-pci-notify-virtio-net Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2576 Fixes: ffa8a3e3b2e6 ("virtio-pci: Add lookup subregion of VirtIOPCIRegion MR") Co-developed-by: Zuo Boqun Signed-off-by: Zuo Boqun Co-developed-by: Wang Liang Signed-off-by: Wang Liang Signed-off-by: G

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

2024-10-29 Thread Gao,Shiyuan
001000-38001fff (prio 0, i/o): > virtio-pci-isr-virtio-net > 38002000-38002fff (prio 0, i/o): > virtio-pci-device-virtio-net > 38003000-38003fff (prio 0, i/o): > virtio-pci-notify-virtio-net > > Resolves: https://gitlab.

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

2024-10-09 Thread Gao Shiyuan via
-pci-notify-virtio-net Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2576 Fixes: ffa8a3e3b2e6 ("virtio-pci: Add lookup subregion of VirtIOPCIRegion MR") Signed-off-by: Gao Shiyuan Signed-off-by: Zuo Boqun Signed-off-by: Wang Liang --- hw/pci/pci_bridge.c|

[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/

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

2024-10-09 Thread Gao,Shiyuan
> > diff --git a/target/i386/cpu.c b/target/i386/cpu.c > > index 85ef7452c0..339131a39a 100644 > > --- a/target/i386/cpu.c > > +++ b/target/i386/cpu.c > > @@ -7093,6 +7093,7 @@ static void x86_cpu_reset_hold(Object *obj, ResetType > > type) > > env->a20_mask = ~0x0; > > env->smbase = 0x3; > >

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

2024-10-08 Thread Gao,Shiyuan
> >> > diff --git a/hw/pci/pci_bridge.c b/hw/pci/pci_bridge.c index > >> > 6a4e38856d..74683e7445 100644 > >> > --- a/hw/pci/pci_bridge.c > >> > +++ b/hw/pci/pci_bridge.c > >> > @@ -380,6 +380,7 @@ void pci_bridge_initfn(PCIDevice *dev, const char > >> *typename) > >> > sec_bus->map_irq = br->map_i

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

2024-10-07 Thread Gao,Shiyuan
Ping. > 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 + > targ

[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/

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

2024-09-24 Thread Gao,Shiyuan
> Make sure to version your patch series. For example, via >     $ git format-patch -v1 ... Thanks, the first version forgot to CC qemu-devel, I resent it. I'll add version to next version. > > > As shown below, if a virtio PCI device is attached under a pci-bridge, the > > MR > > of VirtIO

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

2024-09-23 Thread Gao Shiyuan via
-notify-virtio-blk Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2576 Fixes: ffa8a3e ("virtio-pci: Add lookup subregion of VirtIOPCIRegion MR") Signed-off-by: Gao Shiyuan Signed-off-by: Zuo Boqun --- hw/pci/pci_bridge.c| 2 ++ hw/virtio/virtio-pci.c | 3 +++

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

2024-09-19 Thread Gao,Shiyuan
stead of only lookup container >> MR. >> >> Fixes: a93c8d8 ("virtio-pci: Replace modern_as with direct access to >> modern_bar") >> >> Co-developed-by: Zuo Boqun >> Signed-off-by: Gao Shiyuan >> Signed-off-by: Zuo Boqun >> --- >>

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

2024-09-18 Thread Gao,Shiyuan
gion MR instead of only lookup container > > MR. > > > > Fixes: a93c8d8 ("virtio-pci: Replace modern_as with direct access to > > modern_bar") > > > > Co-developed-by: Zuo Boqun > > Signed-off-by: Gao Shiyuan > > Signed-off-by: Zuo Boqun

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

2024-09-03 Thread Gao Shiyuan via
ss to modern_bar") Co-developed-by: Zuo Boqun Signed-off-by: Gao Shiyuan Signed-off-by: Zuo Boqun --- hw/virtio/virtio-pci.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) --- v2 -> v3: * modify commit message * remove unused variable and move mrs to the inner block * replace

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

2024-08-29 Thread Gao,Shiyuan
> >--- a/hw/virtio/virtio-pci.c > >+++ b/hw/virtio/virtio-pci.c > >@@ -610,19 +610,29 @@ static MemoryRegion > >*virtio_address_space_lookup(VirtIOPCIProxy *proxy, > > { > > int i; > > VirtIOPCIRegion *reg; > >+    MemoryRegion *mr = NULL; > > `mr` looks unused. > > >+    MemoryRegionSecti

[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

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

2024-08-20 Thread Gao Shiyuan via
notify MR instead of notify MR. Add lookup subregion of VirtIOPCIRegion MR instead of only lookup container MR. Fixes: a93c8d8 ("virtio-pci: Replace modern_as with direct access to modern_bar") Co-developed-by: Zuo Boqun Signed-off-by: Gao Shiyuan Signed-off-by: Zuo Boqun --

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

2024-08-16 Thread Gao,Shiyuan
> > 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 regio

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

2024-08-16 Thread Gao,Shiyuan
dware accelerator by kickfd from qemu notify_ops. Thanks. > -Original Message----- > From: Gao Shiyuan > Date: Mon, 12 Aug 2024 20:09:01 +0800 > Subject: [PATCH 1/1] virtio-pci: return RAM device MR when set host notifier > success > > When vhost-user backend register memory

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

2024-08-12 Thread Gao Shiyuan via
will exit to QEMU and invoke virtio_address_space_write. When vhost-user backend register memory region based host notifiers, return RAM device MR instead of notify region MR is suitable. Co-developed-by: Zuo Boqun Signed-off-by: Gao Shiyuan Signed-off-by: Zuo Boqun --- hw/virtio/virtio-pci.c

Re: [v2 1/1] hw/i386/acpi-build: add OSHP method support for SHPC driver load

2024-07-02 Thread Gao,Shiyuan
> > > > > > If I want to use ACPI PCI hotplug in the pxb bridge, what else need > > > > > > to be done? > > > > > > > > > > does it have to be hotplug directly into pxb or > > > > > would be it be sufficient to have hotplug support > > > > > on pci-bridge attached to a pxb? > > > > > > > > It's su

Re: [v2 1/1] hw/i386/acpi-build: add OSHP method support for SHPC driver load

2024-07-01 Thread Gao,Shiyuan
> > > > If I want to use ACPI PCI hotplug in the pxb bridge, what else need to > > > > be done? > > > > > > does it have to be hotplug directly into pxb or > > > would be it be sufficient to have hotplug support > > > on pci-bridge attached to a pxb? > > > > It's sufficient to hotplug support on p

Re: [v2 1/1] hw/i386/acpi-build: add OSHP method support for SHPC driver load

2024-07-01 Thread Gao,Shiyuan
> > > > the PCI bridge will fail when we use SHPC Native type: > > > > > > > >   [3.336059] shpchp :00:03.0: Requesting control of SHPC hotplug > > > >via OSHP (\_SB_.PCI0.S28_) > > > >   [3.337408] shpchp :00:03.0: Requesting control of SHPC hotplug > > > >via OSHP (\_SB_.PCI0) > > > >  

Re: [v2 1/1] hw/i386/acpi-build: add OSHP method support for SHPC driver load

2024-06-27 Thread Gao,Shiyuan
> > > that OS cannot get control of SHPC hotplug and hotplug device to > > > the PCI bridge will fail when we use SHPC Native type: > > > > > > [3.336059] shpchp :00:03.0: Requesting control of SHPC hotplug via > > > OSHP (\_SB_.PCI0.S28_) > > > [3.337408] shpchp :00:03.0: Requesting c

Re: [v2 1/1] hw/i386/acpi-build: add OSHP method support for SHPC driver load

2024-06-27 Thread Gao,Shiyuan
> > that OS cannot get control of SHPC hotplug and hotplug device to > > the PCI bridge will fail when we use SHPC Native type: > > > >   [3.336059] shpchp :00:03.0: Requesting control of SHPC hotplug via > >OSHP (\_SB_.PCI0.S28_) > >   [3.337408] shpchp :00:03.0: Requesting control of SHP

Re: [PATCH 1/1] hw/i386/acpi-build: add OSHP method support for SHPC driver load

2024-06-24 Thread Gao,Shiyuan
> > > > +static Aml *build_oshp_method(void) > > > > +{ > > > > +    Aml *method; > > > > + > > > > +    /* > > > > +     * Request control of SHPC hotplug via OSHP method, > > > > +     * no need parameter and return value in acpi_pcihp. > > > > +     */ > > > > > > Quote spec and earliest version

Re: [PATCH 1/1] hw/i386/acpi-build: add OSHP method support for SHPC driver load

2024-06-24 Thread Gao,Shiyuan
> > SHPC driver will be loaded fail in i440fx platform, the dmesg shows > > that OS cannot get control of SHPC hotplug and hotplug device to > > the PCI bridge will fail when we use SHPC Native type: > > > >   [3.336059] shpchp :00:03.0: Requesting control of SHPC hotplug via > >OSHP (\_SB_.PC

Failed to hot-plug device to pxb bridge

2024-06-23 Thread Gao,Shiyuan
> I checked the guest dmesg and found that failed load shpc driver. > [0.98] shpchp :00:05.0: Requesting control of SHPC hotplug via > OSHP (\_SB_.PCI0.S28_) > [0.968238] shpchp :00:05.0: Requesting control of SHPC hotplug via > OSHP (\_SB_.PCI0) > [0.969160] shpchp

Re: Failed to hot-plug device to pxb bridge

2024-06-20 Thread Gao,Shiyuan
Sorry for not replying earlier, I have been busy with other things. > > Hi Igor, Daniel and all: > > > > > > https://lore.kernel.org/all/20220422135101.65796...@redhat.com/t/#r831d589f243c24334a09995620b74408847a87a0 > > > > This message discuss hotplug device to pxb bridge. At the end, Igor >

Failed to hot-plug device to pxb bridge

2024-05-30 Thread Gao,Shiyuan
Hi Igor, Daniel and all: https://lore.kernel.org/all/20220422135101.65796...@redhat.com/t/#r831d589f243c24334a09995620b74408847a87a0 This message discuss hotplug device to pxb bridge. At the end, Igor suggested enable shpc on pxb bridge: pxb_dev_realize_common(): qdev_prop_set_bit(bds, PC

Re: [PATCH] kvm: limit the maximum CPUID.0xA.edx[0..4] to 3

2024-01-10 Thread Gao,Shiyuan
> Anyone has suggestion? > > When the host kernel before this commit 2e8cd7a3b828 ("kvm: x86: limit the > maximum number of vPMU > fixed counters to 3") on icelake microarchitecture and newer, execute cpuid > in the Guest: > > Architecture Performance Monitoring Features (0xa/edx): > number o

Re: [PATCH] vnc,ps2: fix the PS/2 mouse work badly when connect VNC

2023-07-17 Thread Gao,Shiyuan
> Hi > > On Mon, Jul 17, 2023 at 5:43 PM Gao,Shiyuan wrote: > > > > Hi > > > > > > On Mon, Jul 17, 2023 at 4:53 PM Gao,Shiyuan > > wrote: > > > > > > > > > > > > > > > > > > So move the guest mo

Re: [PATCH] vnc,ps2: fix the PS/2 mouse work badly when connect VNC

2023-07-17 Thread Gao,Shiyuan
> Hi > > On Mon, Jul 17, 2023 at 4:53 PM Gao,Shiyuan wrote: > > > > > > > > > > > > So move the guest mouse pointer to (0, 0) of the screen when connect > > the > > > > > > VNC, and then move the mouse pointer to the cursor

Re: [PATCH] vnc,ps2: fix the PS/2 mouse work badly when connect VNC

2023-07-17 Thread Gao,Shiyuan
> On Mon, Jul 17, 2023 at 10:59:36AM +0800, Shiyuan Gao wrote: > > When only use PS/2 mouse without usb-tablet, the mouse pointer of the > > guest on the VNC will work badly that the cursor of VNC is inconsistent > > with the mouse pointer of guest. > > > > The reason is the PS/2 mouse use relative

Re: [PATCH] vnc,ps2: fix the PS/2 mouse work badly when connect VNC

2023-07-17 Thread Gao,Shiyuan
> > > > > > > So move the guest mouse pointer to (0, 0) of the screen when connect the > > > > VNC, and then move the mouse pointer to the cursor of VNC(absolute > > > > coordinates are also relative coordinates). > > > > > > > > > > > It's hardly a solution, you still have no clue what will be the

Re: [PATCH] vnc,ps2: fix the PS/2 mouse work badly when connect VNC

2023-07-17 Thread Gao,Shiyuan
Hi, > Hi Shiyuan > > On Mon, Jul 17, 2023 at 7:16 AM Shiyuan Gao wrote: > > > When only use PS/2 mouse without usb-tablet, the mouse pointer of the > > guest on the VNC will work badly that the cursor of VNC is inconsistent > > with the mouse pointer of guest. > > > > > Afaik, VNC doesn't support