From mboxrd@z Thu Jan 1 00:00:00 1970 From: ZhouPeng Subject: Re: [PATCH] tool/libxl: mistake apic for acpi in libxl__build_device_model_args_old/new Date: Tue, 10 May 2011 20:07:29 +0800 Message-ID: References: <19911.41961.195937.439643@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <19911.41961.195937.439643@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Jackson Cc: "Xen-Devel (E-mail)" , Ian Campbell List-Id: xen-devel@lists.xenproject.org 2011/5/9 Ian Jackson : > ZhouPeng writes ("[Xen-devel] [PATCH] tool/libxl: mistake apic for acpi i= n libxl__build_device_model_args_old/new"): >> diff -r 6871474a2a09 -r 01f8b29dda8e tools/libxl/libxl_dm.c >> --- a/tools/libxl/libxl_dm.c =A0 =A0Fri Apr 15 10:06:59 2011 +0800 >> +++ b/tools/libxl/libxl_dm.c =A0 =A0Fri Apr 15 15:17:42 2011 +0800 >> @@ -120,7 +120,7 @@ static char ** libxl__build_device_model >> =A0 =A0 =A0 =A0 =A0if (info->soundhw) { >> =A0 =A0 =A0 =A0 =A0 =A0 =A0flexarray_vappend(dm_args, "-soundhw", info->= soundhw, NULL); >> =A0 =A0 =A0 =A0 =A0} >> - =A0 =A0 =A0 =A0if (info->apic) { >> + =A0 =A0 =A0 =A0if (info->acpi) { >> =A0 =A0 =A0 =A0 =A0 =A0 =A0flexarray_append(dm_args, "-acpi"); >> =A0 =A0 =A0 =A0 =A0} >> =A0 =A0 =A0 =A0 =A0if (info->vcpus > 1) { > > Sorry for sitting on this. =A0There is obviously a problem here but your > patch didn't compile (whether on 4.1 or unstable). > I think I've fixed it up. =A0Please comment on the proposed patch below. It looks good for me. Thanks, BTW: Not be related with this one, The apic don't need to be propagated to device-model, but it may be needed to give user the chance to set apic =3D 0, which is another patch. > Thanks, > Ian. > > > libxl: Fix apic/acpi confusion > > "apic" was written a couple of times where "acpi" was meant. > > Signed-off-by: Zhou Peng > Signed-off-by: Ian Jackson > > > diff -r 4b0692880dfa tools/libxl/libxl.idl > --- a/tools/libxl/libxl.idl =A0 =A0 Thu May 05 17:40:34 2011 +0100 > +++ b/tools/libxl/libxl.idl =A0 =A0 Mon May 09 09:18:32 2011 +0100 > @@ -217,7 +217,7 @@ libxl_device_model_info =3D Struct("device > =A0 =A0 ("usb", =A0 =A0 =A0 =A0 =A0 =A0 =A0bool, =A0 =A0 =A0 =A0 =A0 =A0 = =A0False, "usb support enabled or disabled"), > =A0 =A0 ("usbdevice", =A0 =A0 =A0 =A0string, =A0 =A0 =A0 =A0 =A0 =A0False= , "enable usb mouse: tablet for absolute mouse, mouse for PS/2 protocol rel= ative mouse"), > =A0 =A0 ("soundhw", =A0 =A0 =A0 =A0 =A0string, =A0 =A0 =A0 =A0 =A0 =A0Fal= se, "enable sound hardware"), > - =A0 =A0("apic", =A0 =A0 =A0 =A0 =A0 =A0 bool, =A0 =A0 =A0 =A0 =A0 =A0 = =A0False, "apic enabled or disabled"), > + =A0 =A0("acpi", =A0 =A0 =A0 =A0 =A0 =A0 bool, =A0 =A0 =A0 =A0 =A0 =A0 = =A0False, "acpi enabled or disabled"), > =A0 =A0 ("vcpus", =A0 =A0 =A0 =A0 =A0 =A0integer, =A0 =A0 =A0 =A0 =A0 Fal= se, "max number of vcpus"), > =A0 =A0 ("vcpu_avail", =A0 =A0 =A0 integer, =A0 =A0 =A0 =A0 =A0 False, "v= cpus actually available"), > =A0 =A0 ("xen_platform_pci", bool, =A0 =A0 =A0 =A0 =A0 =A0 =A0False, "ena= ble/disable the xen platform pci device"), > diff -r 4b0692880dfa tools/libxl/libxl_create.c > --- a/tools/libxl/libxl_create.c =A0 =A0 =A0 =A0Thu May 05 17:40:34 2011 = +0100 > +++ b/tools/libxl/libxl_create.c =A0 =A0 =A0 =A0Mon May 09 09:18:32 2011 = +0100 > @@ -113,7 +113,7 @@ void libxl_init_dm_info(libxl_device_mod > =A0 =A0 dm_info->device_model =3D NULL; > =A0 =A0 dm_info->target_ram =3D libxl__sizekb_to_mb(b_info->target_memkb)= ; > =A0 =A0 dm_info->videoram =3D libxl__sizekb_to_mb(b_info->video_memkb); > - =A0 =A0dm_info->apic =3D b_info->u.hvm.apic; > + =A0 =A0dm_info->acpi =3D b_info->u.hvm.acpi; > =A0 =A0 dm_info->vcpus =3D b_info->max_vcpus; > =A0 =A0 dm_info->vcpu_avail =3D b_info->cur_vcpus; > > diff -r 4b0692880dfa tools/libxl/libxl_dm.c > --- a/tools/libxl/libxl_dm.c =A0 =A0Thu May 05 17:40:34 2011 +0100 > +++ b/tools/libxl/libxl_dm.c =A0 =A0Mon May 09 09:18:32 2011 +0100 > @@ -162,7 +162,7 @@ static char ** libxl__build_device_model > =A0 =A0 =A0 =A0 if (info->soundhw) { > =A0 =A0 =A0 =A0 =A0 =A0 flexarray_vappend(dm_args, "-soundhw", info->soun= dhw, NULL); > =A0 =A0 =A0 =A0 } > - =A0 =A0 =A0 =A0if (info->apic) { > + =A0 =A0 =A0 =A0if (info->acpi) { > =A0 =A0 =A0 =A0 =A0 =A0 flexarray_append(dm_args, "-acpi"); > =A0 =A0 =A0 =A0 } > =A0 =A0 =A0 =A0 if (info->vcpus > 1) { > @@ -315,7 +315,7 @@ static char ** libxl__build_device_model > =A0 =A0 =A0 =A0 if (info->soundhw) { > =A0 =A0 =A0 =A0 =A0 =A0 flexarray_vappend(dm_args, "-soundhw", info->soun= dhw, NULL); > =A0 =A0 =A0 =A0 } > - =A0 =A0 =A0 =A0if (!info->apic) { > + =A0 =A0 =A0 =A0if (!info->acpi) { > =A0 =A0 =A0 =A0 =A0 =A0 flexarray_append(dm_args, "-no-acpi"); > =A0 =A0 =A0 =A0 } > =A0 =A0 =A0 =A0 if (info->vcpus > 1) { > diff -r 4b0692880dfa tools/libxl/xl_cmdimpl.c > --- a/tools/libxl/xl_cmdimpl.c =A0Thu May 05 17:40:34 2011 +0100 > +++ b/tools/libxl/xl_cmdimpl.c =A0Mon May 09 09:18:32 2011 +0100 > @@ -366,7 +366,7 @@ static void printf_info(int domid, > =A0 =A0 =A0 =A0 printf("\t\t\t(boot %s)\n", dm_info->boot); > =A0 =A0 =A0 =A0 printf("\t\t\t(usb %d)\n", dm_info->usb); > =A0 =A0 =A0 =A0 printf("\t\t\t(usbdevice %s)\n", dm_info->usbdevice); > - =A0 =A0 =A0 =A0printf("\t\t\t(apic %d)\n", dm_info->apic); > + =A0 =A0 =A0 =A0printf("\t\t\t(acpi %d)\n", dm_info->acpi); > =A0 =A0 =A0 =A0 printf("\t\t)\n"); > =A0 =A0 } else { > =A0 =A0 =A0 =A0 printf("\t\t(linux %d)\n", b_info->hvm); > --=20 Zhou Peng Operating System Technology Group Institute of Software, the Chinese Academy of Sciences (ISCAS)