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-devel

Re: [Xen-devel] [PATCH][Retry 1] NextRIPS support for forthcoming AMD pr

To: "Mark Langsdorf" <mark.langsdorf@xxxxxxx>
Subject: Re: [Xen-devel] [PATCH][Retry 1] NextRIPS support for forthcoming AMD processors
From: "George Dunlap" <George.Dunlap@xxxxxxxxxxxxx>
Date: Fri, 17 Oct 2008 10:48:06 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 17 Oct 2008 02:48:29 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=LEQnpdDznds8zDbpejqAFDLFFFFjB+pNa8VXp5KNBr8=; b=YXTXnO79noUVUmnq2JIwBumqEk8BLWvDqxfdLDek9cu0ZPFSKKWcLiWqUlyJ2+m6P0 wlL3ef06Ug5Y7EfUKxIDcXq/C5JCJPrghVfdnoGPcWldc00DlpAP3wy0SMkFADAetie0 BibcT6YGpK9uC99pmqikv4pj6edehRu0A8CJA=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=rqdwgvACKsjjtC+Qx73PEwnXCnyeIHSrmYKX3EhtUAYOH4Wvj8pUSJmduvX0APocBK CN5sneBxUSxlAJU6jUDPvZntABisDZnilZwQNemLAmqhTnGd1KDtp3RvcYnNbLUFxoxE v5GEpxp1Pe0SshV8BzvIUxHfV0GiTi8m5aLFo=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <200810160947.55710.mark.langsdorf@xxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <200810160947.55710.mark.langsdorf@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Thu, Oct 16, 2008 at 3:47 PM, Mark Langsdorf <mark.langsdorf@xxxxxxx> wrote:
> +    switch (vmcb->exitcode)
> +    {
> +    case VMEXIT_CR0_READ... VMEXIT_DR15_WRITE:
> +        /* faults due to instruction intercepts */
> +        /* (exitcodes 84-95) are reserved */
> +    case VMEXIT_IDTR_READ ... VMEXIT_TR_WRITE:
> +    case VMEXIT_RDTSC ... VMEXIT_SWINT:
> +    case VMEXIT_INVD ... VMEXIT_INVLPGA:
> +    case VMEXIT_VMRUN ...  VMEXIT_MWAIT_CONDITIONAL:
> +    case VMEXIT_IOIO:
> +        /* ...and the rest of the #VMEXITs */
> +    case VMEXIT_CR0_SEL_WRITE:
> +    case VMEXIT_MSR:
> +    case VMEXIT_EXCEPTION_BP:
> +       return 1;
> +        break;
> +    default:
> +        return 0;
> +    }

Hmm... won't this giant case statement expand out into a huge string
of ifs?  It seems like we should be able to be more clever than that
for the common case.

 -George

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

<Prev in Thread] Current Thread [Next in Thread>