Tian, Kevin
2005-Dec-31 03:10 UTC
[Xen-devel] XEN/IA64 critical patch for xen-3.0.0-testing tree
Hi, Keir/Ian, Attached includes 3 critical fixes which need to be pushed into xen-3.0.0-testing. Could you please take a look and help? ;-) Thanks, Kevin =======================================This patch includes changesets critical to XEN/IA64 dom0/domU which only touches ia64 specific files and test no regression upon testing tree: (xen-unstable.hg) 8423 - generic xen0_defconfig_ia64 to run on multiple IA64 boxes (HP-ZX1 and Tiger) which are both commonly used 8413 - Fix dom0 losing virtual timer interrupt issue, which blocks multiple domains stability (xen-ia64-unstable.hg) (Following 5 changesets are all related to I/D cache sync issue, to ensure IA64 dom0 running on box with cache split. Patch is made upon 8437) 8437 8435 8434 8375 8371 linux-2.6-xen-sparse/arch/xen/configs/xen0_defconfig_ia64 | 313 ++++++++++---- xen/arch/ia64/xen/domain.c | 20 xen/arch/ia64/xen/vcpu.c | 21 xen/arch/ia64/xen/xenmisc.c | 24 + xen/include/asm-ia64/linux-xen/asm/pal.h | 6 5 files changed, 279 insertions(+), 105 deletions(-) (xen-unstable.hg) ---- 8423 # HG changeset patch # User djm@kirby.fc.hp.com # Node ID 663c487a5f2c1bee87062dfe522c4e4516a82f8e # Parent 97d70c793b67fcd93b9f44529c81d8a9e1eaad63 New default config file that works on both tiger4 and HP boxes ---- 8413 # HG changeset patch # User djm@kirby.fc.hp.com # Node ID f998426f9069aa9e4e060ceb48a3cd9cfc1231d9 # Parent dda94d6dce94447d29eaf64c53e6e6315e4ac96e Under some specific conditions, dom0 will lose guest timer interrupt. Signed-off-by Anthony Xu <anthony.xu@intel.com> Signed-off-by Kevin Tian <kevin.tian@intel.com> The reason is that Xen/ia64 will try to pend guest timer interrupt to dom0 within each machine timer interrupt handler. To avoid duplicated delivery, domain_itm_last recorded domain_itm of last injection. If two are identical, it means interrupt injected but guest has not set new itm value. Or else corresponding pending irr bit will be turned on. That works in most cases. However currently guest linux may try to set itm multiple times within one handler before turn on psr.i again. Among first few settings, new guest timer interrupt may be pended. Then once guest linux enables interrupt, a new timer interrupt will be injected immediately. However this injection may have itc still smaller than the domain_itm set at the last round of last handle. In this case, guest linux will set same domain_itm as last again. However since domain_itm_last already equals to domain_itm at last read ivr, later no guest timer interrupt can be injected any more since Xen always thinks an instance already injected without guest''s response. Attahced patch fixed this issue by adding sanity check upon guest timer vector when deciding to inject interrupt into dom0. We always compare current itc with latest domain_itm that guest really wants. So if itc < domain_itm at this point, we simply clear the pending bit and no injection. There''s also a small fix to vcpu_read_ivr, where domain_itm_last should be updated before clearing irr bit. Or els a small window still remains to add a duplicate interrupt. (xen-ia64-unstable.hg) ---- 8437 # HG changeset patch # User djm@kirby.fc.hp.com # Node ID b4925703b56c0944e304f073c3117da4f3d71ccd # Parent 5222e8d456aea9a7cf432d0d4ad8a3a7ac602c5b Missing initialization in cache sync code (by Anthony Xu) ---- 8435 # HG changeset patch # User djm@kirby.fc.hp.com # Node ID 8643b4d778f56c780d2860289d1255c80ab0b32e # Parent 40648452d45f4b9a26043c0297869c55a6912551 Leave psr.ic on in pal_cache_flush -- fixes Linux bug (by Anthony Xu) ---- 8434 # HG changeset patch # User djm@kirby.fc.hp.com # Node ID 40648452d45f4b9a26043c0297869c55a6912551 # Parent f218e6ba2653d3f2d50e11ea4b18c743d6c9127f Sync caches only on split cache machines (dynamic test instead of compile ifdef) Signed-off-by: Dan Magenheimer <dan.magenheimer@hp.com> ---- 8375 # HG changeset patch # User djm@kirby.fc.hp.com # Node ID 72f51528d55a9b99f8c7737b34bf6f370de0de7f # Parent 545ba1b126ca2f06861c3982c4da33dd310e7717 More pal_flush_cache calls for split cache machines (by Anthony Xu) ---- 8371 # HG changeset patch # User djm@kirby.fc.hp.com # Node ID e1ae4b162128f5b16c626d77c25215a37f9da6e7 # Parent 2d5c57be196d7db66157d3f820858c7acf9dbe58 Turn off ia64_pal_cache_flush for domU (temp, until failure understood) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Magenheimer, Dan (HP Labs Fort Collins)
2005-Dec-31 05:18 UTC
[Xen-devel] RE: XEN/IA64 critical patch for xen-3.0.0-testing tree
8374 would also be good to add to the list as it fixes a data corruption problem in which domU has been known to trash dom0''s disk.> -----Original Message----- > From: Tian, Kevin [mailto:kevin.tian@intel.com] > Sent: Friday, December 30, 2005 8:11 PM > To: Keir Fraser; Ian Pratt; Xen Mailing List > Cc: xen-ia64-devel@lists.xensource.com; Magenheimer, Dan (HP > Labs Fort Collins) > Subject: XEN/IA64 critical patch for xen-3.0.0-testing tree > > Hi, Keir/Ian, > Attached includes 3 critical fixes which need to be pushed into > xen-3.0.0-testing. Could you please take a look and help? ;-) > > Thanks, > Kevin > =======================================> This patch includes changesets critical to XEN/IA64 dom0/domU > which only > touches ia64 specific files and test no regression upon testing tree: > > (xen-unstable.hg) > 8423 - generic xen0_defconfig_ia64 to run on multiple IA64 > boxes (HP-ZX1 > and Tiger) which are both commonly used > 8413 - Fix dom0 losing virtual timer interrupt issue, which blocks > multiple domains stability > > (xen-ia64-unstable.hg) > (Following 5 changesets are all related to I/D cache sync issue, to > ensure IA64 dom0 running on box with cache split. Patch is made upon > 8437) > 8437 > 8435 > 8434 > 8375 > 8371 > > > linux-2.6-xen-sparse/arch/xen/configs/xen0_defconfig_ia64 | 313 > ++++++++++---- > xen/arch/ia64/xen/domain.c | 20 > xen/arch/ia64/xen/vcpu.c | 21 > xen/arch/ia64/xen/xenmisc.c | 24 + > xen/include/asm-ia64/linux-xen/asm/pal.h | 6 > 5 files changed, 279 insertions(+), 105 deletions(-) > > (xen-unstable.hg) > ---- > 8423 > # HG changeset patch > # User djm@kirby.fc.hp.com > # Node ID 663c487a5f2c1bee87062dfe522c4e4516a82f8e > # Parent 97d70c793b67fcd93b9f44529c81d8a9e1eaad63 > New default config file that works on both tiger4 and HP boxes > > ---- > 8413 > # HG changeset patch > # User djm@kirby.fc.hp.com > # Node ID f998426f9069aa9e4e060ceb48a3cd9cfc1231d9 > # Parent dda94d6dce94447d29eaf64c53e6e6315e4ac96e > Under some specific conditions, dom0 will lose guest timer interrupt. > Signed-off-by Anthony Xu <anthony.xu@intel.com> > Signed-off-by Kevin Tian <kevin.tian@intel.com> > The reason is that Xen/ia64 will try to pend guest timer interrupt to > dom0 > within each machine timer interrupt handler. To avoid duplicated > delivery, > domain_itm_last recorded domain_itm of last injection. If two are > identical, > it means interrupt injected but guest has not set new itm > value. Or else > corresponding pending irr bit will be turned on. That works in most > cases. > > However currently guest linux may try to set itm multiple times within > one > handler before turn on psr.i again. Among first few settings, > new guest > timer > interrupt may be pended. Then once guest linux enables > interrupt, a new > timer interrupt will be injected immediately. However this > injection may > have > itc still smaller than the domain_itm set at the last round of last > handle. > In this case, guest linux will set same domain_itm as last again. > However > since domain_itm_last already equals to domain_itm at last read ivr, > later > no guest timer interrupt can be injected any more since Xen always > thinks > an instance already injected without guest''s response. > > Attahced patch fixed this issue by adding sanity check upon > guest timer > vector when deciding to inject interrupt into dom0. We always compare > current > itc with latest domain_itm that guest really wants. So if itc < > domain_itm > at this point, we simply clear the pending bit and no injection. > > There''s also a small fix to vcpu_read_ivr, where > domain_itm_last should > be updated before clearing irr bit. Or els a small window > still remains > to add a duplicate interrupt. > > (xen-ia64-unstable.hg) > ---- > 8437 > # HG changeset patch > # User djm@kirby.fc.hp.com > # Node ID b4925703b56c0944e304f073c3117da4f3d71ccd > # Parent 5222e8d456aea9a7cf432d0d4ad8a3a7ac602c5b > Missing initialization in cache sync code (by Anthony Xu) > > ---- > 8435 > # HG changeset patch > # User djm@kirby.fc.hp.com > # Node ID 8643b4d778f56c780d2860289d1255c80ab0b32e > # Parent 40648452d45f4b9a26043c0297869c55a6912551 > Leave psr.ic on in pal_cache_flush -- fixes Linux bug (by Anthony Xu) > > ---- > 8434 > # HG changeset patch > # User djm@kirby.fc.hp.com > # Node ID 40648452d45f4b9a26043c0297869c55a6912551 > # Parent f218e6ba2653d3f2d50e11ea4b18c743d6c9127f > Sync caches only on split cache machines (dynamic test instead of > compile ifdef) > Signed-off-by: Dan Magenheimer <dan.magenheimer@hp.com> > > ---- > 8375 > # HG changeset patch > # User djm@kirby.fc.hp.com > # Node ID 72f51528d55a9b99f8c7737b34bf6f370de0de7f > # Parent 545ba1b126ca2f06861c3982c4da33dd310e7717 > More pal_flush_cache calls for split cache machines (by Anthony Xu) > > ---- > 8371 > # HG changeset patch > # User djm@kirby.fc.hp.com > # Node ID e1ae4b162128f5b16c626d77c25215a37f9da6e7 > # Parent 2d5c57be196d7db66157d3f820858c7acf9dbe58 > Turn off ia64_pal_cache_flush for domU (temp, until failure > understood) >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Robert Read
2006-Jan-04 01:52 UTC
Re: [Xen-devel] XEN/IA64 critical patch for xen-3.0.0-testing tree
Hi Kevin, I''m only moving changesets from xen-unstable to xen-3.0-testing, so I''ll wait until all of the changes have made it to xen-unstable before moving them across. It looks like the latest merge from xen- ia64-unstable is going through our test process now, so it should just be another day or so. Also, I''m pulling them over as individual changesets to maintain as much history as possible, so creating a patch is not strictly necessary. It is still a convenient way to review all the changes at once, of course. cheers, robert On Dec 30, 2005, at 19:10, Tian, Kevin wrote:> Hi, Keir/Ian, > Attached includes 3 critical fixes which need to be pushed into > xen-3.0.0-testing. Could you please take a look and help? ;-) > > Thanks, > Kevin > =======================================> This patch includes changesets critical to XEN/IA64 dom0/domU which > only > touches ia64 specific files and test no regression upon testing tree: > > (xen-unstable.hg) > 8423 - generic xen0_defconfig_ia64 to run on multiple IA64 boxes > (HP-ZX1 > and Tiger) which are both commonly used > 8413 - Fix dom0 losing virtual timer interrupt issue, which blocks > multiple domains stability > > (xen-ia64-unstable.hg) > (Following 5 changesets are all related to I/D cache sync issue, to > ensure IA64 dom0 running on box with cache split. Patch is made upon > 8437) > 8437 > 8435 > 8434 > 8375 > 8371 > > > linux-2.6-xen-sparse/arch/xen/configs/xen0_defconfig_ia64 | 313 > ++++++++++---- > xen/arch/ia64/xen/domain.c | 20 > xen/arch/ia64/xen/vcpu.c | 21 > xen/arch/ia64/xen/xenmisc.c | 24 + > xen/include/asm-ia64/linux-xen/asm/pal.h | 6 > 5 files changed, 279 insertions(+), 105 deletions(-) > > (xen-unstable.hg) > ---- > 8423 > # HG changeset patch > # User djm@kirby.fc.hp.com > # Node ID 663c487a5f2c1bee87062dfe522c4e4516a82f8e > # Parent 97d70c793b67fcd93b9f44529c81d8a9e1eaad63 > New default config file that works on both tiger4 and HP boxes > > ---- > 8413 > # HG changeset patch > # User djm@kirby.fc.hp.com > # Node ID f998426f9069aa9e4e060ceb48a3cd9cfc1231d9 > # Parent dda94d6dce94447d29eaf64c53e6e6315e4ac96e > Under some specific conditions, dom0 will lose guest timer interrupt. > Signed-off-by Anthony Xu <anthony.xu@intel.com> > Signed-off-by Kevin Tian <kevin.tian@intel.com> > The reason is that Xen/ia64 will try to pend guest timer interrupt to > dom0 > within each machine timer interrupt handler. To avoid duplicated > delivery, > domain_itm_last recorded domain_itm of last injection. If two are > identical, > it means interrupt injected but guest has not set new itm value. Or > else > corresponding pending irr bit will be turned on. That works in most > cases. > > However currently guest linux may try to set itm multiple times within > one > handler before turn on psr.i again. Among first few settings, new > guest > timer > interrupt may be pended. Then once guest linux enables interrupt, a > new > timer interrupt will be injected immediately. However this > injection may > have > itc still smaller than the domain_itm set at the last round of last > handle. > In this case, guest linux will set same domain_itm as last again. > However > since domain_itm_last already equals to domain_itm at last read ivr, > later > no guest timer interrupt can be injected any more since Xen always > thinks > an instance already injected without guest''s response. > > Attahced patch fixed this issue by adding sanity check upon guest > timer > vector when deciding to inject interrupt into dom0. We always compare > current > itc with latest domain_itm that guest really wants. So if itc < > domain_itm > at this point, we simply clear the pending bit and no injection. > > There''s also a small fix to vcpu_read_ivr, where domain_itm_last > should > be updated before clearing irr bit. Or els a small window still > remains > to add a duplicate interrupt. > > (xen-ia64-unstable.hg) > ---- > 8437 > # HG changeset patch > # User djm@kirby.fc.hp.com > # Node ID b4925703b56c0944e304f073c3117da4f3d71ccd > # Parent 5222e8d456aea9a7cf432d0d4ad8a3a7ac602c5b > Missing initialization in cache sync code (by Anthony Xu) > > ---- > 8435 > # HG changeset patch > # User djm@kirby.fc.hp.com > # Node ID 8643b4d778f56c780d2860289d1255c80ab0b32e > # Parent 40648452d45f4b9a26043c0297869c55a6912551 > Leave psr.ic on in pal_cache_flush -- fixes Linux bug (by Anthony Xu) > > ---- > 8434 > # HG changeset patch > # User djm@kirby.fc.hp.com > # Node ID 40648452d45f4b9a26043c0297869c55a6912551 > # Parent f218e6ba2653d3f2d50e11ea4b18c743d6c9127f > Sync caches only on split cache machines (dynamic test instead of > compile ifdef) > Signed-off-by: Dan Magenheimer <dan.magenheimer@hp.com> > > ---- > 8375 > # HG changeset patch > # User djm@kirby.fc.hp.com > # Node ID 72f51528d55a9b99f8c7737b34bf6f370de0de7f > # Parent 545ba1b126ca2f06861c3982c4da33dd310e7717 > More pal_flush_cache calls for split cache machines (by Anthony Xu) > > ---- > 8371 > # HG changeset patch > # User djm@kirby.fc.hp.com > # Node ID e1ae4b162128f5b16c626d77c25215a37f9da6e7 > # Parent 2d5c57be196d7db66157d3f820858c7acf9dbe58 > Turn off ia64_pal_cache_flush for domU (temp, until failure > understood) > <IA64_patches_for_xen_testing.patch> > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel