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

Re: [Xen-devel] [PATCH for-next] x86/svm: Correct vm_event API for descriptor accesses


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Razvan COJOCARU <rcojocaru@xxxxxxxxxxxxxxx>
  • Date: Thu, 28 Nov 2019 14:06:11 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bitdefender.com; dmarc=pass action=none header.from=bitdefender.com; dkim=pass header.d=bitdefender.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-SenderADCheck; bh=KEVCjHK2RhK35tPtJaxWG/gF1a7/QLW2wpAPhxOnxMc=; b=X5EXuAaIK7SIs+FG/ZOJLDlW6V9gdj6q5nw4fP1gcokT/FupDiHbDR0zBXnYtmOUfEB+o6xtWL5pWqPmvZjjxsj9DrkatdNAofiqnkjBSmUg432raGSZxEDoGu8k8K0+kKYfJoGpoJZK/N46Rxpj7onZUUfUC+0aHAjZ35uwakN7tOfG+284CfIzI4VjNh5Xn25dhSVOMAHc5w0emV5MQtbkxQdwjPbjEQ2ioREiSYqlZKa84JE/tAvYF99Q7KxyFleViKtyY6XMJ8R1vmuCTgSlBQTrQ8u6yxKPmv989JkPjzSmYhLg0wr7oC4sf4Fb8vCc3TLPz+c9ezU7TXx3uA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IGEyMGC0jdkNpxsLPTBlZfgG24Ch3vVJBHfUXlSYe7gKB/SKAO5bfxpZ3q9RTjlW8k+yzJC8/ijnAW83FdjYKoRihkmU1tDfIomL3WVVrDxef5KrZALSkgiAUMRabY5s2Cw6YK2pfQOtP/jgSko3DaOzLJNyIvnjYDwBihFTUsTjiAGWy2lbur8wFDc8W+0OW8msNgfFWiUwvDSDx0Ty5G6lETFSWbtoXI/xHl5mWmqeRrG3H6pxV/ZzoPsyfcr6ytkraWae5bLBfNDqEqiXyD+74Jju4Z5Fc+hWP7ArSmHpaU3+lkodQN67fGYbxkTnp7tsejaz7GaMNzTavUtCgg==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=rcojocaru@xxxxxxxxxxxxxxx;
  • Cc: Petre Ovidiu PIRCALABU <ppircalabu@xxxxxxxxxxxxxxx>, Tamas K Lengyel <tamas@xxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Adrian Pop <apop@xxxxxxxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>, Alexandru Stefan ISAILA <aisaila@xxxxxxxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Thu, 28 Nov 2019 14:06:21 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVpeFJwhxl33oiokmRm1yy7hbF8KegnjSA
  • Thread-topic: [PATCH for-next] x86/svm: Correct vm_event API for descriptor accesses

On 11/28/19 1:44 PM, Andrew Cooper wrote:
> c/s d0a699a389f1 "x86/monitor: add support for descriptor access events"
> introduced logic looking for what appeared to be exitinfo (not that this
> exists in SVM - exitinfo1 or 2 do), but actually passed the exit IDT vectoring
> information.  There is never any IDT vectoring involved in these intercepts so
> the value passed is always zero.
> 
> In fact, SVM doesn't provide any information, even in exitinfo1 and 2.  Note
> the error in the public API and state that this field is always 0, and drop
> the SVM logic in hvm_monitor_descriptor_access().
> 
> In the SVM vmexit handler itself, optimise the switch statement by observing
> that there is a linear transformation between the SVM exit_reason and
> VM_EVENT_DESC_* values.  (Bloat-o-meter reports 6028 => 5877 for a saving of
> 151 bytes).
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> ---
> CC: Jan Beulich <JBeulich@xxxxxxxx>
> CC: Wei Liu <wl@xxxxxxx>
> CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> CC: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx>
> CC: Tamas K Lengyel <tamas@xxxxxxxxxxxxx>
> CC: Alexandru Isaila <aisaila@xxxxxxxxxxxxxxx>
> CC: Petre Pircalabu <ppircalabu@xxxxxxxxxxxxxxx>
> CC: Adrian Pop <apop@xxxxxxxxxxxxxxx>
> 
> Adrian: Do you recall what information you were attempting to forward from the
> VMCB?  I can't locate anything which would plausibly be interesting.

I think it's safe to go the route you're going (you shouldn't break 
anything).

Acked-by: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx>

(with or without addressing Tamas' comments).


Thanks,
Razvan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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