Matthew Wilcox writes:
> On Tue, Sep 10, 2024 at 02:14:29PM +1000, Alistair Popple wrote:
>> @@ -337,6 +341,7 @@ struct folio {
>> /* private: */
>> };
>> /* public: */
>> +struct dev_pagemap *pgmap;
>
> Shouldn't that be indented by on
On 9/4/24 18:48, Petr Mladek wrote:
On Tue 2024-09-03 09:47:53, Bagas Sanjaya wrote:
"get" doesn't properly fit as an antonym for "release" in the context
of locking. Correct it with "acquire".
Signed-off-by: Bagas Sanjaya
Reviewed-by: Petr Mladek
The patch is trivial. I have have committe
On Tue 2024-09-10 17:27:42, Bagas Sanjaya wrote:
> On 9/4/24 18:48, Petr Mladek wrote:
> > On Tue 2024-09-03 09:47:53, Bagas Sanjaya wrote:
> > > "get" doesn't properly fit as an antonym for "release" in the context
> > > of locking. Correct it with "acquire".
> > >
> > > Signed-off-by: Bagas Sanj
On Tue, Sep 10, 2024 at 04:57:41PM +1000, Alistair Popple wrote:
>
> Matthew Wilcox writes:
>
> > On Tue, Sep 10, 2024 at 02:14:29PM +1000, Alistair Popple wrote:
> >> @@ -337,6 +341,7 @@ struct folio {
> >>/* private: */
> >>};
> >>/* public: */
> >> +
In subject:
PCI/P2PDMA: ...
would match previous history.
On Tue, Sep 10, 2024 at 02:14:27PM +1000, Alistair Popple wrote:
> The reference counts for ZONE_DEVICE private pages should be
> initialised by the driver when the page is actually allocated by the
> driver allocator, not when they are
Introduce a flag in x86_exception which signals that a page walk failed
because a page table GPA wasn't backed by a memslot. This only applies to
page tables; the final physical address is not checked.
This extra flag is needed, because the normal page fault error code does
not contain a bit to si
Store the GPA where the page walk failed within the walker's exception.
Precisely this means, the PTE's GPA, if it couldn't be resolved or it
caused an access violation, or the fully translated GPA in case the final
page caused an access violation.
Returning the GPA from the page walker directly i
This series introduces a new ioctl KVM_TRANSLATE2, which expands on
KVM_TRANSLATE. It is required to implement Hyper-V's
HvTranslateVirtualAddress hyper-call as part of the ongoing effort to
emulate HyperV's Virtual Secure Mode (VSM) within KVM and QEMU. The hyper-
call requires several new KVM API
Abort the page walk, if permission checks fail on any page table level, by
moving the check to within the page walker loop. Currently, the page
walker only checks for access flags after successfully walking the entire
paging structure. This change is needed later to enable setting accessed
bits in
Add API documentation for the new KVM_TRANSLATE2 ioctl.
Signed-off-by: Nikolas Wipper
---
Documentation/virt/kvm/api.rst | 131 +
1 file changed, 131 insertions(+)
diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst
index a4b7dc4a9dda..63
Implement PWALK_SET_ACCESSED in the page walker. This flag allows
controling whether the page walker will set the accessed bits after a
successful page walk in all page table levels. If the page walk is aborted
for any reason, none of the access bits are set.
Signed-off-by: Nikolas Wipper
---
ar
Implement PWALK_SET_DIRTY in the page walker. This flag allows controlling,
whether the page walker will set the dirty bit after a successful page
walk. If the page walk fails for any reason, the dirty flag is not set.
Signed-off-by: Nikolas Wipper
---
arch/x86/kvm/mmu/paging_tmpl.h | 3 ++-
1 f
Implement PWALK_FORCE_SET_ACCESSED in the page walker. This flag forces
the page walker to set the accessed flag in all successfully visited page
table levels, regardless of the outcome of the page walk.
For example, if the page walk fails on level 2, the accessed bit will
still be set on levels 3
Introduce the flags parameter to walk_addr_generic() which is needed to
introduce fine grained control over the accessed/dirty bits. Also forward
the parameter to several of the page walker's helper functions, so it can
be used in an ioctl.
Setting both PWALK_SET_ACCESSED and PWALK_SET_DIRTY will
Introduce the status parameter to walk_addr_generic() which is used in
later patches to provide the caller with information on whether setting
the accessed/dirty bits succeeded.
No functional change intended.
Signed-off-by: Nikolas Wipper
---
arch/x86/include/asm/kvm_host.h | 2 +-
arch/x86/kv
Implement PWALK_STATUS_READ_ONLY_PTE_GPA in the page walker. This status
flag is set when setting an accessed or dirty bit fails, because the
memory of the page table entry was marked as read-only
Signed-off-by: Nikolas Wipper
---
arch/x86/include/asm/kvm_host.h | 2 ++
arch/x86/kvm/mmu/paging_t
Introduce a new ioctl that extends the functionality of KVM_TRANSLATE. It
allows the caller to specify an access mode that must be upheld throughout
the entire page walk. Additionally, it provides control over whether the
accessed/dirty bits in the page table should be set at all, and whether
they
Add stub function for the KVM_TRANSLATE2 ioctl, as well as generic
parameter verification. In a later commit, the ioctl will be properly
implemented for x86.
Signed-off-by: Nikolas Wipper
---
include/linux/kvm_host.h | 2 ++
virt/kvm/kvm_main.c | 41
Introduce a function to translate gvas to gpas with the ability to control
set_bit_mode, access mode and flags, as well as receive status codes.
Signed-off-by: Nikolas Wipper
---
arch/x86/include/asm/kvm_host.h | 3 +++
arch/x86/kvm/x86.c | 11 +++
2 files changed, 14 inser
Implement KVM_TRANSLATE2 for x86 using the default KVM page walker.
Signed-off-by: Nikolas Wipper
---
arch/x86/kvm/x86.c | 76 ++
1 file changed, 76 insertions(+)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 27fc71aaa1e4..3bcbad958324 10
Add selftest for KVM_TRANSLATE2. There are four different subtests.
A basic translate test that checks whether access permissions are handled
correctly. A set bits test, that checks whether the accessed and dirty
bits are set correctly. An errors test, that checks negative cases of the
flags. And
Andrew Kreimer writes:
> Fix typos in documentation.
>
> Signed-off-by: Andrew Kreimer
> ---
> Synced with docs-next as requested.
>
> Documentation/process/coding-style.rst | 2 +-
> Documentation/process/maintainer-tip.rst | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
Applied,
On 9/10/24 18:01, Petr Mladek wrote:
On Tue 2024-09-10 17:27:42, Bagas Sanjaya wrote:
On 9/4/24 18:48, Petr Mladek wrote:
On Tue 2024-09-03 09:47:53, Bagas Sanjaya wrote:
"get" doesn't properly fit as an antonym for "release" in the context
of locking. Correct it with "acquire".
Signed-off-by
On 2024-09-09 22:14, Alistair Popple wrote:
> The reference counts for ZONE_DEVICE private pages should be
> initialised by the driver when the page is actually allocated by the
> driver allocator, not when they are first created. This is currently
> the case for MEMORY_DEVICE_PRIVATE and MEMORY
>> diff --git a/drivers/pci/p2pdma.c b/drivers/pci/p2pdma.c
>> index 4f47a13..210b9f4 100644
>> --- a/drivers/pci/p2pdma.c
>> +++ b/drivers/pci/p2pdma.c
>> @@ -129,6 +129,12 @@ static int p2pmem_alloc_mmap(struct file *filp, struct
>> kobject *kobj,
>> }
>>
>> /*
>> + * Initialis
25 matches
Mail list logo