On 2020/11/25 下午8:03, Eugenio Perez Martin wrote:
On Wed, Nov 25, 2020 at 8:09 AM Jason Wang wrote:
On 2020/11/21 上午2:50, Eugenio Pérez wrote:
This series enable vDPA software assisted live migration for vhost-net
devices. This is a new method of vhost devices migration: Instead of
relay on
On 2020/11/25 17:35, Michael S. Tsirkin wrote:
On Mon, Oct 12, 2020 at 09:55:55AM +0800, Jie Deng wrote:
Add an I2C bus driver for virtio para-virtualization.
The controller can be emulated by the backend driver in
any device model software by following the virtio protocol.
This driver commun
On Wed, Nov 25, 2020 at 8:24 AM Jakub Kicinski wrote:
>
> Applying a real patch set and then getting a few follow ups the next day
> for trivial coding things like fallthrough missing or static missing,
> just because I didn't have the full range of compilers to check with
> before applying makes
On Wed, Nov 25, 2020 at 1:33 PM Finn Thain wrote:
>
> Or do you think that a codebase can somehow satisfy multiple checkers and
> their divergent interpretations of the language spec?
Have we found any cases yet that are divergent? I don't think so. It
sounds to me like GCC's cases it warns for
On Tue, Nov 24, 2020 at 11:05:35PM -0800, James Bottomley wrote:
> Now, what we have seems to be about 6 cases (at least what's been shown
> in this thread) where a missing break would cause potentially user
> visible issues. That means the value of this isn't zero, but it's not
> a no-brainer mas
On 11/25/2020 1:30 AM, Michael S. Tsirkin wrote:
On Thu, Nov 05, 2020 at 06:26:33PM -0500, Si-Wei Liu wrote:
Pinned pages are not properly accounted particularly when
mapping error occurs on IOTLB update. Clean up dangling
pinned pages for the error path.
The memory usage for bookkeeping pinn
On 25/11/20 19:01, Sasha Levin wrote:
On Wed, Nov 25, 2020 at 06:48:21PM +0100, Paolo Bonzini wrote:
On 25/11/20 16:35, Sasha Levin wrote:
From: Mike Christie
[ Upstream commit 18f1becb6948cd411fd01968a0a54af63732e73c ]
Move code to parse lun from req's lun_buf to helper, so tmf code
can use
On Wed, Nov 25, 2020 at 06:48:21PM +0100, Paolo Bonzini wrote:
On 25/11/20 16:35, Sasha Levin wrote:
From: Mike Christie
[ Upstream commit 18f1becb6948cd411fd01968a0a54af63732e73c ]
Move code to parse lun from req's lun_buf to helper, so tmf code
can use it in the next patch.
Signed-off-by:
On 25/11/20 16:35, Sasha Levin wrote:
From: Mike Christie
[ Upstream commit 18f1becb6948cd411fd01968a0a54af63732e73c ]
Move code to parse lun from req's lun_buf to helper, so tmf code
can use it in the next patch.
Signed-off-by: Mike Christie
Reviewed-by: Paolo Bonzini
Acked-by: Jason Wang
On Wed, Nov 25, 2020 at 5:24 PM Jakub Kicinski wrote:
>
> And just to spell it out,
>
> case ENUM_VALUE1:
> bla();
> break;
> case ENUM_VALUE2:
> bla();
> default:
> break;
>
> is a fairly idiomatic way of indicating that not all values of the enum
> are expected to
Hi "Adalbert,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on dc924b062488a0376aae41d3e0a27dc99f852a5e]
url:
https://github.com/0day-ci/linux/commits/Adalbert-Laz-r/VM-introspection/20201125-174530
base:dc924b062488a0376aae41d3e0a27dc99f852a5e
config:
Hi "Adalbert,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on dc924b062488a0376aae41d3e0a27dc99f852a5e]
url:
https://github.com/0day-ci/linux/commits/Adalbert-Laz-r/VM-introspection/20201125-174530
base:dc924b062488a0376aae41d3e0a27dc99f852a5e
c
From: Mike Christie
[ Upstream commit efd838fec17bd8756da852a435800a7e6281bfbc ]
In newer versions of virtio-scsi we just reset the timer when an a
command times out, so TMFs are never sent for the cmd time out case.
However, in older kernels and for the TMF inject cases, we can still get
resets
From: Mike Christie
[ Upstream commit 47a3565e8bb14ec48a75b48daf57aa830e2691f8 ]
We might not do the final se_cmd put from vhost_scsi_complete_cmd_work.
When the last put happens a little later then we could race where
vhost_scsi_complete_cmd_work does vhost_signal, the guest runs and sends
more
From: Mike Christie
[ Upstream commit 18f1becb6948cd411fd01968a0a54af63732e73c ]
Move code to parse lun from req's lun_buf to helper, so tmf code
can use it in the next patch.
Signed-off-by: Mike Christie
Reviewed-by: Paolo Bonzini
Acked-by: Jason Wang
Link:
https://lore.kernel.org/r/160498
From: Mike Christie
[ Upstream commit 18f1becb6948cd411fd01968a0a54af63732e73c ]
Move code to parse lun from req's lun_buf to helper, so tmf code
can use it in the next patch.
Signed-off-by: Mike Christie
Reviewed-by: Paolo Bonzini
Acked-by: Jason Wang
Link:
https://lore.kernel.org/r/160498
From: Mike Christie
[ Upstream commit efd838fec17bd8756da852a435800a7e6281bfbc ]
In newer versions of virtio-scsi we just reset the timer when an a
command times out, so TMFs are never sent for the cmd time out case.
However, in older kernels and for the TMF inject cases, we can still get
resets
From: Mike Christie
[ Upstream commit 25b98b64e28423b0769313dcaf96423836b1f93d ]
We currently are limited to 256 cmds per session. This leads to problems
where if the user has increased virtqueue_size to more than 2 or
cmd_per_lun to more than 256 vhost_scsi_get_tag can fail and the guest
will g
From: Mike Christie
[ Upstream commit 47a3565e8bb14ec48a75b48daf57aa830e2691f8 ]
We might not do the final se_cmd put from vhost_scsi_complete_cmd_work.
When the last put happens a little later then we could race where
vhost_scsi_complete_cmd_work does vhost_signal, the guest runs and sends
more
From: Mike Christie
[ Upstream commit 6bcf34224ac1e94103797fd68b9836061762f2b2 ]
This adds a helper check if a vq has been setup. The next patches
will use this when we move the vhost scsi cmd preallocation from per
session to per vq. In the per vq case, we only want to allocate cmds
for vqs tha
From: Laurent Vivier
[ Upstream commit a312db697cb05dfa781848afe8585a1e1f2a5a99 ]
ERROR: modpost: "mac_pton" [drivers/vdpa/vdpa_sim/vdpa_sim.ko] undefined!
mac_pton() is defined in lib/net_utils.c and is not built if NET is not set.
Select GENERIC_NET_UTILS as vdpasim doesn't depend on NET.
Hi "Adalbert,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on dc924b062488a0376aae41d3e0a27dc99f852a5e]
url:
https://github.com/0day-ci/linux/commits/Adalbert-Laz-r/VM-introspection/20201125-174530
base:dc924b062488a0376aae41d3e0a27dc99f852a5e
config: x
Hi "Adalbert,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on dc924b062488a0376aae41d3e0a27dc99f852a5e]
url:
https://github.com/0day-ci/linux/commits/Adalbert-Laz-r/VM-introspection/20201125-174530
base:dc924b062488a0376aae41d3e0a27dc99f852a5e
c
On Tue, Nov 24, 2020 at 6:39 AM Thomas Zimmermann wrote:
>
> Using struct drm_device.pdev is deprecated. Convert radeon to struct
> drm_device.dev. No functional changes.
>
> Signed-off-by: Thomas Zimmermann
> Cc: Alex Deucher
> Cc: Christian König
There are a few unrelated whitespace changes.
On Tue, Nov 24, 2020 at 6:38 AM Thomas Zimmermann wrote:
>
> Using struct drm_device.pdev is deprecated. Convert amdgpu to struct
> drm_device.dev. No functional changes.
>
> Signed-off-by: Thomas Zimmermann
> Cc: Alex Deucher
> Cc: Christian König
There are a few unrelated whitespace changes.
Hi "Adalbert,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on dc924b062488a0376aae41d3e0a27dc99f852a5e]
url:
https://github.com/0day-ci/linux/commits/Adalbert-Laz-r/VM-introspection/20201125-174530
base:dc924b062488a0376aae41d3e0a27dc99f852a5e
c
Hi "Adalbert,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on dc924b062488a0376aae41d3e0a27dc99f852a5e]
url:
https://github.com/0day-ci/linux/commits/Adalbert-Laz-r/VM-introspection/20201125-174530
base:dc924b062488a0376aae41d3e0a27dc99f852a5e
c
From: Mathias Crombez
Without multi-touch slots allocated, ABS_MT_SLOT events will be lost by
input_handle_abs_event.
Signed-off-by: Mathias Crombez
Signed-off-by: Vasyl Vavrychuk
Tested-by: Vasyl Vavrychuk
---
drivers/virtio/Kconfig| 11 +++
drivers/virtio/virtio_input.c |
Hi "Adalbert,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on dc924b062488a0376aae41d3e0a27dc99f852a5e]
url:
https://github.com/0day-ci/linux/commits/Adalbert-Laz-r/VM-introspection/20201125-174530
base:dc924b062488a0376aae41d3e0a27dc99f852a5e
c
Hi "Adalbert,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on dc924b062488a0376aae41d3e0a27dc99f852a5e]
url:
https://github.com/0day-ci/linux/commits/Adalbert-Laz-r/VM-introspection/20201125-174530
base:dc924b062488a0376aae41d3e0a27dc99f852a5e
config:
Hi "Adalbert,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on dc924b062488a0376aae41d3e0a27dc99f852a5e]
url:
https://github.com/0day-ci/linux/commits/Adalbert-Laz-r/VM-introspection/20201125-174530
base:dc924b062488a0376aae41d3e0a27dc99f852a5e
c
On Tue, Nov 24, 2020 at 11:05 PM James Bottomley
wrote:
>
> On Tue, 2020-11-24 at 13:32 -0800, Kees Cook wrote:
> > We already enable -Wimplicit-fallthrough globally, so that's not the
> > discussion. The issue is that Clang is (correctly) even more strict
> > than GCC for this, so these are the r
Hi "Adalbert,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on dc924b062488a0376aae41d3e0a27dc99f852a5e]
url:
https://github.com/0day-ci/linux/commits/Adalbert-Laz-r/VM-introspection/20201125-174530
base:dc924b062488a0376aae41d3e0a27dc99f852a5e
c
Hi "Adalbert,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on dc924b062488a0376aae41d3e0a27dc99f852a5e]
url:
https://github.com/0day-ci/linux/commits/Adalbert-Laz-r/VM-introspection/20201125-174530
base:dc924b062488a0376aae41d3e0a27dc99f852a5e
c
On Mon, Nov 23, 2020 at 10:39 PM James Bottomley
wrote:
> On Mon, 2020-11-23 at 19:56 +0100, Miguel Ojeda wrote:
> > On Mon, Nov 23, 2020 at 4:58 PM James Bottomley
> > wrote:
...
> > But if we do the math, for an author, at even 1 minute per line
> > change and assuming nothing can be automate
On Wed, Nov 25, 2020 at 1:46 AM Wei Liu wrote:
>
> We are about to implement an irqchip for IO-APIC when Linux runs as root
> on Microsoft Hypervisor. At the same time we would like to reuse
> existing code as much as possible.
>
> Move mp_chip_data to io_apic.h and make a few helper functions
> n
From: Mihai Donțu
Based on the common structure (kvmi_vcpu_hdr) used for all vCPU commands,
the receiving thread validates and dispatches the message to the proper
vCPU (adding the handling function to its jobs list).
Signed-off-by: Mihai Donțu
Co-developed-by: Nicușor Cîțu
Signed-off-by: Nicu
This event is sent when the guest is about to be
paused/suspended/migrated. The introspection tool has the chance to
remove its hooks (e.g. breakpoints) while the guest is still running.
Signed-off-by: Adalbert Lazăr
---
Documentation/virt/kvm/kvmi.rst | 31 +
arch/x86/kvm/
From: Mihai Donțu
This event is sent when a #PF occurs due to a failed permission check
in the shadow page tables, for a page in which the introspection tool
has shown interest.
Signed-off-by: Mihai Donțu
Co-developed-by: Adalbert Lazăr
Signed-off-by: Adalbert Lazăr
---
Documentation/virt/kv
From: Ștefan Șicleru
The introspection tool will use this command to get the memory address
range for which it can set access restrictions.
Signed-off-by: Ștefan Șicleru
Co-developed-by: Nicușor Cîțu
Signed-off-by: Nicușor Cîțu
Signed-off-by: Adalbert Lazăr
---
Documentation/virt/kvm/kvmi.r
From: Nicușor Cîțu
This commit also ensures that the introspection tool and the userspace
do not disable each other the MSR access VM-exit.
Signed-off-by: Nicușor Cîțu
Signed-off-by: Adalbert Lazăr
---
arch/x86/include/asm/kvmi_host.h | 12 +++
arch/x86/kvm/kvmi.c | 124
From: Mihai Donțu
This command returns the memory type for a guest physical address.
Signed-off-by: Mihai Donțu
Co-developed-by: Nicușor Cîțu
Signed-off-by: Nicușor Cîțu
Signed-off-by: Adalbert Lazăr
---
Documentation/virt/kvm/kvmi.rst | 32 +++
arch/x86/includ
From: Nicușor Cîțu
On unhook the introspection channel is closed. This will signal the
receiving thread to call kvmi_put() and exit. There might be vCPU threads
handling introspection commands or waiting for event replies. These
will also call kvmi_put() and re-enter in guest. Once the reference
On hook, a new thread is created to handle the messages coming from the
introspection tool (commands or event replies). The VM related commands
are handled by this thread, while the vCPU commands and events replies
are dispatched to the vCPU threads.
On unhook, the socket is shut down, which will
This function is needed for the KVMI_VCPU_SET_XSAVE command.
Signed-off-by: Adalbert Lazăr
---
arch/x86/kvm/x86.c | 4 ++--
include/linux/kvm_host.h | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 4fadd1ab20ae..f48603c8e4
From: Nicușor Cîțu
This event is sent when IDTR, GDTR, LDTR or TR are accessed.
These could be used to implement a tiny agent which runs in the context
of an introspected guest and uses virtualized exceptions (#VE) and
alternate EPT views (VMFUNC #0) to filter converted VMEXITS. The events
of in
The KVM introspection subsystem provides a facility for applications
running on the host or in a separate VM, to control the execution of
other VMs (pause, resume, shutdown), query the state of the vCPUs (GPRs,
MSRs etc.), alter the page access bits in the shadow page tables (only
for the hardware
From: Mihai Donțu
The receiving thread dispatches the vCPU introspection commands by
adding them to the vCPU's jobs list and kicking the vCPU. Before
entering in guest, the vCPU thread checks the introspection request
(KVM_REQ_INTROSPECTION) and runs its queued jobs.
Signed-off-by: Mihai Donțu
From: Mihai Donțu
The KVMI_VCPU_INJECT_EXCEPTION command is used by the introspection tool
to inject exceptions, for example, to get a page from swap.
The exception is injected right before entering in guest unless there is
already an exception pending. The introspection tool is notified with
an
This function is needed for the KVMI_VM_PAUSE_VCPU command, which sets
the introspection request flag, kicks the vCPU out of guest and returns
a success error code (0). The vCPU will send the KVMI_VCPU_EVENT_PAUSE
event as soon as possible. Once the introspection tool receives the event,
it knows t
From: Mihai Donțu
The information we can provide this way is incomplete, but current users
of the page tracking code can work with it.
Signed-off-by: Mihai Donțu
Signed-off-by: Adalbert Lazăr
---
arch/x86/kvm/x86.c | 49 ++
1 file changed, 49 insert
When the introspection tool tries to enable the KVMI_VCPU_EVENT_DESCRIPTOR
event, this function is used to check if the control of VM-exits caused
by descriptor-table registers access is supported.
Signed-off-by: Adalbert Lazăr
---
arch/x86/include/asm/kvm_host.h | 1 +
arch/x86/kvm/svm/svm.c
From: Nicușor Cîțu
This function will be used to check if the write access for a specific
MSR is already intercepted. The information will be used to restore the
interception status when the introspection tool is no longer interested
in that MSR.
Signed-off-by: Nicușor Cîțu
Signed-off-by: Adalb
From: Mihai Donțu
This event is sent on a specific hypercall.
It is used by the code residing inside the introspected guest to call the
introspection tool and to report certain details about its operation.
For example, a classic antimalware remediation tool can report
what it has found during a
Based on the common header (struct kvmi_msg_hdr), the receiving thread
will read/validate all messages, execute the VM introspection commands
(eg. KVMI_VM_GET_INFO) and dispatch the vCPU introspection commands
(eg. KVMI_VCPU_GET_REGISTERS) to the vCPU threads.
The vCPU threads will reply to vCPU i
From: Nicușor Cîțu
This function is needed for the KVMI_VCPU_GET_XSAVE command.
Signed-off-by: Nicușor Cîțu
Signed-off-by: Adalbert Lazăr
---
arch/x86/kvm/x86.c | 4 ++--
include/linux/kvm_host.h | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/x86.c b
From: Mircea Cîrjaliu
This change is needed because the introspection tool can write-protect
guest page tables or exec-protect heap/stack pages.
Signed-off-by: Mircea Cîrjaliu
Co-developed-by: Adalbert Lazăr
Signed-off-by: Adalbert Lazăr
---
arch/x86/include/asm/kvm_host.h | 5 +
arch/x8
The next hypercalls will be correctly numbered.
Signed-off-by: Adalbert Lazăr
---
Documentation/virt/kvm/hypercalls.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/virt/kvm/hypercalls.rst
b/Documentation/virt/kvm/hypercalls.rst
index ed4fddd364ea..70e77
This function is needed for the KVMI_VCPU_CONTROL_CR command, when the
introspection tool has to intercept the read/write access to CR3.
Co-developed-by: Nicușor Cîțu
Signed-off-by: Nicușor Cîțu
Signed-off-by: Adalbert Lazăr
---
arch/x86/include/asm/kvm_host.h | 6 ++
arch/x86/kvm/svm/svm
These commands are used to check what introspection commands and events
are supported (kernel) and allowed (device manager).
These are alternative methods to KVMI_GET_VERSION in checking if the
introspection supports a specific command/event.
As with the KVMI_GET_VERSION command, these two comman
From: Nicușor Cîțu
This is a preparatory patch in order to use a common interface to
enable/disable the MSR interception.
Also, it will allow to independently control the read and write
interceptions.
Signed-off-by: Nicușor Cîțu
Signed-off-by: Adalbert Lazăr
---
arch/x86/include/asm/kvm_host
From: Mihai Donțu
This should make the code more readable.
Signed-off-by: Mihai Donțu
Signed-off-by: Adalbert Lazăr
---
arch/x86/kvm/vmx/vmx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index c1497b8e506c..a7d2bab382
From: Mihai Donțu
This vCPU command is used to get the XSAVE area.
Signed-off-by: Mihai Donțu
Co-developed-by: Adalbert Lazăr
Signed-off-by: Adalbert Lazăr
---
Documentation/virt/kvm/kvmi.rst | 29 +++
arch/x86/include/uapi/asm/kvmi.h | 4 +++
arch
This helps the introspection tool with the GVA to GPA translations
without the need to read or monitor the guest page tables.
Signed-off-by: Adalbert Lazăr
---
Documentation/virt/kvm/kvmi.rst | 32 +++
arch/x86/kvm/kvmi_msg.c | 15 +
in
From: Nicușor Cîțu
This function will be used to allow the introspection tool to disable the
CR3-write interception when it is no longer interested in these events,
but only if nothing else depends on these VM-exits.
Signed-off-by: Nicușor Cîțu
Signed-off-by: Adalbert Lazăr
---
arch/x86/inclu
From: Mihai Donțu
This action is used in extreme cases such as blocking the spread of
malware as fast as possible.
Signed-off-by: Mihai Donțu
Signed-off-by: Adalbert Lazăr
---
virt/kvm/introspection/kvmi.c | 4
1 file changed, 4 insertions(+)
diff --git a/virt/kvm/introspection/kvmi.c b
From: Mihai Donțu
This event is sent when a breakpoint was reached.
The introspection tool can place breakpoints and use them as notification
for when the OS or an application has reached a certain state or is
trying to perform a certain operation (eg. create a process).
Signed-off-by: Mihai Do
From: Ștefan Șicleru
This function is needed for the KVMI_VM_GET_MAX_GFN command.
Signed-off-by: Ștefan Șicleru
Signed-off-by: Adalbert Lazăr
---
include/linux/kvm_host.h | 1 +
virt/kvm/kvm_main.c | 25 +
2 files changed, 26 insertions(+)
diff --git a/include/l
From: Nicușor Cîțu
This is needed for the KVMI_VCPU_SET_REGISTERS command, which allows
an introspection tool to override the kvm_regs structure for a specific
vCPU without clearing the pending exception. In most cases this is used
to increment the program counter.
Signed-off-by: Nicușor Cîțu
S
From: Marian Rotariu
This command returns a CPUID leaf (as seen by the guest OS).
Signed-off-by: Marian Rotariu
Co-developed-by: Adalbert Lazăr
Signed-off-by: Adalbert Lazăr
---
Documentation/virt/kvm/kvmi.rst | 36 +++
arch/x86/include/uapi/asm/kvmi.h
From: Mihai Donțu
This function is needed for kvmi_update_ad_flags()
and kvm_page_track_emulation_failure().
kvmi_update_ad_flags() uses the existing guest page table walk code to
update the A/D bits and return to guest (when the introspection tool
write-protects the guest page tables).
kvm_pag
From: Mihai Donțu
This is needed because the emulator calls the page tracking code
irrespective of the current VM-exit reason or available information.
Signed-off-by: Mihai Donțu
Signed-off-by: Adalbert Lazăr
---
arch/x86/include/asm/kvm_host.h | 2 +-
arch/x86/include/asm/kvm_page_tra
From: Mihai Donțu
This command returns the TSC frequency (in HZ) for the specified
vCPU if available (otherwise it returns zero).
Signed-off-by: Mihai Donțu
Co-developed-by: Adalbert Lazăr
Signed-off-by: Adalbert Lazăr
---
Documentation/virt/kvm/kvmi.rst | 29
arch/x86/in
From: Mihai Donțu
These are needed in order to notify the introspection tool when
read/write/execute access happens on one of the tracked memory pages.
Also, this patch adds the case when the introspection tool requests
that the vCPU re-enter in guest (and abort the emulation of the current
inst
From: Mihai Donțu
This is needed for kvmi_update_ad_flags() to emulate a guest page
table walk on SPT violations due to A/D bit updates.
Signed-off-by: Mihai Donțu
Signed-off-by: Adalbert Lazăr
---
arch/x86/include/asm/kvm_host.h | 2 +-
arch/x86/kvm/x86.c | 6 +++---
2 files cha
When handling introspection commands from tools built with older or
newer versions of the introspection API, the receiving thread silently
accepts smaller/larger messages, but it replies with messages related to
current/kernel version. Smaller introspection event replies are accepted
too. However,
This can be used by the introspection tool to emulate SSE instructions.
Signed-off-by: Adalbert Lazăr
---
Documentation/virt/kvm/kvmi.rst | 33 +++
arch/x86/include/uapi/asm/kvmi.h | 9 +
arch/x86/kvm/kvmi_msg.c | 21 +
This command increments a pause requests counter for a vCPU and kicks
it out of guest.
The introspection tool can pause a VM by sending this command for all
vCPUs. If it sets 'wait=1', it can consider that the VM is paused when
it receives the reply for the last KVMI_VM_PAUSE_VCPU command.
Signed
This command will allow more control over the guest state on
unhook. However, the memory restrictions (e.g. those set with
KVMI_VM_SET_PAGE_ACCESS) will be removed on unhook.
Signed-off-by: Adalbert Lazăr
---
Documentation/virt/kvm/kvmi.rst | 28 +++
arch/x86/include/a
This is the common code used by vCPU threads to send events and wait for
replies (received and dispatched by the receiving thread). While waiting
for an event reply, the vCPU thread will handle any introspection command
already queued or received during this period.
Signed-off-by: Adalbert Lazăr
From: Nicușor Cîțu
The next commit that adds the KVMI_VCPU_EVENT_SINGLESTEP event will make
this command more useful.
Signed-off-by: Nicușor Cîțu
Co-developed-by: Adalbert Lazăr
Signed-off-by: Adalbert Lazăr
---
Documentation/virt/kvm/kvmi.rst | 33 +++
arch/x86/kvm/kvm
From: Mihai Donțu
This command is used to get kvm_regs and kvm_sregs structures,
plus a list of struct kvm_msrs from a specific vCPU.
While the kvm_regs and kvm_sregs structures are included with every
event, this command allows reading any MSR.
Signed-off-by: Mihai Donțu
Co-developed-by: Adal
From: Nicușor Cîțu
This event is sent after each instruction when the singlestep has been
enabled for a vCPU.
Signed-off-by: Nicușor Cîțu
Co-developed-by: Adalbert Lazăr
Signed-off-by: Adalbert Lazăr
---
Documentation/virt/kvm/kvmi.rst | 31 +++
arch/x86/kvm/kvmi.c
From: Mihai Donțu
Using the KVMI_VCPU_CONTROL_CR command, the introspection tool subscribes
to KVMI_VCPU_EVENT_CR events that will be sent when a control register
(CR0, CR3 or CR4) is going to be changed.
Signed-off-by: Mihai Donțu
Co-developed-by: Adalbert Lazăr
Signed-off-by: Adalbert Lazăr
From: Nicușor Cîțu
This commit also ensures that only the userspace or the introspection
tool can control the #BP interception exclusively at one time.
Signed-off-by: Nicușor Cîțu
Signed-off-by: Adalbert Lazăr
---
arch/x86/include/asm/kvmi_host.h | 18 ++
arch/x86/kvm/kvmi.c
From: Mihai Donțu
This is needed for the KVMI_VCPU_EVENT_MSR event, which is used notify
the introspection tool about any change made to a MSR of interest.
Signed-off-by: Mihai Donțu
Co-developed-by: Nicușor Cîțu
Signed-off-by: Nicușor Cîțu
Signed-off-by: Adalbert Lazăr
---
arch/x86/include
From: Nicușor Cîțu
This function is needed for the KVMI_VCPU_INJECT_EXCEPTION command.
Signed-off-by: Nicușor Cîțu
Signed-off-by: Adalbert Lazăr
---
arch/x86/include/asm/kvm_host.h | 1 +
arch/x86/kvm/x86.c | 52 +++--
2 files changed, 31 insertions(+
From: Nicușor Cîțu
This function is needed for KVMI_VCPU_CONTROL_SINGLESTEP.
Signed-off-by: Nicușor Cîțu
Signed-off-by: Adalbert Lazăr
---
arch/x86/include/asm/kvm_host.h | 1 +
arch/x86/kvm/vmx/vmx.c | 11 +++
2 files changed, 12 insertions(+)
diff --git a/arch/x86/include
From: Mihai Donțu
The access to a tracked memory page leads to two types of actions from the
introspection tool: either the access is allowed (maybe with different
data for the source operand) or the vCPU should re-enter in guest
(the page is not tracked anymore, the instruction was skipped/emula
From: Mihai Donțu
This event is sent when an extended control register XCR is going to
be changed.
Signed-off-by: Mihai Donțu
Co-developed-by: Nicușor Cîțu
Signed-off-by: Nicușor Cîțu
Signed-off-by: Adalbert Lazăr
---
Documentation/virt/kvm/kvmi.rst | 34
arch/x86/inc
From: Mihai Donțu
This command sets the spte access bits (rwx) for an array of guest
physical addresses (through the page tracking subsystem).
These GPAs, with the requested access bits, are also kept in a radix
tree in order to filter out the #PF events which are of no interest to
the introspec
From: Mihai Donțu
This command is used to enable/disable introspection for a specific
MSR. The KVMI_VCPU_EVENT_MSR event is sent when the tracked MSR is going
to be changed. The introspection tool can respond by allowing the guest
to continue with normal execution or by discarding the change.
Th
From: Mihai Donțu
It can happened to end up emulating the VMCALL instruction as a result
of the handling of an EPT write fault. In this situation,
the emulator will try to unconditionally patch the correct hypercall
opcode bytes using emulator_write_emulated(). However, this last call
uses the fa
From: Mihai Donțu
By default, all introspection events are disabled. The introspection tool
must explicitly enable the events it wants to receive. With this command
(KVMI_VCPU_CONTROL_EVENTS) it can enable/disable any vCPU event allowed
by the device manager.
Some vCPU events doesn't have to be
By default, all introspection VM events are disabled. The introspection
tool must explicitly enable the VM events it wants to receive. With this
command it can enable/disable any VM event (e.g. KVMI_VM_EVENT_UNHOOK)
if allowed by the device manager.
Signed-off-by: Adalbert Lazăr
---
Documentatio
In certain situations (when the guest has to be paused, suspended,
migrated, etc.), the device manager will use this new ioctl in order to
trigger the KVMI_VM_EVENT_UNHOOK event. If the event is sent successfully
(the VM has an active introspection channel), the device manager should
delay the acti
From: Nicușor Cîțu
This function will be used to test if the descriptor-table registers
access is already tracked by userspace.
Signed-off-by: Nicușor Cîțu
Signed-off-by: Adalbert Lazăr
---
arch/x86/include/asm/kvm_host.h | 1 +
arch/x86/kvm/svm/svm.c | 15 +++
arch/x86/
From: Nicușor Cîțu
This commit also ensures that the introspection tool and the userspace
do not disable each other the CR3-write VM-exit.
Signed-off-by: Nicușor Cîțu
Signed-off-by: Adalbert Lazăr
---
arch/x86/include/asm/kvmi_host.h | 4 ++
arch/x86/kvm/kvmi.c | 67
From: Mircea Cîrjaliu
Add an introspection structure to all vCPUs when the VM is hooked.
Signed-off-by: Mircea Cîrjaliu
Signed-off-by: Adalbert Lazăr
---
arch/x86/include/asm/kvmi_host.h | 3 ++
include/linux/kvm_host.h | 1 +
include/linux/kvmi_host.h| 6
virt/kvm/int
From: Nicușor Cîțu
Both, the introspection tool and the device manager can request #BP
interception. This function will be used to check if this interception
is already enabled by either side.
Signed-off-by: Nicușor Cîțu
Signed-off-by: Adalbert Lazăr
---
arch/x86/include/asm/kvm_host.h | 1 +
1 - 100 of 121 matches
Mail list logo