tpm, vhost, virtio: fixes for 2.6
Minor fixes all over the place. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAABAgAGBQJXD58TAAoJECgfDbjSjVRpDCAH/iZXlMxl4j23qH4mqJa88HJq UHqsuU6NGHXhsYUzGy9wQp7RTNnMlwF1GC+vsIlZzr1XPu/U/GwUZVPf1Ca0xZ0Q ukRzd7nvAaHnUEC26AJul8CgoThmPf5ip4LqAqQvSUrrAsQ1viR49HHCtmFC2w33 iOg9ZznZM+Prlh8IGMCSF93ER9l4s7T2CvDPmlKtC5iXepU8J47V2EmPg3VjCd3B jeQ6RIF0RtJQCvUxLW3FcUnM6bmIszqPEwmBkiOfJcvuNisNMZGavAyzzoXfMmQ9 YkrGEnDwLa5a3qMTptmxDvPzy4ksc7OzVIw0bcBnqnGmDJwGz44mBjYJ555zJi8= =ufoF -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging tpm, vhost, virtio: fixes for 2.6 Minor fixes all over the place. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Thu 14 Apr 2016 14:45:55 BST using RSA key ID D28D5469 # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" * remotes/mst/tags/for_upstream: hw/virtio/balloon: Replace TARGET_PAGE_SIZE with BALLOON_PAGE_SIZE tpm: Fix write to file descriptor function tpm: acpi: remove IRQ from TPM's CRS to make Windows not see conflict pc: acpi: tpm: add missing MMIO resource to PCI0._CRS specs/vhost-user: spelling fix specs/vhost-user: improve VHOST_SET_VRING_NUM documentation Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
3e7cac31d6
@ -364,7 +364,7 @@ Message types
|
||||
Equivalent ioctl: VHOST_SET_VRING_NUM
|
||||
Master payload: vring state description
|
||||
|
||||
Sets the number of vrings for this owner.
|
||||
Set the size of the queue.
|
||||
|
||||
* VHOST_USER_SET_VRING_ADDR
|
||||
|
||||
@ -438,7 +438,7 @@ Message types
|
||||
Slave payload: u64
|
||||
|
||||
Query how many queues the backend supports. This request should be
|
||||
sent only when VHOST_USER_PROTOCOL_F_MQ is set in quried protocol
|
||||
sent only when VHOST_USER_PROTOCOL_F_MQ is set in queried protocol
|
||||
features by VHOST_USER_GET_PROTOCOL_FEATURES.
|
||||
|
||||
* VHOST_USER_SET_VRING_ENABLE
|
||||
|
@ -2167,6 +2167,11 @@ build_dsdt(GArray *table_data, GArray *linker,
|
||||
0, pci->w64.begin, pci->w64.end - 1, 0,
|
||||
pci->w64.end - pci->w64.begin));
|
||||
}
|
||||
|
||||
if (misc->tpm_version != TPM_VERSION_UNSPEC) {
|
||||
aml_append(crs, aml_memory32_fixed(TPM_TIS_ADDR_BASE,
|
||||
TPM_TIS_ADDR_SIZE, AML_READ_WRITE));
|
||||
}
|
||||
aml_append(scope, aml_name_decl("_CRS", crs));
|
||||
|
||||
/* reserve GPE0 block resources */
|
||||
@ -2343,7 +2348,12 @@ build_dsdt(GArray *table_data, GArray *linker,
|
||||
crs = aml_resource_template();
|
||||
aml_append(crs, aml_memory32_fixed(TPM_TIS_ADDR_BASE,
|
||||
TPM_TIS_ADDR_SIZE, AML_READ_WRITE));
|
||||
aml_append(crs, aml_irq_no_flags(TPM_TIS_IRQ));
|
||||
/*
|
||||
FIXME: TPM_TIS_IRQ=5 conflicts with PNP0C0F irqs,
|
||||
Rewrite to take IRQ from TPM device model and
|
||||
fix default IRQ value there to use some unused IRQ
|
||||
*/
|
||||
/* aml_append(crs, aml_irq_no_flags(TPM_TIS_IRQ)); */
|
||||
aml_append(dev, aml_name_decl("_CRS", crs));
|
||||
aml_append(scope, dev);
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ static int tpm_passthrough_unix_write(int fd, const uint8_t *buf, uint32_t len)
|
||||
int ret, remain;
|
||||
|
||||
remain = len;
|
||||
while (len > 0) {
|
||||
while (remain > 0) {
|
||||
ret = write(fd, buf, remain);
|
||||
if (ret < 0) {
|
||||
if (errno != EINTR && errno != EAGAIN) {
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include "qemu-common.h"
|
||||
#include "hw/virtio/virtio.h"
|
||||
#include "hw/i386/pc.h"
|
||||
#include "cpu.h"
|
||||
#include "sysemu/balloon.h"
|
||||
#include "hw/virtio/virtio-balloon.h"
|
||||
#include "sysemu/kvm.h"
|
||||
@ -35,12 +34,14 @@
|
||||
#include "hw/virtio/virtio-bus.h"
|
||||
#include "hw/virtio/virtio-access.h"
|
||||
|
||||
#define BALLOON_PAGE_SIZE (1 << VIRTIO_BALLOON_PFN_SHIFT)
|
||||
|
||||
static void balloon_page(void *addr, int deflate)
|
||||
{
|
||||
#if defined(__linux__)
|
||||
if (!qemu_balloon_is_inhibited() && (!kvm_enabled() ||
|
||||
kvm_has_sync_mmu())) {
|
||||
qemu_madvise(addr, TARGET_PAGE_SIZE,
|
||||
qemu_madvise(addr, BALLOON_PAGE_SIZE,
|
||||
deflate ? QEMU_MADV_WILLNEED : QEMU_MADV_DONTNEED);
|
||||
}
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user