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

Re: [RFC 01/10] x86: introduce AMD-V and Intel VT-x Kconfig options


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
  • Date: Tue, 14 Feb 2023 13:38:20 -0500
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=VxfMkuL4owkU/1PHBmBq6P1aEjB7Gmv1i2aLnNMdP8k=; b=E7pFJ42CBRkIO6PsagnsxQ4HTIt9tBjYCZ7BX01Ci0sJd/KRfEZZXwf3rMLlicyfGHcn8/BdmOU/AYO1xhBVOmt0BDJ5hbzinhzC5kiDw6C2sEXBWbH5JdO7Af0177b6HD06KaHhVkRkRUwmnZ4XWLf0Nv7+8mDbdWQAoqnX6epIvixN16x5j58aq1tGvH73qfOPknVwZCNRHSDr12cqWCCF8Hc2T/9/NrRh9WZbpmBe2pF5E5aQ5W4c73sFzGL6B/Txz5tGd/Fq9JAq1EiBL3hjlsGg8AxcZfZPwVWMns1O1QIF2QIHDvA3aobhUOHqJst96AKMoU/3i9VwD2xxQw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NPxfdw/IQNrvvyffXPUrMS+qKmqrA0ZmxBQGzu5JOHX7nqYGfwkVPmoRmGWvjPZPiz5JQvib3YaEvrqOyMvVWigXLI43HfnJzOud71e72cgKhZYhZK3VfcxBVXH/KyiuYbXfktKxtT2R0QgawSxHN16469ag30eA49RcxtKY4JKCzWo7suy7HxERcMP86t0Vv54wtYrFt+YzEDBr6SuumsVcn5D2QtPIm6A/eoAkEiHCVZ35DyFxE1oisu1u3tHzAf/No/n8SfwGwGJ942PVRy1AZV1yHFDzmcWFlfrzM0I0ZKblMY4YPhV21KV1L5wZm09+eLg7wZHXLb8c1a/6KA==
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Xenia Ragiadakou <burzalodowa@xxxxxxxxx>, Wei Liu <wl@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 14 Feb 2023 18:38:59 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 2/14/23 2:48 AM, Jan Beulich wrote:
On 13.02.2023 21:53, Boris Ostrovsky wrote:
On 2/13/23 11:41 AM, Jan Beulich wrote:
On 13.02.2023 17:30, Xenia Ragiadakou wrote:
On 2/13/23 17:11, Jan Beulich wrote:
On 13.02.2023 15:57, Xenia Ragiadakou wrote:
--- a/xen/arch/x86/cpu/Makefile
+++ b/xen/arch/x86/cpu/Makefile
@@ -10,4 +10,6 @@ obj-y += intel.o
    obj-y += intel_cacheinfo.o
    obj-y += mwait-idle.o
    obj-y += shanghai.o
-obj-y += vpmu.o vpmu_amd.o vpmu_intel.o
+obj-y += vpmu.o
+obj-$(CONFIG_AMD_SVM) += vpmu_amd.o
+obj-$(CONFIG_INTEL_VMX) += vpmu_intel.o
This code was moved from hvm/ to cpu/ for the specific reason of also
being used by PV guests. (Sadly the comments at the top weren't
corrected at that time.)
Hmm, the init functions are prefixed with svm/vmx.
Does vpmu depend on svm/vmx support?
There are interactions, but I don't think there's a dependency. You
may want to ask Boris (whom I have now added to Cc).
MSR intercept bits need to be manipulated, which is SVM/VMX-specific.
But that's "interaction", not "dependency" aiui: The intercept bits aren't
relevant for PV guests, are they?


Correct, they are not. All accesses to intercept bits are under is_hvm_vcpu().


So vpmu does not depend on presence of vmx/svm support. (And init routines 
shouldn't be prefixed with those)


-boris





 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.