From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: claudio.fontana@huawei.com, cam@cs.ualberta.ca,
mlureau@redhat.com, david.marchand@6wind.com,
pbonzini@redhat.com
Subject: [Qemu-devel] [PATCH v3 00/40] ivshmem: Fixes, cleanups, device model split
Date: Tue, 15 Mar 2016 19:34:15 +0100 [thread overview]
Message-ID: <1458066895-20632-1-git-send-email-armbru@redhat.com> (raw)
Based on Paolo's "[PULL 0/8] Memory, icount, chardev, KVM changes for
2016-03-15".
Major issues addressed by this series:
* The specification document is incomplete and vague. Rewritten.
* When a peer goes away, and its ID gets reused for another one,
interrupts don't work.
* When configured for interrupts, we receive shared memory from the
server some time after realize(). This creates a (usually
short-lived) "no shared memory, yet" state. If the guest wins the
race, it is exposed to this state (known issue, if you count burying
in docs/specs/ as "known"). If migration wins the race, it fails or
corrupts memory.
* Interrupts are unreliable in a (usually small) time window after the
destination peer connects. I believe fixing this will require
changing the client/server protocol, so just document it for now.
* The device isn't capable to tell guest software whether it is
configured for interrupts. Fix that in a new, backwards-compatible
revision of the guest ABI, and bump the PCI revision. Deprecate the
old revision.
* The device properties are a confusing mess and badly checked.
Clean that up.
* Migration with interrupts relies on server behavior not guaranteed
by the specification. Tighten the specification.
Paolo, I'd like your opinion on PATCH 1 and 3. I'm getting competent
review for my other patches elsewhere, but you're of course welcome to
review them, too.
v3:
* PATCH 01+02 picked up by Paolo, dropped from this series
* PATCH 01: Tidy up whitespace [Marc-André]
* PATCH 02: Refine help text and comments, R-by retained
* PATCH 03: Tidy up whitespace [checkpatch], refine help text and
comments, steal an idea from Marc-André to simplify the code a bit
* PATCH 19: Drop the other redundant guard instead [Marc-André]
* PATCH 20: Fix a comment [Marc-André]
* PATCH 23+31+32: Rebase for commit 8e41fb6 "memory: Drop
MemoryRegion.ram_addr", R-bys retained
* PATCH 26: Explain the "shmem is mapped" assertion [Marc-André]
* PATCH 31: Mention permission change and portability issues in commit
message [Marc-André]
* PATCH 37: Minor fallout from PATCH 19, R-by retained
v2:
* PATCH 01: Rewritten [Paolo]
* PATCH 02-05: New
* PATCH 12: Typo [Eric]
* PATCH 22: Commit message improved [Paolo]
* PATCH 25: Variables renamed [Marc-André]
* PATCH 26: Reject disconnect message for own ID [Marc-André]
* PATCH 27+28: Move an assertion from PATCH 27 to PATCH 28
[Marc-André]
* PATCH 31: Fix missing return on error [Marc-André]
* PATCH 33: Rewritten [Paolo]
* PATCH 34: Commit message improved, memory leak plugged by avoiding
dynamic allocation [Paolo]
* PATCH 37: Botched conditionals fixed [Marc-André]
* PATCH 40: Bury dead code [Marc-André]
Markus Armbruster (40):
target-ppc: Document TOCTTOU in hugepage support
ivshmem-server: Fix and clean up command line help
ivshmem-server: Don't overload POSIX shmem and file name
qemu-doc: Fix ivshmem huge page example
event_notifier: Make event_notifier_init_fd() #ifdef CONFIG_EVENTFD
tests/libqos/pci-pc: Fix qpci_pc_iomap() to map BARs aligned
ivshmem-test: Improve test case /ivshmem/single
ivshmem-test: Clean up wait for devices to become operational
ivshmem-test: Improve test cases /ivshmem/server-*
ivshmem: Rewrite specification document
ivshmem: Add missing newlines to debug printfs
ivshmem: Compile debug prints unconditionally to prevent bit-rot
ivshmem: Clean up after commit 9940c32
ivshmem: Drop ivshmem_event() stub
ivshmem: Don't destroy the chardev on version mismatch
ivshmem: Fix harmless misuse of Error
ivshmem: Failed realize() can leave migration blocker behind
ivshmem: Clean up register callbacks
ivshmem: Clean up MSI-X conditions
ivshmem: Leave INTx alone when using MSI-X
ivshmem: Assert interrupts are set up once
ivshmem: Simplify rejection of invalid peer ID from server
ivshmem: Disentangle ivshmem_read()
ivshmem: Plug leaks on unplug, fix peer disconnect
ivshmem: Receive shared memory synchronously in realize()
ivshmem: Propagate errors through ivshmem_recv_setup()
ivshmem: Rely on server sending the ID right after the version
ivshmem: Drop the hackish test for UNIX domain chardev
ivshmem: Simplify how we cope with short reads from server
ivshmem: Tighten check of property "size"
ivshmem: Implement shm=... with a memory backend
ivshmem: Simplify memory regions for BAR 2 (shared memory)
ivshmem: Inline check_shm_size() into its only caller
qdev: New DEFINE_PROP_ON_OFF_AUTO
ivshmem: Replace int role_val by OnOffAuto master
ivshmem: Split ivshmem-plain, ivshmem-doorbell off ivshmem
ivshmem: Clean up after the previous commit
ivshmem: Drop ivshmem property x-memdev
ivshmem: Require master to have ID zero
contrib/ivshmem-server: Print "not for production" warning
contrib/ivshmem-server/ivshmem-server.c | 56 +-
contrib/ivshmem-server/ivshmem-server.h | 4 +-
contrib/ivshmem-server/main.c | 98 +--
default-configs/pci.mak | 2 +-
docs/specs/ivshmem-spec.txt | 254 +++++++
docs/specs/ivshmem_device_spec.txt | 161 -----
hw/core/qdev-properties.c | 10 +
hw/misc/ivshmem.c | 1091 +++++++++++++++++--------------
include/hw/qdev-properties.h | 3 +
qemu-doc.texi | 47 +-
target-ppc/kvm.c | 6 +
tests/ivshmem-test.c | 99 +--
tests/libqos/pci-pc.c | 8 +-
util/event_notifier-posix.c | 6 +
14 files changed, 1017 insertions(+), 828 deletions(-)
create mode 100644 docs/specs/ivshmem-spec.txt
delete mode 100644 docs/specs/ivshmem_device_spec.txt
--
2.4.3
next reply other threads:[~2016-03-15 18:35 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-15 18:34 Markus Armbruster [this message]
2016-03-15 18:34 ` [Qemu-devel] [PATCH v3 01/40] target-ppc: Document TOCTTOU in hugepage support Markus Armbruster
2016-03-18 15:04 ` Marc-André Lureau
2016-03-15 18:34 ` [Qemu-devel] [PATCH v3 02/40] ivshmem-server: Fix and clean up command line help Markus Armbruster
2016-03-15 18:34 ` [Qemu-devel] [PATCH v3 03/40] ivshmem-server: Don't overload POSIX shmem and file name Markus Armbruster
2016-03-18 15:04 ` Marc-André Lureau
2016-03-15 18:34 ` [Qemu-devel] [PATCH v3 04/40] qemu-doc: Fix ivshmem huge page example Markus Armbruster
2016-03-15 18:34 ` [Qemu-devel] [PATCH v3 05/40] event_notifier: Make event_notifier_init_fd() #ifdef CONFIG_EVENTFD Markus Armbruster
2016-03-21 12:48 ` Markus Armbruster
2016-03-15 18:34 ` [Qemu-devel] [PATCH v3 06/40] tests/libqos/pci-pc: Fix qpci_pc_iomap() to map BARs aligned Markus Armbruster
2016-03-15 18:34 ` [Qemu-devel] [PATCH v3 07/40] ivshmem-test: Improve test case /ivshmem/single Markus Armbruster
2016-03-15 18:34 ` [Qemu-devel] [PATCH v3 08/40] ivshmem-test: Clean up wait for devices to become operational Markus Armbruster
2016-03-15 18:34 ` [Qemu-devel] [PATCH v3 09/40] ivshmem-test: Improve test cases /ivshmem/server-* Markus Armbruster
2016-03-15 18:34 ` [Qemu-devel] [PATCH v3 10/40] ivshmem: Rewrite specification document Markus Armbruster
2016-03-15 18:34 ` [Qemu-devel] [PATCH v3 11/40] ivshmem: Add missing newlines to debug printfs Markus Armbruster
2016-03-15 18:34 ` [Qemu-devel] [PATCH v3 12/40] ivshmem: Compile debug prints unconditionally to prevent bit-rot Markus Armbruster
2016-03-15 18:34 ` [Qemu-devel] [PATCH v3 13/40] ivshmem: Clean up after commit 9940c32 Markus Armbruster
2016-03-15 18:34 ` [Qemu-devel] [PATCH v3 14/40] ivshmem: Drop ivshmem_event() stub Markus Armbruster
2016-03-15 18:34 ` [Qemu-devel] [PATCH v3 15/40] ivshmem: Don't destroy the chardev on version mismatch Markus Armbruster
2016-03-15 18:34 ` [Qemu-devel] [PATCH v3 16/40] ivshmem: Fix harmless misuse of Error Markus Armbruster
2016-03-15 18:34 ` [Qemu-devel] [PATCH v3 17/40] ivshmem: Failed realize() can leave migration blocker behind Markus Armbruster
2016-03-15 18:34 ` [Qemu-devel] [PATCH v3 18/40] ivshmem: Clean up register callbacks Markus Armbruster
2016-03-15 18:34 ` [Qemu-devel] [PATCH v3 19/40] ivshmem: Clean up MSI-X conditions Markus Armbruster
2016-03-18 15:04 ` Marc-André Lureau
2016-03-15 18:34 ` [Qemu-devel] [PATCH v3 20/40] ivshmem: Leave INTx alone when using MSI-X Markus Armbruster
2016-03-15 18:34 ` [Qemu-devel] [PATCH v3 21/40] ivshmem: Assert interrupts are set up once Markus Armbruster
2016-03-15 18:34 ` [Qemu-devel] [PATCH v3 22/40] ivshmem: Simplify rejection of invalid peer ID from server Markus Armbruster
2016-03-15 18:34 ` [Qemu-devel] [PATCH v3 23/40] ivshmem: Disentangle ivshmem_read() Markus Armbruster
2016-03-15 18:34 ` [Qemu-devel] [PATCH v3 24/40] ivshmem: Plug leaks on unplug, fix peer disconnect Markus Armbruster
2016-03-15 18:34 ` [Qemu-devel] [PATCH v3 25/40] ivshmem: Receive shared memory synchronously in realize() Markus Armbruster
2016-03-15 18:34 ` [Qemu-devel] [PATCH v3 26/40] ivshmem: Propagate errors through ivshmem_recv_setup() Markus Armbruster
2016-03-18 15:04 ` Marc-André Lureau
2016-03-15 18:34 ` [Qemu-devel] [PATCH v3 27/40] ivshmem: Rely on server sending the ID right after the version Markus Armbruster
2016-03-15 18:34 ` [Qemu-devel] [PATCH v3 28/40] ivshmem: Drop the hackish test for UNIX domain chardev Markus Armbruster
2016-03-15 18:34 ` [Qemu-devel] [PATCH v3 29/40] ivshmem: Simplify how we cope with short reads from server Markus Armbruster
2016-03-15 18:34 ` [Qemu-devel] [PATCH v3 30/40] ivshmem: Tighten check of property "size" Markus Armbruster
2016-03-15 18:34 ` [Qemu-devel] [PATCH v3 31/40] ivshmem: Implement shm=... with a memory backend Markus Armbruster
2016-03-15 18:34 ` [Qemu-devel] [PATCH v3 32/40] ivshmem: Simplify memory regions for BAR 2 (shared memory) Markus Armbruster
2016-03-15 18:34 ` [Qemu-devel] [PATCH v3 33/40] ivshmem: Inline check_shm_size() into its only caller Markus Armbruster
2016-03-18 15:04 ` Marc-André Lureau
2016-03-18 16:50 ` Markus Armbruster
2016-03-15 18:34 ` [Qemu-devel] [PATCH v3 34/40] qdev: New DEFINE_PROP_ON_OFF_AUTO Markus Armbruster
2016-03-15 18:34 ` [Qemu-devel] [PATCH v3 35/40] ivshmem: Replace int role_val by OnOffAuto master Markus Armbruster
2016-03-15 18:34 ` [Qemu-devel] [PATCH v3 36/40] ivshmem: Split ivshmem-plain, ivshmem-doorbell off ivshmem Markus Armbruster
2016-03-21 12:32 ` Markus Armbruster
2016-03-15 18:34 ` [Qemu-devel] [PATCH v3 37/40] ivshmem: Clean up after the previous commit Markus Armbruster
2016-03-15 18:34 ` [Qemu-devel] [PATCH v3 38/40] ivshmem: Drop ivshmem property x-memdev Markus Armbruster
2016-03-15 18:34 ` [Qemu-devel] [PATCH v3 39/40] ivshmem: Require master to have ID zero Markus Armbruster
2016-03-15 18:34 ` [Qemu-devel] [PATCH v3 40/40] contrib/ivshmem-server: Print "not for production" warning Markus Armbruster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1458066895-20632-1-git-send-email-armbru@redhat.com \
--to=armbru@redhat.com \
--cc=cam@cs.ualberta.ca \
--cc=claudio.fontana@huawei.com \
--cc=david.marchand@6wind.com \
--cc=mlureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).