WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

RE: [Xen-ia64-devel][PATCH]Build new infrastructure for fast fault handl

To: "Isaku Yamahata" <yamahata@xxxxxxxxxxxxx>
Subject: RE: [Xen-ia64-devel][PATCH]Build new infrastructure for fast fault handling path.
From: "Xu, Anthony" <anthony.xu@xxxxxxxxx>
Date: Fri, 9 May 2008 15:15:02 +0800
Cc: Alex Williamson <alex.williamson@xxxxxx>, xen-ia64-devel <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 09 May 2008 00:15:20 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20080509061438.GL23162%yamahata@xxxxxxxxxxxxx>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
References: <51CFAB8CB6883745AE7B93B3E084EBE201B733D4@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20080508120908.GH23162%yamahata@xxxxxxxxxxxxx> <51CFAB8CB6883745AE7B93B3E084EBE201B73526@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20080509061438.GL23162%yamahata@xxxxxxxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acixm/g5MjiSxTugS5ySSv3thffxUQAB6BDg
Thread-topic: [Xen-ia64-devel][PATCH]Build new infrastructure for fast fault handling path.
> Ditto.
> For xenoprof, ipsr.pp shouldn't be changed.
> This code always sets ipsr.pp.
> add IA64_PSR_PP to mask. not to mipsr.
> 

Didn't notice this, thanks


>> diff -r f2457c7aff8d xen/arch/ia64/vmx/vmx_vcpu.c
>> --- a/xen/arch/ia64/vmx/vmx_vcpu.c   Fri Apr 25 20:13:52 2008 +0900
>> +++ b/xen/arch/ia64/vmx/vmx_vcpu.c   Fri May 09 10:58:37 2008 +0800
>> @@ -172,11 +172,6 @@ IA64FAULT vmx_vcpu_set_rr(VCPU *vcpu, u6  {
>>      u64 rrval;
>> 
>> -    if (unlikely(is_reserved_rr_rid(vcpu, val))) {
>> -        gdprintk(XENLOG_DEBUG, "use of invalid rrval %lx\n", val);
>> -        return IA64_RSVDREG_FAULT;
>> -    }
>> -
>>      VMX(vcpu,vrr[reg>>VRN_SHIFT]) = val;
>>      switch((u64)(reg>>VRN_SHIFT)) {
>>      case VRN7:
> 
> Without the check, VTi domain guest may access other domain's page
> or xen's page. So it can't be dropped.
> Do you find that calling is_reserved_rr_rid() is heavy?
> If so, please make it an inline function.
> 

int is_reserved_rr_rid(VCPU* vcpu, u64 reg_value)
{
    ia64_rr rr = { .rrval = reg_value };

    if (rr.rid >= (1UL << vcpu->domain->arch.rid_bits))
        return 1;

    return 0;
}


Because vcpu->domain is not mapped by TR, this function can not be
called in fast path.
Xen will provide number of rr bits to guest Os. So good behavior OS will
not use invalid rr, as least for linux and windows.
In this case, Do we really need this check?
Or, do you have any other suggestion?


Thanks,
Anthony

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel