From 9b1ffc742d547674f4227cf9121f85cb5ca12589 Mon Sep 17 00:00:00 2001
Message-Id: <9b1ffc742d547674f4227cf9121f85cb5ca12589.1367947969.git.minovotn@redhat.com>
In-Reply-To: <707b9b97153063374d2530e72c49b1499fc21af9.1367947969.git.minovotn@redhat.com>
References: <707b9b97153063374d2530e72c49b1499fc21af9.1367947969.git.minovotn@redhat.com>
From: Michal Novotny <minovotn@redhat.com>
Date: Tue, 7 May 2013 18:36:43 +0200
Subject: [PATCH 017/114] Revert "qga: introduce guest-get-vcpus /
 guest-set-vcpus with stubs"

This reverts commit d2190883f566ff651399c7a1e51e5336cf0eddd8.

Reverting as asked by Laszlo in message <51892739.2030807@redhat.com>
because of the ordering issue (most likely) related to supersed
testing.

Signed-off-by: Michal Novotny <minovotn@redhat.com>
---
 qapi-schema-guest.json | 72 --------------------------------------------------
 qga/commands-posix.c   | 12 ---------
 qga/commands-win32.c   | 12 ---------
 3 files changed, 96 deletions(-)

diff --git a/qapi-schema-guest.json b/qapi-schema-guest.json
index dac4e6f..437d750 100644
--- a/qapi-schema-guest.json
+++ b/qapi-schema-guest.json
@@ -554,75 +554,3 @@
 ##
 { 'command': 'guest-network-get-interfaces',
   'returns': ['GuestNetworkInterface'] }
-
-##
-# @GuestLogicalProcessor:
-#
-# @logical-id: Arbitrary guest-specific unique identifier of the VCPU.
-#
-# @online: Whether the VCPU is enabled.
-#
-# @can-offline: Whether offlining the VCPU is possible. This member is always
-#               filled in by the guest agent when the structure is returned,
-#               and always ignored on input (hence it can be omitted then).
-#
-# Since: 1.5
-##
-{ 'type': 'GuestLogicalProcessor',
-  'data': {'logical-id': 'int',
-           'online': 'bool',
-           '*can-offline': 'bool'} }
-
-##
-# @guest-get-vcpus:
-#
-# Retrieve the list of the guest's logical processors.
-#
-# This is a read-only operation.
-#
-# Returns: The list of all VCPUs the guest knows about. Each VCPU is put on the
-# list exactly once, but their order is unspecified.
-#
-# Since: 1.5
-##
-{ 'command': 'guest-get-vcpus',
-  'returns': ['GuestLogicalProcessor'] }
-
-##
-# @guest-set-vcpus:
-#
-# Attempt to reconfigure (currently: enable/disable) logical processors inside
-# the guest.
-#
-# The input list is processed node by node in order. In each node @logical-id
-# is used to look up the guest VCPU, for which @online specifies the requested
-# state. The set of distinct @logical-id's is only required to be a subset of
-# the guest-supported identifiers. There's no restriction on list length or on
-# repeating the same @logical-id (with possibly different @online field).
-# Preferably the input list should describe a modified subset of
-# @guest-get-vcpus' return value.
-#
-# Returns: The length of the initial sublist that has been successfully
-#          processed. The guest agent maximizes this value. Possible cases:
-#
-#          0:                if the @vcpus list was empty on input. Guest state
-#                            has not been changed. Otherwise,
-#
-#          Error:            processing the first node of @vcpus failed for the
-#                            reason returned. Guest state has not been changed.
-#                            Otherwise,
-#
-#          < length(@vcpus): more than zero initial nodes have been processed,
-#                            but not the entire @vcpus list. Guest state has
-#                            changed accordingly. To retrieve the error
-#                            (assuming it persists), repeat the call with the
-#                            successfully processed initial sublist removed.
-#                            Otherwise,
-#
-#          length(@vcpus):   call successful.
-#
-# Since: 1.5
-##
-{ 'command': 'guest-set-vcpus',
-  'data':    {'vcpus': ['GuestLogicalProcessor'] },
-  'returns': 'int' }
diff --git a/qga/commands-posix.c b/qga/commands-posix.c
index 614f5c1..0a61ef2 100644
--- a/qga/commands-posix.c
+++ b/qga/commands-posix.c
@@ -1166,18 +1166,6 @@ void qmp_guest_fstrim(bool has_minimum, int64_t minimum, Error **err)
 }
 #endif
 
-GuestLogicalProcessorList *qmp_guest_get_vcpus(Error **errp)
-{
-    error_set(errp, QERR_UNSUPPORTED);
-    return NULL;
-}
-
-int64_t qmp_guest_set_vcpus(GuestLogicalProcessorList *vcpus, Error **errp)
-{
-    error_set(errp, QERR_UNSUPPORTED);
-    return -1;
-}
-
 /* register init/cleanup routines for stateful command groups */
 void ga_command_state_init(GAState *s, GACommandState *cs)
 {
diff --git a/qga/commands-win32.c b/qga/commands-win32.c
index da3eb2a..3e4fd2a 100644
--- a/qga/commands-win32.c
+++ b/qga/commands-win32.c
@@ -289,18 +289,6 @@ void qmp_guest_set_time(int64_t time_ns, Error **errp)
     error_set(errp, QERR_UNSUPPORTED);
 }
 
-GuestLogicalProcessorList *qmp_guest_get_vcpus(Error **errp)
-{
-    error_set(errp, QERR_UNSUPPORTED);
-    return NULL;
-}
-
-int64_t qmp_guest_set_vcpus(GuestLogicalProcessorList *vcpus, Error **errp)
-{
-    error_set(errp, QERR_UNSUPPORTED);
-    return -1;
-}
-
 /* register init/cleanup routines for stateful command groups */
 void ga_command_state_init(GAState *s, GACommandState *cs)
 {
-- 
1.7.11.7