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

Re: [Xen-devel] [PATCH RFC 5/9] xen: Support for VMCALL mem_events


  • To: Jan Beulich <JBeulich@xxxxxxxx>
  • From: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx>
  • Date: Wed, 02 Jul 2014 19:23:56 +0300
  • Cc: tim@xxxxxxx, xen-devel@xxxxxxxxxxxxx
  • Comment: DomainKeys? See http://domainkeys.sourceforge.net/
  • Delivery-date: Wed, 02 Jul 2014 16:23:34 +0000
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=bitdefender.com; b=OIVqaXTqBc9EMVVKOduZCN79uWQH34Kf4FDXgv0vtc/6ju23s17LIg+wwxQ+ageMVLUU+NGmGGFn5Y4bHsu9SpYgxbO/6XPrkZ3VgpzTOaE41ChI3RGikyjktDrbQ8k3GfZwAMnD/56qQ4pVvWxs4Dd4Dj1eVrUDb7YcO1QxYXSTOKTe469tt/36j5e1Qrd7DSUvjUCgE7mqtpGerbyLN3fYEiwk9IQfoOA2Cz9eLqP1Ie6han2yr6yiA7Bt1mLMyRu4wSOvb1VgT8HJcmwGM6elNeBzSigqastg6h25yDkWOu7m2K3wLZf5B35HdxWrlTLNN6LbFo1X13gG4ElyEw==; h=Received:Received:Received:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding:X-BitDefender-Scanner:X-BitDefender-Spam:X-BitDefender-SpamStamp:X-BitDefender-CF-Stamp;
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

On 07/02/2014 07:11 PM, Jan Beulich wrote:
>>>> On 02.07.14 at 17:54, <rcojocaru@xxxxxxxxxxxxxxx> wrote:
>>>> --- a/xen/arch/x86/hvm/vmx/vmx.c
>>>> +++ b/xen/arch/x86/hvm/vmx/vmx.c
>>>> @@ -2880,8 +2880,21 @@ void vmx_vmexit_handler(struct cpu_user_regs *regs)
>>>>      case EXIT_REASON_VMCALL:
>>>>      {
>>>>          int rc;
>>>> +        unsigned long eax = regs->eax;
>>>> +
>>>>          HVMTRACE_1D(VMMCALL, regs->eax);
>>>> -        rc = hvm_do_hypercall(regs);
>>>> +
>>>> +        if ( regs->eax != 0x494e5452 ) /* Introcore magic */
>>>
>>> Urgh?!
>>
>> The magic constant is INTR, and it's used to differentiate between
>> "regular" and induced VMCALLs. Our application sets EAX up like that to
>> tell the situations apart.
> 
> But that needs (a) a #define and (b) an explanation.
> 
> Plus - what keeps code outside of your app to invoke this?

Unfortunately, nothing. It can be set outside our application.

> 
>>>> --- a/xen/include/public/hvm/params.h
>>>> +++ b/xen/include/public/hvm/params.h
>>>> @@ -148,6 +148,8 @@
>>>>  #define HVM_PARAM_IOREQ_SERVER_PFN 32
>>>>  #define HVM_PARAM_NR_IOREQ_SERVER_PAGES 33
>>>>  
>>>> -#define HVM_NR_PARAMS          34
>>>> +#define HVM_PARAM_MEMORY_EVENT_VMCALL 34
>>>
>>> So why does this (used only as an argument to
>>> hvm_memory_event_traps()) need to be settable? I guess the patch
>>> description is just too brief.
>>
>> Settable?
> 
> You must have a reason to make this a HVM param. That reason is
> what I'm asking for.

I see. I want to be able to enable / disable this type of events. I.e.:

if (flags & ENABLE_VMCALL)
    xc_set_hvm_param(xci, domain, HVM_PARAM_MEMORY_EVENT_VMCALL,
                     HVMPME_mode_sync);

from the application, via libxc.


Thanks,
Razvan Cojocaru

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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