[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC 3/8] ioregionfd: introduce memory API functions
From: |
Stefan Hajnoczi |
Subject: |
Re: [RFC 3/8] ioregionfd: introduce memory API functions |
Date: |
Mon, 14 Feb 2022 14:32:21 +0000 |
On Mon, Feb 07, 2022 at 11:22:17PM -0800, Elena Ufimtseva wrote:
> @@ -2434,6 +2569,42 @@ void memory_region_clear_flush_coalesced(MemoryRegion
> *mr)
>
> static bool userspace_eventfd_warning;
>
> +void memory_region_add_ioregionfd(MemoryRegion *mr,
> + hwaddr addr,
> + unsigned size,
> + uint64_t data,
uint64_t data is vague and can be confused with ioeventfd's match data
field. QEMU tends to use void *opaque, but following the ioregionfd
kernel API's naming would be fine too: uint64_t user_data.
> + int fd,
> + bool pio)
> +{
> + MemoryRegionIoregionfd mriofd = {
> + .addr.start = int128_make64(addr),
> + .addr.size = int128_make64(size),
> + .data = data,
> + .fd = fd,
> + };
> + unsigned i;
> +
> + if (kvm_enabled() && !kvm_ioregionfds_enabled()) {
> + error_report("KVM does not support KVM_CAP_IOREGIONFD");
> + }
Is this a fatal error?
QEMU should have a userspace ioregionfd implementation for
compatibility. That allows ioregionfd to be tested without running in
KVM mode. (This is how ioeventfd support works in QEMU.)
signature.asc
Description: PGP signature
- Re: [RFC 4/8] ioregionfd: Introduce IORegionDFObject type, (continued)
[RFC 2/8] multiprocess: place RemoteObject definition in a header file, Elena Ufimtseva, 2022/02/08
[RFC 1/8] ioregionfd: introduce a syscall and memory API, Elena Ufimtseva, 2022/02/08
[RFC 7/8] multiprocess: add ioregionfd memory region in proxy, Elena Ufimtseva, 2022/02/08
[RFC 5/8] multiprocess: prepare ioregionfds for remote device, Elena Ufimtseva, 2022/02/08
[RFC 3/8] ioregionfd: introduce memory API functions, Elena Ufimtseva, 2022/02/08
- Re: [RFC 3/8] ioregionfd: introduce memory API functions,
Stefan Hajnoczi <=
[RFC 6/8] multiprocess: add MPQEMU_CMD_BAR_INFO, Elena Ufimtseva, 2022/02/08
[RFC 8/8] multiprocess: handle ioregionfd commands, Elena Ufimtseva, 2022/02/08
Re: [RFC 0/8] ioregionfd introduction, Stefan Hajnoczi, 2022/02/09
Re: [RFC 0/8] ioregionfd introduction, Stefan Hajnoczi, 2022/02/14