To solve above problem, use new interface of Xen, xc_pcidev_get_gsi to get
gsi and use xc_physdev_map_pirq_gsi to map pirq when dom0 is PVH.
Signed-off-by: Jiqian Chen
Signed-off-by: Huang Rui
Signed-off-by: Jiqian Chen
---
Hi All,
This is v10 to support passthrough on Xen when dom0 is PVH.
To solve above problem, use new interface of Xen, xc_pcidev_get_gsi to get
gsi and use xc_physdev_map_pirq_gsi to map pirq when dom0 is PVH.
Signed-off-by: Jiqian Chen
Signed-off-by: Huang Rui
Signed-off-by: Jiqian Chen
---
Hi All,
This is v9 to support passthrough on Xen when dom0 is PVH.
v8-
To solve above problem, use new interface of Xen, xc_pcidev_get_gsi to get
gsi and use xc_physdev_map_pirq_gsi to map pirq when dom0 is PVH.
Signed-off-by: Jiqian Chen
Signed-off-by: Huang Rui
Signed-off-by: Jiqian Chen
---
Hi All,
This is v8 to support passthrough on Xen when dom0 is PVH.
v7-
then guest can check
this bit, if this bit is set, the devices resetting will not be done, and
then the display can work after resuming.
No_Soft_Reset bit is implemented for all virtio devices, and was tested
only on virtio-gpu device. Set it false by default for safety.
Signed-off-by: Jiqian
Hi all,
This is the v11 patch to support S3.
v11 makes below changes:
* patch#1 no changes.
* patch#2 add "x-" prefix to pcie-pm-no-soft-reset and add old machine
compability.
Best regards,
Jiqian Chen
v10 makes below changes:
* patch#1 change the description of commit message.
*
of PM_CTRL is writable.
Only when flag VIRTIO_PCI_FLAG_INIT_PM is set, need to reset state.
Fixes: 27ce0f3afc9dd ("fix Power Management Control Register for PCI Express
virtio devices"
Signed-off-by: Jiqian Chen
---
hw/virtio/virtio-pci.c | 8 +++-
1 file changed, 7 insertions(+),
Hi All,
This is v7 series to support passthrough on Xen when dom0 is PVH.
v6->v7 changes:
* Due to changes in the implementation of obtaining gsi in the kernel and Xen.
Change to use
xc_physdev_gsi_from_dev, that requires passing in sbdf instead of irq.
Best regards,
Jiqian Chen
v5-
ion supported by Xen tools.
Signed-off-by: Huang Rui
Signed-off-by: Jiqian Chen
---
hw/xen/xen-host-pci-device.c | 19 +++
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/hw/xen/xen-host-pci-device.c b/hw/xen/xen-host-pci-device.c
index 8c6e9a1716a2..2fe6a60434ba 100644
--
then guest can check
this bit, if this bit is set, the devices resetting will not be done, and
then the display can work after resuming.
No_Soft_Reset bit is implemented for all virtio devices, and was tested
only on virtio-gpu device. Set it false by default for safety.
Signed-off-by: Jiqian
of PM_CTRL is writable.
Only when flag VIRTIO_PCI_FLAG_INIT_PM is set, need to reset state.
Fixes: 27ce0f3afc9dd ("fix Power Management Control Register for PCI Express
virtio devices"
Signed-off-by: Jiqian Chen
---
hw/virtio/virtio-pci.c | 8 +++-
1 file changed, 7 insertions(+),
Hi all,
This is the v10 patch to support S3.
v10 makes below changes:
* patch#1 change the description of commit message.
* patch#2 no changes.
Best regards,
Jiqian Chen
v9 makes below changes:
* patch#1 no changes
* patch#2 remove unnecessary parentheses.
add some comments to
Hi All,
This is v6 series to support passthrough on Xen when dom0 is PVH.
v5->v6 changes:
* Due to changes in the implementation of obtaining gsi in the kernel and Xen.
Change to use xc_physdev_gsi_from_irq, instead of gsi sysfs.
Best regards,
Jiqian Chen
v4->v5 changes:
* Add rev
new function supported by
Xen tools.
Signed-off-by: Huang Rui
Signed-off-by: Jiqian Chen
---
hw/xen/xen-host-pci-device.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/hw/xen/xen-host-pci-device.c b/hw/xen/xen-host-pci-device.c
index 8c6e9a1716a2..5e9aa9679e3e 100644
--- a
Fix bug imported by 27ce0f3afc9dd25d21b43bbce505157afd93d111
(fix Power Management Control Register for PCI Express virtio devices)
Only state of PM_CTRL is writable.
Only when flag VIRTIO_PCI_FLAG_INIT_PM is set, need to reset state.
Signed-off-by: Jiqian Chen
---
hw/virtio/virtio-pci.c | 8
then guest can check
this bit, if this bit is set, the devices resetting will not be done, and
then the display can work after resuming.
No_Soft_Reset bit is implemented for all virtio devices, and was tested
only on virtio-gpu device. Set it false by default for safety.
Signed-off-by: Jiqian
.
keep No_Soft_Reset bit false by default for safety.
Best regards,
Jiqian Chen
v8 makes below changes:
* Add a new patch#1 to fix a problem import by
27ce0f3afc9dd25d21b43bbce505157afd93d111,
the right action is that only the state of PM_CTRL can be clear when
resetting.
* patch#2 is
Fix bug imported by 27ce0f3afc9dd25d21b43bbce505157afd93d111
(fix Power Management Control Register for PCI Express virtio devices)
Only state of PM_CTRL is writable.
Only when flag VIRTIO_PCI_FLAG_INIT_PM is set, need to reset state.
Signed-off-by: Jiqian Chen
---
hw/virtio/virtio-pci.c | 8
then guest can check
this bit, if this bit is set, the devices resetting will not be done, and
then the display can work after resuming.
Signed-off-by: Jiqian Chen
---
hw/virtio/virtio-pci.c | 29 +
include/hw/virtio/virtio-pci.h | 5 +
2 files change
No_Soft_Reset bit, and in this
version, I
rename function and change some condition sequence.
Best regards,
Jiqian Chen
v7 makes below changes:
* Tested this patch with Qemu on Xen hypervisor. Depending on kernel
patch (virtio: Add support for no-reset virtio PCI PM:
https://lore.kernel.org/lkml
o get gsi. Then xc_physdev_map_pirq()
will success.
This v2 on qemu side is the same as the v1
(qemu
https://lore.kernel.org/xen-devel/20230312092244.451465-19-ray.hu...@amd.com/),
just call
xc_physdev_gsi_from_irq() to get gsi from irq.
Jiqian Chen (1):
xen: Use gsi instead of irq for map
use gsi number that
read from gsi sysfs if it exists.
Signed-off-by: Huang Rui
Signed-off-by: Jiqian Chen
Reviewed-by: Stefano Stabellini
---
RFC: discussions ongoing on the Linux side where/how to expose the gsi
---
hw/xen/xen-host-pci-device.c | 7 +++
hw/xen/xen-host-pci-device.h | 1 +
then guest can check
this bit, if this bit is set, the devices resetting will not be done, and
then the display can work after resuming.
Signed-off-by: Jiqian Chen
---
hw/virtio/virtio-pci.c | 38 +-
include/hw/virtio/virtio-pci.h | 5 +
2 files ch
value of flag VIRTIO_PCI_FLAG_PM_NO_SOFT_RESET_BIT to
false
* Fixed coding style violation
* Modified the content of the comments.
* Removed useless flag PCI_PM_CTRL_DATA_SCALE_MASK.
Best regards,
Jiqian Chen
V6:
In current code, when guest does S3, virtio devices are reset during that
process
-spec.
(https://lists.oasis-open.org/archives/virtio-comment/202401/msg00077.html)
Best regards,
Jiqian Chen
V5:
Hi all,
v5 makes below changes:
* Since this series patches add a new mechanism that let virtgpu and Qemu can
negotiate
their reset behavior, and other guys hope me can improve
then guest can check
this bit, if this bit is set, the devices resetting will not be done, and
then the display can work after resuming.
Signed-off-by: Jiqian Chen
---
hw/virtio/virtio-pci.c | 37 +-
include/hw/virtio/virtio-pci.h | 5 +
2 files ch
use gsi number that
read from gsi sysfs if it exists.
Co-developed-by: Huang Rui
Signed-off-by: Jiqian Chen
---
hw/xen/xen-host-pci-device.c | 7 +++
hw/xen/xen-host-pci-device.h | 1 +
hw/xen/xen_pt.c | 6 +-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/hw/
uccess.
This v2 on qemu side is the same as the v1 ( qemu
https://lore.kernel.org/xen-devel/20230312092244.451465-19-ray.hu...@amd.com/),
just call
xc_physdev_gsi_from_irq() to get gsi from irq.
Jiqian Chen (1):
xen: Use gsi instead of irq for mapping pirq
hw/xen/xen-host-pci-device
ide:
https://lore.kernel.org/xen-devel/20231124104136.3263722-1-jiqian.c...@amd.com/T/#t
Jiqian Chen (1):
xen: Use gsi instead of irq for mapping pirq
hw/xen/xen-host-pci-device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
2.34.1
gsi sysfs.
Co-developed-by: Huang Rui
Signed-off-by: Jiqian Chen
---
hw/xen/xen-host-pci-device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/xen/xen-host-pci-device.c b/hw/xen/xen-host-pci-device.c
index 8c6e9a1716..e270ac2631 100644
--- a/hw/xen/xen-host-pci-device.c
++
xc_physdev_gsi_from_irq() to get gsi from irq.
v2 on kernel side:
https://lore.kernel.org/lkml/20231124103123.3263471-1-jiqian.c...@amd.com/T/#t
v2 on Xen side:
https://lore.kernel.org/xen-devel/20231124104136.3263722-1-jiqian.c...@amd.com/T/#t
Jiqian Chen (1):
xen/pci: get gsi from irq for passthrough
in current code,
that is irq not gsi, so it will fail when mapping.
For above reason, on Xen side, we add a new function to
translate irq to gsi. And at here, we call that function
to get the correct gsi number.
Signed-off-by: Jiqian Chen
Signed-off-by: Huang Rui
---
hw/xen/xen-host-pci-devic
o
devices to affect the behavior of Qemu, not just virtio gpu device.
Signed-off-by: Jiqian Chen
---
transport-pci.tex | 7 +++
1 file changed, 7 insertions(+)
diff --git a/transport-pci.tex b/transport-pci.tex
index a5c6719..2543536 100644
--- a/transport-pci.tex
+++ b/transport-p
to trace this issue:
https://gitlab.com/qemu-project/qemu/-/issues/1860
Best regards,
Jiqian Chen
v4:
no v4 patches.
V4 of Qemu patch:
https://lore.kernel.org/qemu-devel/20230719074726.1613088-1-jiqian.c...@amd.com/T/#t
No v4 of kernel patch
v3:
makes below changes:
* Use enum for freeze mode, so
freeze_mode
to be FREEZE_S3, so that virtio devices can change their reset behavior
on Qemu side according to that mode.
Signed-off-by: Jiqian Chen
---
hw/virtio/virtio-pci.c | 5 +
hw/virtio/virtio.c | 1 +
include/hw/virtio/virtio.h | 2 ++
3 files changed, 8 insertions(+)
diff
splay. As a result, guest's screen can't come back to
the time when it was suspended.
So when freeze_mode is set FREEZE_S3 by guest, we can know that guest
is doing S3, and we can prevent Qemu to destroy the resources.
Signed-off-by: Jiqian Chen
---
hw/display/virtio-gpu-gl.c | 9 ++
ources, so that the display can come back
after resuming.
V5 of kernel patch:
https://lore.kernel.org/lkml/20230919104607.2282248-1-jiqian.c...@amd.com/T/#t
The link to trace this issue:
https://gitlab.com/qemu-project/qemu/-/issues/1860
Best regards,
Jiqian Chen
v4:
Hi all,
Thanks for Gerd
in
restore().
The link to trace this issue:
https://gitlab.com/qemu-project/qemu/-/issues/1860
Best regards,
Jiqian Chen
v4:
Link:
no v4 of kernel patch.
V4 of Qemu patch:
https://lore.kernel.org/qemu-devel/20230720120816.8751-1-jiqian.c...@amd.com/
v3:
makes below changes:
* Use enum for free
set
freeze_mode to be FREEZE_S3, so that virtio devices can change their
reset behavior on Qemu side according to that mode.
Signed-off-by: Jiqian Chen
---
drivers/virtio/virtio.c| 13 +
drivers/virtio/virtio_pci_modern.c | 9 +
drivers/virtio/virtio_pci
initializes virtqueues. And then, Qemu and guest
can communicate normally.
Signed-off-by: Jiqian Chen
---
drivers/gpu/drm/virtio/virtgpu_drv.c | 23 +
drivers/gpu/drm/virtio/virtgpu_drv.h | 1 +
drivers/gpu/drm/virtio/virtgpu_kms.c | 30 +++-
3 files
Hi all,
I hope you’ll forgive me if this disturb you. Since it has been almost two
months since the latest patch was sent out, I didn't receive any reply, so I
rebase the latest master branch and sent it again. I am looking forward to
getting your response.
Best regards,
Jiqian Chen
v4:
H
th guest,
so it added a new feature flag VIRTIO_GPU_F_FREEZE_S3, so
that guest and host can negotiate whenever freeze_S3 is
supported or not.
Signed-off-by: Jiqian Chen
---
hw/display/virtio-gpu-base.c | 3 +++
hw/display/virtio-gpu-gl.c | 10 ++-
hw/display/virtio-gpu-virgl.c | 7 ++
guest and host can
negotiate whenever freeze_S3 is supported or not.
Signed-off-by: Jiqian Chen
---
device-types/gpu/description.tex | 42
1 file changed, 42 insertions(+)
diff --git a/device-types/gpu/description.tex b/device-types/gpu/description.tex
index 4
Hi all,
I hope you’ll forgive me if this disturb you. Since it has been almost two
months since the latest patch was sent out, I didn't receive any reply, so I
rebase the latest master branch and sent it again. I am looking forward to
getting your response.
Best regards,
Jiqian Chen
v3:
H
Hi all,
I hope you’ll forgive me if this disturb you. Since it has been almost two
months since the latest patch was sent out, I didn't receive any reply, so I
rebase the latest master branch and sent it again. I am looking forward to
getting your response.
Best regards,
Jiqian Chen
v3:
H
a new feature flag VIRTIO_GPU_F_FREEZE_S3, so that guest and
host can negotiate whenever freeze_S3 is supported or not.
Signed-off-by: Jiqian Chen
---
drivers/gpu/drm/virtio/virtgpu_debugfs.c | 1 +
drivers/gpu/drm/virtio/virtgpu_drv.c | 39
drivers/gpu/drm/virtio/vir
kernel.org/lkml/20230720115805.8206-1-jiqian.c...@amd.com/T/#t
Best regards,
Jiqian Chen.
v3:
link,
https://lore.kernel.org/qemu-devel/20230719074726.1613088-1-jiqian.c...@amd.com/T/#t
Hi all,
Thanks for Michael S. Tsirkin's advice. V3 makes below changes:
* Remove changes in file incl
th guest,
so it added a new feature flag VIRTIO_GPU_F_FREEZE_S3, so
that guest and host can negotiate whenever freeze_S3 is
supported or not.
Signed-off-by: Jiqian Chen
---
hw/display/virtio-gpu-base.c | 3 ++
hw/display/virtio-gpu-gl.c | 10 ++-
hw/display/virtio-gpu-virgl.c | 7 ++
v3:
Hi all,
Thanks for Michael S. Tsirkin's advice. V3 makes below changes:
* Remove changes in file include/standard-headers/linux/virtio_gpu.h
I am not supposed to edit this file and it will be imported after
the patches of linux kernel was merged.
Best regards,
Jiqian Chen.
v2:
, so
it added a new feature flag VIRTIO_GPU_F_FREEZING, so
that guest and host can negotiate whenever freezing is
supported or not.
Signed-off-by: Jiqian Chen
---
hw/display/virtio-gpu-base.c | 3 ++
hw/display/virtio-gpu-gl.c | 9 +-
hw/display/virtio-gpu-virgl.c | 7 +
hw/displ
lso needs hot-plug support.
* Add a new feature flag VIRTIO_GPU_F_FREEZING, so that guest and
host can negotiate whenever freezing is supported or not.
Best regards,
Jiqian Chen.
v1:
link:
https://lore.kernel.org/qemu-devel/20230608025655.1674357-1-jiqian.c...@amd.com/
Hi all,
I am working
, so
it added a new feature flag VIRTIO_GPU_F_FREEZING, so
that guest and host can negotiate whenever freezing is
supported or not.
Signed-off-by: Jiqian Chen
---
hw/display/virtio-gpu-base.c| 3 ++
hw/display/virtio-gpu-gl.c | 9 +++-
hw/display/vir
is will prevent destroying
resources and resetting renderer when guest calls into
virtio_gpu_gl_reset. If guest is during resuming, it sets
freezing to false, and then virtio_gpu_gl_reset will keep
its origin actions and has no other impaction.
Signed-off-by: Jiqian Chen
---
hw/display/
that guest is suspending, it will not destroy resources and will
not reset renderer. If freezing is set to false, Qemu will do its origin
actions, and has no other impaction.
And now, display can come back and applications can continue their
status after guest resumes.
Jiqian Chen (1):
virtgpu: d
53 matches
Mail list logo