On 4/30/24 04:50, Michael S. Tsirkin wrote:
On Mon, Apr 29, 2024 at 08:13:56PM +1000, Gavin Shan wrote:
This is suggested by Michael S. Tsirkin according to [1] and the goal
is to apply smp_rmb() inside vhost_get_avail_idx() if needed. With it,
the caller of the function needn't to worry about
ng in some places, but as non-empty
ring in other places. This patch doesn't attempt to change the existing
behaviour.
No functional change intended.
Signed-off-by: Michael S. Tsirkin
Reviewed-by: Gavin Shan
Acked-by: Will Deacon
---
v3: Improved commit log and comments as Michael suggested
--
On 4/30/24 04:44, Michael S. Tsirkin wrote:
On Mon, Apr 29, 2024 at 08:13:57PM +1000, Gavin Shan wrote:
From: "Michael S. Tsirkin"
All the callers of vhost_get_avail_idx() are concerned to the memory
*with* the memory barrier
Thanks, will be corrected in v3.
barrier, imposed
On 4/30/24 04:45, Michael S. Tsirkin wrote:
On Mon, Apr 29, 2024 at 08:13:58PM +1000, Gavin Shan wrote:
The local variable @last_avail_idx is equivalent to vq->last_avail_idx.
So the code can be simplified a bit by dropping the local variable
@last_avail_idx.
No functional change inten
On 4/29/24 17:02, Michael S. Tsirkin wrote:
On Tue, Apr 23, 2024 at 01:24:03PM +1000, Gavin Shan wrote:
This is suggested by Michael S. Tsirkin according to [1] and the goal
is to apply smp_rmb() inside vhost_get_avail_idx() if needed. With it,
the caller of the function needn't to worry about
Reformat the macros to use tab as the terminator for each line so
that it looks clean.
No functional change intended.
Signed-off-by: Gavin Shan
---
drivers/vhost/vhost.c | 60 +--
1 file changed, 30 insertions(+), 30 deletions(-)
diff --git a/drivers
Improve vhost_get_avail_head() so that the head or errno is returned.
With it, the relevant sanity checks are squeezed to vhost_get_avail_head()
and vhost_get_vq_desc() is further simplified.
No functional change intended.
Signed-off-by: Gavin Shan
---
drivers/vhost/vhost.c | 50
The local variable @last_avail_idx is equivalent to vq->last_avail_idx.
So the code can be simplified a bit by dropping the local variable
@last_avail_idx.
No functional change intended.
Signed-off-by: Gavin Shan
---
drivers/vhost/vhost.c | 7 +++
1 file changed, 3 insertions(+)
s advanced. With it, the callers needn't to worry
about the memory barrier.
No functional change intended.
Signed-off-by: Michael S. Tsirkin
[gshan: repainted vhost_get_avail_idx()]
Reviewed-by: Gavin Shan
Acked-by: Will Deacon
---
drivers/vhost/vhost.c | 106 +---
put}_user() by using tab instead of space
as the terminator for each line
Gavin Shan (3):
vhost: Drop variable last_avail_idx in vhost_get_vq_desc()
vhost: Improve vhost_get_avail_head()
vhost: Reformat vhost_{get, put}_user()
Michael S. Tsirkin (1):
vhost: Improve vhost_get_avail_
presses interrupts after all.
>> Virtio pmd is in the guest,but in host side,the msix is enabled,then
> >the device will triger Interrupt normally. I analysed this bug before,and I
> >think gavin is right.
> >Did I mak
ote.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url:
https://github.com/intel-lab-lkp/linux/commits/Gavin-Shan/vhost-Drop-variable-last_avail_idx-in-vhost_get_vq_desc/20240423-112803
base: https://git.kernel.
host os--
--hw
VF1 VF2
After the hardware completes DMA, it will still send an interrupt to the host
OS.
-Original Message-
From: Angus Chen angus.
On 4/23/24 06:46, Michael S. Tsirkin wrote:
On Mon, Apr 08, 2024 at 02:15:24PM +1000, Gavin Shan wrote:
On 3/30/24 19:02, Gavin Shan wrote:
On 3/28/24 19:31, Michael S. Tsirkin wrote:
On Thu, Mar 28, 2024 at 10:21:49AM +1000, Gavin Shan wrote:
All the callers of vhost_get_avail_idx
Reformat the macros to use tab as the terminator for each line so
that it looks clean.
No functional change intended.
Signed-off-by: Gavin Shan
---
drivers/vhost/vhost.c | 60 +--
1 file changed, 30 insertions(+), 30 deletions(-)
diff --git a/drivers
Improve vhost_get_avail_head() so that the head or errno is returned.
With it, the relevant sanity checks are squeezed to vhost_get_avail_head()
and vhost_get_vq_desc() is further simplified.
No functional change intended.
Signed-off-by: Gavin Shan
---
drivers/vhost/vhost.c | 43
to worry
about the memory barrier.
No functional change intended.
Suggested-by: Michael S. Tsirkin
Signed-off-by: Gavin Shan
---
drivers/vhost/vhost.c | 91 ---
1 file changed, 34 insertions(+), 57 deletions(-)
diff --git a/drivers/vhost/vhost.c b/drivers
The local variable @last_avail_idx is equivalent to vq->last_avail_idx.
So the code can be simplified a bit by dropping the local variable
@last_avail_idx.
No functional change intended.
Signed-off-by: Gavin Shan
---
drivers/vhost/vhost.c | 15 ++-
1 file changed, 6 inserti
put}_user() by using tab instead of space
as the terminator for each line
Gavin Shan (4):
vhost: Drop variable last_avail_idx in vhost_get_vq_desc()
vhost: Improve vhost_get_avail_idx() with smp_rmb()
vhost: Improve vhost_get_avail_head()
vhost: Reformat vhost_{get, put}_u
les the
hardware's MSIX
interrupts based on the number of queues of the device
- Original Message -
From: Michael S. Tsirkin m...@redhat.com
Sent: April 22, 2024 20:09
To: Gavin Liu gavin@jaguarmicro.com
Cc: jasow...@redhat.com; Angus Chen angus.c...@jaguarmicro.com;
virtualizat...@
n ensuring the quality and effectiveness of this patch.
Your feedback and review are highly appreciated. Please let me know if
you have any questions or require further information.
Thank you for your time and consideration.
Best regards,
Yuxue Liu
-Original Message-----
F
Hi Michael,
On 3/30/24 19:02, Gavin Shan wrote:
On 3/28/24 19:31, Michael S. Tsirkin wrote:
On Thu, Mar 28, 2024 at 10:21:49AM +1000, Gavin Shan wrote:
All the callers of vhost_get_avail_idx() are concerned to the memory
barrier, imposed by smp_rmb() to ensure the order of the available
ring
On 3/28/24 19:31, Michael S. Tsirkin wrote:
On Thu, Mar 28, 2024 at 10:21:49AM +1000, Gavin Shan wrote:
All the callers of vhost_get_avail_idx() are concerned to the memory
barrier, imposed by smp_rmb() to ensure the order of the available
ring entry read and avail_idx read.
Improve
On 3/27/24 17:42, Jason Wang wrote:
On Wed, Mar 27, 2024 at 3:35 PM Gavin Shan wrote:
On 3/27/24 14:08, Gavin Shan wrote:
On 3/27/24 12:44, Jason Wang wrote:
On Wed, Mar 27, 2024 at 10:34 AM Jason Wang wrote:
On Wed, Mar 27, 2024 at 7:39 AM Gavin Shan wrote:
A smp_rmb() has been missed
On 3/27/24 22:07, Michael S. Tsirkin wrote:
On Wed, Mar 27, 2024 at 09:38:45AM +1000, Gavin Shan wrote:
A smp_rmb() has been missed in vhost_vq_avail_empty(), spotted by
Will Deacon . Otherwise, it's not ensured the
available ring entries pushed by guest can be observed by vhost
in time
to worry
about the memory barrier.
Suggested-by: Michael S. Tsirkin
Signed-off-by: Gavin Shan
---
drivers/vhost/vhost.c | 75 +++
1 file changed, 26 insertions(+), 49 deletions(-)
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 32686c79c41d
grace-hopper (ARM64) platform.
/home/gavin/sandbox/qemu.main/build/qemu-system-aarch64 \
-accel kvm -machine virt,gic-version=host -cpu host \
-smp maxcpus=1,cpus=1,sockets=1,clusters=1,cores=1,threads=1 \
-m 4096M,slots=16,maxmem=64G \
-object
grace-hopper (ARM64) platform.
/home/gavin/sandbox/qemu.main/build/qemu-system-aarch64 \
-accel kvm -machine virt,gic-version=host -cpu host \
-smp maxcpus=1,cpus=1,sockets=1,clusters=1,cores=1,threads=1 \
-m 4096M,slots=16,maxmem=64G \
-object
The issue was reported by Yihuang Yu on NVidia's grace-hopper (ARM64)
platform. The wrong head (available ring entry) is seen by the guest
when running 'netperf' on the guest and running 'netserver' on another
NVidia's grace-grace machine.
/home/gavin/sandbox/qemu.main/build/qemu-system-aarch64
On 3/27/24 14:08, Gavin Shan wrote:
On 3/27/24 12:44, Jason Wang wrote:
On Wed, Mar 27, 2024 at 10:34 AM Jason Wang wrote:
On Wed, Mar 27, 2024 at 7:39 AM Gavin Shan wrote:
A smp_rmb() has been missed in vhost_vq_avail_empty(), spotted by
Will Deacon . Otherwise, it's not ensured
On 3/27/24 12:41, Jason Wang wrote:
On Wed, Mar 27, 2024 at 7:39 AM Gavin Shan wrote:
A smp_rmb() has been missed in vhost_enable_notify(), inspired by
Will Deacon . Otherwise, it's not ensured the
available ring entries pushed by guest can be observed by vhost
in time, leading to stale
On 3/27/24 12:44, Jason Wang wrote:
On Wed, Mar 27, 2024 at 10:34 AM Jason Wang wrote:
On Wed, Mar 27, 2024 at 7:39 AM Gavin Shan wrote:
A smp_rmb() has been missed in vhost_vq_avail_empty(), spotted by
Will Deacon . Otherwise, it's not ensured the
available ring entries pushed by guest can
On 3/27/24 09:14, Gavin Shan wrote:
On 3/27/24 01:46, Will Deacon wrote:
On Tue, Mar 26, 2024 at 11:43:13AM +, Will Deacon wrote:
Ok, long shot after eyeballing the vhost code, but does the diff below
help at all? It looks like vhost_vq_avail_empty() can advance the value
saved in 'vq
On 3/27/24 09:38, Gavin Shan wrote:
The issue was reported by Yihuang Yu on NVidia's grace-hopper (ARM64)
platform. The wrong head (available ring entry) is seen by the guest
when running 'netperf' on the guest and running 'netserver' on another
NVidia's grace-grace machine.
/home/gavin
on NVidia's
grace-hopper (ARM64) platform.
/home/gavin/sandbox/qemu.main/build/qemu-system-aarch64 \
-accel kvm -machine virt,gic-version=host -cpu host \
-smp maxcpus=1,cpus=1,sockets=1,clusters=1,cores=1,threads=1 \
-m 4096M,slots=16,maxmem=64G
on NVidia's
grace-hopper (ARM64) platform.
/home/gavin/sandbox/qemu.main/build/qemu-system-aarch64 \
-accel kvm -machine virt,gic-version=host -cpu host \
-smp maxcpus=1,cpus=1,sockets=1,clusters=1,cores=1,threads=1 \
-m 4096M,slots=16,maxmem=64G
The issue was reported by Yihuang Yu on NVidia's grace-hopper (ARM64)
platform. The wrong head (available ring entry) is seen by the guest
when running 'netperf' on the guest and running 'netserver' on another
NVidia's grace-grace machine.
/home/gavin/sandbox/qemu.main/build/qemu-system-aarch64
I'm
unable
to hit the issue. I will try for more times to make sure the issue is really
resolved.
After that, I will post formal patches for review.
Thanks,
Gavin
On 3/20/24 17:14, Michael S. Tsirkin wrote:
On Wed, Mar 20, 2024 at 03:24:16PM +1000, Gavin Shan wrote:
On 3/20/24 10:49, Michael S. Tsirkin wrote:>
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index 6f7e5010a673..79456706d0bd 100644
--- a/drivers/vir
On 3/21/24 03:15, Keir Fraser wrote:
On Wed, Mar 20, 2024 at 03:24:16PM +1000, Gavin Shan wrote:
Before this patch was posted, I had debugging code to record last 16
transactions
to the available and used queue from guest and host side. It did reveal the
wrong
head was fetched from
2
001 129
002 074 // The last two heads published to guest is: 074, 036
003 036
004 075 <---
005 036
006 077
007 129
008 072
009 130
010 015
011 074
012 130
013 130
014 074
015 015
Thanks,
Gavin
On 3/20/24 04:22, Will Deacon wrote:
On Tue, Mar 19, 2024 at 02:59:23PM +1000, Gavin Shan wrote:
On 3/19/24 02:59, Will Deacon wrote:
drivers/virtio/virtio_ring.c | 12 +---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio
On 3/19/24 17:09, Michael S. Tsirkin wrote:
On Tue, Mar 19, 2024 at 04:49:50PM +1000, Gavin Shan wrote:
On 3/19/24 16:43, Michael S. Tsirkin wrote:
On Tue, Mar 19, 2024 at 04:38:49PM +1000, Gavin Shan wrote:
On 3/19/24 16:09, Michael S. Tsirkin wrote:
diff --git a/drivers/virtio
On 3/19/24 17:04, Michael S. Tsirkin wrote:
On Tue, Mar 19, 2024 at 04:54:15PM +1000, Gavin Shan wrote:
On 3/19/24 16:10, Michael S. Tsirkin wrote:
On Tue, Mar 19, 2024 at 02:09:34AM -0400, Michael S. Tsirkin wrote:
On Tue, Mar 19, 2024 at 02:59:23PM +1000, Gavin Shan wrote:
On 3/19/24 02:59
On 3/19/24 16:10, Michael S. Tsirkin wrote:
On Tue, Mar 19, 2024 at 02:09:34AM -0400, Michael S. Tsirkin wrote:
On Tue, Mar 19, 2024 at 02:59:23PM +1000, Gavin Shan wrote:
On 3/19/24 02:59, Will Deacon wrote:
[...]
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
On 3/19/24 16:43, Michael S. Tsirkin wrote:
On Tue, Mar 19, 2024 at 04:38:49PM +1000, Gavin Shan wrote:
On 3/19/24 16:09, Michael S. Tsirkin wrote:
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index 49299b1f9ec7..7d852811c912 100644
--- a/drivers/virtio
__mb()
Instruction Range of used time in ns
------
__smp_wmb() [32 1128032]
__smp_mb()[32 1160096]
__mb()[32 1162496]
Thanks,
Gavin
On 3/19/24 02:59, Will Deacon wrote:
On Thu, Mar 14, 2024 at 05:49:23PM +1000, Gavin Shan wrote:
The issue is reported by Yihuang Yu who have 'netperf' test on
NVidia's grace-grace and grace-hopper machines. The 'netperf'
client is started in the VM hosted by grace-hopper machine,
while
On 3/18/24 02:50, Michael S. Tsirkin wrote:
On Fri, Mar 15, 2024 at 09:24:36PM +1000, Gavin Shan wrote:
On 3/15/24 21:05, Michael S. Tsirkin wrote:
On Fri, Mar 15, 2024 at 08:45:10PM +1000, Gavin Shan wrote:
Yes, I guess smp_wmb() ('dmb') is buggy on NVidia's grace-hopper platform. I
tried
On 3/15/24 21:05, Michael S. Tsirkin wrote:
On Fri, Mar 15, 2024 at 08:45:10PM +1000, Gavin Shan wrote:
Yes, I guess smp_wmb() ('dmb') is buggy on NVidia's grace-hopper platform. I
tried
to reproduce it with my own driver where one thread writes to the shared buffer
and another thread reads
+ Will, Catalin and Matt from Nvidia
On 3/14/24 22:59, Michael S. Tsirkin wrote:
On Thu, Mar 14, 2024 at 10:50:15PM +1000, Gavin Shan wrote:
On 3/14/24 21:50, Michael S. Tsirkin wrote:
On Thu, Mar 14, 2024 at 08:15:22PM +1000, Gavin Shan wrote:
On 3/14/24 18:05, Michael S. Tsirkin wrote
On 3/14/24 21:50, Michael S. Tsirkin wrote:
On Thu, Mar 14, 2024 at 08:15:22PM +1000, Gavin Shan wrote:
On 3/14/24 18:05, Michael S. Tsirkin wrote:
On Thu, Mar 14, 2024 at 05:49:23PM +1000, Gavin Shan wrote:
The issue is reported by Yihuang Yu who have 'netperf' test on
NVidia's grace-grace
On 3/14/24 18:05, Michael S. Tsirkin wrote:
On Thu, Mar 14, 2024 at 05:49:23PM +1000, Gavin Shan wrote:
The issue is reported by Yihuang Yu who have 'netperf' test on
NVidia's grace-grace and grace-hopper machines. The 'netperf'
client is started in the VM hosted by grace-hopper machine,
while
/virtio_net.c::start_xmit()
and soft-lockup. The stale index 135 is fetched from the available
ring and published to the used ring by vhost, meaning we have
disordred write to the available ring element and available index.
/home/gavin/sandbox/qemu.main/build/qemu-system-aarch64
928ms to 864ms.
Signed-off-by: Gavin Shan
Reviewed-by: Keqian Zhu
---
arch/arm64/kvm/mmu.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c
index 192e0df2fc8e..2491b40a294a 100644
--- a/arch/arm64/kvm/mmu.c
+++ b/arch/arm64
We needn't expose the function as it's only used by mmu.c since it
was introduced by commit c64735554c0a ("KVM: arm: Add initial dirty
page locking support").
Signed-off-by: Gavin Shan
Reviewed-by: Keqian Zhu
---
arch/arm64/include/asm/kvm_host.h | 1 -
arch/arm64/kvm/mmu.c
find_vma_intersection() has been existing to search the intersected
vma. This uses the function where it's applicable, to simplify the
code.
Signed-off-by: Gavin Shan
Reviewed-by: Keqian Zhu
---
arch/arm64/kvm/mmu.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git
(Gavin)
* Drop patch to fix IPA limit boundary issue(Keqian)
* Comments on why we use __gfn_to_pfn_memslot() (Keqian)
Gavin Shan (3):
KVM: arm64: Hide kvm_mmu_wp_memory_region()
KVM: arm64: Use find_vma_intersection()
KVM: arm64: Don't retrieve memory slot again in page fault
Hi Keqian,
On 3/15/21 8:42 PM, Gavin Shan wrote:
On 3/15/21 7:04 PM, Keqian Zhu wrote:
On 2021/3/15 12:18, Gavin Shan wrote:
find_vma_intersection() has been existing to search the intersected
vma. This uses the function where it's applicable, to simplify the
code.
Signed-off-by: Gavin Shan
Hi Keqian,
On 3/15/21 7:25 PM, Keqian Zhu wrote:
On 2021/3/15 12:18, Gavin Shan wrote:
We needn't retrieve the memory slot again in user_mem_abort() because
the corresponding memory slot has been passed from the caller. This
I think you are right, though fault_ipa will be adjusted when we try
Hi Keqian,
On 3/15/21 6:33 PM, Keqian Zhu wrote:
FYI, this has been fixed by Marc in commit 262b003d059c.
Yeah, I didn't check 5.12.rc3 code where the issue has been
fixed. So please ignore this one and sorry for the noise.
Thanks,
Gavin
On 2021/3/15 12:18, Gavin Shan wrote:
The last
Hi Keqian,
On 3/15/21 7:04 PM, Keqian Zhu wrote:
On 2021/3/15 12:18, Gavin Shan wrote:
find_vma_intersection() has been existing to search the intersected
vma. This uses the function where it's applicable, to simplify the
code.
Signed-off-by: Gavin Shan
---
arch/arm64/kvm/mmu.c | 10
Hi Marc,
On 3/15/21 7:52 PM, Marc Zyngier wrote:
On Mon, 15 Mar 2021 04:18:42 +,
Gavin Shan wrote:
find_vma_intersection() has been existing to search the intersected
vma. This uses the function where it's applicable, to simplify the
code.
Signed-off-by: Gavin Shan
---
arch/arm64/kvm
928ms to 864ms.
Signed-off-by: Gavin Shan
---
arch/arm64/kvm/mmu.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c
index a5a8ade9fde4..4a4abcccfafb 100644
--- a/arch/arm64/kvm/mmu.c
+++ b/arch/arm64/kvm/mmu.c
@@ -846,7 +846,8
.
struct kvm_userspace_memory_region {
__u32 slot; /* 1*/
__u32 flags; /* 0*/
__u64 guest_phys_addr;/* 0xfff000 */
__u64 memory_size;/* 0x1000 */
__u64 userspace_addr;
};
Signed-off-by: Gavin
find_vma_intersection() has been existing to search the intersected
vma. This uses the function where it's applicable, to simplify the
code.
Signed-off-by: Gavin Shan
---
arch/arm64/kvm/mmu.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/kvm/mmu.c b
We needn't expose the function as it's only used by mmu.c.
Signed-off-by: Gavin Shan
---
arch/arm64/include/asm/kvm_host.h | 1 -
arch/arm64/kvm/mmu.c | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arm64/include/asm/kvm_host.h
b/arch/arm64/include/asm
The series includes several minior improvements to stage-2 page fault
handler: PATCH[1/2] are cleaning up the code. PATCH[3] fixes the address
range check on adding new memory slot. PATCH[4] don't retrieve the memory
slot again in the page fault handler to save a bit CPU cycles.
Gavin Shan (4
This adds document to explain the interface for asynchronous page
fault and how it works in general.
Signed-off-by: Gavin Shan
---
Documentation/virt/kvm/arm/apf.rst | 143 +++
Documentation/virt/kvm/arm/index.rst | 1 +
2 files changed, 144 insertions(+)
create
for the process, to be rescheduled. With the flag is set, there
is a head of wait-queue is associated with the process. The process
keeps rescheduling itself until the flag is cleared when page-ready
notification is received through (PPI) interrupt.
Signed-off-by: Gavin Shan
---
arch/arm64/include/asm
ough SMCCC interface. Besides, the version of the asynchronous
page fault is validated when the feature is enabled on the guest.
* The feature is disabled on guest when boot parameter "no-kvmapf"
is specified.
Signed-off-by: Gavin Shan
---
arch/arm64/kernel/Makefile |
page fault.
This also adds kernel option (CONFIG_KVM_GUEST), which is the umbrella
for the optimizations related to KVM para-virtualization.
Signed-off-by: Gavin Shan
---
arch/arm64/Kconfig | 11 +++
arch/arm64/include/asm/kvm_para.h | 12 +++-
arch/arm64
patches.
Signed-off-by: Gavin Shan
---
arch/arm64/kvm/async_pf.c | 119 ++
include/linux/arm-smccc.h | 5 ++
2 files changed, 124 insertions(+)
diff --git a/arch/arm64/kvm/async_pf.c b/arch/arm64/kvm/async_pf.c
index f73c406456e9..4734c5b26aa8 100644
--- a/arch
This exports the asynchronous page fault capability:
* Identify capability KVM_CAP_ASYNC_{PF, PF_INT}.
* Standardize SDEI event for asynchronous page fault.
* Enable kernel config CONFIG_KVM_ASYNC_{PF, PF_SLOT}.
Signed-off-by: Gavin Shan
---
arch/arm64/include/uapi/asm/kvm_sdei.h
notification. The region is represented by "struct kvm_vcpu_pv_apf_data".
The feature isn't enabled by CONFIG_KVM_ASYNC_PF yet. Also, the control
path isn't implemented and will be done in the subsequent patches.
Signed-off-by: Gavin Shan
---
arch/arm64/include/asm/kvm_host.h
KVM_ARM_ASYNC_PF_CMD_SET_CONTROL
Set control block when VM is migrated
Signed-off-by: Gavin Shan
---
arch/arm64/include/asm/kvm_host.h | 14 +++
arch/arm64/include/uapi/asm/kvm.h | 19 +
arch/arm64/kvm/arm.c | 6 +++
arch/arm64/kvm/async_pf.c | 64
fault in subsequent patches:
include/uapi/asm-generic/kvm_para.h
include/asm-generic/kvm_para.h
arch/arm64/include/uapi/asm/kvm_para.h
arch/arm64/include/asm/kvm_para.h
Signed-off-by: Gavin Shan
---
arch/arm64/include/asm/kvm_para.h | 27 ++
arch/arm64
nc_pf" is
associated with the worker, to track the work.
The feature isn't enabled by CONFIG_KVM_ASYNC_PF yet. Also, the
page-ready notification delivery and control path isn't implemented
and will be done in the subsequent patches.
Signed-off-by: Gavin Shan
---
arch/arm64/include/asm/kvm_hos
From: Will Deacon
We can advertise ourselves to guests as KVM and provide a basic features
bitmap for discoverability of future hypervisor services.
Signed-off-by: Will Deacon
Signed-off-by: Gavin Shan
---
arch/arm64/kvm/hypercalls.c | 27 ++-
1 file changed, 18
future. They are moved to mmu.c and renamed accordingly.
kvm_vcpu_trap_is_exec_fault()
is_exec_fault()
kvm_is_write_fault()
is_write_fault()
kvm_vcpu_trap_get_fault_level()
Replaced by esr_dabt_get_fault_level()
Signed-off-by: Gavin Shan
---
arch/arm64/include
-by: Gavin Shan
---
arch/x86/include/asm/kvm_host.h | 1 -
arch/x86/kvm/Kconfig| 1 +
arch/x86/kvm/mmu/mmu.c | 2 +-
arch/x86/kvm/x86.c | 86 +++--
4 files changed, 8 insertions(+), 82 deletions(-)
diff --git a/arch/x86/include/asm
compatible with KVM. Once this has been established,
additional services can be discovered via a feature bitmap.
Signed-off-by: Will Deacon
Signed-off-by: Gavin Shan
---
arch/arm64/include/asm/hypervisor.h | 11 ++
arch/arm64/kernel/setup.c | 32 +
include
patch. This shouldn't cause logical
changes.
Signed-off-by: Gavin Shan
---
include/linux/kvm_host.h | 43
1 file changed, 22 insertions(+), 21 deletions(-)
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index f3b1013fb22c..b6697ee1182e
in subsequent patches.
Signed-off-by: Gavin Shan
---
include/linux/kvm_host.h | 18 +
virt/kvm/Kconfig | 3 ++
virt/kvm/async_pf.c | 79
3 files changed, 100 insertions(+)
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
replaced by the newly
introduced helper as list_empty() and list_empty_careful() are
interchangeable.
The stub kvm_check_async_pf_completion() on !CONFIG_KVM_ASYNC_PF
is also introduced. It will be used by subsequent patch.
Signed-off-by: Gavin Shan
---
arch/x86/kvm/x86.c | 2 +-
include
o throughput and speed in
the scenario of post-copy live migration.
Chnagelog
=
v2:
* Rebase to v5.11.rc6 (Gavin)
* Split the patches(James)
* Allocate "struct kvm_arch_async_control" dymaicall
The owner of the SDEI event, like asynchronous page fault, need
know the state of injected SDEI event. This supports SDEI event
state updating by introducing notifier mechanism. It's notable
the notifier (handler) should be capable of migration.
Signed-off-by: Gavin Shan
---
arch/arm64/include
-by: Gavin Shan
---
arch/arm64/kvm/sdei.c | 68 +++
1 file changed, 68 insertions(+)
diff --git a/arch/arm64/kvm/sdei.c b/arch/arm64/kvm/sdei.c
index d3ea3eee154b..b022ce0a202b 100644
--- a/arch/arm64/kvm/sdei.c
+++ b/arch/arm64/kvm/sdei.c
@@ -206,6 +206,70
This supports SDEI_VERSION hypercall by returning v1.0.0 simply
when the functionality is supported on the VM and vCPU.
Signed-off-by: Gavin Shan
---
arch/arm64/kvm/sdei.c | 18 ++
1 file changed, 18 insertions(+)
diff --git a/arch/arm64/kvm/sdei.c b/arch/arm64/kvm/sdei.c
index
unregistered successfully.
Signed-off-by: Gavin Shan
---
arch/arm64/kvm/sdei.c | 61 +++
1 file changed, 61 insertions(+)
diff --git a/arch/arm64/kvm/sdei.c b/arch/arm64/kvm/sdei.c
index b4162efda470..a3ba69dc91cb 100644
--- a/arch/arm64/kvm/sdei.c
+++ b/arch/arm64
in
the interrupted context.
* If it's SDEI_EVENT_COMPLETE_AND_RESUME hypercall, IRQ exception
is injected.
Signed-off-by: Gavin Shan
---
arch/arm64/include/asm/kvm_emulate.h | 1 +
arch/arm64/include/asm/kvm_host.h| 1 +
arch/arm64/kvm/hyp/exception.c | 7 +++
arch/arm64/kvm
related to SDEI handling
* KVM_SDEI_CMD_SET_VCPU_STATE
Populate vCPU state related to SDEI handling
Signed-off-by: Gavin Shan
---
arch/arm64/include/asm/kvm_sdei.h | 1 +
arch/arm64/include/uapi/asm/kvm_sdei.h | 7 +
arch/arm64/kvm/arm.c | 3 +
arch/arm64/kvm
This supports SDEI_EVENT_ROUTING_SET hypercall. It's used by the
guest to set route mode and affinity for the registered KVM event.
It's only valid for the shared events. It's not allowed to do so
when the corresponding event has been raised to the guest.
Signed-off-by: Gavin Shan
---
arch
This supports SDEI_EVENT_CONTEXT hypercall. It's used by the guest
to retrieved the original registers (R0 - R17) in its SDEI event
handler. Those registers can be corrupted during the SDEI event
delivery.
Signed-off-by: Gavin Shan
---
arch/arm64/kvm/sdei.c | 40
successfully, the KVM SDEI event (object)
is created or updated because the same KVM SDEI event is shared by
multiple vCPUs if it's a private event.
Signed-off-by: Gavin Shan
---
arch/arm64/kvm/sdei.c | 122 ++
1 file changed, 122 insertions(+)
diff --git
the preempted context during SDEI event
delivery.
The error is returned for all SDEI hypercalls for now. They will be
supported by subsequent patches.
Signed-off-by: Gavin Shan
---
arch/arm64/include/asm/kvm_host.h | 4 +
arch/arm64/include/asm/kvm_sdei.h | 118 +++
arch
ugh the procfs files on host.
Changelog
=
v2:
* Rebased to 5.11.rc6
* Dropped changes related to SDEI client driver(Gavin)
* Removed support for passthrou SDEI events(Gavin)
* Redesigned data structures (Gavin)
This supports SDEI_PE_{MASK, UNMASK} hypercall. They are used by
the guest to stop the specific vCPU from receiving SDEI events.
Signed-off-by: Gavin Shan
---
arch/arm64/kvm/sdei.c | 35 +++
1 file changed, 35 insertions(+)
diff --git a/arch/arm64/kvm/sdei.c b
This supports SDEI_{PRIVATE, SHARED}_RESET. They are used by the
guest to purge the private or shared SDEI events, which are registered
previously.
Signed-off-by: Gavin Shan
---
arch/arm64/kvm/sdei.c | 29 +
1 file changed, 29 insertions(+)
diff --git a/arch/arm64
The SDEI functionality is ready to be exported so far. This adds
new capability (KVM_CAP_ARM_SDEI) and exports it.
Signed-off-by: Gavin Shan
---
arch/arm64/kvm/arm.c | 3 +++
include/uapi/linux/kvm.h | 1 +
2 files changed, 4 insertions(+)
diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm
1 - 100 of 504 matches
Mail list logo