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

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


  • To: "Mark Langsdorf" <mark.langsdorf@xxxxxxx>
  • 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
  • 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=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

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


 


Rackspace

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