Re: [PATCH 1/4] vmx: pass vcpu_vmx internally

Avi Kivity
2007-07-30T09:02:01Z

Rusty Russell wrote:
> container_of is wonderful, but not casting at all is better. This
> patch changes vmx.c's internal functions to pass "struct vcpu_vmx"
> instead of "struct kvm_vcpu" and using container_of.
>
> @@ -1297,9 +1288,9 @@ static void seg_setup(int seg)
> /*
> * Sets up the vmcs for emulated real mode.
> */
> -static int vmx_vcpu_setup(struct kvm_vcpu *vcpu)
> -{
> - struct vcpu_vmx *vmx = to_vmx(vcpu);
> +static int vmx_vcpu_setup(struct vcpu_vmx *vmx)
> +{
> +
> u32 host_sysenter_cs;
> u32 junk;
> unsigned long a;
>

I fixed this up manually and applied. Please watch for these in the future.

--
error compiling committee.c: too many arguments to function