vm# cat /sys/kernel/debug/swiotlb/io_tlb_nslabs
65536
vm# cat /sys/kernel/debug/swiotlb/io_tlb_used
0
vm# cat /sys/kernel/debug/swiotlb/io_tlb_nslabs-highmem
1048576
vm# cat /sys/kernel/debug/swiotlb/io_tlb_used-highmem
64647
Please let me know if there is any feedback for this idea and RFC.
Don
This patch introduces swiotlb_get_type() in order to calculate which
swiotlb buffer the given DMA address is belong to.
This is to prepare to enable 64-bit swiotlb.
Cc: Joe Jin
Signed-off-by: Dongli Zhang
---
include/linux/swiotlb.h | 14 ++
kernel/dma/swiotlb.c| 2 ++
2
- no_iotlb_memory
There is no functional change and this is to prepare to enable 64-bit
swiotlb.
Cc: Joe Jin
Signed-off-by: Dongli Zhang
---
arch/powerpc/platforms/pseries/svm.c | 6 +-
drivers/xen/swiotlb-xen.c| 4 +-
include/linux/swiotlb.h | 5 +-
kernel/dma/swiotlb.c
el will be able to allocate >4GB swiotlb buffer.
This patch is only for swiotlb, not including xen-swiotlb.
Cc: Joe Jin
Signed-off-by: Dongli Zhang
---
arch/mips/cavium-octeon/dma-octeon.c | 3 +-
arch/powerpc/kernel/dma-swiotlb.c| 2 +-
arch/powerpc/platforms/pseries/svm.
enable 64-bit
xen-swiotlb.
Cc: Joe Jin
Signed-off-by: Dongli Zhang
---
drivers/xen/swiotlb-xen.c | 75 +--
1 file changed, 40 insertions(+), 35 deletions(-)
diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c
index 662638093542..e18cae693cdc 100644
This patch is to enable the 64-bit xen-swiotlb buffer.
For Xen PVM DMA address, the 64-bit device will be able to allocate from
64-bit swiotlb buffer.
Cc: Joe Jin
Signed-off-by: Dongli Zhang
---
drivers/xen/swiotlb-xen.c | 117 --
1 file changed, 74
The 'need_copy' is set when rq_data_dir(req) returns WRITE, in order to
copy the written data to persistent page.
".need_copy = rq_data_dir(req) && info->feature_persistent,"
Signed-off-by: Dongli Zhang
---
drivers/block/xen-blkfront.c | 2 +-
1 file chan
;
> nslabs = SLABS_PER_PAGE << order;
> bytes = nslabs << IO_TLB_SHIFT;
> @@ -323,6 +343,16 @@ int swiotlb_init_late(size_t size, gfp_t gfp_mask)
> (PAGE_SIZE << order) >> 20);
> nslabs = SLABS_PER_PAGE <<
read_mandatory: xenstore read
failed: `/libxl/1/type': No such file or directory
libxl: warning: libxl_dom.c:53:libxl__domain_type: unable to get domain type
for domid=1, assuming HVM
Thank you very much!
Dongli Zhang
drift at the VM side if the VM accesses
the clocksource immediately after VCPUOP_register_vcpu_info().
Cc: Joe Jin
Signed-off-by: Dongli Zhang
---
xen/common/domain.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/xen/common/domain.c b/xen/common/domain.c
index 40d67ec342..c879f6723b 100644
boot vcpu is
registered when the boot vcpu is >= 32.
This issue can be reproduced on purpose via below command at the guest
side when kdump/kexec is enabled:
"taskset -c 33 echo c > /proc/sysrq-trigger"
Cc: Joe Jin
Signed-off-by: Dongli Zhang
---
arch/x86/xen/enlighten_hvm
Hi Jan,
On 10/12/21 1:40 AM, Jan Beulich wrote:
> On 12.10.2021 09:24, Dongli Zhang wrote:
>> The guest may access the pv vcpu_time_info immediately after
>> VCPUOP_register_vcpu_info. This is to borrow the idea of
>> VCPUOP_register_vcpu_time_m
Hi Juergen,
On 10/12/21 1:47 AM, Juergen Gross wrote:
> On 12.10.21 09:24, Dongli Zhang wrote:
>> When the kdump/kexec is enabled at HVM VM side, to panic kernel will trap
>> to xen side with reason=soft_reset. As a result, the xen will reboot the VM
>> with the kdump kernel
Hi Jan,
On 10/12/21 8:49 AM, Jan Beulich wrote:
> On 12.10.2021 17:43, Dongli Zhang wrote:
>> Hi Jan,
>>
>> On 10/12/21 1:40 AM, Jan Beulich wrote:
>>> On 12.10.2021 09:24, Dongli Zhang wrote:
>>>> The guest may access the pv vcpu_time_info immediately
to access netfront_info->queues
-> err = xennet_create_queues(info, &num_queues);
The idea is borrowed from virtio-net.
Cc: Joe Jin
Signed-off-by: Dongli Zhang
---
Since I am not able to reproduce the corner case on purpose, I create a
patch to reproduce.
https://raw.githubuserc
Hi Boris,
On 10/12/21 10:17 AM, Boris Ostrovsky wrote:
>
> On 10/12/21 3:24 AM, Dongli Zhang wrote:
>> The sched_clock() can be used very early since upstream
>> commit 857baa87b642 ("sched/clock: Enable sched clock early"). In addition,
>> with upstream
drift at the VM side if the VM accesses
the clocksource immediately after VCPUOP_register_vcpu_info().
Reference:
https://lists.xenproject.org/archives/html/xen-devel/2021-10/msg00571.html
Cc: Joe Jin
Signed-off-by: Dongli Zhang
---
Changed since v1:
- Implement force_update_vcpu_system_time() for
skset -c 33 echo c > /proc/sysrq-trigger"
Reference:
https://lists.xenproject.org/archives/html/xen-devel/2021-10/msg00571.html
Cc: Joe Jin
Signed-off-by: Dongli Zhang
---
Changed since v1:
- Add commit message to explain why xen_hvm_init_time_ops() is delayed
for any vcp
Hi Boris,
On 11/1/21 10:34 AM, Boris Ostrovsky wrote:
>
> On 10/27/21 9:25 PM, Dongli Zhang wrote:
>> The sched_clock() can be used very early since
>> commit 857baa87b642 ("sched/clock: Enable sched clock early"). In addition,
>> with commit 38669ba205d1 (&qu
Tested-by: Dongli Zhang
The bug fixed by commit 53fafdbb8b21 ("KVM: x86: switch KVMCLOCK base to
monotonic raw clock") may leave the cpu_hotplug_state at CPU_UP_PREPARE. As a
result, to online this CPU again (even after removal) is always failed.
I have tested that this patch wor
On 11/23/21 3:50 PM, Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
wrote:
>
>
>> -Original Message-----
>> From: Dongli Zhang [mailto:dongli.zh...@oracle.com]
>> Sent: Wednesday, November 24, 2021 5:22 AM
>> To: Sebastian Andrzej S
img-5.17.0-rc4xen-00054-gf71077a4d84b-dirty \
--reuse-cmdline
# kexec -e
Thank you very much!
Dongli Zhang
only with HVM guest on old xen
hypervisor where 'soft_reset' is working. The bugfix for PVM is not
implemented due to the lack of testing environment.
Cc: Joe Jin
Signed-off-by: Dongli Zhang
---
Changed since v1:
- Add commit message to explain why xen_hvm_init_time_ops() is delayed
1077a4d84b-dirty
--reuse-cmdline
# kexec -e
or
# taskset -c 0 echo c > /proc/sysrq-trigger
Thank you very much!
Dongli Zhang
Hi Jan,
On 2/24/22 11:15 PM, Jan Beulich wrote:
> On 24.02.2022 23:27, Dongli Zhang wrote:
>> Hello,
>>
>> This is to report that the soft_reset (kexec/kdump) has not been working for
>> me
>> since long time ago.
>>
>> I have tested again with the
Hi Boris,
On 2/25/22 2:39 PM, Boris Ostrovsky wrote:
>
> On 2/24/22 4:50 PM, Dongli Zhang wrote:
>> This is the v3 of the patch to fix xen kexec kernel panic issue when the
>> kexec is triggered on VCPU >= 32.
>>
>> PANIC: early exception 0x0e IP 10:
Hi Boris,
On 2/28/22 12:45 PM, Boris Ostrovsky wrote:
>
>
> On 2/25/22 8:17 PM, Dongli Zhang wrote:
>> Hi Boris,
>>
>> On 2/25/22 2:39 PM, Boris Ostrovsky wrote:
>>>
>>> On 2/24/22 4:50 PM, Dongli Zhang wrote:
>>>> This is the v3
Hi Boris,
On 2/28/22 5:18 PM, Dongli Zhang wrote:
> Hi Boris,
>
> On 2/28/22 12:45 PM, Boris Ostrovsky wrote:
>>
>>
>> On 2/25/22 8:17 PM, Dongli Zhang wrote:
>>> Hi Boris,
>>>
>>> On 2/25/22 2:39 PM, Boris Ostrovsky wrote:
>>>>
No functional change.
Signed-off-by: Dongli Zhang
---
arch/x86/xen/time.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c
index d9c945ee1100..55b3407358a9 100644
--- a/arch/x86/xen/time.c
+++ b/arch/x86/xen/time.c
@@ -45,7 +45,7
works after I reset d->creation_reset
as suggested by Jan Beulich.
https://lore.kernel.org/all/d3814109-f4ba-9edb-1575-ab94faaeb...@suse.com/
Thank you very much!
Dongli Zhang
istered when the boot vcpu is >= 32.
This issue can be reproduced on purpose via below command at the guest
side when kdump/kexec is enabled:
"taskset -c 33 echo c > /proc/sysrq-trigger"
The bugfix for PVM is not implemented due to the lack of testing
environment.
Cc: Joe Jin
S
Hi Boris,
On 3/2/22 4:20 PM, Boris Ostrovsky wrote:
>
> On 3/2/22 11:40 AM, Dongli Zhang wrote:
>> void __init xen_hvm_init_time_ops(void)
>> {
>> + static bool hvm_time_initialized;
>> +
>> + if (hvm_time_initialized)
>> + return;
>&
Hi Boris,
On 3/2/22 6:11 PM, Boris Ostrovsky wrote:
>
> On 3/2/22 7:31 PM, Dongli Zhang wrote:
>> Hi Boris,
>>
>> On 3/2/22 4:20 PM, Boris Ostrovsky wrote:
>>> On 3/2/22 11:40 AM, Dongli Zhang wrote:
>>>> void __init xen_hvm_init_t
ted DMA patchset is going to supports 64-bit (or
high memory) DMA. Is this what you are looking for?
Dongli Zhang
>
> Michael
>
> [1]
> https://urldefense.com/v3/__https://lore.kernel.org/lkml/20220209122302.213882-1-ltyker...@gmail.com/__;!!ACWV5N9M2RV99hQ!fUx4fMgdQIrqJDDy-pbv
extra
327552
Would you mind helping if this is the right direction to go?
Thank you very much!
Cc: Konrad Wilk
Cc: Joe Jin
Signed-off-by: Dongli Zhang
---
arch/arm/xen/mm.c | 2 +-
arch/mips/pci/pci-octeon.c | 5 +-
arch/x86/include/asm/xen/swiot
otice it is the
default 'io_tlb_default_mem', but will not be able to know if it is allocated
from 32-bit or 64-bit buffer.
Thank you very much for the feedback.
Dongli Zhang
kport to old kernel version.
References:
[1] https://lore.kernel.org/all/20230926230649.67852-1-dongli.zh...@oracle.com/
[2] https://lore.kernel.org/all/20231018195638.1898375-1-sea...@google.com/
[3]
https://lore.kernel.org/all/20231002211651.ga3...@noisy.programming.kicks-ass.net/
Thank you very mu
Hi Vitaly, Sean and David,
On 10/19/23 08:40, Sean Christopherson wrote:
> On Thu, Oct 19, 2023, Vitaly Kuznetsov wrote:
>> Dongli Zhang writes:
>>
>>> As mentioned in the linux kernel development document, "sched_clock() is
>>> used for scheduling and t
The interface re-configures dev->dma_io_tlb_mem conditionally, if the
'io_tlb_high_mem' is active.
Cc: Konrad Wilk
Cc: Joe Jin
Signed-off-by: Dongli Zhang
---
include/linux/swiotlb.h | 6 ++
kernel/dma/swiotlb.c| 10 ++
2 files changed, 16 insertions(+)
diff --
Add new argument 'high' to remap function, so that it will be able to
remap the swiotlb buffer based on whether the swiotlb is 32-bit or
64-bit.
Currently the only remap function is xen_swiotlb_fixup().
Cc: Konrad Wilk
Cc: Joe Jin
Signed-off-by: Dongli Zhang
---
arch/x86/inclu
When the swiotlb is enforced (e.g., when amd sev is involved), the virito
driver will not be able to use 4+ GB memory. Therefore, the virtio driver
uses 'io_tlb_high_mem' as swiotlb.
Cc: Konrad Wilk
Cc: Joe Jin
Signed-off-by: Dongli Zhang
---
drivers/virtio/virtio.c | 8 ++
em.nslabs) returns true.
Cc: Konrad Wilk
Cc: Joe Jin
Signed-off-by: Dongli Zhang
---
arch/powerpc/kernel/dma-swiotlb.c | 8 ++-
arch/x86/kernel/pci-dma.c | 5 +-
include/linux/swiotlb.h | 2 +-
kernel/dma/swiotlb.c | 103 +-
4 file
Wilk
Cc: Joe Jin
Signed-off-by: Dongli Zhang
---
drivers/xen/swiotlb-xen.c | 14 +++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c
index 339f46e21053..d15321e9f9db 100644
--- a/drivers/xen/swiotlb-xen.c
+++ b
n a
value smaller than the expected one. As a result, the swiotlb_bounce()
will access a wrong swiotlb slot.
Cc: Konrad Wilk
Cc: Joe Jin
Signed-off-by: Dongli Zhang
---
kernel/dma/swiotlb.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/dma/swiotlb.c b/
mmand line "swiotlb=32768,3145728,force" is to allocate 64MB
for default swiotlb, and 6GB for the extra highmem swiotlb.
Cc: Konrad Wilk
Cc: Joe Jin
Signed-off-by: Dongli Zhang
---
include/linux/swiotlb.h | 2 ++
kernel/dma/swiotlb.c| 16
2 files changed,
/kernel/debug/swiotlb/swiotlb-hi/io_tlb_nslabs
3145728
$ cat /sys/kernel/debug/swiotlb/swiotlb-hi/io_tlb_used
8960
Dongli Zhang (7):
swiotlb: introduce the highmem swiotlb buffer
swiotlb: change the signature of remap function
swiotlb-xen: support highmem for xen specific code
swiotlb: to imp
101 - 146 of 146 matches
Mail list logo