<feed xmlns='http://www.w3.org/2005/Atom'>
<title>qemu/include/hw/hyperv, branch master</title>
<subtitle>QEMU development tree</subtitle>
<id>https://git.zx2c4.com/qemu/atom/include/hw/hyperv?h=master</id>
<link rel='self' href='https://git.zx2c4.com/qemu/atom/include/hw/hyperv?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/'/>
<updated>2024-03-08T13:18:56Z</updated>
<entry>
<title>vmbus: Print a warning when enabled without the recommended set of features</title>
<updated>2024-03-08T13:18:56Z</updated>
<author>
<name>Maciej S. Szmigiero</name>
<email>maciej.szmigiero@oracle.com</email>
</author>
<published>2024-01-25T14:12:41Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=6093637b4d32875f98cd59696ffc5f26884aa0b4'/>
<id>urn:sha1:6093637b4d32875f98cd59696ffc5f26884aa0b4</id>
<content type='text'>
Some Windows versions crash at boot or fail to enable the VMBus device if
they don't see the expected set of Hyper-V features (enlightenments).

Since this provides poor user experience let's warn user if the VMBus
device is enabled without the recommended set of Hyper-V features.

The recommended set is the minimum set of Hyper-V features required to make
the VMBus device work properly in Windows Server versions 2016, 2019 and
2022.

Acked-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Maciej S. Szmigiero &lt;maciej.szmigiero@oracle.com&gt;
</content>
</entry>
<entry>
<title>hv-balloon: define dm_hot_add_with_region to avoid Coverity warning</title>
<updated>2024-03-08T13:18:56Z</updated>
<author>
<name>Maciej S. Szmigiero</name>
<email>maciej.szmigiero@oracle.com</email>
</author>
<published>2023-11-13T19:00:51Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=546987284a7da9106bbead1063553cbfe7ddd697'/>
<id>urn:sha1:546987284a7da9106bbead1063553cbfe7ddd697</id>
<content type='text'>
Since the presence of a hot add memory region is optional in hot add
request message it wasn't part of this message declaration
(struct dm_hot_add).

Instead, the code allocated such enlarged message by simply adding the
necessary size for this extra field to the size of basic hot add message
struct.

However, Coverity considers accessing this extra member to be
an out-of-bounds access, even thought the memory is actually there.

Fix this by adding an extended variant of this message that explicitly has
an additional union dm_mem_page_range at its end.

CID: #1523903
Signed-off-by: Maciej S. Szmigiero &lt;maciej.szmigiero@oracle.com&gt;
</content>
</entry>
<entry>
<title>include/hw/hyperv/dynmem-proto.h: spelling fix: nunber, atleast</title>
<updated>2023-11-15T09:06:05Z</updated>
<author>
<name>Michael Tokarev</name>
<email>mjt@tls.msk.ru</email>
</author>
<published>2023-11-14T16:11:33Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=c437eb1d5aeb1c4581788bf368209101f614368a'/>
<id>urn:sha1:c437eb1d5aeb1c4581788bf368209101f614368a</id>
<content type='text'>
Fixes: 4f80cd2f033e "Add Hyper-V Dynamic Memory Protocol definitions"
Acked-by: Maciej S. Szmigiero &lt;maciej.szmigiero@oracle.com&gt;
Signed-off-by: Michael Tokarev &lt;mjt@tls.msk.ru&gt;
</content>
</entry>
<entry>
<title>Add Hyper-V Dynamic Memory Protocol driver (hv-balloon) base</title>
<updated>2023-11-06T13:08:10Z</updated>
<author>
<name>Maciej S. Szmigiero</name>
<email>maciej.szmigiero@oracle.com</email>
</author>
<published>2023-06-12T14:00:54Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=0d9e8c0b670b7856d36ed155d43548d2491230e7'/>
<id>urn:sha1:0d9e8c0b670b7856d36ed155d43548d2491230e7</id>
<content type='text'>
This driver is like virtio-balloon on steroids: it allows both changing the
guest memory allocation via ballooning and (in the next patch) inserting
pieces of extra RAM into it on demand from a provided memory backend.

The actual resizing is done via ballooning interface (for example, via
the "balloon" HMP command).
This includes resizing the guest past its boot size - that is, hot-adding
additional memory in granularity limited only by the guest alignment
requirements, as provided by the next patch.

In contrast with ACPI DIMM hotplug where one can only request to unplug a
whole DIMM stick this driver allows removing memory from guest in single
page (4k) units via ballooning.

After a VM reboot the guest is back to its original (boot) size.

In the future, the guest boot memory size might be changed on reboot
instead, taking into account the effective size that VM had before that
reboot (much like Hyper-V does).

For performance reasons, the guest-released memory is tracked in a few
range trees, as a series of (start, count) ranges.
Each time a new page range is inserted into such tree its neighbors are
checked as candidates for possible merging with it.

Besides performance reasons, the Dynamic Memory protocol itself uses page
ranges as the data structure in its messages, so relevant pages need to be
merged into such ranges anyway.

One has to be careful when tracking the guest-released pages, since the
guest can maliciously report returning pages outside its current address
space, which later clash with the address range of newly added memory.
Similarly, the guest can report freeing the same page twice.

The above design results in much better ballooning performance than when
using virtio-balloon with the same guest: 230 GB / minute with this driver
versus 70 GB / minute with virtio-balloon.

During a ballooning operation most of time is spent waiting for the guest
to come up with newly freed page ranges, processing the received ranges on
the host side (in QEMU and KVM) is nearly instantaneous.

The unballoon operation is also pretty much instantaneous:
thanks to the merging of the ballooned out page ranges 200 GB of memory can
be returned to the guest in about 1 second.
With virtio-balloon this operation takes about 2.5 minutes.

These tests were done against a Windows Server 2019 guest running on a
Xeon E5-2699, after dirtying the whole memory inside guest before each
balloon operation.

Using a range tree instead of a bitmap to track the removed memory also
means that the solution scales well with the guest size: even a 1 TB range
takes just a few bytes of such metadata.

Since the required GTree operations aren't present in every Glib version
a check for them was added to the meson build script, together with new
"--enable-hv-balloon" and "--disable-hv-balloon" configure arguments.
If these GTree operations are missing in the system's Glib version this
driver will be skipped during QEMU build.

An optional "status-report=on" device parameter requests memory status
events from the guest (typically sent every second), which allow the host
to learn both the guest memory available and the guest memory in use
counts.

Following commits will add support for their external emission as
"HV_BALLOON_STATUS_REPORT" QMP events.

The driver is named hv-balloon since the Linux kernel client driver for
the Dynamic Memory Protocol is named as such and to follow the naming
pattern established by the virtio-balloon driver.
The whole protocol runs over Hyper-V VMBus.

The driver was tested against Windows Server 2012 R2, Windows Server 2016
and Windows Server 2019 guests and obeys the guest alignment requirements
reported to the host via DM_CAPABILITIES_REPORT message.

Acked-by: David Hildenbrand &lt;david@redhat.com&gt;
Signed-off-by: Maciej S. Szmigiero &lt;maciej.szmigiero@oracle.com&gt;
</content>
</entry>
<entry>
<title>Add Hyper-V Dynamic Memory Protocol definitions</title>
<updated>2023-11-06T12:54:57Z</updated>
<author>
<name>Maciej S. Szmigiero</name>
<email>maciej.szmigiero@oracle.com</email>
</author>
<published>2023-06-12T14:00:53Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=4f80cd2f033e73bb65adf69bd337ae3052629fdf'/>
<id>urn:sha1:4f80cd2f033e73bb65adf69bd337ae3052629fdf</id>
<content type='text'>
This commit adds Hyper-V Dynamic Memory Protocol definitions, taken
from hv_balloon Linux kernel driver, adapted to the QEMU coding style and
definitions.

Acked-by: David Hildenbrand &lt;david@redhat.com&gt;
Signed-off-by: Maciej S. Szmigiero &lt;maciej.szmigiero@oracle.com&gt;
</content>
</entry>
<entry>
<title>include/: spelling fixes</title>
<updated>2023-09-08T10:08:52Z</updated>
<author>
<name>Michael Tokarev</name>
<email>mjt@tls.msk.ru</email>
</author>
<published>2023-07-14T11:33:02Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=a1a62ced51bd33716c79719246ac969447acadb2'/>
<id>urn:sha1:a1a62ced51bd33716c79719246ac969447acadb2</id>
<content type='text'>
Signed-off-by: Michael Tokarev &lt;mjt@tls.msk.ru&gt;
Reviewed-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
</content>
</entry>
<entry>
<title>hw/hyperv/vmbus: Remove unused vmbus_load/save_req()</title>
<updated>2022-05-30T17:49:42Z</updated>
<author>
<name>Philippe Mathieu-Daudé</name>
<email>philmd@redhat.com</email>
</author>
<published>2021-11-06T13:41:55Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=6ede46b910ac66fd10bc169fb0a6f681429a9c5c'/>
<id>urn:sha1:6ede46b910ac66fd10bc169fb0a6f681429a9c5c</id>
<content type='text'>
vmbus_save_req() and vmbus_load_req() are not used.
Remove them to avoid maintaining dead code.

This essentially reverts commit 4dd8a7064b8a6527f99a62be11
("vmbus: add infrastructure to save/load vmbus requests").

Signed-off-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Message-Id: &lt;20211106134155.582312-2-philmd@redhat.com&gt;
[MSS: Remove also corresponding variables, which are now unused]
Signed-off-by: Maciej S. Szmigiero &lt;maciej.szmigiero@oracle.com&gt;
</content>
</entry>
<entry>
<title>hyperv: Add support to process syndbg commands</title>
<updated>2022-04-06T12:31:56Z</updated>
<author>
<name>Jon Doron</name>
<email>arilou@gmail.com</email>
</author>
<published>2022-02-16T10:24:59Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=73d24074078a2cefb5305047e3bf50b73daa3f98'/>
<id>urn:sha1:73d24074078a2cefb5305047e3bf50b73daa3f98</id>
<content type='text'>
SynDbg commands can come from two different flows:
1. Hypercalls, in this mode the data being sent is fully
   encapsulated network packets.
2. SynDbg specific MSRs, in this mode only the data that needs to be
   transfered is passed.

Signed-off-by: Jon Doron &lt;arilou@gmail.com&gt;
Reviewed-by: Emanuele Giuseppe Esposito &lt;eesposit@redhat.com&gt;
Message-Id: &lt;20220216102500.692781-4-arilou@gmail.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>hyperv: Add definitions for syndbg</title>
<updated>2022-04-06T12:31:56Z</updated>
<author>
<name>Jon Doron</name>
<email>arilou@gmail.com</email>
</author>
<published>2022-02-16T10:24:58Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=ccbdf5e81b502b238748ab64366bba5bf4c056d3'/>
<id>urn:sha1:ccbdf5e81b502b238748ab64366bba5bf4c056d3</id>
<content type='text'>
Add all required definitions for hyperv synthetic debugger interface.

Signed-off-by: Jon Doron &lt;arilou@gmail.com&gt;
Reviewed-by: Emanuele Giuseppe Esposito &lt;eesposit@redhat.com&gt;
Message-Id: &lt;20220216102500.692781-3-arilou@gmail.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>Use OBJECT_DECLARE_SIMPLE_TYPE when possible</title>
<updated>2020-09-18T18:12:32Z</updated>
<author>
<name>Eduardo Habkost</name>
<email>ehabkost@redhat.com</email>
</author>
<published>2020-09-16T18:25:19Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=8063396bf3459a810d24e3efd6110b8480f0de5b'/>
<id>urn:sha1:8063396bf3459a810d24e3efd6110b8480f0de5b</id>
<content type='text'>
This converts existing DECLARE_INSTANCE_CHECKER usage to
OBJECT_DECLARE_SIMPLE_TYPE when possible.

$ ./scripts/codeconverter/converter.py -i \
  --pattern=AddObjectDeclareSimpleType $(git grep -l '' -- '*.[ch]')

Signed-off-by: Eduardo Habkost &lt;ehabkost@redhat.com&gt;
Acked-by: Paul Durrant &lt;paul@xen.org&gt;
Message-Id: &lt;20200916182519.415636-6-ehabkost@redhat.com&gt;
Signed-off-by: Eduardo Habkost &lt;ehabkost@redhat.com&gt;
</content>
</entry>
</feed>
