qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v3 12/16] hw/i386/vmport: Add support for CMD_GET_VCPU_INFO


From: Liran Alon
Subject: Re: [PATCH v3 12/16] hw/i386/vmport: Add support for CMD_GET_VCPU_INFO
Date: Fri, 13 Mar 2020 02:11:24 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:68.0) Gecko/20100101 Thunderbird/68.5.0


On 13/03/2020 2:09, Michael S. Tsirkin wrote:
On Thu, Mar 12, 2020 at 06:54:27PM +0200, Liran Alon wrote:
Command currently returns that it is unimplemented by setting
the reserved-bit in it's return value.

Following patches will return various useful vCPU information
to guest.

Reviewed-by: Nikita Leshenko <address@hidden>
Signed-off-by: Liran Alon <address@hidden>
---
  hw/i386/vmport.c         | 14 ++++++++++++++
  include/hw/i386/vmport.h |  1 +
  2 files changed, 15 insertions(+)

diff --git a/hw/i386/vmport.c b/hw/i386/vmport.c
index 7e57eda4b526..2ce78aaf7b4c 100644
--- a/hw/i386/vmport.c
+++ b/hw/i386/vmport.c
@@ -55,6 +55,13 @@
  #define VMPORT_COMPAT_CMDS_V2                   \
      (1 << VMPORT_COMPAT_CMDS_V2_BIT)
+/* vCPU features reported by CMD_GET_VCPU_INFO */
+#define VCPU_INFO_SLC64_BIT             0
+#define VCPU_INFO_SYNC_VTSCS_BIT        1
+#define VCPU_INFO_HV_REPLAY_OK_BIT      2
+#define VCPU_INFO_LEGACY_X2APIC_BIT     3
+#define VCPU_INFO_RESERVED_BIT          31
+
  #define VMPORT(obj) OBJECT_CHECK(VMPortState, (obj), TYPE_VMPORT)
typedef struct VMPortState {

Prefix with VMPORT_ please, and add comments.
Ok regarding prefix.
Which comments do you expect? What every flag means? Sure.

-Liran





reply via email to

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