On 4/15/20 7:50 AM, Klaus Jensen wrote:
From: Klaus Jensen
Move device configuration parameters to separate struct to make it
explicit what is configurable and what is set internally.
Signed-off-by: Klaus Jensen
Signed-off-by: Klaus Jensen
Acked-by: Keith Busch
Reviewed-by: Maxim Levitsky
On 4/15/20 7:50 AM, Klaus Jensen wrote:
From: Klaus Jensen
These break statements was left over when commit 3036a626e9ef ("nvme:
add Get/Set Feature Timestamp support") was merged.
Signed-off-by: Klaus Jensen
Acked-by: Keith Busch
Reviewed-by: Maxim Levitsky
---
hw/block/nvme.c | 4
On 4/14/20 1:11 PM, Nicholas Piggin wrote:
> If mtmsr L=1 sets MSR[EE] while there is a maskable exception pending,
> it does not cause an interrupt. This causes the test case to hang:
>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.gnu.org_archive_html_qemu-2Dppc_2019-2D10_msg00826
Hi Michael,
On 4/12/20 11:14 AM, Michael Rolnik wrote:
> hi all.
>
> are there any news / updates about AVR support?
Aleksandar is not very active on qemu-devel recently, I suppose he is busy.
I have ~15 patches on top of your series, but I'm waiting update on the
status on this target before p
On 4/14/20 5:02 PM, sundeep.l...@gmail.com wrote:
> From: Subbaraya Sundeep
>
> Modelled Ethernet MAC of Smartfusion2 SoC.
> Micrel KSZ8051 PHY is present on Emcraft's
> SOM kit hence same PHY is emulated.
>
> Signed-off-by: Subbaraya Sundeep
> Reviewed-by: Philippe Mathieu-Daudé
> Tested-by:
Peter Maydell writes:
> On Mon, 6 Apr 2020 at 16:33, Daniel P. Berrangé wrote:
>>
>> Running configure directly from the source directory is a build
>> configuration that will go away in future. It is also not currently
>> covered by any automated testing. Display a deprecation warning if
>> the
From: Klaus Jensen
The emulated nvme device (hw/block/nvme.c) is currently using an
internal Intel device id.
Prepare to change that by allocating a device id under the 1b36 (Red
Hat, Inc.) vendor id.
Signed-off-by: Klaus Jensen
Cc: Gerd Hoffmann
Acked-by: Keith Busch
Reviewed-by: Maxim Levi
From: Klaus Jensen
There are two reasons for changing this:
1. The nvme device currently uses an internal Intel device id.
2. Since commits "nvme: fix write zeroes offset and count" and "nvme:
support multiple namespaces" the controller device no longer has
the quirks that the Lin
From: Klaus Jensen
Since the controller has only supported PRPs so far it has not been
required to check the ending address (addr + len - 1) of the CMB access
for validity since it has been guaranteed to be in range of the CMB.
This changes when the controller adds support for SGLs (next patch),
From: Klaus Jensen
This refactors how the device issues asynchronous block backend
requests. The NvmeRequest now holds a queue of NvmeAIOs that are
associated with the command. This allows multiple aios to be issued for
a command. Only when all requests have been completed will the device
post a
From: Klaus Jensen
Signed-off-by: Klaus Jensen
Reviewed-by: Maxim Levitsky
---
hw/block/nvme.c | 67 +--
hw/block/trace-events | 2 +-
2 files changed, 40 insertions(+), 29 deletions(-)
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index 2ff7dd6
On 4/14/20 3:17 PM, Markus Armbruster wrote:
> Philippe Mathieu-Daudé writes:
>
>> On 4/14/20 2:24 PM, Markus Armbruster wrote:
>>> Philippe Mathieu-Daudé writes:
>>>
When a device uses an Error* with data not modified before realize(),
this call can be moved to init(). Add a Coccinell
From: Klaus Jensen
The nvme device needs to know the return value of dma_memory_rw to pass
block/011 from blktests. So pass it along instead of ignoring it.
There are no existing users of the return value, so this patch should be
safe.
Signed-off-by: Klaus Jensen
Reviewed-by: Philippe Mathieu-
From: Klaus Jensen
Signed-off-by: Klaus Jensen
---
hw/block/nvme.c | 26 --
1 file changed, 20 insertions(+), 6 deletions(-)
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index c123be10fd0d..ffc49985321b 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -651,6 +651
From: Klaus Jensen
The spec in general uses 'zeroes' and not 'zeros'.
Now, according to the Oxford dictionary, 'zeroes' is the action of
zeroing something, i.e. "he zeroes the range" and 'zeros' is the plural
of zero. Thus, Write Zeroes should actually be called Write Zeros, but
alas, let us ali
From: Klaus Jensen
Refactor the nvme_dma_{read,write}_prp functions into a common function
taking a DMADirection parameter.
Signed-off-by: Klaus Jensen
Reviewed-by: Maxim Levitsky
---
hw/block/nvme.c | 88 -
1 file changed, 43 insertions(+), 45
From: Klaus Jensen
Signed-off-by: Klaus Jensen
Acked-by: Keith Busch
Reviewed-by: Maxim Levitsky
---
hw/block/nvme-ns.c | 7 ++-
hw/block/nvme-ns.h | 4 +++-
hw/block/nvme.c| 1 +
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/hw/block/nvme-ns.c b/hw/block/nvme-ns.c
i
From: Klaus Jensen
This adds support for multiple namespaces by introducing a new 'nvme-ns'
device model. The nvme device creates a bus named from the device name
('id'). The nvme-ns devices then connect to this and registers
themselves with the nvme device.
This changes how an nvme device is cr
From: Klaus Jensen
Prepare to support inactive namespaces.
Signed-off-by: Klaus Jensen
Reviewed-by: Maxim Levitsky
---
hw/block/nvme.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index f295f027b8e2..05a6fa334a70 100644
--- a/hw
From: Klaus Jensen
Since clean up of the request qsg/iov has been moved to the common
nvme_enqueue_req_completion function, there is no need to use a stack
allocated qsg/iov in nvme_dma_prp.
Signed-off-by: Klaus Jensen
Acked-by: Keith Busch
Reviewed-by: Maxim Levitsky
---
hw/block/nvme.c | 1
From: Klaus Jensen
For now, support the Data Block, Segment and Last Segment descriptor
types.
See NVM Express 1.3d, Section 4.4 ("Scatter Gather List (SGL)").
Signed-off-by: Klaus Jensen
Signed-off-by: Klaus Jensen
Acked-by: Keith Busch
---
hw/block/nvme.c | 332 +
From: Klaus Jensen
Handling DMA errors gracefully is required for the device to pass the
block/011 test ("disable PCI device while doing I/O") in the blktests
suite.
With this patch the device passes the test by retrying "critical"
transfers (posting of completion entries and processing of submi
From: Klaus Jensen
Introduce the nvme_map helper to remove some noise in the main nvme_rw
function.
Signed-off-by: Klaus Jensen
Reviewed-by: Maxim Levitsky
---
hw/block/nvme.c | 13 ++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
From: Klaus Jensen
Add nvme_map_addr, nvme_map_addr_cmb and nvme_addr_to_cmb helpers and
use them in nvme_map_prp.
This fixes a bug where in the case of a CMB transfer, the device would
map to the buffer with a wrong length.
Fixes: b2b2b67a00574 ("nvme: Add support for Read Data and Write Data
From: Klaus Jensen
Signed-off-by: Klaus Jensen
Reviewed-by: Maxim Levitsky
---
hw/block/nvme.c | 28 ++--
1 file changed, 22 insertions(+), 6 deletions(-)
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index 3e5e99644a4e..7528d75905d4 100644
--- a/hw/block/nvme.c
+++ b
From: Klaus Jensen
Add a reference to the NvmeNamespace and move clearing of the structure
from "clear before use" to "clear after use".
Signed-off-by: Klaus Jensen
---
hw/block/nvme.c | 38 +-
hw/block/nvme.h | 1 +
2 files changed, 22 insertions(+), 17 de
From: Gollu Appalanaidu
This adds support for SGL descriptor type 0x1 (bit bucket descriptor).
See the NVM Express v1.3d specification, Section 4.4 ("Scatter Gather
List (SGL)").
Signed-off-by: Gollu Appalanaidu
Signed-off-by: Klaus Jensen
---
hw/block/nvme.c | 33 +++-
From: Klaus Jensen
Remove the has_sg member from NvmeRequest since it's redundant.
Signed-off-by: Klaus Jensen
Reviewed-by: Maxim Levitsky
---
hw/block/nvme.c | 11 ++-
hw/block/nvme.h | 1 -
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/hw/block/nvme.c b/hw/block/nv
From: Klaus Jensen
Keep a copy of the raw nvme command in the NvmeRequest and remove the
now redundant NvmeCmd parameter.
Signed-off-by: Klaus Jensen
---
hw/block/nvme.c | 177 +---
hw/block/nvme.h | 1 +
2 files changed, 93 insertions(+), 85 delet
From: Klaus Jensen
The QSG isn't always initialized, so accounting could be wrong. Issue a
call to blk_acct_start instead with the size taken from the QSG or IOV
depending on the kind of I/O.
Signed-off-by: Klaus Jensen
Reviewed-by: Maxim Levitsky
---
hw/block/nvme.c | 5 -
1 file changed
From: Klaus Jensen
Before this patch the device already supported this, but it did not
check for the validity of it nor announced the support in the LISTS
field.
If some of the PRPs in a PRP list are in the CMB, then ALL entries must
be there. This patch makes sure that is verified as well as pr
From: Klaus Jensen
This is preparatory to subsequent patches that change how QSGs/IOVs are
handled. It is important that the qsg and iov members of the NvmeRequest
are initially zeroed.
Signed-off-by: Klaus Jensen
Reviewed-by: Maxim Levitsky
---
hw/block/nvme.c | 2 +-
1 file changed, 1 inser
From: Klaus Jensen
Also, streamline nvme_identify_ns and nvme_identify_ns_list. They do not
need to repeat the command, it is already in the trace name.
Signed-off-by: Klaus Jensen
---
hw/block/nvme.c | 20
hw/block/trace-events | 13 +++--
2 files changed, 3
From: Klaus Jensen
Signed-off-by: Klaus Jensen
Reviewed-by: Maxim Levitsky
---
hw/block/nvme.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index d5c293476411..59935d4641a6 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -44,6 +
From: Klaus Jensen
Add 'mdts' device parameter to control the Maximum Data Transfer Size of
the controller and check that it is respected.
Signed-off-by: Klaus Jensen
Reviewed-by: Maxim Levitsky
---
hw/block/nvme.c | 29 -
hw/block/nvme.h | 4 +++-
hw/
From: Klaus Jensen
Since we are not providing the NGUID or EUI64 fields, we must support
the Namespace UUID. We do not have any way of storing a persistent
unique identifier, so conjure up a UUID that is just the namespace id.
Signed-off-by: Klaus Jensen
---
hw/block/nvme.c | 39
From: Klaus Jensen
Add support for the Get Log Page command and basic implementations of
the mandatory Error Information, SMART / Health Information and Firmware
Slot Information log pages.
In violation of the specification, the SMART / Health Information log
page does not persist information ov
From: Klaus Jensen
Signed-off-by: Klaus Jensen
Reviewed-by: Maxim Levitsky
---
hw/block/nvme.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index d88e21a14b77..d5c293476411 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -1940,6 +1940,9 @@ stat
From: Klaus Jensen
Support returning Command Sequence Error if Set Features on Number of
Queues is called after queues have been created.
Signed-off-by: Klaus Jensen
Reviewed-by: Maxim Levitsky
---
hw/block/nvme.c | 12
hw/block/nvme.h | 1 +
2 files changed, 13 insertions(+)
d
From: Klaus Jensen
The LSP field is not used directly now, but include it in the trace.
Signed-off-by: Klaus Jensen
Reviewed-by: Maxim Levitsky
---
hw/block/nvme.c | 3 ++-
hw/block/trace-events | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw/block/nvme.c b/hw/
From: Klaus Jensen
Add support for returning a resonable response to Get/Set Features of
mandatory features.
Signed-off-by: Klaus Jensen
Signed-off-by: Klaus Jensen
Acked-by: Keith Busch
---
hw/block/nvme.c | 60 ++-
hw/block/trace-events | 2 ++
From: Klaus Jensen
Required for compliance with NVMe revision 1.2.1. See NVM Express 1.2.1,
Section 5.2 ("Asynchronous Event Request command").
Mostly imported from Keith's qemu-nvme tree. Modified with a max number
of queued events (controllable with the aer_max_queued device
parameter). The sp
From: Klaus Jensen
It might seem wierd to implement this feature for an emulated device,
but it is mandatory to support and the feature is useful for testing
asynchronous event request support, which will be added in a later
patch.
Signed-off-by: Klaus Jensen
Acked-by: Keith Busch
Reviewed-by:
From: Klaus Jensen
The num_queues device paramater has a slightly confusing meaning because
it accounts for the admin queue pair which is not really optional.
Secondly, it is really a maximum value of queues allowed.
Add a new max_ioqpairs parameter that only accounts for I/O queue pairs,
but ke
From: Klaus Jensen
This patch splits up nvme_realize into multiple individual functions,
each initializing a different subset of the device.
Signed-off-by: Klaus Jensen
Signed-off-by: Klaus Jensen
Acked-by: Keith Busch
---
hw/block/nvme.c | 178 +++
From: Klaus Jensen
0x is not an allowed value for NCQR and NSQR in Set Features on
Number of Queues.
Signed-off-by: Klaus Jensen
Acked-by: Keith Busch
Reviewed-by: Maxim Levitsky
---
hw/block/nvme.c | 8
1 file changed, 8 insertions(+)
diff --git a/hw/block/nvme.c b/hw/block/nv
From: Klaus Jensen
Required for compliance with NVMe revision 1.2.1. See NVM Express 1.2.1,
Section 5.1 ("Abort command").
The Abort command is a best effort command; for now, the device always
fails to abort the given command.
Signed-off-by: Klaus Jensen
Signed-off-by: Klaus Jensen
Acked-by:
From: Klaus Jensen
The size of the BAR is 0x1000 (main registers) + 8 bytes for each
queue. Currently, the size of the BAR is calculated like so:
n->reg_size = pow2ceil(0x1004 + 2 * (n->params.num_queues + 1) * 4);
Since the 'num_queues' parameter already accounts for the admin queue,
this
From: Klaus Jensen
Pull the controller memory buffer check to its own function. The check
will be used on its own in later patches.
Signed-off-by: Klaus Jensen
Acked-by: Keith Busch
---
hw/block/nvme.c | 16
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/hw/bl
From: Klaus Jensen
Change the prefix of all nvme device related trace events to 'nvme_dev'
to not clash with trace events from the nvme block driver.
Signed-off-by: Klaus Jensen
Acked-by: Keith Busch
Reviewed-by: Maxim Levitsky
---
hw/block/nvme.c | 190 +---
From: Klaus Jensen
Signed-off-by: Klaus Jensen
Reviewed-by: Maxim Levitsky
---
hw/block/nvme.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index 088668f28bae..622103c42d0a 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -6
From: Klaus Jensen
Add missing fields in the Identify Controller and Identify Namespace
data structures to bring them in line with NVMe v1.3.
This also adds data structures and defines for SGL support which
requires a couple of trivial changes to the nvme block driver as well.
Signed-off-by: Kl
From: Klaus Jensen
Signed-off-by: Klaus Jensen
---
hw/block/nvme.c | 7 ++-
hw/block/nvme.h | 2 --
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index f45909dad480..123539a5d0ae 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -63,7 +
From: Klaus Jensen
Hi,
v7 is mostly just changes proposed by Maxim. Also, Gollu's patch for the
bit bucket sgl descriptor has been added (patch #43), but it is of a
pretty manageable size.
Changes since v6
* 01/48 ("nvme: rename trace events to nvme_dev")
- indentation nit
From: Klaus Jensen
These break statements was left over when commit 3036a626e9ef ("nvme:
add Get/Set Feature Timestamp support") was merged.
Signed-off-by: Klaus Jensen
Acked-by: Keith Busch
Reviewed-by: Maxim Levitsky
---
hw/block/nvme.c | 4
1 file changed, 4 deletions(-)
diff --git
From: Klaus Jensen
Move device configuration parameters to separate struct to make it
explicit what is configurable and what is set internally.
Signed-off-by: Klaus Jensen
Signed-off-by: Klaus Jensen
Acked-by: Keith Busch
Reviewed-by: Maxim Levitsky
---
hw/block/nvme.c | 44
Signed-off-by: Cameron Esfahani
---
v2:
+ Fix duplicate line Roman Bolshakov found in review.
---
target/i386/cpu.h | 2 ++
target/i386/hvf/hvf.c | 2 +-
target/i386/hvf/vmx.h | 15 ---
target/i386/hvf/x86.c | 6 +++---
target/i386/hvf/x86.h | 34
NRF51_GPIO_REG_CNF_END doesn't actually refer to the start of the last
valid CNF register: it's referring to the last byte of the last valid
CNF register.
This hasn't been a problem up to now, as current implementation in
memory.c turns an unaligned 4-byte read from 0x77f to a single byte read
and
If the backend file is devdax pmem character device, the alignment
specified by the option 'align=NUM' in the '-object memory-backend-file'
needs to match the alignment requirement of the devdax pmem character device.
This patch uses the interfaces of libdaxctl to fetch the devdax pmem file
'align
For device dax (e.g., /dev/dax0.0), the NUM of 'align=NUM' option
needs to match the alignment requirement of the device dax.
It must be larger than or equal to the 'align' of device dax.
Signed-off-by: Jingqi Liu
---
docs/nvdimm.txt | 9 +
1 file changed, 9 insertions(+)
diff --git a/d
This series adds libdaxctl support and fetchs the alignment of
device dax through libdaxctl [1] APIs.
QEMU uses mmap(2) to maps vNVDIMM backends and aligns the mapping
address to the page size (getpagesize(2)) by default. However, some
types of backends may require an alignment different than the
Add a pair of configure options --{enable,disable}-libdaxctl to control
whether QEMU is compiled with libdaxctl [1]. Libdaxctl is a utility
library for managing the device dax subsystem.
QEMU uses mmap(2) to maps vNVDIMM backends and aligns the mapping
address to the page size (getpagesize(2)) by
double call tcp_chr_free_connection generates a crash.
Signed-off-by: Li Feng
---
chardev/char-socket.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/chardev/char-socket.c b/chardev/char-socket.c
index 185fe38dda..43aab8f24b 100644
--- a/chardev/char-socket.c
+++ b/chardev/char-socket
Since commit b0a335e351103bf92f3f9d0bd5759311be8156ac, a socket write
may trigger a disconnect events, calling vhost_user_blk_disconnect() and
clearing all the vhost_dev strutures. Then the next socket read will
encounter an invalid pointer to vhost_dev.
Signed-off-by: Li Feng
---
hw/block/vhost
when s->inflight is freed, vhost_dev_free_inflight may try to access
s->inflight->addr, it will retrigger the following issue.
==7309==ERROR: AddressSanitizer: heap-use-after-free on address 0x604001020d18
at pc 0x55ce948a bp 0x7fffb170 sp 0x7fffb160
READ of size 8 at 0x604001020d18 t
The crash could be reproduced like this:
1. break vhost_user_write;
2. kill the vhost-user-blk target;
3. let qemu continue running;
4. start vhost-user-blk;
5. see crash!
This fix makes changes:
1. set s->connected to true after vhost_dev_init;
2. call vhost_dev_get_config when s->connected is tr
The following patches fix various crashes happened when injecting errors to
chardev unix domain socket.
The crashes are encountered when the socket is from connected to disconnected at
vhost-user-blk realize routine.
These crashes could be reproduced like this:
1. gdb break at vhost_user_write;
2
** Changed in: qemu (Ubuntu Eoan)
Assignee: Rafael David Tinoco (rafaeldtinoco) => (unassigned)
** Changed in: qemu
Assignee: Rafael David Tinoco (rafaeldtinoco) => (unassigned)
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEM
Patchew URL:
https://patchew.org/QEMU/20200415005938.23895-1-ala...@bitdefender.com/
Hi,
This series failed the docker-mingw@fedora build test. Please find the testing
commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.
=== TEST SCRIPT BEGIN
On Tue, Apr 14, 2020 at 01:28:48PM +0200, Philippe Mathieu-Daudé wrote:
> GByteArray type has should not be treated as a u8[] buffer.
> The GLib Byte Arrays API should be used instead.
> Rename the 'mem_buf' variable as 'array' to make it more
> obvious in the code.
>
> Signed-off-by: Philippe Mat
On 4/14/20 4:16 PM, Stephen Long wrote:
> Signed-off-by: Stephen Long
> ---
> target/arm/helper-sve.h| 10
> target/arm/sve.decode | 5
> target/arm/sve_helper.c| 51 ++
> target/arm/translate-sve.c | 22
> 4 files c
Patchew URL:
https://patchew.org/QEMU/20200415005938.23895-1-ala...@bitdefender.com/
Hi,
This series failed the asan build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.
=== TEST SCRIPT BEGIN ===
#!/bin/bash
Patchew URL:
https://patchew.org/QEMU/20200414200631.12799-1-alex.ben...@linaro.org/
Hi,
This series seems to have some coding style problems. See output below for
more information:
Subject: [PATCH v2 for 5.0-rc3 00/17] more randome fixes (user, pie, docker
and gdbstub)
Message-id: 20200414
There are cases when the access to an introspected VM must be limited
to certain introspection commands/events.
Signed-off-by: Adalbert Lazăr
---
accel/kvm/vmi.c | 86 ++---
1 file changed, 74 insertions(+), 12 deletions(-)
diff --git a/accel/kvm/vmi.
The method to postpone the intercepted command (pause/suspend/migrate)
until the introspection tool has the chance to remove its hooks
(e.g. breakpoints) from guest doesn't work on snapshot+memory (at
least as it is done by libvirt/virt-manager 1.3.1). The sequence
qmp_stop()+save_vm+qmp_cont() doe
From: Marian Rotariu
Because the introspection tool can run on another VM, suspending either
of these two VMs requires signaling the introspection tool to remove
any changes made to the introspected VM. This is done through the
KVM_INTROSPECTION_PREUNHOOK ioctl. KVM will send an event through the
Some introspection tools can detect when the guest is shutting down.
This new option, 'unhook_on_shutdown' controls if QEMU will notify the
introspection tool on a shutdown command at its level.
Signed-off-by: Adalbert Lazăr
---
accel/kvm/vmi.c | 25 +
1 file changed, 25
The introspection tool can be authenticated if the 'key' parameter is
set with the ID of a secret object holding a shared secret between the
introspection tool and QEMU of the introspected VM.
Signed-off-by: Adalbert Lazăr
---
accel/kvm/vmi.c | 66
The default method to handle the intercepted commands
(pause/suspend/migrate) might not be the simplest method. We add an
alternative method, used when async_unhook is set to false, that runs
the main loop until the introspection tool finish the unhook process
and closes the introspection socket.
QEMU sends the name, the UUID and the VM start time and expects the
hash of a secret shared with the introspection tool that can be used to
authenticate it.
Signed-off-by: Adalbert Lazăr
---
accel/kvm/vmi.c| 290 +
include/sysemu/vmi-handshake.h |
From: Marian Rotariu
On shutdown, it is desirable that the introspection tool removes
its changes from the introspected VM, so that they don't reach the
hibernation file.
CC: Markus Armbruster
Signed-off-by: Marian Rotariu
Signed-off-by: Adalbert Lazăr
---
accel/kvm/vmi.c| 31
From: Marian Rotariu
On forced reset, KVM and the instrospection tool must clean-up the
introspection structures. An important thing that must by done by KVM
is to unlink the shared memory pages (the introspection tool
can map memory pages from the introspected VM in its own process/VM).
CC: Mar
From: Marian Rotariu
It is possible that the introspection tool has made some changes inside
the introspected VM which can make the guest crash if the introspection
connection is suddenly closed.
When the live migration starts, for now, the introspection tool is
signaled to remove its hooks from
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
The introspection tool can use the e820 table to avoid accessing
(read/write) or modifying access (rwx) for reserved memory pages.
Signed-off-by: Adalbert Lazăr
---
accel/kvm/vmi.c| 68 ++
include/sysemu/vmi-handshake.h | 23 +++-
2 files c
By having a timer during handshake, the blocked connections can be
restored.
Signed-off-by: Adalbert Lazăr
---
accel/kvm/vmi.c | 66 -
1 file changed, 65 insertions(+), 1 deletion(-)
diff --git a/accel/kvm/vmi.c b/accel/kvm/vmi.c
index 57ded2f69c.
When the introspection tool has to remove all changes made to the
introspected VM, the guest must run because some hooks can be removed only
in certain conditions. But this shouldn't take too long even with a host
under heavy load. So, if the socket is not closed by the introspection
tool at the en
This is used to initiate the connection with the introspection tool and
hand over the file descriptor to KVM. The object needs a chardev socket
(in client mode) created with the 'reconnect' property set.
CC: Paolo Bonzini
Signed-off-by: Marian Rotariu
Signed-off-by: Adalbert Lazăr
---
accel/kv
The VM start time sent during handshake can be used by the introspection
tool as a session id.
We save this 'VM start time' with the snapshot in order to be sent again
to the introspection tool when the VM is restored from snapshot and the
introspection connection is reestablished.
Signed-off-by:
This is used by the VM introspection object, after handshake, to hand
over the file descriptor to KVM.
CC: "Marc-André Lureau"
CC: Paolo Bonzini
Signed-off-by: Adalbert Lazăr
---
chardev/char-socket.c | 18 ++
1 file changed, 18 insertions(+)
diff --git a/chardev/char-socket.c
From: Marian Rotariu
Signed-off-by: Marian Rotariu
Signed-off-by: Adalbert Lazăr
---
qemu-options.hx | 76 +
1 file changed, 76 insertions(+)
diff --git a/qemu-options.hx b/qemu-options.hx
index 16debd03cb..6c5618e310 100644
--- a/qemu-options.h
From: Marian Rotariu
The guest could be reset from various reasons and by disconnecting the
socket (which would reconnect), KVM and the introspection tool will be
notified and can clean up the introspection structures.
Signed-off-by: Marian Rotariu
Signed-off-by: Adalbert Lazăr
---
accel/kvm/
When the introspected VM is paused/suspended/migrated, the introspection
tool removes its hooks from the guest and closes the connection.
This is detected by KVM, which in turn will clean the introspection
structures. Thanks to the reconnect parameter, the chardev will reconnect
with the introspect
This is used by the VM introspection object to check if the connection
will be reestablished in case it disconnects from some reason.
The closing of the socket is used by any of the three parties involved,
KVM, the introspection tool and QEMU (eg. on force-reset), to signal
the other parties that
Signed-off-by: Adalbert Lazăr
---
linux-headers/linux/kvm.h | 20
1 file changed, 20 insertions(+)
diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h
index 265099100e..4e5d390640 100644
--- a/linux-headers/linux/kvm.h
+++ b/linux-headers/linux/kvm.h
@@ -1010,
Because only one introspection tool must introspect a VM at a given time,
we block the completion of the second instance.
Signed-off-by: Adalbert Lazăr
---
accel/kvm/vmi.c | 26 ++
1 file changed, 26 insertions(+)
diff --git a/accel/kvm/vmi.c b/accel/kvm/vmi.c
index 2ce8
qmp_chardev_open_socket() ignores the absence of the 'server' argument
and always switches to listen/server mode.
CC: "Marc-André Lureau"
CC: Paolo Bonzini
Signed-off-by: Adalbert Lazăr
---
chardev/char-socket.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/chardev/char-s
This new function is necessary for the VM introspection object.
By sending all e820 entries, not just the RAM ones,
the introspection tool can differentiate between
an invalid address and a reserved one.
CC: Paolo Bonzini
CC: Richard Henderson
CC: Eduardo Habkost
CC: "Michael S. Tsirkin"
CC: M
The introspection tool can modify the VM while it is running
(e.g. it can set breakpoints), and when the VM is no longer introspected
these changes need to be removed. Until then, we block the destruction of
the introspection object that would lead to the unexpected shutdown
of the introspection ch
The introspection tool can run in a separate VM and the introspected
VM will establish a connection using a virtual socket.
CC: "Marc-André Lureau"
CC: Paolo Bonzini
Signed-off-by: Adalbert Lazăr
---
chardev/char-socket.c | 27 ---
chardev/char.c| 3 +++
2 file
1 - 100 of 308 matches
Mail list logo