Displaying 20 results from an estimated 36 matches for "memslot".
2018 Jul 20
4
Memory Read Only Enforcement: VMM assisted kernel rootkit mitigation for KVM V4
...to process multiple pages
per one hypercall also suggested by Randy Dunlap. It turns out that
this will save lots of vmexist/memory slot flushes when protecting many
pages.
[PATCH RFC V4 1/3] KVM: X86: Memory ROE documentation
[PATCH RFC V4 2/3] KVM: X86: Adding arbitrary data pointer in kvm memslot iterator functions
[PATCH RFC V4 3/3] KVM: X86: Adding skeleton for Memory ROE
Summary:
Documentation/virtual/kvm/hypercalls.txt | 14 ++++
arch/x86/include/asm/kvm_host.h | 11 ++-
arch/x86/kvm/Kconfig | 7 ++
arch/x86/kvm/mmu.c | 127 +++++...
2018 Jul 19
8
Memory Read Only Enforcement: VMM assisted kernel rootkit mitigation for KVM
...vide sketches for a basic working design. Note that I am totally
noob and it took lots of time and effort to get to this point. So sorry in
advance if I overlooked something.
[PATCH 1/3] [RFC V3] KVM: X86: Memory ROE documentation
[PATCH 2/3] [RFC V3] KVM: X86: Adding arbitrary data pointer in kvm memslot itterator functions
[PATCH 3/3] [RFC V3] KVM: X86: Adding skeleton for Memory ROE
Summery:
Documentation/virtual/kvm/hypercalls.txt | 14 ++++
arch/x86/include/asm/kvm_host.h | 11 ++-
arch/x86/kvm/Kconfig | 7 ++
arch/x86/kvm/mmu.c | 127 ++...
2018 Jul 19
8
Memory Read Only Enforcement: VMM assisted kernel rootkit mitigation for KVM
...vide sketches for a basic working design. Note that I am totally
noob and it took lots of time and effort to get to this point. So sorry in
advance if I overlooked something.
[PATCH 1/3] [RFC V3] KVM: X86: Memory ROE documentation
[PATCH 2/3] [RFC V3] KVM: X86: Adding arbitrary data pointer in kvm memslot itterator functions
[PATCH 3/3] [RFC V3] KVM: X86: Adding skeleton for Memory ROE
Summery:
Documentation/virtual/kvm/hypercalls.txt | 14 ++++
arch/x86/include/asm/kvm_host.h | 11 ++-
arch/x86/kvm/Kconfig | 7 ++
arch/x86/kvm/mmu.c | 127 ++...
2018 Jul 19
0
[PATCH 3/3] [RFC V3] KVM: X86: Adding skeleton for Memory ROE
...@@ struct kvm_mmu_memory_cache {
void *objects[KVM_NR_MEM_OBJS];
};
+/*
+ * This is internal structure used to be be able to access kvm memory slot and
+ * have track of the number of current PTE when doing shadow PTE walk
+ */
+struct kvm_write_access_data {
+ int i;
+ struct kvm_memory_slot *memslot;
+};
+
/*
* the pages used as guest page table on soft mmu are tracked by
* kvm_memory_slot.arch.gfn_track which is 16 bits, so the role bits used
@@ -1130,7 +1139,7 @@ void kvm_mmu_set_mask_ptes(u64 user_mask, u64 accessed_mask,
u64 acc_track_mask, u64 me_mask);
void kvm_mmu_reset_conte...
2018 Jul 20
0
[PATCH RFC V4 3/3] KVM: X86: Adding skeleton for Memory ROE
...@@ struct kvm_mmu_memory_cache {
void *objects[KVM_NR_MEM_OBJS];
};
+/*
+ * This is internal structure used to be be able to access kvm memory slot and
+ * have track of the number of current PTE when doing shadow PTE walk
+ */
+struct kvm_write_access_data {
+ int i;
+ struct kvm_memory_slot *memslot;
+};
+
/*
* the pages used as guest page table on soft mmu are tracked by
* kvm_memory_slot.arch.gfn_track which is 16 bits, so the role bits used
@@ -1130,7 +1139,7 @@ void kvm_mmu_set_mask_ptes(u64 user_mask, u64 accessed_mask,
u64 acc_track_mask, u64 me_mask);
void kvm_mmu_reset_conte...
2020 Jul 21
0
[PATCH v9 04/84] KVM: add kvm_get_max_gfn()
...kvm_main.c | 24 ++++++++++++++++++++++++
2 files changed, 25 insertions(+)
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 92490279d65a..a4249fc88fc2 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -776,6 +776,7 @@ struct kvm_memory_slot *gfn_to_memslot(struct kvm *kvm, gfn_t gfn);
bool kvm_is_visible_gfn(struct kvm *kvm, gfn_t gfn);
unsigned long kvm_host_page_size(struct kvm_vcpu *vcpu, gfn_t gfn);
void mark_page_dirty(struct kvm *kvm, gfn_t gfn);
+gfn_t kvm_get_max_gfn(struct kvm *kvm);
struct kvm_memslots *kvm_vcpu_memslots(struct kvm_vc...
2019 Aug 13
1
[RFC PATCH v6 14/92] kvm: introspection: handle introspection commands before returning to guest
On 09/08/19 17:59, Adalbert Laz?r wrote:
> + prepare_to_swait_exclusive(&vcpu->wq, &wait,
> + TASK_INTERRUPTIBLE);
> +
> + if (kvm_vcpu_check_block(vcpu) < 0)
> + break;
> +
> + waited = true;
> + schedule();
> +
> + if (kvm_check_request(KVM_REQ_INTROSPECTION, vcpu)) {
> + do_kvmi_work = true;
> + break;
> + }
>
2019 Aug 13
0
[RFC PATCH v6 14/92] kvm: introspection: handle introspection commands before returning to guest
...s does not appear to be an issue, but during early boot it
> can happen for a non-boot vCPU to start executing code from areas that
> first needed to be set up by vCPU #0.
>
> In a particular case, vCPU #1 executed code which resided in an area
> not covered by a memslot, which caused an EPT violation that got
> turned in mmu_set_spte() into a MMIO request that required emulation.
> Unfortunatelly, the emulator tripped, exited to userspace and the VM
> was aborted.
Okay, this makes sense. Maybe you want to handle KVM_REQ_INTROSPECTION
in vcpu...
2019 Oct 04
0
DANGER WILL ROBINSON, DANGER
...he guest memory into its mmap-able range. Accessing an unmapped range
produces a SIGSEGV.
When asked via the QEMU monitor, QEMU will create the file descriptor
and pass it back via SCM_RIGHTS. The management application can then
use it to hotplug memory into the destination...
> Create a new memslot based on the mirror VMA, hotplug it into the guest as
> new memory device (is this possible?) and have a guest-side driver allocate
> pages from that area.
... using the existing ivshmem device, whose BAR can be accessed and
mmap-ed from the guest via sysfs. In other words, the hotplugging...
2018 Dec 12
0
[PATCH v2 03/18] drm/qxl: simplify slot management
Drop pointless indirection, remove the mem_slots array and index
variables, drop dynamic allocation. Store memslots in qxl_device
instead.
Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
---
drivers/gpu/drm/qxl/qxl_drv.h | 15 +++++----
drivers/gpu/drm/qxl/qxl_kms.c | 72 +++++++++++++++++--------------------------
2 files changed, 36 insertions(+), 51 deletions(-)
diff --git a/drivers/gpu/drm/qxl/...
2019 Sep 05
0
DANGER WILL ROBINSON, DANGER
...irroring an entire VMA
> from the target process by way of a device file. This thing creates a separate
> mirror VMA in my inspector process (at the moment a QEMU), but then I
> bumped into the KVM hva->gpa mapping, which makes it hard to override
> mappings with addresses outside memslot associated VMAs.
Not sure i understand, you are saying that the solution i outline above
does not work ? If so then i think you are wrong, in the above solution
the importing process mmap a device file and the resulting vma is then
populated using insert_pfn() and constantly keep synchronize with...
2011 Dec 16
4
[PATCH 0/2] vhot-net: Use kvm_memslots instead of vhost_memory to translate GPA to HVA
From: Hongyong Zang <zanghongyong at huawei.com>
Vhost-net uses its own vhost_memory, which results from user space (qemu) info,
to translate GPA to HVA. Since kernel's kvm structure already maintains the
address relationship in its member *kvm_memslots*, these patches use kernel's
kvm_memslots directly without the need of initialization and maintenance of
vhost_memory.
Hongyong Zang (2):
kvm: Introduce get_kvm_from_task
vhost-net: Use kvm_memslots for address translation
drivers/vhost/vhost.c | 53 +++++++++++++++++-------------...
2011 Dec 16
4
[PATCH 0/2] vhot-net: Use kvm_memslots instead of vhost_memory to translate GPA to HVA
From: Hongyong Zang <zanghongyong at huawei.com>
Vhost-net uses its own vhost_memory, which results from user space (qemu) info,
to translate GPA to HVA. Since kernel's kvm structure already maintains the
address relationship in its member *kvm_memslots*, these patches use kernel's
kvm_memslots directly without the need of initialization and maintenance of
vhost_memory.
Hongyong Zang (2):
kvm: Introduce get_kvm_from_task
vhost-net: Use kvm_memslots for address translation
drivers/vhost/vhost.c | 53 +++++++++++++++++-------------...
2016 Nov 02
13
[PATCH v7 00/11] implement vcpu preempted check
change from v6:
fix typos and remove uncessary comments.
change from v5:
spilt x86/kvm patch into guest/host part.
introduce kvm_write_guest_offset_cached.
fix some typos.
rebase patch onto 4.9.2
change from v4:
spilt x86 kvm vcpu preempted check into two patches.
add documentation patch.
add x86 vcpu preempted check patch under xen
add s390 vcpu preempted check patch
change from v3:
2016 Nov 02
13
[PATCH v7 00/11] implement vcpu preempted check
change from v6:
fix typos and remove uncessary comments.
change from v5:
spilt x86/kvm patch into guest/host part.
introduce kvm_write_guest_offset_cached.
fix some typos.
rebase patch onto 4.9.2
change from v4:
spilt x86 kvm vcpu preempted check into two patches.
add documentation patch.
add x86 vcpu preempted check patch under xen
add s390 vcpu preempted check patch
change from v3:
2019 Oct 02
5
DANGER WILL ROBINSON, DANGER
On 02/10/19 19:04, Jerome Glisse wrote:
> On Wed, Oct 02, 2019 at 06:18:06PM +0200, Paolo Bonzini wrote:
>>>> If the mapping of the source VMA changes, mirroring can update the
>>>> target VMA via insert_pfn. But what ensures that KVM's MMU notifier
>>>> dismantles its own existing page tables (so that they can be recreated
>>>> with the new
2019 Oct 02
5
DANGER WILL ROBINSON, DANGER
On 02/10/19 19:04, Jerome Glisse wrote:
> On Wed, Oct 02, 2019 at 06:18:06PM +0200, Paolo Bonzini wrote:
>>>> If the mapping of the source VMA changes, mirroring can update the
>>>> target VMA via insert_pfn. But what ensures that KVM's MMU notifier
>>>> dismantles its own existing page tables (so that they can be recreated
>>>> with the new
2015 Jun 24
1
[PATCH RFC] vhost: add ioctl to query nregions upper limit
On Wed, Jun 24, 2015 at 04:52:29PM +0200, Igor Mammedov wrote:
> On Wed, 24 Jun 2015 16:17:46 +0200
> "Michael S. Tsirkin" <mst at redhat.com> wrote:
>
> > On Wed, Jun 24, 2015 at 04:07:27PM +0200, Igor Mammedov wrote:
> > > On Wed, 24 Jun 2015 15:49:27 +0200
> > > "Michael S. Tsirkin" <mst at redhat.com> wrote:
> > >
>
2015 Jun 24
1
[PATCH RFC] vhost: add ioctl to query nregions upper limit
On Wed, Jun 24, 2015 at 04:52:29PM +0200, Igor Mammedov wrote:
> On Wed, 24 Jun 2015 16:17:46 +0200
> "Michael S. Tsirkin" <mst at redhat.com> wrote:
>
> > On Wed, Jun 24, 2015 at 04:07:27PM +0200, Igor Mammedov wrote:
> > > On Wed, 24 Jun 2015 15:49:27 +0200
> > > "Michael S. Tsirkin" <mst at redhat.com> wrote:
> > >
>
2016 Oct 28
16
[PATCH v6 00/11] implement vcpu preempted check
change from v5:
spilt x86/kvm patch into guest/host part.
introduce kvm_write_guest_offset_cached.
fix some typos.
rebase patch onto 4.9.2
change from v4:
spilt x86 kvm vcpu preempted check into two patches.
add documentation patch.
add x86 vcpu preempted check patch under xen
add s390 vcpu preempted check patch
change from v3:
add x86 vcpu preempted check patch
change from v2:
no code