Pat Campbell
2008-Jan-08 20:19 UTC
[Xen-devel] QEMU PV guests and xenstore_parse_domain_config()
New 3.2 QEMU PV guests are calling xenstore-parse_domain_config() opening block devices and setting watches that might not be necessary. Seems like each machine type should have it''s own specific xenstore parse routine if it needs one. I have attached a patch that adds a xenstore parse pointer into the QEMUMachine struct. main() will call that machine specific function if set otherwise calls generic xenstore-parse_domain_config. Attached patch is just something as a starting point for discussion not something I propose be applied. ---------------------------------- Some dump log traces ---------------------------------- qemu.log of PV guest running current xen-unstable tip xenstore_parse_domain_config() Change xvda to look like hda bdrv_open filename:/var/lib/xen/images/sles10-sp2-pv/disk0() bdrv_open2 filename:/var/lib/xen/images/sles10-sp2-pv/disk0() bdrv_open2 filename:/var/lib/xen/images/sles10-sp2-pv/disk0() Change xvdb to look like hdb bdrv_open filename:/home/tests/iso/sles/SLES-10-SP2-DVD-i386-Alpha2-DVD1.iso() bdrv_open2 filename:/home/tests/iso/sles/SLES-10-SP2-DVD-i386-Alpha2-DVD1.iso() bdrv_open2 filename:/home/tests/iso/sles/SLES-10-SP2-DVD-i386-Alpha2-DVD1.iso() Change xvdc to look like hdc bdrv_open filename:/dev/cdrom() bdrv_open2 filename:/dev/cdrom() Watching /local/domain/0/device-model/8/logdirty/next-active Watching /local/domain/0/device-model/8/command shift keysym 003e keycode 86 ----------------------------------- qemu.log of PV guest PV guest running current xen-unstable tip + patch xenstore_open() xen_parse_xenstore() shift keysym 003e keycode 86 ------------------------------------ qemu.log of FV guest with proposed patch ( no change ) xenstore_open() xenstore_parse_domain_config() bdrv_open filename:/var/lib/xen/images/sles10-sp2/disk0() bdrv_open2 filename:/var/lib/xen/images/sles10-sp2/disk0() bdrv_open2 filename:/var/lib/xen/images/sles10-sp2/disk0() bdrv_open filename:/home/tests/iso/sles/SLES-10-SP1-DVD-i386-RC5-DVD1.iso() bdrv_open2 filename:/home/tests/iso/sles/SLES-10-SP1-DVD-i386-RC5-DVD1.iso() bdrv_open2 filename:/home/tests/iso/sles/SLES-10-SP1-DVD-i386-RC5-DVD1.iso() bdrv_open filename:/dev/cdrom() bdrv_open2 filename:/dev/cdrom() Watching /local/domain/0/device-model/7/logdirty/next-active Watching /local/domain/0/device-model/7/command config qemu network with xen bridge for tap0 xenbr0 shift keysym 003e keycode 86 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Daniel P. Berrange
2008-Jan-08 20:31 UTC
Re: [Xen-devel] QEMU PV guests and xenstore_parse_domain_config()
On Tue, Jan 08, 2008 at 01:19:34PM -0700, Pat Campbell wrote:> > New 3.2 QEMU PV guests are calling xenstore-parse_domain_config() opening > block devices and setting watches that might not be necessary. > > Seems like each machine type should have it''s own specific xenstore parse > routine if it needs one. > > I have attached a patch that adds a xenstore parse pointer into the QEMUMachine > struct. main() will call that machine specific function if set otherwise calls > generic xenstore-parse_domain_config. Attached patch is just something as a > starting point for discussion not something I propose be applied.Since the xenstore_parse_domain_config method is doing stuff specific to HVM guests, it shoudl really be moved out of vl.c and into the init method for xenfv_machine. vl.c should only contain generic code - this must be something I missed when tidying up this code for the initial PV QEMU support. Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=| _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Daniel P. Berrange
2008-Jan-09 14:45 UTC
Re: [Xen-devel] QEMU PV guests and xenstore_parse_domain_config()
On Wed, Jan 09, 2008 at 06:44:39AM -0700, Pat Campbell wrote:> >>> On Tue, Jan 8, 2008 at 1:31 PM, in message > <20080108203102.GO21294@redhat.com>, "Daniel P. Berrange" <berrange@redhat.com> > wrote: > > On Tue, Jan 08, 2008 at 01:19:34PM - 0700, Pat Campbell wrote: > >> > >> New 3.2 QEMU PV guests are calling xenstore- parse_domain_config() opening > >> block devices and setting watches that might not be necessary. > >> > >> Seems like each machine type should have it''s own specific xenstore parse > >> routine if it needs one. > >> > >> I have attached a patch that adds a xenstore parse pointer into the > > QEMUMachine > >> struct. main() will call that machine specific function if set otherwise > > calls > >> generic xenstore- parse_domain_config. Attached patch is just something as a > >> starting point for discussion not something I propose be applied. > > > > Since the xenstore_parse_domain_config method is doing stuff specific to > > HVM guests, it shoudl really be moved out of vl.c and into the init method > > for xenfv_machine. vl.c should only contain generic code - this must be > > something I missed when tidying up this code for the initial PV QEMU > > support. > > Side effect of xenstore_parse_domain_config method is to open the > domain, setting variable xsh which is used in xenstore_read_vncpasswd() > and xenstore_write_vncport(). These are used in both machine types.Hmm, lets just have a direct call xsh = xs_daemon_open(); if (xsh == NULL) { fprintf(logfile, "Could not contact xenstore for domain config\n"); return; } in vl.c, then we ought to be able to move xenstore_parse_domain_config into the xen_machine_fv.c Regards, Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=| _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel