On 2023/10/10 16:30, Tian, Kevin wrote:
From: Liu, Yi L
Sent: Monday, October 9, 2023 4:51 PM
@@ -2071,6 +2083,43 @@ TEST_F(iommufd_device_pasid, pasid_attach)
IOMMU_HWPT_ALLOC_DATA_SELFTEST,
&data, sizeof(data));
+ if (variant->pasid)
On Wed, 13 Sep 2023 07:07:11 PDT (-0700), cle...@rivosinc.com wrote:
Currently, the sud_test expects the emulated syscall to return the
emulated syscall number. This assumption only works on architectures
were the syscall calling convention use the same register for syscall
number/syscall return
On Wed, Nov 8, 2023 at 2:56 AM Yunsheng Lin wrote:
>
> On 2023/11/8 5:56, Mina Almasry wrote:
> > On Tue, Nov 7, 2023 at 12:00 AM Yunsheng Lin wrote:
> >>
> >> On 2023/11/6 10:44, Mina Almasry wrote:
> >>> Overload the LSB of struct page* to indicate that it's a page_pool_iov.
> >>>
> >>> Refacto
On Tue, Nov 7, 2023 at 4:01 PM David Ahern wrote:
>
> On 11/7/23 4:55 PM, Mina Almasry wrote:
> > On Mon, Nov 6, 2023 at 4:03 PM Willem de Bruijn
> > wrote:
> >>
> >> On Mon, Nov 6, 2023 at 3:55 PM David Ahern wrote:
> >>>
> >>> On 11/6/23 4:32 PM, Stanislav Fomichev wrote:
> > The concise n
On Wed, Nov 8, 2023 at 3:47 PM David Wei wrote:
>
> On 2023-11-05 18:44, Mina Almasry wrote:
> > Add a netdev_dmabuf_binding struct which represents the
> > dma-buf-to-netdevice binding. The netlink API will bind the dma-buf to
> > rx queues on the netdevice. On the binding, the dma_buf_attach
> >
On Tue, Nov 7, 2023 at 7:40 PM Yunsheng Lin wrote:
>
> On 2023/11/8 5:59, Mina Almasry wrote:
> > On Mon, Nov 6, 2023 at 11:46 PM Yunsheng Lin wrote:
> >>
> >> On 2023/11/6 10:44, Mina Almasry wrote:
> >>> +
> >>> +void __netdev_devmem_binding_free(struct netdev_dmabuf_binding *binding)
> >>> +{
On Wed, Nov 8, 2023 at 4:28 PM Nhat Pham wrote:
>
> Hmm my guess is that I probably sent this out based on an outdated
> mm-unstable. There has since been a new zswap selftest merged
> to mm-unstable (written by no other than myself - oh the irony), so
> maybe it does not apply cleanly anymore wit
> > On Mon, Nov 6, 2023 at 11:45 PM Yunsheng Lin wrote:
> >>
> >> On 2023/11/6 10:44, Mina Almasry wrote:
> >>> +
> >>> +void netdev_free_devmem(struct page_pool_iov *ppiov)
> >>> +{
> >>> + struct netdev_dmabuf_binding *binding =
> >>> page_pool_iov_binding(ppiov);
> >>> +
> >>> + refcou
On 2023-11-07 15:03, Mina Almasry wrote:
> On Tue, Nov 7, 2023 at 2:55 PM David Ahern wrote:
>>
>> On 11/7/23 3:10 PM, Mina Almasry wrote:
>>> On Mon, Nov 6, 2023 at 3:44 PM David Ahern wrote:
On 11/5/23 7:44 PM, Mina Almasry wrote:
> diff --git a/include/linux/netdevice.h b/include
On 2023-11-07 14:55, David Ahern wrote:
> On 11/7/23 3:10 PM, Mina Almasry wrote:
>> On Mon, Nov 6, 2023 at 3:44 PM David Ahern wrote:
>>>
>>> On 11/5/23 7:44 PM, Mina Almasry wrote:
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index eeeda849115c..1c351c138a5b 10064
On Wed, Nov 8, 2023 at 3:12 PM Chris Li wrote:
>
> Hi Nhat,
>
> On Wed, Nov 8, 2023 at 1:15 PM Nhat Pham wrote:
> >
> > Ah that was meant to be a fixlet - so that on top of the original
> > "zswap: make shrinking memcg-aware" patch. The intention was
> > to eventually squash it...
> >
> > But thi
On 2023-11-05 18:44, Mina Almasry wrote:
> Add a netdev_dmabuf_binding struct which represents the
> dma-buf-to-netdevice binding. The netlink API will bind the dma-buf to
> rx queues on the netdevice. On the binding, the dma_buf_attach
> & dma_buf_map_attachment will occur. The entries in the sg_t
Hi Nhat,
On Wed, Nov 8, 2023 at 1:15 PM Nhat Pham wrote:
>
> Ah that was meant to be a fixlet - so that on top of the original
> "zswap: make shrinking memcg-aware" patch. The intention was
> to eventually squash it...
>
> But this is getting a bit annoyingly confusing, I admit. I just rebased to
On Wed, Nov 8, 2023 at 11:46 AM Chris Li wrote:
>
> Hi Nhat,
>
> Sorry for being late to the party. I want to take a look at your patches
> series.
> However I wasn't able to "git am" your patches series cleanly on current
> mm-stable, mm-unstable or linux tip.
>
> $ git am
> patches/v5_20231106
From: Domenico Cerasuolo
Currently, we only have a single global LRU for zswap. This makes it
impossible to perform worload-specific shrinking - an memcg cannot
determine which pages in the pool it owns, and often ends up writing
pages from other memcgs. This issue has been previously observed in
Hi Nhat,
Sorry for being late to the party. I want to take a look at your patches series.
However I wasn't able to "git am" your patches series cleanly on current
mm-stable, mm-unstable or linux tip.
$ git am
patches/v5_20231106_nphamcs_workload_specific_and_memory_pressure_driven_zswap_writebac
Add FRED VMCS fields to nested VMX context management.
Tested-by: Shan Kang
Signed-off-by: Xin Li
---
Documentation/virt/kvm/x86/nested-vmx.rst | 18 +++
arch/x86/include/asm/hyperv-tlfs.h| 18 +++
arch/x86/kvm/vmx/hyperv.c | 38 ++
arch/x86/kvm/vmx/nested.c
Handle host initiated FRED MSR access requests to allow FRED context
to be set/get from user level.
During VM save/restore and live migration, FRED context needs to be
saved/restored, which requires FRED MSRs to be accessed from a user
level application, e.g., Qemu.
Note, handling of MSR_IA32_FRE
From: Shan Kang
Add tests for FRED event data and VMX nested-exception.
FRED is designed to save a complete event context in its stack frame,
e.g., FRED saves the faulting linear address of a #PF into a 64-bit
event data field defined in FRED stack frame. As such, FRED VMX adds
event data handl
Switch MSR_IA32_FRED_RSP0 between host and guest in
vmx_prepare_switch_to_{host,guest}().
MSR_IA32_FRED_RSP0 is used during ring 3 event delivery only, thus
KVM, running on ring 0, can run safely with guest FRED RSP0, i.e.,
no need to switch between host/guest FRED RSP0 during VM entry and
exit.
Run another round of debug_regs test with FRED enabled if FRED is
available.
Signed-off-by: Xin Li
---
.../selftests/kvm/include/x86_64/processor.h | 4 ++
.../testing/selftests/kvm/x86_64/debug_regs.c | 50 ++-
2 files changed, 41 insertions(+), 13 deletions(-)
diff --git a/t
Enable the secondary VM exit controls to prepare for nested FRED.
Tested-by: Shan Kang
Signed-off-by: Xin Li
---
Documentation/virt/kvm/x86/nested-vmx.rst | 1 +
arch/x86/include/asm/hyperv-tlfs.h| 1 +
arch/x86/kvm/vmx/capabilities.h | 1 +
arch/x86/kvm/vmx/hyperv.c
Add VMX FRED controls to nested VMX controls and set the VMX
nested-exception support bit (bit 58) in the nested IA32_VMX_BASIC MSR
when FRED is enabled.
Tested-by: Shan Kang
Signed-off-by: Xin Li
---
arch/x86/kvm/vmx/hyperv.c | 7 +--
arch/x86/kvm/vmx/nested.c | 14 ++
arch/x8
Add FRED related VMCS fields checkings.
As real hardware, nested VMX performs checks on various VMCS fields,
including both controls and guest/host states. With the introduction
of VMX FRED, add FRED related VMCS fields checkings.
Tested-by: Shan Kang
Signed-off-by: Xin Li
---
arch/x86/kvm/vm
Add FRED related VMCS fields to dump_vmcs() to have it dump FRED context.
Tested-by: Shan Kang
Signed-off-by: Xin Li
---
arch/x86/kvm/vmx/vmx.c | 48 --
1 file changed, 41 insertions(+), 7 deletions(-)
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/v
Initialize host VMCS FRED fields with host FRED MSRs' value and
guest VMCS FRED fields to 0.
FRED CPU states are managed in 9 new FRED MSRs, as well as a few
existing CPU registers and MSRs, e.g., CR4.FRED. To support FRED
context management, new VMCS fields corresponding to most of FRED
CPU stat
Allow FRED/LKGS/WRMSRNS to be exposed to guests, thus a guest OS could see
these features when the guest is configured with FRED/LKGS/WRMSRNS in Qemu.
A qemu patch is required to expose FRED/LKGS/WRMSRNS to KVM guests.
Tested-by: Shan Kang
Signed-off-by: Xin Li
---
arch/x86/kvm/cpuid.c | 4 ++-
Add a new VM guest mode VM_MODE_PXXV48_4K_USER to set the user bit of
guest page table entries, thus allow user level code to run in guests.
Suggested-by: Sean Christopherson
Signed-off-by: Xin Li
---
.../testing/selftests/kvm/include/kvm_util_base.h | 1 +
tools/testing/selftests/kvm/lib/kvm_
Add kvm_is_fred_enabled() to get if FRED is enabled on a vCPU.
Tested-by: Shan Kang
Signed-off-by: Xin Li
---
arch/x86/kvm/kvm_cache_regs.h | 10 ++
1 file changed, 10 insertions(+)
diff --git a/arch/x86/kvm/kvm_cache_regs.h b/arch/x86/kvm/kvm_cache_regs.h
index 75eae9c4998a..390643e8c
Add FRED VMCS fields to evmcs.
Signed-off-by: Xin Li
---
.../selftests/kvm/include/x86_64/evmcs.h | 146 ++
.../selftests/kvm/include/x86_64/vmx.h| 20 +++
2 files changed, 166 insertions(+)
diff --git a/tools/testing/selftests/kvm/include/x86_64/evmcs.h
b/tools/t
Set VMX nested exception bit in the VM-entry interruption information
VMCS field when injecting a nested exception using FRED event delivery
to ensure:
1) The nested exception is injected on a correct stack level.
2) The nested bit defined in FRED stack frame is set.
The event stack level used
Set injected-event data when injecting a #PF, #DB, or #NM caused
by extended feature disable using FRED event delivery, and save
original-event data for being used as injected-event data.
Unlike IDT using some extra CPU register as part of an event
context, e.g., %cr2 for #PF, FRED saves a complet
Setup the global vmcs_config for FRED:
1) Add VM_ENTRY_LOAD_IA32_FRED to KVM_OPTIONAL_VMX_VM_ENTRY_CONTROLS to
have a FRED CPU load guest FRED MSRs from VMCS upon VM entry.
2) Add SECONDARY_VM_EXIT_SAVE_IA32_FRED to
KVM_OPTIONAL_VMX_SECONDARY_VM_EXIT_CONTROLS to have a FRED CPU save
guest
The CR4.FRED bit, i.e., CR4[32], is no longer a reserved bit when a guest
enumerates FRED, otherwise it is still a reserved bit.
Tested-by: Shan Kang
Signed-off-by: Xin Li
---
arch/x86/include/asm/kvm_host.h | 3 ++-
arch/x86/kvm/x86.h | 2 ++
2 files changed, 4 insertions(+), 1 de
Define VMX misc information fields with BIT_ULL()/GENMASK_ULL(), and move
VMX misc field macros to vmx.h if used in multiple files or where they are
used only once.
Signed-off-by: Xin Li
---
arch/x86/include/asm/msr-index.h | 5 -
arch/x86/include/asm/vmx.h | 12 +--
arch/x86/
Enable the secondary VM exit controls to prepare for FRED enabling.
The activation of the secondary VM exit controls is off now, and it
will be switched on when a VMX feature needing it is enabled.
Tested-by: Shan Kang
Signed-off-by: Xin Li
---
arch/x86/include/asm/msr-index.h | 1 +
arch/x86
Clear FRED VM entry/exit controls when initializing a vCPU, and set
these controls only if FRED is enumerated after set CPUID.
FRED VM entry/exit controls need to be set to establish context
sufficient to support FRED event delivery immediately after VM entry
and exit. However it is not required
Add FRED MSRs to the valid passthrough MSR list and disable intercepting
FRED MSRs only if FRED is enumerated after set CPUID.
Tested-by: Shan Kang
Signed-off-by: Xin Li
---
arch/x86/kvm/vmx/vmx.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x
Define VMX basic information fields with BIT_ULL()/GENMASK_ULL(), and
replace hardcoded VMX basic numbers with these field macros.
Per Sean's ask, save the full/raw value of MSR_IA32_VMX_BASIC in the
global vmcs_config as type u64 to get rid of the hi/lo crud, and then
use VMX_BASIC helpers to ext
This patch set enables the Intel flexible return and event delivery
(FRED) architecture with KVM VMX to allow guests to utilize FRED.
The FRED architecture defines simple new transitions that change
privilege level (ring transitions). The FRED architecture was
designed with the following goals:
1
ation.
Signed-off-by: Thomas Weißschuh
---
Changes in v2:
- Preserver 8-byte alignment of stack pointer
- Link to v1:
https://lore.kernel.org/r/20231108-nolibc-pic-v1-1-9b7a429d5...@weissschuh.net
---
tools/include/nolibc/arch-mips.h| 7 ++-
tools/testing/selftests/nolibc/Makefile | 2
MIPS requires some extra instructions to set up the $gp register for the
with a pointer to the global data area.
This isn't needed for non-PIC builds, but this patch enables the code
unconditionally to prevent bitrot.
Also enable PIC in one of the test configurations for ongoing
validation.
Sign
On Wed, Nov 08, 2023 at 08:53:00AM +, Tian, Kevin wrote:
> > There are many events related to object in guest memory or controlled
> > by the guest, eg C_BAD_CD and C_BAD_STE. These should be relayed or
> > the emulation is not working well.
>
> so that's the category of unrecoverable faults?
Hi Ilpo,
On 11/7/2023 1:33 AM, Ilpo Järvinen wrote:
> man perf_event_open() says this:
>
> "If type is PERF_TYPE_RAW, then a custom "raw" config value is needed.
> Most CPUs support events that are not covered by the "generalized"
> events. These are implementation defined; see your CPU
On 06/11/2023 21:17, Stanislav Fomichev wrote:
> I guess I'm just wondering whether other people have any suggestions
> here. Not sure Jonathan's way was better, but we fundamentally
> have two queues between the kernel and the userspace:
> - userspace receiving tokens (recvmsg + magical flag)
> -
From: Mina Almasry
> Sent: 06 November 2023 02:44
>
> For device memory TCP, we expect the skb headers to be available in host
> memory for access, and we expect the skb frags to be in device memory
> and unaccessible to the host. We expect there to be no mixing and
> matching of device memory fra
On 2023/11/8 5:19, Mina Almasry wrote:
>>
>>
>
> My personal immediate reaction is that this may just introduce code
> churn without significant benefit. If an unsuspecting caller call
> skb_frag_page() on devmem frag and doesn't correctly handle NULL
> return, it will crash or error out anyway, a
On 2023/11/8 5:56, Mina Almasry wrote:
> On Tue, Nov 7, 2023 at 12:00 AM Yunsheng Lin wrote:
>>
>> On 2023/11/6 10:44, Mina Almasry wrote:
>>> Overload the LSB of struct page* to indicate that it's a page_pool_iov.
>>>
>>> Refactor mm calls on struct page* into helpers, and add page_pool_iov
>>> h
On 2023/11/8 16:46, Tian, Kevin wrote:
From: Liu, Yi L
Sent: Wednesday, November 8, 2023 3:45 PM
On 2023/10/10 16:19, Tian, Kevin wrote:
From: Liu, Yi L
Sent: Monday, October 9, 2023 4:51 PM
+struct iommufd_device *iommufd_device_bind_pasid(struct
iommufd_ctx
*ictx,
+
> From: Jason Gunthorpe
> Sent: Wednesday, November 8, 2023 1:54 AM
>
> On Tue, Nov 07, 2023 at 08:35:10AM +, Tian, Kevin wrote:
> > > From: Jason Gunthorpe
> > > Sent: Thursday, November 2, 2023 8:48 PM
> > >
> > > On Thu, Oct 26, 2023 at 10:49:24AM +0800, Lu Baolu wrote:
> > > > Hi folks,
> From: Liu, Yi L
> Sent: Wednesday, November 8, 2023 3:45 PM
>
> On 2023/10/10 16:19, Tian, Kevin wrote:
> >> From: Liu, Yi L
> >> Sent: Monday, October 9, 2023 4:51 PM
> >>
> >> +struct iommufd_device *iommufd_device_bind_pasid(struct
> iommufd_ctx
> >> *ictx,
> >> +
51 matches
Mail list logo