Patches for Xen 3.4.2
Folks,
I will tag a first release candidate for Xen 3.4.2 in the xen-3.4-testing.hg repository early next week. Please, if you are interested, take a look at what I have already backported and let me know if there is anythign further that you think should be added for this release.
Thanks,
Keir
Quoted 7 lines · Keir Fraser
Folks,
I will tag a first release candidate for Xen 3.4.2 in the xen-3.4-testing.hg repository early next week. Please, if you are interested, take a look at what I have already backported and let me know if there is anythign further that you think should be added for this release.
I think it makes sense to backport:
minios: fix minios console
minios: fix console end of line: \n\r -> \r\n
and also, if we don't get any report of regressions:
xend: destroy stubdoms synchronously
Quoted 8 lines · Stefano Stabellini
I think it makes sense to backport:
minios: fix minios console
minios: fix console end of line: \n\r -> \r\nand also, if we don't get any report of regressions:
xend: destroy stubdoms synchronously
Yeah, I tried them but they didn't apply straightforwardly. Can you please manually backport them and send me them as attachments? It's probably easy and I was just lazy. ;-)
Thanks,
Keir
Quoted 8 lines · Keir Fraser
Quoted 5 lines · Stefano Stabellini
I think it makes sense to backport:
minios: fix minios console
minios: fix console end of line: \n\r -> \r\n
Quoted 8 lines
Quoted 3 lines
and also, if we don't get any report of regressions:
xend: destroy stubdoms synchronously
Yeah, I tried them but they didn't apply straightforwardly. Can you please manually backport them and send me them as attachments? It's probably easy and I was just lazy. ;-)
I am attaching to this email the three patches backported to 3.4.
Cheers,
Stefano
extras/mini-os/console/console.c +10 -6
@@ -79,6 +79,8 @@void console_print (char *data,int length) {char *curr_char, saved_char; +char copied_str[length]; +char *copied_ptr;int part_len;int (*ring_send_fn)(const char *data,unsigned length);
@@ -87,23 +89,25 @@else ring_send_fn = xencons_ring_send; -for (curr_char = data; curr_char < data+length-1 ; curr_char++) + copied_ptr = copied_str; +memcpy (copied_ptr, data, length); +for (curr_char = copied_ptr; curr_char < copied_ptr+length-1 ; curr_char++) {if (*curr_char =='\n' ) { saved_char = *(curr_char+1 ); *(curr_char+1 ) ='\r' ; - part_len = curr_char - data +2 ; -ring_send_fn (data, part_len); + part_len = curr_char - copied_ptr +2 ; +ring_send_fn (dev, copied_ptr, part_len); *(curr_char+1 ) = saved_char; - data = curr_char+1 ; + copied_ptr = curr_char+1 ; length -= part_len -1 ; } } -ring_send_fn (data, length); +ring_send_fn (dev, copied_ptr, length); -if (data[length-1 ] =='\n' ) +if (copied_ptr[length-1 ] =='\n' )ring_send_fn ("\r" ,1 ); }
extras/mini-os/console/console.c +9 -5
@@ -79,7 +79,7 @@void console_print (char *data,int length) {char *curr_char, saved_char; -char copied_str[length]; +char copied_str[length+1 ];char *copied_ptr;int part_len;int (*ring_send_fn)(const char *data,unsigned length);
@@ -95,8 +95,9 @@ {if (*curr_char =='\n' ) { + *curr_char ='\r' ; saved_char = *(curr_char+1 ); - *(curr_char+1 ) ='\r' ; + *(curr_char+1 ) ='\n' ; part_len = curr_char - copied_ptr +2 ;ring_send_fn (dev, copied_ptr, part_len); *(curr_char+1 ) = saved_char;
@@ -104,11 +105,14 @@ length -= part_len -1 ; } } + +if (copied_ptr[length-1 ] =='\n' ) { + copied_ptr[length-1 ] ='\r' ; + copied_ptr[length] ='\n' ; + length++; + }ring_send_fn (dev, copied_ptr, length); - -if (copied_ptr[length-1 ] =='\n' ) -ring_send_fn ("\r" ,1 ); }void int direct,const char *fmt,va_list args)
stubdom/stubdom-dm +2 -6
@@ -69,12 +69,8 @@ term() { kill %1 - ( - [ -n "$vncpid" ] && kill -9 $vncpid - rm /etc/xen/stubdoms/$domname-dm - xm destroy $domname-dm - ) & - # We need to exit immediately so as to let xend do the commands above + [ -n "$vncpid" ] && kill -9 $vncpid + rm /etc/xen/stubdoms/$domname-dm exit 0 }
tools/python/xen/xend/XendDomainInfo.py +8 -0
@@ -1736,6 +1736,14 @@ def getDomid(self): return self.domid + + def getStubdomDomid(self): + dom_list = xstransact.List('/local/domain') + for d in dom_list: + target = xstransact.Read('/local/domain/' + d + '/target') + if target is not None and int(target) is self.domid : + return int(d) + return None def setName(self, name, to_store = True): self._checkName(name)
tools/python/xen/xend/image.py +5 -1
@@ -561,7 +561,11 @@ return self.sentinel_lock.acquire() try: - if self.pid: + stubdomid = self.vm.getStubdomDomid() + if stubdomid is not None : + from xen.xend import XendDomain + XendDomain.instance().domain_destroy(stubdomid) + elif self.pid: try: os.kill(self.pid, signal.SIGHUP) except OSError, exn:
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel