RE: [PATCH v2 0/4] Support dynamic MSI-X allocation

2023-09-24 Thread Liu, Jing2
Hi Alex, > On Sat, 9/23/2023 4:57AM, Alex Williamson wrote: > > On Mon, 18 Sep 2023 05:45:03 -0400 > Jing Liu wrote: > > > Changes since v1: > > - v1: > > https://www.mail-archive.com/qemu-devel@nongnu.org/msg982842.html > > - Revise Qemu to QEMU. (Cédric) > > - Add g_free when failure of gett

RE: [PATCH v2 2/4] vfio/pci: enable vector on dynamic MSI-X allocation

2023-09-24 Thread Liu, Jing2
Hi Alex, > On Sat, 9/23/2023 4:55 AM, Alex Williamson wrote: > On Mon, 18 Sep 2023 05:45:05 -0400 > Jing Liu wrote: > > > The vector_use callback is used to enable vector that is unmasked in > > guest. The kernel used to only support static MSI-X allocation. When > > allocating a new interrupt

RE: [PATCH v2 4/4] vfio/pci: enable MSI-X in interrupt restoring on dynamic allocation

2023-09-20 Thread Liu, Jing2
Hi Cédric, > On 9/19/2023 11:21 PM, Cédric Le Goater wrote: > > On 9/18/23 11:45, Jing Liu wrote: > > During migration restoring, vfio_enable_vectors() is called to restore > > enabling MSI-X interrupts for assigned devices. It sets the range from > > 0 to nr_vectors to kernel to enable MSI-X and

RE: [PATCH v1 0/4] Support dynamic MSI-X allocation

2023-09-15 Thread Liu, Jing2
Hi Cédric, Thanks for this information. I'll send v2 later. Jing > On 9/15/2023 3:42 PM, Cédric Le Goater wrote: > > On 9/15/23 09:40, Liu, Jing2 wrote: > > Friendly ping to have your valuable inputs and comments. > > Thanks very much. > > I think that was

RE: [PATCH v1 0/4] Support dynamic MSI-X allocation

2023-09-15 Thread Liu, Jing2
Friendly ping to have your valuable inputs and comments. Thanks very much. BRs, Jing > On 8/22/2023 3:29 PM, Jing Liu wrote: > Changes since RFC v1: > - RFC v1: https://www.mail-archive.com/qemu- > de...@nongnu.org/msg978637.html > - Revise the comments. (Alex) > - Report error of getting irq in

RE: [PATCH v1 3/4] vfio/pci: use an invalid fd to enable MSI-X

2023-09-04 Thread Liu, Jing2
Hi Igor, On Wed, August 30, 2023 6:49 PM, Igor Mammedov wrote: > > On Wed, 30 Aug 2023 10:03:33 +0000 > "Liu, Jing2" wrote: > ... > > > > +/* > > > > + * Get MSI-X enabled, but no vector enabled, by setting vector 0 >

RE: [PATCH v1 3/4] vfio/pci: use an invalid fd to enable MSI-X

2023-08-30 Thread Liu, Jing2
Hi Cédric, On 8/29/2023 10:04 PM, Cédric Le Goater wrote: > On 8/22/23 09:29, Jing Liu wrote: > > Guests typically enable MSI-X with all of the vectors masked in the > > MSI-X vector table. To match the guest state of device, Qemu enables > > MSI-X by > > QEMU is preferred to Qemu. Got it. > >

RE: [PATCH v1 1/4] vfio/pci: detect the support of dynamic MSI-X allocation

2023-08-30 Thread Liu, Jing2
Hi Cédric, Thank you for your reviewing. On 8/29/2023 9:33 PM, Cédric Le Goater wrote: > Hello Jing, > > On 8/22/23 09:29, Jing Liu wrote: > > Kernel provides the guidance of dynamic MSI-X allocation support of > > passthrough device, by clearing the VFIO_IRQ_INFO_NORESIZE flag to > > guide user

RE: [PATCH RFC v1 3/3] vfio/pci: dynamic MSI-X allocation in interrupt restoring

2023-08-01 Thread Liu, Jing2
Hi Alex, > On July 28, 2023 1:25 AM, Alex Williamson wrote: > > On Thu, 27 Jul 2023 03:24:10 -0400 > Jing Liu wrote: > > > During migration restoring, vfio_enable_vectors() is called to restore > > enabling MSI-X interrupts for assigned devices. It sets the range from > > 0 to nr_vectors to ke

RE: [PATCH RFC v1 1/3] vfio/pci: detect the support of dynamic MSI-X allocation

2023-07-31 Thread Liu, Jing2
Hi C. > On July 31, 2023 3:26 PM, Cédric Le Goater wrote: > > On 7/31/23 05:57, Liu, Jing2 wrote: > > Hi C. > > > >> On July 28, 2023 4:44 PM, Cédric Le Goater wrote: > >> > >> [ ... ] > >> > >>> Sorry I didn't

RE: [PATCH RFC v1 2/3] vfio/pci: enable vector on dynamic MSI-X allocation

2023-07-31 Thread Liu, Jing2
Hi Alex, > On July 28, 2023 1:25 AM, Alex Williamson wrote: > > On Thu, 27 Jul 2023 03:24:09 -0400 > Jing Liu wrote: > > > The vector_use callback is used to enable vector that is unmasked in > > guest. The kernel used to only support static MSI-X allocation. When > > allocating a new interru

RE: [PATCH RFC v1 1/3] vfio/pci: detect the support of dynamic MSI-X allocation

2023-07-30 Thread Liu, Jing2
Hi C. > On July 28, 2023 4:44 PM, Cédric Le Goater wrote: > > [ ... ] > > > Sorry I didn't quite understand "info.flags be tested against > VFIO_IRQ_INFO_NORESIZE". > > I saw kernel < 6.4 simply added NORESIZE to info.flags and latest kernel > > adds > if has_dyn_msix. > > Would you please kin

RE: [PATCH RFC v1 1/3] vfio/pci: detect the support of dynamic MSI-X allocation

2023-07-30 Thread Liu, Jing2
Hi Alex, > On July 28, 2023 11:41 PM, Alex Williamson wrote: > > On Fri, 28 Jul 2023 10:27:17 +0200 > Cédric Le Goater wrote: > > > On 7/28/23 10:09, Liu, Jing2 wrote: > > > Hi Alex, > > > > > > Thanks very much for reviewing the patches. > &

RE: [PATCH RFC v1 1/3] vfio/pci: detect the support of dynamic MSI-X allocation

2023-07-28 Thread Liu, Jing2
Hi Alex, Thanks very much for reviewing the patches. > On July 28, 2023 1:25 AM, Alex Williamson wrote: > > On Thu, 27 Jul 2023 03:24:08 -0400 > Jing Liu wrote: > > > From: Reinette Chatre > > > > Kernel provides the guidance of dynamic MSI-X allocation support of > > passthrough device, by

RE: [PATCH RFC v1 1/3] vfio/pci: detect the support of dynamic MSI-X allocation

2023-07-28 Thread Liu, Jing2
Hi C., Thanks very much for reviewing the patches. > On July 28, 2023 12:58 AM, Cédric Le Goater wrote: > > Hello Jing, > > On 7/27/23 09:24, Jing Liu wrote: > > From: Reinette Chatre > > > > Kernel provides the guidance of dynamic MSI-X allocation support of > > passthrough device, by cleari

Re: [virtio-dev] Re: [PATCH v2 4/5] virtio-mmio: add MSI interrupt feature support

2020-02-11 Thread Liu, Jing2
On 2/11/2020 3:40 PM, Jason Wang wrote: On 2020/2/11 下午2:02, Liu, Jing2 wrote: On 2/11/2020 12:02 PM, Jason Wang wrote: On 2020/2/11 上午11:35, Liu, Jing2 wrote: On 2/11/2020 11:17 AM, Jason Wang wrote: On 2020/2/10 下午5:05, Zha Bin wrote: From: Liu Jiang Userspace VMMs (e.g. Qemu

Re: [virtio-dev] Re: [PATCH v2 2/5] virtio-mmio: refactor common functionality

2020-02-11 Thread Liu, Jing2
On 2/11/2020 7:19 PM, Michael S. Tsirkin wrote: On Mon, Feb 10, 2020 at 05:05:18PM +0800, Zha Bin wrote: From: Liu Jiang Common functionality is refactored into virtio_mmio_common.h in order to MSI support in later patch set. Signed-off-by: Liu Jiang Co-developed-by: Zha Bin Signed-off-by

Re: [virtio-dev] Re: [PATCH v2 4/5] virtio-mmio: add MSI interrupt feature support

2020-02-10 Thread Liu, Jing2
On 2/11/2020 12:02 PM, Jason Wang wrote: On 2020/2/11 上午11:35, Liu, Jing2 wrote: On 2/11/2020 11:17 AM, Jason Wang wrote: On 2020/2/10 下午5:05, Zha Bin wrote: From: Liu Jiang Userspace VMMs (e.g. Qemu microvm, Firecracker) take advantage of using virtio over mmio devices as a

Re: [virtio-dev] Re: [PATCH v2 4/5] virtio-mmio: add MSI interrupt feature support

2020-02-10 Thread Liu, Jing2
On 2/11/2020 11:17 AM, Jason Wang wrote: On 2020/2/10 下午5:05, Zha Bin wrote: From: Liu Jiang Userspace VMMs (e.g. Qemu microvm, Firecracker) take advantage of using virtio over mmio devices as a lightweight machine model for modern cloud. The standard virtio over MMIO transport layer only su

Re: [virtio-dev] [PATCH v2 5/5] virtio-mmio: MSI vector and event mapping

2020-02-10 Thread Liu, Jing2
On 1/29/2020 6:14 PM, Michael S. Tsirkin wrote: On Tue, Jan 21, 2020 at 09:54:33PM +0800, Jing Liu wrote: Bit 1 msi_sharing reported in the MsiState register indicates the mapping mode device uses. Bit 1 is 0 - device uses MSI non-sharing mode. This indicates vector per event and fixed static

Re: [Qemu-devel] [Issues] PCI hotplug does not work well on pc platform?

2019-02-17 Thread Liu, Jing2
Hi Marcel and Igor, Thanks very much for your help! On 2/14/2019 10:42 PM, Marcel Apfelbaum wrote: [...] I have two questions. 1. PCI hotplug on pci.0 must manually rescan in guest. The ACPI hotplug handler sends the GPE event to guest but it seems guest doesn't receive it? I tried to ope

Re: [Qemu-devel] [Issues] PCI hotplug does not work well on pc platform?

2019-02-12 Thread Liu, Jing2
Hi Igor, Thanks for your reply! On 2/5/2019 11:47 PM, Igor Mammedov wrote: On Wed, 30 Jan 2019 21:02:10 +0800 "Liu, Jing2" wrote: Hi everyone, I have two questions. 1. PCI hotplug on pci.0 must manually rescan in guest. The ACPI hotplug handler sends the GPE event to guest bu

[Qemu-devel] [Issues] PCI hotplug does not work well on pc platform?

2019-01-30 Thread Liu, Jing2
Hi everyone, I have two questions. 1. PCI hotplug on pci.0 must manually rescan in guest. The ACPI hotplug handler sends the GPE event to guest but it seems guest doesn't receive it? I tried to open ACPI debug level/layer to 0x, in order to see if there is any message after device_add

[Qemu-devel] [Question] Hotplug rescan/remove by manual

2018-11-28 Thread Liu, Jing2
Hi guys, When I tested hotplug on pci.0 on pc platform, it seems that we have to echo 1 > /sys/bus/pci/rescan manually in guest? Is this a non-complete feature because of something like gpe interrupt issue? For hot-unplug, I uses echo 1 > /sys/bus/pci//remove but this seems only remove the devic

Re: [Qemu-devel] [PATCH v3 2/2] hw/pci: add PCI resource reserve capability to legacy PCI bridge

2018-09-19 Thread Liu, Jing2
Hi Marcle and Michael, Re-ping if this is not in the PR list :) Thanks, Jing On 9/6/2018 10:16 AM, Liu, Jing2 wrote: Hi Marcle, On 9/6/2018 12:36 AM, Marcel Apfelbaum wrote: On 09/05/2018 05:08 AM, Liu, Jing2 wrote: Hi Marcel and Michael, Got no response so I would like to ask if I need

Re: [Qemu-devel] [PATCH v3 2/2] hw/pci: add PCI resource reserve capability to legacy PCI bridge

2018-09-05 Thread Liu, Jing2
Hi Marcle, On 9/6/2018 12:36 AM, Marcel Apfelbaum wrote: On 09/05/2018 05:08 AM, Liu, Jing2 wrote: Hi Marcel and Michael, Got no response so I would like to ask if I need do something more for this serial? :) Hi Jing, Maybe Michael is PTO, let's wait a few more days. Thank you,

Re: [Qemu-devel] [PATCH v3 2/2] hw/pci: add PCI resource reserve capability to legacy PCI bridge

2018-09-04 Thread Liu, Jing2
Hi Marcel and Michael, Got no response so I would like to ask if I need do something more for this serial? :) Thanks, Jing On 8/30/2018 10:58 AM, Liu, Jing2 wrote: Ping Michael :) Thanks, Jing On 8/25/2018 12:51 AM, Marcel Apfelbaum wrote: On 08/21/2018 06:18 AM, Jing Liu wrote: Add hint

Re: [Qemu-devel] [PATCH v3 2/2] hw/pci: add PCI resource reserve capability to legacy PCI bridge

2018-08-29 Thread Liu, Jing2
Ping Michael :) Thanks, Jing On 8/25/2018 12:51 AM, Marcel Apfelbaum wrote: On 08/21/2018 06:18 AM, Jing Liu wrote: Add hint to firmware (e.g. SeaBIOS) to reserve addtional BUS/IO/MEM/PREF resource for legacy pci-pci bridge. Add the resource reserve capability deleting in pci_bridge_dev_exitfn

Re: [Qemu-devel] [PATCH v3 2/2] hw/pci: add PCI resource reserve capability to legacy PCI bridge

2018-08-26 Thread Liu, Jing2
Hi Marcel, On 8/25/2018 12:51 AM, Marcel Apfelbaum wrote: On 08/21/2018 06:18 AM, Jing Liu wrote: Add hint to firmware (e.g. SeaBIOS) to reserve addtional BUS/IO/MEM/PREF resource for legacy pci-pci bridge. Add the resource reserve capability deleting in pci_bridge_dev_exitfn. Signed-off-by: J

Re: [Qemu-devel] [PATCH v3 2/2] hw/pci: add PCI resource reserve capability to legacy PCI bridge

2018-08-23 Thread Liu, Jing2
Hi Marcel, On 8/22/2018 2:58 PM, Marcel Apfelbaum wrote: Hi Jing, On 08/22/2018 04:53 AM, Liu, Jing2 wrote: Hi Marcel, On 8/21/2018 5:59 PM, Marcel Apfelbaum wrote: On 08/21/2018 06:18 AM, Jing Liu wrote: Add hint to firmware (e.g. SeaBIOS) to reserve addtional BUS/IO/MEM/PREF resource

Re: [Qemu-devel] [PATCH v3 2/2] hw/pci: add PCI resource reserve capability to legacy PCI bridge

2018-08-21 Thread Liu, Jing2
Hi Marcel, On 8/21/2018 5:59 PM, Marcel Apfelbaum wrote: On 08/21/2018 06:18 AM, Jing Liu wrote: Add hint to firmware (e.g. SeaBIOS) to reserve addtional BUS/IO/MEM/PREF resource for legacy pci-pci bridge. Add the resource reserve capability deleting in pci_bridge_dev_exitfn. Signed-off-by:

Re: [Qemu-devel] [PATCH v2 2/3] hw/pci: add teardown function for PCI resource reserve capability

2018-08-20 Thread Liu, Jing2
Hi Marcel, On 8/20/2018 9:38 PM, Marcel Apfelbaum wrote: Hi Jing, On 08/20/2018 05:58 AM, Liu, Jing2 wrote: Hi Marcel, On 8/18/2018 12:10 AM, Marcel Apfelbaum wrote: Hi Jing, On 08/16/2018 12:28 PM, Jing Liu wrote: Clean up the PCI config space of resource reserve capability. Signed

Re: [Qemu-devel] [PATCH v2 1/3] hw/pci: factor PCI reserve resources to a separate structure

2018-08-19 Thread Liu, Jing2
Hi Marcel, On 8/17/2018 11:49 PM, Marcel Apfelbaum wrote: Hi Jing, [...] +/* + * additional resources to reserve on firmware init + */ +typedef struct PCIResReserve { +    uint32_t bus_reserve; +    uint64_t io_reserve; +    uint64_t mem_reserve; The patch looks good to me, I noticed you re

Re: [Qemu-devel] [PATCH v2 2/3] hw/pci: add teardown function for PCI resource reserve capability

2018-08-19 Thread Liu, Jing2
Hi Marcel, On 8/18/2018 12:10 AM, Marcel Apfelbaum wrote: Hi Jing, On 08/16/2018 12:28 PM, Jing Liu wrote: Clean up the PCI config space of resource reserve capability. Signed-off-by: Jing Liu ---   hw/pci/pci_bridge.c | 9 +   include/hw/pci/pci_bridge.h | 1 +   2 files chang

Re: [Qemu-devel] [PATCH v2 0/3] hw/pci: PCI resource reserve capability

2018-08-19 Thread Liu, Jing2
Hi Marcel, On 8/18/2018 12:18 AM, Marcel Apfelbaum wrote: Hi Jing, On 08/16/2018 12:28 PM, Jing Liu wrote: This patch serial is about PCI resource reserve capability. First patch refactors the resource reserve fields in GenPCIERoorPort structure out to another new structure, called "PCIResRes

Re: [Qemu-devel] [PATCH v2 0/3] hw/pci: PCI resource reserve capability

2018-08-16 Thread Liu, Jing2
Hi Laszlo, Thanks very much for your reminder. Looking forward to comments from all! Thanks, Jing On 8/17/2018 12:17 AM, Laszlo Ersek wrote: Hi, On 08/16/18 11:28, Jing Liu wrote: This patch serial is about PCI resource reserve capability. First patch refactors the resource reserve fields in

Re: [Qemu-devel] [PATCH] hw/pci: add pci capability to pci-pci bridge

2018-08-16 Thread Liu, Jing2
On 8/14/2018 9:27 PM, Laszlo Ersek wrote: [...]   +cap_error: +    msi_uninit(dev); (4) This error handler doesn't look entirely correct; we can reach it without having initialized MSI. (MSI setup is conditional; and even if we attempt it, it is permitted to fail with "msi=auto".) Therefore

Re: [Qemu-devel] [PATCH] hw/pci: add pci capability to pci-pci bridge

2018-08-14 Thread Liu, Jing2
On 8/12/2018 3:11 PM, Marcel Apfelbaum wrote: [...] I don't know what to suggest for the new capability's teardown, in pci_bridge_dev_exitfn()  -- should we just ignore it (as suggested by this patch)? No, we should remove it properly. I think it is not considered a "big" issue since addin

Re: [Qemu-devel] [PATCH] hw/pci: add pci capability to pci-pci bridge

2018-08-14 Thread Liu, Jing2
Hi Marcel, On 8/12/2018 3:11 PM, Marcel Apfelbaum wrote: Hi Laszlo, [...]   hw/pci-bridge/pci_bridge_dev.c | 20   1 file changed, 20 insertions(+) +cap_error: +    msi_uninit(dev); (4) This error handler doesn't look entirely correct; we can reach it without having initi

Re: [Qemu-devel] [PATCH] hw/pci: add pci capability to pci-pci bridge

2018-08-14 Thread Liu, Jing2
Hi Laszlo, Sorry for late reply. I missed these mails because of wrong filter. And thanks very much for comments. My reply as belows. On 8/7/2018 8:19 PM, Laszlo Ersek wrote: On 08/07/18 09:04, Jing Liu wrote: [...] @@ -46,6 +46,12 @@ struct PCIBridgeDev { uint32_t flags; OnOffA

Re: [Qemu-devel] [Consult] nfs-vsocks support

2018-04-15 Thread Liu, Jing2
On 4/4/2018 5:45 PM, Stefan Hajnoczi wrote: On Wed, Mar 28, 2018 at 07:25:21PM +0800, Liu, Jing2 wrote: On 3/26/2018 6:12 PM, Liu, Jing2 wrote: Hi Stefan, Thank you very much for the response! It truly gave me much help. On 3/24/2018 12:02 AM, Stefan Hajnoczi wrote: [...] Could you give

Re: [Qemu-devel] [Consult] nfs-vsocks support

2018-03-28 Thread Liu, Jing2
On 3/26/2018 6:12 PM, Liu, Jing2 wrote: Hi Stefan, Thank you very much for the response! It truly gave me much help. On 3/24/2018 12:02 AM, Stefan Hajnoczi wrote: [...] Could you give me some help and thanks in advance! Here is a script that launches nfsd and runs a guest: https

Re: [Qemu-devel] [Consult] nfs-vsocks support

2018-03-26 Thread Liu, Jing2
Hi Stefan, Thank you very much for the response! It truly gave me much help. On 3/24/2018 12:02 AM, Stefan Hajnoczi wrote: On Fri, Mar 23, 2018 at 05:54:53PM +0800, Liu, Jing2 wrote: I am currently trying to use nfs-vsocks on x86 for vitural machine filesystem by some manuals on https

[Qemu-devel] [Consult] nfs-vsocks support

2018-03-23 Thread Liu, Jing2
Hello, I am currently trying to use nfs-vsocks on x86 for vitural machine filesystem by some manuals on https://www.spinics.net/lists/linux-nfs/msg64563.html and https://lwn.net/Articles/647516/ It tells the quickstart steps with the following codes but I got some problems as listed. * Lin