[libvirt PATCH v4] hypervisor: Move interface mgmt methods to hypervisor

2023-10-30 Thread Praveen K Paladugu
Move guest interface management methods from qemu to hypervisor. These methods will be shared by networking support in ch driver. Signed-off-by: Praveen K Paladugu --- v4: * logging and formatting fixes v3: * Moved qemuInterfaceStopDevice/s methods into hypervisor, to keep all the related

Re: [PATCH 4/4] ch: Don't leak ch_driver->chCaps

2023-11-28 Thread Praveen K Paladugu
On 11/28/2023 9:59 AM, Michal Privoznik wrote: During CH driver initialization (chStateInitialize()) the driver's capabilities bitmap is allocated (virCHCapsInitCHVersionCaps()), but corresponding free call is missing in chStateCleanup(). And while at it, reorder calls to virObjectUnref() insi

Re: [PATCH 4/4] ch: Don't leak ch_driver->chCaps

2023-11-28 Thread Praveen K Paladugu
On 11/28/2023 11:52 AM, Daniel P. Berrangé wrote: On Tue, Nov 28, 2023 at 11:43:11AM -0600, Praveen K Paladugu wrote: On 11/28/2023 9:59 AM, Michal Privoznik wrote: During CH driver initialization (chStateInitialize()) the driver's capabilities bitmap is allo

[libvirt PATCH 0/5] Initial network support in ch driver.

2023-11-29 Thread Praveen K Paladugu
support sending FDs to ch in Patch 3. Network support in ch driver is introduced by Patch 5. I previously sent "hypervisor: Move interface mgmt methods to hypervisor" patch by itself. I merged this patch also into Patch 2 in this series. Praveen K Paladugu (5): conf: Drop unused parameter

[libvirt PATCH 1/5] conf: Drop unused parameter

2023-11-29 Thread Praveen K Paladugu
Drop unused parameter from virDomainNetReleaseActualDevice method. Signed-off-by: Praveen K Paladugu --- src/conf/domain_conf.c | 1 - src/conf/domain_conf.h | 3 +-- src/libxl/libxl_domain.c | 2 +- src/libxl/libxl_driver.c | 4 ++-- src/lxc/lxc_driver.c | 2 +- src/lxc

[libvirt PATCH 4/5] ch: Introduce version based cap for network support

2023-11-29 Thread Praveen K Paladugu
This capability checks if ch can receive multiple fds along with net-add api. This capability is required to enable multiple queues for domain/guest interfaces. Signed-off-by: Praveen K Paladugu --- src/ch/ch_capabilities.c | 9 + src/ch/ch_capabilities.h | 1 + 2 files changed, 10

[libvirt PATCH 3/5] util: Add util methods required by ch networking

2023-11-29 Thread Praveen K Paladugu
virSocketSendMsgWithFDs method send fds along with payload using SCM_RIGHTS. virSocketRecvHttpResponse method polls, receives http response on the input socket and returns the http response code. These methods are required to add network suppport in ch driver. Signed-off-by: Praveen K Paladugu

[libvirt PATCH 2/5] hypervisor: Move domain interface mgmt methods

2023-11-29 Thread Praveen K Paladugu
Move domain interface management methods from qemu to hypervisor. This refactoring allows the domain management methods to be shared by ch driver. This commit does not introduce any functional changes. Signed-off-by: Praveen K Paladugu --- po/POTFILES | 1 + src

[libvirt PATCH 5/5] ch: Enable ETHERNET Network mode support

2023-11-29 Thread Praveen K Paladugu
enable VIR_DOMAIN_NET_TYPE_ETHERNET network support for ch guests. Tested with following interface config: Signed-off-by: Praveen K Paladugu --- po/POTFILES | 1 + src/ch/ch_conf.h | 4 + src/ch/ch_domain.c| 41 + src/ch

Re: [libvirt PATCH 0/5] Initial network support in ch driver.

2024-01-03 Thread Praveen K Paladugu
Folks, Bubbling this patchset for reviews. I would appreciate some feedback on this patch set. On 11/29/2023 5:11 PM, Praveen K Paladugu wrote: This series introduces network support for ch guests. ETHERNET network mode is the only mode supported. More modes will be add once this series is

Re: [libvirt PATCH 3/5] util: Add util methods required by ch networking

2024-01-04 Thread Praveen K Paladugu
On 1/4/2024 9:04 AM, Michal Prívozník wrote: On 11/30/23 00:11, Praveen K Paladugu wrote: virSocketSendMsgWithFDs method send fds along with payload using SCM_RIGHTS. virSocketRecvHttpResponse method polls, receives http response on the input socket and returns the http response code. These

[PATCH v2 0/5] Initial network support in ch driver.

2024-01-16 Thread Praveen K Paladugu
v2: * Refactor virSocketRecvHttpResponse to return responses without parsing http responses. * Use errno to report errors in virsocket.c * Address WIN32 build failure in virsocket.c * Fix code indentations Praveen K Paladugu (5): conf: Drop unused parameter hypervisor: Move domain interface

[PATCH v2 1/5] conf: Drop unused parameter

2024-01-16 Thread Praveen K Paladugu
Drop unused parameter from virDomainNetReleaseActualDevice method. Signed-off-by: Praveen K Paladugu --- src/conf/domain_conf.c | 1 - src/conf/domain_conf.h | 3 +-- src/libxl/libxl_domain.c | 2 +- src/libxl/libxl_driver.c | 4 ++-- src/lxc/lxc_driver.c | 2 +- src/lxc

[PATCH v2 3/5] util: Add util methods required by ch networking

2024-01-16 Thread Praveen K Paladugu
virSocketSendMsgWithFDs method send fds along with payload using SCM_RIGHTS. virSocketRecv method polls, receives and sends the response to callers. These methods are required to add network suppport in ch driver. Signed-off-by: Praveen K Paladugu --- po/POTFILES | 1 + src

[PATCH v2 2/5] hypervisor: Move domain interface mgmt methods

2024-01-16 Thread Praveen K Paladugu
Move domain interface management methods from qemu to hypervisor. This refactoring allows the domain management methods to be shared between CH and qemu drivers. This commit does not introduce any functional changes. Signed-off-by: Praveen K Paladugu --- po/POTFILES | 1

[PATCH v2 5/5] ch: Enable ETHERNET Network mode support

2024-01-16 Thread Praveen K Paladugu
enable VIR_DOMAIN_NET_TYPE_ETHERNET network support for ch guests. Tested with following interface config: Signed-off-by: Praveen K Paladugu --- po/POTFILES | 1 + src/ch/ch_conf.h | 4 + src/ch/ch_domain.c| 41 src/ch

[PATCH v2 4/5] ch: Introduce version based cap for network support

2024-01-16 Thread Praveen K Paladugu
This capability checks if ch can receive multiple fds along with net-add api. This capability is required to enable multiple queues for domain/guest interfaces. Signed-off-by: Praveen K Paladugu --- src/ch/ch_capabilities.c | 9 + src/ch/ch_capabilities.h | 1 + 2 files changed, 10

Re: [PATCH] ch_driver: fix condition in virCHDomainRemoveInactive()

2024-01-29 Thread Praveen K Paladugu
LGTM! -- Regards, Praveen ___ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-le...@lists.libvirt.org

Re: [PATCH v2 0/5] Initial network support in ch driver.

2024-01-30 Thread Praveen K Paladugu
Ping.. for some reviews on this patchset. -- Regards, Praveen ___ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-le...@lists.libvirt.org

[PATCH 1/2] conf: Introduce mshv hypervisor type

2024-01-30 Thread Praveen K Paladugu
This hypervisor type is available on a host running Microsoft Hypervisor and Linux as the Dom0. The Dom0 should load "mshv" drivers to expose the hypervisor device to userspace. Cloud-Hypervisor supports running guests on Linux Hosts with mshv as the hypervisor. Signed-off-by: Praveen

[PATCH 0/2] Introduce mshv Hypervisor type.

2024-01-30 Thread Praveen K Paladugu
These patches introduce 'mshv' hypervisor type and check for the hypervisor device on host while starting ch guests. Praveen K Paladugu (2): conf: Introduce mshv hypervisor type ch: Check for hypervisor while starting guests src/ch/ch_conf.c| 2 ++ src/ch/ch_driver.c

[PATCH 2/2] ch: Check for hypervisor while starting guests

2024-01-30 Thread Praveen K Paladugu
While initializing ch driver, confirm either /dev/kvm or /dev/mshv device is present. Before starting domains, validate the requested hypervisor device exists on the host. Users can specify hypervisor in ch guests's domain definitions like below: _or_ Signed-off-by: Praveen K Pal

[PATCH v2] ch: Enable hyperv hypervisor

2024-02-20 Thread Praveen K Paladugu
From: Praveen K Paladugu Cloud-Hypervisor is capable of running VMs with kvm or mshv as the hypervisor on Linux Host. Guest to hypevisor ABI with mshv hypervisor is the same as in the case of VIR_DOMAIN_VIRT_HYPERV. So, VIR_DOMAIN_VIRT_HYPERV type will be reused to represent the config with

Re: [PATCH v2] ch: Enable hyperv hypervisor

2024-02-28 Thread Praveen K Paladugu
ping.. to get this simple patch reviewed. Regards, Praveen On 2/20/2024 4:06 PM, Praveen K Paladugu wrote: From: Praveen K Paladugu Cloud-Hypervisor is capable of running VMs with kvm or mshv as the hypervisor on Linux Host. Guest to hypevisor ABI with mshv hypervisor is the same as in the

[PATCH 1/2] ch: Add Cap checks for unix backend of serial port

2024-03-05 Thread Praveen K Paladugu
From: Praveen K Paladugu Unix Socket backend is only supported for serial port in cloud-hypervisor. Add relevant checks in chValidateDomainDeviceDef. Signed-off-by: Praveen K Paladugu --- src/ch/ch_capabilities.c | 6 ++ src/ch/ch_capabilities.h | 1 + src/ch/ch_domain.c | 20

[PATCH 0/2] Add support for Unix mode to serial port dev

2024-03-05 Thread Praveen K Paladugu
This patchset adds support for Unix mode to serial port device in ch guests. Praveen K Paladugu (2): ch: Add Cap checks for unix backend of serial port ch: Add support for `Unix` mode to serial port dev src/ch/ch_capabilities.c | 6 ++ src/ch/ch_capabilities.h | 1 + src/ch

[PATCH 2/2] ch: Add support for `Unix` mode to serial port dev

2024-03-05 Thread Praveen K Paladugu
With Unix mode, pass a socket path to cloud-hypervisor. Cloud-Hypervisor will attach guest's serial port to this socket path. Users can connect to the serial port using one of the following commands: `socat -,crnl UNIX-CONNECT:` OR `minicom --device unix#` Signed-off-by: Praveen K Pal

Re: [PATCH v2] ch: Enable hyperv hypervisor

2024-03-08 Thread Praveen K Paladugu
On 3/8/2024 6:06 AM, Michal Prívozník wrote: On 2/20/24 23:06, Praveen K Paladugu wrote: From: Praveen K Paladugu Cloud-Hypervisor is capable of running VMs with kvm or mshv as the hypervisor on Linux Host. Guest to hypevisor ABI with mshv hypervisor is the same as in the case of

Re: [PATCH v2] ch: Enable hyperv hypervisor

2024-03-12 Thread Praveen K Paladugu
On 3/11/2024 6:46 AM, Michal Prívozník wrote: On 3/8/24 16:55, Praveen K Paladugu wrote: On 3/8/2024 6:06 AM, Michal Prívozník wrote: On 2/20/24 23:06, Praveen K Paladugu wrote: From: Praveen K Paladugu Cloud-Hypervisor is capable of running VMs with kvm or mshv as the hypervisor on

cpugroups for hyperv hypervisor

2024-06-26 Thread Praveen K Paladugu
Hey folks, My team is working on exposing `cpugroups` to Libvirt while using 'hyperv' hypervisor with cloud-hypervisor(VMM). cpugroups are relevant in a specific configuration of hyperv called 'minroot'. In Minroot configuration, hypervisor artificially restricts Dom0 to run on a subset of cp

Re: [PATCH 1/8] ch: report response message instead of just code

2024-06-28 Thread Praveen K Paladugu
On 6/28/2024 2:26 AM, Purna Pavan Chandra wrote: The response message from CH for vm.add-net api will be more helpful in debugging. Hence, log the message instead of just response code. Signed-off-by: Purna Pavan Chandra --- src/ch/ch_process.c | 2 +- 1 file changed, 1 insertion(+), 1 de

Re: [PATCH 3/8] ch: refactor chProcessAddNetworkDevices

2024-06-28 Thread Praveen K Paladugu
On 6/28/2024 2:26 AM, Purna Pavan Chandra wrote: Move socket connection code to a new function. There could be other functions which might want to perform similar socket connection operation. Hence, move it to a new function. Similarly move http response processing and closing FDs to new funct

Re: [PATCH 4/8] ch: poll with -1 in chSocketRecv

2024-06-28 Thread Praveen K Paladugu
On 6/28/2024 2:26 AM, Purna Pavan Chandra wrote: chSocketRecv fn can be used by operations such as restore, which cannot have a specific poll timeout. The runtime of these operations at server side (vmm) cannot be determined or capped as it depends on the guest configuration. Hence, pass -1 as

Re: [PATCH 5/8] ch: use monitor socket fd to send restore request

2024-06-28 Thread Praveen K Paladugu
On 6/28/2024 2:26 AM, Purna Pavan Chandra wrote: This change will later help in passing new net fds to CH during restore operation. Please consider rewording this commit message to contain a 'what' and a 'why'. Something to the effect of: Instead of curl, use low-level socket connections t

Re: [PATCH 7/8] ch: support restore with net devices

2024-06-28 Thread Praveen K Paladugu
On 6/28/2024 2:26 AM, Purna Pavan Chandra wrote: Cloud-hypervisor now supports restoring with new net fds. Ref: https://github.com/cloud-hypervisor/cloud-hypervisor/pull/6402 So, pass new tap fds via SCM_RIGHTS to CH's restore api. Signed-off-by: Purna Pavan Chandra --- src/ch/ch_driver.c

Re: cpugroups for hyperv hypervisor

2024-07-22 Thread Praveen K Paladugu
On 7/9/2024 2:43 PM, Daniel P. Berrangé wrote: On Wed, Jun 26, 2024 at 09:18:37AM -0500, Praveen K Paladugu wrote: Hey folks, My team is working on exposing `cpugroups` to Libvirt while using 'hyperv' hypervisor with cloud-hypervisor(VMM). cpugroups are relevant in a specific con

Re: [PATCH v2 5/8] ch: use monitor socket fd to send restore request

2024-07-25 Thread Praveen K Paladugu
On 7/4/2024 6:13 AM, Purna Pavan Chandra wrote: Instead of curl, use low-level socket connections to make restore api request to CH. This will enable passing new net FDs to CH while restoring domains with network configuration. Signed-off-by: Purna Pavan Chandra --- src/ch/ch_monitor.c | 1

Re: [PATCH v2 7/8] ch: support restore with net devices

2024-07-25 Thread Praveen K Paladugu
On 7/4/2024 6:13 AM, Purna Pavan Chandra wrote: Cloud-hypervisor now supports restoring with new net fds. Ref: https://github.com/cloud-hypervisor/cloud-hypervisor/pull/6402 So, pass new tap fds via SCM_RIGHTS to CH's restore api. Signed-off-by: Purna Pavan Chandra --- src/ch/ch_capabiliti

[PATCH 0/2] Enable NAT network support for ch guests

2024-08-01 Thread Praveen K Paladugu
Move additional domain interface management methods to hypervisor and enable NAT mode network support for ch guests. Praveen K Paladugu (2): hypervisor: Move domain interface mgmt methods ch: Enable NAT Network mode support src/ch/ch_interface.c | 57 ++-- src/hypervisor

[PATCH 1/2] hypervisor: Move domain interface mgmt methods

2024-08-01 Thread Praveen K Paladugu
From: Praveen K Paladugu From: Praveen K Paladugu Move methods to connect domain interfaces to host bridges to hypervisor. This is to allow reuse between qemu and ch drivers. Signed-off-by: Praveen K Paladugu Signed-off-by: Praveen K Paladugu --- src/hypervisor/domain_interface.c | 228

[PATCH 2/2] ch: Enable NAT Network mode support

2024-08-01 Thread Praveen K Paladugu
From: Praveen K Paladugu From: Praveen K Paladugu enable VIR_DOMAIN_NET_TYPE_NETWORK network support for ch guests. Tested with following config: Signed-off-by: Praveen K Paladugu Signed-off-by: Praveen K Paladugu --- src/ch/ch_interface.c | 57

Re: [PATCH v3 0/9] ch: support restore with network devices

2024-08-05 Thread Praveen K Paladugu
LGTM! On 8/5/2024 9:40 AM, Purna Pavan Chandra wrote: Current ch driver supports restore only for domains without any network configuration defined. This was because libvirt explicitly passes network fds and CH did not had support to restore with new net FDS. This support has been added recently

Re: [PATCH 0/2] Enable NAT network support for ch guests

2024-08-22 Thread Praveen K Paladugu
Bubbling up this thread for reviews. On 8/1/2024 5:25 PM, Praveen K Paladugu wrote: Move additional domain interface management methods to hypervisor and enable NAT mode network support for ch guests. Praveen K Paladugu (2): hypervisor: Move domain interface mgmt methods ch: Enable NAT

Re: [PATCH 0/2] Enable NAT network support for ch guests

2024-08-26 Thread Praveen K Paladugu
Thanks Michal!! On 8/26/2024 9:15 AM, Michal Prívozník wrote: On 8/2/24 00:25, Praveen K Paladugu wrote: Move additional domain interface management methods to hypervisor and enable NAT mode network support for ch guests. Praveen K Paladugu (2): hypervisor: Move domain interface mgmt

[PATCH 0/2] Enable Bridge network support for ch guests

2024-08-26 Thread Praveen K Paladugu
Enble Bridge network mode for ch guest. Praveen K Paladugu (2): ch: Enable bridge network mode NEWS: Add an entry for network support in ch driver. NEWS.rst | 4 src/ch/ch_interface.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) -- 2.44.0

[PATCH 1/2] ch: Enable bridge network mode

2024-08-26 Thread Praveen K Paladugu
Tested with following interface config: Signed-off-by: Praveen K Paladugu Signed-off-by: Praveen K Paladugu --- src/ch/ch_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ch/ch_interface.c b/src/ch/ch_interface.c index 47b02bc322

[PATCH 2/2] NEWS: Add an entry for network support in ch driver.

2024-08-26 Thread Praveen K Paladugu
Signed-off-by: Praveen K Paladugu Signed-off-by: Praveen K Paladugu --- NEWS.rst | 4 1 file changed, 4 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 817c7ed040..9234e70590 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -31,6 +31,10 @@ v10.7.0 (unreleased) backed network devices. So

Re: [PATCH 2/2] ch: Enable NAT Network mode support

2024-08-27 Thread Praveen K Paladugu
On 8/27/2024 5:18 AM, Pavel Hrdina wrote: On Thu, Aug 01, 2024 at 05:25:14PM -0500, Praveen K Paladugu wrote: From: Praveen K Paladugu From: Praveen K Paladugu enable VIR_DOMAIN_NET_TYPE_NETWORK network support for ch guests. Tested with following config

Re: [PATCH 2/2] ch: Enable NAT Network mode support

2024-08-28 Thread Praveen K Paladugu
On 8/27/2024 12:40 PM, Pavel Hrdina wrote: On Tue, Aug 27, 2024 at 11:05:39AM -0500, Praveen K Paladugu wrote: On 8/27/2024 5:18 AM, Pavel Hrdina wrote: On Thu, Aug 01, 2024 at 05:25:14PM -0500, Praveen K Paladugu wrote: From: Praveen K Paladugu From: Praveen K Paladugu enable

[PATCH] ch: Enable callbacks for ch domain events

2024-09-10 Thread Praveen K Paladugu
From: Praveen K Paladugu Enable callbacks for define, undefine, started, booted, stopped, destroyed events of ch guests. Signed-off-by: Praveen K Paladugu --- src/ch/ch_conf.h | 4 +++ src/ch/ch_driver.c | 81 -- 2 files changed, 83 insertions

[PATCH v2] ch: Enable callbacks for ch domain events

2024-09-10 Thread Praveen K Paladugu
From: Praveen K Paladugu Enable callbacks for define, undefine, started, booted, stopped, destroyed events of ch guests. Signed-off-by: Praveen K Paladugu --- src/ch/ch_conf.h | 4 +++ src/ch/ch_driver.c | 82 -- 2 files changed, 84 insertions

Re: [PATCH v2 2/6] ch: pass --event-monitor option to cloud-hypervisor

2024-10-08 Thread Praveen K Paladugu
} +g_free(mon->eventmonitorpath); +} + virObjectUnref(mon); } diff --git a/src/ch/ch_monitor.h b/src/ch/ch_monitor.h index b35f5ea027..2ef8706b99 100644 --- a/src/ch/ch_monitor.h +++ b/src/ch/ch_monitor.h @@ -95,6 +95,8 @@ struct _virCHMonitor { char *socketpath; +char *eventmonitorpath; + pid_t pid; virDomainObj *vm; -- Regards, Praveen K Paladugu

Re: [PATCH v2 1/6] utils: Implement virFileIsNamedPipe

2024-10-08 Thread Praveen K Paladugu
LL(1); +bool virFileIsNamedPipe (const char *file) ATTRIBUTE_NONNULL(1); bool virFileExists(const char *file) ATTRIBUTE_NONNULL(1) G_NO_INLINE; bool virFileIsExecutable(const char *file) ATTRIBUTE_NONNULL(1); bool virFileIsRegular(const char *file) ATTRIBUTE_NONNULL(1); -- Regards, Praveen K Paladugu

Re: [PATCH v2 3/6] ch: start a new thread for handling ch events

2024-10-08 Thread Praveen K Paladugu
onitor.h index 2ef8706b99..878a185f29 100644 --- a/src/ch/ch_monitor.h +++ b/src/ch/ch_monitor.h @@ -97,6 +97,9 @@ struct _virCHMonitor { char *eventmonitorpath; +virThread event_handler_thread; +int event_handler_stop; + pid_t pid; virDomainObj *vm; diff --git a/src/ch/meson.build b/src/ch/meson.build index 633966aac7..684beac1f2 100644 --- a/src/ch/meson.build +++ b/src/ch/meson.build @@ -7,6 +7,8 @@ ch_driver_sources = [ 'ch_domain.h', 'ch_driver.c', 'ch_driver.h', + 'ch_events.c', + 'ch_driver.h', should this be ch_events.h? 'ch_interface.c', 'ch_interface.h', 'ch_monitor.c', -- Regards, Praveen K Paladugu

[PATCH] ch: Enable a logfile for ch guests

2024-10-11 Thread Praveen K Paladugu
Create a logfile to capture output from cloud-hypervisor whenever a guest is started. Signed-off-by: Praveen K Paladugu --- src/ch/ch_monitor.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/src/ch/ch_monitor.c b/src/ch/ch_monitor.c index 3e49902791..7421a550b6 100644 --- a

[PATCH 01/10] hypervisor: move HostdevNeedsVFIO to hypervisor

2024-10-11 Thread Praveen K Paladugu
Move HostdevNeedsVFIO method to hypervisor to be reused between qemu and ch drivers. Signed-off-by: Praveen K Paladugu --- src/hypervisor/virhostdev.c | 7 +++ src/hypervisor/virhostdev.h | 3 +++ src/libvirt_private.syms| 1 + src/qemu/qemu_cgroup.c | 5 +++-- src/qemu

[PATCH 00/10] PCI passthrough support for ch guests

2024-10-11 Thread Praveen K Paladugu
This patch series introduces PCI passthrough support for ch guests. While enabling this feature I refactored a bunch of methods from qemu to hypervisor to reduce duplication of logic between the drivers. Praveen K Paladugu (7): hypervisor: move HostdevNeedsVFIO to hypervisor hypervisor: move

[PATCH 04/10] ch: add host device manager to driver

2024-10-11 Thread Praveen K Paladugu
From: Wei Liu Co-authored-by: Wei Liu Signed-off-by: Praveen K Paladugu --- src/ch/ch_conf.h | 4 src/ch/ch_driver.c | 4 2 files changed, 8 insertions(+) diff --git a/src/ch/ch_conf.h b/src/ch/ch_conf.h index a77cad7a2a..11061bc1b5 100644 --- a/src/ch/ch_conf.h +++ b/src/ch

[PATCH 06/10] ch: prepare domain definition for pci passthrough

2024-10-11 Thread Praveen K Paladugu
Check if the domain definition is valid for PCI passthrough and update it if necessary. Signed-off-by: Praveen K Paladugu --- po/POTFILES | 1 + src/ch/ch_hostdev.c | 67 + src/ch/ch_hostdev.h | 3 ++ src/ch/ch_process.c | 39

[PATCH 05/10] ch: add scaffolding for host devices management

2024-10-11 Thread Praveen K Paladugu
From: Wei Liu They are left empty for now. Make sure CH driver still builds. Content will be filled in later. Signed-off-by: Wei Liu Signed-off-by: Praveen K Paladugu --- src/ch/ch_hostdev.c | 28 src/ch/ch_hostdev.h | 24 src/ch

[PATCH 02/10] hypervisor: move HostdevHostSupportsPassthroughVFIO

2024-10-11 Thread Praveen K Paladugu
Move HostdevHostSupportsPassthroughVFIO method to hypervisor to be shared between qemu and ch drivers. Signed-off-by: Praveen K Paladugu --- src/hypervisor/virhostdev.c | 16 src/hypervisor/virhostdev.h | 2 ++ src/libvirt_private.syms | 1 + src/qemu

[PATCH 03/10] qemu: replace qemuHostdevPreparePCIDevices

2024-10-11 Thread Praveen K Paladugu
qemuHostdevPreparePCIDevices, virHostdevPreparePCIDevices are identical. Replacing qemu method with the generic one to reduce code duplication. This generic method will be used in ch driver to passthrough PCI devices. Signed-off-by: Praveen K Paladugu --- src/qemu/qemu_hostdev.c | 17

[PATCH 07/10] ch: prepare host for PCI passthrough

2024-10-11 Thread Praveen K Paladugu
From: Wei Liu Prepare host to passthrough PCI devices for ch guests. Co-authored-by: Wei Liu Signed-off-by: Praveen K Paladugu --- src/ch/ch_hostdev.c | 20 src/ch/ch_hostdev.h | 5 + src/ch/ch_process.c | 30 ++ 3 files changed, 55

[PATCH 08/10] ch: allow hostdev in domain definitions

2024-10-11 Thread Praveen K Paladugu
Allow hostdev configurations in ch guest definitions. Signed-off-by: Praveen K Paladugu --- src/ch/ch_domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ch/ch_domain.c b/src/ch/ch_domain.c index e1e14554a8..bfccabed49 100644 --- a/src/ch/ch_domain.c +++ b/src/ch

[PATCH 09/10] ch: reattach PCI devices to host while stopping guest

2024-10-11 Thread Praveen K Paladugu
Reattach PCI devices to host, while stopping ch guest. Signed-off-by: Praveen K Paladugu --- src/ch/ch_process.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ch/ch_process.c b/src/ch/ch_process.c index ed0fa1fedb..61e263b62b 100644 --- a/src/ch/ch_process.c +++ b

[PATCH 10/10] ch: explicitly set INFILESIZE to 0

2024-10-11 Thread Praveen K Paladugu
ppens while using "mshv" hypervisor. By setting CURLOPT_INFILESIZE to O, curl drops the Expect header and sychronously waits for server to respond. Signed-off-by: Praveen K Paladugu --- src/ch/ch_monitor.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ch/ch_monitor.c b/src/

Re: [PATCH v2] ch: Enable callbacks for ch domain events

2024-10-07 Thread Praveen K Paladugu
Ping for review/merge. On 9/26/2024 11:29 AM, Praveen K Paladugu wrote: bubbling up this patch for review. On 9/10/2024 2:22 PM, Praveen K Paladugu wrote: From: Praveen K Paladugu Enable callbacks for define, undefine, started, booted, stopped, destroyed events of ch guests. Signed-off-by

Re: [PATCH 00/10] PCI passthrough support for ch guests

2024-10-22 Thread Praveen K Paladugu
ping.. for review. Praveen On 10/11/2024 1:13 PM, Praveen K Paladugu wrote: This patch series introduces PCI passthrough support for ch guests. While enabling this feature I refactored a bunch of methods from qemu to hypervisor to reduce duplication of logic between the drivers. Praveen K

Re: [PATCH v3 0/5] ch: handle events from cloud-hypervisor

2024-11-05 Thread Praveen K Paladugu
_events.h | 54 src/ch/ch_monitor.c | 52 ++- src/ch/ch_monitor.h | 11 ++ src/ch/meson.build | 2 + 7 files changed, 449 insertions(+), 7 deletions(-) create mode 100644 src/ch/ch_events.c create mode 100644 src/ch/ch_events.h -- Regards, Praveen K Paladugu

Re: [PATCH 00/10] PCI passthrough support for ch guests

2024-11-11 Thread Praveen K Paladugu
bubbling this up for reviews On 10/22/2024 10:39 AM, Praveen K Paladugu wrote: ping.. for review. Praveen On 10/11/2024 1:13 PM, Praveen K Paladugu wrote: This patch series introduces PCI passthrough support for ch guests. While enabling this feature I refactored a bunch of methods from qemu

Re: [PATCH 2/6] ch: pass --event-monitor option to cloud-hypervisor

2024-09-23 Thread Praveen K Paladugu
diff --git a/src/ch/ch_monitor.h b/src/ch/ch_monitor.h index b35f5ea027..2ef8706b99 100644 --- a/src/ch/ch_monitor.h +++ b/src/ch/ch_monitor.h @@ -95,6 +95,8 @@ struct _virCHMonitor { char *socketpath; +char *eventmonitorpath; + pid_t pid; virDomainObj *vm; -- Regards, Praveen K Paladugu

Re: [PATCH 3/6] ch: start a new thread for handling ch events

2024-09-23 Thread Praveen K Paladugu
virCHMonitor { char *eventmonitorpath; +virThread event_handler_thread; +int event_handler_stop; + pid_t pid; virDomainObj *vm; diff --git a/src/ch/meson.build b/src/ch/meson.build index 633966aac7..684beac1f2 100644 --- a/src/ch/meson.build +++ b/src/ch/meson.build @@ -7,6 +7,8 @@ ch_driver_sources = [ 'ch_domain.h', 'ch_driver.c', 'ch_driver.h', + 'ch_events.c', + 'ch_driver.h', 'ch_interface.c', 'ch_interface.h', 'ch_monitor.c', -- Regards, Praveen K Paladugu

Re: [PATCH 3/6] ch: start a new thread for handling ch events

2024-09-26 Thread Praveen K Paladugu
On 9/24/2024 8:22 AM, Purna Pavan Chandra Aekkaladevi wrote: On Mon, Sep 23, 2024 at 04:29:35PM -0500, Praveen K Paladugu wrote: On 9/19/2024 8:02 AM, Purna Pavan Chandra Aekkaladevi wrote: Use a FIFO(named pipe) for --event-monitor option in CH. Introduce a new thread

Re: [PATCH 3/6] ch: start a new thread for handling ch events

2024-09-26 Thread Praveen K Paladugu
monitorpath; +virThread event_handler_thread; +int event_handler_stop; + pid_t pid; virDomainObj *vm; diff --git a/src/ch/meson.build b/src/ch/meson.build index 633966aac7..684beac1f2 100644 --- a/src/ch/meson.build +++ b/src/ch/meson.build @@ -7,6 +7,8 @@ ch_driver_sources = [ 'ch_domain.h', 'ch_driver.c', 'ch_driver.h', + 'ch_events.c', + 'ch_driver.h', 'ch_interface.c', 'ch_interface.h', 'ch_monitor.c', -- Regards, Praveen K Paladugu

Re: [PATCH 4/6] ch: events: Read and parse cloud-hypervisor events

2024-09-26 Thread Praveen K Paladugu
ch/ch_monitor.h @@ -99,6 +99,12 @@ struct _virCHMonitor { virThread event_handler_thread; int event_handler_stop; +struct { +// Buffer to hold the data read from pipe Please replace all `//` comments with `/**/`. This is the preferred comment style in Libvirt. +char *buffer; +// Size of the data read from pipe in buffer nit: "Size of the data read from pipe into buffer" +size_t buf_fill_sz; +} event_buffer; pid_t pid; -- Regards, Praveen K Paladugu

Re: [PATCH v2] ch: Enable callbacks for ch domain events

2024-09-26 Thread Praveen K Paladugu
bubbling up this patch for review. On 9/10/2024 2:22 PM, Praveen K Paladugu wrote: From: Praveen K Paladugu Enable callbacks for define, undefine, started, booted, stopped, destroyed events of ch guests. Signed-off-by: Praveen K Paladugu --- src/ch/ch_conf.h | 4 +++ src/ch

Re: [PATCH 5/6] ch: events: facilitate lifecycle events handling

2024-09-26 Thread Praveen K Paladugu
, +VIR_CH_EVENT_VM_DELETED, +VIR_CH_EVENT_VM_PAUSING, +VIR_CH_EVENT_VM_PAUSED, +VIR_CH_EVENT_VM_RESUMING, + VIR_CH_EVENT_VM_RESUMED, +VIR_CH_EVENT_VM_SNAPSHOTTING, +VIR_CH_EVENT_VM_SNAPSHOTTED, +VIR_CH_EVENT_VM_RESTORING, +VIR_CH_EVENT_VM_RESTORED, + +VIR_CH_EVENT_LAST +} virCHEvent; + +VIR_ENUM_DECL(virCHEvent); + int virCHStartEventHandler(virCHMonitor *mon); void virCHStopEventHandler(virCHMonitor *mon); -- Regards, Praveen K Paladugu

Re: [PATCH 03/10] qemu: replace qemuHostdevPreparePCIDevices

2024-11-15 Thread Praveen K Paladugu
On 11/15/2024 6:22 AM, Michal Prívozník wrote: On 10/11/24 20:13, Praveen K Paladugu wrote: qemuHostdevPreparePCIDevices, virHostdevPreparePCIDevices are identical. Replacing qemu method with the generic one to reduce code duplication. This generic method will be used in ch driver to

Re: [PATCH v2] ch: Enable callbacks for ch domain events

2024-11-15 Thread Praveen K Paladugu
bubbling up patch for review. On 10/7/2024 11:09 AM, Praveen K Paladugu wrote: Ping for review/merge. On 9/26/2024 11:29 AM, Praveen K Paladugu wrote: bubbling up this patch for review. On 9/10/2024 2:22 PM, Praveen K Paladugu wrote: From: Praveen K Paladugu Enable callbacks for define

[PATCH] ch: enable virNodeGetMemoryStats API

2024-11-15 Thread Praveen K Paladugu
Enable virNodeGetMemoryStats API to return the stats of host memory. Signed-off-by: Praveen K Paladugu Signed-off-by: Praveen K Paladugu --- src/ch/ch_driver.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/src/ch/ch_driver.c b/src/ch/ch_driver.c index 17ae488a02

[PATCH] ch: Enable user aliases

2024-12-03 Thread Praveen K Paladugu
Enable parsing user aliases in ch driver. Signed-off-by: Praveen K Paladugu --- src/ch/ch_domain.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ch/ch_domain.c b/src/ch/ch_domain.c index bfccabed49..4f5966adce 100644 --- a/src/ch/ch_domain.c +++ b/src/ch/ch_domain.c

[PATCH] ch: Enable SEV SNP support

2025-02-04 Thread Praveen K Paladugu
Enable SEV-SNP support for ch guests. Co-Authored-by: Smit Gardhariya Signed-off-by: Praveen K Paladugu --- src/ch/ch_monitor.c | 74 + 1 file changed, 62 insertions(+), 12 deletions(-) diff --git a/src/ch/ch_monitor.c b/src/ch/ch_monitor.c index

[PATCH v2] ch: Enable SEV SNP support

2025-02-06 Thread Praveen K Paladugu
Enable SEV-SNP support for ch guests. Co-Authored-by: Smit Gardhariya Signed-off-by: Praveen K Paladugu --- src/ch/ch_monitor.c | 70 + 1 file changed, 58 insertions(+), 12 deletions(-) diff --git a/src/ch/ch_monitor.c b/src/ch/ch_monitor.c index

Re: [PATCH] ch: Enable SEV SNP support

2025-02-06 Thread Praveen K Paladugu
On 2/4/2025 3:33 PM, Peter Krempa wrote: On Tue, Feb 04, 2025 at 14:36:48 -0600, Praveen K Paladugu wrote: Enable SEV-SNP support for ch guests. Co-Authored-by: Smit Gardhariya Signed-off-by: Praveen K Paladugu --- src/ch/ch_monitor.c | 74

[PATCH v3 0/2] Enable SEV SNP support in ch driver

2025-02-11 Thread Praveen K Paladugu
This version introduces virStringFormatHex method and uses this method while sending host_data to cloud-hypervisor. Praveen K Paladugu (2): util: Introduce virStringFormatHex ch: Enable SEV SNP support src/ch/ch_monitor.c | 65 src

[PATCH v3 1/2] util: Introduce virStringFormatHex

2025-02-11 Thread Praveen K Paladugu
virStringFormatHex converts an input byte array into hex string and returns it. Signed-off-by: Praveen K Paladugu --- src/libvirt_private.syms | 1 + src/util/virstring.c | 19 +++ src/util/virstring.h | 1 + 3 files changed, 21 insertions(+) diff --git a/src

[PATCH v3 2/2] ch: Enable SEV SNP support

2025-02-11 Thread Praveen K Paladugu
Enable SEV-SNP support for ch guests. Co-Authored-by: Smit Gardhariya Signed-off-by: Praveen K Paladugu --- src/ch/ch_monitor.c | 65 - 1 file changed, 53 insertions(+), 12 deletions(-) diff --git a/src/ch/ch_monitor.c b/src/ch/ch_monitor.c index

Re: [PATCH v4 3/5] ch: events: Read and parse cloud-hypervisor events

2024-12-11 Thread Praveen K Paladugu
On 12/11/2024 1:10 AM, Purna Pavan Chandra Aekkaladevi wrote: On Tue, Dec 10, 2024 at 10:28:41AM -0600, Praveen K Paladugu wrote: On 12/2/2024 3:46 AM, Purna Pavan Chandra Aekkaladevi wrote: Implement `chReadProcessEvents` and `chProcessEvents` to read events from event monitor FIFO file

Re: [PATCH v4 4/5] ch: events: facilitate lifecycle events handling

2024-12-10 Thread Praveen K Paladugu
CH_EVENT_VM_SHUTDOWN, +VIR_CH_EVENT_VM_DELETED, +VIR_CH_EVENT_VM_PAUSING, +VIR_CH_EVENT_VM_PAUSED, +VIR_CH_EVENT_VM_RESUMING, + VIR_CH_EVENT_VM_RESUMED, +VIR_CH_EVENT_VM_SNAPSHOTTING, +VIR_CH_EVENT_VM_SNAPSHOTTED, +VIR_CH_EVENT_VM_RESTORING, +VIR_CH_EVENT_VM_RESTORED, + +VIR_CH_EVENT_LAST +} virCHEvent; + +VIR_ENUM_DECL(virCHEvent); + int virCHStartEventHandler(virCHMonitor *mon); void virCHStopEventHandler(virCHMonitor *mon); -- Regards, Praveen K Paladugu

Re: [PATCH v4 3/5] ch: events: Read and parse cloud-hypervisor events

2024-12-10 Thread Praveen K Paladugu
it a/src/ch/ch_monitor.h b/src/ch/ch_monitor.h index 6d154652fa..a84e348938 100644 --- a/src/ch/ch_monitor.h +++ b/src/ch/ch_monitor.h @@ -99,6 +99,12 @@ struct _virCHMonitor { virThread event_handler_thread; int event_handler_stop; +struct { +/* Buffer to hold the data read from pipe */ +char *buffer; +/* Size of the data read from pipe into buffer */ +size_t buf_fill_sz; +} event_buffer; pid_t pid; -- Regards, Praveen K Paladugu

[PATCH] ch: implement domainInterfaceAddresses

2024-12-12 Thread Praveen K Paladugu
K Paladugu --- src/ch/ch_driver.c | 42 ++ 1 file changed, 42 insertions(+) diff --git a/src/ch/ch_driver.c b/src/ch/ch_driver.c index 6a8da5f356..d284524337 100644 --- a/src/ch/ch_driver.c +++ b/src/ch/ch_driver.c @@ -2298,6 +2298,47

Re: [PATCH 0/8] Enabling logging for ch guests

2024-12-12 Thread Praveen K Paladugu
On 12/12/2024 4:04 AM, Michal Prívozník wrote: On 12/6/24 18:47, Praveen K Paladugu wrote: LogContext management is now moved from Qemu driver to hypervisor. After migrating Qemu to use domain_logcontext, I extended ch driver to use also use logcontext to capture early boot failures in

[PATCH v2 11/11] ch: configure ch driver to use virlogd

2024-12-19 Thread Praveen K Paladugu
Ch driver will use virtlogd to consolidate logs from hypervisor and its domains. Signed-off-by: Praveen K Paladugu --- src/ch/ch_conf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ch/ch_conf.c b/src/ch/ch_conf.c index cab97639c4..6161ce4987 100644 --- a/src/ch/ch_conf.c +++ b/src/ch

[PATCH v2 03/11] hypervisor: drop qemu specific args in domainLogContextNew

2024-12-19 Thread Praveen K Paladugu
Drop Qemu specific arguments from domainLogContextNew and replace them with hypervisor agnostic ones. Signed-off-by: Praveen K Paladugu --- src/hypervisor/domain_logcontext.c | 20 src/hypervisor/domain_logcontext.h | 8 ++-- 2 files changed, 18 insertions(+), 10

[PATCH v2 05/11] libvirt_private: export symbols from domain_logcontext

2024-12-19 Thread Praveen K Paladugu
Export required symbols from domain_logcontext.c. Signed-off-by: Praveen K Paladugu --- src/libvirt_private.syms | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index c931003fad..ad90f46c18 100644 --- a/src/libvirt_private.syms +++ b

[PATCH v2 04/11] hypervisor: Build domain_logcontext

2024-12-19 Thread Praveen K Paladugu
Signed-off-by: Praveen K Paladugu --- src/hypervisor/meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/src/hypervisor/meson.build b/src/hypervisor/meson.build index 819a9a82a2..c32703af88 100644 --- a/src/hypervisor/meson.build +++ b/src/hypervisor/meson.build @@ -2,6 +2,7

[PATCH v2 08/11] ch: Enable logging for ch domains

2024-12-19 Thread Praveen K Paladugu
Use domainLogContext to enable logging for ch domain process during create and restore steps. Signed-off-by: Praveen K Paladugu --- src/ch/ch_conf.h| 2 ++ src/ch/ch_monitor.c | 5 - src/ch/ch_monitor.h | 3 ++- src/ch/ch_process.c | 34 ++ 4 files

[PATCH v2 01/11] hypervisor: copy qemu log context mgmt to hypervisor

2024-12-19 Thread Praveen K Paladugu
Signed-off-by: Praveen K Paladugu --- po/POTFILES| 1 + src/hypervisor/domain_logcontext.c | 329 + src/hypervisor/domain_logcontext.h | 41 3 files changed, 371 insertions(+) create mode 100644 src/hypervisor/domain_logcontext.c

[PATCH v2 02/11] hypervisor: rename reference to qemu in domain_logcontext

2024-12-19 Thread Praveen K Paladugu
Rename all references to qemu within domain_logcontext files. Signed-off-by: Praveen K Paladugu --- src/hypervisor/domain_logcontext.c | 60 +++--- src/hypervisor/domain_logcontext.h | 32 2 files changed, 46 insertions(+), 46 deletions(-) diff --git a

[PATCH v2 07/11] qemu: delete qemu_logcontext files

2024-12-19 Thread Praveen K Paladugu
Signed-off-by: Praveen K Paladugu --- po/POTFILES| 1 - src/qemu/meson.build | 1 - src/qemu/qemu_logcontext.c | 329 - src/qemu/qemu_logcontext.h | 41 - 4 files changed, 372 deletions(-) delete mode 100644 src/qemu

  1   2   >