qemu-discuss
[Top][All Lists]
Advanced

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

Re: Can one pass file descriptors to QEMU through QMP/monitor after it h


From: dongli . zhang
Subject: Re: Can one pass file descriptors to QEMU through QMP/monitor after it has started?
Date: Tue, 10 Sep 2024 13:12:58 -0700
User-agent: Mozilla Thunderbird


On 9/9/24 12:00 PM, DUO Labs wrote:
> I'm trying to write an application that interacts with a running QEMU instance
> to create drives from shared memory. I'm on a macOS host, so I can't just do
> something like `/dev/shm/<id>`, or `/proc/<fd>/fd/<num>`. So, is there a way 
> to
> send the fd to the QEMU instance? If it helps, the QMP socket is exposed as a
> UNIX socket.
> 

I don't understand your question.

May I assume you would like to pass a fd to QEMU so that QEMU may
read/write/ioctl with the fd?

I suggest QMP getfd command.

Combined with SCM_RIGHTS, you will be able to send the getfd command to a
running QEMU instance, with the fd in the message.

For instance, you may create a vhostfd, and send to QEMU via getfd.

Dongli Zhang



reply via email to

[Prev in Thread] Current Thread [Next in Thread]