Re: [RFC 2/2] KVM: add initial support for ioregionfd blocking read/write operations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 2020/12/29 下午6:02, Elena Afanasova wrote:
Signed-off-by: Elena Afanasova<eafanasova@xxxxxxxxx>
---
  virt/kvm/ioregion.c | 157 ++++++++++++++++++++++++++++++++++++++++++++
  1 file changed, 157 insertions(+)

diff --git a/virt/kvm/ioregion.c b/virt/kvm/ioregion.c
index a200c3761343..8523f4126337 100644
--- a/virt/kvm/ioregion.c
+++ b/virt/kvm/ioregion.c
@@ -4,6 +4,33 @@
  #include <kvm/iodev.h>
  #include "eventfd.h"
+/* Wire protocol */
+struct ioregionfd_cmd {
+	__u32 info;
+	__u32 padding;
+	__u64 user_data;
+	__u64 offset;
+	__u64 data;
+};
+


I wonder do we need a seq in the protocol. It might be useful if we allow a pair of file descriptors to be used for multiple different ranges.

Thanks


+struct ioregionfd_resp {
+	__u64 data;
+	__u8 pad[24];
+};




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux