From builtin@ffgg.com Thu Sep 06 07:00:40 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Thu, 06 Sep 2007 07:00:40 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITHuR-0006F9-PP for www-data@colo.xensource.com; Thu, 06 Sep 2007 07:00:40 -0700 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITHuj-0004op-ND; Thu, 06 Sep 2007 14:00:57 +0000 Received: from 87-97-221-98.2072554281.ddns-catv.pl.ekk.bg ([87.97.221.98]) by lists.xensource.com with smtp (Exim 4.50) id 1ITHuQ-0001Z7-2k; Thu, 06 Sep 2007 14:00:55 +0000 Date: Thu, 06 Sep 2007 20:58:02 +0600 From: "Royal V.I.P Kasino" Message-ID: <81729355.62978202@ounce.com> To: xen-changelog@lists.xensource.com MIME-Version: 1.0 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 87.97.221.98 X-SA-Exim-Mail-From: builtin@ffgg.com Subject: =?iso-8859-1?Q?Willkommen_im_Royal_VIP_Kasino=2C_wo_der_Kunde_K=F6nig_i?= =?iso-8859-1?Q?st_=28oder_K=F6nigin=29?= X-Spam-Flag: YES X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: ***** X-Spam-Status: Yes, score=5.2 required=5.0 tests=BAYES_99,HTML_MESSAGE, MIME_HTML_ONLY,SUBJECT_ENCODED_TWICE autolearn=no version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Willkommen

Willkommen im Royal VIP Kasino, wo der Kunde König ist (oder Königin)

 

Eröffnen Sie heute ein Konto, und Sie erfahren vom ersten Tag an, was es heißt, ein VIP zu sein: mit unserem 300-%-Willkommensbonus von bis zu 300 €!

 

Sie sind noch nicht überzeugt?

- Sichere Server- und Spiele-Software

- Ansprechende Grafiken und mehr als 100 realistische Spiele

- Die größten fortlaufenden Jackpots online, gefüllt mit mehreren Millionen Euro

- Professionelle Spielerbetreuung rund um die Uhr

 

Um sich Ihren Bonus jetzt zu sichern, setzen Sie Ihre Krone auf, und werfen Sie sich in Ihre Robe: eine völlig neue, aufregende Erfahrung erwartet Sie!

 

http://iroyalcasino.com/lang-de/

From b.pcope_az@sympatico.ca Thu Sep 06 09:12:32 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Thu, 06 Sep 2007 09:12:32 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITJy4-0007wF-76 for www-data@colo.xensource.com; Thu, 06 Sep 2007 09:12:32 -0700 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITJyJ-0003qo-JN; Thu, 06 Sep 2007 16:12:47 +0000 Received: from [211.140.138.39] (helo=uswest.net) by lists.xensource.com with esmtp (Exim 4.50) id 1ITJxy-000536-Ai; Thu, 06 Sep 2007 16:12:45 +0000 MIME-Version: 1.0 Date: Thu, 06 Sep 2007 16:09:31 +0000 From: "Brice P. Cope" To: xen-users-request@lists.xensource.com, www-data@lists.xensource.com, xen-announce@lists.xensource.com, xen-changelog@lists.xensource.com, xen-devel@lists.xensource.com, xen-users@lists.xensource.com, xen-users-bounces@lists.xensource.com, patchbot-unstable@lists.xensource.com, r-users@lists.xensource.com Message-ID: <1189094971.3041@sympatico.ca> Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 211.140.138.39 X-SA-Exim-Mail-From: b.pcope_az@sympatico.ca X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: *** X-Spam-Status: No, score=3.7 required=5.0 tests=BAYES_95,BODY_ENHANCEMENT2 autolearn=no version=3.1.0 Subject: Penis Enlargement Pills - Fast and Safe xsm5u X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Dear xen-users-request@lists.xensource.com http://schsans.com Do you want Enlarge your Penis? » Gain 3+ Inches In Length. 100% Money Back Guarantee. » *3 FREE Bottles Of ManSter !! http://schsans.com Thanks Ann Vargas xen-users-request@lists.xensource.com wrote: > Penis Enlargement Pills - Fast and Safe 650tl038eo- out me now http://schsans.com/w.php From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:10:23 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:10:23 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgPX-0008Hl-3F for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:10:23 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgPd-0004Hr-5R; Fri, 07 Sep 2007 16:10:29 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgPb-0004HS-Do for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:27 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgPY-0007EY-Hi for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:25 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GA2tu011596 for ; Fri, 7 Sep 2007 09:10:02 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GA9RQ021701 for ; Fri, 7 Sep 2007 09:10:09 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GA9kt021700 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:10:09 -0700 Message-Id: <200709071610.l87GA9kt021700@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:10:09 -0700 From: "Xen patchbot-linux-2.6.18-xen" To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [linux-2.6.18-xen] [IA64] Add stop bit after brl in vdso area X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User Alex Williamson # Date 1184528286 21600 # Node ID b020961f6c1f25086fc47b16dc74724c2e3c4e96 # Parent 8257a66108c06f06d72b665cd3fb0a13c4820764 [IA64] Add stop bit after brl in vdso area This patch is catch up for upstream fix. Signed-off-by: Isaku Yamahata --- arch/ia64/kernel/gate.S | 2 ++ 1 files changed, 2 insertions(+) diff -r 8257a66108c0 -r b020961f6c1f arch/ia64/kernel/gate.S --- a/arch/ia64/kernel/gate.S Sun Jul 15 13:34:19 2007 -0600 +++ b/arch/ia64/kernel/gate.S Sun Jul 15 13:38:06 2007 -0600 @@ -57,12 +57,14 @@ .previous #define BRL_COND_XEN_SSM_I_0(pr) \ [1:](pr)brl.cond.sptk 0; \ + ;; ; \ .xdata4 ".data.patch.brl_xen_ssm_i_0", 1b-. .section ".data.patch.brl_xen_ssm_i_1", "a" .previous #define BRL_COND_XEN_SSM_I_1(pr) \ [1:](pr)brl.cond.sptk 0; \ + ;; ; \ .xdata4 ".data.patch.brl_xen_ssm_i_1", 1b-. #endif _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:10:26 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:10:26 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgPX-0008Hk-3E for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:10:23 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgPf-0004JD-BR; Fri, 07 Sep 2007 16:10:31 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgPc-0004HT-FG for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:28 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgPZ-0007Eb-Hs for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:26 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GA3jf011599 for ; Fri, 7 Sep 2007 09:10:03 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAAk8021719 for ; Fri, 7 Sep 2007 09:10:10 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GAA7o021718 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:10:10 -0700 Message-Id: <200709071610.l87GAA7o021718@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:10:09 -0700 From: "Xen patchbot-linux-2.6.18-xen" To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [linux-2.6.18-xen] [IA64] counter part of 99:f15643dab1ca X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User Alex Williamson # Date 1184528649 21600 # Node ID 34d01b3157e213516f599f11fc5379624c51a2d9 # Parent b020961f6c1f25086fc47b16dc74724c2e3c4e96 [IA64] counter part of 99:f15643dab1ca "swiotlb: Handle sync invocations on subregions of a mapped region." Signed-off-by: Isaku Yamahata --- arch/ia64/xen/swiotlb.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletion(-) diff -r b020961f6c1f -r 34d01b3157e2 arch/ia64/xen/swiotlb.c --- a/arch/ia64/xen/swiotlb.c Sun Jul 15 13:38:06 2007 -0600 +++ b/arch/ia64/xen/swiotlb.c Sun Jul 15 13:44:09 2007 -0600 @@ -336,6 +336,7 @@ map_single(struct device *hwdev, char *b unsigned long flags; char *dma_addr; unsigned int nslots, stride, index, wrap; + char *slot_buf; int i; /* @@ -402,7 +403,11 @@ map_single(struct device *hwdev, char *b * This is needed when we sync the memory. Then we sync the buffer if * needed. */ - io_tlb_orig_addr[index] = buffer; + slot_buf = buffer; + for (i = 0; i < nslots; i++) { + io_tlb_orig_addr[index + i] = slot_buf; + slot_buf += 1 << IO_TLB_SHIFT; + } if (dir == DMA_TO_DEVICE || dir == DMA_BIDIRECTIONAL) memcpy(dma_addr, buffer, size); _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:10:26 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:10:26 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgPa-0008Hq-Dl for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:10:26 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgPk-0004Lj-4A; Fri, 07 Sep 2007 16:10:36 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgPd-0004HY-J7 for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:29 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgPa-0007Ee-FW for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:27 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GA4DG011602 for ; Fri, 7 Sep 2007 09:10:04 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GABDP021736 for ; Fri, 7 Sep 2007 09:10:11 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GAB5f021735 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:10:11 -0700 Message-Id: <200709071610.l87GAB5f021735@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:10:10 -0700 From: "Xen patchbot-linux-2.6.18-xen" To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [linux-2.6.18-xen] [IA64] counter part of changeset: 93:08cf42135056 X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User Alex Williamson # Date 1184528937 21600 # Node ID bf38300f5e6360aaabe0457f7bdd344fbe43357a # Parent 34d01b3157e213516f599f11fc5379624c51a2d9 [IA64] counter part of changeset: 93:08cf42135056 "dma_map_sg() must handle multi-page segments." Signed-off-by: Isaku Yamahata --- arch/ia64/hp/common/sba_iommu.c | 2 +- arch/ia64/xen/swiotlb.c | 7 +++++-- arch/ia64/xen/xen_dma.c | 5 ++++- include/asm-ia64/hypervisor.h | 16 ---------------- include/asm-ia64/maddr.h | 16 ++++++++++++++++ 5 files changed, 26 insertions(+), 20 deletions(-) diff -r 34d01b3157e2 -r bf38300f5e63 arch/ia64/hp/common/sba_iommu.c --- a/arch/ia64/hp/common/sba_iommu.c Sun Jul 15 13:44:09 2007 -0600 +++ b/arch/ia64/hp/common/sba_iommu.c Sun Jul 15 13:48:57 2007 -0600 @@ -944,7 +944,7 @@ sba_map_single(struct device *dev, void ** Check if the PCI device can DMA to ptr... if so, just return ptr */ if (likely(pci_addr & ~to_pci_dev(dev)->dma_mask) == 0 && - !range_straddles_page_boundary(addr, size)) { + !range_straddles_page_boundary(__pa(addr), size)) { /* ** Device is bit capable of DMA'ing to the buffer... ** just return the PCI address of ptr diff -r 34d01b3157e2 -r bf38300f5e63 arch/ia64/xen/swiotlb.c --- a/arch/ia64/xen/swiotlb.c Sun Jul 15 13:44:09 2007 -0600 +++ b/arch/ia64/xen/swiotlb.c Sun Jul 15 13:48:57 2007 -0600 @@ -613,7 +613,7 @@ swiotlb_map_single(struct device *hwdev, * we can safely return the device addr and not worry about bounce * buffering it. */ - if (!range_straddles_page_boundary(ptr, size) && + if (!range_straddles_page_boundary(__pa(ptr), size) && !address_needs_mapping(hwdev, dev_addr) && !swiotlb_force) return dev_addr; @@ -786,7 +786,10 @@ swiotlb_map_sg(struct device *hwdev, str for (i = 0; i < nelems; i++, sg++) { addr = SG_ENT_VIRT_ADDRESS(sg); dev_addr = gnttab_dma_map_virt(addr); - if (swiotlb_force || address_needs_mapping(hwdev, dev_addr)) { + if (swiotlb_force || + range_straddles_page_boundary(page_to_pseudophys(sg->page) + + sg->offset, sg->length) || + address_needs_mapping(hwdev, dev_addr)) { void *map; __gnttab_dma_unmap_page(sg->page); map = map_single(hwdev, addr, sg->length, dir); diff -r 34d01b3157e2 -r bf38300f5e63 arch/ia64/xen/xen_dma.c --- a/arch/ia64/xen/xen_dma.c Sun Jul 15 13:44:09 2007 -0600 +++ b/arch/ia64/xen/xen_dma.c Sun Jul 15 13:48:57 2007 -0600 @@ -64,6 +64,9 @@ xen_map_sg(struct device *dev, struct sc sg[i].dma_length = sg[i].length; IOMMU_BUG_ON(address_needs_mapping(dev, sg[i].dma_address)); + IOMMU_BUG_ON(range_straddles_page_boundary( + page_to_pseudophys(sg[i].page) + sg[i].offset, + sg[i].length)); } return nents; @@ -136,7 +139,7 @@ xen_map_single(struct device *dev, void { dma_addr_t dma_addr = gnttab_dma_map_virt(ptr); - IOMMU_BUG_ON(range_straddles_page_boundary(ptr, size)); + IOMMU_BUG_ON(range_straddles_page_boundary(__pa(ptr), size)); IOMMU_BUG_ON(address_needs_mapping(dev, dma_addr)); return dma_addr; diff -r 34d01b3157e2 -r bf38300f5e63 include/asm-ia64/hypervisor.h --- a/include/asm-ia64/hypervisor.h Sun Jul 15 13:44:09 2007 -0600 +++ b/include/asm-ia64/hypervisor.h Sun Jul 15 13:48:57 2007 -0600 @@ -225,20 +225,4 @@ asmlinkage int xprintk(const char *fmt, #define is_initial_xendomain() 0 #endif -#ifdef CONFIG_XEN -static inline int -range_straddles_page_boundary(void *p, size_t size) -{ - extern unsigned long *contiguous_bitmap; - - if (!is_running_on_xen()) - return 0; - - return (((((unsigned long)p & ~PAGE_MASK) + size) > PAGE_SIZE) && - !test_bit(__pa(p) >> PAGE_SHIFT, contiguous_bitmap)); -} -#else -#define range_straddles_page_boundary(addr, size) (0) -#endif - #endif /* __HYPERVISOR_H__ */ diff -r 34d01b3157e2 -r bf38300f5e63 include/asm-ia64/maddr.h --- a/include/asm-ia64/maddr.h Sun Jul 15 13:44:09 2007 -0600 +++ b/include/asm-ia64/maddr.h Sun Jul 15 13:48:57 2007 -0600 @@ -107,4 +107,20 @@ typedef unsigned long paddr_t; typedef unsigned long paddr_t; #endif +#ifdef CONFIG_XEN +static inline int +range_straddles_page_boundary(paddr_t p, size_t size) +{ + extern unsigned long *contiguous_bitmap; + + if (!is_running_on_xen()) + return 0; + + return ((((p & ~PAGE_MASK) + size) > PAGE_SIZE) && + !test_bit(p >> PAGE_SHIFT, contiguous_bitmap)); +} +#else +#define range_straddles_page_boundary(addr, size) (0) +#endif + #endif /* _ASM_IA64_MADDR_H */ _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:10:33 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:10:33 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgPg-0008Ht-QS for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:10:33 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgPv-0004Rx-Ku; Fri, 07 Sep 2007 16:10:48 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgPe-0004He-Tr for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:30 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgPX-0007EX-QA for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:28 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GA160011593 for ; Fri, 7 Sep 2007 09:10:01 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GA81B021684 for ; Fri, 7 Sep 2007 09:10:08 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GA8wu021683 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:10:08 -0700 Message-Id: <200709071610.l87GA8wu021683@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:10:07 -0700 From: "Xen patchbot-linux-2.6.18-xen" To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [linux-2.6.18-xen] [IA64] Fix vdso paravirtualization. X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User Alex Williamson # Date 1184528059 21600 # Node ID 8257a66108c06f06d72b665cd3fb0a13c4820764 # Parent 86ac3059ab675a1c80ab02be513afb57b5e63efa [IA64] Fix vdso paravirtualization. When on baremetal, xen address must not be referenced. Signed-off-by: Isaku Yamahata --- arch/ia64/kernel/gate.S | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff -r 86ac3059ab67 -r 8257a66108c0 arch/ia64/kernel/gate.S --- a/arch/ia64/kernel/gate.S Tue Jul 10 11:18:07 2007 -0600 +++ b/arch/ia64/kernel/gate.S Sun Jul 15 13:34:19 2007 -0600 @@ -129,17 +129,17 @@ GLOBAL_ENTRY(__kernel_syscall_via_epc) LOAD_RUNNING_ON_XEN(r28) movl r22=XSI_PSR_I_ADDR ;; - ld8 r22=[r22] - ;; movl r23=XSI_PSR_IC - adds r24=-1,r22 mov r20=1 ;; ld4 r30=[r28] ;; cmp.ne isXen,isRaw=r0,r30 ;; +(isXen) ld8 r22=[r22] + ;; (isRaw) rsm psr.be | psr.i +(isXen) adds r24=-1,r22 (isXen) st1 [r22]=r20 (isXen) rum psr.be ;; _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:10:52 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:10:52 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgPz-0008Hy-UL for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:10:52 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgQI-0004Yd-Ar; Fri, 07 Sep 2007 16:11:10 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgPg-0004If-J5 for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:32 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgPb-0007Ej-QU for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:30 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GA5rI011605 for ; Fri, 7 Sep 2007 09:10:05 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GACxZ021754 for ; Fri, 7 Sep 2007 09:10:12 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GACxN021753 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:10:12 -0700 Message-Id: <200709071610.l87GACxN021753@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:10:11 -0700 From: "Xen patchbot-linux-2.6.18-xen" To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [linux-2.6.18-xen] [IA64] Trivial compilation fix when CONFIG_XEN=n X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User Alex Williamson # Date 1184881559 21600 # Node ID dc1cdd6bbbf2365f6e6c8fff63358280e528b95b # Parent bf38300f5e6360aaabe0457f7bdd344fbe43357a [IA64] Trivial compilation fix when CONFIG_XEN=n Signed-off-by: Isaku Yamahata --- arch/ia64/hp/common/sba_iommu.c | 1 + arch/ia64/kernel/perfmon.c | 5 ++++- arch/ia64/kernel/time.c | 1 + arch/ia64/oprofile/init.c | 1 + arch/ia64/oprofile/oprofile_perfmon.h | 4 +++- include/asm-ia64/page.h | 7 ++++--- 6 files changed, 14 insertions(+), 5 deletions(-) diff -r bf38300f5e63 -r dc1cdd6bbbf2 arch/ia64/hp/common/sba_iommu.c --- a/arch/ia64/hp/common/sba_iommu.c Sun Jul 15 13:48:57 2007 -0600 +++ b/arch/ia64/hp/common/sba_iommu.c Thu Jul 19 15:45:59 2007 -0600 @@ -42,6 +42,7 @@ #include /* wmb() */ #include +#include /* range_straddles_page_boundary() */ #ifdef CONFIG_XEN #include #include diff -r bf38300f5e63 -r dc1cdd6bbbf2 arch/ia64/kernel/perfmon.c --- a/arch/ia64/kernel/perfmon.c Sun Jul 15 13:48:57 2007 -0600 +++ b/arch/ia64/kernel/perfmon.c Thu Jul 19 15:45:59 2007 -0600 @@ -52,6 +52,7 @@ #include #ifdef CONFIG_PERFMON +#include #ifdef CONFIG_XEN //#include #include @@ -71,7 +72,9 @@ static int xenoprof_is_primary = 0; #define init_xenoprof_primary(is_primary) do { } while (0) #define is_xenoprof_primary() (0) #define XEN_NOT_SUPPORTED_YET do { } while (0) -#define HYPERVISOR_perfmon_op(cmd, arg, count) do { } while (0) +#define HYPERVISOR_perfmon_op(cmd, arg, count) (0) +#define HYPERVISOR_xenoprof_op(op, arg) ({(void)arg;0;}) +struct xenoprof_init { /* dummy */ }; #endif /* diff -r bf38300f5e63 -r dc1cdd6bbbf2 arch/ia64/kernel/time.c --- a/arch/ia64/kernel/time.c Sun Jul 15 13:48:57 2007 -0600 +++ b/arch/ia64/kernel/time.c Thu Jul 19 15:45:59 2007 -0600 @@ -29,6 +29,7 @@ #include #include +#include #ifdef CONFIG_XEN #include #include diff -r bf38300f5e63 -r dc1cdd6bbbf2 arch/ia64/oprofile/init.c --- a/arch/ia64/oprofile/init.c Sun Jul 15 13:48:57 2007 -0600 +++ b/arch/ia64/oprofile/init.c Thu Jul 19 15:45:59 2007 -0600 @@ -11,6 +11,7 @@ #include #include #include +#include #include "oprofile_perfmon.h" extern int perfmon_init(struct oprofile_operations * ops); diff -r bf38300f5e63 -r dc1cdd6bbbf2 arch/ia64/oprofile/oprofile_perfmon.h --- a/arch/ia64/oprofile/oprofile_perfmon.h Sun Jul 15 13:48:57 2007 -0600 +++ b/arch/ia64/oprofile/oprofile_perfmon.h Thu Jul 19 15:45:59 2007 -0600 @@ -2,10 +2,12 @@ #define OPROFILE_PERFMON_H #ifdef CONFIG_PERFMON +#ifdef CONFIG_XEN int __perfmon_init(void); void __perfmon_exit(void); int perfmon_start(void); void perfmon_stop(void); +#endif #else #define __perfmon_init() (-ENOSYS) #define __perfmon_exit() do {} while (0) @@ -21,7 +23,7 @@ extern void xenoprofile_exit(void); #define STATIC_IF_NO_XEN static #define xen_perfmon_init() (-ENOSYS) #define xen_perfmon_exit() do {} while (0) -#define xenoprofile_init() (-ENOSYS) +#define xenoprofile_init(ops) (-ENOSYS) #define xenoprofile_exit() do {} while (0) #endif /* CONFIG_XEN */ diff -r bf38300f5e63 -r dc1cdd6bbbf2 include/asm-ia64/page.h --- a/include/asm-ia64/page.h Sun Jul 15 13:48:57 2007 -0600 +++ b/include/asm-ia64/page.h Thu Jul 19 15:45:59 2007 -0600 @@ -231,11 +231,12 @@ get_order (unsigned long size) ? VM_EXEC : 0)) #ifndef __ASSEMBLY__ + +#include +#include /* to compile ioremap.c */ + #ifdef CONFIG_XEN -#include -#include -#include // to compile netback, netfront #include #define arch_free_page(_page, _order) \ _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:10:54 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:10:54 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgQ2-0008Hz-H5 for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:10:54 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgQK-0004bg-VJ; Fri, 07 Sep 2007 16:11:13 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgPk-0004Kf-Us for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:37 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgPf-0007Eu-Dw for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:34 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GA9qJ011614 for ; Fri, 7 Sep 2007 09:10:09 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAGxF021815 for ; Fri, 7 Sep 2007 09:10:16 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GAGWh021814 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:10:16 -0700 Message-Id: <200709071610.l87GAGWh021814@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:10:15 -0700 From: "Xen patchbot-linux-2.6.18-xen" To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [linux-2.6.18-xen] [IA64] Fix Linux VGA autodetection X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User Alex Williamson # Date 1185390988 21600 # Node ID a504ee7aae902a1c9ab5d9d270433603cecd6750 # Parent b3ac98591e60cdea898aa0357c8da1334b6e26c8 [IA64] Fix Linux VGA autodetection This patch re-orders setup_arch in xenlinux slightly. This allows us to check if conswitchp was setup early by the HCDP code to point to a VGA console. Also fix a bug w/ zero'ing the preferred console name string. Signed-off-by: Alex Williamson --- arch/ia64/kernel/setup.c | 51 +++++++++++++++++++++++------------------------ 1 files changed, 25 insertions(+), 26 deletions(-) diff -r b3ac98591e60 -r a504ee7aae90 arch/ia64/kernel/setup.c --- a/arch/ia64/kernel/setup.c Wed Jul 25 13:07:30 2007 -0600 +++ b/arch/ia64/kernel/setup.c Wed Jul 25 13:16:28 2007 -0600 @@ -526,22 +526,6 @@ setup_arch (char **cmdline_p) acpi_boot_init(); #endif -#ifdef CONFIG_VT - if (!conswitchp) { -# if defined(CONFIG_DUMMY_CONSOLE) - conswitchp = &dummy_con; -# endif -# if defined(CONFIG_VGA_CONSOLE) - /* - * Non-legacy systems may route legacy VGA MMIO range to system - * memory. vga_con probes the MMIO hole, so memory looks like - * a VGA device to it. The EFI memory map can tell us if it's - * memory so we can avoid this problem. - */ - if (efi_mem_type(0xA0000) != EFI_CONVENTIONAL_MEMORY) - conswitchp = &vga_con; -# endif - } #ifdef CONFIG_XEN if (is_running_on_xen()) { shared_info_t *s = HYPERVISOR_shared_info; @@ -552,12 +536,6 @@ setup_arch (char **cmdline_p) "flags=0x%x\n", s->arch.start_info_pfn, xen_start_info->nr_pages, xen_start_info->flags); - if (!is_initial_xendomain()) { -#if !defined(CONFIG_VT) || !defined(CONFIG_DUMMY_CONSOLE) - conswitchp = NULL; -#endif - } - /* * If a console= is NOT specified, we assume using the * xencons console is desired. By default, this is ttyS0 @@ -567,7 +545,8 @@ setup_arch (char **cmdline_p) char *p, *q, name[5]; int offset = 0; - if (is_initial_xendomain()) + memset(name, 0, sizeof(name)); + if (is_initial_xendomain() && conswitchp != &vga_con) strncpy(name, "ttyS", 4); else strncpy(name, "tty", 3); @@ -599,13 +578,33 @@ setup_arch (char **cmdline_p) } xencons_early_setup(); #endif -#endif - + +#ifdef CONFIG_VT + if (!conswitchp) { +# if defined(CONFIG_DUMMY_CONSOLE) + conswitchp = &dummy_con; +# endif +# if defined(CONFIG_VGA_CONSOLE) + /* + * Non-legacy systems may route legacy VGA MMIO range to system + * memory. vga_con probes the MMIO hole, so memory looks like + * a VGA device to it. The EFI memory map can tell us if it's + * memory so we can avoid this problem. + */ + if (efi_mem_type(0xA0000) != EFI_CONVENTIONAL_MEMORY) + conswitchp = &vga_con; +# endif + } +#endif /* enable IA-64 Machine Check Abort Handling unless disabled */ #ifdef CONFIG_XEN - if (is_running_on_xen() && !is_initial_xendomain()) + if (is_running_on_xen() && !is_initial_xendomain()) { nomca = 1; +#if !defined(CONFIG_VT) || !defined(CONFIG_DUMMY_CONSOLE) + conswitchp = NULL; +#endif + } #endif if (!nomca) ia64_mca_init(); _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:10:59 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:10:59 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgQ6-0008I4-Uz for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:10:59 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgQP-0004fY-FA; Fri, 07 Sep 2007 16:11:17 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgPk-0004KV-Uq for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:37 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgPe-0007Eq-EA for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:33 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GA8Dw011611 for ; Fri, 7 Sep 2007 09:10:08 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAFat021795 for ; Fri, 7 Sep 2007 09:10:15 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GAFBm021794 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:10:15 -0700 Message-Id: <200709071610.l87GAFBm021794@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:10:14 -0700 From: "Xen patchbot-linux-2.6.18-xen" To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [linux-2.6.18-xen] [IA64] Fix swiotlb_dma_supported X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User Alex Williamson # Date 1185390450 21600 # Node ID b3ac98591e60cdea898aa0357c8da1334b6e26c8 # Parent b64323b3a96337535f16e69d17a46086d069d941 [IA64] Fix swiotlb_dma_supported CD/DVD-ROM on recent Dom0 is not available. After some investigation, IDE controller is disabled by reason that io_tlb_end is out of bounds. Signed-off-by: Kouya Shimura --- arch/ia64/xen/swiotlb.c | 4 ++++ 1 files changed, 4 insertions(+) diff -r b64323b3a963 -r b3ac98591e60 arch/ia64/xen/swiotlb.c --- a/arch/ia64/xen/swiotlb.c Thu Jul 19 16:02:02 2007 -0600 +++ b/arch/ia64/xen/swiotlb.c Wed Jul 25 13:07:30 2007 -0600 @@ -882,7 +882,11 @@ int int swiotlb_dma_supported (struct device *hwdev, u64 mask) { +#ifdef CONFIG_XEN + return (virt_to_bus(io_tlb_end - 1)) <= mask; +#else return (virt_to_bus(io_tlb_end) - 1) <= mask; +#endif } EXPORT_SYMBOL(swiotlb_init); _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:11:04 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:11:04 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgQB-0008I8-PT for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:11:04 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgQU-0004ju-7b; Fri, 07 Sep 2007 16:11:22 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgPn-0004MY-IN for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:39 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgPj-0007FA-Cg for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:37 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GADIp011623 for ; Fri, 7 Sep 2007 09:10:13 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAKEn021870 for ; Fri, 7 Sep 2007 09:10:20 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GAKBN021869 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:10:20 -0700 Message-Id: <200709071610.l87GAKBN021869@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:10:19 -0700 From: "Xen patchbot-linux-2.6.18-xen" To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [linux-2.6.18-xen] [IA64] Revert paravirtualization to ioremap /proc/pci X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User Alex Williamson # Date 1185814315 21600 # Node ID 6d84769b52563c8ecdbe3ee001befcbfbbf6bfcd # Parent b0bf9ba32bfe341af07da97d57572659c920fd30 [IA64] Revert paravirtualization to ioremap /proc/pci Signed-off-by: Jun Kamada --- arch/ia64/pci/pci.c | 16 ---------------- 1 files changed, 16 deletions(-) diff -r b0bf9ba32bfe -r 6d84769b5256 arch/ia64/pci/pci.c --- a/arch/ia64/pci/pci.c Fri Jul 27 08:15:50 2007 -0600 +++ b/arch/ia64/pci/pci.c Mon Jul 30 10:51:55 2007 -0600 @@ -612,14 +612,6 @@ pci_mmap_page_range (struct pci_dev *dev else vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); - if (is_initial_xendomain()) { - unsigned long addr = vma->vm_pgoff << PAGE_SHIFT; - size_t size = vma->vm_end - vma->vm_start; - unsigned long offset = HYPERVISOR_ioremap(addr, size); - if (IS_ERR_VALUE(offset)) - return offset; - } - if (remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, vma->vm_end - vma->vm_start, vma->vm_page_prot)) return -EAGAIN; @@ -676,14 +668,6 @@ pci_mmap_legacy_page_range(struct pci_bu vma->vm_pgoff += (unsigned long)addr >> PAGE_SHIFT; vma->vm_page_prot = prot; - - if (is_initial_xendomain()) { - unsigned long addr = vma->vm_pgoff << PAGE_SHIFT; - size_t size = vma->vm_end - vma->vm_start; - unsigned long offset = HYPERVISOR_ioremap(addr, size); - if (IS_ERR_VALUE(offset)) - return offset; - } if (remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, size, vma->vm_page_prot)) _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:11:07 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:11:07 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgQF-0008Ih-DD for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:11:07 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgQX-0004nS-T7; Fri, 07 Sep 2007 16:11:25 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgPo-0004NJ-QP for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:41 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgPg-0007Ew-H7 for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:38 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAAgk011617 for ; Fri, 7 Sep 2007 09:10:10 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAHUa021835 for ; Fri, 7 Sep 2007 09:10:17 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GAHFr021833 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:10:17 -0700 Message-Id: <200709071610.l87GAHFr021833@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:10:16 -0700 From: "Xen patchbot-linux-2.6.18-xen" To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, UPPERCASE_25_50 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [linux-2.6.18-xen] [IA64] defconfig update X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User Alex Williamson # Date 1185482030 21600 # Node ID e6974eba1baec726ca1a97d076f0bf8428096bc2 # Parent a504ee7aae902a1c9ab5d9d270433603cecd6750 [IA64] defconfig update Remove Radeon framebuffer, even if you have a radeon VGA, you don't necessarily want the framebuffer. Add framebuffer console support for pvfb. Other changes pulled in automatically from make oldconfig. Signed-off-by: Alex Williamson --- buildconfigs/linux-defconfig_xen0_ia64 | 16 ++++++++++------ buildconfigs/linux-defconfig_xenU_ia64 | 16 ++++++++++------ buildconfigs/linux-defconfig_xen_ia64 | 16 ++++++++++------ 3 files changed, 30 insertions(+), 18 deletions(-) diff -r a504ee7aae90 -r e6974eba1bae buildconfigs/linux-defconfig_xen0_ia64 --- a/buildconfigs/linux-defconfig_xen0_ia64 Wed Jul 25 13:16:28 2007 -0600 +++ b/buildconfigs/linux-defconfig_xen0_ia64 Thu Jul 26 14:33:50 2007 -0600 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.18 -# Thu Jun 14 19:17:08 2007 +# Wed Jul 25 14:56:03 2007 # CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" @@ -347,7 +347,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y # CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set +CONFIG_SYS_HYPERVISOR=y # # Connector - unified userspace <-> kernelspace linker @@ -1039,9 +1039,7 @@ CONFIG_FB_MODE_HELPERS=y # CONFIG_FB_NVIDIA is not set # CONFIG_FB_RIVA is not set # CONFIG_FB_MATROX is not set -CONFIG_FB_RADEON=y -CONFIG_FB_RADEON_I2C=y -CONFIG_FB_RADEON_DEBUG=y +# CONFIG_FB_RADEON is not set # CONFIG_FB_ATY128 is not set # CONFIG_FB_ATY is not set # CONFIG_FB_SAVAGE is not set @@ -1059,7 +1057,11 @@ CONFIG_VGA_CONSOLE=y CONFIG_VGA_CONSOLE=y # CONFIG_VGACON_SOFT_SCROLLBACK is not set CONFIG_DUMMY_CONSOLE=y -# CONFIG_FRAMEBUFFER_CONSOLE is not set +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set +# CONFIG_FONTS is not set +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y # # Logo configuration @@ -1683,3 +1685,5 @@ CONFIG_XEN_COMPAT=0x030002 CONFIG_XEN_COMPAT=0x030002 CONFIG_HAVE_IRQ_IGNORE_UNHANDLED=y CONFIG_NO_IDLE_HZ=y +CONFIG_XEN_BALLOON=y +CONFIG_XEN_DEVMEM=y diff -r a504ee7aae90 -r e6974eba1bae buildconfigs/linux-defconfig_xenU_ia64 --- a/buildconfigs/linux-defconfig_xenU_ia64 Wed Jul 25 13:16:28 2007 -0600 +++ b/buildconfigs/linux-defconfig_xenU_ia64 Thu Jul 26 14:33:50 2007 -0600 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.18 -# Sun May 6 22:07:34 2007 +# Wed Jul 25 14:56:44 2007 # CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" @@ -322,7 +322,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set # CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set +CONFIG_SYS_HYPERVISOR=y # # Connector - unified userspace <-> kernelspace linker @@ -908,9 +908,7 @@ CONFIG_FB_MODE_HELPERS=y # CONFIG_FB_NVIDIA is not set # CONFIG_FB_RIVA is not set # CONFIG_FB_MATROX is not set -CONFIG_FB_RADEON=y -CONFIG_FB_RADEON_I2C=y -CONFIG_FB_RADEON_DEBUG=y +# CONFIG_FB_RADEON is not set # CONFIG_FB_ATY128 is not set # CONFIG_FB_ATY is not set # CONFIG_FB_SAVAGE is not set @@ -928,7 +926,11 @@ CONFIG_VGA_CONSOLE=y CONFIG_VGA_CONSOLE=y # CONFIG_VGACON_SOFT_SCROLLBACK is not set CONFIG_DUMMY_CONSOLE=y -# CONFIG_FRAMEBUFFER_CONSOLE is not set +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set +# CONFIG_FONTS is not set +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y # # Logo configuration @@ -1493,3 +1495,5 @@ CONFIG_XEN_COMPAT=0x030002 CONFIG_XEN_COMPAT=0x030002 CONFIG_HAVE_IRQ_IGNORE_UNHANDLED=y CONFIG_NO_IDLE_HZ=y +CONFIG_XEN_BALLOON=y +CONFIG_XEN_DEVMEM=y diff -r a504ee7aae90 -r e6974eba1bae buildconfigs/linux-defconfig_xen_ia64 --- a/buildconfigs/linux-defconfig_xen_ia64 Wed Jul 25 13:16:28 2007 -0600 +++ b/buildconfigs/linux-defconfig_xen_ia64 Thu Jul 26 14:33:50 2007 -0600 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.18 -# Thu Jun 14 19:16:35 2007 +# Wed Jul 25 14:55:11 2007 # CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" @@ -347,7 +347,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y # CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set +CONFIG_SYS_HYPERVISOR=y # # Connector - unified userspace <-> kernelspace linker @@ -1039,9 +1039,7 @@ CONFIG_FB_MODE_HELPERS=y # CONFIG_FB_NVIDIA is not set # CONFIG_FB_RIVA is not set # CONFIG_FB_MATROX is not set -CONFIG_FB_RADEON=y -CONFIG_FB_RADEON_I2C=y -CONFIG_FB_RADEON_DEBUG=y +# CONFIG_FB_RADEON is not set # CONFIG_FB_ATY128 is not set # CONFIG_FB_ATY is not set # CONFIG_FB_SAVAGE is not set @@ -1059,7 +1057,11 @@ CONFIG_VGA_CONSOLE=y CONFIG_VGA_CONSOLE=y # CONFIG_VGACON_SOFT_SCROLLBACK is not set CONFIG_DUMMY_CONSOLE=y -# CONFIG_FRAMEBUFFER_CONSOLE is not set +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set +# CONFIG_FONTS is not set +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y # # Logo configuration @@ -1683,3 +1685,5 @@ CONFIG_XEN_COMPAT=0x030002 CONFIG_XEN_COMPAT=0x030002 CONFIG_HAVE_IRQ_IGNORE_UNHANDLED=y CONFIG_NO_IDLE_HZ=y +CONFIG_XEN_BALLOON=y +CONFIG_XEN_DEVMEM=y _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:11:12 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:11:12 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgQJ-0008Ik-Q3 for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:11:12 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgQc-0004rI-AE; Fri, 07 Sep 2007 16:11:30 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgPp-0004Nb-O4 for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:41 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgPm-0007FL-74 for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:39 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAG6O011632 for ; Fri, 7 Sep 2007 09:10:16 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GANgA021923 for ; Fri, 7 Sep 2007 09:10:23 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GANeJ021922 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:10:23 -0700 Message-Id: <200709071610.l87GANeJ021922@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:10:22 -0700 From: "Xen patchbot-linux-2.6.18-xen" To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [linux-2.6.18-xen] [IA64] Mark resource list functions __devinit X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User Alex Williamson # Date 1185814984 21600 # Node ID e92816da20760df8b8716bbd14f0aec3d2729264 # Parent 8f0c93df3e113058f0b582b06ce7d3d897ccc9d6 [IA64] Mark resource list functions __devinit Signed-off-by: Alex Williamson --- arch/ia64/pci/pci.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff -r 8f0c93df3e11 -r e92816da2076 arch/ia64/pci/pci.c --- a/arch/ia64/pci/pci.c Mon Jul 30 11:01:27 2007 -0600 +++ b/arch/ia64/pci/pci.c Mon Jul 30 11:03:04 2007 -0600 @@ -347,7 +347,7 @@ pcibios_setup_root_windows(struct pci_bu } #ifdef CONFIG_XEN -static void +static void __devinit __cleanup_issue_list(struct list_head *top) { ioremap_issue_list_t *ptr, *tmp_ptr; @@ -358,7 +358,7 @@ __cleanup_issue_list(struct list_head *t } } -static int +static int __devinit __add_issue_list(unsigned long start, unsigned long end, struct list_head *top) { ioremap_issue_list_t *ptr, *new; @@ -416,7 +416,7 @@ __add_issue_list(unsigned long start, un return 0; } -static int +static int __devinit __make_issue_list(struct resource *ptr, struct list_head *top) { int ret; @@ -441,7 +441,7 @@ __make_issue_list(struct resource *ptr, return 0; } -static void +static void __devinit __compress_issue_list(struct list_head *top) { ioremap_issue_list_t *ptr, *tmp_ptr, *next; @@ -467,7 +467,7 @@ __compress_issue_list(struct list_head * } } -static int +static int __devinit __issue_ioremap(struct list_head *top) { ioremap_issue_list_t *ptr, *tmp_ptr; @@ -489,7 +489,7 @@ __issue_ioremap(struct list_head *top) return 0; } -static int +static int __devinit do_ioremap_on_resource_list(struct resource *top) { LIST_HEAD(ioremap_issue_list_top); _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:11:16 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:11:16 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgQO-0008In-3o for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:11:16 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgQg-0004ut-Gp; Fri, 07 Sep 2007 16:11:34 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgPr-0004OL-BD for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:43 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgPn-0007FN-4B for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:40 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAHtL011635 for ; Fri, 7 Sep 2007 09:10:17 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAOOI021940 for ; Fri, 7 Sep 2007 09:10:24 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GAOZo021939 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:10:24 -0700 Message-Id: <200709071610.l87GAOZo021939@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:10:23 -0700 From: "Xen patchbot-linux-2.6.18-xen" To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [linux-2.6.18-xen] [IA64] Fix xen_ssm_i() X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User Alex Williamson # Date 1185815155 21600 # Node ID 0f9032c33df4d7595f87358775b4694d740da583 # Parent e92816da20760df8b8716bbd14f0aec3d2729264 [IA64] Fix xen_ssm_i() Otherwise interruption may not be delivered. Signed-off-by: Isaku Yamahata --- arch/ia64/kernel/gate.S | 18 +++++++++--------- include/asm-ia64/xen/privop.h | 10 ++++------ 2 files changed, 13 insertions(+), 15 deletions(-) diff -r e92816da2076 -r 0f9032c33df4 arch/ia64/kernel/gate.S --- a/arch/ia64/kernel/gate.S Mon Jul 30 11:03:04 2007 -0600 +++ b/arch/ia64/kernel/gate.S Mon Jul 30 11:05:55 2007 -0600 @@ -149,16 +149,16 @@ GLOBAL_ENTRY(__kernel_syscall_via_epc) (p6) tbit.z.unc p8,p0=r18,0 // I0 (dual-issues with "mov b7=r18"!) #ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT -#define XEN_SET_PSR_I(pr) \ -(pr) ld1 r31=[r22]; \ -(pr) ld1 r25=[r24]; \ - ;; \ -(pr) st1 [r22]=r0; \ -(pr) cmp.ne.unc p14,p0=r0,r31; \ - ;; \ +#define XEN_SET_PSR_I(pred) \ +(pred) ld1 r31=[r22]; \ + ;; ; \ +(pred) st1 [r22]=r0; \ +(pred) cmp.ne.unc p14,p0=r0,r31; \ + ;; ; \ +(p14) ld1 r25=[r24]; \ + ;; ; \ (p14) cmp.ne.unc p11,p0=r0,r25; \ - ;; \ -(p11) st1 [r22]=r20; \ + ;; ; \ (p11) XEN_HYPER_SSM_I; ;; diff -r e92816da2076 -r 0f9032c33df4 include/asm-ia64/xen/privop.h --- a/include/asm-ia64/xen/privop.h Mon Jul 30 11:03:04 2007 -0600 +++ b/include/asm-ia64/xen/privop.h Mon Jul 30 11:05:55 2007 -0600 @@ -238,12 +238,10 @@ extern void xen_set_eflag(unsigned long) #define xen_ssm_i() \ ({ \ int old = xen_get_virtual_psr_i(); \ - if (!old) { \ - if (xen_get_virtual_pend()) \ - xen_hyper_ssm_i(); \ - else \ - xen_set_virtual_psr_i(1); \ - } \ + xen_set_virtual_psr_i(1); \ + barrier(); \ + if (!old && xen_get_virtual_pend()) \ + xen_hyper_ssm_i(); \ }) #define xen_ia64_intrin_local_irq_restore(x) \ _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:11:21 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:11:21 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgQT-0008Iq-7k for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:11:21 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgQl-0004zE-Pe; Fri, 07 Sep 2007 16:11:39 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgPr-0004OR-Ix for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:44 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgPl-0007FG-BH for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:41 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAFYV011629 for ; Fri, 7 Sep 2007 09:10:15 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAM8P021906 for ; Fri, 7 Sep 2007 09:10:22 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GAMog021905 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:10:22 -0700 Message-Id: <200709071610.l87GAMog021905@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:10:21 -0700 From: "Xen patchbot-linux-2.6.18-xen" To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [linux-2.6.18-xen] [IA64] Issue ioremap hypercall in pci_acpi_scan_root() X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User Alex Williamson # Date 1185814887 21600 # Node ID 8f0c93df3e113058f0b582b06ce7d3d897ccc9d6 # Parent f017328288ea42600509b62882f687d7331ce194 [IA64] Issue ioremap hypercall in pci_acpi_scan_root() This setups up mapping in /dev/mem. Signed-off-by: Jun Kamada --- arch/ia64/pci/pci.c | 184 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 184 insertions(+) diff -r f017328288ea -r 8f0c93df3e11 arch/ia64/pci/pci.c --- a/arch/ia64/pci/pci.c Mon Jul 30 10:53:36 2007 -0600 +++ b/arch/ia64/pci/pci.c Mon Jul 30 11:01:27 2007 -0600 @@ -29,6 +29,15 @@ #include #include #include + +#ifdef CONFIG_XEN +struct ioremap_issue_list { + struct list_head listp; + unsigned long start; + unsigned long end; +}; +typedef struct ioremap_issue_list ioremap_issue_list_t; +#endif /* CONFIG_XEN */ /* * Low-level SAL-based PCI configuration access functions. Note that SAL @@ -337,6 +346,169 @@ pcibios_setup_root_windows(struct pci_bu } } +#ifdef CONFIG_XEN +static void +__cleanup_issue_list(struct list_head *top) +{ + ioremap_issue_list_t *ptr, *tmp_ptr; + + list_for_each_entry_safe(ptr, tmp_ptr, top, listp) { + list_del(&(ptr->listp)); + kfree(ptr); + } +} + +static int +__add_issue_list(unsigned long start, unsigned long end, struct list_head *top) +{ + ioremap_issue_list_t *ptr, *new; + + if (start > end) { + printk(KERN_ERR "%s: Internal error (start addr > end addr)\n", + __FUNCTION__); + return 0; + } + + /* + * Head of the resource structure list contains + * dummy val.(start=0, end=~0), so skip it + */ + if ((start == 0) && (end == ~0)) + return 0; + + start &= PAGE_MASK; + end |= ~PAGE_MASK; + + /* We can merge specified address range into existing entry */ + list_for_each_entry(ptr, top, listp) { + if ((ptr->start > end + 1) || (ptr->end + 1 < start)) + continue; + ptr->start = min(start, ptr->start); + ptr->end = max(end, ptr->end); + return 0; + } + + /* We could not merge, so create new entry */ + new = kmalloc(sizeof(ioremap_issue_list_t), GFP_KERNEL); + if (new == NULL) { + printk(KERN_ERR "%s: Could not allocate memory. " + "HYPERVISOR_ioremap will not be issued\n", + __FUNCTION__); + return -ENOMEM; + } + + new->start = start; + new->end = end; + + /* Insert the new entry to the list by ascending order */ + if (list_empty(top)) { + list_add_tail(&(new->listp), top); + return 0; + } + list_for_each_entry(ptr, top, listp) { + if (new->start > ptr->start) + continue; + list_add(&(new->listp), ((struct list_head *)ptr)->prev); + return 0; + } + list_add_tail(&(new->listp), top); + + return 0; +} + +static int +__make_issue_list(struct resource *ptr, struct list_head *top) +{ + int ret; + + if (ptr->child) { + ret = __make_issue_list(ptr->child, top); + if (ret) + return ret; + } + if (ptr->sibling) { + ret = __make_issue_list(ptr->sibling, top); + if (ret) + return ret; + } + + if (ptr->flags & IORESOURCE_MEM) { + ret = __add_issue_list(ptr->start, ptr->end, top); + if (ret) + return ret; + } + + return 0; +} + +static void +__compress_issue_list(struct list_head *top) +{ + ioremap_issue_list_t *ptr, *tmp_ptr, *next; + int compressed; + + /* + * Merge adjacent entries, if overlapped + * (entries are sorted by ascending order) + */ + list_for_each_entry_safe(ptr, tmp_ptr, top, listp) { + if (list_is_last((struct list_head *)ptr, top)) + continue; + + next = (ioremap_issue_list_t *) + (((struct list_head *)ptr)->next); + if (next->start <= (ptr->end) + 1) { + next->start = min(ptr->start, next->start); + next->end = max(ptr->end, next->end); + + list_del(&(ptr->listp)); + kfree(ptr); + } + } +} + +static int +__issue_ioremap(struct list_head *top) +{ + ioremap_issue_list_t *ptr, *tmp_ptr; + unsigned int offset; + + list_for_each_entry_safe(ptr, tmp_ptr, top, listp) { + offset = HYPERVISOR_ioremap(ptr->start, + ptr->end - ptr->start + 1); + if (offset == ~0) { + printk(KERN_ERR "%s: HYPERVISOR_ioremap() failed. " + "Address Range: 0x%016lx-0x%016lx\n", + __FUNCTION__, ptr->start, ptr->end); + } + + list_del(&(ptr->listp)); + kfree(ptr); + } + + return 0; +} + +static int +do_ioremap_on_resource_list(struct resource *top) +{ + LIST_HEAD(ioremap_issue_list_top); + int ret; + + ret = __make_issue_list(top, &ioremap_issue_list_top); + if (ret) { + __cleanup_issue_list(&ioremap_issue_list_top); + return ret; + } + + __compress_issue_list(&ioremap_issue_list_top); + + (void)__issue_ioremap(&ioremap_issue_list_top); + + return 0; +} +#endif /* CONFIG_XEN */ + struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int domain, int bus) { @@ -379,6 +551,18 @@ pci_acpi_scan_root(struct acpi_device *d pbus = pci_scan_bus_parented(NULL, bus, &pci_root_ops, controller); if (pbus) pcibios_setup_root_windows(pbus, controller); + +#ifdef CONFIG_XEN + if (is_initial_xendomain()) { + if (do_ioremap_on_resource_list(&iomem_resource) != 0) { + printk(KERN_ERR + "%s: Counld not issue HYPERVISOR_ioremap " + "due to lack of memory or hypercall failure\n", + __FUNCTION__); + goto out3; + } + } +#endif /* CONFIG_XEN */ return pbus; _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:11:26 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:11:26 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgQY-0008It-FT for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:11:26 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgQq-00052x-Vb; Fri, 07 Sep 2007 16:11:44 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgPs-0004PE-Si for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:44 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgPk-0007FD-DZ for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:42 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAEoo011626 for ; Fri, 7 Sep 2007 09:10:14 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GALfW021889 for ; Fri, 7 Sep 2007 09:10:21 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GAL1v021887 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:10:21 -0700 Message-Id: <200709071610.l87GAL1v021887@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:10:20 -0700 From: "Xen patchbot-linux-2.6.18-xen" To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [linux-2.6.18-xen] [IA64] Disable paravirtualization to remap /dev/mem. X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User Alex Williamson # Date 1185814416 21600 # Node ID f017328288ea42600509b62882f687d7331ce194 # Parent 6d84769b52563c8ecdbe3ee001befcbfbbf6bfcd [IA64] Disable paravirtualization to remap /dev/mem. Signed-off-by: Jun Kamada --- arch/ia64/xen/mem.c | 75 --------------------------------------------- arch/ia64/Kconfig | 3 + arch/ia64/xen/Makefile | 2 - include/asm-ia64/io.h | 5 --- include/asm-ia64/uaccess.h | 20 ------------ 5 files changed, 4 insertions(+), 101 deletions(-) diff -r 6d84769b5256 -r f017328288ea arch/ia64/Kconfig --- a/arch/ia64/Kconfig Mon Jul 30 10:51:55 2007 -0600 +++ b/arch/ia64/Kconfig Mon Jul 30 10:53:36 2007 -0600 @@ -582,6 +582,9 @@ if XEN if XEN config XEN_SMPBOOT default n + +config XEN_DEVMEM + default n endif source "drivers/xen/Kconfig" diff -r 6d84769b5256 -r f017328288ea arch/ia64/xen/Makefile --- a/arch/ia64/xen/Makefile Mon Jul 30 10:51:55 2007 -0600 +++ b/arch/ia64/xen/Makefile Mon Jul 30 10:53:36 2007 -0600 @@ -4,6 +4,6 @@ obj-y := hypercall.o xenivt.o xenentry.o xensetup.o xenpal.o xenhpski.o \ hypervisor.o util.o xencomm.o xcom_hcall.o xcom_mini.o \ - xcom_privcmd.o mem.o xen_dma.o + xcom_privcmd.o xen_dma.o obj-$(CONFIG_IA64_GENERIC) += machvec.o diff -r 6d84769b5256 -r f017328288ea arch/ia64/xen/mem.c --- a/arch/ia64/xen/mem.c Mon Jul 30 10:51:55 2007 -0600 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,75 +0,0 @@ -/* - * Originally from linux/drivers/char/mem.c - * - * Copyright (C) 1991, 1992 Linus Torvalds - * - * Added devfs support. - * Jan-11-1998, C. Scott Ananian - * Shared /dev/zero mmaping support, Feb 2000, Kanoj Sarcar - */ -/* - * taken from - * linux/drivers/char/mem.c and linux-2.6-xen-sparse/drivers/xen/char/mem.c. - * adjusted for IA64 and made transparent. - * Copyright (c) 2006 Isaku Yamahata - * VA Linux Systems Japan K.K. - */ - -#include -#include - -/* - * Architectures vary in how they handle caching for addresses - * outside of main memory. - * - */ -static inline int uncached_access(struct file *file, unsigned long addr) -{ - /* - * On ia64, we ignore O_SYNC because we cannot tolerate memory attribute aliases. - */ - return !(efi_mem_attributes(addr) & EFI_MEMORY_WB); -} - -int xen_mmap_mem(struct file * file, struct vm_area_struct * vma) -{ - unsigned long addr = vma->vm_pgoff << PAGE_SHIFT; - size_t size = vma->vm_end - vma->vm_start; - - -#if 0 - /* - *XXX FIXME: linux-2.6.16.29, linux-2.6.17 - * valid_mmap_phys_addr_range() in linux/arch/ia64/kernel/efi.c - * fails checks. - * linux-2.6.18.1's returns always 1. - * Its comments says - * - * MMIO regions are often missing from the EFI memory map. - * We must allow mmap of them for programs like X, so we - * currently can't do any useful validation. - */ - if (!valid_mmap_phys_addr_range(addr, &size)) - return -EINVAL; - if (size < vma->vm_end - vma->vm_start) - return -EINVAL; -#endif - - if (is_running_on_xen()) { - unsigned long offset = HYPERVISOR_ioremap(addr, size); - if (IS_ERR_VALUE(offset)) - return offset; - } - - if (uncached_access(file, vma->vm_pgoff << PAGE_SHIFT)) - vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); - - /* Remap-pfn-range will mark the range VM_IO and VM_RESERVED */ - if (remap_pfn_range(vma, - vma->vm_start, - vma->vm_pgoff, - size, - vma->vm_page_prot)) - return -EAGAIN; - return 0; -} diff -r 6d84769b5256 -r f017328288ea include/asm-ia64/io.h --- a/include/asm-ia64/io.h Mon Jul 30 10:51:55 2007 -0600 +++ b/include/asm-ia64/io.h Mon Jul 30 10:53:36 2007 -0600 @@ -128,11 +128,6 @@ extern int valid_mmap_phys_addr_range (u (((bvec_to_bus((vec1)) + (vec1)->bv_len) == bvec_to_bus((vec2))) && \ ((bvec_to_pseudophys((vec1)) + (vec1)->bv_len) == \ bvec_to_pseudophys((vec2)))) - -/* We will be supplying our own /dev/mem implementation */ -#define ARCH_HAS_DEV_MEM -#define ARCH_HAS_DEV_MEM_MMAP_MEM -int xen_mmap_mem(struct file * file, struct vm_area_struct * vma); #endif /* CONFIG_XEN */ # endif /* KERNEL */ diff -r 6d84769b5256 -r f017328288ea include/asm-ia64/uaccess.h --- a/include/asm-ia64/uaccess.h Mon Jul 30 10:51:55 2007 -0600 +++ b/include/asm-ia64/uaccess.h Mon Jul 30 10:53:36 2007 -0600 @@ -365,7 +365,6 @@ ia64_done_with_exception (struct pt_regs } #define ARCH_HAS_TRANSLATE_MEM_PTR 1 -#ifndef CONFIG_XEN static __inline__ char * xlate_dev_mem_ptr (unsigned long p) { @@ -380,25 +379,6 @@ xlate_dev_mem_ptr (unsigned long p) return ptr; } -#else -static __inline__ char * -xen_xlate_dev_mem_ptr (unsigned long p, ssize_t sz) -{ - unsigned long pfn = p >> PAGE_SHIFT; - - if (pfn_valid(pfn) && !PageUncached(pfn_to_page(pfn))) - return __va(p); - - return ioremap(p, sz); -} - -static __inline__ void -xen_xlate_dev_mem_ptr_unmap (char* v) -{ - if (REGION_NUMBER(v) == RGN_UNCACHED) - iounmap(v); -} -#endif /* * Convert a virtual cached kernel memory pointer to an uncached pointer _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:11:31 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:11:31 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgQd-0008Iw-7n for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:11:31 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgQv-000571-Nw; Fri, 07 Sep 2007 16:11:49 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgPv-0004RT-OU for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:48 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgPo-0007FV-U7 for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:44 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAIOb011641 for ; Fri, 7 Sep 2007 09:10:18 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAQR6021974 for ; Fri, 7 Sep 2007 09:10:26 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GAQkE021973 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:10:26 -0700 Message-Id: <200709071610.l87GAQkE021973@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:10:25 -0700 From: "Xen patchbot-linux-2.6.18-xen" To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [linux-2.6.18-xen] [IA64] Set rr0 to rr4 hyperprivop X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User Alex Williamson # Date 1185983094 21600 # Node ID a1682dc021bc16eec86f09b6d9a389c19497423b # Parent 6e0d898e9dad897b29db1c08be2b8b64c929d779 [IA64] Set rr0 to rr4 hyperprivop Introduce ia64_set_rr0_to_rr4() and paravirtualize it to eliminate hyperprivop overhead. Signed-off-by: Isaku Yamahata --- include/asm-ia64/intrinsics.h | 9 +++++++++ include/asm-ia64/mmu_context.h | 6 +----- include/asm-ia64/privop.h | 1 + include/asm-ia64/xen/privop.h | 25 +++++++++++++++++++++++++ include/xen/interface/arch-ia64.h | 3 ++- 5 files changed, 38 insertions(+), 6 deletions(-) diff -r 6e0d898e9dad -r a1682dc021bc include/asm-ia64/intrinsics.h --- a/include/asm-ia64/intrinsics.h Mon Jul 30 11:46:14 2007 -0600 +++ b/include/asm-ia64/intrinsics.h Wed Aug 01 09:44:54 2007 -0600 @@ -17,6 +17,15 @@ #else # include #endif + +#define __ia64_set_rr0_to_rr4(val0, val1, val2, val3, val4) \ +do { \ + __ia64_set_rr(0x0000000000000000UL, (val0)); \ + __ia64_set_rr(0x2000000000000000UL, (val1)); \ + __ia64_set_rr(0x4000000000000000UL, (val2)); \ + __ia64_set_rr(0x6000000000000000UL, (val3)); \ + __ia64_set_rr(0x8000000000000000UL, (val4)); \ +} while (0) /* * Force an unresolved reference if someone tries to use diff -r 6e0d898e9dad -r a1682dc021bc include/asm-ia64/mmu_context.h --- a/include/asm-ia64/mmu_context.h Mon Jul 30 11:46:14 2007 -0600 +++ b/include/asm-ia64/mmu_context.h Wed Aug 01 09:44:54 2007 -0600 @@ -151,11 +151,7 @@ reload_context (nv_mm_context_t context) # endif #endif - ia64_set_rr(0x0000000000000000UL, rr0); - ia64_set_rr(0x2000000000000000UL, rr1); - ia64_set_rr(0x4000000000000000UL, rr2); - ia64_set_rr(0x6000000000000000UL, rr3); - ia64_set_rr(0x8000000000000000UL, rr4); + ia64_set_rr0_to_rr4(rr0, rr1, rr2, rr3, rr4); ia64_srlz_i(); /* srlz.i implies srlz.d */ } diff -r 6e0d898e9dad -r a1682dc021bc include/asm-ia64/privop.h --- a/include/asm-ia64/privop.h Mon Jul 30 11:46:14 2007 -0600 +++ b/include/asm-ia64/privop.h Wed Aug 01 09:44:54 2007 -0600 @@ -54,6 +54,7 @@ #define ia64_ret_from_clone __ia64_ret_from_clone #define ia64_switch_to __ia64_switch_to #define ia64_pal_call_static __ia64_pal_call_static +#define ia64_set_rr0_to_rr4 __ia64_set_rr0_to_rr4 #endif /* !IA64_PARAVIRTUALIZED */ diff -r 6e0d898e9dad -r a1682dc021bc include/asm-ia64/xen/privop.h --- a/include/asm-ia64/xen/privop.h Mon Jul 30 11:46:14 2007 -0600 +++ b/include/asm-ia64/xen/privop.h Wed Aug 01 09:44:54 2007 -0600 @@ -375,6 +375,21 @@ xen_set_rr(unsigned long index, unsigned } static inline void +xen_set_rr0_to_rr4(unsigned long val0, unsigned long val1, + unsigned long val2, unsigned long val3, unsigned long val4) +{ + register __u64 __val0 asm ("r8") = val0; + register __u64 __val1 asm ("r9") = val1; + register __u64 __val2 asm ("r10") = val2; + register __u64 __val3 asm ("r11") = val3; + register __u64 __val4 asm ("r14") = val4; + asm volatile ("break %0" :: + "i"(HYPERPRIVOP_SET_RR0_TO_RR4), + "r"(__val0), "r"(__val1), + "r"(__val2), "r"(__val3), "r"(__val4)); +} + +static inline void xen_set_kr(unsigned long index, unsigned long val) { register __u64 __index asm ("r8") = index; @@ -479,6 +494,16 @@ do { \ ia64_intri_res = __ia64_get_rr((index)); \ ia64_intri_res; \ }) + +#define ia64_set_rr0_to_rr4(val0, val1, val2, val3, val4) \ +do { \ + if (is_running_on_xen()) \ + xen_set_rr0_to_rr4((val0), (val1), (val2), \ + (val3), (val4)); \ + else \ + __ia64_set_rr0_to_rr4((val0), (val1), (val2), \ + (val3), (val4)); \ +} while (0) #define ia64_getreg xen_ia64_getreg #define ia64_setreg xen_ia64_setreg diff -r 6e0d898e9dad -r a1682dc021bc include/xen/interface/arch-ia64.h --- a/include/xen/interface/arch-ia64.h Mon Jul 30 11:46:14 2007 -0600 +++ b/include/xen/interface/arch-ia64.h Wed Aug 01 09:44:54 2007 -0600 @@ -544,7 +544,8 @@ struct xen_ia64_boot_param { #define HYPERPRIVOP_SET_EFLAG (HYPERPRIVOP_START + 0x16) #define HYPERPRIVOP_RSM_BE (HYPERPRIVOP_START + 0x17) #define HYPERPRIVOP_GET_PSR (HYPERPRIVOP_START + 0x18) -#define HYPERPRIVOP_MAX (0x19) +#define HYPERPRIVOP_SET_RR0_TO_RR4 (HYPERPRIVOP_START + 0x19) +#define HYPERPRIVOP_MAX (0x1a) /* Fast and light hypercalls. */ #define __HYPERVISOR_ia64_fast_eoi __HYPERVISOR_arch_1 _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:11:37 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:11:37 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgQi-0008J0-LA for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:11:37 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgR1-0005B3-7G; Fri, 07 Sep 2007 16:11:55 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgQ0-0004SY-Uv for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:53 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgPd-0007En-Ak for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:46 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GA7mn011608 for ; Fri, 7 Sep 2007 09:10:07 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAEJH021776 for ; Fri, 7 Sep 2007 09:10:14 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GAEMI021775 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:10:14 -0700 Message-Id: <200709071610.l87GAEMI021775@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:10:13 -0700 From: "Xen patchbot-linux-2.6.18-xen" To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=unavailable version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [linux-2.6.18-xen] [IA64] Cleanup vdso paravirtualization. X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User Alex Williamson # Date 1184882522 21600 # Node ID b64323b3a96337535f16e69d17a46086d069d941 # Parent dc1cdd6bbbf2365f6e6c8fff63358280e528b95b [IA64] Cleanup vdso paravirtualization. Hyperprivop calling convention was changed such that vpsr.ic is left intact. So we don't have to worry about itlb miss fault with vpsr.ic = 0 Signed-off-by: Isaku Yamahata --- arch/ia64/Kconfig | 2 - arch/ia64/kernel/gate.S | 63 +++++++++++++------------------------------- arch/ia64/kernel/gate.lds.S | 8 ----- arch/ia64/kernel/patch.c | 40 --------------------------- arch/ia64/xen/hypercall.S | 37 ------------------------- 5 files changed, 20 insertions(+), 130 deletions(-) diff -r dc1cdd6bbbf2 -r b64323b3a963 arch/ia64/Kconfig --- a/arch/ia64/Kconfig Thu Jul 19 15:45:59 2007 -0600 +++ b/arch/ia64/Kconfig Thu Jul 19 16:02:02 2007 -0600 @@ -66,7 +66,7 @@ config XEN both as a guest OS on Xen and natively on hardware. config XEN_IA64_VDSO_PARAVIRT - bool + bool "Xen/IA64 vdso area paravirtualization" depends on XEN && !ITANIUM default y help diff -r dc1cdd6bbbf2 -r b64323b3a963 arch/ia64/kernel/gate.S --- a/arch/ia64/kernel/gate.S Thu Jul 19 15:45:59 2007 -0600 +++ b/arch/ia64/kernel/gate.S Thu Jul 19 16:02:02 2007 -0600 @@ -33,17 +33,6 @@ .xdata4 ".data.patch.brl_fsys_bubble_down", 1b-. #ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT - // The page in which hyperprivop lives must be pinned by ITR. - // However vDSO area isn't pinned. So issuing hyperprivop - // from vDSO page causes trouble that Kevin pointed out. - // After clearing vpsr.ic, the vcpu is pre-empted and the itlb - // is flushed. Then vcpu get cpu again, tlb miss fault occures. - // However it results in nested dtlb fault because vpsr.ic is off. - // To avoid such a situation, we jump into the kernel text area - // which is pinned, and then issue hyperprivop and return back - // to vDSO page. - // This is Dan Magenheimer's idea. - // Currently is_running_on_xen() is defined as running_on_xen. // If is_running_on_xen() is a real function, we must update // according to it. @@ -52,21 +41,7 @@ #define LOAD_RUNNING_ON_XEN(reg) \ [1:] movl reg=0; \ .xdata4 ".data.patch.running_on_xen", 1b-. - - .section ".data.patch.brl_xen_ssm_i_0", "a" - .previous -#define BRL_COND_XEN_SSM_I_0(pr) \ -[1:](pr)brl.cond.sptk 0; \ - ;; ; \ - .xdata4 ".data.patch.brl_xen_ssm_i_0", 1b-. - - .section ".data.patch.brl_xen_ssm_i_1", "a" - .previous -#define BRL_COND_XEN_SSM_I_1(pr) \ -[1:](pr)brl.cond.sptk 0; \ - ;; ; \ - .xdata4 ".data.patch.brl_xen_ssm_i_1", 1b-. -#endif +#endif /* CONFIG_XEN_IA64_VDSO_PARAVIRT */ GLOBAL_ENTRY(__kernel_syscall_via_break) .prologue @@ -111,11 +86,9 @@ GLOBAL_ENTRY(__kernel_syscall_via_epc) mov r10=0 // A default to successful syscall execution epc // B causes split-issue } - ;; #ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT // r20 = 1 // r22 = &vcpu->vcpu_info->evtchn_upcall_mask - // r23 = &vpsr.ic // r24 = &vcpu->vcpu_info->evtchn_upcall_pending // r25 = tmp // r28 = &running_on_xen @@ -130,8 +103,6 @@ GLOBAL_ENTRY(__kernel_syscall_via_epc) #define isRaw p13 LOAD_RUNNING_ON_XEN(r28) movl r22=XSI_PSR_I_ADDR - ;; - movl r23=XSI_PSR_IC mov r20=1 ;; ld4 r30=[r28] @@ -144,8 +115,8 @@ GLOBAL_ENTRY(__kernel_syscall_via_epc) (isXen) adds r24=-1,r22 (isXen) st1 [r22]=r20 (isXen) rum psr.be - ;; -#else +#else + ;; rsm psr.be | psr.i // M2 (5 cyc to srlz.d) #endif LOAD_FSYSCALL_TABLE(r14) // X @@ -177,15 +148,26 @@ GLOBAL_ENTRY(__kernel_syscall_via_epc) nop.m 0 (p6) tbit.z.unc p8,p0=r18,0 // I0 (dual-issues with "mov b7=r18"!) #ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT - ;; + +#define XEN_SET_PSR_I(pr) \ +(pr) ld1 r31=[r22]; \ +(pr) ld1 r25=[r24]; \ + ;; \ +(pr) st1 [r22]=r0; \ +(pr) cmp.ne.unc p14,p0=r0,r31; \ + ;; \ +(p14) cmp.ne.unc p11,p0=r0,r25; \ + ;; \ +(p11) st1 [r22]=r20; \ +(p11) XEN_HYPER_SSM_I; + + ;; // p14 = running_on_xen && p8 // p15 = !running_on_xen && p8 (p8) cmp.ne.unc p14,p15=r0,r30 ;; (p15) ssm psr.i - BRL_COND_XEN_SSM_I_0(p14) - .global .vdso_ssm_i_0_ret -.vdso_ssm_i_0_ret: + XEN_SET_PSR_I(p14) #else nop.i 0 ;; @@ -213,19 +195,12 @@ GLOBAL_ENTRY(__kernel_syscall_via_epc) #endif #ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT (isRaw) ssm psr.i - BRL_COND_XEN_SSM_I_1(isXen) - .global .vdso_ssm_i_1_ret -.vdso_ssm_i_1_ret: + XEN_SET_PSR_I(isXen) #else ssm psr.i #endif mov r10=-1 (p10) mov r8=EINVAL -#ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT - dv_serialize_data // shut up gas warning. - // we know xen_hyper_ssm_i_0 or xen_hyper_ssm_i_1 - // doesn't change p9 and p10 -#endif (p9) mov r8=ENOSYS FSYS_RETURN END(__kernel_syscall_via_epc) diff -r dc1cdd6bbbf2 -r b64323b3a963 arch/ia64/kernel/gate.lds.S --- a/arch/ia64/kernel/gate.lds.S Thu Jul 19 15:45:59 2007 -0600 +++ b/arch/ia64/kernel/gate.lds.S Thu Jul 19 16:02:02 2007 -0600 @@ -48,14 +48,6 @@ SECTIONS __start_gate_running_on_xen_patchlist = .; *(.data.patch.running_on_xen) __end_gate_running_on_xen_patchlist = .; - - __start_gate_brl_xen_ssm_i_0_patchlist = .; - *(.data.patch.brl_xen_ssm_i_0) - __end_gate_brl_xen_ssm_i_0_patchlist = .; - - __start_gate_brl_xen_ssm_i_1_patchlist = .; - *(.data.patch.brl_xen_ssm_i_1) - __end_gate_brl_xen_ssm_i_1_patchlist = .; #endif } :readable .IA_64.unwind_info : { *(.IA_64.unwind_info*) } diff -r dc1cdd6bbbf2 -r b64323b3a963 arch/ia64/kernel/patch.c --- a/arch/ia64/kernel/patch.c Thu Jul 19 15:45:59 2007 -0600 +++ b/arch/ia64/kernel/patch.c Thu Jul 19 16:02:02 2007 -0600 @@ -204,47 +204,8 @@ patch_running_on_xen(unsigned long start ia64_sync_i(); ia64_srlz_i(); } - -static void -patch_brl_symaddr(unsigned long start, unsigned long end, - unsigned long symaddr) -{ - s32 *offp = (s32 *)start; - u64 ip; - - while (offp < (s32 *)end) { - ip = (u64)offp + *offp; - ia64_patch_imm60((u64)ia64_imva((void *)ip), - (u64)(symaddr - (ip & -16)) / 16); - ia64_fc((void *)ip); - ++offp; - } - ia64_sync_i(); - ia64_srlz_i(); -} - -#define EXTERN_PATCHLIST(name) \ - extern char __start_gate_brl_##name##_patchlist[]; \ - extern char __end_gate_brl_##name##_patchlist[]; \ - extern char name[] - -#define PATCH_BRL_SYMADDR(name) \ - patch_brl_symaddr((unsigned long)__start_gate_brl_##name##_patchlist, \ - (unsigned long)__end_gate_brl_##name##_patchlist, \ - (unsigned long)name) - -static void -patch_brl_in_vdso(void) -{ - EXTERN_PATCHLIST(xen_ssm_i_0); - EXTERN_PATCHLIST(xen_ssm_i_1); - - PATCH_BRL_SYMADDR(xen_ssm_i_0); - PATCH_BRL_SYMADDR(xen_ssm_i_1); -} #else #define patch_running_on_xen(start, end) do { } while (0) -#define patch_brl_in_vdso() do { } while (0) #endif void __init @@ -257,7 +218,6 @@ ia64_patch_gate (void) patch_brl_fsys_bubble_down(START(brl_fsys_bubble_down), END(brl_fsys_bubble_down)); #ifdef CONFIG_XEN patch_running_on_xen(START(running_on_xen), END(running_on_xen)); - patch_brl_in_vdso(); #endif ia64_patch_vtop(START(vtop), END(vtop)); ia64_patch_mckinley_e9(START(mckinley_e9), END(mckinley_e9)); diff -r dc1cdd6bbbf2 -r b64323b3a963 arch/ia64/xen/hypercall.S --- a/arch/ia64/xen/hypercall.S Thu Jul 19 15:45:59 2007 -0600 +++ b/arch/ia64/xen/hypercall.S Thu Jul 19 16:02:02 2007 -0600 @@ -133,46 +133,9 @@ GLOBAL_ENTRY(xen_send_ipi) ;; END(xen_send_ipi) -#ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT -// Those are vdso specialized. -// In fsys mode, call, ret can't be used. - - // see xen_ssm_i() in privop.h - // r22 = &vcpu->vcpu_info->evtchn_upcall_mask - // r23 = &vpsr.ic - // r24 = &vcpu->vcpu_info->evtchn_upcall_pending - // r25 = tmp - // r31 = tmp - // p11 = tmp - // p14 = tmp -#define XEN_SET_PSR_I \ - ld1 r31=[r22]; \ - ld1 r25=[r24]; \ - ;; \ - st1 [r22]=r0; \ - cmp.ne.unc p14,p0=r0,r31; \ - ;; \ -(p14) cmp.ne.unc p11,p0=r0,r25; \ - ;; \ -(p11) st1 [r22]=r20; \ -(p11) XEN_HYPER_SSM_I; - -GLOBAL_ENTRY(xen_ssm_i_0) - XEN_SET_PSR_I - brl.cond.sptk .vdso_ssm_i_0_ret - ;; -END(xen_ssm_i_0) - -GLOBAL_ENTRY(xen_ssm_i_1) - XEN_SET_PSR_I - brl.cond.sptk .vdso_ssm_i_1_ret - ;; -END(xen_ssm_i_1) - GLOBAL_ENTRY(__hypercall) mov r2=r37 break 0x1000 br.ret.sptk.many b0 ;; END(__hypercall) -#endif _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:11:40 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:11:40 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgQm-0008J5-83 for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:11:40 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgR4-0005EP-Pj; Fri, 07 Sep 2007 16:11:58 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgQ1-0004T5-Ed for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:54 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgPo-0007FR-0J for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:50 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAHoL011638 for ; Fri, 7 Sep 2007 09:10:17 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAPHv021957 for ; Fri, 7 Sep 2007 09:10:25 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GAPYE021956 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:10:25 -0700 Message-Id: <200709071610.l87GAPYE021956@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:10:24 -0700 From: "Xen patchbot-linux-2.6.18-xen" To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, UPPERCASE_25_50 autolearn=unavailable version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [linux-2.6.18-xen] [IA64] Update buildconfigs X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User Alex Williamson # Date 1185817574 21600 # Node ID 6e0d898e9dad897b29db1c08be2b8b64c929d779 # Parent 0f9032c33df4d7595f87358775b4694d740da583 [IA64] Update buildconfigs XEN_DEVMEM is now dropped by make oldconfig Signed-off-by: Alex Williamson --- buildconfigs/linux-defconfig_xen0_ia64 | 4 ++-- buildconfigs/linux-defconfig_xenU_ia64 | 4 ++-- buildconfigs/linux-defconfig_xen_ia64 | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff -r 0f9032c33df4 -r 6e0d898e9dad buildconfigs/linux-defconfig_xen0_ia64 --- a/buildconfigs/linux-defconfig_xen0_ia64 Mon Jul 30 11:05:55 2007 -0600 +++ b/buildconfigs/linux-defconfig_xen0_ia64 Mon Jul 30 11:46:14 2007 -0600 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.18 -# Wed Jul 25 14:56:03 2007 +# Mon Jul 30 11:37:09 2007 # CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" @@ -1650,6 +1650,7 @@ CONFIG_CRYPTO_DES=y # Hardware crypto devices # # CONFIG_XEN_SMPBOOT is not set +# CONFIG_XEN_DEVMEM is not set CONFIG_XEN_INTERFACE_VERSION=0x00030205 # @@ -1686,4 +1687,3 @@ CONFIG_HAVE_IRQ_IGNORE_UNHANDLED=y CONFIG_HAVE_IRQ_IGNORE_UNHANDLED=y CONFIG_NO_IDLE_HZ=y CONFIG_XEN_BALLOON=y -CONFIG_XEN_DEVMEM=y diff -r 0f9032c33df4 -r 6e0d898e9dad buildconfigs/linux-defconfig_xenU_ia64 --- a/buildconfigs/linux-defconfig_xenU_ia64 Mon Jul 30 11:05:55 2007 -0600 +++ b/buildconfigs/linux-defconfig_xenU_ia64 Mon Jul 30 11:46:14 2007 -0600 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.18 -# Wed Jul 25 14:56:44 2007 +# Mon Jul 30 11:39:02 2007 # CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" @@ -1472,6 +1472,7 @@ CONFIG_CRYPTO_DES=y # Hardware crypto devices # # CONFIG_XEN_SMPBOOT is not set +# CONFIG_XEN_DEVMEM is not set CONFIG_XEN_INTERFACE_VERSION=0x00030205 # @@ -1496,4 +1497,3 @@ CONFIG_HAVE_IRQ_IGNORE_UNHANDLED=y CONFIG_HAVE_IRQ_IGNORE_UNHANDLED=y CONFIG_NO_IDLE_HZ=y CONFIG_XEN_BALLOON=y -CONFIG_XEN_DEVMEM=y diff -r 0f9032c33df4 -r 6e0d898e9dad buildconfigs/linux-defconfig_xen_ia64 --- a/buildconfigs/linux-defconfig_xen_ia64 Mon Jul 30 11:05:55 2007 -0600 +++ b/buildconfigs/linux-defconfig_xen_ia64 Mon Jul 30 11:46:14 2007 -0600 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.18 -# Wed Jul 25 14:55:11 2007 +# Mon Jul 30 11:12:36 2007 # CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" @@ -1650,6 +1650,7 @@ CONFIG_CRYPTO_DES=y # Hardware crypto devices # # CONFIG_XEN_SMPBOOT is not set +# CONFIG_XEN_DEVMEM is not set CONFIG_XEN_INTERFACE_VERSION=0x00030205 # @@ -1686,4 +1687,3 @@ CONFIG_HAVE_IRQ_IGNORE_UNHANDLED=y CONFIG_HAVE_IRQ_IGNORE_UNHANDLED=y CONFIG_NO_IDLE_HZ=y CONFIG_XEN_BALLOON=y -CONFIG_XEN_DEVMEM=y _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:11:47 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:11:47 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgQs-0008JF-FP for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:11:47 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgRA-0005Il-WA; Fri, 07 Sep 2007 16:12:05 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgQ1-0004Se-6N for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:54 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgPi-0007F6-DZ for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:51 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GACH7011620 for ; Fri, 7 Sep 2007 09:10:12 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAJ6e021853 for ; Fri, 7 Sep 2007 09:10:19 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GAJCg021852 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:10:19 -0700 Message-Id: <200709071610.l87GAJCg021852@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:10:17 -0700 From: "Xen patchbot-linux-2.6.18-xen" To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [linux-2.6.18-xen] merge with linux-2.6.18-xen.hg X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User Alex Williamson # Date 1185545750 21600 # Node ID b0bf9ba32bfe341af07da97d57572659c920fd30 # Parent e6974eba1baec726ca1a97d076f0bf8428096bc2 # Parent 88a17da7f3362126182423100a9d7d4c0d854139 merge with linux-2.6.18-xen.hg --- arch/i386/kernel/swiotlb.c | 745 ----------------------------- arch/i386/Kconfig | 4 arch/i386/Makefile | 1 arch/i386/kernel/Makefile | 26 - arch/i386/kernel/acpi/Makefile | 4 arch/i386/kernel/acpi/sleep-xen.c | 129 +++++ arch/i386/kernel/cpu/Makefile | 4 arch/i386/kernel/cpu/mtrr/Makefile | 8 arch/i386/kernel/time-xen.c | 4 arch/i386/mm/Makefile | 9 arch/i386/mm/fault-xen.c | 33 - arch/i386/mm/ioremap-xen.c | 2 arch/i386/pci/Makefile | 5 arch/i386/power/cpu.c | 3 arch/powerpc/platforms/xen/hcall.c | 146 +++++ arch/powerpc/platforms/xen/setup.c | 13 arch/x86_64/Kconfig | 4 arch/x86_64/Makefile | 1 arch/x86_64/ia32/Makefile | 13 arch/x86_64/kernel/Makefile | 18 arch/x86_64/kernel/acpi/Makefile | 4 arch/x86_64/kernel/acpi/sleep-xen.c | 162 ++++++ arch/x86_64/kernel/head-xen.S | 15 arch/x86_64/kernel/suspend.c | 2 arch/x86_64/mm/Makefile | 13 arch/x86_64/pci/Makefile | 7 buildconfigs/linux-defconfig_xen_x86_32 | 7 buildconfigs/linux-defconfig_xen_x86_64 | 7 drivers/acpi/Kconfig | 6 drivers/acpi/hardware/hwsleep.c | 5 drivers/acpi/sleep/main.c | 9 drivers/acpi/sleep/poweroff.c | 2 drivers/xen/balloon/balloon.c | 12 drivers/xen/blkfront/blkfront.c | 2 drivers/xen/blktap/blktap.c | 12 drivers/xen/char/mem.c | 31 - drivers/xen/core/gnttab.c | 8 drivers/xen/core/machine_reboot.c | 1 drivers/xen/fbfront/xenfb.c | 1 drivers/xen/fbfront/xenkbd.c | 1 drivers/xen/netfront/netfront.c | 58 +- drivers/xen/netfront/netfront.h | 4 drivers/xen/pciback/conf_space_header.c | 18 drivers/xen/pcifront/xenbus.c | 1 drivers/xen/privcmd/privcmd.c | 1 drivers/xen/xenbus/xenbus_probe.c | 59 +- drivers/xen/xenbus/xenbus_probe_backend.c | 1 drivers/xen/xenbus/xenbus_xs.c | 6 include/asm-i386/acpi.h | 4 include/asm-i386/mach-xen/asm/gnttab_dma.h | 2 include/asm-i386/mach-xen/asm/io.h | 3 include/asm-powerpc/io.h | 3 include/asm-x86_64/acpi.h | 4 include/asm-x86_64/mach-xen/asm/io.h | 3 include/xen/interface/platform.h | 12 lib/Makefile | 3 lib/swiotlb-xen.c | 745 +++++++++++++++++++++++++++++ scripts/Makefile.build | 12 scripts/Makefile.lib | 6 scripts/Makefile.xen.awk | 34 + 60 files changed, 1528 insertions(+), 930 deletions(-) diff -r e6974eba1bae -r b0bf9ba32bfe arch/i386/Kconfig --- a/arch/i386/Kconfig Thu Jul 26 14:33:50 2007 -0600 +++ b/arch/i386/Kconfig Fri Jul 27 08:15:50 2007 -0600 @@ -832,9 +832,7 @@ menu "Power management options (ACPI, AP menu "Power management options (ACPI, APM)" depends on !(X86_VOYAGER || XEN_UNPRIVILEGED_GUEST) -if !X86_XEN -source kernel/power/Kconfig -endif +source "kernel/power/Kconfig" source "drivers/acpi/Kconfig" diff -r e6974eba1bae -r b0bf9ba32bfe arch/i386/Makefile --- a/arch/i386/Makefile Thu Jul 26 14:33:50 2007 -0600 +++ b/arch/i386/Makefile Fri Jul 27 08:15:50 2007 -0600 @@ -116,7 +116,6 @@ PHONY += zImage bzImage compressed zlilo ifdef CONFIG_XEN CPPFLAGS := -Iinclude$(if $(KBUILD_SRC),2)/asm/mach-xen $(CPPFLAGS) -head-y := arch/i386/kernel/head-xen.o arch/i386/kernel/init_task-xen.o boot := arch/i386/boot-xen .PHONY: vmlinuz all: vmlinuz diff -r e6974eba1bae -r b0bf9ba32bfe arch/i386/kernel/Makefile --- a/arch/i386/kernel/Makefile Thu Jul 26 14:33:50 2007 -0600 +++ b/arch/i386/kernel/Makefile Fri Jul 27 08:15:50 2007 -0600 @@ -43,12 +43,7 @@ EXTRA_AFLAGS := -traditional EXTRA_AFLAGS := -traditional obj-$(CONFIG_SCx200) += scx200.o - -ifdef CONFIG_XEN -vsyscall_note := vsyscall-note-xen.o -else -vsyscall_note := vsyscall-note.o -endif +obj-$(CONFIG_XEN) += fixup.o # vsyscall.o contains the vsyscall DSO images as __initdata. # We must build both images before we can assemble it. @@ -71,7 +66,7 @@ SYSCFLAGS_vsyscall-int80.so = $(vsyscall $(obj)/vsyscall-int80.so $(obj)/vsyscall-sysenter.so: \ $(obj)/vsyscall-%.so: $(src)/vsyscall.lds \ - $(obj)/vsyscall-%.o $(obj)/$(vsyscall_note) FORCE + $(obj)/vsyscall-%.o $(obj)/vsyscall-note.o FORCE $(call if_changed,syscall) # We also create a special relocatable object that should mirror the symbol @@ -83,20 +78,11 @@ extra-y += vsyscall-syms.o SYSCFLAGS_vsyscall-syms.o = -r $(obj)/vsyscall-syms.o: $(src)/vsyscall.lds \ - $(obj)/vsyscall-sysenter.o $(obj)/$(vsyscall_note) FORCE + $(obj)/vsyscall-sysenter.o $(obj)/vsyscall-note.o FORCE $(call if_changed,syscall) +early_printk-y += ../../x86_64/kernel/early_printk.o k8-y += ../../x86_64/kernel/k8.o -ifdef CONFIG_XEN -include $(srctree)/scripts/Makefile.xen - -obj-y += fixup.o -microcode-$(subst m,y,$(CONFIG_MICROCODE)) := microcode-xen.o -n-obj-xen := i8259.o timers/ reboot.o smpboot.o trampoline.o - -obj-y := $(call filterxen, $(obj-y), $(n-obj-xen)) -obj-y := $(call cherrypickxen, $(obj-y)) -extra-y := $(call cherrypickxen, $(extra-y)) -%/head-xen.o %/head-xen.s: EXTRA_AFLAGS := -endif +disabled-obj-$(CONFIG_XEN) := i8259.o reboot.o smpboot.o trampoline.o +%/head.o %/head.s: $(if $(CONFIG_XEN),EXTRA_AFLAGS,dummy) := diff -r e6974eba1bae -r b0bf9ba32bfe arch/i386/kernel/acpi/Makefile --- a/arch/i386/kernel/acpi/Makefile Thu Jul 26 14:33:50 2007 -0600 +++ b/arch/i386/kernel/acpi/Makefile Fri Jul 27 08:15:50 2007 -0600 @@ -6,7 +6,3 @@ obj-y += cstate.o processor.o obj-y += cstate.o processor.o endif -ifdef CONFIG_XEN -include $(srctree)/scripts/Makefile.xen -obj-y := $(call cherrypickxen, $(obj-y), $(src)) -endif diff -r e6974eba1bae -r b0bf9ba32bfe arch/i386/kernel/acpi/sleep-xen.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/arch/i386/kernel/acpi/sleep-xen.c Fri Jul 27 08:15:50 2007 -0600 @@ -0,0 +1,129 @@ +/* + * sleep.c - x86-specific ACPI sleep support. + * + * Copyright (C) 2001-2003 Patrick Mochel + * Copyright (C) 2001-2003 Pavel Machek + */ + +#include +#include +#include +#include + +#include + +/* address in low memory of the wakeup routine. */ +unsigned long acpi_wakeup_address = 0; +unsigned long acpi_video_flags; +extern char wakeup_start, wakeup_end; + +extern unsigned long FASTCALL(acpi_copy_wakeup_routine(unsigned long)); + +/** + * acpi_save_state_mem - save kernel state + * + * Create an identity mapped page table and copy the wakeup routine to + * low memory. + */ +int acpi_save_state_mem(void) +{ +#ifndef CONFIG_ACPI_PV_SLEEP + if (!acpi_wakeup_address) + return 1; + memcpy((void *)acpi_wakeup_address, &wakeup_start, + &wakeup_end - &wakeup_start); + acpi_copy_wakeup_routine(acpi_wakeup_address); +#endif + return 0; +} + +/* + * acpi_restore_state - undo effects of acpi_save_state_mem + */ +void acpi_restore_state_mem(void) +{ +} + +/** + * acpi_reserve_bootmem - do _very_ early ACPI initialisation + * + * We allocate a page from the first 1MB of memory for the wakeup + * routine for when we come back from a sleep state. The + * runtime allocator allows specification of <16MB pages, but not + * <1MB pages. + */ +void __init acpi_reserve_bootmem(void) +{ + if ((&wakeup_end - &wakeup_start) > PAGE_SIZE) { + printk(KERN_ERR + "ACPI: Wakeup code way too big, S3 disabled.\n"); + return; + } + + acpi_wakeup_address = (unsigned long)alloc_bootmem_low(PAGE_SIZE); + if (!acpi_wakeup_address) + printk(KERN_ERR "ACPI: Cannot allocate lowmem, S3 disabled.\n"); +} + +static int __init acpi_sleep_setup(char *str) +{ + while ((str != NULL) && (*str != '\0')) { + if (strncmp(str, "s3_bios", 7) == 0) + acpi_video_flags = 1; + if (strncmp(str, "s3_mode", 7) == 0) + acpi_video_flags |= 2; + str = strchr(str, ','); + if (str != NULL) + str += strspn(str, ", \t"); + } + return 1; +} + +__setup("acpi_sleep=", acpi_sleep_setup); + +static __init int reset_videomode_after_s3(struct dmi_system_id *d) +{ + acpi_video_flags |= 2; + return 0; +} + +static __initdata struct dmi_system_id acpisleep_dmi_table[] = { + { /* Reset video mode after returning from ACPI S3 sleep */ + .callback = reset_videomode_after_s3, + .ident = "Toshiba Satellite 4030cdt", + .matches = { + DMI_MATCH(DMI_PRODUCT_NAME, "S4030CDT/4.3"), + }, + }, + {} +}; + +static int __init acpisleep_dmi_init(void) +{ + dmi_check_system(acpisleep_dmi_table); + return 0; +} + +core_initcall(acpisleep_dmi_init); + +#ifdef CONFIG_ACPI_PV_SLEEP +#include +#include +int acpi_notify_hypervisor_state(u8 sleep_state, + u32 pm1a_cnt, u32 pm1b_cnt) +{ + struct xen_platform_op op = { + .cmd = XENPF_enter_acpi_sleep, + .interface_version = XENPF_INTERFACE_VERSION, + .u = { + .enter_acpi_sleep = { + .pm1a_cnt_val = (u16)pm1a_cnt, + .pm1b_cnt_val = (u16)pm1b_cnt, + .sleep_state = sleep_state, + }, + }, + }; + + return HYPERVISOR_platform_op(&op); +} +#endif /* CONFIG_ACPI_PV_SLEEP */ diff -r e6974eba1bae -r b0bf9ba32bfe arch/i386/kernel/cpu/Makefile --- a/arch/i386/kernel/cpu/Makefile Thu Jul 26 14:33:50 2007 -0600 +++ b/arch/i386/kernel/cpu/Makefile Fri Jul 27 08:15:50 2007 -0600 @@ -18,7 +18,3 @@ obj-$(CONFIG_MTRR) += mtrr/ obj-$(CONFIG_MTRR) += mtrr/ obj-$(CONFIG_CPU_FREQ) += cpufreq/ -ifdef CONFIG_XEN -include $(srctree)/scripts/Makefile.xen -obj-y := $(call cherrypickxen, $(obj-y), $(src)) -endif diff -r e6974eba1bae -r b0bf9ba32bfe arch/i386/kernel/cpu/mtrr/Makefile --- a/arch/i386/kernel/cpu/mtrr/Makefile Thu Jul 26 14:33:50 2007 -0600 +++ b/arch/i386/kernel/cpu/mtrr/Makefile Fri Jul 27 08:15:50 2007 -0600 @@ -3,10 +3,4 @@ obj-y += cyrix.o obj-y += cyrix.o obj-y += centaur.o -ifdef CONFIG_XEN -include $(srctree)/scripts/Makefile.xen -n-obj-xen := generic.o state.o amd.o cyrix.o centaur.o - -obj-y := $(call filterxen, $(obj-y), $(n-obj-xen)) -obj-y := $(call cherrypickxen, $(obj-y)) -endif +obj-$(CONFIG_XEN) := main.o if.o diff -r e6974eba1bae -r b0bf9ba32bfe arch/i386/kernel/swiotlb.c --- a/arch/i386/kernel/swiotlb.c Thu Jul 26 14:33:50 2007 -0600 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,745 +0,0 @@ -/* - * Dynamic DMA mapping support. - * - * This implementation is a fallback for platforms that do not support - * I/O TLBs (aka DMA address translation hardware). - * Copyright (C) 2000 Asit Mallick - * Copyright (C) 2000 Goutham Rao - * Copyright (C) 2000, 2003 Hewlett-Packard Co - * David Mosberger-Tang - * Copyright (C) 2005 Keir Fraser - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -int swiotlb; -EXPORT_SYMBOL(swiotlb); - -#define OFFSET(val,align) ((unsigned long)((val) & ( (align) - 1))) - -/* - * Maximum allowable number of contiguous slabs to map, - * must be a power of 2. What is the appropriate value ? - * The complexity of {map,unmap}_single is linearly dependent on this value. - */ -#define IO_TLB_SEGSIZE 128 - -/* - * log of the size of each IO TLB slab. The number of slabs is command line - * controllable. - */ -#define IO_TLB_SHIFT 11 - -int swiotlb_force; - -static char *iotlb_virt_start; -static unsigned long iotlb_nslabs; - -/* - * Used to do a quick range check in swiotlb_unmap_single and - * swiotlb_sync_single_*, to see if the memory was in fact allocated by this - * API. - */ -static unsigned long iotlb_pfn_start, iotlb_pfn_end; - -/* Does the given dma address reside within the swiotlb aperture? */ -static inline int in_swiotlb_aperture(dma_addr_t dev_addr) -{ - unsigned long pfn = mfn_to_local_pfn(dev_addr >> PAGE_SHIFT); - return (pfn_valid(pfn) - && (pfn >= iotlb_pfn_start) - && (pfn < iotlb_pfn_end)); -} - -/* - * When the IOMMU overflows we return a fallback buffer. This sets the size. - */ -static unsigned long io_tlb_overflow = 32*1024; - -void *io_tlb_overflow_buffer; - -/* - * This is a free list describing the number of free entries available from - * each index - */ -static unsigned int *io_tlb_list; -static unsigned int io_tlb_index; - -/* - * We need to save away the original address corresponding to a mapped entry - * for the sync operations. - */ -static struct phys_addr { - struct page *page; - unsigned int offset; -} *io_tlb_orig_addr; - -/* - * Protect the above data structures in the map and unmap calls - */ -static DEFINE_SPINLOCK(io_tlb_lock); - -static unsigned int dma_bits; -static unsigned int __initdata max_dma_bits = 32; -static int __init -setup_dma_bits(char *str) -{ - max_dma_bits = simple_strtoul(str, NULL, 0); - return 0; -} -__setup("dma_bits=", setup_dma_bits); - -static int __init -setup_io_tlb_npages(char *str) -{ - /* Unlike ia64, the size is aperture in megabytes, not 'slabs'! */ - if (isdigit(*str)) { - iotlb_nslabs = simple_strtoul(str, &str, 0) << - (20 - IO_TLB_SHIFT); - iotlb_nslabs = ALIGN(iotlb_nslabs, IO_TLB_SEGSIZE); - /* Round up to power of two (xen_create_contiguous_region). */ - while (iotlb_nslabs & (iotlb_nslabs-1)) - iotlb_nslabs += iotlb_nslabs & ~(iotlb_nslabs-1); - } - if (*str == ',') - ++str; - /* - * NB. 'force' enables the swiotlb, but doesn't force its use for - * every DMA like it does on native Linux. 'off' forcibly disables - * use of the swiotlb. - */ - if (!strcmp(str, "force")) - swiotlb_force = 1; - else if (!strcmp(str, "off")) - swiotlb_force = -1; - return 1; -} -__setup("swiotlb=", setup_io_tlb_npages); -/* make io_tlb_overflow tunable too? */ - -/* - * Statically reserve bounce buffer space and initialize bounce buffer data - * structures for the software IO TLB used to implement the PCI DMA API. - */ -void -swiotlb_init_with_default_size (size_t default_size) -{ - unsigned long i, bytes; - int rc; - - if (!iotlb_nslabs) { - iotlb_nslabs = (default_size >> IO_TLB_SHIFT); - iotlb_nslabs = ALIGN(iotlb_nslabs, IO_TLB_SEGSIZE); - /* Round up to power of two (xen_create_contiguous_region). */ - while (iotlb_nslabs & (iotlb_nslabs-1)) - iotlb_nslabs += iotlb_nslabs & ~(iotlb_nslabs-1); - } - - bytes = iotlb_nslabs * (1UL << IO_TLB_SHIFT); - - /* - * Get IO TLB memory from the low pages - */ - iotlb_virt_start = alloc_bootmem_low_pages(bytes); - if (!iotlb_virt_start) - panic("Cannot allocate SWIOTLB buffer!\n"); - - dma_bits = get_order(IO_TLB_SEGSIZE << IO_TLB_SHIFT) + PAGE_SHIFT; - for (i = 0; i < iotlb_nslabs; i += IO_TLB_SEGSIZE) { - do { - rc = xen_create_contiguous_region( - (unsigned long)iotlb_virt_start + (i << IO_TLB_SHIFT), - get_order(IO_TLB_SEGSIZE << IO_TLB_SHIFT), - dma_bits); - } while (rc && dma_bits++ < max_dma_bits); - if (rc) { - if (i == 0) - panic("No suitable physical memory available for SWIOTLB buffer!\n" - "Use dom0_mem Xen boot parameter to reserve\n" - "some DMA memory (e.g., dom0_mem=-128M).\n"); - iotlb_nslabs = i; - i <<= IO_TLB_SHIFT; - free_bootmem(__pa(iotlb_virt_start + i), bytes - i); - bytes = i; - for (dma_bits = 0; i > 0; i -= IO_TLB_SEGSIZE << IO_TLB_SHIFT) { - unsigned int bits = fls64(virt_to_bus(iotlb_virt_start + i - 1)); - - if (bits > dma_bits) - dma_bits = bits; - } - break; - } - } - - /* - * Allocate and initialize the free list array. This array is used - * to find contiguous free memory regions of size up to IO_TLB_SEGSIZE. - */ - io_tlb_list = alloc_bootmem(iotlb_nslabs * sizeof(int)); - for (i = 0; i < iotlb_nslabs; i++) - io_tlb_list[i] = IO_TLB_SEGSIZE - OFFSET(i, IO_TLB_SEGSIZE); - io_tlb_index = 0; - io_tlb_orig_addr = alloc_bootmem( - iotlb_nslabs * sizeof(*io_tlb_orig_addr)); - - /* - * Get the overflow emergency buffer - */ - io_tlb_overflow_buffer = alloc_bootmem_low(io_tlb_overflow); - if (!io_tlb_overflow_buffer) - panic("Cannot allocate SWIOTLB overflow buffer!\n"); - - do { - rc = xen_create_contiguous_region( - (unsigned long)io_tlb_overflow_buffer, - get_order(io_tlb_overflow), - dma_bits); - } while (rc && dma_bits++ < max_dma_bits); - if (rc) - panic("No suitable physical memory available for SWIOTLB overflow buffer!\n"); - - iotlb_pfn_start = __pa(iotlb_virt_start) >> PAGE_SHIFT; - iotlb_pfn_end = iotlb_pfn_start + (bytes >> PAGE_SHIFT); - - printk(KERN_INFO "Software IO TLB enabled: \n" - " Aperture: %lu megabytes\n" - " Kernel range: %p - %p\n" - " Address size: %u bits\n", - bytes >> 20, - iotlb_virt_start, iotlb_virt_start + bytes, - dma_bits); -} - -void -swiotlb_init(void) -{ - long ram_end; - size_t defsz = 64 * (1 << 20); /* 64MB default size */ - - if (swiotlb_force == 1) { - swiotlb = 1; - } else if ((swiotlb_force != -1) && - is_running_on_xen() && - is_initial_xendomain()) { - /* Domain 0 always has a swiotlb. */ - ram_end = HYPERVISOR_memory_op(XENMEM_maximum_ram_page, NULL); - if (ram_end <= 0x7ffff) - defsz = 2 * (1 << 20); /* 2MB on <2GB on systems. */ - swiotlb = 1; - } - - if (swiotlb) - swiotlb_init_with_default_size(defsz); - else - printk(KERN_INFO "Software IO TLB disabled\n"); -} - -/* - * We use __copy_to_user_inatomic to transfer to the host buffer because the - * buffer may be mapped read-only (e.g, in blkback driver) but lower-level - * drivers map the buffer for DMA_BIDIRECTIONAL access. This causes an - * unnecessary copy from the aperture to the host buffer, and a page fault. - */ -static void -__sync_single(struct phys_addr buffer, char *dma_addr, size_t size, int dir) -{ - if (PageHighMem(buffer.page)) { - size_t len, bytes; - char *dev, *host, *kmp; - len = size; - while (len != 0) { - unsigned long flags; - - if (((bytes = len) + buffer.offset) > PAGE_SIZE) - bytes = PAGE_SIZE - buffer.offset; - local_irq_save(flags); /* protects KM_BOUNCE_READ */ - kmp = kmap_atomic(buffer.page, KM_BOUNCE_READ); - dev = dma_addr + size - len; - host = kmp + buffer.offset; - if (dir == DMA_FROM_DEVICE) { - if (__copy_to_user_inatomic(host, dev, bytes)) - /* inaccessible */; - } else - memcpy(dev, host, bytes); - kunmap_atomic(kmp, KM_BOUNCE_READ); - local_irq_restore(flags); - len -= bytes; - buffer.page++; - buffer.offset = 0; - } - } else { - char *host = (char *)phys_to_virt( - page_to_pseudophys(buffer.page)) + buffer.offset; - if (dir == DMA_FROM_DEVICE) { - if (__copy_to_user_inatomic(host, dma_addr, size)) - /* inaccessible */; - } else if (dir == DMA_TO_DEVICE) - memcpy(dma_addr, host, size); - } -} - -/* - * Allocates bounce buffer and returns its kernel virtual address. - */ -static void * -map_single(struct device *hwdev, struct phys_addr buffer, size_t size, int dir) -{ - unsigned long flags; - char *dma_addr; - unsigned int nslots, stride, index, wrap; - struct phys_addr slot_buf; - int i; - - /* - * For mappings greater than a page, we limit the stride (and - * hence alignment) to a page size. - */ - nslots = ALIGN(size, 1 << IO_TLB_SHIFT) >> IO_TLB_SHIFT; - if (size > PAGE_SIZE) - stride = (1 << (PAGE_SHIFT - IO_TLB_SHIFT)); - else - stride = 1; - - BUG_ON(!nslots); - - /* - * Find suitable number of IO TLB entries size that will fit this - * request and allocate a buffer from that IO TLB pool. - */ - spin_lock_irqsave(&io_tlb_lock, flags); - { - wrap = index = ALIGN(io_tlb_index, stride); - - if (index >= iotlb_nslabs) - wrap = index = 0; - - do { - /* - * If we find a slot that indicates we have 'nslots' - * number of contiguous buffers, we allocate the - * buffers from that slot and mark the entries as '0' - * indicating unavailable. - */ - if (io_tlb_list[index] >= nslots) { - int count = 0; - - for (i = index; i < (int)(index + nslots); i++) - io_tlb_list[i] = 0; - for (i = index - 1; - (OFFSET(i, IO_TLB_SEGSIZE) != - IO_TLB_SEGSIZE -1) && io_tlb_list[i]; - i--) - io_tlb_list[i] = ++count; - dma_addr = iotlb_virt_start + - (index << IO_TLB_SHIFT); - - /* - * Update the indices to avoid searching in - * the next round. - */ - io_tlb_index = - ((index + nslots) < iotlb_nslabs - ? (index + nslots) : 0); - - goto found; - } - index += stride; - if (index >= iotlb_nslabs) - index = 0; - } while (index != wrap); - - spin_unlock_irqrestore(&io_tlb_lock, flags); - return NULL; - } - found: - spin_unlock_irqrestore(&io_tlb_lock, flags); - - /* - * Save away the mapping from the original address to the DMA address. - * This is needed when we sync the memory. Then we sync the buffer if - * needed. - */ - slot_buf = buffer; - for (i = 0; i < nslots; i++) { - slot_buf.page += slot_buf.offset >> PAGE_SHIFT; - slot_buf.offset &= PAGE_SIZE - 1; - io_tlb_orig_addr[index+i] = slot_buf; - slot_buf.offset += 1 << IO_TLB_SHIFT; - } - if ((dir == DMA_TO_DEVICE) || (dir == DMA_BIDIRECTIONAL)) - __sync_single(buffer, dma_addr, size, DMA_TO_DEVICE); - - return dma_addr; -} - -struct phys_addr dma_addr_to_phys_addr(char *dma_addr) -{ - int index = (dma_addr - iotlb_virt_start) >> IO_TLB_SHIFT; - struct phys_addr buffer = io_tlb_orig_addr[index]; - buffer.offset += (long)dma_addr & ((1 << IO_TLB_SHIFT) - 1); - buffer.page += buffer.offset >> PAGE_SHIFT; - buffer.offset &= PAGE_SIZE - 1; - return buffer; -} - -/* - * dma_addr is the kernel virtual address of the bounce buffer to unmap. - */ -static void -unmap_single(struct device *hwdev, char *dma_addr, size_t size, int dir) -{ - unsigned long flags; - int i, count, nslots = ALIGN(size, 1 << IO_TLB_SHIFT) >> IO_TLB_SHIFT; - int index = (dma_addr - iotlb_virt_start) >> IO_TLB_SHIFT; - struct phys_addr buffer = dma_addr_to_phys_addr(dma_addr); - - /* - * First, sync the memory before unmapping the entry - */ - if ((dir == DMA_FROM_DEVICE) || (dir == DMA_BIDIRECTIONAL)) - __sync_single(buffer, dma_addr, size, DMA_FROM_DEVICE); - - /* - * Return the buffer to the free list by setting the corresponding - * entries to indicate the number of contigous entries available. - * While returning the entries to the free list, we merge the entries - * with slots below and above the pool being returned. - */ - spin_lock_irqsave(&io_tlb_lock, flags); - { - count = ((index + nslots) < ALIGN(index + 1, IO_TLB_SEGSIZE) ? - io_tlb_list[index + nslots] : 0); - /* - * Step 1: return the slots to the free list, merging the - * slots with superceeding slots - */ - for (i = index + nslots - 1; i >= index; i--) - io_tlb_list[i] = ++count; - /* - * Step 2: merge the returned slots with the preceding slots, - * if available (non zero) - */ - for (i = index - 1; - (OFFSET(i, IO_TLB_SEGSIZE) != - IO_TLB_SEGSIZE -1) && io_tlb_list[i]; - i--) - io_tlb_list[i] = ++count; - } - spin_unlock_irqrestore(&io_tlb_lock, flags); -} - -static void -sync_single(struct device *hwdev, char *dma_addr, size_t size, int dir) -{ - struct phys_addr buffer = dma_addr_to_phys_addr(dma_addr); - BUG_ON((dir != DMA_FROM_DEVICE) && (dir != DMA_TO_DEVICE)); - __sync_single(buffer, dma_addr, size, dir); -} - -static void -swiotlb_full(struct device *dev, size_t size, int dir, int do_panic) -{ - /* - * Ran out of IOMMU space for this operation. This is very bad. - * Unfortunately the drivers cannot handle this operation properly. - * unless they check for pci_dma_mapping_error (most don't) - * When the mapping is small enough return a static buffer to limit - * the damage, or panic when the transfer is too big. - */ - printk(KERN_ERR "PCI-DMA: Out of SW-IOMMU space for %lu bytes at " - "device %s\n", (unsigned long)size, dev ? dev->bus_id : "?"); - - if (size > io_tlb_overflow && do_panic) { - if (dir == PCI_DMA_FROMDEVICE || dir == PCI_DMA_BIDIRECTIONAL) - panic("PCI-DMA: Memory would be corrupted\n"); - if (dir == PCI_DMA_TODEVICE || dir == PCI_DMA_BIDIRECTIONAL) - panic("PCI-DMA: Random memory would be DMAed\n"); - } -} - -/* - * Map a single buffer of the indicated size for DMA in streaming mode. The - * PCI address to use is returned. - * - * Once the device is given the dma address, the device owns this memory until - * either swiotlb_unmap_single or swiotlb_dma_sync_single is performed. - */ -dma_addr_t -swiotlb_map_single(struct device *hwdev, void *ptr, size_t size, int dir) -{ - dma_addr_t dev_addr = gnttab_dma_map_page(virt_to_page(ptr)) + - offset_in_page(ptr); - void *map; - struct phys_addr buffer; - - BUG_ON(dir == DMA_NONE); - - /* - * If the pointer passed in happens to be in the device's DMA window, - * we can safely return the device addr and not worry about bounce - * buffering it. - */ - if (!range_straddles_page_boundary(__pa(ptr), size) && - !address_needs_mapping(hwdev, dev_addr)) - return dev_addr; - - /* - * Oh well, have to allocate and map a bounce buffer. - */ - gnttab_dma_unmap_page(dev_addr); - buffer.page = virt_to_page(ptr); - buffer.offset = (unsigned long)ptr & ~PAGE_MASK; - map = map_single(hwdev, buffer, size, dir); - if (!map) { - swiotlb_full(hwdev, size, dir, 1); - map = io_tlb_overflow_buffer; - } - - dev_addr = virt_to_bus(map); - return dev_addr; -} - -/* - * Unmap a single streaming mode DMA translation. The dma_addr and size must - * match what was provided for in a previous swiotlb_map_single call. All - * other usages are undefined. - * - * After this call, reads by the cpu to the buffer are guaranteed to see - * whatever the device wrote there. - */ -void -swiotlb_unmap_single(struct device *hwdev, dma_addr_t dev_addr, size_t size, - int dir) -{ - BUG_ON(dir == DMA_NONE); - if (in_swiotlb_aperture(dev_addr)) - unmap_single(hwdev, bus_to_virt(dev_addr), size, dir); - else - gnttab_dma_unmap_page(dev_addr); -} - -/* - * Make physical memory consistent for a single streaming mode DMA translation - * after a transfer. - * - * If you perform a swiotlb_map_single() but wish to interrogate the buffer - * using the cpu, yet do not wish to teardown the PCI dma mapping, you must - * call this function before doing so. At the next point you give the PCI dma - * address back to the card, you must first perform a - * swiotlb_dma_sync_for_device, and then the device again owns the buffer - */ -void -swiotlb_sync_single_for_cpu(struct device *hwdev, dma_addr_t dev_addr, - size_t size, int dir) -{ - BUG_ON(dir == DMA_NONE); - if (in_swiotlb_aperture(dev_addr)) - sync_single(hwdev, bus_to_virt(dev_addr), size, dir); -} - -void -swiotlb_sync_single_for_device(struct device *hwdev, dma_addr_t dev_addr, - size_t size, int dir) -{ - BUG_ON(dir == DMA_NONE); - if (in_swiotlb_aperture(dev_addr)) - sync_single(hwdev, bus_to_virt(dev_addr), size, dir); -} - -/* - * Map a set of buffers described by scatterlist in streaming mode for DMA. - * This is the scatter-gather version of the above swiotlb_map_single - * interface. Here the scatter gather list elements are each tagged with the - * appropriate dma address and length. They are obtained via - * sg_dma_{address,length}(SG). - * - * NOTE: An implementation may be able to use a smaller number of - * DMA address/length pairs than there are SG table elements. - * (for example via virtual mapping capabilities) - * The routine returns the number of addr/length pairs actually - * used, at most nents. - * - * Device ownership issues as mentioned above for swiotlb_map_single are the - * same here. - */ -int -swiotlb_map_sg(struct device *hwdev, struct scatterlist *sg, int nelems, - int dir) -{ - struct phys_addr buffer; - dma_addr_t dev_addr; - char *map; - int i; - - BUG_ON(dir == DMA_NONE); - - for (i = 0; i < nelems; i++, sg++) { - dev_addr = gnttab_dma_map_page(sg->page) + sg->offset; - - if (range_straddles_page_boundary(page_to_pseudophys(sg->page) - + sg->offset, sg->length) - || address_needs_mapping(hwdev, dev_addr)) { - gnttab_dma_unmap_page(dev_addr); - buffer.page = sg->page; - buffer.offset = sg->offset; - map = map_single(hwdev, buffer, sg->length, dir); - if (!map) { - /* Don't panic here, we expect map_sg users - to do proper error handling. */ - swiotlb_full(hwdev, sg->length, dir, 0); - swiotlb_unmap_sg(hwdev, sg - i, i, dir); - sg[0].dma_length = 0; - return 0; - } - sg->dma_address = (dma_addr_t)virt_to_bus(map); - } else - sg->dma_address = dev_addr; - sg->dma_length = sg->length; - } - return nelems; -} - -/* - * Unmap a set of streaming mode DMA translations. Again, cpu read rules - * concerning calls here are the same as for swiotlb_unmap_single() above. - */ -void -swiotlb_unmap_sg(struct device *hwdev, struct scatterlist *sg, int nelems, - int dir) -{ - int i; - - BUG_ON(dir == DMA_NONE); - - for (i = 0; i < nelems; i++, sg++) - if (in_swiotlb_aperture(sg->dma_address)) - unmap_single(hwdev, - (void *)bus_to_virt(sg->dma_address), - sg->dma_length, dir); - else - gnttab_dma_unmap_page(sg->dma_address); -} - -/* - * Make physical memory consistent for a set of streaming mode DMA translations - * after a transfer. - * - * The same as swiotlb_sync_single_* but for a scatter-gather list, same rules - * and usage. - */ -void -swiotlb_sync_sg_for_cpu(struct device *hwdev, struct scatterlist *sg, - int nelems, int dir) -{ - int i; - - BUG_ON(dir == DMA_NONE); - - for (i = 0; i < nelems; i++, sg++) - if (in_swiotlb_aperture(sg->dma_address)) - sync_single(hwdev, - (void *)bus_to_virt(sg->dma_address), - sg->dma_length, dir); -} - -void -swiotlb_sync_sg_for_device(struct device *hwdev, struct scatterlist *sg, - int nelems, int dir) -{ - int i; - - BUG_ON(dir == DMA_NONE); - - for (i = 0; i < nelems; i++, sg++) - if (in_swiotlb_aperture(sg->dma_address)) - sync_single(hwdev, - (void *)bus_to_virt(sg->dma_address), - sg->dma_length, dir); -} - -#ifdef CONFIG_HIGHMEM - -dma_addr_t -swiotlb_map_page(struct device *hwdev, struct page *page, - unsigned long offset, size_t size, - enum dma_data_direction direction) -{ - struct phys_addr buffer; - dma_addr_t dev_addr; - char *map; - - dev_addr = gnttab_dma_map_page(page) + offset; - if (address_needs_mapping(hwdev, dev_addr)) { - gnttab_dma_unmap_page(dev_addr); - buffer.page = page; - buffer.offset = offset; - map = map_single(hwdev, buffer, size, direction); - if (!map) { - swiotlb_full(hwdev, size, direction, 1); - map = io_tlb_overflow_buffer; - } - dev_addr = (dma_addr_t)virt_to_bus(map); - } - - return dev_addr; -} - -void -swiotlb_unmap_page(struct device *hwdev, dma_addr_t dma_address, - size_t size, enum dma_data_direction direction) -{ - BUG_ON(direction == DMA_NONE); - if (in_swiotlb_aperture(dma_address)) - unmap_single(hwdev, bus_to_virt(dma_address), size, direction); - else - gnttab_dma_unmap_page(dma_address); -} - -#endif - -int -swiotlb_dma_mapping_error(dma_addr_t dma_addr) -{ - return (dma_addr == virt_to_bus(io_tlb_overflow_buffer)); -} - -/* - * Return whether the given PCI device DMA address mask can be supported - * properly. For example, if your device can only drive the low 24-bits - * during PCI bus mastering, then you would pass 0x00ffffff as the mask to - * this function. - */ -int -swiotlb_dma_supported (struct device *hwdev, u64 mask) -{ - return (mask >= ((1UL << dma_bits) - 1)); -} - -EXPORT_SYMBOL(swiotlb_init); -EXPORT_SYMBOL(swiotlb_map_single); -EXPORT_SYMBOL(swiotlb_unmap_single); -EXPORT_SYMBOL(swiotlb_map_sg); -EXPORT_SYMBOL(swiotlb_unmap_sg); -EXPORT_SYMBOL(swiotlb_sync_single_for_cpu); -EXPORT_SYMBOL(swiotlb_sync_single_for_device); -EXPORT_SYMBOL(swiotlb_sync_sg_for_cpu); -EXPORT_SYMBOL(swiotlb_sync_sg_for_device); -EXPORT_SYMBOL(swiotlb_dma_mapping_error); -EXPORT_SYMBOL(swiotlb_dma_supported); diff -r e6974eba1bae -r b0bf9ba32bfe arch/i386/kernel/time-xen.c --- a/arch/i386/kernel/time-xen.c Thu Jul 26 14:33:50 2007 -0600 +++ b/arch/i386/kernel/time-xen.c Fri Jul 27 08:15:50 2007 -0600 @@ -867,9 +867,9 @@ static int timer_resume(struct sys_devic return 0; } +void time_resume(void); static struct sysdev_class timer_sysclass = { - .resume = timer_resume, - .suspend = timer_suspend, + .resume = time_resume, set_kset_name("timer"), }; diff -r e6974eba1bae -r b0bf9ba32bfe arch/i386/mm/Makefile --- a/arch/i386/mm/Makefile Thu Jul 26 14:33:50 2007 -0600 +++ b/arch/i386/mm/Makefile Fri Jul 27 08:15:50 2007 -0600 @@ -8,11 +8,4 @@ obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpag obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o obj-$(CONFIG_HIGHMEM) += highmem.o obj-$(CONFIG_BOOT_IOREMAP) += boot_ioremap.o - -ifdef CONFIG_XEN -include $(srctree)/scripts/Makefile.xen - -obj-y += hypervisor.o - -obj-y := $(call cherrypickxen, $(obj-y)) -endif +obj-$(CONFIG_XEN) += hypervisor.o diff -r e6974eba1bae -r b0bf9ba32bfe arch/i386/mm/fault-xen.c --- a/arch/i386/mm/fault-xen.c Thu Jul 26 14:33:50 2007 -0600 +++ b/arch/i386/mm/fault-xen.c Fri Jul 27 08:15:50 2007 -0600 @@ -739,18 +739,31 @@ void vmalloc_sync_all(void) * problematic: insync can only get set bits added, and updates to * start are only improving performance (without affecting correctness * if undone). - */ - static DECLARE_BITMAP(insync, PTRS_PER_PGD); + * XEN: To work on PAE, we need to iterate over PMDs rather than PGDs. + * This change works just fine with 2-level paging too. + */ +#define sync_index(a) ((a) >> PMD_SHIFT) + static DECLARE_BITMAP(insync, PTRS_PER_PGD*PTRS_PER_PMD); static unsigned long start = TASK_SIZE; unsigned long address; BUILD_BUG_ON(TASK_SIZE & ~PGDIR_MASK); - for (address = start; address >= TASK_SIZE; address += PGDIR_SIZE) { - if (!test_bit(pgd_index(address), insync)) { + for (address = start; + address >= TASK_SIZE && address < hypervisor_virt_start; + address += 1UL << PMD_SHIFT) { + if (!test_bit(sync_index(address), insync)) { unsigned long flags; struct page *page; spin_lock_irqsave(&pgd_lock, flags); + /* + * XEN: vmalloc_sync_one() failure path logic assumes + * pgd_list is non-empty. + */ + if (unlikely(!pgd_list)) { + spin_unlock_irqrestore(&pgd_lock, flags); + return; + } for (page = pgd_list; page; page = (struct page *)page->index) if (!vmalloc_sync_one(page_address(page), @@ -760,10 +773,10 @@ void vmalloc_sync_all(void) } spin_unlock_irqrestore(&pgd_lock, flags); if (!page) - set_bit(pgd_index(address), insync); + set_bit(sync_index(address), insync); } - if (address == start && test_bit(pgd_index(address), insync)) - start = address + PGDIR_SIZE; - } -} -#endif + if (address == start && test_bit(sync_index(address), insync)) + start = address + (1UL << PMD_SHIFT); + } +} +#endif diff -r e6974eba1bae -r b0bf9ba32bfe arch/i386/mm/ioremap-xen.c --- a/arch/i386/mm/ioremap-xen.c Thu Jul 26 14:33:50 2007 -0600 +++ b/arch/i386/mm/ioremap-xen.c Fri Jul 27 08:15:50 2007 -0600 @@ -74,7 +74,7 @@ static int __direct_remap_pfn_range(stru /* * Fill in the machine address: PTE ptr is done later by - * __direct_remap_area_pages(). + * apply_to_page_range(). */ v->val = __pte_val(pfn_pte_ma(mfn, prot)); diff -r e6974eba1bae -r b0bf9ba32bfe arch/i386/pci/Makefile --- a/arch/i386/pci/Makefile Thu Jul 26 14:33:50 2007 -0600 +++ b/arch/i386/pci/Makefile Fri Jul 27 08:15:50 2007 -0600 @@ -16,8 +16,3 @@ pci-$(CONFIG_X86_NUMAQ) := numa.o irq.o pci-$(CONFIG_X86_NUMAQ) := numa.o irq.o obj-y += $(pci-y) common.o - -ifdef CONFIG_XEN -include $(srctree)/scripts/Makefile.xen -obj-y := $(call cherrypickxen, $(obj-y)) -endif diff -r e6974eba1bae -r b0bf9ba32bfe arch/i386/power/cpu.c --- a/arch/i386/power/cpu.c Thu Jul 26 14:33:50 2007 -0600 +++ b/arch/i386/power/cpu.c Fri Jul 27 08:15:50 2007 -0600 @@ -62,11 +62,12 @@ static void do_fpu_end(void) static void fix_processor_context(void) { +#ifndef CONFIG_X86_NO_TSS int cpu = smp_processor_id(); struct tss_struct * t = &per_cpu(init_tss, cpu); set_tss_desc(cpu,t); /* This just modifies memory; should not be necessary. But... This is necessary, because 386 hardware has concept of busy TSS or some similar stupidity. */ - +#endif load_TR_desc(); /* This does ltr */ load_LDT(¤t->active_mm->context); /* This does lldt */ diff -r e6974eba1bae -r b0bf9ba32bfe arch/powerpc/platforms/xen/hcall.c --- a/arch/powerpc/platforms/xen/hcall.c Thu Jul 26 14:33:50 2007 -0600 +++ b/arch/powerpc/platforms/xen/hcall.c Fri Jul 27 08:15:50 2007 -0600 @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -680,6 +681,145 @@ static int xenppc_privcmd_event_channel_ return ret; } +static int xenppc_acmcmd_op(privcmd_hypercall_t *hypercall) +{ + xen_acmctl_t kern_op; + xen_acmctl_t __user *user_op = (xen_acmctl_t __user *)hypercall->arg[0]; + void *op_desc; + void *desc = NULL, *desc2 = NULL, *desc3 = NULL, *desc4 = NULL; + int ret = 0; + + if (copy_from_user(&kern_op, user_op, sizeof(xen_acmctl_t))) + return -EFAULT; + + if (kern_op.interface_version != ACM_INTERFACE_VERSION) { + printk(KERN_WARNING "%s: %s %x != %x\n", __func__, current->comm, + kern_op.interface_version, ACM_INTERFACE_VERSION); + return -EACCES; + } + + op_desc = xencomm_map(&kern_op, sizeof(xen_acmctl_t)); + if (op_desc == NULL) + return -ENOMEM; + + switch (kern_op.cmd) { + case ACMOP_setpolicy: + desc = xencomm_map( + xen_guest_handle(kern_op.u.setpolicy.pushcache), + kern_op.u.setpolicy.pushcache_size); + + if (desc == NULL) + ret = -ENOMEM; + + set_xen_guest_handle(kern_op.u.setpolicy.pushcache, + desc); + break; + case ACMOP_getpolicy: + desc = xencomm_map( + xen_guest_handle(kern_op.u.getpolicy.pullcache), + kern_op.u.getpolicy.pullcache_size); + + if (desc == NULL) + ret = -ENOMEM; + + set_xen_guest_handle(kern_op.u.getpolicy.pullcache, + desc); + break; + case ACMOP_dumpstats: + desc = xencomm_map( + xen_guest_handle(kern_op.u.dumpstats.pullcache), + kern_op.u.dumpstats.pullcache_size); + + if (desc == NULL) + ret = -ENOMEM; + + set_xen_guest_handle(kern_op.u.dumpstats.pullcache, + desc); + break; + case ACMOP_getssid: + desc = xencomm_map( + xen_guest_handle(kern_op.u.getssid.ssidbuf), + kern_op.u.getssid.ssidbuf_size); + + if (desc == NULL) + ret = -ENOMEM; + + set_xen_guest_handle(kern_op.u.getssid.ssidbuf, + desc); + break; + case ACMOP_getdecision: + break; + case ACMOP_chgpolicy: + desc = xencomm_map( + xen_guest_handle(kern_op.u.change_policy.policy_pushcache), + kern_op.u.change_policy.policy_pushcache_size); + desc2 = xencomm_map( + xen_guest_handle(kern_op.u.change_policy.del_array), + kern_op.u.change_policy.delarray_size); + desc3 = xencomm_map( + xen_guest_handle(kern_op.u.change_policy.chg_array), + kern_op.u.change_policy.chgarray_size); + desc4 = xencomm_map( + xen_guest_handle(kern_op.u.change_policy.err_array), + kern_op.u.change_policy.errarray_size); + + if (desc == NULL || desc2 == NULL || + desc3 == NULL || desc4 == NULL) { + ret = -ENOMEM; + goto out; + } + + set_xen_guest_handle(kern_op.u.change_policy.policy_pushcache, + desc); + set_xen_guest_handle(kern_op.u.change_policy.del_array, + desc2); + set_xen_guest_handle(kern_op.u.change_policy.chg_array, + desc3); + set_xen_guest_handle(kern_op.u.change_policy.err_array, + desc4); + break; + case ACMOP_relabeldoms: + desc = xencomm_map( + xen_guest_handle(kern_op.u.relabel_doms.relabel_map), + kern_op.u.relabel_doms.relabel_map_size); + desc2 = xencomm_map( + xen_guest_handle(kern_op.u.relabel_doms.err_array), + kern_op.u.relabel_doms.errarray_size); + + if (desc == NULL || desc2 == NULL) { + ret = -ENOMEM; + goto out; + } + + set_xen_guest_handle(kern_op.u.relabel_doms.relabel_map, + desc); + set_xen_guest_handle(kern_op.u.relabel_doms.err_array, + desc2); + break; + default: + printk(KERN_ERR "%s: unknown/unsupported acmctl cmd %d\n", + __func__, kern_op.cmd); + return -ENOSYS; + } + + if (ret) + goto out; /* error mapping the nested pointer */ + + ret = plpar_hcall_norets(XEN_MARK(hypercall->op),op_desc); + + if (copy_to_user(user_op, &kern_op, sizeof(xen_acmctl_t))) + ret = -EFAULT; + +out: + xencomm_free(desc); + xencomm_free(desc2); + xencomm_free(desc3); + xencomm_free(desc4); + xencomm_free(op_desc); + return ret; +} + + /* The PowerPC hypervisor runs in a separate address space from Linux * kernel/userspace, i.e. real mode. We must therefore translate userspace * pointers to something the hypervisor can make sense of. */ @@ -698,11 +838,11 @@ int privcmd_hypercall(privcmd_hypercall_ return xenppc_privcmd_version(hypercall); case __HYPERVISOR_event_channel_op: return xenppc_privcmd_event_channel_op(hypercall); + case __HYPERVISOR_acm_op: + return xenppc_acmcmd_op(hypercall); default: printk(KERN_ERR "%s: unknown hcall (%ld)\n", __func__, hypercall->op); - /* fallthru */ - /* below are the hcalls we know will fail and its ok */ - case __HYPERVISOR_acm_op: + /* maybe we'll get lucky and the hcall needs no translation. */ return plpar_hcall_norets(XEN_MARK(hypercall->op), hypercall->arg[0], hypercall->arg[1], diff -r e6974eba1bae -r b0bf9ba32bfe arch/powerpc/platforms/xen/setup.c --- a/arch/powerpc/platforms/xen/setup.c Thu Jul 26 14:33:50 2007 -0600 +++ b/arch/powerpc/platforms/xen/setup.c Fri Jul 27 08:15:50 2007 -0600 @@ -39,6 +39,7 @@ #include #include #include +#include #include "setup.h" #ifdef DEBUG @@ -287,6 +288,17 @@ unsigned int xenppc_get_irq(struct pt_re * is nothing for do_IRQ() to do. * XXX This means we aren't using IRQ stacks. */ return NO_IRQ; +} + +static void xenppc_enable_pmcs(void) +{ + unsigned long set, reset; + + power4_enable_pmcs(); + + set = 1UL << 63; + reset = 0; + plpar_hcall_norets(H_PERFMON, set, reset); } #ifdef CONFIG_KEXEC @@ -316,6 +328,7 @@ define_machine(xen) { .calibrate_decr = generic_calibrate_decr, .progress = xenppc_progress, .power_save = xenppc_power_save, + .enable_pmcs = xenppc_enable_pmcs, #ifdef CONFIG_KEXEC .machine_kexec = xen_machine_kexec, .machine_kexec_prepare = xen_machine_kexec_prepare, diff -r e6974eba1bae -r b0bf9ba32bfe arch/x86_64/Kconfig --- a/arch/x86_64/Kconfig Thu Jul 26 14:33:50 2007 -0600 +++ b/arch/x86_64/Kconfig Fri Jul 27 08:15:50 2007 -0600 @@ -594,9 +594,7 @@ menu "Power management options" menu "Power management options" depends on !XEN_UNPRIVILEGED_GUEST -if !X86_64_XEN -source kernel/power/Kconfig -endif +source "kernel/power/Kconfig" source "drivers/acpi/Kconfig" diff -r e6974eba1bae -r b0bf9ba32bfe arch/x86_64/Makefile --- a/arch/x86_64/Makefile Thu Jul 26 14:33:50 2007 -0600 +++ b/arch/x86_64/Makefile Fri Jul 27 08:15:50 2007 -0600 @@ -80,7 +80,6 @@ PHONY += bzImage bzlilo install archmrpr ifdef CONFIG_XEN CPPFLAGS := -Iinclude$(if $(KBUILD_SRC),2)/asm/mach-xen $(CPPFLAGS) -head-y := arch/x86_64/kernel/head-xen.o arch/x86_64/kernel/head64-xen.o arch/x86_64/kernel/init_task.o LDFLAGS_vmlinux := -e startup_64 boot := arch/i386/boot-xen .PHONY: vmlinuz diff -r e6974eba1bae -r b0bf9ba32bfe arch/x86_64/ia32/Makefile --- a/arch/x86_64/ia32/Makefile Thu Jul 26 14:33:50 2007 -0600 +++ b/arch/x86_64/ia32/Makefile Fri Jul 27 08:15:50 2007 -0600 @@ -37,15 +37,8 @@ AFLAGS_vsyscall-syscall.o = -m32 -Wa,-32 ifdef CONFIG_XEN AFLAGS_vsyscall-int80.o = -m32 -Wa,-32 -Iarch/i386/kernel -CFLAGS_syscall32-xen.o += -DUSE_INT80 -AFLAGS_syscall32_syscall-xen.o += -DUSE_INT80 +CFLAGS_syscall32.o += -DUSE_INT80 +AFLAGS_syscall32_syscall.o += -DUSE_INT80 -$(obj)/syscall32_syscall-xen.o: \ - $(foreach F,int80 sysenter syscall,$(obj)/vsyscall-$F.so) - -targets := $(foreach F,int80 sysenter syscall,vsyscall-$F.o vsyscall-$F.so) - -include $(srctree)/scripts/Makefile.xen - -obj-y := $(call cherrypickxen, $(obj-y)) +$(obj)/syscall32_syscall.o: $(obj)/vsyscall-int80.so endif diff -r e6974eba1bae -r b0bf9ba32bfe arch/x86_64/kernel/Makefile --- a/arch/x86_64/kernel/Makefile Thu Jul 26 14:33:50 2007 -0600 +++ b/arch/x86_64/kernel/Makefile Fri Jul 27 08:15:50 2007 -0600 @@ -57,18 +57,8 @@ msr-$(subst m,y,$(CONFIG_X86_MSR)) += . msr-$(subst m,y,$(CONFIG_X86_MSR)) += ../../i386/kernel/msr.o alternative-y += ../../i386/kernel/alternative.o -ifdef CONFIG_XEN -time-y += ../../i386/kernel/time-xen.o -pci-dma-y += ../../i386/kernel/pci-dma-xen.o -microcode-$(subst m,y,$(CONFIG_MICROCODE)) := ../../i386/kernel/microcode-xen.o -quirks-y := ../../i386/kernel/quirks-xen.o +time-$(CONFIG_XEN) += ../../i386/kernel/time.o +pci-dma-$(CONFIG_XEN) += ../../i386/kernel/pci-dma.o -n-obj-xen := i8259.o reboot.o i8237.o smpboot.o trampoline.o - -include $(srctree)/scripts/Makefile.xen - -obj-y := $(call filterxen, $(obj-y), $(n-obj-xen)) -obj-y := $(call cherrypickxen, $(obj-y)) -extra-y := $(call cherrypickxen, $(extra-y)) -%/head-xen.o %/head-xen.s: EXTRA_AFLAGS := -endif +disabled-obj-$(CONFIG_XEN) := i8259.o reboot.o smpboot.o trampoline.o +%/head.o %/head.s: $(if $(CONFIG_XEN),EXTRA_AFLAGS,dummy) := diff -r e6974eba1bae -r b0bf9ba32bfe arch/x86_64/kernel/acpi/Makefile --- a/arch/x86_64/kernel/acpi/Makefile Thu Jul 26 14:33:50 2007 -0600 +++ b/arch/x86_64/kernel/acpi/Makefile Fri Jul 27 08:15:50 2007 -0600 @@ -8,3 +8,7 @@ endif endif boot-$(CONFIG_XEN) := ../../../i386/kernel/acpi/boot-xen.o +ifdef CONFIG_XEN +include $(srctree)/scripts/Makefile.xen +obj-y := $(call cherrypickxen, $(obj-y)) +endif diff -r e6974eba1bae -r b0bf9ba32bfe arch/x86_64/kernel/acpi/sleep-xen.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/arch/x86_64/kernel/acpi/sleep-xen.c Fri Jul 27 08:15:50 2007 -0600 @@ -0,0 +1,162 @@ +/* + * acpi.c - Architecture-Specific Low-Level ACPI Support + * + * Copyright (C) 2001, 2002 Paul Diefenbaugh + * Copyright (C) 2001 Jun Nakajima + * Copyright (C) 2001 Patrick Mochel + * Copyright (C) 2002 Andi Kleen, SuSE Labs (x86-64 port) + * Copyright (C) 2003 Pavel Machek, SuSE Labs + * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* -------------------------------------------------------------------------- + Low-Level Sleep Support + -------------------------------------------------------------------------- */ + +#ifdef CONFIG_ACPI_SLEEP + +/* address in low memory of the wakeup routine. */ +unsigned long acpi_wakeup_address = 0; +unsigned long acpi_video_flags; +extern char wakeup_start, wakeup_end; + +extern unsigned long FASTCALL(acpi_copy_wakeup_routine(unsigned long)); + +static pgd_t low_ptr; + +static void init_low_mapping(void) +{ + pgd_t *slot0 = pgd_offset(current->mm, 0UL); + low_ptr = *slot0; + set_pgd(slot0, *pgd_offset(current->mm, PAGE_OFFSET)); + WARN_ON(num_online_cpus() != 1); + local_flush_tlb(); +} + +/** + * acpi_save_state_mem - save kernel state + * + * Create an identity mapped page table and copy the wakeup routine to + * low memory. + */ +int acpi_save_state_mem(void) +{ +#ifndef CONFIG_ACPI_PV_SLEEP + init_low_mapping(); + + memcpy((void *)acpi_wakeup_address, &wakeup_start, + &wakeup_end - &wakeup_start); + acpi_copy_wakeup_routine(acpi_wakeup_address); +#endif + return 0; +} + +/* + * acpi_restore_state + */ +void acpi_restore_state_mem(void) +{ +#ifndef CONFIG_ACPI_PV_SLEEP + set_pgd(pgd_offset(current->mm, 0UL), low_ptr); + local_flush_tlb(); +#endif +} + +/** + * acpi_reserve_bootmem - do _very_ early ACPI initialisation + * + * We allocate a page in low memory for the wakeup + * routine for when we come back from a sleep state. The + * runtime allocator allows specification of <16M pages, but not + * <1M pages. + */ +void __init acpi_reserve_bootmem(void) +{ + acpi_wakeup_address = (unsigned long)alloc_bootmem_low(PAGE_SIZE); + if ((&wakeup_end - &wakeup_start) > PAGE_SIZE) + printk(KERN_CRIT + "ACPI: Wakeup code way too big, will crash on attempt to suspend\n"); +} + +static int __init acpi_sleep_setup(char *str) +{ + while ((str != NULL) && (*str != '\0')) { + if (strncmp(str, "s3_bios", 7) == 0) + acpi_video_flags = 1; + if (strncmp(str, "s3_mode", 7) == 0) + acpi_video_flags |= 2; + str = strchr(str, ','); + if (str != NULL) + str += strspn(str, ", \t"); + } + + return 1; +} + +__setup("acpi_sleep=", acpi_sleep_setup); + +#ifdef CONFIG_ACPI_PV_SLEEP +#include +#include +int acpi_notify_hypervisor_state(u8 sleep_state, + u32 pm1a_cnt, u32 pm1b_cnt) +{ + struct xen_platform_op op = { + .cmd = XENPF_enter_acpi_sleep, + .interface_version = XENPF_INTERFACE_VERSION, + .u = { + .enter_acpi_sleep = { + .pm1a_cnt_val = (u16)pm1a_cnt, + .pm1b_cnt_val = (u16)pm1b_cnt, + .sleep_state = sleep_state, + }, + }, + }; + + return HYPERVISOR_platform_op(&op); +} +#endif /* CONFIG_ACPI_PV_SLEEP */ + +#endif /*CONFIG_ACPI_SLEEP */ + +void acpi_pci_link_exit(void) +{ +} diff -r e6974eba1bae -r b0bf9ba32bfe arch/x86_64/kernel/head-xen.S --- a/arch/x86_64/kernel/head-xen.S Thu Jul 26 14:33:50 2007 -0600 +++ b/arch/x86_64/kernel/head-xen.S Fri Jul 27 08:15:50 2007 -0600 @@ -37,6 +37,13 @@ startup_64: pushq $0 # fake return address jmp x86_64_start_kernel +#ifdef CONFIG_ACPI_SLEEP +.org 0xf00 + .globl pGDT32 +pGDT32: + .word gdt_end-cpu_gdt_table-1 + .long cpu_gdt_table-__START_KERNEL_map +#endif ENTRY(stext) ENTRY(_stext) @@ -95,6 +102,14 @@ NEXT_PAGE(hypercall_page) CFI_ENDPROC #undef NEXT_PAGE + + .data +/* Just dummy symbol to allow compilation. Not used in sleep path */ +#ifdef CONFIG_ACPI_SLEEP + .align PAGE_SIZE +ENTRY(wakeup_level4_pgt) + .fill 512,8,0 +#endif .data diff -r e6974eba1bae -r b0bf9ba32bfe arch/x86_64/kernel/suspend.c --- a/arch/x86_64/kernel/suspend.c Thu Jul 26 14:33:50 2007 -0600 +++ b/arch/x86_64/kernel/suspend.c Fri Jul 27 08:15:50 2007 -0600 @@ -114,12 +114,14 @@ void restore_processor_state(void) void fix_processor_context(void) { +#ifndef CONFIG_X86_NO_TSS int cpu = smp_processor_id(); struct tss_struct *t = &per_cpu(init_tss, cpu); set_tss_desc(cpu,t); /* This just modifies memory; should not be neccessary. But... This is neccessary, because 386 hardware has concept of busy TSS or some similar stupidity. */ cpu_gdt(cpu)[GDT_ENTRY_TSS].type = 9; +#endif syscall_init(); /* This sets MSR_*STAR and related */ load_TR_desc(); /* This does ltr */ diff -r e6974eba1bae -r b0bf9ba32bfe arch/x86_64/mm/Makefile --- a/arch/x86_64/mm/Makefile Thu Jul 26 14:33:50 2007 -0600 +++ b/arch/x86_64/mm/Makefile Fri Jul 27 08:15:50 2007 -0600 @@ -7,15 +7,8 @@ obj-$(CONFIG_NUMA) += numa.o obj-$(CONFIG_NUMA) += numa.o obj-$(CONFIG_K8_NUMA) += k8topology.o obj-$(CONFIG_ACPI_NUMA) += srat.o +obj-$(CONFIG_XEN) += hypervisor.o hugetlbpage-y = ../../i386/mm/hugetlbpage.o - -ifdef CONFIG_XEN -include $(srctree)/scripts/Makefile.xen - -ioremap-y += ../../i386/mm/ioremap-xen.o -hypervisor-y += ../../i386/mm/hypervisor.o -obj-y += hypervisor.o - -obj-y := $(call cherrypickxen, $(obj-y)) -endif +ioremap-$(CONFIG_XEN) := ../../i386/mm/ioremap.o +hypervisor-y := ../../i386/mm/hypervisor.o diff -r e6974eba1bae -r b0bf9ba32bfe arch/x86_64/pci/Makefile --- a/arch/x86_64/pci/Makefile Thu Jul 26 14:33:50 2007 -0600 +++ b/arch/x86_64/pci/Makefile Fri Jul 27 08:15:50 2007 -0600 @@ -28,10 +28,3 @@ fixup-y += ../../i386/pci/fixup.o fixup-y += ../../i386/pci/fixup.o i386-y += ../../i386/pci/i386.o init-y += ../../i386/pci/init.o - -ifdef CONFIG_XEN -irq-y := ../../i386/pci/irq-xen.o -include $(srctree)/scripts/Makefile.xen - -obj-y := $(call cherrypickxen, $(obj-y)) -endif diff -r e6974eba1bae -r b0bf9ba32bfe buildconfigs/linux-defconfig_xen_x86_32 --- a/buildconfigs/linux-defconfig_xen_x86_32 Thu Jul 26 14:33:50 2007 -0600 +++ b/buildconfigs/linux-defconfig_xen_x86_32 Fri Jul 27 08:15:50 2007 -0600 @@ -202,11 +202,18 @@ CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y # Power management options (ACPI, APM) # CONFIG_PM=y +# CONFIG_PM_LEGACY is not set +CONFIG_PM_DEBUG=y +# CONFIG_SOFTWARE_SUSPEND is not set +CONFIG_SUSPEND_SMP=y # # ACPI (Advanced Configuration and Power Interface) Support # CONFIG_ACPI=y +CONFIG_ACPI_SLEEP=y +CONFIG_ACPI_SLEEP_PROC_FS=y +# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set CONFIG_ACPI_AC=m CONFIG_ACPI_BATTERY=m CONFIG_ACPI_BUTTON=m diff -r e6974eba1bae -r b0bf9ba32bfe buildconfigs/linux-defconfig_xen_x86_64 --- a/buildconfigs/linux-defconfig_xen_x86_64 Thu Jul 26 14:33:50 2007 -0600 +++ b/buildconfigs/linux-defconfig_xen_x86_64 Fri Jul 27 08:15:50 2007 -0600 @@ -161,11 +161,18 @@ CONFIG_GENERIC_PENDING_IRQ=y # Power management options # CONFIG_PM=y +# CONFIG_PM_LEGACY is not set +CONFIG_PM_DEBUG=y +# CONFIG_SOFTWARE_SUSPEND is not set +CONFIG_SUSPEND_SMP=y # # ACPI (Advanced Configuration and Power Interface) Support # CONFIG_ACPI=y +CONFIG_ACPI_SLEEP=y +CONFIG_ACPI_SLEEP_PROC_FS=y +# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set CONFIG_ACPI_AC=m CONFIG_ACPI_BATTERY=m CONFIG_ACPI_BUTTON=m diff -r e6974eba1bae -r b0bf9ba32bfe drivers/acpi/Kconfig --- a/drivers/acpi/Kconfig Thu Jul 26 14:33:50 2007 -0600 +++ b/drivers/acpi/Kconfig Fri Jul 27 08:15:50 2007 -0600 @@ -45,7 +45,7 @@ if ACPI config ACPI_SLEEP bool "Sleep States" - depends on X86 && (!SMP || SUSPEND_SMP) && !XEN + depends on X86 && (!SMP || SUSPEND_SMP) depends on PM default y ---help--- @@ -363,6 +363,10 @@ config ACPI_SBS A "Smart Battery" is quite old and quite rare compared to today's ACPI "Control Method" battery. +config ACPI_PV_SLEEP + bool + depends on X86 && XEN + default y endif # ACPI endmenu diff -r e6974eba1bae -r b0bf9ba32bfe drivers/acpi/hardware/hwsleep.c --- a/drivers/acpi/hardware/hwsleep.c Thu Jul 26 14:33:50 2007 -0600 +++ b/drivers/acpi/hardware/hwsleep.c Fri Jul 27 08:15:50 2007 -0600 @@ -327,6 +327,7 @@ acpi_status asmlinkage acpi_enter_sleep_ ACPI_FLUSH_CPU_CACHE(); +#ifndef CONFIG_ACPI_PV_SLEEP status = acpi_hw_register_write(ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1A_CONTROL, PM1Acontrol); @@ -337,6 +338,10 @@ acpi_status asmlinkage acpi_enter_sleep_ status = acpi_hw_register_write(ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1B_CONTROL, PM1Bcontrol); +#else + status = acpi_notify_hypervisor_state(sleep_state, + PM1Acontrol, PM1Bcontrol); +#endif if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } diff -r e6974eba1bae -r b0bf9ba32bfe drivers/acpi/sleep/main.c --- a/drivers/acpi/sleep/main.c Thu Jul 26 14:33:50 2007 -0600 +++ b/drivers/acpi/sleep/main.c Fri Jul 27 08:15:50 2007 -0600 @@ -91,7 +91,14 @@ static int acpi_pm_enter(suspend_state_t break; case PM_SUSPEND_MEM: +#ifdef CONFIG_ACPI_PV_SLEEP + /* Hyperviosr will save and restore CPU context + * and then we can skip low level housekeeping here. + */ + acpi_enter_sleep_state(acpi_state); +#else do_suspend_lowlevel(); +#endif break; case PM_SUSPEND_DISK: @@ -145,10 +152,12 @@ static int acpi_pm_finish(suspend_state_ /* reset firmware waking vector */ acpi_set_firmware_waking_vector((acpi_physical_address) 0); +#ifndef CONFIG_ACPI_PV_SLEEP if (init_8259A_after_S1) { printk("Broken toshiba laptop -> kicking interrupts\n"); init_8259A(0); } +#endif return 0; } diff -r e6974eba1bae -r b0bf9ba32bfe drivers/acpi/sleep/poweroff.c --- a/drivers/acpi/sleep/poweroff.c Thu Jul 26 14:33:50 2007 -0600 +++ b/drivers/acpi/sleep/poweroff.c Fri Jul 27 08:15:50 2007 -0600 @@ -20,6 +20,7 @@ int acpi_sleep_prepare(u32 acpi_state) int acpi_sleep_prepare(u32 acpi_state) { #ifdef CONFIG_ACPI_SLEEP +#ifndef CONFIG_ACPI_PV_SLEEP /* do we have a wakeup address for S2 and S3? */ if (acpi_state == ACPI_STATE_S3) { if (!acpi_wakeup_address) { @@ -30,6 +31,7 @@ int acpi_sleep_prepare(u32 acpi_state) acpi_wakeup_address)); } +#endif ACPI_FLUSH_CPU_CACHE(); acpi_enable_wakeup_device_prep(acpi_state); #endif diff -r e6974eba1bae -r b0bf9ba32bfe drivers/xen/balloon/balloon.c --- a/drivers/xen/balloon/balloon.c Thu Jul 26 14:33:50 2007 -0600 +++ b/drivers/xen/balloon/balloon.c Fri Jul 27 08:15:50 2007 -0600 @@ -83,7 +83,15 @@ static unsigned long frame_list[PAGE_SIZ /* VM /proc information for memory */ extern unsigned long totalram_pages; + +#ifndef MODULE extern unsigned long totalhigh_pages; +#define inc_totalhigh_pages() (totalhigh_pages++) +#define dec_totalhigh_pages() (totalhigh_pages--) +#else +#define inc_totalhigh_pages() ((void)0) +#define dec_totalhigh_pages() ((void)0) +#endif /* List of ballooned pages, threaded through the mem_map array. */ static LIST_HEAD(ballooned_pages); @@ -119,7 +127,7 @@ static void balloon_append(struct page * if (PageHighMem(page)) { list_add_tail(PAGE_TO_LIST(page), &ballooned_pages); bs.balloon_high++; - totalhigh_pages--; + dec_totalhigh_pages(); } else { list_add(PAGE_TO_LIST(page), &ballooned_pages); bs.balloon_low++; @@ -139,7 +147,7 @@ static struct page *balloon_retrieve(voi if (PageHighMem(page)) { bs.balloon_high--; - totalhigh_pages++; + inc_totalhigh_pages(); } else bs.balloon_low--; diff -r e6974eba1bae -r b0bf9ba32bfe drivers/xen/blkfront/blkfront.c --- a/drivers/xen/blkfront/blkfront.c Thu Jul 26 14:33:50 2007 -0600 +++ b/drivers/xen/blkfront/blkfront.c Fri Jul 27 08:15:50 2007 -0600 @@ -879,7 +879,7 @@ static struct xenbus_device_id blkfront_ { "vbd" }, { "" } }; - +MODULE_ALIAS("xen:vbd"); static struct xenbus_driver blkfront = { .name = "vbd", diff -r e6974eba1bae -r b0bf9ba32bfe drivers/xen/blktap/blktap.c --- a/drivers/xen/blktap/blktap.c Thu Jul 26 14:33:50 2007 -0600 +++ b/drivers/xen/blktap/blktap.c Fri Jul 27 08:15:50 2007 -0600 @@ -653,6 +653,7 @@ static int blktap_mmap(struct file *filp struct page **map; int i; tap_blkif_t *info = filp->private_data; + int ret; if (info == NULL) { WPRINTK("blktap: mmap, retrieving idx failed\n"); @@ -674,9 +675,14 @@ static int blktap_mmap(struct file *filp info->user_vstart = info->rings_vstart + (RING_PAGES << PAGE_SHIFT); /* Map the ring pages to the start of the region and reserve it. */ - if (remap_pfn_range(vma, vma->vm_start, - __pa(info->ufe_ring.sring) >> PAGE_SHIFT, - PAGE_SIZE, vma->vm_page_prot)) { + if (xen_feature(XENFEAT_auto_translated_physmap)) + ret = vm_insert_page(vma, vma->vm_start, + virt_to_page(info->ufe_ring.sring)); + else + ret = remap_pfn_range(vma, vma->vm_start, + __pa(info->ufe_ring.sring) >> PAGE_SHIFT, + PAGE_SIZE, vma->vm_page_prot); + if (ret) { WPRINTK("Mapping user ring failed!\n"); goto fail; } diff -r e6974eba1bae -r b0bf9ba32bfe drivers/xen/char/mem.c --- a/drivers/xen/char/mem.c Thu Jul 26 14:33:50 2007 -0600 +++ b/drivers/xen/char/mem.c Fri Jul 27 08:15:50 2007 -0600 @@ -26,12 +26,13 @@ #include #include -#ifndef ARCH_HAS_VALID_PHYS_ADDR_RANGE -static inline int valid_phys_addr_range(unsigned long addr, size_t count) +static inline int uncached_access(struct file *file) { - return 1; + if (file->f_flags & O_SYNC) + return 1; + /* Xen sets correct MTRR type on non-RAM for us. */ + return 0; } -#endif /* * This funcion reads the *physical* memory. The f_pos points directly to the @@ -44,9 +45,6 @@ static ssize_t read_mem(struct file * fi ssize_t read = 0, sz; void __iomem *v; - if (!valid_phys_addr_range(p, count)) - return -EFAULT; - while (count > 0) { /* * Handle first page in case it's not aligned @@ -58,7 +56,7 @@ static ssize_t read_mem(struct file * fi sz = min_t(unsigned long, sz, count); - v = xen_xlate_dev_mem_ptr(p, sz); + v = ioremap(p, sz); if (IS_ERR(v) || v == NULL) { /* * Some programs (e.g., dmidecode) groove off into @@ -75,7 +73,7 @@ static ssize_t read_mem(struct file * fi } ignored = copy_to_user(buf, v, sz); - xen_xlate_dev_mem_ptr_unmap(v); + iounmap(v); if (ignored) return -EFAULT; buf += sz; @@ -95,9 +93,6 @@ static ssize_t write_mem(struct file * f ssize_t written = 0, sz; void __iomem *v; - if (!valid_phys_addr_range(p, count)) - return -EFAULT; - while (count > 0) { /* * Handle first page in case it's not aligned @@ -109,7 +104,7 @@ static ssize_t write_mem(struct file * f sz = min_t(unsigned long, sz, count); - v = xen_xlate_dev_mem_ptr(p, sz); + v = ioremap(p, sz); if (v == NULL) break; if (IS_ERR(v)) { @@ -119,7 +114,7 @@ static ssize_t write_mem(struct file * f } ignored = copy_from_user(v, buf, sz); - xen_xlate_dev_mem_ptr_unmap(v); + iounmap(v); if (ignored) { written += sz - ignored; if (written) @@ -137,14 +132,6 @@ static ssize_t write_mem(struct file * f } #ifndef ARCH_HAS_DEV_MEM_MMAP_MEM -static inline int uncached_access(struct file *file) -{ - if (file->f_flags & O_SYNC) - return 1; - /* Xen sets correct MTRR type on non-RAM for us. */ - return 0; -} - static int xen_mmap_mem(struct file * file, struct vm_area_struct * vma) { size_t size = vma->vm_end - vma->vm_start; diff -r e6974eba1bae -r b0bf9ba32bfe drivers/xen/core/gnttab.c --- a/drivers/xen/core/gnttab.c Thu Jul 26 14:33:50 2007 -0600 +++ b/drivers/xen/core/gnttab.c Fri Jul 27 08:15:50 2007 -0600 @@ -65,8 +65,6 @@ static struct grant_entry *shared; static struct gnttab_free_callback *gnttab_free_callback_list; -static DEFINE_SEQLOCK(gnttab_dma_lock); - static int gnttab_expand(unsigned int req_entries); #define RPP (PAGE_SIZE / sizeof(grant_ref_t)) @@ -186,7 +184,7 @@ int gnttab_end_foreign_access_ref(grant_ nflags = shared[ref].flags; do { if ((flags = nflags) & (GTF_reading|GTF_writing)) { - printk(KERN_ALERT "WARNING: g.e. still in use!\n"); + printk(KERN_DEBUG "WARNING: g.e. still in use!\n"); return 0; } } while ((nflags = synch_cmpxchg_subword(&shared[ref].flags, flags, 0)) != @@ -206,7 +204,7 @@ void gnttab_end_foreign_access(grant_ref } else { /* XXX This needs to be fixed so that the ref and page are placed on a list to be freed up later. */ - printk(KERN_WARNING + printk(KERN_DEBUG "WARNING: leaking g.e. and page still in use!\n"); } } @@ -430,6 +428,8 @@ static inline unsigned int max_nr_grant_ #ifdef CONFIG_XEN +static DEFINE_SEQLOCK(gnttab_dma_lock); + #ifdef CONFIG_X86 static int map_pte_fn(pte_t *pte, struct page *pmd_page, unsigned long addr, void *data) diff -r e6974eba1bae -r b0bf9ba32bfe drivers/xen/core/machine_reboot.c --- a/drivers/xen/core/machine_reboot.c Thu Jul 26 14:33:50 2007 -0600 +++ b/drivers/xen/core/machine_reboot.c Fri Jul 27 08:15:50 2007 -0600 @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include diff -r e6974eba1bae -r b0bf9ba32bfe drivers/xen/fbfront/xenfb.c --- a/drivers/xen/fbfront/xenfb.c Thu Jul 26 14:33:50 2007 -0600 +++ b/drivers/xen/fbfront/xenfb.c Fri Jul 27 08:15:50 2007 -0600 @@ -718,6 +718,7 @@ static struct xenbus_device_id xenfb_ids { "vfb" }, { "" } }; +MODULE_ALIAS("xen:vfb"); static struct xenbus_driver xenfb = { .name = "vfb", diff -r e6974eba1bae -r b0bf9ba32bfe drivers/xen/fbfront/xenkbd.c --- a/drivers/xen/fbfront/xenkbd.c Thu Jul 26 14:33:50 2007 -0600 +++ b/drivers/xen/fbfront/xenkbd.c Fri Jul 27 08:15:50 2007 -0600 @@ -299,6 +299,7 @@ static struct xenbus_device_id xenkbd_id { "vkbd" }, { "" } }; +MODULE_ALIAS("xen:vkbd"); static struct xenbus_driver xenkbd = { .name = "vkbd", diff -r e6974eba1bae -r b0bf9ba32bfe drivers/xen/netfront/netfront.c --- a/drivers/xen/netfront/netfront.c Thu Jul 26 14:33:50 2007 -0600 +++ b/drivers/xen/netfront/netfront.c Fri Jul 27 08:15:50 2007 -0600 @@ -65,10 +65,6 @@ #include #include -#ifdef HAVE_XEN_PLATFORM_COMPAT_H -#include -#endif - struct netfront_cb { struct page *page; unsigned offset; @@ -1540,7 +1536,7 @@ static void netif_release_tx_bufs(struct } } -static void netif_release_rx_bufs(struct netfront_info *np) +static void netif_release_rx_bufs_flip(struct netfront_info *np) { struct mmu_update *mmu = np->rx_mmu; struct multicall_entry *mcl = np->rx_mcl; @@ -1549,11 +1545,6 @@ static void netif_release_rx_bufs(struct unsigned long mfn; int xfer = 0, noxfer = 0, unused = 0; int id, ref, rc; - - if (np->copying_receiver) { - WPRINTK("%s: fix me for copying receiver.\n", __FUNCTION__); - return; - } skb_queue_head_init(&free_list); @@ -1601,7 +1592,7 @@ static void netif_release_rx_bufs(struct xfer++; } - IPRINTK("%s: %d xfer, %d noxfer, %d unused\n", + DPRINTK("%s: %d xfer, %d noxfer, %d unused\n", __FUNCTION__, xfer, noxfer, unused); if (xfer) { @@ -1628,6 +1619,45 @@ static void netif_release_rx_bufs(struct spin_unlock_bh(&np->rx_lock); } +static void netif_release_rx_bufs_copy(struct netfront_info *np) +{ + struct sk_buff *skb; + int i, ref; + int busy = 0, inuse = 0; + + spin_lock_bh(&np->rx_lock); + + for (i = 0; i < NET_RX_RING_SIZE; i++) { + ref = np->grant_rx_ref[i]; + + if (ref == GRANT_INVALID_REF) + continue; + + inuse++; + + skb = np->rx_skbs[i]; + + if (!gnttab_end_foreign_access_ref(ref, 0)) + { + busy++; + continue; + } + + gnttab_release_grant_reference(&np->gref_rx_head, ref); + np->grant_rx_ref[i] = GRANT_INVALID_REF; + add_id_to_freelist(np->rx_skbs, i); + + skb_shinfo(skb)->nr_frags = 0; + dev_kfree_skb(skb); + } + + if (busy) + DPRINTK("%s: Unable to release %d of %d inuse grant references out of %ld total.\n", + __FUNCTION__, busy, inuse, NET_RX_RING_SIZE); + + spin_unlock_bh(&np->rx_lock); +} + static int network_close(struct net_device *dev) { struct netfront_info *np = netdev_priv(dev); @@ -1821,7 +1851,10 @@ static void netif_uninit(struct net_devi { struct netfront_info *np = netdev_priv(dev); netif_release_tx_bufs(np); - netif_release_rx_bufs(np); + if (np->copying_receiver) + netif_release_rx_bufs_copy(np); + else + netif_release_rx_bufs_flip(np); gnttab_free_grant_references(np->gref_tx_head); gnttab_free_grant_references(np->gref_rx_head); } @@ -2118,6 +2151,7 @@ static struct xenbus_device_id netfront_ { "vif" }, { "" } }; +MODULE_ALIAS("xen:vif"); static struct xenbus_driver netfront = { diff -r e6974eba1bae -r b0bf9ba32bfe drivers/xen/netfront/netfront.h --- a/drivers/xen/netfront/netfront.h Thu Jul 26 14:33:50 2007 -0600 +++ b/drivers/xen/netfront/netfront.h Fri Jul 27 08:15:50 2007 -0600 @@ -44,6 +44,10 @@ #include +#ifdef HAVE_XEN_PLATFORM_COMPAT_H +#include +#endif + /* * Function pointer table for hooks into a network acceleration * plugin. These are called at appropriate points from the netfront diff -r e6974eba1bae -r b0bf9ba32bfe drivers/xen/pciback/conf_space_header.c --- a/drivers/xen/pciback/conf_space_header.c Thu Jul 26 14:33:50 2007 -0600 +++ b/drivers/xen/pciback/conf_space_header.c Fri Jul 27 08:15:50 2007 -0600 @@ -75,8 +75,15 @@ static int rom_write(struct pci_dev *dev */ if (value == ~PCI_ROM_ADDRESS_ENABLE) bar->which = 1; - else + else { + u32 tmpval; + pci_read_config_dword(dev, offset, &tmpval); + if (tmpval != bar->val && value == bar->val) { + /* Allow restoration of bar value. */ + pci_write_config_dword(dev, offset, bar->val); + } bar->which = 0; + } /* Do we need to support enabling/disabling the rom address here? */ @@ -102,8 +109,15 @@ static int bar_write(struct pci_dev *dev */ if (value == ~0) bar->which = 1; - else + else { + u32 tmpval; + pci_read_config_dword(dev, offset, &tmpval); + if (tmpval != bar->val && value == bar->val) { + /* Allow restoration of bar value. */ + pci_write_config_dword(dev, offset, bar->val); + } bar->which = 0; + } return 0; } diff -r e6974eba1bae -r b0bf9ba32bfe drivers/xen/pcifront/xenbus.c --- a/drivers/xen/pcifront/xenbus.c Thu Jul 26 14:33:50 2007 -0600 +++ b/drivers/xen/pcifront/xenbus.c Fri Jul 27 08:15:50 2007 -0600 @@ -273,6 +273,7 @@ static struct xenbus_device_id xenpci_id {"pci"}, {{0}}, }; +MODULE_ALIAS("xen:pci"); static struct xenbus_driver xenbus_pcifront_driver = { .name = "pcifront", diff -r e6974eba1bae -r b0bf9ba32bfe drivers/xen/privcmd/privcmd.c --- a/drivers/xen/privcmd/privcmd.c Thu Jul 26 14:33:50 2007 -0600 +++ b/drivers/xen/privcmd/privcmd.c Fri Jul 27 08:15:50 2007 -0600 @@ -18,7 +18,6 @@ #include #include #include -#include #include #include diff -r e6974eba1bae -r b0bf9ba32bfe drivers/xen/xenbus/xenbus_probe.c --- a/drivers/xen/xenbus/xenbus_probe.c Thu Jul 26 14:33:50 2007 -0600 +++ b/drivers/xen/xenbus/xenbus_probe.c Fri Jul 27 08:15:50 2007 -0600 @@ -42,7 +42,6 @@ #include #include #include -#include #include #include @@ -166,6 +165,30 @@ static int read_backend_details(struct x return read_otherend_details(xendev, "backend-id", "backend"); } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16) +static int xenbus_uevent_frontend(struct device *dev, char **envp, + int num_envp, char *buffer, int buffer_size) +{ + struct xenbus_device *xdev; + int length = 0, i = 0; + + if (dev == NULL) + return -ENODEV; + xdev = to_xenbus_device(dev); + if (xdev == NULL) + return -ENODEV; + + /* stuff we want to pass to /sbin/hotplug */ + add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &length, + "XENBUS_TYPE=%s", xdev->devicetype); + add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &length, + "XENBUS_PATH=%s", xdev->nodename); + add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &length, + "MODALIAS=xen:%s", xdev->devicetype); + + return 0; +} +#endif /* Bus type for frontend drivers. */ static struct xen_bus_type xenbus_frontend = { @@ -181,6 +204,7 @@ static struct xen_bus_type xenbus_fronte .probe = xenbus_dev_probe, .remove = xenbus_dev_remove, .shutdown = xenbus_dev_shutdown, + .uevent = xenbus_uevent_frontend, #endif }, .dev = { @@ -210,6 +234,7 @@ static void otherend_changed(struct xenb DPRINTK("state is %d (%s), %s, %s", state, xenbus_strstate(state), dev->otherend_watch.node, vec[XS_WATCH_PATH]); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16) /* * Ignore xenbus transitions during shutdown. This prevents us doing * work that can fail e.g., when the rootfs is gone. @@ -223,6 +248,7 @@ static void otherend_changed(struct xenb xenbus_frontend_closed(dev); return; } +#endif if (drv->otherend_changed) drv->otherend_changed(dev, state); @@ -1008,7 +1034,7 @@ static int is_disconnected_device(struct return 0; xendrv = to_xenbus_driver(dev->driver); - return (xendev->state != XenbusStateConnected || + return (xendev->state < XenbusStateConnected || (xendrv->is_ready && !xendrv->is_ready(xendev))); } @@ -1033,10 +1059,13 @@ static int print_device_status(struct de /* Information only: is this too noisy? */ printk(KERN_INFO "XENBUS: Device with no driver: %s\n", xendev->nodename); - } else if (xendev->state != XenbusStateConnected) { + } else if (xendev->state < XenbusStateConnected) { + enum xenbus_state rstate = XenbusStateUnknown; + if (xendev->otherend) + rstate = xenbus_read_driver_state(xendev->otherend); printk(KERN_WARNING "XENBUS: Timeout connecting " - "to device: %s (state %d)\n", - xendev->nodename, xendev->state); + "to device: %s (local state %d, remote state %d)\n", + xendev->nodename, xendev->state, rstate); } return 0; @@ -1046,7 +1075,7 @@ static int ready_to_wait_for_devices; static int ready_to_wait_for_devices; /* - * On a 10 second timeout, wait for all devices currently configured. We need + * On a 30-second timeout, wait for all devices currently configured. We need * to do this to guarantee that the filesystems and / or network devices * needed for boot are available, before we can allow the boot to proceed. * @@ -1061,17 +1090,29 @@ static int ready_to_wait_for_devices; */ static void wait_for_devices(struct xenbus_driver *xendrv) { - unsigned long timeout = jiffies + 10*HZ; + unsigned long start = jiffies; struct device_driver *drv = xendrv ? &xendrv->driver : NULL; + unsigned int seconds_waited = 0; if (!ready_to_wait_for_devices || !is_running_on_xen()) return; while (exists_disconnected_device(drv)) { - if (time_after(jiffies, timeout)) - break; + if (time_after(jiffies, start + (seconds_waited+5)*HZ)) { + if (!seconds_waited) + printk(KERN_WARNING "XENBUS: Waiting for " + "devices to initialise: "); + seconds_waited += 5; + printk("%us...", 30 - seconds_waited); + if (seconds_waited == 30) + break; + } + schedule_timeout_interruptible(HZ/10); } + + if (seconds_waited) + printk("\n"); bus_for_each_dev(&xenbus_frontend.bus, NULL, drv, print_device_status); diff -r e6974eba1bae -r b0bf9ba32bfe drivers/xen/xenbus/xenbus_probe_backend.c --- a/drivers/xen/xenbus/xenbus_probe_backend.c Thu Jul 26 14:33:50 2007 -0600 +++ b/drivers/xen/xenbus/xenbus_probe_backend.c Fri Jul 27 08:15:50 2007 -0600 @@ -42,7 +42,6 @@ #include #include #include -#include #include #include diff -r e6974eba1bae -r b0bf9ba32bfe drivers/xen/xenbus/xenbus_xs.c --- a/drivers/xen/xenbus/xenbus_xs.c Thu Jul 26 14:33:50 2007 -0600 +++ b/drivers/xen/xenbus/xenbus_xs.c Fri Jul 27 08:15:50 2007 -0600 @@ -51,6 +51,10 @@ #include #endif +#ifndef PF_NOFREEZE /* Old kernel (pre-2.6.6). */ +#define PF_NOFREEZE 0 +#endif + struct xs_stored_msg { struct list_head list; @@ -802,8 +806,8 @@ static int process_msg(void) msg->u.watch.vec = split(body, msg->hdr.len, &msg->u.watch.vec_size); if (IS_ERR(msg->u.watch.vec)) { + err = PTR_ERR(msg->u.watch.vec); kfree(msg); - err = PTR_ERR(msg->u.watch.vec); goto out; } diff -r e6974eba1bae -r b0bf9ba32bfe include/asm-i386/acpi.h --- a/include/asm-i386/acpi.h Thu Jul 26 14:33:50 2007 -0600 +++ b/include/asm-i386/acpi.h Fri Jul 27 08:15:50 2007 -0600 @@ -177,6 +177,10 @@ extern unsigned long acpi_wakeup_address /* early initialization routine */ extern void acpi_reserve_bootmem(void); +#ifdef CONFIG_ACPI_PV_SLEEP +extern int acpi_notify_hypervisor_state(u8 sleep_state, + u32 pm1a_cnt, u32 pm1b_cnt); +#endif /* CONFIG_ACPI_PV_SLEEP */ #endif /*CONFIG_ACPI_SLEEP*/ extern u8 x86_acpiid_to_apicid[]; diff -r e6974eba1bae -r b0bf9ba32bfe include/asm-i386/mach-xen/asm/gnttab_dma.h --- a/include/asm-i386/mach-xen/asm/gnttab_dma.h Thu Jul 26 14:33:50 2007 -0600 +++ b/include/asm-i386/mach-xen/asm/gnttab_dma.h Fri Jul 27 08:15:50 2007 -0600 @@ -30,7 +30,7 @@ static inline maddr_t gnttab_dma_map_pag static inline maddr_t gnttab_dma_map_page(struct page *page) { __gnttab_dma_map_page(page); - return page_to_bus(page); + return ((maddr_t)pfn_to_mfn(page_to_pfn(page)) << PAGE_SHIFT); } static inline void gnttab_dma_unmap_page(maddr_t maddr) diff -r e6974eba1bae -r b0bf9ba32bfe include/asm-i386/mach-xen/asm/io.h --- a/include/asm-i386/mach-xen/asm/io.h Thu Jul 26 14:33:50 2007 -0600 +++ b/include/asm-i386/mach-xen/asm/io.h Fri Jul 27 08:15:50 2007 -0600 @@ -53,8 +53,7 @@ * Convert a physical pointer to a virtual kernel pointer for /dev/mem * access */ -#define xen_xlate_dev_mem_ptr(p, sz) ioremap(p, sz) -#define xen_xlate_dev_mem_ptr_unmap(p) iounmap(p) +#define xlate_dev_mem_ptr(p) __va(p) /* * Convert a virtual cached pointer to an uncached pointer diff -r e6974eba1bae -r b0bf9ba32bfe include/asm-powerpc/io.h --- a/include/asm-powerpc/io.h Thu Jul 26 14:33:50 2007 -0600 +++ b/include/asm-powerpc/io.h Fri Jul 27 08:15:50 2007 -0600 @@ -457,9 +457,6 @@ out: */ #define xlate_dev_mem_ptr(p) __va(p) -#define xen_xlate_dev_mem_ptr(p,sz) xlate_dev_mem_ptr(p) -#define xen_xlate_dev_mem_ptr_unmap(p) - /* * Convert a virtual cached pointer to an uncached pointer */ diff -r e6974eba1bae -r b0bf9ba32bfe include/asm-x86_64/acpi.h --- a/include/asm-x86_64/acpi.h Thu Jul 26 14:33:50 2007 -0600 +++ b/include/asm-x86_64/acpi.h Fri Jul 27 08:15:50 2007 -0600 @@ -153,6 +153,10 @@ extern unsigned long acpi_wakeup_address /* early initialization routine */ extern void acpi_reserve_bootmem(void); +#ifdef CONFIG_ACPI_PV_SLEEP +extern int acpi_notify_hypervisor_state(u8 sleep_state, + u32 pm1a_cnt, u32 pm1b_cnt); +#endif /* CONFIG_ACPI_PV_SLEEP */ #endif /*CONFIG_ACPI_SLEEP*/ #define boot_cpu_physical_apicid boot_cpu_id diff -r e6974eba1bae -r b0bf9ba32bfe include/asm-x86_64/mach-xen/asm/io.h --- a/include/asm-x86_64/mach-xen/asm/io.h Thu Jul 26 14:33:50 2007 -0600 +++ b/include/asm-x86_64/mach-xen/asm/io.h Fri Jul 27 08:15:50 2007 -0600 @@ -315,8 +315,7 @@ extern int iommu_bio_merge; * Convert a physical pointer to a virtual kernel pointer for /dev/mem * access */ -#define xen_xlate_dev_mem_ptr(p, sz) ioremap(p, sz) -#define xen_xlate_dev_mem_ptr_unmap(p) iounmap(p) +#define xlate_dev_mem_ptr(p) __va(p) /* * Convert a virtual cached pointer to an uncached pointer diff -r e6974eba1bae -r b0bf9ba32bfe include/xen/interface/platform.h --- a/include/xen/interface/platform.h Thu Jul 26 14:33:50 2007 -0600 +++ b/include/xen/interface/platform.h Fri Jul 27 08:15:50 2007 -0600 @@ -153,6 +153,17 @@ typedef struct xenpf_firmware_info xenpf typedef struct xenpf_firmware_info xenpf_firmware_info_t; DEFINE_XEN_GUEST_HANDLE(xenpf_firmware_info_t); +#define XENPF_enter_acpi_sleep 51 +struct xenpf_enter_acpi_sleep { + /* IN variables */ + uint16_t pm1a_cnt_val; /* PM1a control value. */ + uint16_t pm1b_cnt_val; /* PM1b control value. */ + uint32_t sleep_state; /* Which state to enter (Sn). */ + uint32_t flags; /* Must be zero. */ +}; +typedef struct xenpf_enter_acpi_sleep xenpf_enter_acpi_sleep_t; +DEFINE_XEN_GUEST_HANDLE(xenpf_enter_acpi_sleep_t); + struct xen_platform_op { uint32_t cmd; uint32_t interface_version; /* XENPF_INTERFACE_VERSION */ @@ -164,6 +175,7 @@ struct xen_platform_op { struct xenpf_microcode_update microcode; struct xenpf_platform_quirk platform_quirk; struct xenpf_firmware_info firmware_info; + struct xenpf_enter_acpi_sleep enter_acpi_sleep; uint8_t pad[128]; } u; }; diff -r e6974eba1bae -r b0bf9ba32bfe lib/Makefile --- a/lib/Makefile Thu Jul 26 14:33:50 2007 -0600 +++ b/lib/Makefile Fri Jul 27 08:15:50 2007 -0600 @@ -52,9 +52,6 @@ obj-$(CONFIG_AUDIT_GENERIC) += audit.o obj-$(CONFIG_AUDIT_GENERIC) += audit.o obj-$(CONFIG_SWIOTLB) += swiotlb.o -ifeq ($(CONFIG_X86),y) -swiotlb-$(CONFIG_XEN) := ../arch/i386/kernel/swiotlb.o -endif ifeq ($(CONFIG_IA64),y) swiotlb-$(CONFIG_XEN) := ../arch/ia64/xen/swiotlb.o endif diff -r e6974eba1bae -r b0bf9ba32bfe lib/swiotlb-xen.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/swiotlb-xen.c Fri Jul 27 08:15:50 2007 -0600 @@ -0,0 +1,745 @@ +/* + * Dynamic DMA mapping support. + * + * This implementation is a fallback for platforms that do not support + * I/O TLBs (aka DMA address translation hardware). + * Copyright (C) 2000 Asit Mallick + * Copyright (C) 2000 Goutham Rao + * Copyright (C) 2000, 2003 Hewlett-Packard Co + * David Mosberger-Tang + * Copyright (C) 2005 Keir Fraser + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int swiotlb; +EXPORT_SYMBOL(swiotlb); + +#define OFFSET(val,align) ((unsigned long)((val) & ( (align) - 1))) + +/* + * Maximum allowable number of contiguous slabs to map, + * must be a power of 2. What is the appropriate value ? + * The complexity of {map,unmap}_single is linearly dependent on this value. + */ +#define IO_TLB_SEGSIZE 128 + +/* + * log of the size of each IO TLB slab. The number of slabs is command line + * controllable. + */ +#define IO_TLB_SHIFT 11 + +int swiotlb_force; + +static char *iotlb_virt_start; +static unsigned long iotlb_nslabs; + +/* + * Used to do a quick range check in swiotlb_unmap_single and + * swiotlb_sync_single_*, to see if the memory was in fact allocated by this + * API. + */ +static unsigned long iotlb_pfn_start, iotlb_pfn_end; + +/* Does the given dma address reside within the swiotlb aperture? */ +static inline int in_swiotlb_aperture(dma_addr_t dev_addr) +{ + unsigned long pfn = mfn_to_local_pfn(dev_addr >> PAGE_SHIFT); + return (pfn_valid(pfn) + && (pfn >= iotlb_pfn_start) + && (pfn < iotlb_pfn_end)); +} + +/* + * When the IOMMU overflows we return a fallback buffer. This sets the size. + */ +static unsigned long io_tlb_overflow = 32*1024; + +void *io_tlb_overflow_buffer; + +/* + * This is a free list describing the number of free entries available from + * each index + */ +static unsigned int *io_tlb_list; +static unsigned int io_tlb_index; + +/* + * We need to save away the original address corresponding to a mapped entry + * for the sync operations. + */ +static struct phys_addr { + struct page *page; + unsigned int offset; +} *io_tlb_orig_addr; + +/* + * Protect the above data structures in the map and unmap calls + */ +static DEFINE_SPINLOCK(io_tlb_lock); + +static unsigned int dma_bits; +static unsigned int __initdata max_dma_bits = 32; +static int __init +setup_dma_bits(char *str) +{ + max_dma_bits = simple_strtoul(str, NULL, 0); + return 0; +} +__setup("dma_bits=", setup_dma_bits); + +static int __init +setup_io_tlb_npages(char *str) +{ + /* Unlike ia64, the size is aperture in megabytes, not 'slabs'! */ + if (isdigit(*str)) { + iotlb_nslabs = simple_strtoul(str, &str, 0) << + (20 - IO_TLB_SHIFT); + iotlb_nslabs = ALIGN(iotlb_nslabs, IO_TLB_SEGSIZE); + /* Round up to power of two (xen_create_contiguous_region). */ + while (iotlb_nslabs & (iotlb_nslabs-1)) + iotlb_nslabs += iotlb_nslabs & ~(iotlb_nslabs-1); + } + if (*str == ',') + ++str; + /* + * NB. 'force' enables the swiotlb, but doesn't force its use for + * every DMA like it does on native Linux. 'off' forcibly disables + * use of the swiotlb. + */ + if (!strcmp(str, "force")) + swiotlb_force = 1; + else if (!strcmp(str, "off")) + swiotlb_force = -1; + return 1; +} +__setup("swiotlb=", setup_io_tlb_npages); +/* make io_tlb_overflow tunable too? */ + +/* + * Statically reserve bounce buffer space and initialize bounce buffer data + * structures for the software IO TLB used to implement the PCI DMA API. + */ +void +swiotlb_init_with_default_size (size_t default_size) +{ + unsigned long i, bytes; + int rc; + + if (!iotlb_nslabs) { + iotlb_nslabs = (default_size >> IO_TLB_SHIFT); + iotlb_nslabs = ALIGN(iotlb_nslabs, IO_TLB_SEGSIZE); + /* Round up to power of two (xen_create_contiguous_region). */ + while (iotlb_nslabs & (iotlb_nslabs-1)) + iotlb_nslabs += iotlb_nslabs & ~(iotlb_nslabs-1); + } + + bytes = iotlb_nslabs * (1UL << IO_TLB_SHIFT); + + /* + * Get IO TLB memory from the low pages + */ + iotlb_virt_start = alloc_bootmem_low_pages(bytes); + if (!iotlb_virt_start) + panic("Cannot allocate SWIOTLB buffer!\n"); + + dma_bits = get_order(IO_TLB_SEGSIZE << IO_TLB_SHIFT) + PAGE_SHIFT; + for (i = 0; i < iotlb_nslabs; i += IO_TLB_SEGSIZE) { + do { + rc = xen_create_contiguous_region( + (unsigned long)iotlb_virt_start + (i << IO_TLB_SHIFT), + get_order(IO_TLB_SEGSIZE << IO_TLB_SHIFT), + dma_bits); + } while (rc && dma_bits++ < max_dma_bits); + if (rc) { + if (i == 0) + panic("No suitable physical memory available for SWIOTLB buffer!\n" + "Use dom0_mem Xen boot parameter to reserve\n" + "some DMA memory (e.g., dom0_mem=-128M).\n"); + iotlb_nslabs = i; + i <<= IO_TLB_SHIFT; + free_bootmem(__pa(iotlb_virt_start + i), bytes - i); + bytes = i; + for (dma_bits = 0; i > 0; i -= IO_TLB_SEGSIZE << IO_TLB_SHIFT) { + unsigned int bits = fls64(virt_to_bus(iotlb_virt_start + i - 1)); + + if (bits > dma_bits) + dma_bits = bits; + } + break; + } + } + + /* + * Allocate and initialize the free list array. This array is used + * to find contiguous free memory regions of size up to IO_TLB_SEGSIZE. + */ + io_tlb_list = alloc_bootmem(iotlb_nslabs * sizeof(int)); + for (i = 0; i < iotlb_nslabs; i++) + io_tlb_list[i] = IO_TLB_SEGSIZE - OFFSET(i, IO_TLB_SEGSIZE); + io_tlb_index = 0; + io_tlb_orig_addr = alloc_bootmem( + iotlb_nslabs * sizeof(*io_tlb_orig_addr)); + + /* + * Get the overflow emergency buffer + */ + io_tlb_overflow_buffer = alloc_bootmem_low(io_tlb_overflow); + if (!io_tlb_overflow_buffer) + panic("Cannot allocate SWIOTLB overflow buffer!\n"); + + do { + rc = xen_create_contiguous_region( + (unsigned long)io_tlb_overflow_buffer, + get_order(io_tlb_overflow), + dma_bits); + } while (rc && dma_bits++ < max_dma_bits); + if (rc) + panic("No suitable physical memory available for SWIOTLB overflow buffer!\n"); + + iotlb_pfn_start = __pa(iotlb_virt_start) >> PAGE_SHIFT; + iotlb_pfn_end = iotlb_pfn_start + (bytes >> PAGE_SHIFT); + + printk(KERN_INFO "Software IO TLB enabled: \n" + " Aperture: %lu megabytes\n" + " Kernel range: %p - %p\n" + " Address size: %u bits\n", + bytes >> 20, + iotlb_virt_start, iotlb_virt_start + bytes, + dma_bits); +} + +void +swiotlb_init(void) +{ + long ram_end; + size_t defsz = 64 * (1 << 20); /* 64MB default size */ + + if (swiotlb_force == 1) { + swiotlb = 1; + } else if ((swiotlb_force != -1) && + is_running_on_xen() && + is_initial_xendomain()) { + /* Domain 0 always has a swiotlb. */ + ram_end = HYPERVISOR_memory_op(XENMEM_maximum_ram_page, NULL); + if (ram_end <= 0x7ffff) + defsz = 2 * (1 << 20); /* 2MB on <2GB on systems. */ + swiotlb = 1; + } + + if (swiotlb) + swiotlb_init_with_default_size(defsz); + else + printk(KERN_INFO "Software IO TLB disabled\n"); +} + +/* + * We use __copy_to_user_inatomic to transfer to the host buffer because the + * buffer may be mapped read-only (e.g, in blkback driver) but lower-level + * drivers map the buffer for DMA_BIDIRECTIONAL access. This causes an + * unnecessary copy from the aperture to the host buffer, and a page fault. + */ +static void +__sync_single(struct phys_addr buffer, char *dma_addr, size_t size, int dir) +{ + if (PageHighMem(buffer.page)) { + size_t len, bytes; + char *dev, *host, *kmp; + len = size; + while (len != 0) { + unsigned long flags; + + if (((bytes = len) + buffer.offset) > PAGE_SIZE) + bytes = PAGE_SIZE - buffer.offset; + local_irq_save(flags); /* protects KM_BOUNCE_READ */ + kmp = kmap_atomic(buffer.page, KM_BOUNCE_READ); + dev = dma_addr + size - len; + host = kmp + buffer.offset; + if (dir == DMA_FROM_DEVICE) { + if (__copy_to_user_inatomic(host, dev, bytes)) + /* inaccessible */; + } else + memcpy(dev, host, bytes); + kunmap_atomic(kmp, KM_BOUNCE_READ); + local_irq_restore(flags); + len -= bytes; + buffer.page++; + buffer.offset = 0; + } + } else { + char *host = (char *)phys_to_virt( + page_to_pseudophys(buffer.page)) + buffer.offset; + if (dir == DMA_FROM_DEVICE) { + if (__copy_to_user_inatomic(host, dma_addr, size)) + /* inaccessible */; + } else if (dir == DMA_TO_DEVICE) + memcpy(dma_addr, host, size); + } +} + +/* + * Allocates bounce buffer and returns its kernel virtual address. + */ +static void * +map_single(struct device *hwdev, struct phys_addr buffer, size_t size, int dir) +{ + unsigned long flags; + char *dma_addr; + unsigned int nslots, stride, index, wrap; + struct phys_addr slot_buf; + int i; + + /* + * For mappings greater than a page, we limit the stride (and + * hence alignment) to a page size. + */ + nslots = ALIGN(size, 1 << IO_TLB_SHIFT) >> IO_TLB_SHIFT; + if (size > PAGE_SIZE) + stride = (1 << (PAGE_SHIFT - IO_TLB_SHIFT)); + else + stride = 1; + + BUG_ON(!nslots); + + /* + * Find suitable number of IO TLB entries size that will fit this + * request and allocate a buffer from that IO TLB pool. + */ + spin_lock_irqsave(&io_tlb_lock, flags); + { + wrap = index = ALIGN(io_tlb_index, stride); + + if (index >= iotlb_nslabs) + wrap = index = 0; + + do { + /* + * If we find a slot that indicates we have 'nslots' + * number of contiguous buffers, we allocate the + * buffers from that slot and mark the entries as '0' + * indicating unavailable. + */ + if (io_tlb_list[index] >= nslots) { + int count = 0; + + for (i = index; i < (int)(index + nslots); i++) + io_tlb_list[i] = 0; + for (i = index - 1; + (OFFSET(i, IO_TLB_SEGSIZE) != + IO_TLB_SEGSIZE -1) && io_tlb_list[i]; + i--) + io_tlb_list[i] = ++count; + dma_addr = iotlb_virt_start + + (index << IO_TLB_SHIFT); + + /* + * Update the indices to avoid searching in + * the next round. + */ + io_tlb_index = + ((index + nslots) < iotlb_nslabs + ? (index + nslots) : 0); + + goto found; + } + index += stride; + if (index >= iotlb_nslabs) + index = 0; + } while (index != wrap); + + spin_unlock_irqrestore(&io_tlb_lock, flags); + return NULL; + } + found: + spin_unlock_irqrestore(&io_tlb_lock, flags); + + /* + * Save away the mapping from the original address to the DMA address. + * This is needed when we sync the memory. Then we sync the buffer if + * needed. + */ + slot_buf = buffer; + for (i = 0; i < nslots; i++) { + slot_buf.page += slot_buf.offset >> PAGE_SHIFT; + slot_buf.offset &= PAGE_SIZE - 1; + io_tlb_orig_addr[index+i] = slot_buf; + slot_buf.offset += 1 << IO_TLB_SHIFT; + } + if ((dir == DMA_TO_DEVICE) || (dir == DMA_BIDIRECTIONAL)) + __sync_single(buffer, dma_addr, size, DMA_TO_DEVICE); + + return dma_addr; +} + +static struct phys_addr dma_addr_to_phys_addr(char *dma_addr) +{ + int index = (dma_addr - iotlb_virt_start) >> IO_TLB_SHIFT; + struct phys_addr buffer = io_tlb_orig_addr[index]; + buffer.offset += (long)dma_addr & ((1 << IO_TLB_SHIFT) - 1); + buffer.page += buffer.offset >> PAGE_SHIFT; + buffer.offset &= PAGE_SIZE - 1; + return buffer; +} + +/* + * dma_addr is the kernel virtual address of the bounce buffer to unmap. + */ +static void +unmap_single(struct device *hwdev, char *dma_addr, size_t size, int dir) +{ + unsigned long flags; + int i, count, nslots = ALIGN(size, 1 << IO_TLB_SHIFT) >> IO_TLB_SHIFT; + int index = (dma_addr - iotlb_virt_start) >> IO_TLB_SHIFT; + struct phys_addr buffer = dma_addr_to_phys_addr(dma_addr); + + /* + * First, sync the memory before unmapping the entry + */ + if ((dir == DMA_FROM_DEVICE) || (dir == DMA_BIDIRECTIONAL)) + __sync_single(buffer, dma_addr, size, DMA_FROM_DEVICE); + + /* + * Return the buffer to the free list by setting the corresponding + * entries to indicate the number of contigous entries available. + * While returning the entries to the free list, we merge the entries + * with slots below and above the pool being returned. + */ + spin_lock_irqsave(&io_tlb_lock, flags); + { + count = ((index + nslots) < ALIGN(index + 1, IO_TLB_SEGSIZE) ? + io_tlb_list[index + nslots] : 0); + /* + * Step 1: return the slots to the free list, merging the + * slots with superceeding slots + */ + for (i = index + nslots - 1; i >= index; i--) + io_tlb_list[i] = ++count; + /* + * Step 2: merge the returned slots with the preceding slots, + * if available (non zero) + */ + for (i = index - 1; + (OFFSET(i, IO_TLB_SEGSIZE) != + IO_TLB_SEGSIZE -1) && io_tlb_list[i]; + i--) + io_tlb_list[i] = ++count; + } + spin_unlock_irqrestore(&io_tlb_lock, flags); +} + +static void +sync_single(struct device *hwdev, char *dma_addr, size_t size, int dir) +{ + struct phys_addr buffer = dma_addr_to_phys_addr(dma_addr); + BUG_ON((dir != DMA_FROM_DEVICE) && (dir != DMA_TO_DEVICE)); + __sync_single(buffer, dma_addr, size, dir); +} + +static void +swiotlb_full(struct device *dev, size_t size, int dir, int do_panic) +{ + /* + * Ran out of IOMMU space for this operation. This is very bad. + * Unfortunately the drivers cannot handle this operation properly. + * unless they check for pci_dma_mapping_error (most don't) + * When the mapping is small enough return a static buffer to limit + * the damage, or panic when the transfer is too big. + */ + printk(KERN_ERR "PCI-DMA: Out of SW-IOMMU space for %lu bytes at " + "device %s\n", (unsigned long)size, dev ? dev->bus_id : "?"); + + if (size > io_tlb_overflow && do_panic) { + if (dir == PCI_DMA_FROMDEVICE || dir == PCI_DMA_BIDIRECTIONAL) + panic("PCI-DMA: Memory would be corrupted\n"); + if (dir == PCI_DMA_TODEVICE || dir == PCI_DMA_BIDIRECTIONAL) + panic("PCI-DMA: Random memory would be DMAed\n"); + } +} + +/* + * Map a single buffer of the indicated size for DMA in streaming mode. The + * PCI address to use is returned. + * + * Once the device is given the dma address, the device owns this memory until + * either swiotlb_unmap_single or swiotlb_dma_sync_single is performed. + */ +dma_addr_t +swiotlb_map_single(struct device *hwdev, void *ptr, size_t size, int dir) +{ + dma_addr_t dev_addr = gnttab_dma_map_page(virt_to_page(ptr)) + + offset_in_page(ptr); + void *map; + struct phys_addr buffer; + + BUG_ON(dir == DMA_NONE); + + /* + * If the pointer passed in happens to be in the device's DMA window, + * we can safely return the device addr and not worry about bounce + * buffering it. + */ + if (!range_straddles_page_boundary(__pa(ptr), size) && + !address_needs_mapping(hwdev, dev_addr)) + return dev_addr; + + /* + * Oh well, have to allocate and map a bounce buffer. + */ + gnttab_dma_unmap_page(dev_addr); + buffer.page = virt_to_page(ptr); + buffer.offset = (unsigned long)ptr & ~PAGE_MASK; + map = map_single(hwdev, buffer, size, dir); + if (!map) { + swiotlb_full(hwdev, size, dir, 1); + map = io_tlb_overflow_buffer; + } + + dev_addr = virt_to_bus(map); + return dev_addr; +} + +/* + * Unmap a single streaming mode DMA translation. The dma_addr and size must + * match what was provided for in a previous swiotlb_map_single call. All + * other usages are undefined. + * + * After this call, reads by the cpu to the buffer are guaranteed to see + * whatever the device wrote there. + */ +void +swiotlb_unmap_single(struct device *hwdev, dma_addr_t dev_addr, size_t size, + int dir) +{ + BUG_ON(dir == DMA_NONE); + if (in_swiotlb_aperture(dev_addr)) + unmap_single(hwdev, bus_to_virt(dev_addr), size, dir); + else + gnttab_dma_unmap_page(dev_addr); +} + +/* + * Make physical memory consistent for a single streaming mode DMA translation + * after a transfer. + * + * If you perform a swiotlb_map_single() but wish to interrogate the buffer + * using the cpu, yet do not wish to teardown the PCI dma mapping, you must + * call this function before doing so. At the next point you give the PCI dma + * address back to the card, you must first perform a + * swiotlb_dma_sync_for_device, and then the device again owns the buffer + */ +void +swiotlb_sync_single_for_cpu(struct device *hwdev, dma_addr_t dev_addr, + size_t size, int dir) +{ + BUG_ON(dir == DMA_NONE); + if (in_swiotlb_aperture(dev_addr)) + sync_single(hwdev, bus_to_virt(dev_addr), size, dir); +} + +void +swiotlb_sync_single_for_device(struct device *hwdev, dma_addr_t dev_addr, + size_t size, int dir) +{ + BUG_ON(dir == DMA_NONE); + if (in_swiotlb_aperture(dev_addr)) + sync_single(hwdev, bus_to_virt(dev_addr), size, dir); +} + +/* + * Map a set of buffers described by scatterlist in streaming mode for DMA. + * This is the scatter-gather version of the above swiotlb_map_single + * interface. Here the scatter gather list elements are each tagged with the + * appropriate dma address and length. They are obtained via + * sg_dma_{address,length}(SG). + * + * NOTE: An implementation may be able to use a smaller number of + * DMA address/length pairs than there are SG table elements. + * (for example via virtual mapping capabilities) + * The routine returns the number of addr/length pairs actually + * used, at most nents. + * + * Device ownership issues as mentioned above for swiotlb_map_single are the + * same here. + */ +int +swiotlb_map_sg(struct device *hwdev, struct scatterlist *sg, int nelems, + int dir) +{ + struct phys_addr buffer; + dma_addr_t dev_addr; + char *map; + int i; + + BUG_ON(dir == DMA_NONE); + + for (i = 0; i < nelems; i++, sg++) { + dev_addr = gnttab_dma_map_page(sg->page) + sg->offset; + + if (range_straddles_page_boundary(page_to_pseudophys(sg->page) + + sg->offset, sg->length) + || address_needs_mapping(hwdev, dev_addr)) { + gnttab_dma_unmap_page(dev_addr); + buffer.page = sg->page; + buffer.offset = sg->offset; + map = map_single(hwdev, buffer, sg->length, dir); + if (!map) { + /* Don't panic here, we expect map_sg users + to do proper error handling. */ + swiotlb_full(hwdev, sg->length, dir, 0); + swiotlb_unmap_sg(hwdev, sg - i, i, dir); + sg[0].dma_length = 0; + return 0; + } + sg->dma_address = (dma_addr_t)virt_to_bus(map); + } else + sg->dma_address = dev_addr; + sg->dma_length = sg->length; + } + return nelems; +} + +/* + * Unmap a set of streaming mode DMA translations. Again, cpu read rules + * concerning calls here are the same as for swiotlb_unmap_single() above. + */ +void +swiotlb_unmap_sg(struct device *hwdev, struct scatterlist *sg, int nelems, + int dir) +{ + int i; + + BUG_ON(dir == DMA_NONE); + + for (i = 0; i < nelems; i++, sg++) + if (in_swiotlb_aperture(sg->dma_address)) + unmap_single(hwdev, + (void *)bus_to_virt(sg->dma_address), + sg->dma_length, dir); + else + gnttab_dma_unmap_page(sg->dma_address); +} + +/* + * Make physical memory consistent for a set of streaming mode DMA translations + * after a transfer. + * + * The same as swiotlb_sync_single_* but for a scatter-gather list, same rules + * and usage. + */ +void +swiotlb_sync_sg_for_cpu(struct device *hwdev, struct scatterlist *sg, + int nelems, int dir) +{ + int i; + + BUG_ON(dir == DMA_NONE); + + for (i = 0; i < nelems; i++, sg++) + if (in_swiotlb_aperture(sg->dma_address)) + sync_single(hwdev, + (void *)bus_to_virt(sg->dma_address), + sg->dma_length, dir); +} + +void +swiotlb_sync_sg_for_device(struct device *hwdev, struct scatterlist *sg, + int nelems, int dir) +{ + int i; + + BUG_ON(dir == DMA_NONE); + + for (i = 0; i < nelems; i++, sg++) + if (in_swiotlb_aperture(sg->dma_address)) + sync_single(hwdev, + (void *)bus_to_virt(sg->dma_address), + sg->dma_length, dir); +} + +#ifdef CONFIG_HIGHMEM + +dma_addr_t +swiotlb_map_page(struct device *hwdev, struct page *page, + unsigned long offset, size_t size, + enum dma_data_direction direction) +{ + struct phys_addr buffer; + dma_addr_t dev_addr; + char *map; + + dev_addr = gnttab_dma_map_page(page) + offset; + if (address_needs_mapping(hwdev, dev_addr)) { + gnttab_dma_unmap_page(dev_addr); + buffer.page = page; + buffer.offset = offset; + map = map_single(hwdev, buffer, size, direction); + if (!map) { + swiotlb_full(hwdev, size, direction, 1); + map = io_tlb_overflow_buffer; + } + dev_addr = (dma_addr_t)virt_to_bus(map); + } + + return dev_addr; +} + +void +swiotlb_unmap_page(struct device *hwdev, dma_addr_t dma_address, + size_t size, enum dma_data_direction direction) +{ + BUG_ON(direction == DMA_NONE); + if (in_swiotlb_aperture(dma_address)) + unmap_single(hwdev, bus_to_virt(dma_address), size, direction); + else + gnttab_dma_unmap_page(dma_address); +} + +#endif + +int +swiotlb_dma_mapping_error(dma_addr_t dma_addr) +{ + return (dma_addr == virt_to_bus(io_tlb_overflow_buffer)); +} + +/* + * Return whether the given PCI device DMA address mask can be supported + * properly. For example, if your device can only drive the low 24-bits + * during PCI bus mastering, then you would pass 0x00ffffff as the mask to + * this function. + */ +int +swiotlb_dma_supported (struct device *hwdev, u64 mask) +{ + return (mask >= ((1UL << dma_bits) - 1)); +} + +EXPORT_SYMBOL(swiotlb_init); +EXPORT_SYMBOL(swiotlb_map_single); +EXPORT_SYMBOL(swiotlb_unmap_single); +EXPORT_SYMBOL(swiotlb_map_sg); +EXPORT_SYMBOL(swiotlb_unmap_sg); +EXPORT_SYMBOL(swiotlb_sync_single_for_cpu); +EXPORT_SYMBOL(swiotlb_sync_single_for_device); +EXPORT_SYMBOL(swiotlb_sync_sg_for_cpu); +EXPORT_SYMBOL(swiotlb_sync_sg_for_device); +EXPORT_SYMBOL(swiotlb_dma_mapping_error); +EXPORT_SYMBOL(swiotlb_dma_supported); diff -r e6974eba1bae -r b0bf9ba32bfe scripts/Makefile.build --- a/scripts/Makefile.build Thu Jul 26 14:33:50 2007 -0600 +++ b/scripts/Makefile.build Fri Jul 27 08:15:50 2007 -0600 @@ -66,6 +66,18 @@ endif ifndef obj $(warning kbuild: Makefile.build is included improperly) +endif + +ifeq ($(CONFIG_XEN),y) +$(objtree)/scripts/Makefile.xen: $(srctree)/scripts/Makefile.xen.awk $(srctree)/scripts/Makefile.build + @echo ' Updating $@' + @$(AWK) -f $< $(filter-out $<,$^) >$@ + +xen-src-single-used-m := $(patsubst $(srctree)/%,%,$(wildcard $(addprefix $(srctree)/,$(single-used-m:.o=-xen.c)))) +xen-single-used-m := $(xen-src-single-used-m:-xen.c=.o) +single-used-m := $(filter-out $(xen-single-used-m),$(single-used-m)) + +-include $(objtree)/scripts/Makefile.xen endif # =========================================================================== diff -r e6974eba1bae -r b0bf9ba32bfe scripts/Makefile.lib --- a/scripts/Makefile.lib Thu Jul 26 14:33:50 2007 -0600 +++ b/scripts/Makefile.lib Fri Jul 27 08:15:50 2007 -0600 @@ -12,6 +12,12 @@ obj-m := $(filter-out $(obj-y),$(obj-m)) # Filter out objects already built-in lib-y := $(filter-out $(obj-y), $(sort $(lib-y) $(lib-m))) + +# Remove objects forcibly disabled + +obj-y := $(filter-out $(disabled-obj-y),$(obj-y)) +obj-m := $(filter-out $(disabled-obj-y),$(obj-m)) +lib-y := $(filter-out $(disabled-obj-y),$(lib-y)) # Handle objects in subdirs diff -r e6974eba1bae -r b0bf9ba32bfe scripts/Makefile.xen.awk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/Makefile.xen.awk Fri Jul 27 08:15:50 2007 -0600 @@ -0,0 +1,34 @@ +BEGIN { + is_rule = 0 +} + +/^[[:space:]]*#/ { + next +} + +/^[[:space:]]*$/ { + if (is_rule) + print("") + is_rule = 0 + next +} + +/:[[:space:]]*%\.[cS][[:space:]]/ { + line = gensub(/%.([cS])/, "%-xen.\\1", "g", $0) + line = gensub(/(single-used-m)/, "xen-\\1", "g", line) + print line + is_rule = 1 + next +} + +/^[^\t]$/ { + if (is_rule) + print("") + is_rule = 0 + next +} + +is_rule { + print $0 + next +} _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:11:50 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:11:50 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgQw-0008JJ-3Q for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:11:50 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgRE-0005OL-J6; Fri, 07 Sep 2007 16:12:08 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgQ2-0004TS-BU for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:55 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgPt-0007Fo-GW for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:52 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GANnE011656 for ; Fri, 7 Sep 2007 09:10:23 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAU1g022060 for ; Fri, 7 Sep 2007 09:10:30 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GAUK1022059 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:10:30 -0700 Message-Id: <200709071610.l87GAUK1022059@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:10:30 -0700 From: "Xen patchbot-linux-2.6.18-xen" To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [linux-2.6.18-xen] merge with linux-2.6.18-xen.hg X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User Alex Williamson # Date 1186951832 21600 # Node ID 8dd0c593a5a214ac1494ad53afee73aa2fed817a # Parent 26a45a66dedeac2f53e49b62ef18e3974ec56437 # Parent 840b9df48b6a4f0f569963dba01885bde2946b6b merge with linux-2.6.18-xen.hg --- arch/i386/mm/fault-xen.c | 5 +---- drivers/xen/console/console.c | 12 +++--------- 2 files changed, 4 insertions(+), 13 deletions(-) diff -r 26a45a66dede -r 8dd0c593a5a2 arch/i386/mm/fault-xen.c --- a/arch/i386/mm/fault-xen.c Sun Aug 12 12:09:27 2007 -0600 +++ b/arch/i386/mm/fault-xen.c Sun Aug 12 14:50:32 2007 -0600 @@ -756,10 +756,7 @@ void vmalloc_sync_all(void) struct page *page; spin_lock_irqsave(&pgd_lock, flags); - /* - * XEN: vmalloc_sync_one() failure path logic assumes - * pgd_list is non-empty. - */ + /* XEN: failure path assumes non-empty pgd_list. */ if (unlikely(!pgd_list)) { spin_unlock_irqrestore(&pgd_lock, flags); return; diff -r 26a45a66dede -r 8dd0c593a5a2 drivers/xen/console/console.c --- a/drivers/xen/console/console.c Sun Aug 12 12:09:27 2007 -0600 +++ b/drivers/xen/console/console.c Sun Aug 12 14:50:32 2007 -0600 @@ -66,14 +66,14 @@ * 'xencons=tty' [XC_TTY]: Console attached to '/dev/tty[0-9]+'. * 'xencons=ttyS' [XC_SERIAL]: Console attached to '/dev/ttyS[0-9]+'. * 'xencons=xvc' [XC_XVC]: Console attached to '/dev/xvc0'. - * default: DOM0 -> XC_SERIAL ; all others -> XC_TTY. + * default: XC_XVC * * NB. In mode XC_TTY, we create dummy consoles for tty2-63. This suppresses * warnings from standard distro startup scripts. */ static enum { XC_OFF, XC_TTY, XC_SERIAL, XC_XVC -} xc_mode; +} xc_mode = XC_XVC; static int xc_num = -1; /* /dev/xvc0 device number allocated by lanana.org. */ @@ -88,13 +88,7 @@ void xencons_early_setup(void) void xencons_early_setup(void) { extern int console_use_vt; - - if (is_initial_xendomain()) { - xc_mode = XC_SERIAL; - } else { - xc_mode = XC_TTY; - console_use_vt = 0; - } + console_use_vt = 0; } static int __init xencons_setup(char *str) _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:11:55 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:11:55 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgR0-0008JP-QK for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:11:55 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgRJ-0005SP-Aq; Fri, 07 Sep 2007 16:12:13 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgQ4-0004U6-GM for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:56 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgPs-0007Fk-LF for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:54 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAM4e011653 for ; Fri, 7 Sep 2007 09:10:22 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GATrV022042 for ; Fri, 7 Sep 2007 09:10:29 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GATpZ022041 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:10:29 -0700 Message-Id: <200709071610.l87GATpZ022041@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:10:29 -0700 From: "Xen patchbot-linux-2.6.18-xen" To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [linux-2.6.18-xen] [IA64] vga_con doesn't exist without CONFIG_VGA_CONSOLE X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User Alex Williamson # Date 1186942167 21600 # Node ID 26a45a66dedeac2f53e49b62ef18e3974ec56437 # Parent dd415303b25f9f65c3dca0e6d7c385deaf47082d [IA64] vga_con doesn't exist without CONFIG_VGA_CONSOLE Signed-off-by: Simon Horman --- arch/ia64/kernel/setup.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff -r dd415303b25f -r 26a45a66dede arch/ia64/kernel/setup.c --- a/arch/ia64/kernel/setup.c Wed Aug 01 16:41:06 2007 -0600 +++ b/arch/ia64/kernel/setup.c Sun Aug 12 12:09:27 2007 -0600 @@ -546,10 +546,12 @@ setup_arch (char **cmdline_p) int offset = 0; memset(name, 0, sizeof(name)); - if (is_initial_xendomain() && conswitchp != &vga_con) +#if defined(CONFIG_VGA_CONSOLE) + if (!is_initial_xendomain() || conswitchp == &vga_con) + strncpy(name, "tty", 3); + else +#endif strncpy(name, "ttyS", 4); - else - strncpy(name, "tty", 3); p = strstr(*cmdline_p, "xencons="); _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:12:00 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:12:00 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgR5-0008JS-TK for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:12:00 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgRO-0005WN-C9; Fri, 07 Sep 2007 16:12:18 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgQ3-0004Tb-6j for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:56 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgPu-0007Fr-Gq for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:53 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAOC6011659 for ; Fri, 7 Sep 2007 09:10:24 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAVLt022077 for ; Fri, 7 Sep 2007 09:10:31 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GAVCw022076 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:10:31 -0700 Message-Id: <200709071610.l87GAVCw022076@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:10:30 -0700 From: "Xen patchbot-linux-2.6.18-xen" To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [linux-2.6.18-xen] [IA64] Default to xvc console X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User Alex Williamson # Date 1186952644 21600 # Node ID 41b7a0d7c2adcf6b77602ecf37883c98c5d20acc # Parent 8dd0c593a5a214ac1494ad53afee73aa2fed817a [IA64] Default to xvc console Based on patch from Aron Griffis Signed-off-by: Alex Williamson --- arch/ia64/kernel/setup.c | 17 +++++++++-------- 1 files changed, 9 insertions(+), 8 deletions(-) diff -r 8dd0c593a5a2 -r 41b7a0d7c2ad arch/ia64/kernel/setup.c --- a/arch/ia64/kernel/setup.c Sun Aug 12 14:50:32 2007 -0600 +++ b/arch/ia64/kernel/setup.c Sun Aug 12 15:04:04 2007 -0600 @@ -538,20 +538,21 @@ setup_arch (char **cmdline_p) /* * If a console= is NOT specified, we assume using the - * xencons console is desired. By default, this is ttyS0 - * for dom0 and tty0 for domU. + * xencons console is desired. By default, this is xvc0 + * for both dom0 and domU. */ if (!strstr(*cmdline_p, "console=")) { - char *p, *q, name[5]; + char *p, *q, name[5] = "xvc"; int offset = 0; - memset(name, 0, sizeof(name)); #if defined(CONFIG_VGA_CONSOLE) - if (!is_initial_xendomain() || conswitchp == &vga_con) + /* + * conswitchp might be set intelligently from the + * PCDP code. If set to VGA console, use it. + */ + if (is_initial_xendomain() && conswitchp == &vga_con) strncpy(name, "tty", 3); - else -#endif - strncpy(name, "ttyS", 4); +#endif p = strstr(*cmdline_p, "xencons="); _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:12:07 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:12:07 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgRC-0008K1-UC for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:12:07 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgRV-0005ac-7P; Fri, 07 Sep 2007 16:12:25 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgQ7-0004VA-Ub for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:11:00 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgPr-0007Fi-KM for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:55 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GALSB011650 for ; Fri, 7 Sep 2007 09:10:21 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GASZO022025 for ; Fri, 7 Sep 2007 09:10:28 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GASRf022024 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:10:28 -0700 Message-Id: <200709071610.l87GASRf022024@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:10:28 -0700 From: "Xen patchbot-linux-2.6.18-xen" To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [linux-2.6.18-xen] merge with linux-2.6.18-xen.hg X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User Alex Williamson # Date 1186008066 21600 # Node ID dd415303b25f9f65c3dca0e6d7c385deaf47082d # Parent 59582461a590f996fc2d09f14e4cef2625beb8de # Parent 8d5ae51a09a66ff450b46ebb09ff99475604ed91 merge with linux-2.6.18-xen.hg --- drivers/acpi/Kconfig | 2 +- drivers/xen/blkfront/vbd.c | 3 +++ drivers/xen/blktap/blktap.c | 14 -------------- drivers/xen/netback/loopback.c | 4 ++++ drivers/xen/xenbus/xenbus_probe.c | 6 +++--- 5 files changed, 11 insertions(+), 18 deletions(-) diff -r 59582461a590 -r dd415303b25f drivers/acpi/Kconfig --- a/drivers/acpi/Kconfig Wed Aug 01 11:23:36 2007 -0600 +++ b/drivers/acpi/Kconfig Wed Aug 01 16:41:06 2007 -0600 @@ -365,7 +365,7 @@ config ACPI_SBS config ACPI_PV_SLEEP bool - depends on X86 && XEN + depends on X86 && XEN && ACPI_SLEEP default y endif # ACPI diff -r 59582461a590 -r dd415303b25f drivers/xen/blkfront/vbd.c --- a/drivers/xen/blkfront/vbd.c Wed Aug 01 11:23:36 2007 -0600 +++ b/drivers/xen/blkfront/vbd.c Wed Aug 01 16:41:06 2007 -0600 @@ -213,6 +213,9 @@ xlvbd_init_blk_queue(struct gendisk *gd, /* Make sure buffer addresses are sector-aligned. */ blk_queue_dma_alignment(rq, 511); + /* Make sure we don't use bounce buffers. */ + blk_queue_bounce_limit(rq, BLK_BOUNCE_ANY); + gd->queue = rq; return 0; diff -r 59582461a590 -r dd415303b25f drivers/xen/blktap/blktap.c --- a/drivers/xen/blktap/blktap.c Wed Aug 01 11:23:36 2007 -0600 +++ b/drivers/xen/blktap/blktap.c Wed Aug 01 16:41:06 2007 -0600 @@ -1300,7 +1300,6 @@ static void dispatch_rw_block_io(blkif_t unsigned int nseg; int ret, i, nr_sects = 0; tap_blkif_t *info; - uint64_t sector; blkif_request_t *target; int pending_idx = RTN_PEND_IDX(pending_req,pending_req->mem_idx); int usr_idx; @@ -1356,19 +1355,6 @@ static void dispatch_rw_block_io(blkif_t uvaddr = MMAP_VADDR(info->user_vstart, usr_idx, i); kvaddr = idx_to_kaddr(mmap_idx, pending_idx, i); - - sector = req->sector_number + ((PAGE_SIZE / 512) * i); - if( (blkif->sectors > 0) && (sector >= blkif->sectors) ) { - WPRINTK("BLKTAP: Sector request greater" - "than size\n"); - WPRINTK("BLKTAP: %s request sector" - "[%llu,%llu], Total [%llu]\n", - (req->operation == - BLKIF_OP_WRITE ? "WRITE" : "READ"), - (long long unsigned) sector, - (long long unsigned) sector>>9, - (long long unsigned) blkif->sectors); - } flags = GNTMAP_host_map; if (operation == WRITE) diff -r 59582461a590 -r dd415303b25f drivers/xen/netback/loopback.c --- a/drivers/xen/netback/loopback.c Wed Aug 01 11:23:36 2007 -0600 +++ b/drivers/xen/netback/loopback.c Wed Aug 01 16:41:06 2007 -0600 @@ -99,6 +99,10 @@ static int skb_remove_foreign_references BUG_ON(skb_shinfo(skb)->frag_list); + if (skb_cloned(skb) && + unlikely(pskb_expand_head(skb, 0, 0, GFP_ATOMIC))) + return 0; + for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) { pfn = page_to_pfn(skb_shinfo(skb)->frags[i].page); if (!is_foreign(pfn)) diff -r 59582461a590 -r dd415303b25f drivers/xen/xenbus/xenbus_probe.c --- a/drivers/xen/xenbus/xenbus_probe.c Wed Aug 01 11:23:36 2007 -0600 +++ b/drivers/xen/xenbus/xenbus_probe.c Wed Aug 01 16:41:06 2007 -0600 @@ -1075,7 +1075,7 @@ static int ready_to_wait_for_devices; static int ready_to_wait_for_devices; /* - * On a 30-second timeout, wait for all devices currently configured. We need + * On a 5-minute timeout, wait for all devices currently configured. We need * to do this to guarantee that the filesystems and / or network devices * needed for boot are available, before we can allow the boot to proceed. * @@ -1103,8 +1103,8 @@ static void wait_for_devices(struct xenb printk(KERN_WARNING "XENBUS: Waiting for " "devices to initialise: "); seconds_waited += 5; - printk("%us...", 30 - seconds_waited); - if (seconds_waited == 30) + printk("%us...", 300 - seconds_waited); + if (seconds_waited == 300) break; } _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:12:14 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:12:14 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgRK-0008KA-4D for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:12:14 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgRa-0005eX-TS; Fri, 07 Sep 2007 16:12:30 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgQ8-0004VB-ER for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:11:00 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgPp-0007FY-Q8 for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:56 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAJW7011644 for ; Fri, 7 Sep 2007 09:10:19 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GARkS021991 for ; Fri, 7 Sep 2007 09:10:27 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GAQYp021990 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:10:26 -0700 Message-Id: <200709071610.l87GAQYp021990@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:10:26 -0700 From: "Xen patchbot-linux-2.6.18-xen" To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [linux-2.6.18-xen] [IA64] Preparation patch for xen specivic gate page X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User Alex Williamson # Date 1185983616 21600 # Node ID 1c675d3a2a22e642dbbf32e164a170ee06cc53a2 # Parent a1682dc021bc16eec86f09b6d9a389c19497423b [IA64] Preparation patch for xen specivic gate page Move __kernel_sigtramp up to allow to increase in __kernel_syscall_via_epc size. Signed-off-by: Isaku Yamahata --- arch/ia64/kernel/gate.S | 324 ++++++++++++++++++++++++------------------------ 1 files changed, 162 insertions(+), 162 deletions(-) diff -r a1682dc021bc -r 1c675d3a2a22 arch/ia64/kernel/gate.S --- a/arch/ia64/kernel/gate.S Wed Aug 01 09:44:54 2007 -0600 +++ b/arch/ia64/kernel/gate.S Wed Aug 01 09:53:36 2007 -0600 @@ -42,168 +42,6 @@ [1:] movl reg=0; \ .xdata4 ".data.patch.running_on_xen", 1b-. #endif /* CONFIG_XEN_IA64_VDSO_PARAVIRT */ - -GLOBAL_ENTRY(__kernel_syscall_via_break) - .prologue - .altrp b6 - .body - /* - * Note: for (fast) syscall restart to work, the break instruction must be - * the first one in the bundle addressed by syscall_via_break. - */ -{ .mib - break 0x100000 - nop.i 0 - br.ret.sptk.many b6 -} -END(__kernel_syscall_via_break) - -/* - * On entry: - * r11 = saved ar.pfs - * r15 = system call # - * b0 = saved return address - * b6 = return address - * On exit: - * r11 = saved ar.pfs - * r15 = system call # - * b0 = saved return address - * all other "scratch" registers: undefined - * all "preserved" registers: same as on entry - */ - -GLOBAL_ENTRY(__kernel_syscall_via_epc) - .prologue - .altrp b6 - .body -{ - /* - * Note: the kernel cannot assume that the first two instructions in this - * bundle get executed. The remaining code must be safe even if - * they do not get executed. - */ - adds r17=-1024,r15 // A - mov r10=0 // A default to successful syscall execution - epc // B causes split-issue -} -#ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT - // r20 = 1 - // r22 = &vcpu->vcpu_info->evtchn_upcall_mask - // r24 = &vcpu->vcpu_info->evtchn_upcall_pending - // r25 = tmp - // r28 = &running_on_xen - // r30 = running_on_xen - // r31 = tmp - // p11 = tmp - // p12 = running_on_xen - // p13 = !running_on_xen - // p14 = tmp - // p15 = tmp -#define isXen p12 -#define isRaw p13 - LOAD_RUNNING_ON_XEN(r28) - movl r22=XSI_PSR_I_ADDR - mov r20=1 - ;; - ld4 r30=[r28] - ;; - cmp.ne isXen,isRaw=r0,r30 - ;; -(isXen) ld8 r22=[r22] - ;; -(isRaw) rsm psr.be | psr.i -(isXen) adds r24=-1,r22 -(isXen) st1 [r22]=r20 -(isXen) rum psr.be -#else - ;; - rsm psr.be | psr.i // M2 (5 cyc to srlz.d) -#endif - LOAD_FSYSCALL_TABLE(r14) // X - ;; - mov r16=IA64_KR(CURRENT) // M2 (12 cyc) - shladd r18=r17,3,r14 // A - mov r19=NR_syscalls-1 // A - ;; - lfetch [r18] // M0|1 -#ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT -(isRaw) mov r29=psr -(isXen) XEN_HYPER_GET_PSR - ;; -(isXen) mov r29=r8 -#else - mov r29=psr // M2 (12 cyc) -#endif - // If r17 is a NaT, p6 will be zero - cmp.geu p6,p7=r19,r17 // A (sysnr > 0 && sysnr < 1024+NR_syscalls)? - ;; - mov r21=ar.fpsr // M2 (12 cyc) - tnat.nz p10,p9=r15 // I0 - mov.i r26=ar.pfs // I0 (would stall anyhow due to srlz.d...) - ;; - srlz.d // M0 (forces split-issue) ensure PSR.BE==0 -(p6) ld8 r18=[r18] // M0|1 - nop.i 0 - ;; - nop.m 0 -(p6) tbit.z.unc p8,p0=r18,0 // I0 (dual-issues with "mov b7=r18"!) -#ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT - -#define XEN_SET_PSR_I(pred) \ -(pred) ld1 r31=[r22]; \ - ;; ; \ -(pred) st1 [r22]=r0; \ -(pred) cmp.ne.unc p14,p0=r0,r31; \ - ;; ; \ -(p14) ld1 r25=[r24]; \ - ;; ; \ -(p14) cmp.ne.unc p11,p0=r0,r25; \ - ;; ; \ -(p11) XEN_HYPER_SSM_I; - - ;; - // p14 = running_on_xen && p8 - // p15 = !running_on_xen && p8 -(p8) cmp.ne.unc p14,p15=r0,r30 - ;; -(p15) ssm psr.i - XEN_SET_PSR_I(p14) -#else - nop.i 0 - ;; -(p8) ssm psr.i -#endif -(p6) mov b7=r18 // I0 -(p8) br.dptk.many b7 // B - - mov r27=ar.rsc // M2 (12 cyc) -/* - * brl.cond doesn't work as intended because the linker would convert this branch - * into a branch to a PLT. Perhaps there will be a way to avoid this with some - * future version of the linker. In the meantime, we just use an indirect branch - * instead. - */ -#ifdef CONFIG_ITANIUM -(p6) add r14=-8,r14 // r14 <- addr of fsys_bubble_down entry - ;; -(p6) ld8 r14=[r14] // r14 <- fsys_bubble_down - ;; -(p6) mov b7=r14 -(p6) br.sptk.many b7 -#else - BRL_COND_FSYS_BUBBLE_DOWN(p6) -#endif -#ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT -(isRaw) ssm psr.i - XEN_SET_PSR_I(isXen) -#else - ssm psr.i -#endif - mov r10=-1 -(p10) mov r8=EINVAL -(p9) mov r8=ENOSYS - FSYS_RETURN -END(__kernel_syscall_via_epc) # define ARG0_OFF (16 + IA64_SIGFRAME_ARG0_OFFSET) # define ARG1_OFF (16 + IA64_SIGFRAME_ARG1_OFFSET) @@ -450,3 +288,165 @@ restore_rbs: // invala not necessary as that will happen when returning to user-mode br.cond.sptk back_from_restore_rbs END(__kernel_sigtramp) + +GLOBAL_ENTRY(__kernel_syscall_via_break) + .prologue + .altrp b6 + .body + /* + * Note: for (fast) syscall restart to work, the break instruction must be + * the first one in the bundle addressed by syscall_via_break. + */ +{ .mib + break 0x100000 + nop.i 0 + br.ret.sptk.many b6 +} +END(__kernel_syscall_via_break) + +/* + * On entry: + * r11 = saved ar.pfs + * r15 = system call # + * b0 = saved return address + * b6 = return address + * On exit: + * r11 = saved ar.pfs + * r15 = system call # + * b0 = saved return address + * all other "scratch" registers: undefined + * all "preserved" registers: same as on entry + */ + +GLOBAL_ENTRY(__kernel_syscall_via_epc) + .prologue + .altrp b6 + .body +{ + /* + * Note: the kernel cannot assume that the first two instructions in this + * bundle get executed. The remaining code must be safe even if + * they do not get executed. + */ + adds r17=-1024,r15 // A + mov r10=0 // A default to successful syscall execution + epc // B causes split-issue +} +#ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT + // r20 = 1 + // r22 = &vcpu->vcpu_info->evtchn_upcall_mask + // r24 = &vcpu->vcpu_info->evtchn_upcall_pending + // r25 = tmp + // r28 = &running_on_xen + // r30 = running_on_xen + // r31 = tmp + // p11 = tmp + // p12 = running_on_xen + // p13 = !running_on_xen + // p14 = tmp + // p15 = tmp +#define isXen p12 +#define isRaw p13 + LOAD_RUNNING_ON_XEN(r28) + movl r22=XSI_PSR_I_ADDR + mov r20=1 + ;; + ld4 r30=[r28] + ;; + cmp.ne isXen,isRaw=r0,r30 + ;; +(isXen) ld8 r22=[r22] + ;; +(isRaw) rsm psr.be | psr.i +(isXen) adds r24=-1,r22 +(isXen) st1 [r22]=r20 +(isXen) rum psr.be +#else + ;; + rsm psr.be | psr.i // M2 (5 cyc to srlz.d) +#endif + LOAD_FSYSCALL_TABLE(r14) // X + ;; + mov r16=IA64_KR(CURRENT) // M2 (12 cyc) + shladd r18=r17,3,r14 // A + mov r19=NR_syscalls-1 // A + ;; + lfetch [r18] // M0|1 +#ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT +(isRaw) mov r29=psr +(isXen) XEN_HYPER_GET_PSR + ;; +(isXen) mov r29=r8 +#else + mov r29=psr // M2 (12 cyc) +#endif + // If r17 is a NaT, p6 will be zero + cmp.geu p6,p7=r19,r17 // A (sysnr > 0 && sysnr < 1024+NR_syscalls)? + ;; + mov r21=ar.fpsr // M2 (12 cyc) + tnat.nz p10,p9=r15 // I0 + mov.i r26=ar.pfs // I0 (would stall anyhow due to srlz.d...) + ;; + srlz.d // M0 (forces split-issue) ensure PSR.BE==0 +(p6) ld8 r18=[r18] // M0|1 + nop.i 0 + ;; + nop.m 0 +(p6) tbit.z.unc p8,p0=r18,0 // I0 (dual-issues with "mov b7=r18"!) +#ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT + +#define XEN_SET_PSR_I(pred) \ +(pred) ld1 r31=[r22]; \ + ;; ; \ +(pred) st1 [r22]=r0; \ +(pred) cmp.ne.unc p14,p0=r0,r31; \ + ;; ; \ +(p14) ld1 r25=[r24]; \ + ;; ; \ +(p14) cmp.ne.unc p11,p0=r0,r25; \ + ;; ; \ +(p11) XEN_HYPER_SSM_I; + + ;; + // p14 = running_on_xen && p8 + // p15 = !running_on_xen && p8 +(p8) cmp.ne.unc p14,p15=r0,r30 + ;; +(p15) ssm psr.i + XEN_SET_PSR_I(p14) +#else + nop.i 0 + ;; +(p8) ssm psr.i +#endif +(p6) mov b7=r18 // I0 +(p8) br.dptk.many b7 // B + + mov r27=ar.rsc // M2 (12 cyc) +/* + * brl.cond doesn't work as intended because the linker would convert this branch + * into a branch to a PLT. Perhaps there will be a way to avoid this with some + * future version of the linker. In the meantime, we just use an indirect branch + * instead. + */ +#ifdef CONFIG_ITANIUM +(p6) add r14=-8,r14 // r14 <- addr of fsys_bubble_down entry + ;; +(p6) ld8 r14=[r14] // r14 <- fsys_bubble_down + ;; +(p6) mov b7=r14 +(p6) br.sptk.many b7 +#else + BRL_COND_FSYS_BUBBLE_DOWN(p6) +#endif +#ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT +(isRaw) ssm psr.i + XEN_SET_PSR_I(isXen) +#else + ssm psr.i +#endif + mov r10=-1 +(p10) mov r8=EINVAL +(p9) mov r8=ENOSYS + FSYS_RETURN +END(__kernel_syscall_via_epc) _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:12:17 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:12:17 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgRN-0008KE-1c for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:12:17 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgRf-0005i3-EU; Fri, 07 Sep 2007 16:12:35 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgQ9-0004VG-4h for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:11:01 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgPv-0007Fs-GN for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:10:58 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAPL9011662 for ; Fri, 7 Sep 2007 09:10:25 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAWDT022094 for ; Fri, 7 Sep 2007 09:10:32 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GAWdX022093 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:10:32 -0700 Message-Id: <200709071610.l87GAWdX022093@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:10:31 -0700 From: "Xen patchbot-linux-2.6.18-xen" To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [linux-2.6.18-xen] merge with linux-2.6.18-xen.hg X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User Alex Williamson # Date 1187283526 21600 # Node ID 60d8f0befd1810571b562a5120ced76868c86096 # Parent 41b7a0d7c2adcf6b77602ecf37883c98c5d20acc # Parent 05c22f28202356d65d4f62692ff7c43bcdb0827a merge with linux-2.6.18-xen.hg --- include/asm-i386/mach-xen/asm/floppy.h | 147 ------------------- include/asm-x86_64/mach-xen/asm/floppy.h | 206 ---------------------------- arch/i386/kernel/setup-xen.c | 5 arch/powerpc/platforms/xen/hcall.c | 56 +++---- arch/powerpc/platforms/xen/setup.h | 2 arch/x86_64/kernel/setup-xen.c | 4 drivers/block/floppy.c | 14 + drivers/pnp/manager.c | 32 +--- drivers/xen/core/reboot.c | 3 drivers/xen/core/xencomm.c | 20 +- drivers/xen/netfront/netfront.c | 43 ++--- drivers/xen/xenbus/xenbus_client.c | 1 drivers/xen/xenbus/xenbus_comms.c | 1 drivers/xen/xenbus/xenbus_probe.c | 1 include/asm-i386/mach-xen/asm/hypercall.h | 3 include/asm-i386/mach-xen/asm/io.h | 2 include/asm-x86_64/mach-xen/asm/hypercall.h | 3 include/asm-x86_64/mach-xen/asm/io.h | 2 include/xen/cpu_hotplug.h | 3 include/xen/xencomm.h | 42 ++++- 20 files changed, 139 insertions(+), 451 deletions(-) diff -r 41b7a0d7c2ad -r 60d8f0befd18 arch/i386/kernel/setup-xen.c --- a/arch/i386/kernel/setup-xen.c Sun Aug 12 15:04:04 2007 -0600 +++ b/arch/i386/kernel/setup-xen.c Thu Aug 16 10:58:46 2007 -0600 @@ -1826,6 +1826,11 @@ void __init setup_arch(char **cmdline_p) virt_to_mfn(pfn_to_mfn_frame_list_list); } + /* Mark all ISA DMA channels in-use - using them wouldn't work. */ + for (i = 0; i < MAX_DMA_CHANNELS; ++i) + if (i != 4 && request_dma(i, "xen") != 0) + BUG(); + /* * NOTE: at this point the bootmem allocator is fully available. */ diff -r 41b7a0d7c2ad -r 60d8f0befd18 arch/powerpc/platforms/xen/hcall.c --- a/arch/powerpc/platforms/xen/hcall.c Sun Aug 12 15:04:04 2007 -0600 +++ b/arch/powerpc/platforms/xen/hcall.c Thu Aug 16 10:58:46 2007 -0600 @@ -56,7 +56,7 @@ int HYPERVISOR_console_io(int cmd, int count, char *str) { - void *desc; + struct xencomm_handle *desc; int rc; desc = xencomm_map_no_alloc(str, count); @@ -76,7 +76,8 @@ int HYPERVISOR_event_channel_op(int cmd, { int rc; - void *desc = xencomm_map_no_alloc(op, sizeof(evtchn_op_t)); + struct xencomm_handle *desc = + xencomm_map_no_alloc(op, sizeof(evtchn_op_t)); if (desc == NULL) return -EINVAL; @@ -92,7 +93,7 @@ EXPORT_SYMBOL(HYPERVISOR_event_channel_o int HYPERVISOR_xen_version(int cmd, void *arg) { - void *desc; + struct xencomm_handle *desc; const unsigned long hcall = __HYPERVISOR_xen_version; int argsize; int rc; @@ -144,7 +145,8 @@ EXPORT_SYMBOL(HYPERVISOR_xen_version); int HYPERVISOR_physdev_op(int cmd, void *op) { - void *desc = xencomm_map_no_alloc(op, sizeof(physdev_op_t)); + struct xencomm_handle *desc = + xencomm_map_no_alloc(op, sizeof(physdev_op_t)); int rc; if (desc == NULL) @@ -163,8 +165,8 @@ int HYPERVISOR_sched_op(int cmd, void *a { int argsize = 0; int rc = -EINVAL; - void *desc; - evtchn_port_t *ports = NULL; + struct xencomm_handle *desc; + struct xencomm_handle *ports = NULL; switch (cmd) { case SCHEDOP_yield: @@ -187,7 +189,7 @@ int HYPERVISOR_sched_op(int cmd, void *a if (ports == NULL) return -ENOMEM; - set_xen_guest_handle(sched_poll.ports, ports); + set_xen_guest_handle(sched_poll.ports, (evtchn_port_t *)ports); memcpy(arg, &sched_poll, sizeof(sched_poll)); } @@ -222,7 +224,7 @@ int HYPERVISOR_suspend(unsigned long sre struct sched_shutdown sched_shutdown = { .reason = SHUTDOWN_suspend, }; - void *desc; + struct xencomm_handle *desc; desc = xencomm_map_no_alloc(&sched_shutdown, sizeof(struct sched_shutdown)); @@ -234,7 +236,7 @@ int HYPERVISOR_kexec_op(unsigned long op int HYPERVISOR_kexec_op(unsigned long op, void *args) { unsigned long argsize; - void *desc; + struct xencomm_handle *desc; switch (op) { case KEXEC_CMD_kexec_get_range: @@ -316,8 +318,8 @@ static int xenppc_privcmd_domctl(privcmd { xen_domctl_t kern_op; xen_domctl_t __user *user_op = (xen_domctl_t __user *)hypercall->arg[0]; - void *op_desc; - void *desc = NULL; + struct xencomm_handle *op_desc; + struct xencomm_handle *desc = NULL; int ret = 0; if (copy_from_user(&kern_op, user_op, sizeof(xen_domctl_t))) @@ -349,7 +351,7 @@ static int xenppc_privcmd_domctl(privcmd ret = -ENOMEM; set_xen_guest_handle(kern_op.u.getmemlist.buffer, - desc); + (void *)desc); break; case XEN_DOMCTL_getpageframeinfo: break; @@ -362,7 +364,7 @@ static int xenppc_privcmd_domctl(privcmd ret = -ENOMEM; set_xen_guest_handle(kern_op.u.getpageframeinfo2.array, - desc); + (void *)desc); break; case XEN_DOMCTL_shadow_op: @@ -376,7 +378,7 @@ static int xenppc_privcmd_domctl(privcmd ret = -ENOMEM; set_xen_guest_handle(kern_op.u.shadow_op.dirty_bitmap, - desc); + (void *)desc); } break; case XEN_DOMCTL_max_mem: @@ -391,7 +393,7 @@ static int xenppc_privcmd_domctl(privcmd ret = -ENOMEM; set_xen_guest_handle(kern_op.u.vcpucontext.ctxt, - desc); + (void *)desc); break; case XEN_DOMCTL_getvcpuinfo: break; @@ -405,7 +407,7 @@ static int xenppc_privcmd_domctl(privcmd ret = -ENOMEM; set_xen_guest_handle(kern_op.u.vcpuaffinity.cpumap.bitmap, - desc); + (void *)desc); break; case XEN_DOMCTL_max_vcpus: case XEN_DOMCTL_scheduler_op: @@ -442,8 +444,8 @@ static int xenppc_privcmd_sysctl(privcmd { xen_sysctl_t kern_op; xen_sysctl_t __user *user_op = (xen_sysctl_t __user *)hypercall->arg[0]; - struct xencomm_desc *op_desc; - void *desc = NULL; + struct xencomm_handle *op_desc; + struct xencomm_handle *desc = NULL; int ret = 0; if (copy_from_user(&kern_op, user_op, sizeof(xen_sysctl_t))) @@ -470,7 +472,7 @@ static int xenppc_privcmd_sysctl(privcmd ret = -ENOMEM; set_xen_guest_handle(kern_op.u.readconsole.buffer, - desc); + (void *)desc); break; case XEN_SYSCTL_tbuf_op: case XEN_SYSCTL_physinfo: @@ -491,7 +493,7 @@ static int xenppc_privcmd_sysctl(privcmd ret = -ENOMEM; set_xen_guest_handle(kern_op.u.getdomaininfolist.buffer, - desc); + (void *)desc); break; default: printk(KERN_ERR "%s: unknown sysctl cmd %d\n", __func__, kern_op.cmd); @@ -517,8 +519,8 @@ static int xenppc_privcmd_platform_op(pr xen_platform_op_t kern_op; xen_platform_op_t __user *user_op = (xen_platform_op_t __user *)hypercall->arg[0]; - void *op_desc; - void *desc = NULL; + struct xencomm_handle *op_desc; + struct xencomm_handle *desc = NULL; int ret = 0; if (copy_from_user(&kern_op, user_op, sizeof(xen_platform_op_t))) @@ -566,7 +568,7 @@ int HYPERVISOR_memory_op(unsigned int cm int HYPERVISOR_memory_op(unsigned int cmd, void *arg) { int ret; - void *op_desc; + struct xencomm_handle *op_desc; xen_memory_reservation_t *mop; @@ -581,7 +583,7 @@ int HYPERVISOR_memory_op(unsigned int cm case XENMEM_increase_reservation: case XENMEM_decrease_reservation: case XENMEM_populate_physmap: { - void *desc = NULL; + struct xencomm_handle *desc = NULL; if (xen_guest_handle(mop->extent_start)) { desc = xencomm_map( @@ -595,7 +597,7 @@ int HYPERVISOR_memory_op(unsigned int cm } set_xen_guest_handle(mop->extent_start, - desc); + (void *)desc); } ret = plpar_hcall_norets(XEN_MARK(__HYPERVISOR_memory_op), @@ -650,7 +652,7 @@ static int xenppc_privcmd_version(privcm static int xenppc_privcmd_event_channel_op(privcmd_hypercall_t *hypercall) { - struct xencomm_desc *desc; + struct xencomm_handle *desc; unsigned int argsize; int ret; @@ -856,7 +858,7 @@ int HYPERVISOR_vcpu_op(int cmd, int vcpu { int argsize; const unsigned long hcall = __HYPERVISOR_vcpu_op; - void *desc; + struct xencomm_handle *desc; int rc; switch (cmd) { diff -r 41b7a0d7c2ad -r 60d8f0befd18 arch/powerpc/platforms/xen/setup.h --- a/arch/powerpc/platforms/xen/setup.h Sun Aug 12 15:04:04 2007 -0600 +++ b/arch/powerpc/platforms/xen/setup.h Thu Aug 16 10:58:46 2007 -0600 @@ -40,8 +40,6 @@ static inline u64 jiffies_to_ns(unsigned return j * (1000000000UL / HZ); } -#define xen_guest_handle(hnd) ((hnd).p) - extern struct page *alloc_foreign_page(void); extern void free_foreign_page(struct page *page); diff -r 41b7a0d7c2ad -r 60d8f0befd18 arch/x86_64/kernel/setup-xen.c --- a/arch/x86_64/kernel/setup-xen.c Sun Aug 12 15:04:04 2007 -0600 +++ b/arch/x86_64/kernel/setup-xen.c Thu Aug 16 10:58:46 2007 -0600 @@ -863,6 +863,10 @@ void __init setup_arch(char **cmdline_p) virt_to_mfn(pfn_to_mfn_frame_list_list); } + /* Mark all ISA DMA channels in-use - using them wouldn't work. */ + for (i = 0; i < MAX_DMA_CHANNELS; ++i) + if (i != 4 && request_dma(i, "xen") != 0) + BUG(); } if (!is_initial_xendomain()) { diff -r 41b7a0d7c2ad -r 60d8f0befd18 drivers/block/floppy.c --- a/drivers/block/floppy.c Sun Aug 12 15:04:04 2007 -0600 +++ b/drivers/block/floppy.c Thu Aug 16 10:58:46 2007 -0600 @@ -4392,11 +4392,15 @@ static int floppy_grab_irq_and_dma(void) if (fd_request_dma()) { DPRINT("Unable to grab DMA%d for the floppy driver\n", FLOPPY_DMA); - fd_free_irq(); - spin_lock_irqsave(&floppy_usage_lock, flags); - usage_count--; - spin_unlock_irqrestore(&floppy_usage_lock, flags); - return -1; + if (can_use_virtual_dma & 2) + use_virtual_dma = can_use_virtual_dma = 1; + if (!(can_use_virtual_dma & 1)) { + fd_free_irq(); + spin_lock_irqsave(&floppy_usage_lock, flags); + usage_count--; + spin_unlock_irqrestore(&floppy_usage_lock, flags); + return -1; + } } for (fdc = 0; fdc < N_FDC; fdc++) { diff -r 41b7a0d7c2ad -r 60d8f0befd18 drivers/pnp/manager.c --- a/drivers/pnp/manager.c Sun Aug 12 15:04:04 2007 -0600 +++ b/drivers/pnp/manager.c Thu Aug 16 10:58:46 2007 -0600 @@ -168,7 +168,7 @@ static int pnp_assign_irq(struct pnp_dev return 0; } -static int pnp_assign_dma(struct pnp_dev *dev, struct pnp_dma *rule, int idx) +static void pnp_assign_dma(struct pnp_dev *dev, struct pnp_dma *rule, int idx) { resource_size_t *start, *end; unsigned long *flags; @@ -179,18 +179,14 @@ static int pnp_assign_dma(struct pnp_dev 1, 3, 5, 6, 7, 0, 2, 4 }; - if (!dev || !rule) - return -EINVAL; - if (idx >= PNP_MAX_DMA) { pnp_err("More than 2 dmas is incompatible with pnp specifications."); - /* pretend we were successful so at least the manager won't try again */ - return 1; + return; } /* check if this resource has been manually set, if so skip */ if (!(dev->res.dma_resource[idx].flags & IORESOURCE_AUTO)) - return 1; + return; start = &dev->res.dma_resource[idx].start; end = &dev->res.dma_resource[idx].end; @@ -199,20 +195,18 @@ static int pnp_assign_dma(struct pnp_dev /* set the initial values */ *flags |= rule->flags | IORESOURCE_DMA; *flags &= ~IORESOURCE_UNSET; - - if (!rule->map) { - *flags |= IORESOURCE_DISABLED; - return 1; /* skip disabled resource requests */ - } for (i = 0; i < 8; i++) { if(rule->map & (1<next; } while (dma) { - if (!pnp_assign_dma(dev, dma, ndma)) - goto fail; + pnp_assign_dma(dev, dma, ndma); ndma++; dma = dma->next; } @@ -367,8 +360,7 @@ static int pnp_assign_resources(struct p irq = irq->next; } while (dma) { - if (!pnp_assign_dma(dev, dma, ndma)) - goto fail; + pnp_assign_dma(dev, dma, ndma); ndma++; dma = dma->next; } diff -r 41b7a0d7c2ad -r 60d8f0befd18 drivers/xen/core/reboot.c --- a/drivers/xen/core/reboot.c Sun Aug 12 15:04:04 2007 -0600 +++ b/drivers/xen/core/reboot.c Thu Aug 16 10:58:46 2007 -0600 @@ -7,7 +7,10 @@ #include #include #include +#include #include +#include +#include #ifdef HAVE_XEN_PLATFORM_COMPAT_H #include diff -r 41b7a0d7c2ad -r 60d8f0befd18 drivers/xen/core/xencomm.c --- a/drivers/xen/core/xencomm.c Sun Aug 12 15:04:04 2007 -0600 +++ b/drivers/xen/core/xencomm.c Thu Aug 16 10:58:46 2007 -0600 @@ -23,6 +23,9 @@ #include #include #include +#ifdef __ia64__ +#include /* for is_kern_addr() */ +#endif static int xencomm_init(struct xencomm_desc *desc, void *buffer, unsigned long bytes) @@ -80,7 +83,7 @@ static struct xencomm_desc *xencomm_allo return desc; } -void xencomm_free(void *desc) +void xencomm_free(struct xencomm_handle *desc) { if (desc && !((ulong)desc & XENCOMM_INLINE_FLAG)) free_page((unsigned long)__va(desc)); @@ -111,7 +114,7 @@ static int xencomm_create(void *buffer, rc = xencomm_init(desc, buffer, bytes); if (rc) { printk("%s failure: %d\n", "xencomm_init", rc); - xencomm_free(desc); + xencomm_free((struct xencomm_handle *)__pa(desc)); return rc; } @@ -128,7 +131,7 @@ static int is_phys_contiguous(unsigned l return (addr < VMALLOC_START) || (addr >= VMALLOC_END); } -static void *xencomm_create_inline(void *ptr) +static struct xencomm_handle *xencomm_create_inline(void *ptr) { unsigned long paddr; @@ -136,7 +139,7 @@ static void *xencomm_create_inline(void paddr = (unsigned long)xencomm_pa(ptr); BUG_ON(paddr & XENCOMM_INLINE_FLAG); - return (void *)(paddr | XENCOMM_INLINE_FLAG); + return (struct xencomm_handle *)(paddr | XENCOMM_INLINE_FLAG); } /* "mini" routine, for stack-based communications: */ @@ -146,6 +149,7 @@ static int xencomm_create_mini(void *buf { int rc = 0; struct xencomm_desc *desc; + BUG_ON(((unsigned long)xc_desc) % sizeof(*xc_desc) != 0); desc = (void *)xc_desc; @@ -157,7 +161,7 @@ static int xencomm_create_mini(void *buf return rc; } -void *xencomm_map(void *ptr, unsigned long bytes) +struct xencomm_handle *xencomm_map(void *ptr, unsigned long bytes) { int rc; struct xencomm_desc *desc; @@ -170,10 +174,10 @@ void *xencomm_map(void *ptr, unsigned lo if (rc || desc == NULL) return NULL; - return (void *)__pa(desc); + return xencomm_pa(desc); } -void *__xencomm_map_no_alloc(void *ptr, unsigned long bytes, +struct xencomm_handle *__xencomm_map_no_alloc(void *ptr, unsigned long bytes, struct xencomm_mini *xc_desc) { int rc; @@ -188,5 +192,5 @@ void *__xencomm_map_no_alloc(void *ptr, if (rc) return NULL; - return (void *)__pa(desc); + return xencomm_pa(desc); } diff -r 41b7a0d7c2ad -r 60d8f0befd18 drivers/xen/netfront/netfront.c --- a/drivers/xen/netfront/netfront.c Sun Aug 12 15:04:04 2007 -0600 +++ b/drivers/xen/netfront/netfront.c Thu Aug 16 10:58:46 2007 -0600 @@ -99,6 +99,7 @@ static const int MODPARM_rx_flip = 0; #if defined(NETIF_F_GSO) #define HAVE_GSO 1 #define HAVE_TSO 1 /* TSO is a subset of GSO */ +#define HAVE_CSUM_OFFLOAD 1 static inline void dev_disable_gso_features(struct net_device *dev) { /* Turn off all GSO bits except ROBUST. */ @@ -106,6 +107,7 @@ static inline void dev_disable_gso_featu dev->features |= NETIF_F_GSO_ROBUST; } #elif defined(NETIF_F_TSO) +#define HAVE_GSO 0 #define HAVE_TSO 1 /* Some older kernels cannot cope with incorrect checksums, @@ -113,7 +115,7 @@ static inline void dev_disable_gso_featu * with the presence of NETIF_F_TSO but it appears to be a good first * approximiation. */ -#define HAVE_NO_CSUM_OFFLOAD 1 +#define HAVE_CSUM_OFFLOAD 0 #define gso_size tso_size #define gso_segs tso_segs @@ -138,8 +140,12 @@ static inline int netif_needs_gso(struct unlikely(skb->ip_summed != CHECKSUM_HW)); } #else +#define HAVE_GSO 0 +#define HAVE_TSO 0 +#define HAVE_CSUM_OFFLOAD 0 #define netif_needs_gso(dev, skb) 0 #define dev_disable_gso_features(dev) ((void)0) +#define ethtool_op_set_tso(dev, data) (-ENOSYS) #endif #define GRANT_INVALID_REF 0 @@ -412,13 +418,12 @@ again: goto abort_transaction; } -#ifdef HAVE_NO_CSUM_OFFLOAD - err = xenbus_printf(xbt, dev->nodename, "feature-no-csum-offload", "%d", 1); + err = xenbus_printf(xbt, dev->nodename, "feature-no-csum-offload", + "%d", !HAVE_CSUM_OFFLOAD); if (err) { message = "writing feature-no-csum-offload"; goto abort_transaction; } -#endif err = xenbus_printf(xbt, dev->nodename, "feature-sg", "%d", 1); if (err) { @@ -426,13 +431,12 @@ again: goto abort_transaction; } -#ifdef HAVE_TSO - err = xenbus_printf(xbt, dev->nodename, "feature-gso-tcpv4", "%d", 1); + err = xenbus_printf(xbt, dev->nodename, "feature-gso-tcpv4", "%d", + HAVE_TSO); if (err) { message = "writing feature-gso-tcpv4"; goto abort_transaction; } -#endif err = xenbus_transaction_end(xbt, 0); if (err) { @@ -983,7 +987,7 @@ static int network_start_xmit(struct sk_ tx->flags |= NETTXF_data_validated; #endif -#ifdef HAVE_TSO +#if HAVE_TSO if (skb_shinfo(skb)->gso_size) { struct netif_extra_info *gso = (struct netif_extra_info *) RING_GET_REQUEST(&np->tx, ++i); @@ -1013,15 +1017,16 @@ static int network_start_xmit(struct sk_ if (notify) notify_remote_via_irq(np->irq); + np->stats.tx_bytes += skb->len; + np->stats.tx_packets++; + + /* Note: It is not safe to access skb after network_tx_buf_gc()! */ network_tx_buf_gc(dev); if (!netfront_tx_slot_available(np)) netif_stop_queue(dev); spin_unlock_irq(&np->tx_lock); - - np->stats.tx_bytes += skb->len; - np->stats.tx_packets++; return 0; @@ -1279,9 +1284,9 @@ static int xennet_set_skb_gso(struct sk_ return -EINVAL; } -#ifdef HAVE_TSO +#if HAVE_TSO skb_shinfo(skb)->gso_size = gso->u.gso.size; -#ifdef HAVE_GSO +#if HAVE_GSO skb_shinfo(skb)->gso_type = SKB_GSO_TCPV4; /* Header must be checked, and gso_segs computed. */ @@ -1701,7 +1706,6 @@ static int xennet_set_sg(struct net_devi static int xennet_set_tso(struct net_device *dev, u32 data) { -#ifdef HAVE_TSO if (data) { struct netfront_info *np = netdev_priv(dev); int val; @@ -1714,9 +1718,6 @@ static int xennet_set_tso(struct net_dev } return ethtool_op_set_tso(dev, data); -#else - return -ENOSYS; -#endif } static void xennet_set_features(struct net_device *dev) @@ -1734,10 +1735,8 @@ static void xennet_set_features(struct n /* Before 2.6.9 TSO seems to be unreliable so do not enable it * on older kernels. */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,9) - xennet_set_tso(dev, 1); -#endif - + if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,9)) + xennet_set_tso(dev, 1); } static int network_connect(struct net_device *dev) @@ -1865,8 +1864,10 @@ static struct ethtool_ops network_ethtoo .set_tx_csum = ethtool_op_set_tx_csum, .get_sg = ethtool_op_get_sg, .set_sg = xennet_set_sg, +#if HAVE_TSO .get_tso = ethtool_op_get_tso, .set_tso = xennet_set_tso, +#endif .get_link = ethtool_op_get_link, }; diff -r 41b7a0d7c2ad -r 60d8f0befd18 drivers/xen/xenbus/xenbus_client.c --- a/drivers/xen/xenbus/xenbus_client.c Sun Aug 12 15:04:04 2007 -0600 +++ b/drivers/xen/xenbus/xenbus_client.c Thu Aug 16 10:58:46 2007 -0600 @@ -30,6 +30,7 @@ * IN THE SOFTWARE. */ +#include #include #include #include diff -r 41b7a0d7c2ad -r 60d8f0befd18 drivers/xen/xenbus/xenbus_comms.c --- a/drivers/xen/xenbus/xenbus_comms.c Sun Aug 12 15:04:04 2007 -0600 +++ b/drivers/xen/xenbus/xenbus_comms.c Thu Aug 16 10:58:46 2007 -0600 @@ -35,6 +35,7 @@ #include #include #include +#include #include #include diff -r 41b7a0d7c2ad -r 60d8f0befd18 drivers/xen/xenbus/xenbus_probe.c --- a/drivers/xen/xenbus/xenbus_probe.c Sun Aug 12 15:04:04 2007 -0600 +++ b/drivers/xen/xenbus/xenbus_probe.c Thu Aug 16 10:58:46 2007 -0600 @@ -43,6 +43,7 @@ #include #include #include +#include #include #include diff -r 41b7a0d7c2ad -r 60d8f0befd18 include/asm-i386/mach-xen/asm/floppy.h --- a/include/asm-i386/mach-xen/asm/floppy.h Sun Aug 12 15:04:04 2007 -0600 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,147 +0,0 @@ -/* - * Architecture specific parts of the Floppy driver - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - * - * Copyright (C) 1995 - * - * Modifications for Xen are Copyright (c) 2004, Keir Fraser. - */ -#ifndef __ASM_XEN_I386_FLOPPY_H -#define __ASM_XEN_I386_FLOPPY_H - -#include - -/* XEN: Hit DMA paths on the head. This trick from asm-m68k/floppy.h. */ -#include -#undef MAX_DMA_ADDRESS -#define MAX_DMA_ADDRESS 0 -#define CROSS_64KB(a,s) (0) - -#define fd_inb(port) inb_p(port) -#define fd_outb(value,port) outb_p(value,port) - -#define fd_request_dma() (0) -#define fd_free_dma() ((void)0) -#define fd_enable_irq() enable_irq(FLOPPY_IRQ) -#define fd_disable_irq() disable_irq(FLOPPY_IRQ) -#define fd_free_irq() free_irq(FLOPPY_IRQ, NULL) -#define fd_get_dma_residue() (virtual_dma_count + virtual_dma_residue) -#define fd_dma_setup(addr, size, mode, io) vdma_dma_setup(addr, size, mode, io) -/* - * Do not use vmalloc/vfree: floppy_release_irq_and_dma() gets called from - * softirq context via motor_off_callback. A generic bug we happen to trigger. - */ -#define fd_dma_mem_alloc(size) __get_free_pages(GFP_KERNEL, get_order(size)) -#define fd_dma_mem_free(addr, size) free_pages(addr, get_order(size)) - -static int virtual_dma_count; -static int virtual_dma_residue; -static char *virtual_dma_addr; -static int virtual_dma_mode; -static int doing_pdma; - -static irqreturn_t floppy_hardint(int irq, void *dev_id, struct pt_regs * regs) -{ - register unsigned char st; - register int lcount; - register char *lptr; - - if (!doing_pdma) - return floppy_interrupt(irq, dev_id, regs); - - st = 1; - for(lcount=virtual_dma_count, lptr=virtual_dma_addr; - lcount; lcount--, lptr++) { - st=inb(virtual_dma_port+4) & 0xa0 ; - if(st != 0xa0) - break; - if(virtual_dma_mode) - outb_p(*lptr, virtual_dma_port+5); - else - *lptr = inb_p(virtual_dma_port+5); - } - virtual_dma_count = lcount; - virtual_dma_addr = lptr; - st = inb(virtual_dma_port+4); - - if(st == 0x20) - return IRQ_HANDLED; - if(!(st & 0x20)) { - virtual_dma_residue += virtual_dma_count; - virtual_dma_count=0; - doing_pdma = 0; - floppy_interrupt(irq, dev_id, regs); - return IRQ_HANDLED; - } - return IRQ_HANDLED; -} - -static void fd_disable_dma(void) -{ - doing_pdma = 0; - virtual_dma_residue += virtual_dma_count; - virtual_dma_count=0; -} - -static int fd_request_irq(void) -{ - return request_irq(FLOPPY_IRQ, floppy_hardint, - IRQF_DISABLED, "floppy", NULL); -} - -static int vdma_dma_setup(char *addr, unsigned long size, int mode, int io) -{ - doing_pdma = 1; - virtual_dma_port = io; - virtual_dma_mode = (mode == DMA_MODE_WRITE); - virtual_dma_addr = addr; - virtual_dma_count = size; - virtual_dma_residue = 0; - return 0; -} - -/* XEN: This trick to force 'virtual DMA' is from include/asm-m68k/floppy.h. */ -#define FDC1 xen_floppy_init() -static int FDC2 = -1; - -static int xen_floppy_init(void) -{ - use_virtual_dma = 1; - can_use_virtual_dma = 1; - return 0x3f0; -} - -/* - * Floppy types are stored in the rtc's CMOS RAM and so rtc_lock - * is needed to prevent corrupted CMOS RAM in case "insmod floppy" - * coincides with another rtc CMOS user. Paul G. - */ -#define FLOPPY0_TYPE ({ \ - unsigned long flags; \ - unsigned char val; \ - spin_lock_irqsave(&rtc_lock, flags); \ - val = (CMOS_READ(0x10) >> 4) & 15; \ - spin_unlock_irqrestore(&rtc_lock, flags); \ - val; \ -}) - -#define FLOPPY1_TYPE ({ \ - unsigned long flags; \ - unsigned char val; \ - spin_lock_irqsave(&rtc_lock, flags); \ - val = CMOS_READ(0x10) & 15; \ - spin_unlock_irqrestore(&rtc_lock, flags); \ - val; \ -}) - -#define N_FDC 2 -#define N_DRIVE 8 - -#define FLOPPY_MOTOR_MASK 0xf0 - -#define EXTRA_FLOPPY_PARAMS - -#endif /* __ASM_XEN_I386_FLOPPY_H */ diff -r 41b7a0d7c2ad -r 60d8f0befd18 include/asm-i386/mach-xen/asm/hypercall.h --- a/include/asm-i386/mach-xen/asm/hypercall.h Sun Aug 12 15:04:04 2007 -0600 +++ b/include/asm-i386/mach-xen/asm/hypercall.h Thu Aug 16 10:58:46 2007 -0600 @@ -34,6 +34,7 @@ #define __HYPERCALL_H__ #include /* memcpy() */ +#include #ifndef __HYPERVISOR_H__ # error "please don't include this file directly" @@ -47,7 +48,7 @@ "call hypercall_page + ("STR(__HYPERVISOR_##name)" * 32)" #else #define HYPERCALL_STR(name) \ - "mov hypercall_stubs,%%eax; " \ + "mov "__stringify(hypercall_stubs)",%%eax; " \ "add $("STR(__HYPERVISOR_##name)" * 32),%%eax; " \ "call *%%eax" #endif diff -r 41b7a0d7c2ad -r 60d8f0befd18 include/asm-i386/mach-xen/asm/io.h --- a/include/asm-i386/mach-xen/asm/io.h Sun Aug 12 15:04:04 2007 -0600 +++ b/include/asm-i386/mach-xen/asm/io.h Thu Aug 16 10:58:46 2007 -0600 @@ -151,7 +151,7 @@ extern void bt_iounmap(void *addr, unsig /* * ISA I/O bus memory addresses are 1:1 with the physical address. */ -#define isa_virt_to_bus(_x) isa_virt_to_bus_is_UNSUPPORTED->x +#define isa_virt_to_bus(_x) ({ BUG(); virt_to_bus(_x); }) #define isa_page_to_bus(_x) isa_page_to_bus_is_UNSUPPORTED->x #define isa_bus_to_virt(_x) (void *)(__fix_to_virt(FIX_ISAMAP_BEGIN) + (_x)) diff -r 41b7a0d7c2ad -r 60d8f0befd18 include/asm-x86_64/mach-xen/asm/floppy.h --- a/include/asm-x86_64/mach-xen/asm/floppy.h Sun Aug 12 15:04:04 2007 -0600 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,206 +0,0 @@ -/* - * Architecture specific parts of the Floppy driver - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - * - * Copyright (C) 1995 - * - * Modifications for Xen are Copyright (c) 2004, Keir Fraser. - */ -#ifndef __ASM_XEN_X86_64_FLOPPY_H -#define __ASM_XEN_X86_64_FLOPPY_H - -#include - -/* - * The DMA channel used by the floppy controller cannot access data at - * addresses >= 16MB - * - * Went back to the 1MB limit, as some people had problems with the floppy - * driver otherwise. It doesn't matter much for performance anyway, as most - * floppy accesses go through the track buffer. - */ -#define _CROSS_64KB(a,s,vdma) \ -(!(vdma) && ((unsigned long)(a)/K_64 != ((unsigned long)(a) + (s) - 1) / K_64)) - -/* XEN: Hit DMA paths on the head. This trick from asm-m68k/floppy.h. */ -#include -#undef MAX_DMA_ADDRESS -#define MAX_DMA_ADDRESS 0 -#define CROSS_64KB(a,s) (0) - -#define fd_inb(port) inb_p(port) -#define fd_outb(value,port) outb_p(value,port) - -#define fd_request_dma() (0) -#define fd_free_dma() ((void)0) -#define fd_enable_irq() enable_irq(FLOPPY_IRQ) -#define fd_disable_irq() disable_irq(FLOPPY_IRQ) -#define fd_free_irq() free_irq(FLOPPY_IRQ, NULL) -#define fd_get_dma_residue() vdma_get_dma_residue(FLOPPY_DMA) -/* - * Do not use vmalloc/vfree: floppy_release_irq_and_dma() gets called from - * softirq context via motor_off_callback. A generic bug we happen to trigger. - */ -#define fd_dma_mem_alloc(size) __get_free_pages(GFP_KERNEL|__GFP_NORETRY, get_order(size)) -#define fd_dma_mem_free(addr, size) free_pages(addr, get_order(size)) -#define fd_dma_setup(addr, size, mode, io) vdma_dma_setup(addr, size, mode, io) - -static int virtual_dma_count; -static int virtual_dma_residue; -static char *virtual_dma_addr; -static int virtual_dma_mode; -static int doing_pdma; - -static irqreturn_t floppy_hardint(int irq, void *dev_id, struct pt_regs * regs) -{ - register unsigned char st; - -#undef TRACE_FLPY_INT - -#ifdef TRACE_FLPY_INT - static int calls=0; - static int bytes=0; - static int dma_wait=0; -#endif - if (!doing_pdma) - return floppy_interrupt(irq, dev_id, regs); - -#ifdef TRACE_FLPY_INT - if(!calls) - bytes = virtual_dma_count; -#endif - - { - register int lcount; - register char *lptr; - - st = 1; - for(lcount=virtual_dma_count, lptr=virtual_dma_addr; - lcount; lcount--, lptr++) { - st=inb(virtual_dma_port+4) & 0xa0 ; - if(st != 0xa0) - break; - if(virtual_dma_mode) - outb_p(*lptr, virtual_dma_port+5); - else - *lptr = inb_p(virtual_dma_port+5); - } - virtual_dma_count = lcount; - virtual_dma_addr = lptr; - st = inb(virtual_dma_port+4); - } - -#ifdef TRACE_FLPY_INT - calls++; -#endif - if(st == 0x20) - return IRQ_HANDLED; - if(!(st & 0x20)) { - virtual_dma_residue += virtual_dma_count; - virtual_dma_count=0; -#ifdef TRACE_FLPY_INT - printk("count=%x, residue=%x calls=%d bytes=%d dma_wait=%d\n", - virtual_dma_count, virtual_dma_residue, calls, bytes, - dma_wait); - calls = 0; - dma_wait=0; -#endif - doing_pdma = 0; - floppy_interrupt(irq, dev_id, regs); - return IRQ_HANDLED; - } -#ifdef TRACE_FLPY_INT - if(!virtual_dma_count) - dma_wait++; -#endif - return IRQ_HANDLED; -} - -static void fd_disable_dma(void) -{ - doing_pdma = 0; - virtual_dma_residue += virtual_dma_count; - virtual_dma_count=0; -} - -static int vdma_get_dma_residue(unsigned int dummy) -{ - return virtual_dma_count + virtual_dma_residue; -} - - -static int fd_request_irq(void) -{ - return request_irq(FLOPPY_IRQ, floppy_hardint, - IRQF_DISABLED, "floppy", NULL); -} - -#if 0 -static unsigned long vdma_mem_alloc(unsigned long size) -{ - return (unsigned long) vmalloc(size); - -} - -static void vdma_mem_free(unsigned long addr, unsigned long size) -{ - vfree((void *)addr); -} -#endif - -static int vdma_dma_setup(char *addr, unsigned long size, int mode, int io) -{ - doing_pdma = 1; - virtual_dma_port = io; - virtual_dma_mode = (mode == DMA_MODE_WRITE); - virtual_dma_addr = addr; - virtual_dma_count = size; - virtual_dma_residue = 0; - return 0; -} - -/* XEN: This trick to force 'virtual DMA' is from include/asm-m68k/floppy.h. */ -#define FDC1 xen_floppy_init() -static int FDC2 = -1; - -static int xen_floppy_init(void) -{ - use_virtual_dma = 1; - can_use_virtual_dma = 1; - return 0x3f0; -} - -/* - * Floppy types are stored in the rtc's CMOS RAM and so rtc_lock - * is needed to prevent corrupted CMOS RAM in case "insmod floppy" - * coincides with another rtc CMOS user. Paul G. - */ -#define FLOPPY0_TYPE ({ \ - unsigned long flags; \ - unsigned char val; \ - spin_lock_irqsave(&rtc_lock, flags); \ - val = (CMOS_READ(0x10) >> 4) & 15; \ - spin_unlock_irqrestore(&rtc_lock, flags); \ - val; \ -}) - -#define FLOPPY1_TYPE ({ \ - unsigned long flags; \ - unsigned char val; \ - spin_lock_irqsave(&rtc_lock, flags); \ - val = CMOS_READ(0x10) & 15; \ - spin_unlock_irqrestore(&rtc_lock, flags); \ - val; \ -}) - -#define N_FDC 2 -#define N_DRIVE 8 - -#define FLOPPY_MOTOR_MASK 0xf0 - -#define EXTRA_FLOPPY_PARAMS - -#endif /* __ASM_XEN_X86_64_FLOPPY_H */ diff -r 41b7a0d7c2ad -r 60d8f0befd18 include/asm-x86_64/mach-xen/asm/hypercall.h --- a/include/asm-x86_64/mach-xen/asm/hypercall.h Sun Aug 12 15:04:04 2007 -0600 +++ b/include/asm-x86_64/mach-xen/asm/hypercall.h Thu Aug 16 10:58:46 2007 -0600 @@ -38,6 +38,7 @@ #define __HYPERCALL_H__ #include /* memcpy() */ +#include #ifndef __HYPERVISOR_H__ # error "please don't include this file directly" @@ -51,7 +52,7 @@ "call hypercall_page + ("STR(__HYPERVISOR_##name)" * 32)" #else #define HYPERCALL_STR(name) \ - "mov hypercall_stubs,%%rax; " \ + "mov "__stringify(hypercall_stubs)",%%rax; " \ "add $("STR(__HYPERVISOR_##name)" * 32),%%rax; " \ "call *%%rax" #endif diff -r 41b7a0d7c2ad -r 60d8f0befd18 include/asm-x86_64/mach-xen/asm/io.h --- a/include/asm-x86_64/mach-xen/asm/io.h Sun Aug 12 15:04:04 2007 -0600 +++ b/include/asm-x86_64/mach-xen/asm/io.h Thu Aug 16 10:58:46 2007 -0600 @@ -167,7 +167,7 @@ extern void iounmap(volatile void __iome * ISA I/O bus memory addresses are 1:1 with the physical address. */ -#define isa_virt_to_bus(_x) isa_virt_to_bus_is_UNSUPPORTED->x +#define isa_virt_to_bus(_x) ({ BUG(); virt_to_bus(_x); }) #define isa_page_to_bus(_x) isa_page_to_bus_is_UNSUPPORTED->x #define isa_bus_to_virt(_x) (void *)(__fix_to_virt(FIX_ISAMAP_BEGIN) + (_x)) diff -r 41b7a0d7c2ad -r 60d8f0befd18 include/xen/cpu_hotplug.h --- a/include/xen/cpu_hotplug.h Sun Aug 12 15:04:04 2007 -0600 +++ b/include/xen/cpu_hotplug.h Thu Aug 16 10:58:46 2007 -0600 @@ -6,9 +6,6 @@ #if defined(CONFIG_X86) && defined(CONFIG_SMP) extern cpumask_t cpu_initialized_map; -#define cpu_set_initialized(cpu) cpu_set(cpu, cpu_initialized_map) -#else -#define cpu_set_initialized(cpu) ((void)0) #endif #if defined(CONFIG_HOTPLUG_CPU) diff -r 41b7a0d7c2ad -r 60d8f0befd18 include/xen/xencomm.h --- a/include/xen/xencomm.h Sun Aug 12 15:04:04 2007 -0600 +++ b/include/xen/xencomm.h Thu Aug 16 10:58:46 2007 -0600 @@ -30,15 +30,39 @@ struct xencomm_mini { uint64_t address[XENCOMM_MINI_ADDRS]; }; -extern void xencomm_free(void *desc); -extern void *xencomm_map(void *ptr, unsigned long bytes); -extern void *__xencomm_map_no_alloc(void *ptr, unsigned long bytes, - struct xencomm_mini *xc_area); +/* To avoid additionnal virt to phys conversion, an opaque structure is + presented. */ +struct xencomm_handle; -#define xencomm_map_no_alloc(ptr, bytes) \ - ({struct xencomm_mini xc_desc\ - __attribute__((__aligned__(sizeof(struct xencomm_mini))));\ - __xencomm_map_no_alloc(ptr, bytes, &xc_desc);}) +extern void xencomm_free(struct xencomm_handle *desc); +extern struct xencomm_handle *xencomm_map(void *ptr, unsigned long bytes); +extern struct xencomm_handle *__xencomm_map_no_alloc(void *ptr, + unsigned long bytes, struct xencomm_mini *xc_area); + +#if 0 +#define XENCOMM_MINI_ALIGNED(xc_desc, n) \ + struct xencomm_mini xc_desc ## _base[(n)] \ + __attribute__((__aligned__(sizeof(struct xencomm_mini)))); \ + struct xencomm_mini* xc_desc = &xc_desc ## _base[0]; +#else +/* + * gcc bug workaround: + * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16660 + * gcc doesn't handle properly stack variable with + * __attribute__((__align__(sizeof(struct xencomm_mini)))) + */ +#define XENCOMM_MINI_ALIGNED(xc_desc, n) \ + unsigned char xc_desc ## _base[((n) + 1 ) * \ + sizeof(struct xencomm_mini)]; \ + struct xencomm_mini *xc_desc = (struct xencomm_mini*) \ + ((unsigned long)xc_desc ## _base + \ + (sizeof(struct xencomm_mini) - \ + ((unsigned long)xc_desc ## _base) % \ + sizeof(struct xencomm_mini))); +#endif +#define xencomm_map_no_alloc(ptr, bytes) \ + ({XENCOMM_MINI_ALIGNED(xc_desc, 1); \ + __xencomm_map_no_alloc(ptr, bytes, xc_desc);}) /* provided by architecture code: */ extern unsigned long xencomm_vtop(unsigned long vaddr); @@ -48,4 +72,6 @@ static inline void *xencomm_pa(void *ptr return (void *)xencomm_vtop((unsigned long)ptr); } +#define xen_guest_handle(hnd) ((hnd).p) + #endif /* _LINUX_XENCOMM_H_ */ _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:12:23 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:12:23 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgRS-0008KH-Rw for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:12:23 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgRl-0005mW-DK; Fri, 07 Sep 2007 16:12:41 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgQA-0004Vc-Rf for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:11:03 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgPw-0007Ft-EE for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:11:00 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAQjm011665 for ; Fri, 7 Sep 2007 09:10:26 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAXvE022111 for ; Fri, 7 Sep 2007 09:10:33 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GAX61022110 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:10:33 -0700 Message-Id: <200709071610.l87GAX61022110@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:10:32 -0700 From: "Xen patchbot-linux-2.6.18-xen" To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [linux-2.6.18-xen] [IA64] Linux xencomm consolidation X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User Alex Williamson # Date 1187293491 21600 # Node ID b5fdf02c38f4765697196f5fad5d1262f2c157f4 # Parent 60d8f0befd1810571b562a5120ced76868c86096 [IA64] Linux xencomm consolidation Use common xencomm.c and remove ia64 xencomm.c Signed-off-by: Isaku Yamahata --- arch/ia64/xen/xcom_mini.c | 488 -------------------------------------- arch/ia64/Kconfig | 1 arch/ia64/kernel/setup.c | 2 arch/ia64/xen/Makefile | 2 arch/ia64/xen/hypervisor.c | 2 arch/ia64/xen/xcom_hcall.c | 445 +++++++++++++++++++++++++--------- arch/ia64/xen/xcom_privcmd.c | 219 +++++++++-------- arch/ia64/xen/xencomm.c | 158 ------------ include/asm-ia64/hypercall.h | 15 - include/asm-ia64/sal.h | 6 include/asm-ia64/xen/xcom_hcall.h | 29 -- include/asm-ia64/xen/xencomm.h | 47 --- 12 files changed, 467 insertions(+), 947 deletions(-) diff -r 60d8f0befd18 -r b5fdf02c38f4 arch/ia64/Kconfig --- a/arch/ia64/Kconfig Thu Aug 16 10:58:46 2007 -0600 +++ b/arch/ia64/Kconfig Thu Aug 16 13:44:51 2007 -0600 @@ -61,6 +61,7 @@ config XEN config XEN bool "Xen hypervisor support" default y + select XEN_XENCOMM help Enable Xen hypervisor support. Resulting kernel runs both as a guest OS on Xen and natively on hardware. diff -r 60d8f0befd18 -r b5fdf02c38f4 arch/ia64/kernel/setup.c --- a/arch/ia64/kernel/setup.c Thu Aug 16 10:58:46 2007 -0600 +++ b/arch/ia64/kernel/setup.c Thu Aug 16 13:44:51 2007 -0600 @@ -449,7 +449,7 @@ setup_arch (char **cmdline_p) struct xen_ia64_opt_feature optf; /* Must be done before any hypercall. */ - xencomm_init(); + xencomm_initialize(); setup_xen_features(); /* Register a call for panic conditions. */ diff -r 60d8f0befd18 -r b5fdf02c38f4 arch/ia64/xen/Makefile --- a/arch/ia64/xen/Makefile Thu Aug 16 10:58:46 2007 -0600 +++ b/arch/ia64/xen/Makefile Thu Aug 16 13:44:51 2007 -0600 @@ -3,7 +3,7 @@ # obj-y := hypercall.o xenivt.o xenentry.o xensetup.o xenpal.o xenhpski.o \ - hypervisor.o util.o xencomm.o xcom_hcall.o xcom_mini.o \ + hypervisor.o util.o xencomm.o xcom_hcall.o \ xcom_privcmd.o xen_dma.o obj-$(CONFIG_IA64_GENERIC) += machvec.o diff -r 60d8f0befd18 -r b5fdf02c38f4 arch/ia64/xen/hypervisor.c --- a/arch/ia64/xen/hypervisor.c Thu Aug 16 10:58:46 2007 -0600 +++ b/arch/ia64/xen/hypervisor.c Thu Aug 16 13:44:51 2007 -0600 @@ -447,7 +447,7 @@ HYPERVISOR_grant_table_op(unsigned int c (struct gnttab_map_grant_ref*)uop + i); } } - return xencomm_mini_hypercall_grant_table_op(cmd, uop, count); + return xencomm_hypercall_grant_table_op(cmd, uop, count); } EXPORT_SYMBOL(HYPERVISOR_grant_table_op); diff -r 60d8f0befd18 -r b5fdf02c38f4 arch/ia64/xen/xcom_hcall.c --- a/arch/ia64/xen/xcom_hcall.c Thu Aug 16 10:58:46 2007 -0600 +++ b/arch/ia64/xen/xcom_hcall.c Thu Aug 16 13:44:51 2007 -0600 @@ -14,6 +14,11 @@ * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * Tristan Gingold + * + * Copyright (c) 2007 + * Isaku Yamahata + * VA Linux Systems Japan K.K. + * consolidate mini and inline version. */ #include #include @@ -42,8 +47,8 @@ /* Xencomm notes: * This file defines hypercalls to be used by xencomm. The hypercalls simply - * create inlines descriptors for pointers and then call the raw arch hypercall - * xencomm_arch_hypercall_XXX + * create inlines or mini descriptors for pointers and then call the raw arch + * hypercall xencomm_arch_hypercall_XXX * * If the arch wants to directly use these hypercalls, simply define macros * in asm/hypercall.h, eg: @@ -52,107 +57,206 @@ * The arch may also define HYPERVISOR_xxx as a function and do more operations * before/after doing the hypercall. * - * Note: because only inline descriptors are created these functions must only - * be called with in kernel memory parameters. + * Note: because only inline or mini descriptors are created these functions + * must only be called with in kernel memory parameters. */ int xencomm_hypercall_console_io(int cmd, int count, char *str) { return xencomm_arch_hypercall_console_io - (cmd, count, xencomm_create_inline(str)); -} + (cmd, count, xencomm_map_no_alloc(str, count)); +} +EXPORT_SYMBOL_GPL(xencomm_hypercall_console_io); int xencomm_hypercall_event_channel_op(int cmd, void *op) { - return xencomm_arch_hypercall_event_channel_op - (cmd, xencomm_create_inline(op)); -} + struct xencomm_handle *desc; + desc = xencomm_map_no_alloc(op, sizeof(evtchn_op_t)); + if (desc == NULL) + return -EINVAL; + + return xencomm_arch_hypercall_event_channel_op(cmd, desc); +} +EXPORT_SYMBOL_GPL(xencomm_hypercall_event_channel_op); int xencomm_hypercall_xen_version(int cmd, void *arg) { + struct xencomm_handle *desc; + unsigned int argsize; + switch (cmd) { case XENVER_version: + /* do not actually pass an argument */ + return xencomm_arch_hypercall_xen_version(cmd, 0); case XENVER_extraversion: + argsize = sizeof(xen_extraversion_t); + break; case XENVER_compile_info: + argsize = sizeof(xen_compile_info_t); + break; case XENVER_capabilities: + argsize = sizeof(xen_capabilities_info_t); + break; case XENVER_changeset: + argsize = sizeof(xen_changeset_info_t); + break; case XENVER_platform_parameters: + argsize = sizeof(xen_platform_parameters_t); + break; case XENVER_pagesize: + argsize = (arg == NULL) ? 0 : sizeof(void *); + break; case XENVER_get_features: - break; - default: - printk("%s: unknown version cmd %d\n", __func__, cmd); - return -ENOSYS; - } - - return xencomm_arch_hypercall_xen_version - (cmd, xencomm_create_inline(arg)); -} + argsize = (arg == NULL) ? 0 : sizeof(xen_feature_info_t); + break; + + default: + printk("%s: unknown version op %d\n", __func__, cmd); + return -ENOSYS; + } + + desc = xencomm_map_no_alloc(arg, argsize); + if (desc == NULL) + return -EINVAL; + + return xencomm_arch_hypercall_xen_version(cmd, desc); +} +EXPORT_SYMBOL_GPL(xencomm_hypercall_xen_version); int xencomm_hypercall_physdev_op(int cmd, void *op) { + unsigned int argsize; + + switch (cmd) { + case PHYSDEVOP_apic_read: + case PHYSDEVOP_apic_write: + argsize = sizeof(physdev_apic_t); + break; + case PHYSDEVOP_alloc_irq_vector: + case PHYSDEVOP_free_irq_vector: + argsize = sizeof(physdev_irq_t); + break; + case PHYSDEVOP_irq_status_query: + argsize = sizeof(physdev_irq_status_query_t); + break; + + default: + printk("%s: unknown physdev op %d\n", __func__, cmd); + return -ENOSYS; + } + return xencomm_arch_hypercall_physdev_op - (cmd, xencomm_create_inline(op)); -} - -static void * -xencommize_grant_table_op(unsigned int cmd, void *op, unsigned int count) -{ + (cmd, xencomm_map_no_alloc(op, argsize)); +} + +static int +xencommize_grant_table_op(struct xencomm_mini **xc_area, + unsigned int cmd, void *op, unsigned int count, + struct xencomm_handle **desc) +{ + struct xencomm_handle *desc1; + unsigned int argsize; + switch (cmd) { case GNTTABOP_map_grant_ref: + argsize = sizeof(struct gnttab_map_grant_ref); + break; case GNTTABOP_unmap_grant_ref: + argsize = sizeof(struct gnttab_unmap_grant_ref); + break; case GNTTABOP_unmap_and_replace: + argsize = sizeof(struct gnttab_unmap_and_replace); break; case GNTTABOP_setup_table: { struct gnttab_setup_table *setup = op; - struct xencomm_handle *frame_list; - - frame_list = xencomm_create_inline - (xen_guest_handle(setup->frame_list)); - - set_xen_guest_handle(setup->frame_list, (void *)frame_list); + + argsize = sizeof(*setup); + + if (count != 1) + return -EINVAL; + desc1 = __xencomm_map_no_alloc + (xen_guest_handle(setup->frame_list), + setup->nr_frames * + sizeof(*xen_guest_handle(setup->frame_list)), + *xc_area); + if (desc1 == NULL) + return -EINVAL; + (*xc_area)++; + set_xen_guest_handle(setup->frame_list, (void *)desc1); break; } case GNTTABOP_dump_table: + argsize = sizeof(struct gnttab_dump_table); + break; case GNTTABOP_transfer: + argsize = sizeof(struct gnttab_transfer); + break; case GNTTABOP_copy: - break; - default: - printk("%s: unknown grant table op %d\n", __func__, cmd); + argsize = sizeof(struct gnttab_copy); + break; + case GNTTABOP_query_size: + argsize = sizeof(struct gnttab_query_size); + break; + default: + printk("%s: unknown hypercall grant table op %d\n", + __func__, cmd); BUG(); } - return xencomm_create_inline(op); -} - -int -xencomm_hypercall_grant_table_op(unsigned int cmd, void *op, unsigned int count) -{ - void *desc = xencommize_grant_table_op (cmd, op, count); + *desc = __xencomm_map_no_alloc(op, count * argsize, *xc_area); + if (*desc == NULL) + return -EINVAL; + (*xc_area)++; + + return 0; +} + +int +xencomm_hypercall_grant_table_op(unsigned int cmd, void *op, + unsigned int count) +{ + int rc; + struct xencomm_handle *desc; + XENCOMM_MINI_ALIGNED(xc_area, 2); + + rc = xencommize_grant_table_op(&xc_area, cmd, op, count, &desc); + if (rc) + return rc; return xencomm_arch_hypercall_grant_table_op(cmd, desc, count); } +EXPORT_SYMBOL_GPL(xencomm_hypercall_grant_table_op); int xencomm_hypercall_sched_op(int cmd, void *arg) { + struct xencomm_handle *desc; + unsigned int argsize; + switch (cmd) { case SCHEDOP_yield: case SCHEDOP_block: + argsize = 0; + break; case SCHEDOP_shutdown: + argsize = sizeof(sched_shutdown_t); + break; case SCHEDOP_remote_shutdown: + argsize = sizeof(sched_remote_shutdown_t); break; case SCHEDOP_poll: { sched_poll_t *poll = arg; struct xencomm_handle *ports; - ports = xencomm_create_inline(xen_guest_handle(poll->ports)); + argsize = sizeof(sched_poll_t); + ports = xencomm_map_no_alloc(xen_guest_handle(poll->ports), + sizeof(*xen_guest_handle(poll->ports))); set_xen_guest_handle(poll->ports, (void *)ports); break; @@ -162,14 +266,22 @@ xencomm_hypercall_sched_op(int cmd, void return -ENOSYS; } - return xencomm_arch_hypercall_sched_op(cmd, xencomm_create_inline(arg)); -} + desc = xencomm_map_no_alloc(arg, argsize); + if (desc == NULL) + return -EINVAL; + + return xencomm_arch_hypercall_sched_op(cmd, desc); +} +EXPORT_SYMBOL_GPL(xencomm_hypercall_sched_op); int xencomm_hypercall_multicall(void *call_list, int nr_calls) { + int rc; int i; multicall_entry_t *mce; + struct xencomm_handle *desc; + XENCOMM_MINI_ALIGNED(xc_area, nr_calls * 2); for (i = 0; i < nr_calls; i++) { mce = (multicall_entry_t *)call_list + i; @@ -180,9 +292,13 @@ xencomm_hypercall_multicall(void *call_l /* No-op on ia64. */ break; case __HYPERVISOR_grant_table_op: - mce->args[1] = (unsigned long)xencommize_grant_table_op - (mce->args[0], (void *)mce->args[1], - mce->args[2]); + rc = xencommize_grant_table_op + (&xc_area, + mce->args[0], (void *)mce->args[1], + mce->args[2], &desc); + if (rc) + return rc; + mce->args[1] = (unsigned long)desc; break; case __HYPERVISOR_memory_op: default: @@ -192,17 +308,26 @@ xencomm_hypercall_multicall(void *call_l } } - return xencomm_arch_hypercall_multicall - (xencomm_create_inline(call_list), nr_calls); -} + desc = xencomm_map_no_alloc(call_list, + nr_calls * sizeof(multicall_entry_t)); + if (desc == NULL) + return -EINVAL; + + return xencomm_arch_hypercall_multicall(desc, nr_calls); +} +EXPORT_SYMBOL_GPL(xencomm_hypercall_multicall); int xencomm_hypercall_callback_op(int cmd, void *arg) { + unsigned int argsize; switch (cmd) { case CALLBACKOP_register: + argsize = sizeof(struct callback_register); + break; case CALLBACKOP_unregister: + argsize = sizeof(struct callback_unregister); break; default: printk("%s: unknown callback op %d\n", __func__, cmd); @@ -210,16 +335,24 @@ xencomm_hypercall_callback_op(int cmd, v } return xencomm_arch_hypercall_callback_op - (cmd, xencomm_create_inline(arg)); -} - -static void -xencommize_memory_reservation (xen_memory_reservation_t *mop) -{ - struct xencomm_handle *desc; - - desc = xencomm_create_inline(xen_guest_handle(mop->extent_start)); + (cmd, xencomm_map_no_alloc(arg, argsize)); +} + +static int +xencommize_memory_reservation(struct xencomm_mini *xc_area, + xen_memory_reservation_t *mop) +{ + struct xencomm_handle *desc; + + desc = __xencomm_map_no_alloc(xen_guest_handle(mop->extent_start), + mop->nr_extents * + sizeof(*xen_guest_handle(mop->extent_start)), + xc_area); + if (desc == NULL) + return -EINVAL; + set_xen_guest_handle(mop->extent_start, (void *)desc); + return 0; } int @@ -230,39 +363,61 @@ xencomm_hypercall_memory_op(unsigned int xen_memory_map_t *memmap = NULL; XEN_GUEST_HANDLE(void) buffer; int rc; + struct xencomm_handle *desc; + unsigned int argsize; + XENCOMM_MINI_ALIGNED(xc_area, 2); switch (cmd) { case XENMEM_increase_reservation: case XENMEM_decrease_reservation: case XENMEM_populate_physmap: xmr = (xen_memory_reservation_t *)arg; - xen_guest_handle(extent_start_va[0]) = - xen_guest_handle(xmr->extent_start); - xencommize_memory_reservation((xen_memory_reservation_t *)arg); + set_xen_guest_handle(extent_start_va[0], + xen_guest_handle(xmr->extent_start)); + + argsize = sizeof(*xmr); + rc = xencommize_memory_reservation(xc_area, xmr); + if (rc) + return rc; + xc_area++; break; case XENMEM_maximum_ram_page: + argsize = 0; break; case XENMEM_exchange: xme_in = &((xen_memory_exchange_t *)arg)->in; xme_out = &((xen_memory_exchange_t *)arg)->out; - xen_guest_handle(extent_start_va[0]) = - xen_guest_handle(xme_in->extent_start); - xen_guest_handle(extent_start_va[1]) = - xen_guest_handle(xme_out->extent_start); - xencommize_memory_reservation - (&((xen_memory_exchange_t *)arg)->in); - xencommize_memory_reservation - (&((xen_memory_exchange_t *)arg)->out); + set_xen_guest_handle(extent_start_va[0], + xen_guest_handle(xme_in->extent_start)); + set_xen_guest_handle(extent_start_va[1], + xen_guest_handle(xme_out->extent_start)); + + argsize = sizeof(xen_memory_exchange_t); + rc = xencommize_memory_reservation(xc_area, xme_in); + if (rc) + return rc; + xc_area++; + rc = xencommize_memory_reservation(xc_area, xme_out); + if (rc) + return rc; + xc_area++; + break; + + case XENMEM_add_to_physmap: + argsize = sizeof(xen_add_to_physmap_t); break; case XENMEM_machine_memory_map: + argsize = sizeof(*memmap); memmap = (xen_memory_map_t *)arg; - xen_guest_handle(buffer) = xen_guest_handle(memmap->buffer); - set_xen_guest_handle(memmap->buffer, - (void *)xencomm_create_inline( - xen_guest_handle(memmap->buffer))); + set_xen_guest_handle(buffer, xen_guest_handle(memmap->buffer)); + desc = xencomm_map_no_alloc(xen_guest_handle(memmap->buffer), + memmap->nr_entries); + if (desc == NULL) + return -EINVAL; + set_xen_guest_handle(memmap->buffer, (void *)desc); break; default: @@ -270,45 +425,59 @@ xencomm_hypercall_memory_op(unsigned int return -ENOSYS; } - rc = xencomm_arch_hypercall_memory_op(cmd, xencomm_create_inline(arg)); + desc = xencomm_map_no_alloc(arg, argsize); + if (desc == NULL) + return -EINVAL; + + rc = xencomm_arch_hypercall_memory_op(cmd, desc); switch (cmd) { case XENMEM_increase_reservation: case XENMEM_decrease_reservation: case XENMEM_populate_physmap: - xen_guest_handle(xmr->extent_start) = - xen_guest_handle(extent_start_va[0]); + set_xen_guest_handle(xmr->extent_start, + xen_guest_handle(extent_start_va[0])); break; case XENMEM_exchange: - xen_guest_handle(xme_in->extent_start) = - xen_guest_handle(extent_start_va[0]); - xen_guest_handle(xme_out->extent_start) = - xen_guest_handle(extent_start_va[1]); + set_xen_guest_handle(xme_in->extent_start, + xen_guest_handle(extent_start_va[0])); + set_xen_guest_handle(xme_out->extent_start, + xen_guest_handle(extent_start_va[1])); break; case XENMEM_machine_memory_map: - xen_guest_handle(memmap->buffer) = xen_guest_handle(buffer); + set_xen_guest_handle(memmap->buffer, xen_guest_handle(buffer)); break; } return rc; } +EXPORT_SYMBOL_GPL(xencomm_hypercall_memory_op); unsigned long xencomm_hypercall_hvm_op(int cmd, void *arg) { - switch (cmd) { + struct xencomm_handle *desc; + unsigned int argsize; + + switch (cmd) { + case HVMOP_get_param: case HVMOP_set_param: - case HVMOP_get_param: - break; - default: - printk("%s: unknown hvm op %d\n", __func__, cmd); - return -ENOSYS; - } - - return xencomm_arch_hypercall_hvm_op(cmd, xencomm_create_inline(arg)); -} + argsize = sizeof(xen_hvm_param_t); + break; + default: + printk("%s: unknown HVMOP %d\n", __func__, cmd); + return -EINVAL; + } + + desc = xencomm_map_no_alloc(arg, argsize); + if (desc == NULL) + return -EINVAL; + + return xencomm_arch_hypercall_hvm_op(cmd, desc); +} +EXPORT_SYMBOL_GPL(xencomm_hypercall_hvm_op); int xencomm_hypercall_suspend(unsigned long srec) @@ -317,18 +486,31 @@ xencomm_hypercall_suspend(unsigned long arg.reason = SHUTDOWN_suspend; - return xencomm_arch_hypercall_suspend(xencomm_create_inline(&arg)); + return xencomm_arch_hypercall_suspend( + xencomm_map_no_alloc(&arg, sizeof(arg))); } int xencomm_hypercall_xenoprof_op(int op, void *arg) { + unsigned int argsize; + struct xencomm_handle *desc; + switch (op) { case XENOPROF_init: + argsize = sizeof(xenoprof_init_t); + break; case XENOPROF_set_active: + argsize = sizeof(domid_t); + break; case XENOPROF_set_passive: + argsize = sizeof(xenoprof_passive_t); + break; case XENOPROF_counter: + argsize = sizeof(xenoprof_counter_t); + break; case XENOPROF_get_buffer: + argsize = sizeof(xenoprof_get_buffer_t); break; case XENOPROF_reset_active_list: @@ -342,25 +524,40 @@ xencomm_hypercall_xenoprof_op(int op, vo case XENOPROF_release_counters: case XENOPROF_shutdown: return xencomm_arch_hypercall_xenoprof_op(op, arg); - break; default: printk("%s: op %d isn't supported\n", __func__, op); return -ENOSYS; } - return xencomm_arch_hypercall_xenoprof_op(op, - xencomm_create_inline(arg)); -} - -int -xencomm_hypercall_perfmon_op(unsigned long cmd, void* arg, unsigned long count) -{ + + desc = xencomm_map_no_alloc(arg, argsize); + if (desc == NULL) + return -EINVAL; + + return xencomm_arch_hypercall_xenoprof_op(op, desc); +} +EXPORT_SYMBOL_GPL(xencomm_hypercall_xenoprof_op); + +int +xencomm_hypercall_perfmon_op(unsigned long cmd, void* arg, + unsigned long count) +{ + unsigned int argsize; + struct xencomm_handle *desc; + switch (cmd) { case PFM_GET_FEATURES: + argsize = sizeof(pfarg_features_t); + break; case PFM_CREATE_CONTEXT: + argsize = sizeof(pfarg_context_t); + break; + case PFM_LOAD_CONTEXT: + argsize = sizeof(pfarg_load_t); + break; case PFM_WRITE_PMCS: case PFM_WRITE_PMDS: - case PFM_LOAD_CONTEXT: + argsize = sizeof(pfarg_reg_t) * count; break; case PFM_DESTROY_CONTEXT: @@ -371,22 +568,32 @@ xencomm_hypercall_perfmon_op(unsigned lo default: printk("%s:%d cmd %ld isn't supported\n", - __func__,__LINE__, cmd); + __func__, __LINE__, cmd); BUG(); } - return xencomm_arch_hypercall_perfmon_op(cmd, - xencomm_create_inline(arg), - count); -} + desc = xencomm_map_no_alloc(arg, argsize); + if (desc == NULL) + return -EINVAL; + + return xencomm_arch_hypercall_perfmon_op(cmd, desc, count); +} +EXPORT_SYMBOL_GPL(xencomm_hypercall_perfmon_op); long xencomm_hypercall_vcpu_op(int cmd, int cpu, void *arg) { - switch (cmd) { - case VCPUOP_register_runstate_memory_area: - xencommize_memory_reservation((xen_memory_reservation_t *)arg); - break; + unsigned int argsize; + switch (cmd) { + case VCPUOP_register_runstate_memory_area: { + vcpu_register_runstate_memory_area_t *area = + (vcpu_register_runstate_memory_area_t *)arg; + argsize = sizeof(*arg); + set_xen_guest_handle(area->addr.h, + (void *)xencomm_map_no_alloc(area->addr.v, + sizeof(area->addr.v))); + break; + } default: printk("%s: unknown vcpu op %d\n", __func__, cmd); @@ -394,18 +601,26 @@ xencomm_hypercall_vcpu_op(int cmd, int c } return xencomm_arch_hypercall_vcpu_op(cmd, cpu, - xencomm_create_inline(arg)); + xencomm_map_no_alloc(arg, argsize)); } long xencomm_hypercall_opt_feature(void *arg) { - return xencomm_arch_hypercall_opt_feature(xencomm_create_inline(arg)); + return xencomm_arch_hypercall_opt_feature( + xencomm_map_no_alloc(arg, + sizeof(struct xen_ia64_opt_feature))); } int xencomm_hypercall_fpswa_revision(unsigned int *revision) { - return xencomm_arch_hypercall_fpswa_revision( - xencomm_create_inline(revision)); -} + struct xencomm_handle *desc; + + desc = xencomm_map_no_alloc(revision, sizeof(*revision)); + if (desc == NULL) + return -EINVAL; + + return xencomm_arch_hypercall_fpswa_revision(desc); +} +EXPORT_SYMBOL_GPL(xencomm_hypercall_fpswa_revision); diff -r 60d8f0befd18 -r b5fdf02c38f4 arch/ia64/xen/xcom_mini.c --- a/arch/ia64/xen/xcom_mini.c Thu Aug 16 10:58:46 2007 -0600 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,488 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Tristan Gingold - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef CONFIG_VMX_GUEST -#include -#else -#include -#endif -#include -#include - -int -xencomm_mini_hypercall_event_channel_op(int cmd, void *op) -{ - struct xencomm_mini xc_area[2]; - int nbr_area = 2; - struct xencomm_handle *desc; - int rc; - - rc = xencomm_create_mini(xc_area, &nbr_area, - op, sizeof(evtchn_op_t), &desc); - if (rc) - return rc; - - return xencomm_arch_hypercall_event_channel_op(cmd, desc); -} -EXPORT_SYMBOL(xencomm_mini_hypercall_event_channel_op); - -static int -xencommize_mini_grant_table_op(struct xencomm_mini *xc_area, int *nbr_area, - unsigned int cmd, void *op, unsigned int count, - struct xencomm_handle **desc) -{ - struct xencomm_handle *desc1; - unsigned int argsize; - int rc; - - switch (cmd) { - case GNTTABOP_map_grant_ref: - argsize = sizeof(struct gnttab_map_grant_ref); - break; - case GNTTABOP_unmap_grant_ref: - argsize = sizeof(struct gnttab_unmap_grant_ref); - break; - case GNTTABOP_unmap_and_replace: - argsize = sizeof(struct gnttab_unmap_and_replace); - break; - case GNTTABOP_setup_table: - { - struct gnttab_setup_table *setup = op; - - argsize = sizeof(*setup); - - if (count != 1) - return -EINVAL; - rc = xencomm_create_mini - (xc_area, nbr_area, - xen_guest_handle(setup->frame_list), - setup->nr_frames - * sizeof(*xen_guest_handle(setup->frame_list)), - &desc1); - if (rc) - return rc; - set_xen_guest_handle(setup->frame_list, (void *)desc1); - break; - } - case GNTTABOP_dump_table: - argsize = sizeof(struct gnttab_dump_table); - break; - case GNTTABOP_transfer: - argsize = sizeof(struct gnttab_transfer); - break; - case GNTTABOP_copy: - argsize = sizeof(struct gnttab_copy); - break; - case GNTTABOP_query_size: - argsize = sizeof(struct gnttab_query_size); - break; - default: - printk("%s: unknown mini grant table op %d\n", __func__, cmd); - BUG(); - } - - rc = xencomm_create_mini(xc_area, nbr_area, op, count * argsize, desc); - if (rc) - return rc; - - return 0; -} - -int -xencomm_mini_hypercall_grant_table_op(unsigned int cmd, void *op, - unsigned int count) -{ - int rc; - struct xencomm_handle *desc; - int nbr_area = 2; - struct xencomm_mini xc_area[2]; - - rc = xencommize_mini_grant_table_op(xc_area, &nbr_area, - cmd, op, count, &desc); - if (rc) - return rc; - - return xencomm_arch_hypercall_grant_table_op(cmd, desc, count); -} -EXPORT_SYMBOL(xencomm_mini_hypercall_grant_table_op); - -int -xencomm_mini_hypercall_multicall(void *call_list, int nr_calls) -{ - int i; - multicall_entry_t *mce; - int nbr_area = 2 + nr_calls * 3; - struct xencomm_mini xc_area[nbr_area]; - struct xencomm_handle *desc; - int rc; - - for (i = 0; i < nr_calls; i++) { - mce = (multicall_entry_t *)call_list + i; - - switch (mce->op) { - case __HYPERVISOR_update_va_mapping: - case __HYPERVISOR_mmu_update: - /* No-op on ia64. */ - break; - case __HYPERVISOR_grant_table_op: - rc = xencommize_mini_grant_table_op - (xc_area, &nbr_area, - mce->args[0], (void *)mce->args[1], - mce->args[2], &desc); - if (rc) - return rc; - mce->args[1] = (unsigned long)desc; - break; - case __HYPERVISOR_memory_op: - default: - printk("%s: unhandled multicall op entry op %lu\n", - __func__, mce->op); - return -ENOSYS; - } - } - - rc = xencomm_create_mini(xc_area, &nbr_area, call_list, - nr_calls * sizeof(multicall_entry_t), &desc); - if (rc) - return rc; - - return xencomm_arch_hypercall_multicall(desc, nr_calls); -} -EXPORT_SYMBOL(xencomm_mini_hypercall_multicall); - -static int -xencommize_mini_memory_reservation(struct xencomm_mini *area, int *nbr_area, - xen_memory_reservation_t *mop) -{ - struct xencomm_handle *desc; - int rc; - - rc = xencomm_create_mini - (area, nbr_area, - xen_guest_handle(mop->extent_start), - mop->nr_extents - * sizeof(*xen_guest_handle(mop->extent_start)), - &desc); - if (rc) - return rc; - - set_xen_guest_handle(mop->extent_start, (void *)desc); - - return 0; -} - -int -xencomm_mini_hypercall_memory_op(unsigned int cmd, void *arg) -{ - int nbr_area = 4; - struct xencomm_mini xc_area[4]; - struct xencomm_handle *desc; - int rc; - unsigned int argsize; - - switch (cmd) { - case XENMEM_increase_reservation: - case XENMEM_decrease_reservation: - case XENMEM_populate_physmap: - argsize = sizeof(xen_memory_reservation_t); - rc = xencommize_mini_memory_reservation - (xc_area, &nbr_area, (xen_memory_reservation_t *)arg); - if (rc) - return rc; - break; - - case XENMEM_maximum_ram_page: - argsize = 0; - break; - - case XENMEM_exchange: - argsize = sizeof(xen_memory_exchange_t); - rc = xencommize_mini_memory_reservation - (xc_area, &nbr_area, - &((xen_memory_exchange_t *)arg)->in); - if (rc) - return rc; - rc = xencommize_mini_memory_reservation - (xc_area, &nbr_area, - &((xen_memory_exchange_t *)arg)->out); - if (rc) - return rc; - break; - - case XENMEM_add_to_physmap: - argsize = sizeof (xen_add_to_physmap_t); - break; - - case XENMEM_machine_memory_map: - { - xen_memory_map_t *memmap = (xen_memory_map_t *)arg; - argsize = sizeof(*memmap); - rc = xencomm_create_mini(xc_area, &nbr_area, - xen_guest_handle(memmap->buffer), - memmap->nr_entries, &desc); - if (rc) - return rc; - set_xen_guest_handle(memmap->buffer, (void *)desc); - break; - } - - default: - printk("%s: unknown mini memory op %d\n", __func__, cmd); - return -ENOSYS; - } - - rc = xencomm_create_mini(xc_area, &nbr_area, arg, argsize, &desc); - if (rc) - return rc; - - return xencomm_arch_hypercall_memory_op(cmd, desc); -} -EXPORT_SYMBOL(xencomm_mini_hypercall_memory_op); - -unsigned long -xencomm_mini_hypercall_hvm_op(int cmd, void *arg) -{ - struct xencomm_handle *desc; - int nbr_area = 2; - struct xencomm_mini xc_area[2]; - unsigned int argsize; - int rc; - - switch (cmd) { - case HVMOP_get_param: - case HVMOP_set_param: - argsize = sizeof(xen_hvm_param_t); - break; - default: - printk("%s: unknown HVMOP %d\n", __func__, cmd); - return -EINVAL; - } - - rc = xencomm_create_mini(xc_area, &nbr_area, arg, argsize, &desc); - if (rc) - return rc; - - return xencomm_arch_hypercall_hvm_op(cmd, desc); -} -EXPORT_SYMBOL(xencomm_mini_hypercall_hvm_op); - -int -xencomm_mini_hypercall_xen_version(int cmd, void *arg) -{ - struct xencomm_handle *desc; - int nbr_area = 2; - struct xencomm_mini xc_area[2]; - unsigned int argsize; - int rc; - - switch (cmd) { - case XENVER_version: - /* do not actually pass an argument */ - return xencomm_arch_hypercall_xen_version(cmd, 0); - case XENVER_extraversion: - argsize = sizeof(xen_extraversion_t); - break; - case XENVER_compile_info: - argsize = sizeof(xen_compile_info_t); - break; - case XENVER_capabilities: - argsize = sizeof(xen_capabilities_info_t); - break; - case XENVER_changeset: - argsize = sizeof(xen_changeset_info_t); - break; - case XENVER_platform_parameters: - argsize = sizeof(xen_platform_parameters_t); - break; - case XENVER_pagesize: - argsize = (arg == NULL) ? 0 : sizeof(void *); - break; - case XENVER_get_features: - argsize = (arg == NULL) ? 0 : sizeof(xen_feature_info_t); - break; - - default: - printk("%s: unknown version op %d\n", __func__, cmd); - return -ENOSYS; - } - - rc = xencomm_create_mini(xc_area, &nbr_area, arg, argsize, &desc); - if (rc) - return rc; - - return xencomm_arch_hypercall_xen_version(cmd, desc); -} -EXPORT_SYMBOL(xencomm_mini_hypercall_xen_version); - -int -xencomm_mini_hypercall_xenoprof_op(int op, void *arg) -{ - unsigned int argsize; - struct xencomm_mini xc_area[2]; - int nbr_area = 2; - struct xencomm_handle *desc; - int rc; - - switch (op) { - case XENOPROF_init: - argsize = sizeof(xenoprof_init_t); - break; - case XENOPROF_set_active: - argsize = sizeof(domid_t); - break; - case XENOPROF_set_passive: - argsize = sizeof(xenoprof_passive_t); - break; - case XENOPROF_counter: - argsize = sizeof(xenoprof_counter_t); - break; - case XENOPROF_get_buffer: - argsize = sizeof(xenoprof_get_buffer_t); - break; - - case XENOPROF_reset_active_list: - case XENOPROF_reset_passive_list: - case XENOPROF_reserve_counters: - case XENOPROF_setup_events: - case XENOPROF_enable_virq: - case XENOPROF_start: - case XENOPROF_stop: - case XENOPROF_disable_virq: - case XENOPROF_release_counters: - case XENOPROF_shutdown: - return xencomm_arch_hypercall_xenoprof_op(op, arg); - - default: - printk("%s: op %d isn't supported\n", __func__, op); - return -ENOSYS; - } - rc = xencomm_create_mini(xc_area, &nbr_area, arg, argsize, &desc); - if (rc) - return rc; - return xencomm_arch_hypercall_xenoprof_op(op, desc); -} -EXPORT_SYMBOL_GPL(xencomm_mini_hypercall_xenoprof_op); - -int -xencomm_mini_hypercall_perfmon_op(unsigned long cmd, void* arg, - unsigned long count) -{ - unsigned int argsize; - struct xencomm_mini xc_area[2]; - int nbr_area = 2; - struct xencomm_handle *desc; - int rc; - - switch (cmd) { - case PFM_GET_FEATURES: - argsize = sizeof(pfarg_features_t); - break; - case PFM_CREATE_CONTEXT: - argsize = sizeof(pfarg_context_t); - break; - case PFM_LOAD_CONTEXT: - argsize = sizeof(pfarg_load_t); - break; - case PFM_WRITE_PMCS: - case PFM_WRITE_PMDS: - argsize = sizeof(pfarg_reg_t) * count; - break; - - case PFM_DESTROY_CONTEXT: - case PFM_UNLOAD_CONTEXT: - case PFM_START: - case PFM_STOP: - return xencomm_arch_hypercall_perfmon_op(cmd, arg, count); - - default: - printk("%s:%d cmd %ld isn't supported\n", - __func__, __LINE__, cmd); - BUG(); - } - - rc = xencomm_create_mini(xc_area, &nbr_area, arg, argsize, &desc); - if (rc) - return rc; - return xencomm_arch_hypercall_perfmon_op(cmd, desc, count); -} -EXPORT_SYMBOL_GPL(xencomm_mini_hypercall_perfmon_op); - -int -xencomm_mini_hypercall_sched_op(int cmd, void *arg) -{ - int rc, nbr_area = 2; - struct xencomm_mini xc_area[2]; - struct xencomm_handle *desc; - unsigned int argsize; - - switch (cmd) { - case SCHEDOP_yield: - case SCHEDOP_block: - argsize = 0; - break; - case SCHEDOP_shutdown: - argsize = sizeof(sched_shutdown_t); - break; - case SCHEDOP_poll: - argsize = sizeof(sched_poll_t); - break; - case SCHEDOP_remote_shutdown: - argsize = sizeof(sched_remote_shutdown_t); - break; - - default: - printk("%s: unknown sched op %d\n", __func__, cmd); - return -ENOSYS; - } - - rc = xencomm_create_mini(xc_area, &nbr_area, arg, argsize, &desc); - if (rc) - return rc; - - return xencomm_arch_hypercall_sched_op(cmd, desc); -} -EXPORT_SYMBOL_GPL(xencomm_mini_hypercall_sched_op); - -int -xencomm_mini_hypercall_fpswa_revision(unsigned int *revision) -{ - int nbr_area = 2; - struct xencomm_mini xc_area[2]; - struct xencomm_handle *desc; - int rc; - - rc = xencomm_create_mini(xc_area, &nbr_area, - revision, sizeof(*revision), &desc); - if (rc) - return rc; - return xencomm_arch_hypercall_fpswa_revision(desc); -} -EXPORT_SYMBOL_GPL(xencomm_mini_hypercall_fpswa_revision); diff -r 60d8f0befd18 -r b5fdf02c38f4 arch/ia64/xen/xcom_privcmd.c --- a/arch/ia64/xen/xcom_privcmd.c Thu Aug 16 10:58:46 2007 -0600 +++ b/arch/ia64/xen/xcom_privcmd.c Thu Aug 16 13:44:51 2007 -0600 @@ -54,7 +54,7 @@ xencomm_privcmd_platform_op(privcmd_hype if (kern_op.interface_version != XENPF_INTERFACE_VERSION) return -EACCES; - op_desc = xencomm_create_inline(&kern_op); + op_desc = xencomm_map_no_alloc(&kern_op, sizeof(kern_op)); switch (kern_op.cmd) { default: @@ -73,8 +73,7 @@ xencomm_privcmd_platform_op(privcmd_hype if (copy_to_user(user_op, &kern_op, sizeof(struct xen_platform_op))) ret = -EFAULT; - if (desc) - xencomm_free(desc); + xencomm_free(desc); return ret; } @@ -96,14 +95,16 @@ xencomm_privcmd_sysctl(privcmd_hypercall if (kern_op.interface_version != XEN_SYSCTL_INTERFACE_VERSION) return -EACCES; - op_desc = xencomm_create_inline(&kern_op); + op_desc = xencomm_map_no_alloc(&kern_op, sizeof(kern_op)); switch (kern_op.cmd) { case XEN_SYSCTL_readconsole: - ret = xencomm_create( + desc = xencomm_map( xen_guest_handle(kern_op.u.readconsole.buffer), - kern_op.u.readconsole.count, - &desc, GFP_KERNEL); + kern_op.u.readconsole.count); + if (xen_guest_handle(kern_op.u.readconsole.buffer) != NULL && + kern_op.u.readconsole.count > 0 && desc == NULL) + return -ENOMEM; set_xen_guest_handle(kern_op.u.readconsole.buffer, (void *)desc); break; @@ -130,55 +131,62 @@ xencomm_privcmd_sysctl(privcmd_hypercall } /* query the buffer size for xencomm */ - tmp_desc = xencomm_create_inline(&tmp_op); + tmp_desc = xencomm_map_no_alloc(&tmp_op, sizeof(tmp_op)); ret = xencomm_arch_hypercall_sysctl(tmp_desc); if (ret) return ret; - ret = xencomm_create(xen_guest_handle(kern_op.u.perfc_op.desc), - tmp_op.u.perfc_op.nr_counters * - sizeof(xen_sysctl_perfc_desc_t), - &desc, GFP_KERNEL); - if (ret) - return ret; + desc = xencomm_map(xen_guest_handle(kern_op.u.perfc_op.desc), + tmp_op.u.perfc_op.nr_counters * + sizeof(xen_sysctl_perfc_desc_t)); + if (xen_guest_handle(kern_op.u.perfc_op.desc) != NULL && + tmp_op.u.perfc_op.nr_counters > 0 && desc == NULL) + return -ENOMEM; set_xen_guest_handle(kern_op.u.perfc_op.desc, (void *)desc); - ret = xencomm_create(xen_guest_handle(kern_op.u.perfc_op.val), - tmp_op.u.perfc_op.nr_vals * - sizeof(xen_sysctl_perfc_val_t), - &desc1, GFP_KERNEL); - if (ret) + desc1 = xencomm_map(xen_guest_handle(kern_op.u.perfc_op.val), + tmp_op.u.perfc_op.nr_vals * + sizeof(xen_sysctl_perfc_val_t)); + if (xen_guest_handle(kern_op.u.perfc_op.val) != NULL && + tmp_op.u.perfc_op.nr_vals > 0 && desc1 == NULL) { xencomm_free(desc); + return -ENOMEM; + } set_xen_guest_handle(kern_op.u.perfc_op.val, (void *)desc1); break; } case XEN_SYSCTL_getdomaininfolist: - ret = xencomm_create( + desc = xencomm_map( xen_guest_handle(kern_op.u.getdomaininfolist.buffer), kern_op.u.getdomaininfolist.max_domains * - sizeof(xen_domctl_getdomaininfo_t), - &desc, GFP_KERNEL); + sizeof(xen_domctl_getdomaininfo_t)); + if (xen_guest_handle(kern_op.u.getdomaininfolist.buffer) != + NULL && kern_op.u.getdomaininfolist.max_domains > 0 && + desc == NULL) + return -ENOMEM; set_xen_guest_handle(kern_op.u.getdomaininfolist.buffer, (void *)desc); break; case XEN_SYSCTL_debug_keys: - ret = xencomm_create( + desc = xencomm_map( xen_guest_handle(kern_op.u.debug_keys.keys), - kern_op.u.debug_keys.nr_keys, - &desc, GFP_KERNEL); + kern_op.u.debug_keys.nr_keys); + if (xen_guest_handle(kern_op.u.debug_keys.keys) != NULL && + kern_op.u.debug_keys.nr_keys > 0 && desc == NULL) + return -ENOMEM; set_xen_guest_handle(kern_op.u.debug_keys.keys, (void *)desc); break; case XEN_SYSCTL_physinfo: - ret = xencomm_create( + desc = xencomm_map( xen_guest_handle(kern_op.u.physinfo.cpu_to_node), - kern_op.u.physinfo.max_cpu_id * sizeof(uint32_t), - &desc, GFP_KERNEL); - if (ret) - return ret; + kern_op.u.physinfo.max_cpu_id * sizeof(uint32_t)); + if (xen_guest_handle(kern_op.u.physinfo.cpu_to_node) != NULL && + kern_op.u.physinfo.max_cpu_id > 0 && desc == NULL) + return -ENOMEM; set_xen_guest_handle(kern_op.u.physinfo.cpu_to_node, (void *)desc); @@ -199,10 +207,8 @@ xencomm_privcmd_sysctl(privcmd_hypercall if (copy_to_user(user_op, &kern_op, sizeof(xen_sysctl_t))) ret = -EFAULT; - if (desc) - xencomm_free(desc); - if (desc1) - xencomm_free(desc1); + xencomm_free(desc); + xencomm_free(desc1); return ret; } @@ -223,7 +229,7 @@ xencomm_privcmd_domctl(privcmd_hypercall if (kern_op.interface_version != XEN_DOMCTL_INTERFACE_VERSION) return -EACCES; - op_desc = xencomm_create_inline(&kern_op); + op_desc = xencomm_map_no_alloc(&kern_op, sizeof(kern_op)); switch (kern_op.cmd) { case XEN_DOMCTL_createdomain: @@ -236,10 +242,12 @@ xencomm_privcmd_domctl(privcmd_hypercall { unsigned long nr_pages = kern_op.u.getmemlist.max_pfns; - ret = xencomm_create( + desc = xencomm_map( xen_guest_handle(kern_op.u.getmemlist.buffer), - nr_pages * sizeof(unsigned long), - &desc, GFP_KERNEL); + nr_pages * sizeof(unsigned long)); + if (xen_guest_handle(kern_op.u.getmemlist.buffer) != NULL && + nr_pages > 0 && desc == NULL) + return -ENOMEM; set_xen_guest_handle(kern_op.u.getmemlist.buffer, (void *)desc); break; @@ -247,18 +255,23 @@ xencomm_privcmd_domctl(privcmd_hypercall case XEN_DOMCTL_getpageframeinfo: break; case XEN_DOMCTL_getpageframeinfo2: - ret = xencomm_create( + desc = xencomm_map( xen_guest_handle(kern_op.u.getpageframeinfo2.array), - kern_op.u.getpageframeinfo2.num, - &desc, GFP_KERNEL); + kern_op.u.getpageframeinfo2.num); + if (xen_guest_handle(kern_op.u.getpageframeinfo2.array) != + NULL && kern_op.u.getpageframeinfo2.num > 0 && + desc == NULL) + return -ENOMEM; set_xen_guest_handle(kern_op.u.getpageframeinfo2.array, (void *)desc); break; case XEN_DOMCTL_shadow_op: - ret = xencomm_create( + desc = xencomm_map( xen_guest_handle(kern_op.u.shadow_op.dirty_bitmap), - ROUND_DIV(kern_op.u.shadow_op.pages, 8), - &desc, GFP_KERNEL); + ROUND_DIV(kern_op.u.shadow_op.pages, 8)); + if (xen_guest_handle(kern_op.u.shadow_op.dirty_bitmap) != NULL + && kern_op.u.shadow_op.pages > 0 && desc == NULL) + return -ENOMEM; set_xen_guest_handle(kern_op.u.shadow_op.dirty_bitmap, (void *)desc); break; @@ -266,20 +279,25 @@ xencomm_privcmd_domctl(privcmd_hypercall break; case XEN_DOMCTL_setvcpucontext: case XEN_DOMCTL_getvcpucontext: - ret = xencomm_create( + desc = xencomm_map( xen_guest_handle(kern_op.u.vcpucontext.ctxt), - sizeof(vcpu_guest_context_t), - &desc, GFP_KERNEL); + sizeof(vcpu_guest_context_t)); + if (xen_guest_handle(kern_op.u.vcpucontext.ctxt) != NULL && + desc == NULL) + return -ENOMEM; set_xen_guest_handle(kern_op.u.vcpucontext.ctxt, (void *)desc); break; case XEN_DOMCTL_getvcpuinfo: break; case XEN_DOMCTL_setvcpuaffinity: case XEN_DOMCTL_getvcpuaffinity: - ret = xencomm_create( + desc = xencomm_map( xen_guest_handle(kern_op.u.vcpuaffinity.cpumap.bitmap), - ROUND_DIV(kern_op.u.vcpuaffinity.cpumap.nr_cpus, 8), - &desc, GFP_KERNEL); + ROUND_DIV(kern_op.u.vcpuaffinity.cpumap.nr_cpus, 8)); + if (xen_guest_handle(kern_op.u.vcpuaffinity.cpumap.bitmap) != + NULL && kern_op.u.vcpuaffinity.cpumap.nr_cpus > 0 && + desc == NULL) + return -ENOMEM; set_xen_guest_handle(kern_op.u.vcpuaffinity.cpumap.bitmap, (void *)desc); break; @@ -311,8 +329,7 @@ xencomm_privcmd_domctl(privcmd_hypercall if (copy_to_user(user_op, &kern_op, sizeof(xen_domctl_t))) ret = -EFAULT; - if (desc) - xencomm_free(desc); + xencomm_free(desc); return ret; } @@ -332,13 +349,14 @@ xencomm_privcmd_acm_op(privcmd_hypercall switch (kern_arg.cmd) { case ACMOP_getssid: { - op_desc = xencomm_create_inline(&kern_arg); - - ret = xencomm_create( + op_desc = xencomm_map_no_alloc(&kern_arg, sizeof(kern_arg)); + + desc = xencomm_map( xen_guest_handle(kern_arg.u.getssid.ssidbuf), - kern_arg.u.getssid.ssidbuf_size, &desc, GFP_KERNEL); - if (ret) - return ret; + kern_arg.u.getssid.ssidbuf_size); + if (xen_guest_handle(kern_arg.u.getssid.ssidbuf) != NULL && + kern_arg.u.getssid.ssidbuf_size > 0 && desc == NULL) + return -ENOMEM; set_xen_guest_handle(kern_arg.u.getssid.ssidbuf, (void *)desc); @@ -378,28 +396,28 @@ xencomm_privcmd_memory_op(privcmd_hyperc if (copy_from_user(&kern_op, user_op, sizeof(xen_memory_reservation_t))) return -EFAULT; - desc_op = xencomm_create_inline(&kern_op); + desc_op = xencomm_map_no_alloc(&kern_op, sizeof(kern_op)); if (xen_guest_handle(kern_op.extent_start)) { void * addr; addr = xen_guest_handle(kern_op.extent_start); - ret = xencomm_create + desc = xencomm_map (addr, kern_op.nr_extents * sizeof(*xen_guest_handle - (kern_op.extent_start)), - &desc, GFP_KERNEL); - if (ret) - return ret; + (kern_op.extent_start))); + if (addr != NULL && kern_op.nr_extents > 0 && + desc == NULL) + return -ENOMEM; + set_xen_guest_handle(kern_op.extent_start, (void *)desc); } ret = xencomm_arch_hypercall_memory_op(cmd, desc_op); - if (desc) - xencomm_free(desc); + xencomm_free(desc); if (ret != 0) return ret; @@ -419,7 +437,7 @@ xencomm_privcmd_memory_op(privcmd_hyperc user_domid = (domid_t __user *)hypercall->arg[1]; if (copy_from_user(&kern_domid, user_domid, sizeof(domid_t))) return -EFAULT; - desc = xencomm_create_inline(&kern_domid); + desc = xencomm_map_no_alloc(&kern_domid, sizeof(kern_domid)); ret = xencomm_arch_hypercall_memory_op(cmd, desc); @@ -439,41 +457,41 @@ xencomm_privcmd_memory_op(privcmd_hyperc if (copy_from_user(&kern_op, user_op, sizeof(xen_translate_gpfn_list_t))) return -EFAULT; - desc_op = xencomm_create_inline(&kern_op); + desc_op = xencomm_map_no_alloc(&kern_op, sizeof(kern_op)); if (kern_op.nr_gpfns) { /* gpfn_list. */ addr = xen_guest_handle(kern_op.gpfn_list); - ret = xencomm_create(addr, kern_op.nr_gpfns * + desc_gpfn = xencomm_map(addr, kern_op.nr_gpfns * sizeof(*xen_guest_handle - (kern_op.gpfn_list)), - &desc_gpfn, GFP_KERNEL); - if (ret) - return ret; + (kern_op.gpfn_list))); + if (addr != NULL && kern_op.nr_gpfns > 0 && + desc_gpfn == NULL) + return -ENOMEM; set_xen_guest_handle(kern_op.gpfn_list, (void *)desc_gpfn); /* mfn_list. */ addr = xen_guest_handle(kern_op.mfn_list); - ret = xencomm_create(addr, kern_op.nr_gpfns * + desc_mfn = xencomm_map(addr, kern_op.nr_gpfns * sizeof(*xen_guest_handle - (kern_op.mfn_list)), - &desc_mfn, GFP_KERNEL); - if (ret) - return ret; + (kern_op.mfn_list))); + if (addr != NULL && kern_op.nr_gpfns > 0 && + desc_mfn == NULL) { + xencomm_free(desc_gpfn); + return -ENOMEM; + } + set_xen_guest_handle(kern_op.mfn_list, (void *)desc_mfn); } ret = xencomm_arch_hypercall_memory_op(cmd, desc_op); - if (desc_gpfn) - xencomm_free(desc_gpfn); - - if (desc_mfn) - xencomm_free(desc_mfn); + xencomm_free(desc_gpfn); + xencomm_free(desc_mfn); if (ret != 0) return ret; @@ -527,9 +545,9 @@ xencomm_privcmd_xen_version(privcmd_hype return -ENOSYS; } - rc = xencomm_create(arg, argsize, &desc, GFP_KERNEL); - if (rc) - return rc; + desc = xencomm_map(arg, argsize); + if (arg != NULL && argsize > 0 && desc == NULL) + return -ENOMEM; rc = xencomm_arch_hypercall_xen_version(cmd, desc); @@ -560,10 +578,9 @@ xencomm_privcmd_event_channel_op(privcmd return -EINVAL; } - ret = xencomm_create((void *)hypercall->arg[1], argsize, - &desc, GFP_KERNEL); - if (ret) - return ret; + desc = xencomm_map((void *)hypercall->arg[1], argsize); + if ((void *)hypercall->arg[1] != NULL && argsize > 0 && desc == NULL) + return -ENOMEM; ret = xencomm_arch_hypercall_event_channel_op(cmd, desc); @@ -599,10 +616,9 @@ xencomm_privcmd_hvm_op(privcmd_hypercall return -EINVAL; } - ret = xencomm_create((void *)hypercall->arg[1], argsize, - &desc, GFP_KERNEL); - if (ret) - return ret; + desc = xencomm_map((void *)hypercall->arg[1], argsize); + if ((void *)hypercall->arg[1] != NULL && argsize > 0 && desc == NULL) + return -ENOMEM; ret = xencomm_arch_hypercall_hvm_op(cmd, desc); @@ -627,10 +643,9 @@ xencomm_privcmd_sched_op(privcmd_hyperca return -EINVAL; } - ret = xencomm_create((void *)hypercall->arg[1], argsize, - &desc, GFP_KERNEL); - if (ret) - return ret; + desc = xencomm_map((void *)hypercall->arg[1], argsize); + if ((void *)hypercall->arg[1] != NULL && argsize > 0 && desc == NULL) + return -ENOMEM; ret = xencomm_arch_hypercall_sched_op(cmd, desc); @@ -650,10 +665,10 @@ xencomm_privcmd_ia64_dom0vp_op(privcmd_h unsigned int __user *revision_user = (unsigned int* __user)hypercall->arg[1]; struct xencomm_handle *desc; - ret = xencomm_create(&revision, sizeof(revision), - &desc, GFP_KERNEL); - if (ret) - break; + desc = xencomm_map(&revision, sizeof(revision)); + if (desc == NULL) + return -ENOMEM; + ret = xencomm_arch_hypercall_fpswa_revision(desc); xencomm_free(desc); if (ret) diff -r 60d8f0befd18 -r b5fdf02c38f4 arch/ia64/xen/xencomm.c --- a/arch/ia64/xen/xencomm.c Thu Aug 16 10:58:46 2007 -0600 +++ b/arch/ia64/xen/xencomm.c Thu Aug 16 13:44:51 2007 -0600 @@ -27,19 +27,17 @@ #include -static int xencomm_debug = 0; - static unsigned long kernel_start_pa; void -xencomm_init (void) +xencomm_initialize (void) { kernel_start_pa = KERNEL_START - ia64_tpa(KERNEL_START); } /* Translate virtual address to physical address. */ unsigned long -xencomm_vaddr_to_paddr(unsigned long vaddr) +xencomm_vtop(unsigned long vaddr) { #ifndef CONFIG_VMX_GUEST struct page *page; @@ -109,155 +107,3 @@ xencomm_vaddr_to_paddr(unsigned long vad return (page_to_pfn(page) << PAGE_SHIFT) | (vaddr & ~PAGE_MASK); #endif } - -static int -xencomm_init_desc(struct xencomm_desc *desc, void *buffer, unsigned long bytes) -{ - unsigned long recorded = 0; - int i = 0; - - BUG_ON((buffer == NULL) && (bytes > 0)); - - /* record the physical pages used */ - if (buffer == NULL) - desc->nr_addrs = 0; - - while ((recorded < bytes) && (i < desc->nr_addrs)) { - unsigned long vaddr = (unsigned long)buffer + recorded; - unsigned long paddr; - int offset; - int chunksz; - - offset = vaddr % PAGE_SIZE; /* handle partial pages */ - chunksz = min(PAGE_SIZE - offset, bytes - recorded); - - paddr = xencomm_vaddr_to_paddr(vaddr); - if (paddr == ~0UL) { - printk("%s: couldn't translate vaddr %lx\n", - __func__, vaddr); - return -EINVAL; - } - - desc->address[i++] = paddr; - recorded += chunksz; - } - - if (recorded < bytes) { - printk("%s: could only translate %ld of %ld bytes\n", - __func__, recorded, bytes); - return -ENOSPC; - } - - /* mark remaining addresses invalid (just for safety) */ - while (i < desc->nr_addrs) - desc->address[i++] = XENCOMM_INVALID; - - desc->magic = XENCOMM_MAGIC; - - return 0; -} - -static struct xencomm_desc * -xencomm_alloc(gfp_t gfp_mask) -{ - struct xencomm_desc *desc; - - desc = (struct xencomm_desc *)__get_free_page(gfp_mask); - if (desc == NULL) - panic("%s: page allocation failed\n", __func__); - - desc->nr_addrs = (PAGE_SIZE - sizeof(struct xencomm_desc)) / - sizeof(*desc->address); - - return desc; -} - -void -xencomm_free(struct xencomm_handle *desc) -{ - if (desc) - free_page((unsigned long)__va(desc)); -} - -int -xencomm_create(void *buffer, unsigned long bytes, - struct xencomm_handle **ret, gfp_t gfp_mask) -{ - struct xencomm_desc *desc; - struct xencomm_handle *handle; - int rc; - - if (xencomm_debug) - printk("%s: %p[%ld]\n", __func__, buffer, bytes); - - if (buffer == NULL || bytes == 0) { - *ret = (struct xencomm_handle *)NULL; - return 0; - } - - desc = xencomm_alloc(gfp_mask); - if (!desc) { - printk("%s failure\n", "xencomm_alloc"); - return -ENOMEM; - } - handle = (struct xencomm_handle *)__pa(desc); - - rc = xencomm_init_desc(desc, buffer, bytes); - if (rc) { - printk("%s failure: %d\n", "xencomm_init_desc", rc); - xencomm_free(handle); - return rc; - } - - *ret = handle; - return 0; -} - -/* "mini" routines, for stack-based communications: */ - -static void * -xencomm_alloc_mini(struct xencomm_mini *area, int *nbr_area) -{ - unsigned long base; - unsigned int pageoffset; - - while (*nbr_area >= 0) { - /* Allocate an area. */ - (*nbr_area)--; - - base = (unsigned long)(area + *nbr_area); - pageoffset = base % PAGE_SIZE; - - /* If the area does not cross a page, use it. */ - if ((PAGE_SIZE - pageoffset) >= sizeof(struct xencomm_mini)) - return &area[*nbr_area]; - } - /* No more area. */ - return NULL; -} - -int -xencomm_create_mini(struct xencomm_mini *area, int *nbr_area, - void *buffer, unsigned long bytes, - struct xencomm_handle **ret) -{ - struct xencomm_desc *desc; - int rc; - unsigned long res; - - desc = xencomm_alloc_mini(area, nbr_area); - if (!desc) - return -ENOMEM; - desc->nr_addrs = XENCOMM_MINI_ADDRS; - - rc = xencomm_init_desc(desc, buffer, bytes); - if (rc) - return rc; - - res = xencomm_vaddr_to_paddr((unsigned long)desc); - if (res == ~0UL) - return -EINVAL; - - *ret = (struct xencomm_handle*)res; - return 0; -} diff -r 60d8f0befd18 -r b5fdf02c38f4 include/asm-ia64/hypercall.h --- a/include/asm-ia64/hypercall.h Thu Aug 16 10:58:46 2007 -0600 +++ b/include/asm-ia64/hypercall.h Thu Aug 16 13:44:51 2007 -0600 @@ -405,19 +405,6 @@ HYPERVISOR_add_io_space(unsigned long ph #define HYPERVISOR_update_va_mapping(va, new_val, flags) (0) /* Use xencomm to do hypercalls. */ -#ifdef MODULE -#define HYPERVISOR_sched_op xencomm_mini_hypercall_sched_op -#define HYPERVISOR_event_channel_op xencomm_mini_hypercall_event_channel_op -#define HYPERVISOR_callback_op xencomm_mini_hypercall_callback_op -#define HYPERVISOR_multicall xencomm_mini_hypercall_multicall -#define HYPERVISOR_xen_version xencomm_mini_hypercall_xen_version -#define HYPERVISOR_console_io xencomm_mini_hypercall_console_io -#define HYPERVISOR_hvm_op xencomm_mini_hypercall_hvm_op -#define HYPERVISOR_memory_op xencomm_mini_hypercall_memory_op -#define HYPERVISOR_xenoprof_op xencomm_mini_hypercall_xenoprof_op -#define HYPERVISOR_perfmon_op xencomm_mini_hypercall_perfmon_op -#define HYPERVISOR_fpswa_revision xencomm_mini_hypercall_fpswa_revision -#else #define HYPERVISOR_sched_op xencomm_hypercall_sched_op #define HYPERVISOR_event_channel_op xencomm_hypercall_event_channel_op #define HYPERVISOR_callback_op xencomm_hypercall_callback_op @@ -429,8 +416,6 @@ HYPERVISOR_add_io_space(unsigned long ph #define HYPERVISOR_xenoprof_op xencomm_hypercall_xenoprof_op #define HYPERVISOR_perfmon_op xencomm_hypercall_perfmon_op #define HYPERVISOR_fpswa_revision xencomm_hypercall_fpswa_revision -#endif - #define HYPERVISOR_suspend xencomm_hypercall_suspend #define HYPERVISOR_vcpu_op xencomm_hypercall_vcpu_op #define HYPERVISOR_opt_feature xencomm_hypercall_opt_feature diff -r 60d8f0befd18 -r b5fdf02c38f4 include/asm-ia64/sal.h --- a/include/asm-ia64/sal.h Thu Aug 16 10:58:46 2007 -0600 +++ b/include/asm-ia64/sal.h Thu Aug 16 13:44:51 2007 -0600 @@ -701,9 +701,9 @@ ia64_sal_get_state_info (u64 sal_info_ty if (is_running_on_xen()) { struct xencomm_handle *desc; - if (xencomm_create(sal_info, - ia64_sal_get_state_info_size(sal_info_type), - &desc, GFP_KERNEL)) + desc = xencomm_map(sal_info, + ia64_sal_get_state_info_size(sal_info_type)); + if (desc == NULL) return 0; SAL_CALL_REENTRANT(isrv, SAL_GET_STATE_INFO, sal_info_type, 0, diff -r 60d8f0befd18 -r b5fdf02c38f4 include/asm-ia64/xen/xcom_hcall.h --- a/include/asm-ia64/xen/xcom_hcall.h Thu Aug 16 10:58:46 2007 -0600 +++ b/include/asm-ia64/xen/xcom_hcall.h Thu Aug 16 13:44:51 2007 -0600 @@ -19,7 +19,7 @@ #ifndef _LINUX_XENCOMM_HCALL_H_ #define _LINUX_XENCOMM_HCALL_H_ -/* These function creates inline descriptor for the parameters and +/* These function creates inline or mini descriptor for the parameters and calls the corresponding xencomm_arch_hypercall_X. Architectures should defines HYPERVISOR_xxx as xencomm_hypercall_xxx unless they want to use their own wrapper. */ @@ -55,33 +55,6 @@ extern long xencomm_hypercall_vcpu_op(in extern long xencomm_hypercall_opt_feature(void *arg); -/* Using mini xencomm. */ -extern int xencomm_mini_hypercall_console_io(int cmd, int count, char *str); - -extern int xencomm_mini_hypercall_event_channel_op(int cmd, void *op); - -extern int xencomm_mini_hypercall_xen_version(int cmd, void *arg); - -extern int xencomm_mini_hypercall_physdev_op(int cmd, void *op); - -extern int xencomm_mini_hypercall_grant_table_op(unsigned int cmd, void *op, - unsigned int count); - -extern int xencomm_mini_hypercall_sched_op(int cmd, void *arg); - -extern int xencomm_mini_hypercall_multicall(void *call_list, int nr_calls); - -extern int xencomm_mini_hypercall_callback_op(int cmd, void *arg); - -extern int xencomm_mini_hypercall_memory_op(unsigned int cmd, void *arg); - -extern unsigned long xencomm_mini_hypercall_hvm_op(int cmd, void *arg); - -extern int xencomm_mini_hypercall_xenoprof_op(int op, void *arg); - -extern int xencomm_mini_hypercall_perfmon_op(unsigned long cmd, void* arg, - unsigned long count); - /* For privcmd. Locally declare argument type to avoid include storm. Type coherency will be checked within privcmd.c */ struct privcmd_hypercall; diff -r 60d8f0befd18 -r b5fdf02c38f4 include/asm-ia64/xen/xencomm.h --- a/include/asm-ia64/xen/xencomm.h Thu Aug 16 10:58:46 2007 -0600 +++ b/include/asm-ia64/xen/xencomm.h Thu Aug 16 13:44:51 2007 -0600 @@ -16,45 +16,18 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _LINUX_XENCOMM_H_ -#define _LINUX_XENCOMM_H_ +#ifndef _ASM_IA64_XENCOMM_H_ +#define _ASM_IA64_XENCOMM_H_ -#include - -#define XENCOMM_MINI_ADDRS 3 -struct xencomm_mini { - struct xencomm_desc _desc; - uint64_t address[XENCOMM_MINI_ADDRS]; -}; +#define is_kernel_addr(x) \ + ((PAGE_OFFSET <= (x) && \ + (x) < (PAGE_OFFSET + (1UL << IA64_MAX_PHYS_BITS))) || \ + (KERNEL_START <= (x) && \ + (x) < KERNEL_START + KERNEL_TR_PAGE_SIZE)) /* Must be called before any hypercall. */ -extern void xencomm_init (void); +extern void xencomm_initialize (void); -/* To avoid additionnal virt to phys conversion, an opaque structure is - presented. */ -struct xencomm_handle; +#include -extern int xencomm_create(void *buffer, unsigned long bytes, - struct xencomm_handle **desc, gfp_t type); -extern void xencomm_free(struct xencomm_handle *desc); - -extern int xencomm_create_mini(struct xencomm_mini *area, int *nbr_area, - void *buffer, unsigned long bytes, - struct xencomm_handle **ret); - -/* Translate virtual address to physical address. */ -extern unsigned long xencomm_vaddr_to_paddr(unsigned long vaddr); - -/* Inline version. To be used only on linear space (kernel space). */ -static inline struct xencomm_handle * -xencomm_create_inline(void *buffer) -{ - unsigned long paddr; - - paddr = xencomm_vaddr_to_paddr((unsigned long)buffer); - return (struct xencomm_handle *)(paddr | XENCOMM_INLINE_FLAG); -} - -#define xen_guest_handle(hnd) ((hnd).p) - -#endif /* _LINUX_XENCOMM_H_ */ +#endif /* _ASM_IA64_XENCOMM_H_ */ _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:12:53 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:12:53 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgRx-0008KL-Cm for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:12:53 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgSF-0005um-U5; Fri, 07 Sep 2007 16:13:11 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgQC-0004W4-0C for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:11:04 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgPz-0007Fy-3Q for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:11:01 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GASsS011674 for ; Fri, 7 Sep 2007 09:10:28 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAalk022162 for ; Fri, 7 Sep 2007 09:10:36 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GAaW3022161 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:10:36 -0700 Message-Id: <200709071610.l87GAaW3022161@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:10:35 -0700 From: "Xen patchbot-linux-2.6.18-xen" To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [linux-2.6.18-xen] xen: Use unlocked_ioctl in evtchn, gntdev and privcmd drivers to avoid X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User kfraser@localhost.localdomain # Date 1188553538 -3600 # Node ID f30b59f550c2ac03734c7a8cb63f658f16ca087a # Parent 720571c2139e66aecb2552a59be897fda40238fa xen: Use unlocked_ioctl in evtchn, gntdev and privcmd drivers to avoid acquiring the BKL sempahore. Performance improvement is particularly significant for heavy users of evtchn-notify ioctl. Suggested by Dexuan Cui Signed-off-by: Keir Fraser --- drivers/xen/evtchn/evtchn.c | 6 +++--- drivers/xen/gntdev/gntdev.c | 8 ++++---- drivers/xen/privcmd/privcmd.c | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff -r 720571c2139e -r f30b59f550c2 drivers/xen/evtchn/evtchn.c --- a/drivers/xen/evtchn/evtchn.c Thu Aug 30 16:23:39 2007 +0100 +++ b/drivers/xen/evtchn/evtchn.c Fri Aug 31 10:45:38 2007 +0100 @@ -208,8 +208,8 @@ static void evtchn_bind_to_user(struct p spin_unlock_irq(&port_user_lock); } -static int evtchn_ioctl(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg) +static long evtchn_ioctl(struct file *file, + unsigned int cmd, unsigned long arg) { int rc; struct per_user_data *u = file->private_data; @@ -423,7 +423,7 @@ static const struct file_operations evtc .owner = THIS_MODULE, .read = evtchn_read, .write = evtchn_write, - .ioctl = evtchn_ioctl, + .unlocked_ioctl = evtchn_ioctl, .poll = evtchn_poll, .fasync = evtchn_fasync, .open = evtchn_open, diff -r 720571c2139e -r f30b59f550c2 drivers/xen/gntdev/gntdev.c --- a/drivers/xen/gntdev/gntdev.c Thu Aug 30 16:23:39 2007 +0100 +++ b/drivers/xen/gntdev/gntdev.c Fri Aug 31 10:45:38 2007 +0100 @@ -133,7 +133,7 @@ static int gntdev_open(struct inode *ino static int gntdev_open(struct inode *inode, struct file *flip); static int gntdev_release(struct inode *inode, struct file *flip); static int gntdev_mmap(struct file *flip, struct vm_area_struct *vma); -static int gntdev_ioctl (struct inode *inode, struct file *flip, +static long gntdev_ioctl(struct file *flip, unsigned int cmd, unsigned long arg); static struct file_operations gntdev_fops = { @@ -141,7 +141,7 @@ static struct file_operations gntdev_fop .open = gntdev_open, .release = gntdev_release, .mmap = gntdev_mmap, - .ioctl = gntdev_ioctl + .unlocked_ioctl = gntdev_ioctl }; /* VM operations. */ @@ -774,8 +774,8 @@ static void gntdev_vma_close(struct vm_a /* Called when an ioctl is made on the device. */ -static int gntdev_ioctl(struct inode *inode, struct file *flip, - unsigned int cmd, unsigned long arg) +static long gntdev_ioctl(struct file *flip, + unsigned int cmd, unsigned long arg) { int rc = 0; gntdev_file_private_data_t *private_data = diff -r 720571c2139e -r f30b59f550c2 drivers/xen/privcmd/privcmd.c --- a/drivers/xen/privcmd/privcmd.c Thu Aug 30 16:23:39 2007 +0100 +++ b/drivers/xen/privcmd/privcmd.c Fri Aug 31 10:45:38 2007 +0100 @@ -37,8 +37,8 @@ static int privcmd_enforce_singleshot_ma static int privcmd_enforce_singleshot_mapping(struct vm_area_struct *vma); #endif -static int privcmd_ioctl(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long data) +static long privcmd_ioctl(struct file *file, + unsigned int cmd, unsigned long data) { int ret = -ENOSYS; void __user *udata = (void __user *) data; @@ -250,8 +250,8 @@ static int privcmd_enforce_singleshot_ma #endif static const struct file_operations privcmd_file_ops = { - .ioctl = privcmd_ioctl, - .mmap = privcmd_mmap, + .unlocked_ioctl = privcmd_ioctl, + .mmap = privcmd_mmap, }; static int capabilities_read(char *page, char **start, off_t off, _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:13:09 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:13:09 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgSC-0008Ku-MU for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:13:09 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgSV-00060V-7K; Fri, 07 Sep 2007 16:13:27 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgQC-0004W6-0Z for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:11:04 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgPq-0007Fe-Ma for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:11:01 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAKls011647 for ; Fri, 7 Sep 2007 09:10:20 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GARau022008 for ; Fri, 7 Sep 2007 09:10:27 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GARli022007 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:10:27 -0700 Message-Id: <200709071610.l87GARli022007@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:10:27 -0700 From: "Xen patchbot-linux-2.6.18-xen" To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=unavailable version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [linux-2.6.18-xen] [IA64] Introduce xen specific gate page. X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User Alex Williamson # Date 1185989016 21600 # Node ID 59582461a590f996fc2d09f14e4cef2625beb8de # Parent 1c675d3a2a22e642dbbf32e164a170ee06cc53a2 [IA64] Introduce xen specific gate page. With this transparent paravirtualization over head is eliminated. Signed-off-by: Isaku Yamahata --- arch/ia64/Kconfig | 7 --- arch/ia64/kernel/Makefile | 55 ++++++++++++++++++++++++++++ arch/ia64/kernel/gate.S | 78 ++++++++++++++-------------------------- arch/ia64/kernel/gate.lds.S | 24 +++++++++--- arch/ia64/kernel/patch.c | 47 ++++++++++++------------ arch/ia64/kernel/vmlinux.lds.S | 4 ++ arch/ia64/kernel/xengate-data.S | 3 + arch/ia64/mm/init.c | 22 ++++++++++- 8 files changed, 152 insertions(+), 88 deletions(-) diff -r 1c675d3a2a22 -r 59582461a590 arch/ia64/Kconfig --- a/arch/ia64/Kconfig Wed Aug 01 09:53:36 2007 -0600 +++ b/arch/ia64/Kconfig Wed Aug 01 11:23:36 2007 -0600 @@ -64,13 +64,6 @@ config XEN help Enable Xen hypervisor support. Resulting kernel runs both as a guest OS on Xen and natively on hardware. - -config XEN_IA64_VDSO_PARAVIRT - bool "Xen/IA64 vdso area paravirtualization" - depends on XEN && !ITANIUM - default y - help - vDSO paravirtualization config XEN_IA64_EXPOSE_P2M bool "Xen/IA64 exposure p2m table" diff -r 1c675d3a2a22 -r 59582461a590 arch/ia64/kernel/Makefile --- a/arch/ia64/kernel/Makefile Wed Aug 01 09:53:36 2007 -0600 +++ b/arch/ia64/kernel/Makefile Wed Aug 01 11:23:36 2007 -0600 @@ -61,3 +61,58 @@ GATECFLAGS_gate-syms.o = -r # We must build gate.so before we can assemble it. # Note: kbuild does not track this dependency due to usage of .incbin $(obj)/gate-data.o: $(obj)/gate.so + + +# +# gate page paravirtualization for xen +# +obj-$(CONFIG_XEN) += xengate-data.o + +# The gate DSO image is built using a special linker script. +targets += xengate.so xengate-syms.o + +extra-$(CONFIG_XEN) += xengate.so xengate.lds xengate.o + +AFLAGS_xengate.o += -D__XEN_IA64_VDSO_PARAVIRT +$(obj)/xengate.o: $(src)/gate.S FORCE + $(call if_changed_dep,as_o_S) + +CPPFLAGS_xengate.lds := -P -C -U$(ARCH) -D__XEN_IA64_VDSO_PARAVIRT +$(obj)/xengate.lds: $(src)/gate.lds.S + $(call if_changed_dep,cpp_lds_S) + +GATECFLAGS_xengate.so = -shared -s -Wl,-soname=linux-gate.so.1 \ + $(call ld-option, -Wl$(comma)--hash-style=sysv) +$(obj)/xengate.so: $(obj)/xengate.lds $(obj)/xengate.o FORCE + $(call if_changed,gate) + +ifeq ($(CONFIG_XEN), y) +$(obj)/built-in.o: $(obj)/xengate-syms.o +$(obj)/built-in.o: ld_flags += -R $(obj)/xengate-syms.o +$(obj)/mca_recovery.o: $(obj)/gate-syms.o $(obj)/xengate-syms.o +endif + +GATECFLAGS_xengate-syms.o = -r +$(obj)/xengate-syms.o: $(obj)/xengate.lds $(obj)/xengate.o FORCE + $(call if_changed,gate) +$(obj)/xengate-data.o: $(obj)/xengate.so + + +# +# .tmp_gate.o to calculate padding size for __kernel_syscall_via_epc +# +extra-y += gate-skip.s .tmp_gate.o + +ifeq ($(CONFIG_XEN), y) +AFLAGS_gate.o += -D__KERNEL_SYSCALL_VIA_EPC_PADDING +$(obj)/gate.o: $(obj)/gate-skip.s FORCE +endif +$(obj)/.tmp_gate.o: $(src)/gate.S FORCE + $(call if_changed_dep,as_o_S) +quiet_cmd_gate_size = GATE_SIZE $@ + cmd_gate_size = $(NM) --extern-only --print-size $(obj)/xengate.o | \ + $(AWK) '/__kernel_syscall_via_epc/{printf "\t.skip 0x"$$2" - "}' > $@; \ + $(NM) --extern-only --print-size $(obj)/.tmp_gate.o | \ + $(AWK) '/__kernel_syscall_via_epc/{printf "0x"$$2"\n"}' >> $@ +$(obj)/gate-skip.s: $(obj)/xengate.o $(obj)/.tmp_gate.o FORCE + $(call if_changed,gate_size) diff -r 1c675d3a2a22 -r 59582461a590 arch/ia64/kernel/gate.S --- a/arch/ia64/kernel/gate.S Wed Aug 01 09:53:36 2007 -0600 +++ b/arch/ia64/kernel/gate.S Wed Aug 01 11:23:36 2007 -0600 @@ -31,17 +31,6 @@ #define BRL_COND_FSYS_BUBBLE_DOWN(pr) \ [1:](pr)brl.cond.sptk 0; \ .xdata4 ".data.patch.brl_fsys_bubble_down", 1b-. - -#ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT - // Currently is_running_on_xen() is defined as running_on_xen. - // If is_running_on_xen() is a real function, we must update - // according to it. - .section ".data.patch.running_on_xen", "a" - .previous -#define LOAD_RUNNING_ON_XEN(reg) \ -[1:] movl reg=0; \ - .xdata4 ".data.patch.running_on_xen", 1b-. -#endif /* CONFIG_XEN_IA64_VDSO_PARAVIRT */ # define ARG0_OFF (16 + IA64_SIGFRAME_ARG0_OFFSET) # define ARG1_OFF (16 + IA64_SIGFRAME_ARG1_OFFSET) @@ -332,37 +321,24 @@ GLOBAL_ENTRY(__kernel_syscall_via_epc) mov r10=0 // A default to successful syscall execution epc // B causes split-issue } -#ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT + ;; +#ifdef __XEN_IA64_VDSO_PARAVIRT // r20 = 1 // r22 = &vcpu->vcpu_info->evtchn_upcall_mask // r24 = &vcpu->vcpu_info->evtchn_upcall_pending // r25 = tmp - // r28 = &running_on_xen - // r30 = running_on_xen // r31 = tmp // p11 = tmp - // p12 = running_on_xen - // p13 = !running_on_xen // p14 = tmp - // p15 = tmp -#define isXen p12 -#define isRaw p13 - LOAD_RUNNING_ON_XEN(r28) + mov r20=1 movl r22=XSI_PSR_I_ADDR - mov r20=1 - ;; - ld4 r30=[r28] - ;; - cmp.ne isXen,isRaw=r0,r30 - ;; -(isXen) ld8 r22=[r22] - ;; -(isRaw) rsm psr.be | psr.i -(isXen) adds r24=-1,r22 -(isXen) st1 [r22]=r20 -(isXen) rum psr.be -#else - ;; + ;; + ld8 r22=[r22] + ;; + st1 [r22]=r20 + rum psr.be + adds r24=-1,r22 +#else rsm psr.be | psr.i // M2 (5 cyc to srlz.d) #endif LOAD_FSYSCALL_TABLE(r14) // X @@ -370,14 +346,14 @@ GLOBAL_ENTRY(__kernel_syscall_via_epc) mov r16=IA64_KR(CURRENT) // M2 (12 cyc) shladd r18=r17,3,r14 // A mov r19=NR_syscalls-1 // A +#ifdef __XEN_IA64_VDSO_PARAVIRT + XEN_HYPER_GET_PSR ;; lfetch [r18] // M0|1 -#ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT -(isRaw) mov r29=psr -(isXen) XEN_HYPER_GET_PSR - ;; -(isXen) mov r29=r8 -#else + mov r29=r8 +#else + ;; + lfetch [r18] // M0|1 mov r29=psr // M2 (12 cyc) #endif // If r17 is a NaT, p6 will be zero @@ -393,7 +369,7 @@ GLOBAL_ENTRY(__kernel_syscall_via_epc) ;; nop.m 0 (p6) tbit.z.unc p8,p0=r18,0 // I0 (dual-issues with "mov b7=r18"!) -#ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT +#ifdef __XEN_IA64_VDSO_PARAVIRT #define XEN_SET_PSR_I(pred) \ (pred) ld1 r31=[r22]; \ @@ -408,12 +384,7 @@ GLOBAL_ENTRY(__kernel_syscall_via_epc) (p11) XEN_HYPER_SSM_I; ;; - // p14 = running_on_xen && p8 - // p15 = !running_on_xen && p8 -(p8) cmp.ne.unc p14,p15=r0,r30 - ;; -(p15) ssm psr.i - XEN_SET_PSR_I(p14) + XEN_SET_PSR_I(p8) #else nop.i 0 ;; @@ -439,9 +410,8 @@ GLOBAL_ENTRY(__kernel_syscall_via_epc) #else BRL_COND_FSYS_BUBBLE_DOWN(p6) #endif -#ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT -(isRaw) ssm psr.i - XEN_SET_PSR_I(isXen) +#ifdef __XEN_IA64_VDSO_PARAVIRT + XEN_SET_PSR_I(p0) #else ssm psr.i #endif @@ -449,4 +419,12 @@ GLOBAL_ENTRY(__kernel_syscall_via_epc) (p10) mov r8=EINVAL (p9) mov r8=ENOSYS FSYS_RETURN +#ifdef __KERNEL_SYSCALL_VIA_EPC_PADDING + /* + * All values/sizes of __kernel_xxx symbol in gate.so and xengate.so + * must be same to each other. + * Adjust symbol size in gate.so to be same to the one in xengate.so. + */ +.include "arch/ia64/kernel/gate-skip.s" +#endif END(__kernel_syscall_via_epc) diff -r 1c675d3a2a22 -r 59582461a590 arch/ia64/kernel/gate.lds.S --- a/arch/ia64/kernel/gate.lds.S Wed Aug 01 09:53:36 2007 -0600 +++ b/arch/ia64/kernel/gate.lds.S Wed Aug 01 11:23:36 2007 -0600 @@ -28,6 +28,24 @@ SECTIONS . = GATE_ADDR + 0x500; .data.patch : { +#ifdef __XEN_IA64_VDSO_PARAVIRT +#define __start_gate_mckinley_e9_patchlist \ + __start_gate_mckinley_e9_patchlist_xen +#define __end_gate_mckinley_e9_patchlist \ + __end_gate_mckinley_e9_patchlist_xen +#define __start_gate_vtop_patchlist \ + __start_gate_vtop_patchlist_xen +#define __end_gate_vtop_patchlist \ + __end_gate_vtop_patchlist_xen +#define __start_gate_fsyscall_patchlist \ + __start_gate_fsyscall_patchlist_xen +#define __end_gate_fsyscall_patchlist \ + __end_gate_fsyscall_patchlist_xen +#define __start_gate_brl_fsys_bubble_down_patchlist \ + __start_gate_brl_fsys_bubble_down_patchlist_xen +#define __end_gate_brl_fsys_bubble_down_patchlist \ + __end_gate_brl_fsys_bubble_down_patchlist_xen +#endif __start_gate_mckinley_e9_patchlist = .; *(.data.patch.mckinley_e9) __end_gate_mckinley_e9_patchlist = .; @@ -43,12 +61,6 @@ SECTIONS __start_gate_brl_fsys_bubble_down_patchlist = .; *(.data.patch.brl_fsys_bubble_down) __end_gate_brl_fsys_bubble_down_patchlist = .; - -#ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT - __start_gate_running_on_xen_patchlist = .; - *(.data.patch.running_on_xen) - __end_gate_running_on_xen_patchlist = .; -#endif } :readable .IA_64.unwind_info : { *(.IA_64.unwind_info*) } .IA_64.unwind : { *(.IA_64.unwind*) } :readable :unwind diff -r 1c675d3a2a22 -r 59582461a590 arch/ia64/kernel/patch.c --- a/arch/ia64/kernel/patch.c Wed Aug 01 09:53:36 2007 -0600 +++ b/arch/ia64/kernel/patch.c Wed Aug 01 11:23:36 2007 -0600 @@ -184,41 +184,42 @@ patch_brl_fsys_bubble_down (unsigned lon ia64_srlz_i(); } -#ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT -extern char __start_gate_running_on_xen_patchlist[]; -extern char __end_gate_running_on_xen_patchlist[]; - -void -patch_running_on_xen(unsigned long start, unsigned long end) -{ - extern const int running_on_xen; - s32 *offp = (s32 *)start; - u64 ip; - - while (offp < (s32 *)end) { - ip = (u64)ia64_imva((char *)offp + *offp); - ia64_patch_imm64(ip, (u64)&running_on_xen); - ia64_fc((void *)ip); - ++offp; - } - ia64_sync_i(); - ia64_srlz_i(); +#ifdef CONFIG_XEN +void __init +ia64_patch_gate_xen (void) +{ + extern char __start_gate_mckinley_e9_patchlist_xen[], __end_gate_mckinley_e9_patchlist_xen[]; + extern char __start_gate_vtop_patchlist_xen[], __end_gate_vtop_patchlist_xen[]; + extern char __start_gate_fsyscall_patchlist_xen[], __end_gate_fsyscall_patchlist_xen[]; + extern char __start_gate_brl_fsys_bubble_down_patchlist_xen[], __end_gate_brl_fsys_bubble_down_patchlist_xen[]; +# define START(name) ((unsigned long) __start_gate_##name##_patchlist_xen) +# define END(name) ((unsigned long)__end_gate_##name##_patchlist_xen) + + patch_fsyscall_table(START(fsyscall), END(fsyscall)); + patch_brl_fsys_bubble_down(START(brl_fsys_bubble_down), END(brl_fsys_bubble_down)); + ia64_patch_vtop(START(vtop), END(vtop)); + ia64_patch_mckinley_e9(START(mckinley_e9), END(mckinley_e9)); + +# undef START +# undef END } #else -#define patch_running_on_xen(start, end) do { } while (0) +#define ia64_patch_gate_xen() do { } while (0) #endif void __init ia64_patch_gate (void) { + if (is_running_on_xen()) { + ia64_patch_gate_xen(); + return; + } + # define START(name) ((unsigned long) __start_gate_##name##_patchlist) # define END(name) ((unsigned long)__end_gate_##name##_patchlist) patch_fsyscall_table(START(fsyscall), END(fsyscall)); patch_brl_fsys_bubble_down(START(brl_fsys_bubble_down), END(brl_fsys_bubble_down)); -#ifdef CONFIG_XEN - patch_running_on_xen(START(running_on_xen), END(running_on_xen)); -#endif ia64_patch_vtop(START(vtop), END(vtop)); ia64_patch_mckinley_e9(START(mckinley_e9), END(mckinley_e9)); } diff -r 1c675d3a2a22 -r 59582461a590 arch/ia64/kernel/vmlinux.lds.S --- a/arch/ia64/kernel/vmlinux.lds.S Wed Aug 01 09:53:36 2007 -0600 +++ b/arch/ia64/kernel/vmlinux.lds.S Wed Aug 01 11:23:36 2007 -0600 @@ -183,6 +183,10 @@ SECTIONS __start_gate_section = .; *(.data.gate) __stop_gate_section = .; + . = ALIGN(PAGE_SIZE); + __start_xen_gate_section = .; + *(.data.gate.xen) + __stop_xen_gate_section = .; } . = ALIGN(PAGE_SIZE); /* make sure the gate page doesn't expose kernel data */ diff -r 1c675d3a2a22 -r 59582461a590 arch/ia64/kernel/xengate-data.S --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/arch/ia64/kernel/xengate-data.S Wed Aug 01 11:23:36 2007 -0600 @@ -0,0 +1,3 @@ + .section .data.gate.xen, "aw" + + .incbin "arch/ia64/kernel/xengate.so" diff -r 1c675d3a2a22 -r 59582461a590 arch/ia64/mm/init.c --- a/arch/ia64/mm/init.c Wed Aug 01 09:53:36 2007 -0600 +++ b/arch/ia64/mm/init.c Wed Aug 01 11:23:36 2007 -0600 @@ -303,16 +303,34 @@ setup_gate (void) setup_gate (void) { struct page *page; + void *gate_page_addr = __start_gate_section; + +#ifdef CONFIG_XEN + unsigned long unused_gate; + extern char __start_xen_gate_section[]; + if (is_running_on_xen()) { + gate_page_addr = __start_xen_gate_section; + unused_gate = (unsigned long)ia64_imva(__start_gate_section); + } else + unused_gate = + (unsigned long)ia64_imva(__start_xen_gate_section); +#ifndef HAVE_BUGGY_SEGREL + ClearPageReserved(virt_to_page(unused_gate)); + init_page_count(virt_to_page(unused_gate)); + free_page(unused_gate); + ++totalram_pages; +#endif +#endif /* * Map the gate page twice: once read-only to export the ELF * headers etc. and once execute-only page to enable * privilege-promotion via "epc": */ - page = virt_to_page(ia64_imva(__start_gate_section)); + page = virt_to_page(ia64_imva(gate_page_addr)); put_kernel_page(page, GATE_ADDR, PAGE_READONLY); #ifdef HAVE_BUGGY_SEGREL - page = virt_to_page(ia64_imva(__start_gate_section + PAGE_SIZE)); + page = virt_to_page(ia64_imva(gate_page_addr + PAGE_SIZE)); put_kernel_page(page, GATE_ADDR + PAGE_SIZE, PAGE_GATE); #else put_kernel_page(page, GATE_ADDR + PERCPU_PAGE_SIZE, PAGE_GATE); _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:13:20 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:13:20 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgSO-0008Kz-F2 for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:13:20 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgSg-00066F-UL; Fri, 07 Sep 2007 16:13:38 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgQD-0004WE-0V for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:11:05 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgQ1-0007GG-3V for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:11:02 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAUbP011680 for ; Fri, 7 Sep 2007 09:10:30 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAcuY022196 for ; Fri, 7 Sep 2007 09:10:38 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GAcgL022195 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:10:38 -0700 Message-Id: <200709071610.l87GAcgL022195@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:10:37 -0700 From: "Xen patchbot-linux-2.6.18-xen" To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [linux-2.6.18-xen] Add missing err.h include to xenbus.h header file. X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User kfraser@localhost.localdomain # Date 1189156762 -3600 # Node ID 5ce5bd383ea978ff6b2ed04d93cc2bb5dffcd1a9 # Parent 1e2284d885fbe9fc0f18143ccce7fdcc30788e94 Add missing err.h include to xenbus.h header file. Signed-off-by: Keir Fraser --- include/xen/xenbus.h | 1 + 1 files changed, 1 insertion(+) diff -r 1e2284d885fb -r 5ce5bd383ea9 include/xen/xenbus.h --- a/include/xen/xenbus.h Fri Sep 07 10:04:02 2007 +0100 +++ b/include/xen/xenbus.h Fri Sep 07 10:19:22 2007 +0100 @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:13:41 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:13:41 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgSi-0008L6-MG for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:13:41 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgT0-0006CO-Dg; Fri, 07 Sep 2007 16:13:58 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgQD-0004WO-I0 for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:11:05 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgQ1-0007GL-UX for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:11:03 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAVSe011683 for ; Fri, 7 Sep 2007 09:10:31 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAduH022213 for ; Fri, 7 Sep 2007 09:10:39 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GAdBb022212 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:10:39 -0700 Message-Id: <200709071610.l87GAdBb022212@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:10:38 -0700 From: "Xen patchbot-linux-2.6.18-xen" To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [linux-2.6.18-xen] PV-on-HVM: Fix bad symbol reference X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User kfraser@localhost.localdomain # Date 1189157097 -3600 # Node ID 9e03bcda005440ec4f216610bccca2295c31c4bb # Parent 5ce5bd383ea978ff6b2ed04d93cc2bb5dffcd1a9 PV-on-HVM: Fix bad symbol reference This fixes a bug causing a bogus symbol reference (to init_page_count) in the PV-on-HVM drivers for 2.6 kernels that define the set_page_count macro. Based on an original patch by: Signed-off-by: Ben Guthro Signed-off-by: Dave Lively Signed-off-by: Keir Fraser --- drivers/xen/core/gnttab.c | 9 ++++++++- include/xen/gnttab.h | 6 +----- 2 files changed, 9 insertions(+), 6 deletions(-) diff -r 5ce5bd383ea9 -r 9e03bcda0054 drivers/xen/core/gnttab.c --- a/drivers/xen/core/gnttab.c Fri Sep 07 10:19:22 2007 +0100 +++ b/drivers/xen/core/gnttab.c Fri Sep 07 10:24:57 2007 +0100 @@ -587,7 +587,14 @@ out: put_page(page); return err; } -EXPORT_SYMBOL(gnttab_copy_grant_page); +EXPORT_SYMBOL_GPL(gnttab_copy_grant_page); + +void gnttab_reset_grant_page(struct page *page) +{ + init_page_count(page); + reset_page_mapcount(page); +} +EXPORT_SYMBOL_GPL(gnttab_reset_grant_page); /* * Keep track of foreign pages marked as PageForeign so that we don't diff -r 5ce5bd383ea9 -r 9e03bcda0054 include/xen/gnttab.h --- a/include/xen/gnttab.h Fri Sep 07 10:19:22 2007 +0100 +++ b/include/xen/gnttab.h Fri Sep 07 10:24:57 2007 +0100 @@ -108,11 +108,7 @@ static inline void __gnttab_dma_unmap_pa { } -static inline void gnttab_reset_grant_page(struct page *page) -{ - init_page_count(page); - reset_page_mapcount(page); -} +void gnttab_reset_grant_page(struct page *page); int gnttab_suspend(void); int gnttab_resume(void); _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:13:55 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:13:55 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgSx-0008LA-8N for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:13:55 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgTE-0006Gq-4I; Fri, 07 Sep 2007 16:14:12 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgQE-0004We-Fx for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:11:06 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgPx-0007Fv-AF for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:11:04 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GARDh011668 for ; Fri, 7 Sep 2007 09:10:27 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAY8k022128 for ; Fri, 7 Sep 2007 09:10:34 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GAYRQ022127 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:10:34 -0700 Message-Id: <200709071610.l87GAYRQ022127@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:10:33 -0700 From: "Xen patchbot-linux-2.6.18-xen" To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [linux-2.6.18-xen] Remove xencomm page size limit. X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User kfraser@localhost.localdomain # Date 1188311595 -3600 # Node ID 7419a3be82737bc2de83749030759e104c92e1ea # Parent b5fdf02c38f4765697196f5fad5d1262f2c157f4 Remove xencomm page size limit. Currently xencomm has page size limit so that a domain with many memory (e.g. 100GB~) can't be created. Now that xencomm of xen side accepts struct xencomm_desc whose address array crosses page boundary. Thus it isn't necessary to allocate single page not to cross page boundary. We can allocate exact sized memory. Note that struct xencomm_desc can't cross page boundary and slab allocator returns sizeof(void*) aligned pointer. Where sizeof(*desc) > sizeof(void*), e.g. 32 bit environment, the slab allocator return pointer doesn't gurantee that struct xencomm_desc doesn't cross page boundary. So we fall back to page allocator. Signed-off-by: Isaku Yamahata --- drivers/xen/core/xencomm.c | 57 +++++++++++++++++++++++++++++++++------------ 1 files changed, 43 insertions(+), 14 deletions(-) diff -r b5fdf02c38f4 -r 7419a3be8273 drivers/xen/core/xencomm.c --- a/drivers/xen/core/xencomm.c Thu Aug 16 13:44:51 2007 -0600 +++ b/drivers/xen/core/xencomm.c Tue Aug 28 15:33:15 2007 +0100 @@ -68,25 +68,54 @@ static int xencomm_init(struct xencomm_d return 0; } -/* XXX use slab allocator */ -static struct xencomm_desc *xencomm_alloc(gfp_t gfp_mask) -{ - struct xencomm_desc *desc; - - desc = (struct xencomm_desc *)__get_free_page(gfp_mask); - if (desc == NULL) - return NULL; - - desc->nr_addrs = (PAGE_SIZE - sizeof(struct xencomm_desc)) / +static struct xencomm_desc *xencomm_alloc(gfp_t gfp_mask, + void *buffer, unsigned long bytes) +{ + struct xencomm_desc *desc; + unsigned long buffer_ulong = (unsigned long)buffer; + unsigned long start = buffer_ulong & PAGE_MASK; + unsigned long end = (buffer_ulong + bytes) | ~PAGE_MASK; + unsigned long nr_addrs = (end - start + 1) >> PAGE_SHIFT; + unsigned long size = sizeof(*desc) + + sizeof(desc->address[0]) * nr_addrs; + + /* + * slab allocator returns at least sizeof(void*) aligned pointer. + * When sizeof(*desc) > sizeof(void*), struct xencomm_desc might + * cross page boundary. + */ + if (sizeof(*desc) > sizeof(void*)) { + unsigned long order = get_order(size); + desc = (struct xencomm_desc *)__get_free_pages(gfp_mask, + order); + if (desc == NULL) + return NULL; + + desc->nr_addrs = + ((PAGE_SIZE << order) - sizeof(struct xencomm_desc)) / sizeof(*desc->address); - + } else { + desc = kmalloc(size, gfp_mask); + if (desc == NULL) + return NULL; + + desc->nr_addrs = nr_addrs; + } return desc; } void xencomm_free(struct xencomm_handle *desc) { - if (desc && !((ulong)desc & XENCOMM_INLINE_FLAG)) - free_page((unsigned long)__va(desc)); + if (desc && !((ulong)desc & XENCOMM_INLINE_FLAG)) { + struct xencomm_desc *desc__ = (struct xencomm_desc*)desc; + if (sizeof(*desc__) > sizeof(void*)) { + unsigned long size = sizeof(*desc__) + + sizeof(desc__->address[0]) * desc__->nr_addrs; + unsigned long order = get_order(size); + free_pages((unsigned long)__va(desc), order); + } else + kfree(__va(desc)); + } } static int xencomm_create(void *buffer, unsigned long bytes, struct xencomm_desc **ret, gfp_t gfp_mask) @@ -105,7 +134,7 @@ static int xencomm_create(void *buffer, BUG_ON(buffer == NULL); /* 'bytes' is non-zero */ - desc = xencomm_alloc(gfp_mask); + desc = xencomm_alloc(gfp_mask, buffer, bytes); if (!desc) { printk("%s failure\n", "xencomm_alloc"); return -ENOMEM; _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:14:20 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:14:20 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgTM-0008Lj-Ay for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:14:20 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgTc-0006Mw-TY; Fri, 07 Sep 2007 16:14:36 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgQF-0004Wq-Fj for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:11:07 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgQ0-0007GD-5R for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:11:05 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAUvV011677 for ; Fri, 7 Sep 2007 09:10:30 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAboQ022179 for ; Fri, 7 Sep 2007 09:10:37 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GAbHG022178 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:10:37 -0700 Message-Id: <200709071610.l87GAbHG022178@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:10:36 -0700 From: "Xen patchbot-linux-2.6.18-xen" To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [linux-2.6.18-xen] Fix potential kthread deadlock during Xen suspend. X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User kfraser@localhost.localdomain # Date 1189155842 -3600 # Node ID 1e2284d885fbe9fc0f18143ccce7fdcc30788e94 # Parent f30b59f550c2ac03734c7a8cb63f658f16ca087a Fix potential kthread deadlock during Xen suspend. kthread_create() depends on keventd, so it cannot be executed from keventd. Replace use of kthread_create() with an approach based on kernel_thread(). Based on an original patch by: Signed-off-by: Ben Guthro Signed-off-by: Robert Phillips Signed-off-by: Keir Fraser --- drivers/xen/core/reboot.c | 36 +++++++++++++++--------------------- 1 files changed, 15 insertions(+), 21 deletions(-) diff -r f30b59f550c2 -r 1e2284d885fb drivers/xen/core/reboot.c --- a/drivers/xen/core/reboot.c Fri Aug 31 10:45:38 2007 +0100 +++ b/drivers/xen/core/reboot.c Fri Sep 07 10:04:02 2007 +0100 @@ -8,7 +8,6 @@ #include #include #include -#include #include #include @@ -68,36 +67,31 @@ static int shutdown_process(void *__unus static int xen_suspend(void *__unused) { - int err = __xen_suspend(fast_suspend); + int err; + + daemonize("suspend"); + err = set_cpus_allowed(current, cpumask_of_cpu(0)); + if (err) { + printk(KERN_ERR "Xen suspend can't run on CPU0 (%d)\n", err); + goto out; + } + + err = __xen_suspend(fast_suspend); if (err) printk(KERN_ERR "Xen suspend failed (%d)\n", err); + + out: shutting_down = SHUTDOWN_INVALID; return 0; } -static int kthread_create_on_cpu(int (*f)(void *arg), - void *arg, - const char *name, - int cpu) -{ - struct task_struct *p; - p = kthread_create(f, arg, name); - if (IS_ERR(p)) - return PTR_ERR(p); - kthread_bind(p, cpu); - wake_up_process(p); - return 0; -} - static void __shutdown_handler(void *unused) { int err; - if (shutting_down != SHUTDOWN_SUSPEND) - err = kernel_thread(shutdown_process, NULL, - CLONE_FS | CLONE_FILES); - else - err = kthread_create_on_cpu(xen_suspend, NULL, "suspend", 0); + err = kernel_thread((shutting_down == SHUTDOWN_SUSPEND) ? + xen_suspend : shutdown_process, + NULL, CLONE_FS | CLONE_FILES); if (err < 0) { printk(KERN_WARNING "Error creating shutdown process (%d): " _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:14:28 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:14:28 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgTU-0008Lm-Cg for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:14:28 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgTm-0006RI-UB; Fri, 07 Sep 2007 16:14:46 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgQG-0004Wz-Bw for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:11:08 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgPy-0007Fw-6i for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:11:06 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GASZN011671 for ; Fri, 7 Sep 2007 09:10:28 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAZmA022145 for ; Fri, 7 Sep 2007 09:10:35 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GAZen022144 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:10:35 -0700 Message-Id: <200709071610.l87GAZen022144@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:10:34 -0700 From: "Xen patchbot-linux-2.6.18-xen" To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [linux-2.6.18-xen] netfront: Add kref support for legacy Linux kernels. X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User kfraser@localhost.localdomain # Date 1188487419 -3600 # Node ID 720571c2139e66aecb2552a59be897fda40238fa # Parent 7419a3be82737bc2de83749030759e104c92e1ea netfront: Add kref support for legacy Linux kernels. In kernels <= 2.6.5 kref_init, and kref_put had a different interface. This patch allows for older kernels to compile with the older interface. Signed-off-by: Ben Guthro Signed-off-by: Keir Fraser --- drivers/xen/netfront/accel.c | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff -r 7419a3be8273 -r 720571c2139e drivers/xen/netfront/accel.c --- a/drivers/xen/netfront/accel.c Tue Aug 28 15:33:15 2007 +0100 +++ b/drivers/xen/netfront/accel.c Thu Aug 30 16:23:39 2007 +0100 @@ -45,6 +45,14 @@ #define WPRINTK(fmt, args...) \ printk(KERN_WARNING "netfront/accel: " fmt, ##args) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 5) +#define kref_init(x,y) kref_init(x,y) +#define kref_put(x,y) kref_put(x) +#else +#define kref_init(x,y) kref_init(x) +#define kref_put(x,y) kref_put(x,y) +#endif + /* * List of all netfront accelerator plugin modules available. Each * list entry is of type struct netfront_accelerator. @@ -176,7 +184,7 @@ accelerator_set_vif_state_hooks(struct n */ kref_get(&vif_state->np->accelerator->accel_kref); /* This persists until vif_state->hooks are cleared */ - kref_init(&vif_state->vif_kref); + kref_init(&vif_state->vif_kref, vif_kref_release); /* Make sure there are no data path operations going on */ netif_poll_disable(vif_state->np->netdev); @@ -318,7 +326,7 @@ accelerator_probe_vifs(struct netfront_a * persist until the accelerator hooks are removed (e.g. by * accelerator module unload) */ - kref_init(&accelerator->accel_kref); + kref_init(&accelerator->accel_kref, accel_kref_release); /* * Store the hooks for future calls to probe a new device, and _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:14:33 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:14:33 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgTY-0008Lr-Lp for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:14:33 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgTr-0006Uc-89; Fri, 07 Sep 2007 16:14:51 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgQH-0004XQ-7g for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:11:09 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgQ2-0007GN-RH for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:11:07 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAW3V011686 for ; Fri, 7 Sep 2007 09:10:32 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAebT022230 for ; Fri, 7 Sep 2007 09:10:40 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GAdQx022229 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:10:39 -0700 Message-Id: <200709071610.l87GAdQx022229@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:10:39 -0700 From: "Xen patchbot-linux-2.6.18-xen" To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [linux-2.6.18-xen] Bind different tasks' evtchns to different vcpus of Dom0 X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User kfraser@localhost.localdomain # Date 1189159765 -3600 # Node ID 8d1af6acf74090a1fafc80d02d2feab2da9b7f53 # Parent 9e03bcda005440ec4f216610bccca2295c31c4bb Bind different tasks' evtchns to different vcpus of Dom0 Currently, all user-space event channels notify Dom0's vcpu0 -- this is not nice considering scalability. The patch tries to bind different tasks' evtchns to different vcpus of Dom0 when the bindings are initialized, and it can also dynamically change the binding if a task actually gets run on another vcpu for some reason. Tests (Inb and OLTP) show the patch can improve scalability to some notable degree. Signed-off-by: Dexuan Cui Signed-off-by: Kan Liang Signed-off-by: Keir Fraser --- drivers/xen/core/evtchn.c | 19 ++++++-------- drivers/xen/evtchn/evtchn.c | 59 ++++++++++++++++++++++++++++++++++++++++++++ include/xen/evtchn.h | 12 ++++++++ 3 files changed, 80 insertions(+), 10 deletions(-) diff -r 9e03bcda0054 -r 8d1af6acf740 drivers/xen/core/evtchn.c --- a/drivers/xen/core/evtchn.c Fri Sep 07 10:24:57 2007 +0100 +++ b/drivers/xen/core/evtchn.c Fri Sep 07 11:09:25 2007 +0100 @@ -125,12 +125,15 @@ static inline unsigned long active_evtch ~sh->evtchn_mask[idx]); } -static void bind_evtchn_to_cpu(unsigned int chn, unsigned int cpu) -{ +void bind_evtchn_to_cpu(unsigned int chn, unsigned int cpu) +{ + shared_info_t *s = HYPERVISOR_shared_info; int irq = evtchn_to_irq[chn]; - BUG_ON(irq == -1); - set_native_irq_info(irq, cpumask_of_cpu(cpu)); + BUG_ON(!test_bit(chn, s->evtchn_mask)); + + if (irq != -1) + set_native_irq_info(irq, cpumask_of_cpu(cpu)); clear_bit(chn, (unsigned long *)cpu_evtchn_mask[cpu_evtchn[chn]]); set_bit(chn, (unsigned long *)cpu_evtchn_mask[cpu]); @@ -160,10 +163,6 @@ static inline unsigned long active_evtch unsigned int idx) { return (sh->evtchn_pending[idx] & ~sh->evtchn_mask[idx]); -} - -static void bind_evtchn_to_cpu(unsigned int chn, unsigned int cpu) -{ } static void init_evtchn_cpu_bindings(void) @@ -607,7 +606,7 @@ static void rebind_irq_to_cpu(unsigned i * virq or IPI channel, which don't actually need to be rebound. Ignore * it, but don't do the xenlinux-level rebind in that case. */ - if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_vcpu, &bind_vcpu) >= 0) + if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_vcpu, &bind_vcpu) == 0) bind_evtchn_to_cpu(evtchn, tcpu); } @@ -626,7 +625,7 @@ int resend_irq_on_evtchn(unsigned int ir if (!VALID_EVTCHN(evtchn)) return 1; - masked = synch_test_and_set_bit(evtchn, s->evtchn_mask); + masked = test_and_set_evtchn_mask(evtchn); synch_set_bit(evtchn, s->evtchn_pending); if (!masked) unmask_evtchn(evtchn); diff -r 9e03bcda0054 -r 8d1af6acf740 drivers/xen/evtchn/evtchn.c --- a/drivers/xen/evtchn/evtchn.c Fri Sep 07 10:24:57 2007 +0100 +++ b/drivers/xen/evtchn/evtchn.c Fri Sep 07 11:09:25 2007 +0100 @@ -62,6 +62,9 @@ struct per_user_data { /* Processes wait on this queue when ring is empty. */ wait_queue_head_t evtchn_wait; struct fasync_struct *evtchn_async_queue; + + int bind_cpu; + int nr_event_wrong_delivery; }; /* Who's bound to each port? */ @@ -93,6 +96,45 @@ void evtchn_device_upcall(int port) spin_unlock(&port_user_lock); } +static void evtchn_rebind_cpu(evtchn_port_t port, unsigned int cpu) +{ + struct evtchn_bind_vcpu ebv = { .port = port, .vcpu = cpu }; + int masked; + + masked = test_and_set_evtchn_mask(port); + if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_vcpu, &ebv) == 0) + bind_evtchn_to_cpu(port, cpu); + if (!masked) + unmask_evtchn(port); +} + +static void evtchn_check_wrong_delivery(struct per_user_data *u) +{ + evtchn_port_t port; + unsigned int current_cpu = smp_processor_id(); + + /* Delivered to correct CPU? All is good. */ + if (u->bind_cpu == current_cpu) { + u->nr_event_wrong_delivery = 0; + return; + } + + /* Tolerate up to 100 consecutive misdeliveries. */ + if (++u->nr_event_wrong_delivery < 100) + return; + + spin_lock_irq(&port_user_lock); + + for (port = 0; port < NR_EVENT_CHANNELS; port++) + if (port_user[port] == u) + evtchn_rebind_cpu(port, current_cpu); + + u->bind_cpu = current_cpu; + u->nr_event_wrong_delivery = 0; + + spin_unlock_irq(&port_user_lock); +} + static ssize_t evtchn_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { @@ -153,6 +195,8 @@ static ssize_t evtchn_read(struct file * ((bytes2 != 0) && copy_to_user(&buf[bytes1], &u->ring[0], bytes2))) goto unlock_out; + + evtchn_check_wrong_delivery(u); u->ring_cons += (bytes1 + bytes2) / sizeof(evtchn_port_t); rc = bytes1 + bytes2; @@ -202,9 +246,22 @@ static void evtchn_bind_to_user(struct p static void evtchn_bind_to_user(struct per_user_data *u, int port) { spin_lock_irq(&port_user_lock); + BUG_ON(port_user[port] != NULL); port_user[port] = u; + + if (u->bind_cpu == -1) { + static unsigned int bind_cpu; + bind_cpu = next_cpu(bind_cpu, cpu_online_map); + if (bind_cpu >= NR_CPUS) + bind_cpu = first_cpu(cpu_online_map); + u->bind_cpu = bind_cpu; + } + + evtchn_rebind_cpu(port, u->bind_cpu); + unmask_evtchn(port); + spin_unlock_irq(&port_user_lock); } @@ -385,6 +442,8 @@ static int evtchn_open(struct inode *ino mutex_init(&u->ring_cons_mutex); filp->private_data = u; + + u->bind_cpu = -1; return 0; } diff -r 9e03bcda0054 -r 8d1af6acf740 include/xen/evtchn.h --- a/include/xen/evtchn.h Fri Sep 07 10:24:57 2007 +0100 +++ b/include/xen/evtchn.h Fri Sep 07 11:09:25 2007 +0100 @@ -104,6 +104,18 @@ void mask_evtchn(int port); void mask_evtchn(int port); void unmask_evtchn(int port); +#ifdef CONFIG_SMP +void bind_evtchn_to_cpu(unsigned int chn, unsigned int cpu); +#else +#define bind_evtchn_to_cpu(chn, cpu) ((void)0) +#endif + +static inline int test_and_set_evtchn_mask(int port) +{ + shared_info_t *s = HYPERVISOR_shared_info; + return synch_test_and_set_bit(port, s->evtchn_mask); +} + static inline void clear_evtchn(int port) { shared_info_t *s = HYPERVISOR_shared_info; _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:14:38 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:14:38 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgTd-0008Lv-MG for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:14:38 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgTw-0006YL-6E; Fri, 07 Sep 2007 16:14:56 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgQH-0004XX-UH for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:11:09 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgQ3-0007GR-P5 for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:11:07 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAXJD011689 for ; Fri, 7 Sep 2007 09:10:33 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GAe9q022247 for ; Fri, 7 Sep 2007 09:10:40 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GAeiJ022246 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:10:40 -0700 Message-Id: <200709071610.l87GAeiJ022246@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:10:40 -0700 From: "Xen patchbot-linux-2.6.18-xen" To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [linux-2.6.18-xen] Fix one dead loop case in host S3 X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User kfraser@localhost.localdomain # Date 1189160303 -3600 # Node ID 2a214d4ef5b175708d01ac5ce15de7745c48b756 # Parent 8d1af6acf74090a1fafc80d02d2feab2da9b7f53 Fix one dead loop case in host S3 Wake sts is only required to be checked for S1, and implementation is free to not touch wake sts bit for S3. The latter case is observed falling into loop on checking wake sts after sleep hypercall returns. Actually we only need to check hypercall return value here, and those checks belong to Xen instead. Signed-off-by Kevin Tian --- drivers/acpi/hardware/hwsleep.c | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) diff -r 8d1af6acf740 -r 2a214d4ef5b1 drivers/acpi/hardware/hwsleep.c --- a/drivers/acpi/hardware/hwsleep.c Fri Sep 07 11:09:25 2007 +0100 +++ b/drivers/acpi/hardware/hwsleep.c Fri Sep 07 11:18:23 2007 +0100 @@ -338,10 +338,6 @@ acpi_status asmlinkage acpi_enter_sleep_ status = acpi_hw_register_write(ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1B_CONTROL, PM1Bcontrol); -#else - status = acpi_notify_hypervisor_state(sleep_state, - PM1Acontrol, PM1Bcontrol); -#endif if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } @@ -383,6 +379,15 @@ acpi_status asmlinkage acpi_enter_sleep_ } while (!in_value); return_ACPI_STATUS(AE_OK); +#else + /* PV ACPI just need check hypercall return value */ + status = acpi_notify_hypervisor_state(sleep_state, + PM1Acontrol, PM1Bcontrol); + if (ACPI_FAILURE(status)) + return_ACPI_STATUS(status); + else + return_ACPI_STATUS(AE_OK); +#endif } ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state) _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:14:42 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:14:42 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgTi-0008Ly-Ij for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:14:42 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgU1-0006ca-2F; Fri, 07 Sep 2007 16:15:01 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgRp-0005nt-BW for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:12:45 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgRl-0007Kj-RF for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:12:43 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GCJ0D011692 for ; Fri, 7 Sep 2007 09:12:19 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GCRgP022787 for ; Fri, 7 Sep 2007 09:12:27 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GCQ0W022786 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:12:26 -0700 Message-Id: <200709071612.l87GCQ0W022786@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:12:26 -0700 From: Xen patchbot-unstable To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [xen-unstable] Allow Xen to build on FreeBSD. X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User kfraser@localhost.localdomain # Date 1187275477 -3600 # Node ID 0edecad52917cfc9392858d2b2602e64e5f31a55 # Parent 256160ff19b74057f5819af20d68e6e3388c80e3 Allow Xen to build on FreeBSD. From: Julian Stecklina Signed-off-by: Keir Fraser --- config/FreeBSD.mk | 1 + config/x86_32.mk | 2 ++ 2 files changed, 3 insertions(+) diff -r 256160ff19b7 -r 0edecad52917 config/FreeBSD.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config/FreeBSD.mk Thu Aug 16 15:44:37 2007 +0100 @@ -0,0 +1,1 @@ +include $(XEN_ROOT)/config/StdGNU.mk diff -r 256160ff19b7 -r 0edecad52917 config/x86_32.mk --- a/config/x86_32.mk Thu Aug 16 13:27:59 2007 +0100 +++ b/config/x86_32.mk Thu Aug 16 15:44:37 2007 +0100 @@ -13,6 +13,8 @@ LIBDIR := lib # Use only if calling $(LD) directly. ifeq ($(XEN_OS),OpenBSD) LDFLAGS_DIRECT += -melf_i386_obsd +else ifeq ($(XEN_OS),FreeBSD) +LDFLAGS_DIRECT += -melf_i386_fbsd else LDFLAGS_DIRECT += -melf_i386 endif _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:14:46 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:14:46 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgTm-0008M1-JF for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:14:46 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgU5-0006gB-3f; Fri, 07 Sep 2007 16:15:05 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgRq-0005oA-FD for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:12:46 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgRm-0007Kk-MN for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:12:44 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GCK2e011695 for ; Fri, 7 Sep 2007 09:12:20 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GCRak022804 for ; Fri, 7 Sep 2007 09:12:27 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GCRDC022803 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:12:27 -0700 Message-Id: <200709071612.l87GCRDC022803@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:12:27 -0700 From: Xen patchbot-unstable To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [xen-unstable] Avoid new-fangled gnumake else-if syntax. X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User kfraser@localhost.localdomain # Date 1187276358 -3600 # Node ID d1f9652e35c37f6a305f2d2b7f04ab2334d70d62 # Parent 0edecad52917cfc9392858d2b2602e64e5f31a55 Avoid new-fangled gnumake else-if syntax. Declarative style is neater anyway. Signed-off-by: Keir Fraser --- config/x86_32.mk | 10 +++------- 1 files changed, 3 insertions(+), 7 deletions(-) diff -r 0edecad52917 -r d1f9652e35c3 config/x86_32.mk --- a/config/x86_32.mk Thu Aug 16 15:44:37 2007 +0100 +++ b/config/x86_32.mk Thu Aug 16 15:59:18 2007 +0100 @@ -11,10 +11,6 @@ LIBDIR := lib LIBDIR := lib # Use only if calling $(LD) directly. -ifeq ($(XEN_OS),OpenBSD) -LDFLAGS_DIRECT += -melf_i386_obsd -else ifeq ($(XEN_OS),FreeBSD) -LDFLAGS_DIRECT += -melf_i386_fbsd -else -LDFLAGS_DIRECT += -melf_i386 -endif +LDFLAGS_DIRECT_OpenBSD = _obsd +LDFLAGS_DIRECT_FreeBSD = _fbsd +LDFLAGS_DIRECT += -melf_i386$(LDFLAGS_DIRECT_$(XEN_OS)) _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:14:51 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:14:51 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgTr-0008M4-CF for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:14:51 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgU9-0006k2-T9; Fri, 07 Sep 2007 16:15:09 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgRr-0005oF-Kg for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:12:47 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgRn-0007Km-Io for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:12:45 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GCLCW011698 for ; Fri, 7 Sep 2007 09:12:21 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GCS9S022821 for ; Fri, 7 Sep 2007 09:12:28 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GCSCl022820 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:12:28 -0700 Message-Id: <200709071612.l87GCSCl022820@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:12:28 -0700 From: Xen patchbot-unstable To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, UPPERCASE_25_50 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [xen-unstable] Tack -m32/-m64 on HOSTCFLAGS when COMPILE_ARCH is x86. X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User kfraser@localhost.localdomain # Date 1187276417 -3600 # Node ID cd511c380e037f41595b44db920ec903bc7724c3 # Parent d1f9652e35c37f6a305f2d2b7f04ab2334d70d62 Tack -m32/-m64 on HOSTCFLAGS when COMPILE_ARCH is x86. Should fix building in Solaris environments. Signed-off-by: Keir Fraser --- Config.mk | 3 +++ 1 files changed, 3 insertions(+) diff -r d1f9652e35c3 -r cd511c380e03 Config.mk --- a/Config.mk Thu Aug 16 15:59:18 2007 +0100 +++ b/Config.mk Thu Aug 16 16:00:17 2007 +0100 @@ -20,6 +20,9 @@ HOSTCC = gcc HOSTCC = gcc HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer HOSTCFLAGS += -fno-strict-aliasing +HOSTCFLAGS_x86_32 = -m32 +HOSTCFLAGS_x86_64 = -m64 +HOSTCFLAGS += $(HOSTCFLAGS_$(XEN_COMPILE_ARCH)) DISTDIR ?= $(XEN_ROOT)/dist DESTDIR ?= / _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:14:57 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:14:57 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgTx-0008M7-13 for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:14:57 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgUF-0006oM-D5; Fri, 07 Sep 2007 16:15:15 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgRt-0005pR-PZ for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:12:49 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgRo-0007Kr-GE for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:12:47 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GCMYs011701 for ; Fri, 7 Sep 2007 09:12:22 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GCTlY022838 for ; Fri, 7 Sep 2007 09:12:29 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GCT9I022837 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:12:29 -0700 Message-Id: <200709071612.l87GCT9I022837@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:12:29 -0700 From: Xen patchbot-unstable To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, INFO_TLD autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [xen-unstable] xend: Avoid unnecessary writes to xenstore. X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User kfraser@localhost.localdomain # Date 1187341168 -3600 # Node ID 2ece8ff05ce713a83a3d0f729eaec414f0a8d91c # Parent cd511c380e037f41595b44db920ec903bc7724c3 xend: Avoid unnecessary writes to xenstore. Type of rtc/timeoffset is not 'int' but 'str'. Signed-off-by: Kouya Shimura --- tools/python/xen/xend/XendDomainInfo.py | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -r cd511c380e03 -r 2ece8ff05ce7 tools/python/xen/xend/XendDomainInfo.py --- a/tools/python/xen/xend/XendDomainInfo.py Thu Aug 16 16:00:17 2007 +0100 +++ b/tools/python/xen/xend/XendDomainInfo.py Fri Aug 17 09:59:28 2007 +0100 @@ -981,7 +981,7 @@ class XendDomainInfo: changed = True # Check if the rtc offset has changes - if vm_details.get("rtc/timeoffset", 0) != self.info["platform"].get("rtc_timeoffset", 0): + if vm_details.get("rtc/timeoffset", "0") != self.info["platform"].get("rtc_timeoffset", "0"): self.info["platform"]["rtc_timeoffset"] = vm_details.get("rtc/timeoffset", 0) changed = True _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:15:02 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:15:02 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgU2-0008MA-Ca for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:15:02 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgUK-0006s3-Tx; Fri, 07 Sep 2007 16:15:20 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgRv-0005pl-Ps for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:12:51 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgRp-0007Kz-Bg for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:12:48 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GCNGc011704 for ; Fri, 7 Sep 2007 09:12:23 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GCUxX022855 for ; Fri, 7 Sep 2007 09:12:30 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GCUoC022854 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:12:30 -0700 Message-Id: <200709071612.l87GCUoC022854@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:12:29 -0700 From: Xen patchbot-unstable To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [xen-unstable] Fix "xm restore" require 4 times amount of memory on ia64. X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User kfraser@localhost.localdomain # Date 1187341222 -3600 # Node ID 458e8b37aec81b76d1aba137f82613cd9e584fa3 # Parent 2ece8ff05ce713a83a3d0f729eaec414f0a8d91c Fix "xm restore" require 4 times amount of memory on ia64. Signed-off-by: Masayuki Igawa --- tools/python/xen/xend/XendCheckpoint.py | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) diff -r 2ece8ff05ce7 -r 458e8b37aec8 tools/python/xen/xend/XendCheckpoint.py --- a/tools/python/xen/xend/XendCheckpoint.py Fri Aug 17 09:59:28 2007 +0100 +++ b/tools/python/xen/xend/XendCheckpoint.py Fri Aug 17 10:00:22 2007 +0100 @@ -181,7 +181,8 @@ def restore(xd, fd, dominfo = None, paus assert store_port assert console_port - nr_pfns = (dominfo.getMemoryTarget() + 3) / 4 + page_size_kib = xc.pages_to_kib(1) + nr_pfns = (dominfo.getMemoryTarget() + page_size_kib - 1) / page_size_kib # if hvm, pass mem size to calculate the store_mfn image_cfg = dominfo.info.get('image', {}) _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:15:07 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:15:07 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgU7-0008Mk-Cw for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:15:07 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgUP-0006w2-VL; Fri, 07 Sep 2007 16:15:25 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgRv-0005pm-Pt for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:12:51 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgRr-0007L9-W0 for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:12:49 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GCPXj011713 for ; Fri, 7 Sep 2007 09:12:25 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GCX6D022906 for ; Fri, 7 Sep 2007 09:12:33 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GCXwf022905 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:12:33 -0700 Message-Id: <200709071612.l87GCXwf022905@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:12:32 -0700 From: Xen patchbot-unstable To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [xen-unstable] Pull XEN_LINUX_UPDATE into mk.linux-2.6-xen so it can be shared by X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User Ian Campbell # Date 1187353733 -3600 # Node ID a1b6555a37bf9c8bfaa05dfee7ebb9cab3882ac5 # Parent bd8647a7b992c01743e89b7d0d6b258774acee53 Pull XEN_LINUX_UPDATE into mk.linux-2.6-xen so it can be shared by src.tarball and src.hg-clone Signed-off-by: Ian Campbell --- buildconfigs/mk.linux-2.6-xen | 14 ++++++++++++++ buildconfigs/src.hg-clone | 14 -------------- buildconfigs/src.tarball | 4 ++-- 3 files changed, 16 insertions(+), 16 deletions(-) diff -r bd8647a7b992 -r a1b6555a37bf buildconfigs/mk.linux-2.6-xen --- a/buildconfigs/mk.linux-2.6-xen Fri Aug 17 10:02:52 2007 +0100 +++ b/buildconfigs/mk.linux-2.6-xen Fri Aug 17 13:28:53 2007 +0100 @@ -6,6 +6,16 @@ EXTRAVERSION ?= -xen # Linux search path, will be searched for tarballs and mercurial # repositories. LINUX_SRC_PATH ?= .:.. + +# The source directory is not automatically updated to avoid blowing +# away developer's changes. If you want to automatically pull a new +# version of the Linux tree then add `XEN_LINUX_UPDATE=y' to your make +# command line. +ifeq ($(XEN_LINUX_UPDATE),y) +__XEN_LINUX_UPDATE = $(LINUX_SRCDIR)/.force-update +else +__XEN_LINUX_UPDATE = +endif XEN_LINUX_SOURCE ?= hg-clone @@ -137,3 +147,7 @@ mrproper: mrproper: rm -rf $(LINUX_SRCDIR) rm -f linux-$(LINUX_VER).tar.bz2 + +.PHONY: $(LINUX_SRCDIR)/.force-update +$(LINUX_SRCDIR)/.force-update: + @ : diff -r bd8647a7b992 -r a1b6555a37bf buildconfigs/src.hg-clone --- a/buildconfigs/src.hg-clone Fri Aug 17 10:02:52 2007 +0100 +++ b/buildconfigs/src.hg-clone Fri Aug 17 13:28:53 2007 +0100 @@ -5,16 +5,6 @@ LINUX_SRCDIR ?= linux-$(LINUX_VER)-xen.h # Repository to clone. XEN_LINUX_HGREPO ?= $$(sh buildconfigs/select-repository $(LINUX_SRCDIR) $(LINUX_SRC_PATH)) - -# The source directory is not automatically updated to avoid blowing -# away developer's changes. If you want to automatically pull a new -# version of the Linux tree then add `XEN_LINUX_UPDATE=y' to your make -# command line. -ifeq ($(XEN_LINUX_UPDATE),y) -__XEN_LINUX_UPDATE = $(LINUX_SRCDIR)/.force-update -else -__XEN_LINUX_UPDATE = -endif # Set XEN_LINUX_HGREV to update to a particlar revision. XEN_LINUX_HGREV ?= tip @@ -40,7 +30,3 @@ XEN_LINUX_HGREV ?= tip ( cd $(LINUX_SRCDIR) && $(HG) update $(XEN_LINUX_HGREV) ); \ fi touch $@ - -.PHONY: $(LINUX_SRCDIR)/.force-update -$(LINUX_SRCDIR)/.force-update: - @ : diff -r bd8647a7b992 -r a1b6555a37bf buildconfigs/src.tarball --- a/buildconfigs/src.tarball Fri Aug 17 10:02:52 2007 +0100 +++ b/buildconfigs/src.tarball Fri Aug 17 13:28:53 2007 +0100 @@ -18,11 +18,11 @@ linux-%.tar.bz2: # XXX create a pristine tree for diff -Nurp convenience ifeq ($(XEN_LINUX_TARBALL_KETCHUP),y) -%/.valid-src: +%/.valid-src: $(__XEN_LINUX_UPDATE) $(KETCHUP) -d $(@D) $(LINUX_VER) touch $@ # update timestamp to avoid rebuild else -%/.valid-src: %.tar.bz2 +%/.valid-src: $(__XEN_LINUX_UPDATE) %.tar.bz2 rm -rf tmp-linux-$* $(@D) mkdir -p tmp-linux-$* tar -C tmp-linux-$* -jxf $< _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:15:12 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:15:12 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgUC-0008Mo-70 for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:15:12 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgUU-0006zl-JV; Fri, 07 Sep 2007 16:15:30 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgRy-0005qV-M9 for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:12:55 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgRt-0007LI-QZ for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:12:51 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GCRsM011719 for ; Fri, 7 Sep 2007 09:12:27 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GCYjZ022940 for ; Fri, 7 Sep 2007 09:12:35 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GCYR6022939 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:12:34 -0700 Message-Id: <200709071612.l87GCYR6022939@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:12:34 -0700 From: Xen patchbot-unstable To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [xen-unstable] Update version number to reflect that next stable release will be 3.2.x X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User kfraser@localhost.localdomain # Date 1187361804 -3600 # Node ID ceb0115627b9e6265ab906006e062c2a6fb234cc # Parent ae923d1f50bfb896f7b5201fafd0b0aed2ae68d3 Update version number to reflect that next stable release will be 3.2.x Signed-off-by: Keir Fraser --- xen/Makefile | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -r ae923d1f50bf -r ceb0115627b9 xen/Makefile --- a/xen/Makefile Fri Aug 17 13:30:05 2007 +0100 +++ b/xen/Makefile Fri Aug 17 15:43:24 2007 +0100 @@ -1,7 +1,7 @@ # This is the correct place to edit the build version. # All other places this is stored (eg. compile.h) should be autogenerated. export XEN_VERSION = 3 -export XEN_SUBVERSION = 0 +export XEN_SUBVERSION = 2 export XEN_EXTRAVERSION ?= -unstable$(XEN_VENDORVERSION) export XEN_FULLVERSION = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION) -include xen-version _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:15:17 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:15:17 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgUH-0008Ms-CS for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:15:17 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgUZ-00073T-PS; Fri, 07 Sep 2007 16:15:35 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgRz-0005qt-Jx for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:12:55 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgRu-0007LS-Mo for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:12:52 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GCSs8011722 for ; Fri, 7 Sep 2007 09:12:28 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GCZ0U022957 for ; Fri, 7 Sep 2007 09:12:35 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GCZPC022956 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:12:35 -0700 Message-Id: <200709071612.l87GCZPC022956@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:12:35 -0700 From: Xen patchbot-unstable To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [xen-unstable] silentoldconfig seems to break automated testing, try an explicit make prepare X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User Ian Campbell # Date 1187364851 -3600 # Node ID 8ef276326042c380037bea94feaae965f6b771a8 # Parent ceb0115627b9e6265ab906006e062c2a6fb234cc silentoldconfig seems to break automated testing, try an explicit make prepare instead. Signed-off-by: Ian Campbell --- buildconfigs/mk.linux-2.6-xen | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff -r ceb0115627b9 -r 8ef276326042 buildconfigs/mk.linux-2.6-xen --- a/buildconfigs/mk.linux-2.6-xen Fri Aug 17 15:43:24 2007 +0100 +++ b/buildconfigs/mk.linux-2.6-xen Fri Aug 17 16:34:11 2007 +0100 @@ -98,12 +98,12 @@ ifneq ($(EXTRAVERSION),) ifneq ($(EXTRAVERSION),) echo "$(EXTRAVERSION)" >$(LINUX_DIR)/localversion-xen endif - $(MAKE) -C $(LINUX_SRCDIR) ARCH=$(LINUX_ARCH) silentoldconfig O=$$(/bin/pwd)/$(LINUX_DIR) + $(MAKE) -C $(LINUX_SRCDIR) ARCH=$(LINUX_ARCH) oldconfig O=$$(/bin/pwd)/$(LINUX_DIR) @if [ ! -f $(LINUX_DIR)/Makefile ] ; then \ - echo "*****************************************"; \ - echo "silentoldconfig did not create a Makefile"; \ + echo "***********************************"; \ + echo "oldconfig did not create a Makefile"; \ echo "Generating $(LINUX_DIR)/Makefile "; \ - echo "*****************************************"; \ + echo "***********************************"; \ ( echo "# Automatically generated: don't edit"; \ echo ""; \ echo "VERSION = 2"; \ @@ -125,6 +125,7 @@ endif echo " \$$(MAKE) -C \$$(KERNELSRC) O=\$$(KERNELOUTPUT) \$$@"; \ ) > $(LINUX_DIR)/Makefile ; \ fi + $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) prepare .PHONY: prep prep: $(LINUX_DIR)/include/linux/autoconf.h _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:15:22 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:15:22 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgUM-0008Mv-1H for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:15:22 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgUe-00077G-Gz; Fri, 07 Sep 2007 16:15:40 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgRz-0005qu-Mx for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:12:55 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgRv-0007LU-LN for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:12:53 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GCT1p011725 for ; Fri, 7 Sep 2007 09:12:29 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GCapY022974 for ; Fri, 7 Sep 2007 09:12:36 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GCaxO022973 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:12:36 -0700 Message-Id: <200709071612.l87GCaxO022973@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:12:36 -0700 From: Xen patchbot-unstable To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [xen-unstable] [IA64] Fix a memory allocation bug in MCA X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User Alex Williamson # Date 1184527976 21600 # Node ID 2796311c6a5537cff38bba20b74a1e64a1d9e909 # Parent f536eb8576eeb7363212911b02fbaff4918172df [IA64] Fix a memory allocation bug in MCA Signed-off-by: Kazuhiro Suzuki --- xen/arch/ia64/linux-xen/mca.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -r f536eb8576ee -r 2796311c6a55 xen/arch/ia64/linux-xen/mca.c --- a/xen/arch/ia64/linux-xen/mca.c Wed Jul 11 11:32:30 2007 -0600 +++ b/xen/arch/ia64/linux-xen/mca.c Sun Jul 15 13:32:56 2007 -0600 @@ -184,7 +184,7 @@ static ia64_state_log_t ia64_state_log[I #define IA64_LOG_ALLOCATE(it, size) \ do { \ unsigned int pageorder; \ - pageorder = get_order_from_bytes(sizeof(struct ia64_mca_cpu)); \ + pageorder = get_order_from_bytes(size); \ ia64_state_log[it].isl_log[IA64_LOG_CURR_INDEX(it)] = \ (ia64_err_rec_t *)alloc_xenheap_pages(pageorder); \ ia64_state_log[it].isl_log[IA64_LOG_NEXT_INDEX(it)] = \ _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:15:27 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:15:27 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgUR-0008My-9s for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:15:27 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgUj-0007BE-SU; Fri, 07 Sep 2007 16:15:45 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgS0-0005r2-Sh for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:12:57 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgRr-0007L7-4s for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:12:54 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GCPHe011710 for ; Fri, 7 Sep 2007 09:12:25 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GCW42022889 for ; Fri, 7 Sep 2007 09:12:32 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GCWSg022888 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:12:32 -0700 Message-Id: <200709071612.l87GCWSg022888@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:12:31 -0700 From: Xen patchbot-unstable To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [xen-unstable] Add sharing-check for blktap X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User kfraser@localhost.localdomain # Date 1187341372 -3600 # Node ID bd8647a7b992c01743e89b7d0d6b258774acee53 # Parent ac7a8c9d620262fd8d193130e3e6f7b2d3be95db Add sharing-check for blktap Signed-off-by: Takanori Kasai Signed-off-by: Hirofumi Tsujimura --- tools/examples/blktap | 57 +++++++++++++++++++++++++++++++++++++++++ tools/examples/block | 42 ------------------------------ tools/examples/block-common.sh | 43 ++++++++++++++++++++++++++++++ 3 files changed, 100 insertions(+), 42 deletions(-) diff -r ac7a8c9d6202 -r bd8647a7b992 tools/examples/blktap --- a/tools/examples/blktap Fri Aug 17 10:01:40 2007 +0100 +++ b/tools/examples/blktap Fri Aug 17 10:02:52 2007 +0100 @@ -7,6 +7,57 @@ dir=$(dirname "$0") . "$dir/block-common.sh" findCommand "$@" + +## +# check_blktap_sharing file mode +# +# Perform the sharing check for the given blktap and mode. +# +check_blktap_sharing() +{ + local file="$1" + local mode="$2" + + local base_path="$XENBUS_BASE_PATH/$XENBUS_TYPE" + for dom in $(xenstore-list "$base_path") + do + for dev in $(xenstore-list "$base_path/$dom") + do + params=$(xenstore_read "$base_path/$dom/$dev/params" | cut -d: -f2) + if [ "$file" = "$params" ] + then + + if [ "$mode" = 'w' ] + then + if ! same_vm "$dom" + then + echo 'guest' + return + fi + else + local m=$(xenstore_read "$base_path/$dom/$dev/mode") + m=$(canonicalise_mode "$m") + + if [ "$m" = 'w' ] + then + if ! same_vm "$dom" + then + echo 'guest' + return + fi + fi + fi + fi + done + done + + echo 'ok' +} + +FRONTEND_ID=$(xenstore_read "$XENBUS_PATH/frontend-id") +FRONTEND_UUID=$(xenstore_read "/local/domain/$FRONTEND_ID/vm") +mode=$(xenstore_read "$XENBUS_PATH/mode") +mode=$(canonicalise_mode "$mode") t=$(xenstore_read_default "$XENBUS_PATH/type" 'MISSING') if [ -n "$t" ] @@ -20,6 +71,12 @@ fi fi file=$(readlink -f "$p") || ebusy "$p does not exist." +if [ "$mode" != '!' ] +then + result=$(check_blktap_sharing "$file" "$mode") + [ "$result" = 'ok' ] || ebusy "$file already in use by other domain" +fi + if [ "$command" = 'add' ] then [ -e "$file" ] || { ebusy $file does not exist; } diff -r ac7a8c9d6202 -r bd8647a7b992 tools/examples/block --- a/tools/examples/block Fri Aug 17 10:01:40 2007 +0100 +++ b/tools/examples/block Fri Aug 17 10:02:52 2007 +0100 @@ -14,32 +14,6 @@ expand_dev() { ;; esac echo -n $dev -} - - -## -# canonicalise_mode mode -# -# Takes the given mode, which may be r, w, ro, rw, w!, or rw!, or variations -# thereof, and canonicalises them to one of -# -# 'r': perform checks for a new read-only mount; -# 'w': perform checks for a read-write mount; or -# '!': perform no checks at all. -# -canonicalise_mode() -{ - local mode="$1" - - if ! expr index "$mode" 'w' >/dev/null - then - echo 'r' - elif ! expr index "$mode" '!' >/dev/null - then - echo 'w' - else - echo '!' - fi } @@ -123,22 +97,6 @@ check_sharing() done echo 'ok' -} - - -same_vm() -{ - local otherdom="$1" - # Note that othervm can be MISSING here, because Xend will be racing with - # the hotplug scripts -- the entries in /local/domain can be removed by - # Xend before the hotplug scripts have removed the entry in - # /local/domain/0/backend/. In this case, we want to pretend that the - # VM is the same as FRONTEND_UUID, because that way the 'sharing' will be - # allowed. - local othervm=$(xenstore_read_default "/local/domain/$otherdom/vm" \ - "$FRONTEND_UUID") - - [ "$FRONTEND_UUID" = "$othervm" ] } diff -r ac7a8c9d6202 -r bd8647a7b992 tools/examples/block-common.sh --- a/tools/examples/block-common.sh Fri Aug 17 10:01:40 2007 +0100 +++ b/tools/examples/block-common.sh Fri Aug 17 10:02:52 2007 +0100 @@ -71,3 +71,46 @@ write_dev() { success } + + +## +# canonicalise_mode mode +# +# Takes the given mode, which may be r, w, ro, rw, w!, or rw!, or variations +# thereof, and canonicalises them to one of +# +# 'r': perform checks for a new read-only mount; +# 'w': perform checks for a read-write mount; or +# '!': perform no checks at all. +# +canonicalise_mode() +{ + local mode="$1" + + if ! expr index "$mode" 'w' >/dev/null + then + echo 'r' + elif ! expr index "$mode" '!' >/dev/null + then + echo 'w' + else + echo '!' + fi +} + + +same_vm() +{ + local otherdom="$1" + # Note that othervm can be MISSING here, because Xend will be racing with + # the hotplug scripts -- the entries in /local/domain can be removed by + # Xend before the hotplug scripts have removed the entry in + # /local/domain/0/backend/. In this case, we want to pretend that the + # VM is the same as FRONTEND_UUID, because that way the 'sharing' will be + # allowed. + local othervm=$(xenstore_read_default "/local/domain/$otherdom/vm" \ + "$FRONTEND_UUID") + + [ "$FRONTEND_UUID" = "$othervm" ] +} + _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:15:31 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:15:31 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgUU-0008N2-VU for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:15:31 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgUn-0007Ei-Gg; Fri, 07 Sep 2007 16:15:49 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgS1-0005rD-R5 for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:12:58 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgRx-0007Li-Dd for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:12:55 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GCVUL011731 for ; Fri, 7 Sep 2007 09:12:31 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GCc4J023008 for ; Fri, 7 Sep 2007 09:12:38 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GCcmk023007 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:12:38 -0700 Message-Id: <200709071612.l87GCcmk023007@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:12:37 -0700 From: Xen patchbot-unstable To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [xen-unstable] [IA64] Pass the bare LSAPIC ID to dom0 X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User Alex Williamson # Date 1184882213 21600 # Node ID e487cc2491715b6ef86de2af2217d1e6bae0f6be # Parent 834ac63f4894443dd825ef0d9ef478fb48416d43 [IA64] Pass the bare LSAPIC ID to dom0 This patch fixes an issue which dom0 cannot boot with dom0_max_vcpus. Currently LSAPIC IDs are create by xen, but ACPI SRAT table is the bare table. So on some boxes node_cpuid[].phys_id are different from cpu_physical_id()s, and we cannot boot dom0. Instead, pass the bare LSAPIC ID to dom0. Signed-off-by: Akio Takebe --- xen/arch/ia64/xen/dom_fw_dom0.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff -r 834ac63f4894 -r e487cc249171 xen/arch/ia64/xen/dom_fw_dom0.c --- a/xen/arch/ia64/xen/dom_fw_dom0.c Sun Jul 15 13:40:47 2007 -0600 +++ b/xen/arch/ia64/xen/dom_fw_dom0.c Thu Jul 19 15:56:53 2007 -0600 @@ -55,12 +55,16 @@ acpi_update_lsapic(acpi_table_entry_head enable = 0; if (lsapic->flags.enabled && enable) { - printk("enable lsapic entry: 0x%lx\n", (u64) lsapic); - lsapic->id = lsapic_nbr; - lsapic->eid = 0; + if (lsapic->id == 0) { + lsapic->id = lsapic_nbr; + lsapic->eid = 0; + } lsapic_nbr++; + printk("enable lsapic entry: 0x%lx (id:eid=%x:%x)\n", + (u64)lsapic, lsapic->id, lsapic->eid); } else if (lsapic->flags.enabled) { - printk("DISABLE lsapic entry: 0x%lx\n", (u64) lsapic); + printk("DISABLE lsapic entry: 0x%lx (id:eid=%x:%x)\n", + (u64)lsapic, lsapic->id, lsapic->eid); lsapic->flags.enabled = 0; lsapic->id = 0; lsapic->eid = 0; _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:15:37 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:15:37 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgUb-0008N5-4w for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:15:37 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgUt-0007Jl-KY; Fri, 07 Sep 2007 16:15:55 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgS2-0005rT-PC for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:12:58 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgRw-0007LZ-KR for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:12:56 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GCUnh011728 for ; Fri, 7 Sep 2007 09:12:30 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GCb9r022991 for ; Fri, 7 Sep 2007 09:12:37 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GCbES022990 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:12:37 -0700 Message-Id: <200709071612.l87GCbES022990@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:12:37 -0700 From: Xen patchbot-unstable To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [xen-unstable] [IA64] Speedup ptc.e emulation X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User Alex Williamson # Date 1184528447 21600 # Node ID 834ac63f4894443dd825ef0d9ef478fb48416d43 # Parent 2796311c6a5537cff38bba20b74a1e64a1d9e909 [IA64] Speedup ptc.e emulation This patch makes ptc.e emulation faster. It defers the initialization of collision chain area of VHPT. Also removes an unused field from struct thash_cb. Signed-off-by: Kouya Shimura --- xen/arch/ia64/vmx/vtlb.c | 49 +++++++++++++++++--------------------------- xen/include/asm-ia64/vmmu.h | 2 - 2 files changed, 20 insertions(+), 31 deletions(-) diff -r 2796311c6a55 -r 834ac63f4894 xen/arch/ia64/vmx/vtlb.c --- a/xen/arch/ia64/vmx/vtlb.c Sun Jul 15 13:32:56 2007 -0600 +++ b/xen/arch/ia64/vmx/vtlb.c Sun Jul 15 13:40:47 2007 -0600 @@ -36,19 +36,10 @@ thash_data_t *__alloc_chain(thash_cb_t *); -static void cch_mem_init(thash_cb_t *hcb) -{ - int num; - thash_data_t *p; - - hcb->cch_freelist = p = hcb->cch_buf; - num = (hcb->cch_sz/sizeof(thash_data_t))-1; - do{ - p->next =p+1; - p++; - num--; - }while(num); - p->next = NULL; +static inline void cch_mem_init(thash_cb_t *hcb) +{ + hcb->cch_free_idx = 0; + hcb->cch_freelist = NULL; } static thash_data_t *cch_alloc(thash_cb_t *hcb) @@ -56,8 +47,16 @@ static thash_data_t *cch_alloc(thash_cb_ thash_data_t *p; if ( (p = hcb->cch_freelist) != NULL ) { hcb->cch_freelist = p->next; - } - return p; + return p; + } + if (hcb->cch_free_idx < hcb->cch_sz/sizeof(thash_data_t)) { + p = &((thash_data_t *)hcb->cch_buf)[hcb->cch_free_idx++]; + p->page_flags = 0; + p->itir = 0; + p->next = NULL; + return p; + } + return NULL; } /* @@ -668,13 +667,12 @@ void thash_init(thash_cb_t *hcb, u64 sz) void thash_init(thash_cb_t *hcb, u64 sz) { int num; - thash_data_t *head, *p; + thash_data_t *head; hcb->pta.val = (unsigned long)hcb->hash; hcb->pta.vf = 1; hcb->pta.ve = 1; hcb->pta.size = sz; - hcb->cch_rec_head = hcb->hash; head=hcb->hash; num = (hcb->hash_sz/sizeof(thash_data_t)); @@ -686,16 +684,7 @@ void thash_init(thash_cb_t *hcb, u64 sz) head++; num--; }while(num); - - hcb->cch_freelist = p = hcb->cch_buf; - num = hcb->cch_sz / sizeof(thash_data_t); - do{ - p->page_flags = 0; - p->itir = 0; - p->next =p+1; - p++; - num--; - }while(num); - - (p - 1)->next = NULL; -} + + hcb->cch_free_idx = 0; + hcb->cch_freelist = NULL; +} diff -r 2796311c6a55 -r 834ac63f4894 xen/include/asm-ia64/vmmu.h --- a/xen/include/asm-ia64/vmmu.h Sun Jul 15 13:32:56 2007 -0600 +++ b/xen/include/asm-ia64/vmmu.h Sun Jul 15 13:40:47 2007 -0600 @@ -196,8 +196,8 @@ typedef struct thash_cb { u64 hash_sz; // size of above data. void *cch_buf; // base address of collision chain. u64 cch_sz; // size of above data. + u64 cch_free_idx; // index of free entry. thash_data_t *cch_freelist; - thash_data_t *cch_rec_head; // cch recycle header PTA pta; } thash_cb_t; _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:15:41 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:15:41 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgUf-0008N8-8w for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:15:41 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgUx-0007NR-Me; Fri, 07 Sep 2007 16:15:59 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgS3-0005rY-HF for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:13:00 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgRz-0007Lu-Vu for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:12:57 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GCXIF011740 for ; Fri, 7 Sep 2007 09:12:33 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GCfR7023059 for ; Fri, 7 Sep 2007 09:12:41 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GCftc023058 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:12:41 -0700 Message-Id: <200709071612.l87GCftc023058@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:12:40 -0700 From: Xen patchbot-unstable To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [xen-unstable] [IA64] Enable Xen VGA autodetection X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User Alex Williamson # Date 1185390782 21600 # Node ID 6a89339b81d0e08ced2d9f455024ad929bbbb18e # Parent 1ef9dc28810dc748bdbb21231061ff5f861bd04f [IA64] Enable Xen VGA autodetection This patch enables console autodetection for VGA on systems implementing a PCDP table. With this, setting the primary console to VGA or serial will cause both Xen and Dom0 output to go to the right place automatically (overridden by manually specifying a console=). This shouldn't help or hurt systems without an HCDP/PCDP table. Signed-off-by: Alex Williamson --- xen/arch/ia64/xen/pcdp.c | 64 ++++++++++++++++++++++++++++--------------- xen/arch/ia64/xen/xensetup.c | 3 -- 2 files changed, 42 insertions(+), 25 deletions(-) diff -r 1ef9dc28810d -r 6a89339b81d0 xen/arch/ia64/xen/pcdp.c --- a/xen/arch/ia64/xen/pcdp.c Wed Jul 25 13:09:27 2007 -0600 +++ b/xen/arch/ia64/xen/pcdp.c Wed Jul 25 13:13:02 2007 -0600 @@ -137,7 +137,7 @@ setup_pcdp_irq(struct pcdp *pcdp, struct } static int __init -setup_serial_console(struct pcdp *pcdp, struct pcdp_uart *uart) +setup_serial_console(struct pcdp_uart *uart) { ns16550_com1.baud = uart->baud ? uart->baud : BAUD_AUTO; @@ -145,11 +145,43 @@ setup_serial_console(struct pcdp *pcdp, if (uart->bits) ns16550_com1.data_bits = uart->bits; - setup_pcdp_irq(pcdp, uart); - - return 0; -} -#else + setup_pcdp_irq(efi.hcdp, uart); + + /* Hide the HCDP table from dom0, xencons will be the console */ + efi.hcdp = NULL; + + return 0; +} + +static int __init +setup_vga_console(struct pcdp_vga *vga) +{ +#ifdef CONFIG_VGA + /* + * There was no console= in the original cmdline, and the PCDP + * is telling us VGA is the primary console. We can call + * cmdline_parse() manually to make things appear automagic. + * + * NB - cmdline_parse() expects the first part of the cmdline + * to be the image name. So "pcdp" below is just filler. + */ + char *console_cmdline = "pcdp console=vga"; + + cmdline_parse(console_cmdline); + + /* + * Leave efi.hcdp intact since dom0 will take ownership. + * vga=keep is handled in start_kernel(). + */ + + return 0; +#else + return -ENODEV; +#endif +} + +#else /* XEN */ + static int __init setup_serial_console(struct pcdp_uart *uart) { @@ -184,33 +216,27 @@ setup_vga_console(struct pcdp_vga *vga) return -ENODEV; #endif } -#endif +#endif /* XEN */ int __init efi_setup_pcdp_console(char *cmdline) { struct pcdp *pcdp; struct pcdp_uart *uart; -#ifndef XEN struct pcdp_device *dev, *end; -#endif int i, serial = 0; pcdp = efi.hcdp; if (!pcdp) return -ENODEV; -#ifndef XEN printk(KERN_INFO "PCDP: v%d at 0x%lx\n", pcdp->rev, __pa(pcdp)); -#endif if (strstr(cmdline, "console=hcdp")) { if (pcdp->rev < 3) serial = 1; } else if (strstr(cmdline, "console=")) { -#ifndef XEN printk(KERN_INFO "Explicit \"console=\"; ignoring PCDP\n"); -#endif return -ENODEV; } @@ -220,17 +246,12 @@ efi_setup_pcdp_console(char *cmdline) for (i = 0, uart = pcdp->uart; i < pcdp->num_uarts; i++, uart++) { if (uart->flags & PCDP_UART_PRIMARY_CONSOLE || serial) { if (uart->type == PCDP_CONSOLE_UART) { -#ifndef XEN return setup_serial_console(uart); -#else - return setup_serial_console(pcdp, uart); -#endif } } } -#ifndef XEN end = (struct pcdp_device *) ((u8 *) pcdp + pcdp->length); for (dev = (struct pcdp_device *) (pcdp->uart + pcdp->num_uarts); dev < end; @@ -241,7 +262,6 @@ efi_setup_pcdp_console(char *cmdline) } } } -#endif - - return -ENODEV; -} + + return -ENODEV; +} diff -r 1ef9dc28810d -r 6a89339b81d0 xen/arch/ia64/xen/xensetup.c --- a/xen/arch/ia64/xen/xensetup.c Wed Jul 25 13:09:27 2007 -0600 +++ b/xen/arch/ia64/xen/xensetup.c Wed Jul 25 13:13:02 2007 -0600 @@ -561,9 +561,6 @@ printk("num_online_cpus=%d, max_cpus=%d\ } } serial_init_postirq(); - - /* Hide the HCDP table from dom0 */ - efi.hcdp = NULL; } expose_p2m_init(); _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:15:46 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:15:46 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgUk-0008NB-Hw for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:15:46 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgV3-0007RY-4O; Fri, 07 Sep 2007 16:16:05 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgS4-0005ry-Uu for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:13:01 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgRz-0007Lp-2c for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:12:58 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GCWLo011737 for ; Fri, 7 Sep 2007 09:12:32 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GCeuL023042 for ; Fri, 7 Sep 2007 09:12:40 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GCeVG023041 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:12:40 -0700 Message-Id: <200709071612.l87GCeVG023041@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:12:39 -0700 From: Xen patchbot-unstable To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [xen-unstable] [IA64] Fix VGA console X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User Alex Williamson # Date 1185390567 21600 # Node ID 1ef9dc28810dc748bdbb21231061ff5f861bd04f # Parent fcdd56b88acdc34a392a6807fcaa6005fedf6d82 [IA64] Fix VGA console VGA console support seems to have gotten broken somewhere along the way. On current bits, console=vga doesn't seem to do anything. This patch adds the necessary console info to get it working again. Signed-off-by: Alex Williamson --- xen/arch/ia64/xen/xensetup.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+) diff -r fcdd56b88acd -r 1ef9dc28810d xen/arch/ia64/xen/xensetup.c --- a/xen/arch/ia64/xen/xensetup.c Thu Jul 19 20:02:04 2007 -0600 +++ b/xen/arch/ia64/xen/xensetup.c Wed Jul 25 13:09:27 2007 -0600 @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -310,6 +311,20 @@ void __init start_kernel(void) ns16550_init(1, &ns16550_com2); } serial_init_preirq(); + +#ifdef CONFIG_VGA + /* Plug in a default VGA mode */ + vga_console_info.video_type = XEN_VGATYPE_TEXT_MODE_3; + vga_console_info.u.text_mode_3.font_height = 16; /* generic VGA? */ + vga_console_info.u.text_mode_3.cursor_x = + ia64_boot_param->console_info.orig_x; + vga_console_info.u.text_mode_3.cursor_y = + ia64_boot_param->console_info.orig_y; + vga_console_info.u.text_mode_3.rows = + ia64_boot_param->console_info.num_rows; + vga_console_info.u.text_mode_3.columns = + ia64_boot_param->console_info.num_cols; +#endif init_console(); set_printk_prefix("(XEN) "); _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:15:52 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:15:52 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgUq-0008NE-7w for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:15:52 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgV8-0007Vk-CK; Fri, 07 Sep 2007 16:16:10 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgS5-0005s0-H2 for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:13:01 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgS0-0007Lz-TJ for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:12:59 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GCYsd011743 for ; Fri, 7 Sep 2007 09:12:34 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GCgPm023076 for ; Fri, 7 Sep 2007 09:12:42 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GCfT8023075 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:12:41 -0700 Message-Id: <200709071612.l87GCfT8023075@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:12:41 -0700 From: Xen patchbot-unstable To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [xen-unstable] [IA64] Remove useless code X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User Alex Williamson # Date 1185482101 21600 # Node ID 37833b33ae779151a9d88edd15b93d0d3f56d0fc # Parent 6a89339b81d0e08ced2d9f455024ad929bbbb18e [IA64] Remove useless code Signed-off-by: Kouya Shimura --- xen/arch/ia64/vmx/vtlb.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff -r 6a89339b81d0 -r 37833b33ae77 xen/arch/ia64/vmx/vtlb.c --- a/xen/arch/ia64/vmx/vtlb.c Wed Jul 25 13:13:02 2007 -0600 +++ b/xen/arch/ia64/vmx/vtlb.c Thu Jul 26 14:35:01 2007 -0600 @@ -530,10 +530,10 @@ int thash_purge_and_insert(VCPU *v, u64 { u64 ps;//, va; u64 phy_pte; - ia64_rr vrr, mrr; + ia64_rr mrr; int ret = 0; + ps = itir_ps(itir); - vcpu_get_rr(current, ifa, &vrr.rrval); mrr.rrval = ia64_get_rr(ifa); if(VMX_DOMAIN(v)){ phy_pte = translate_phy_pte(v, &pte, itir, ifa); _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:15:57 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:15:57 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgUu-0008NH-T7 for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:15:57 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgVD-0007Zu-EJ; Fri, 07 Sep 2007 16:16:15 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgS6-0005sB-6f for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:13:02 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgRs-0007LF-Tm for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:12:59 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GCQtR011716 for ; Fri, 7 Sep 2007 09:12:26 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GCY9O022923 for ; Fri, 7 Sep 2007 09:12:34 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GCYvY022922 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:12:34 -0700 Message-Id: <200709071612.l87GCYvY022922@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:12:33 -0700 From: Xen patchbot-unstable To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [xen-unstable] Linux 2.6.18 doesn't create include/linux/autoconf.h as a side effect X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User Ian Campbell # Date 1187353805 -3600 # Node ID ae923d1f50bfb896f7b5201fafd0b0aed2ae68d3 # Parent a1b6555a37bf9c8bfaa05dfee7ebb9cab3882ac5 Linux 2.6.18 doesn't create include/linux/autoconf.h as a side effect of make oldconfig. Use silentoldconfig instead. Signed-off-by: Ian Campbell --- buildconfigs/mk.linux-2.6-xen | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff -r a1b6555a37bf -r ae923d1f50bf buildconfigs/mk.linux-2.6-xen --- a/buildconfigs/mk.linux-2.6-xen Fri Aug 17 13:28:53 2007 +0100 +++ b/buildconfigs/mk.linux-2.6-xen Fri Aug 17 13:30:05 2007 +0100 @@ -98,12 +98,12 @@ ifneq ($(EXTRAVERSION),) ifneq ($(EXTRAVERSION),) echo "$(EXTRAVERSION)" >$(LINUX_DIR)/localversion-xen endif - $(MAKE) -C $(LINUX_SRCDIR) ARCH=$(LINUX_ARCH) oldconfig O=$$(/bin/pwd)/$(LINUX_DIR) + $(MAKE) -C $(LINUX_SRCDIR) ARCH=$(LINUX_ARCH) silentoldconfig O=$$(/bin/pwd)/$(LINUX_DIR) @if [ ! -f $(LINUX_DIR)/Makefile ] ; then \ - echo "***********************************"; \ - echo "oldconfig did not create a Makefile"; \ + echo "*****************************************"; \ + echo "silentoldconfig did not create a Makefile"; \ echo "Generating $(LINUX_DIR)/Makefile "; \ - echo "***********************************"; \ + echo "*****************************************"; \ ( echo "# Automatically generated: don't edit"; \ echo ""; \ echo "VERSION = 2"; \ _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:16:02 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:16:02 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgUz-0008NN-SG for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:16:02 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgVI-0007dw-37; Fri, 07 Sep 2007 16:16:20 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgS6-0005sI-UD for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:13:03 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgRy-0007Lm-Bf for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:13:00 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GCWQS011734 for ; Fri, 7 Sep 2007 09:12:32 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GCd4W023025 for ; Fri, 7 Sep 2007 09:12:39 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GCdF4023024 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:12:39 -0700 Message-Id: <200709071612.l87GCdF4023024@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:12:38 -0700 From: Xen patchbot-unstable To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [xen-unstable] [IA64] Revert ia64/xen-unstable.hg 15561:e487cc249171 X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User Alex Williamson # Date 1184896924 21600 # Node ID fcdd56b88acdc34a392a6807fcaa6005fedf6d82 # Parent e487cc2491715b6ef86de2af2217d1e6bae0f6be [IA64] Revert ia64/xen-unstable.hg 15561:e487cc249171 This is causing problems, we need to rethink it. Signed-off-by: Alex Williamson --- xen/arch/ia64/xen/dom_fw_dom0.c | 12 ++++-------- 1 files changed, 4 insertions(+), 8 deletions(-) diff -r e487cc249171 -r fcdd56b88acd xen/arch/ia64/xen/dom_fw_dom0.c --- a/xen/arch/ia64/xen/dom_fw_dom0.c Thu Jul 19 15:56:53 2007 -0600 +++ b/xen/arch/ia64/xen/dom_fw_dom0.c Thu Jul 19 20:02:04 2007 -0600 @@ -55,16 +55,12 @@ acpi_update_lsapic(acpi_table_entry_head enable = 0; if (lsapic->flags.enabled && enable) { - if (lsapic->id == 0) { - lsapic->id = lsapic_nbr; - lsapic->eid = 0; - } + printk("enable lsapic entry: 0x%lx\n", (u64) lsapic); + lsapic->id = lsapic_nbr; + lsapic->eid = 0; lsapic_nbr++; - printk("enable lsapic entry: 0x%lx (id:eid=%x:%x)\n", - (u64)lsapic, lsapic->id, lsapic->eid); } else if (lsapic->flags.enabled) { - printk("DISABLE lsapic entry: 0x%lx (id:eid=%x:%x)\n", - (u64)lsapic, lsapic->id, lsapic->eid); + printk("DISABLE lsapic entry: 0x%lx\n", (u64) lsapic); lsapic->flags.enabled = 0; lsapic->id = 0; lsapic->eid = 0; _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:16:07 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:16:07 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgV4-0008Nx-Va for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:16:07 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgVN-0007jQ-CG; Fri, 07 Sep 2007 16:16:25 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgS7-0005sO-NU for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:13:03 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgRq-0007L5-8U for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:13:01 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GCOoh011707 for ; Fri, 7 Sep 2007 09:12:24 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GCVsZ022872 for ; Fri, 7 Sep 2007 09:12:31 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GCVka022871 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:12:31 -0700 Message-Id: <200709071612.l87GCVka022871@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:12:30 -0700 From: Xen patchbot-unstable To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on (none) X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) X-SA-Exim-Scanned: Yes (on lists.xensource.com) Subject: [Xen-changelog] [xen-unstable] xend: Fix vbd detach. X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User kfraser@localhost.localdomain # Date 1187341300 -3600 # Node ID ac7a8c9d620262fd8d193130e3e6f7b2d3be95db # Parent 458e8b37aec81b76d1aba137f82613cd9e584fa3 xend: Fix vbd detach. Signed-off-by: Masaki Kanno --- tools/python/xen/xend/XendDomainInfo.py | 3 +++ 1 files changed, 3 insertions(+) diff -r 458e8b37aec8 -r ac7a8c9d6202 tools/python/xen/xend/XendDomainInfo.py --- a/tools/python/xen/xend/XendDomainInfo.py Fri Aug 17 10:00:22 2007 +0100 +++ b/tools/python/xen/xend/XendDomainInfo.py Fri Aug 17 10:01:40 2007 +0100 @@ -607,6 +607,9 @@ class XendDomainInfo: _, dev_info = sxprs[dev] else: # 'vbd' or 'tap' dev_info = self.getDeviceInfo_vbd(dev) + # To remove the UUID of the device from refs, + # deviceClass must be always 'vbd'. + deviceClass = 'vbd' if dev_info is None: return rc _______________________________________________ Xen-changelog mailing list Xen-changelog@lists.xensource.com http://lists.xensource.com/xen-changelog From xen-changelog-bounces@lists.xensource.com Fri Sep 07 09:16:16 2007 Return-path: Envelope-to: www-data@colo.xensource.com Delivery-date: Fri, 07 Sep 2007 09:16:16 -0700 Received: from vm04-bcn-london.deploy.xenoserver.org ([217.147.82.229] helo=lists.xensource.com) by lists.xensource.com with esmtp (Exim 4.43) id 1ITgVD-0008O0-9z for www-data@colo.xensource.com; Fri, 07 Sep 2007 09:16:16 -0700 Received: from localhost ([127.0.0.1] helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgVV-0007qC-OL; Fri, 07 Sep 2007 16:16:33 +0000 Received: from [192.168.0.10] (helo=lists.xensource.com) by host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1ITgS8-0005sh-Eq for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:13:04 +0000 Received: from relay.colo.xensource.com ([70.42.241.98]) by lists.xensource.com with esmtp (Exim 4.50) id 1ITgS3-0007MB-QR for xen-changelog@lists.xensource.com; Fri, 07 Sep 2007 16:13:01 +0000 Received: from xenbits.xensource.com (xenbits.colo.xensource.com [70.42.241.107]) by relay.colo.xensource.com (8.13.1/8.13.1) with ESMTP id l87GCbCN011746 for ; Fri, 7 Sep 2007 09:12:37 -0700 Received: from xenbits.xensource.com (localhost.localdomain [127.0.0.1]) by xenbits.xensource.com (8.13.1/8.13.1) with ESMTP id l87GCiZi023093 for ; Fri, 7 Sep 2007 09:12:44 -0700 Received: (from xen@localhost) by xenbits.xensource.com (8.13.1/8.13.1/Submit) id l87GCi5h023092 for xen-changelog@lists.xensource.com; Fri, 7 Sep 2007 09:12:44 -0700 Message-Id: <200709071612.l87GCi5h023092@xenbits.xensource.com> Date: Fri, 07 Sep 2007 09:12:42 -0700 From: Xen patchbot-unstable To: xen-changelog@lists.xensource.com X-SA-Exim-Connect-IP: 70.42.241.98 X-SA-Exim-Mail-From: xen@xensource.com X-SA-Exim-Scanned: No (on lists.xensource.com); Message bigger than SAmaxbody (256000) Subject: [Xen-changelog] [xen-unstable] merge with xen-unstable.hg X-BeenThere: xen-changelog@lists.xensource.com X-Mailman-Version: 2.1.5 Precedence: list Reply-To: xen-devel@lists.xensource.com List-Id: BK change log List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-changelog-bounces@lists.xensource.com Errors-To: xen-changelog-bounces@lists.xensource.com # HG changeset patch # User Alex Williamson # Date 1185545716 21600 # Node ID 4492a0285bae734ee18f6acbb6b3f9c80f153be7 # Parent 37833b33ae779151a9d88edd15b93d0d3f56d0fc # Parent 5682f899c7ae7fa945085aaded75cd1220fd8d17 merge with xen-unstable.hg --- xen/arch/x86/mm/hap/support.c | 334 -- xen/include/xen/shadow.h | 23 .hgignore | 7 Config.mk | 8 buildconfigs/enable-xen-config | 4 buildconfigs/mk.linux-2.6 | 14 buildconfigs/mk.linux-2.6-git | 2 buildconfigs/mk.linux-2.6-mm | 14 buildconfigs/mk.linux-2.6-rc | 14 buildconfigs/mk.linux-2.6-tip | 14 docs/man/xm.pod.1 | 167 - docs/xen-api/xenapi-datamodel-graph.dot | 4 docs/xen-api/xenapi-datamodel.tex | 1375 ++++++++-- tools/examples/vtpm-common.sh | 56 tools/firmware/hvmloader/acpi/dsdt.asl | 21 tools/firmware/hvmloader/acpi/dsdt.c | 25 tools/firmware/hvmloader/config.h | 2 tools/firmware/hvmloader/hvmloader.c | 12 tools/firmware/rombios/rombios.c | 48 tools/ioemu/hw/cirrus_vga.c | 2 tools/ioemu/hw/ide.c | 3 tools/ioemu/hw/rtl8139.c | 11 tools/ioemu/keymaps.c | 16 tools/ioemu/target-i386-dm/exec-dm.c | 6 tools/ioemu/target-i386-dm/helper2.c | 43 tools/ioemu/vl.c | 38 tools/ioemu/vl.h | 1 tools/ioemu/vnc.c | 92 tools/ioemu/xenstore.c | 98 tools/libxc/xc_domain.c | 21 tools/libxc/xc_linux.c | 2 tools/libxc/xenctrl.h | 14 tools/libxen/include/xen/api/xen_acmpolicy.h | 117 tools/libxen/include/xen/api/xen_vdi.h | 13 tools/libxen/include/xen/api/xen_vif.h | 14 tools/libxen/include/xen/api/xen_vm.h | 14 tools/libxen/include/xen/api/xen_xspolicy.h | 271 + tools/libxen/include/xen/api/xen_xspolicy_decl.h | 31 tools/libxen/src/xen_acmpolicy.c | 234 + tools/libxen/src/xen_vdi.c | 39 tools/libxen/src/xen_vif.c | 39 tools/libxen/src/xen_vm.c | 45 tools/libxen/src/xen_xspolicy.c | 327 ++ tools/python/xen/lowlevel/acm/acm.c | 9 tools/python/xen/util/acmpolicy.py | 98 tools/python/xen/util/security.py | 146 - tools/python/xen/xend/XendAPI.py | 48 tools/python/xen/xend/XendCheckpoint.py | 6 tools/python/xen/xend/XendConfig.py | 28 tools/python/xen/xend/XendDevices.py | 3 tools/python/xen/xend/XendDomain.py | 57 tools/python/xen/xend/XendDomainInfo.py | 52 tools/python/xen/xend/XendPIF.py | 10 tools/python/xen/xend/XendVDI.py | 1 tools/python/xen/xend/XendXSPolicyAdmin.py | 21 tools/python/xen/xend/balloon.py | 8 tools/python/xen/xend/image.py | 42 tools/python/xen/xend/server/SrvServer.py | 3 tools/python/xen/xend/server/netif.py | 43 tools/python/xen/xend/server/tpmif.py | 5 tools/python/xen/xm/activatepolicy.py | 86 tools/python/xen/xm/addlabel.py | 176 + tools/python/xen/xm/cfgbootpolicy.py | 77 tools/python/xen/xm/create.dtd | 10 tools/python/xen/xm/create.py | 25 tools/python/xen/xm/getlabel.py | 71 tools/python/xen/xm/getpolicy.py | 94 tools/python/xen/xm/labels.py | 37 tools/python/xen/xm/loadpolicy.py | 32 tools/python/xen/xm/main.py | 115 tools/python/xen/xm/makepolicy.py | 14 tools/python/xen/xm/resources.py | 33 tools/python/xen/xm/rmlabel.py | 101 tools/python/xen/xm/setpolicy.py | 117 tools/python/xen/xm/xenapi_create.py | 68 tools/security/policies/security_policy.xsd | 7 tools/vtpm_manager/util/hashtable_itr.c | 8 tools/xcutils/xc_save.c | 29 tools/xenfb/vncfb.c | 110 tools/xenstore/talloc.c | 18 tools/xenstore/xenstored_core.c | 144 - tools/xenstore/xenstored_domain.c | 14 tools/xenstore/xenstored_watch.c | 5 tools/xenstore/xsls.c | 37 tools/xm-test/lib/XmTestLib/XenAPIDomain.py | 4 tools/xm-test/lib/XmTestLib/acm.py | 52 tools/xm-test/tests/security-acm/01_security-acm_basic.py | 24 tools/xm-test/tests/security-acm/07_security-acm_pol_update.py | 303 ++ tools/xm-test/tests/security-acm/08_security-acm_xapi.py | 354 ++ tools/xm-test/tests/security-acm/09_security-acm_pol_update.py | 427 +++ tools/xm-test/tests/security-acm/Makefile.am | 5 tools/xm-test/tests/security-acm/xm-test-new-security_policy.xml | 97 tools/xm-test/tests/vtpm/01_vtpm-list_pos.py | 8 tools/xm-test/tests/vtpm/02_vtpm-cat_pcrs.py | 9 tools/xm-test/tests/vtpm/03_vtpm-susp_res.py | 16 tools/xm-test/tests/vtpm/04_vtpm-loc_migr.py | 15 tools/xm-test/tests/vtpm/05_vtpm-loc_migr.py | 15 tools/xm-test/tests/vtpm/06_vtpm-susp_res_pcrs.py | 20 tools/xm-test/tests/vtpm/07_vtpm-mig_pcrs.py | 19 tools/xm-test/tests/vtpm/08_vtpm-mig_pcrs.py | 19 tools/xm-test/tests/vtpm/vtpm_utils.py | 14 unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h | 9 unmodified_drivers/linux-2.6/netfront/Kbuild | 1 xen/Makefile | 16 xen/acm/acm_chinesewall_hooks.c | 190 - xen/acm/acm_core.c | 29 xen/acm/acm_policy.c | 309 +- xen/acm/acm_simple_type_enforcement_hooks.c | 397 +- xen/arch/ia64/linux-xen/perfmon.c | 2 xen/arch/ia64/xen/oprofile/perfmon.c | 11 xen/arch/powerpc/Rules.mk | 4 xen/arch/powerpc/exceptions.h | 3 xen/arch/powerpc/mpic_init.c | 4 xen/arch/powerpc/of-devtree.c | 2 xen/arch/powerpc/of-devwalk.c | 8 xen/arch/powerpc/of_handler/ofh.c | 24 xen/arch/powerpc/of_handler/papr.S | 2 xen/arch/powerpc/ofd_fixup.c | 13 xen/arch/powerpc/papr/Makefile | 1 xen/arch/powerpc/papr/h_perfmon.c | 158 + xen/arch/powerpc/powerpc64/domain.c | 46 xen/arch/powerpc/powerpc64/exceptions.S | 25 xen/arch/powerpc/sysctl.c | 1 xen/arch/x86/acpi/Makefile | 1 xen/arch/x86/acpi/boot.c | 93 xen/arch/x86/acpi/power.c | 282 ++ xen/arch/x86/acpi/suspend.c | 73 xen/arch/x86/acpi/wakeup_prot.S | 267 + xen/arch/x86/apic.c | 2 xen/arch/x86/boot/Makefile | 3 xen/arch/x86/boot/head.S | 2 xen/arch/x86/boot/wakeup.S | 212 + xen/arch/x86/cpu/common.c | 11 xen/arch/x86/cpu/intel_cacheinfo.c | 4 xen/arch/x86/crash.c | 4 xen/arch/x86/dmi_scan.c | 1 xen/arch/x86/domain.c | 72 xen/arch/x86/domain_build.c | 3 xen/arch/x86/domctl.c | 40 xen/arch/x86/e820.c | 71 xen/arch/x86/hvm/hvm.c | 6 xen/arch/x86/hvm/svm/svm.c | 20 xen/arch/x86/hvm/svm/vmcb.c | 10 xen/arch/x86/hvm/vlapic.c | 9 xen/arch/x86/hvm/vmx/vmcs.c | 219 + xen/arch/x86/hvm/vmx/vmx.c | 109 xen/arch/x86/hvm/vpt.c | 8 xen/arch/x86/i8259.c | 6 xen/arch/x86/io_apic.c | 3 xen/arch/x86/irq.c | 33 xen/arch/x86/machine_kexec.c | 4 xen/arch/x86/mm.c | 23 xen/arch/x86/mm/hap/Makefile | 10 xen/arch/x86/mm/hap/guest_walk.c | 181 + xen/arch/x86/mm/hap/hap.c | 383 +- xen/arch/x86/mm/hap/private.h | 55 xen/arch/x86/mm/shadow/multi.c | 46 xen/arch/x86/nmi.c | 2 xen/arch/x86/oprofile/nmi_int.c | 83 xen/arch/x86/platform_hypercall.c | 5 xen/arch/x86/setup.c | 4 xen/arch/x86/shutdown.c | 2 xen/arch/x86/smp.c | 2 xen/arch/x86/smpboot.c | 340 ++ xen/arch/x86/x86_32/traps.c | 2 xen/arch/x86/x86_64/mm.c | 3 xen/arch/x86/x86_64/platform_hypercall.c | 3 xen/arch/x86/x86_64/traps.c | 2 xen/common/compat/kernel.c | 1 xen/common/domctl.c | 2 xen/common/grant_table.c | 13 xen/common/kernel.c | 4 xen/common/keyhandler.c | 1 xen/common/memory.c | 8 xen/common/page_alloc.c | 60 xen/common/sysctl.c | 14 xen/common/xenoprof.c | 58 xen/drivers/acpi/tables.c | 3 xen/drivers/char/ns16550.c | 4 xen/drivers/char/serial.c | 4 xen/include/acm/acm_core.h | 7 xen/include/acm/acm_hooks.h | 62 xen/include/asm-ia64/xenoprof.h | 2 xen/include/asm-powerpc/domain.h | 21 xen/include/asm-powerpc/numa.h | 1 xen/include/asm-powerpc/papr.h | 1 xen/include/asm-powerpc/processor.h | 138 - xen/include/asm-powerpc/reg_defs.h | 27 xen/include/asm-powerpc/xenoprof.h | 76 xen/include/asm-x86/acpi.h | 20 xen/include/asm-x86/config.h | 12 xen/include/asm-x86/desc.h | 5 xen/include/asm-x86/domain.h | 10 xen/include/asm-x86/hap.h | 3 xen/include/asm-x86/hvm/hvm.h | 21 xen/include/asm-x86/hvm/support.h | 1 xen/include/asm-x86/hvm/vmx/vmcs.h | 9 xen/include/asm-x86/page.h | 15 xen/include/asm-x86/processor.h | 18 xen/include/asm-x86/smp.h | 15 xen/include/asm-x86/system.h | 2 xen/include/asm-x86/xenoprof.h | 4 xen/include/public/acm.h | 5 xen/include/public/platform.h | 12 xen/include/public/sysctl.h | 13 xen/include/xen/acpi.h | 1 xen/include/xen/cpumask.h | 2 xen/include/xen/irq.h | 10 xen/include/xen/mm.h | 5 xen/include/xen/paging.h | 26 xen/include/xen/xenoprof.h | 2 211 files changed, 9151 insertions(+), 2580 deletions(-) diff -r 37833b33ae77 -r 4492a0285bae .hgignore --- a/.hgignore Thu Jul 26 14:35:01 2007 -0600 +++ b/.hgignore Fri Jul 27 08:15:16 2007 -0600 @@ -62,14 +62,11 @@ ^extras/mini-os/h/xen-public$ ^extras/mini-os/mini-os.*$ ^install/.*$ -^linux-[^/]*-native/.*$ -^linux-[^/]*-xen/.*$ -^linux-[^/]*-xen0/.*$ -^linux-[^/]*-xenU/.*$ ^linux-[^/]*-paravirt/.*$ -^linux-[^/]*-mm/.*$ +^linux-2.6[^/]*/.*$ ^linux-[^/]*-rc/.*$ ^linux-[^/]*-tip/.*$ +^linux-[^/]*-git/.*$ ^linux-[^/]*\.patch$ ^mkddbxen$ ^netbsd-[^/]*-tools/.*$ diff -r 37833b33ae77 -r 4492a0285bae Config.mk --- a/Config.mk Thu Jul 26 14:35:01 2007 -0600 +++ b/Config.mk Fri Jul 27 08:15:16 2007 -0600 @@ -81,14 +81,6 @@ CFLAGS += $(foreach i, $(EXTRA_INCLUDES) # n - Do not build the Xen ACM framework ACM_SECURITY ?= n -# If ACM_SECURITY = y and no boot policy file is installed, -# then the ACM defaults to the security policy set by -# ACM_DEFAULT_SECURITY_POLICY -# Supported models are: -# ACM_NULL_POLICY -# ACM_CHINESE_WALL_AND_SIMPLE_TYPE_ENFORCEMENT_POLICY -ACM_DEFAULT_SECURITY_POLICY ?= ACM_NULL_POLICY - # Optional components XENSTAT_XENTOP ?= y VTPM_TOOLS ?= n diff -r 37833b33ae77 -r 4492a0285bae buildconfigs/enable-xen-config --- a/buildconfigs/enable-xen-config Thu Jul 26 14:35:01 2007 -0600 +++ b/buildconfigs/enable-xen-config Fri Jul 27 08:15:16 2007 -0600 @@ -28,9 +28,13 @@ setopt CONFIG_PARAVIRT y setopt CONFIG_PARAVIRT y setopt CONFIG_XEN y setopt CONFIG_VMI y +setopt CONFIG_KVM y +setopt CONFIG_KVM_INTEL y +setopt CONFIG_KVM_AMD y setopt CONFIG_LGUEST n setopt CONFIG_XEN_BLKDEV_FRONTEND y setopt CONFIG_XEN_NETDEV_FRONTEND y setopt CONFIG_HVC_XEN y +setopt CONFIG_NUMA n exit 0 diff -r 37833b33ae77 -r 4492a0285bae buildconfigs/mk.linux-2.6 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildconfigs/mk.linux-2.6 Fri Jul 27 08:15:16 2007 -0600 @@ -0,0 +1,14 @@ +XEN_LINUX_SOURCE ?= tarball +LINUX_VER ?= 2.6 + +XEN_LINUX_TARBALL_KETCHUP := y + +IMAGE_TARGET ?= vmlinux bzImage + +XEN_LINUX_ALLOW_INTERFACE_MISMATCH := y + +XEN_LINUX_CONFIG_UPDATE := buildconfigs/enable-xen-config + +EXTRAVERSION ?= + +include buildconfigs/mk.linux-2.6-xen diff -r 37833b33ae77 -r 4492a0285bae buildconfigs/mk.linux-2.6-git --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildconfigs/mk.linux-2.6-git Fri Jul 27 08:15:16 2007 -0600 @@ -0,0 +1,2 @@ +LINUX_VER ?= 2.6-git +include buildconfigs/mk.linux-2.6 diff -r 37833b33ae77 -r 4492a0285bae buildconfigs/mk.linux-2.6-mm --- a/buildconfigs/mk.linux-2.6-mm Thu Jul 26 14:35:01 2007 -0600 +++ b/buildconfigs/mk.linux-2.6-mm Fri Jul 27 08:15:16 2007 -0600 @@ -1,14 +1,2 @@ XEN_LINUX_SOURCE ?= tarball -XEN_LINUX_SOURCE ?= tarball LINUX_VER ?= 2.6-mm - -XEN_LINUX_TARBALL_KETCHUP := y - -IMAGE_TARGET ?= vmlinux bzImage - -XEN_LINUX_ALLOW_INTERFACE_MISMATCH := y - -XEN_LINUX_CONFIG_UPDATE := buildconfigs/enable-xen-config - -EXTRAVERSION ?= - -include buildconfigs/mk.linux-2.6-xen +include buildconfigs/mk.linux-2.6 diff -r 37833b33ae77 -r 4492a0285bae buildconfigs/mk.linux-2.6-rc --- a/buildconfigs/mk.linux-2.6-rc Thu Jul 26 14:35:01 2007 -0600 +++ b/buildconfigs/mk.linux-2.6-rc Fri Jul 27 08:15:16 2007 -0600 @@ -1,14 +1,2 @@ XEN_LINUX_SOURCE ?= tarball -XEN_LINUX_SOURCE ?= tarball LINUX_VER ?= 2.6-rc - -XEN_LINUX_TARBALL_KETCHUP := y - -IMAGE_TARGET ?= vmlinux bzImage - -XEN_LINUX_ALLOW_INTERFACE_MISMATCH := y - -XEN_LINUX_CONFIG_UPDATE := buildconfigs/enable-xen-config - -EXTRAVERSION ?= - -include buildconfigs/mk.linux-2.6-xen +include buildconfigs/mk.linux-2.6 diff -r 37833b33ae77 -r 4492a0285bae buildconfigs/mk.linux-2.6-tip --- a/buildconfigs/mk.linux-2.6-tip Thu Jul 26 14:35:01 2007 -0600 +++ b/buildconfigs/mk.linux-2.6-tip Fri Jul 27 08:15:16 2007 -0600 @@ -1,14 +1,2 @@ XEN_LINUX_SOURCE ?= tarball -XEN_LINUX_SOURCE ?= tarball LINUX_VER ?= 2.6-tip - -XEN_LINUX_TARBALL_KETCHUP := y - -IMAGE_TARGET ?= vmlinux bzImage - -XEN_LINUX_ALLOW_INTERFACE_MISMATCH := y - -XEN_LINUX_CONFIG_UPDATE := buildconfigs/enable-xen-config - -EXTRAVERSION ?= - -include buildconfigs/mk.linux-2.6-xen +include buildconfigs/mk.linux-2.6 diff -r 37833b33ae77 -r 4492a0285bae docs/man/xm.pod.1 --- a/docs/man/xm.pod.1 Thu Jul 26 14:35:01 2007 -0600 +++ b/docs/man/xm.pod.1 Fri Jul 27 08:15:16 2007 -0600 @@ -822,13 +822,15 @@ described under "Configuring Security" b described under "Configuring Security" below. There, you will find also examples of each subcommand described here. -=item B I - -Compiles the XML source representation of the security I. It -creates a mapping (.map) as well as a binary (.bin) version of the -policy. The compiled policy can be loaded into Xen with the -B subcommand or can be configured to be loaded at boot -time with the B subcommand. +=item B ACM I I<[--load|--boot]> + +Makes the given ACM policy available to xend as a I. +The policy is compiled and a mapping (.map) as well as a binary (.bin) +version of the policy is created. If the option I<--load> is provided +the policy is loaded into Xen. If the option I<--boot> is provided the +system is configure to be loaded with the policy at boot time. If these +options are not provided with the B subcommand, the +B subcommand provides this functionality. =over 4 @@ -843,18 +845,26 @@ global policy root directory. =back -=item B I - -Loads the binary representation of the I into Xen. The binary -representation can be created with the B subcommand. - -=item B I [I] - -Configures I as the boot policy for Xen. It copies the binary -policy representation into the /boot directory and adds a module line -specifying the binary policy to the /boot/grub/menu.lst file. If your -boot configuration includes multiple Xen boot titles, then use the -I parameter to specify a unique part of the proper title. +=item B I<[--load|--boot]> + +Activates the xend-managed policy by loading it into Xen using the +I<--load> option or configures the system to boot with the +xend-managed policy during the next reboot as a result of the +I<--boot> option. The latter is only supported if the system is booted +with the grub boot loader and the default boot title is modified. +It copies the binary policy representation into the /boot directory and +adds a module line specifying the binary policy to the /boot/grub/menu.lst +or /boot/grub/grub.conf file. + +=item B [--dumpxml] + +Displays information about the current xend-managed policy, such as +name and type of the policy, the uuid xend has assigned to it on the +local system, the version of the XML representation and the status +of the policy, such as whether it is currently loaded into Xen or +whether the policy is automatically loaded during system boot. With +the I<--dumpxml> option, the XML representation of the policy is +displayed. =item B @@ -869,28 +879,47 @@ is 'dom'. The labels are arranged in alp =item B I