From: Ingo Molnar <mingo@elte.hu>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Zachary Amsden <zach@vmware.com>,
xen-devel@lists.xensource.com,
Ian Pratt <ian.pratt@xensource.com>,
virtualization@lists.osdl.org,
Rusty Russell <rusty@rustcorp.com.au>,
linux-kernel@vger.kernel.org, Adrian Bunk <bunk@stusta.de>,
Chris Wright <chrisw@sous-sol.org>, Andi Kleen <ak@muc.de>,
Andrew Morton <akpm@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Subject: Re: [patch 20/26] Xen-paravirt_ops: Core Xen implementation
Date: Fri, 16 Mar 2007 10:14:11 +0100 [thread overview]
Message-ID: <20070316091411.GF23174@elte.hu> (raw)
In-Reply-To: <20070301232528.812011702@goop.org>
* Jeremy Fitzhardinge <jeremy@goop.org> wrote:
> Core Xen Implementation
>
> This patch is a rollup of all the core pieces of the Xen
> implementation, including booting, memory management, interrupts, time
> and so on.
> --- a/arch/i386/kernel/head.S
> +++ b/arch/i386/kernel/head.S
> @@ -535,6 +535,10 @@ unhandled_paravirt:
> ud2
> #endif
>
> +#ifdef CONFIG_XEN
> +#include "../xen/xen-head.S"
> +#endif
i'd suggest to remove the #ifdef and push it into xen-head.S.
> /*
> * BSS section
> */
> -.section ".bss.page_aligned","w"
> +.section ".bss.page_aligned","wa"
why is this done?
> ENTRY(swapper_pg_dir)
> + .align PAGE_SIZE_asm
> .fill 1024,4,0
does the native kernel lose memory here?
> @@ -437,9 +437,9 @@ static unsigned long native_store_tr(voi
>
> static void native_load_tls(struct thread_struct *t, unsigned int cpu)
> {
> -#define C(i) get_cpu_gdt_table(cpu)[GDT_ENTRY_TLS_MIN + i] = t->tls_array[i]
> - C(0); C(1); C(2);
> -#undef C
> + get_cpu_gdt_table(cpu)[GDT_ENTRY_TLS_MIN + 0] = t->tls_array[0];
> + get_cpu_gdt_table(cpu)[GDT_ENTRY_TLS_MIN + 1] = t->tls_array[1];
> + get_cpu_gdt_table(cpu)[GDT_ENTRY_TLS_MIN + 2] = t->tls_array[2];
> }
this is a cleanup unrelated to the purpose of the patch.
> +static void xen_safe_halt(void)
> +{
> + stop_hz_timer();
> + /* Blocking includes an implicit local_irq_enable(). */
> + if (HYPERVISOR_sched_op(SCHEDOP_block, 0) != 0)
> + BUG();
> + start_hz_timer();
> +}
change this to tick_nohz_stop_sched_tick()/restart_sched_tick() instead.
> +static void xen_halt(void)
> +{
> +#if 0
> + if (irqs_disabled())
> + HYPERVISOR_vcpu_op(VCPUOP_down, smp_processor_id(), NULL);
> +#endif
hm?
> + op->arg1.linear_addr = arbitrary_virt_to_machine((unsigned long)addr).maddr;
80+ chars line. (there are more instances of this throughout the patch)
> + for (va = dtr->address, f = 0;
> + va < dtr->address + size;
> + va += PAGE_SIZE, f++) {
> + frames[f] = virt_to_mfn(va);
> + make_lowmem_page_readonly((void *)va);
> + }
coding style.
> + /* This is used very early, so we can't rely on per-cpu data
> + being set up, so no multicalls */
comment coding style. (there are instances of this throughout the patch)
> + spin_lock(&lock);
> + for(in = out = 0; in < count; in++) {
missing whitespace.
> + if (HYPERVISOR_update_descriptor(virt_to_machine(dt + entry*8).maddr,
80+ chars.
> +static void xen_set_iopl_mask(unsigned mask)
> +{
> +#if 0
> + struct physdev_set_iopl set_iopl;
> +
> + /* Force the change at ring 0. */
> + set_iopl.iopl = (mask == 0) ? 1 : (mask >> 12) & 3;
> + HYPERVISOR_physdev_op(PHYSDEVOP_set_iopl, &set_iopl);
> +#endif
hm?
> + }
> +
> + write_pda(xen.cr3, cr3);
> +
> +
> + {
unnecessary newline.
> +static struct irq_chip xen_dynamic_chip __read_mostly = {
> + .name = "xen-virq",
> + .mask = disable_dynirq,
> + .unmask = enable_dynirq,
> + .ack = ack_dynirq,
> + .set_affinity = set_affinity_irq,
> + .retrigger = retrigger_dynirq,
> +};
nicely done! :-)
> +void xen_set_pte(pte_t *ptep, pte_t pte)
> +{
> +#if 1
> + struct mmu_update u;
> +
> + u.ptr = virt_to_machine(ptep).maddr;
> + u.val = pte_val_ma(pte);
> + if (HYPERVISOR_mmu_update(&u, 1, NULL, DOMID_SELF) < 0)
> + BUG();
> +#else
> + ptep->pte_high = pte.pte_high;
> + smp_wmb();
> + ptep->pte_low = pte.pte_low;
> +#endif
hm?
> + pgd = swapper_pg_dir + pgd_index(vaddr);
> + if (pgd_none(*pgd)) {
> + BUG();
> + return;
hm?
> +void xen_pte_clear(struct mm_struct *mm, unsigned long addr,pte_t *ptep)
> +{
> +#if 1
> + ptep->pte_low = 0;
> + smp_wmb();
> + ptep->pte_high = 0;
> +#else
> + set_64bit((u64 *)ptep, 0);
> +#endif
hm?
> +unsigned long xen_pmd_val(pmd_t pmd)
> +{
> + BUG();
> + return 0;
> +}
make it noret.
> +pmd_t xen_make_pmd(unsigned long pmd)
> +{
> + BUG();
> + return __pmd(0);
> +}
ditto.
> +static void xen_timer_interrupt_hook(void)
> +{
> + runstate->time[RUNSTATE_offline] -
> + __get_cpu_var(processed_stolen_time);
NACK for now, for the reasons outlined in the 'stolen time' thread.
Stolen time accounting is a concept only related to the scheduler tick,
it's not a concept that should leak into normal timer interrupt
concepts.
> + /* System-wide jiffy work. */
> + ticks = 0;
> + while(delta > NS_PER_TICK) {
> + delta -= NS_PER_TICK;
> + processed_system_time += NS_PER_TICK;
> + ticks++;
> + }
> + do_timer(ticks);
that should be updated to clockevents. (i suspect it already is?)
> +
> +#if 0
> + if (unlikely((mfn >> machine_to_phys_order) != 0))
> + return max_mapnr;
> +#endif
hm?
Ingo
next prev parent reply other threads:[~2007-03-16 9:14 UTC|newest]
Thread overview: 201+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-01 23:24 [patch 00/26] Xen-paravirt_ops: Xen guest implementation for paravirt_ops interface Jeremy Fitzhardinge
2007-03-01 23:24 ` [patch 01/26] Xen-paravirt_ops: Fix typo in sync_constant_test_bit()s name Jeremy Fitzhardinge
2007-03-16 9:45 ` Ingo Molnar
2007-03-01 23:24 ` [patch 02/26] Xen-paravirt_ops: ignore vgacon if hardware not present Jeremy Fitzhardinge
2007-03-16 9:45 ` Ingo Molnar
2007-03-01 23:24 ` [patch 03/26] Xen-paravirt_ops: use paravirt_nop to consistently mark no-op operations Jeremy Fitzhardinge
2007-03-16 9:44 ` Ingo Molnar
2007-03-16 18:43 ` Jeremy Fitzhardinge
2007-03-16 19:49 ` Chris Wright
2007-03-16 20:00 ` Jeremy Fitzhardinge
2007-03-16 21:59 ` Chris Wright
2007-03-16 22:10 ` Jeremy Fitzhardinge
2007-03-16 22:18 ` Chris Wright
2007-03-01 23:24 ` [patch 04/26] Xen-paravirt_ops: Add pagetable accessors to pack and unpack pagetable entries Jeremy Fitzhardinge
2007-03-16 9:38 ` Ingo Molnar
2007-03-16 18:42 ` Jeremy Fitzhardinge
2007-03-01 23:24 ` [patch 05/26] Xen-paravirt_ops: paravirt_ops: hooks to set up initial pagetable Jeremy Fitzhardinge
2007-03-16 9:33 ` Ingo Molnar
2007-03-16 18:39 ` Jeremy Fitzhardinge
2007-03-16 19:35 ` Steven Rostedt
2007-03-17 9:47 ` Rusty Russell
2007-03-01 23:24 ` [patch 06/26] Xen-paravirt_ops: paravirt_ops: allocate a fixmap slot Jeremy Fitzhardinge
2007-03-16 9:31 ` Ingo Molnar
2007-03-01 23:24 ` [patch 07/26] Xen-paravirt_ops: Allow paravirt backend to choose kernel PMD sharing Jeremy Fitzhardinge
2007-03-16 9:31 ` Ingo Molnar
2007-03-01 23:24 ` [patch 08/26] Xen-paravirt_ops: add hooks to intercept mm creation and destruction Jeremy Fitzhardinge
2007-03-16 9:30 ` Ingo Molnar
2007-03-16 17:38 ` Jeremy Fitzhardinge
2007-03-01 23:24 ` [patch 09/26] Xen-paravirt_ops: remove HAVE_ARCH_MM_LIFETIME, define no-op architecture implementations Jeremy Fitzhardinge
2007-03-16 9:27 ` Ingo Molnar
2007-03-01 23:24 ` [patch 10/26] Xen-paravirt_ops: rename struct paravirt_patch to paravirt_patch_site for clarity Jeremy Fitzhardinge
2007-03-01 23:24 ` [patch 11/26] Xen-paravirt_ops: Use patch site IDs computed from offset in paravirt_ops structure Jeremy Fitzhardinge
2007-03-01 23:24 ` [patch 12/26] Xen-paravirt_ops: Fix patch site clobbers to include return register Jeremy Fitzhardinge
2007-03-02 0:45 ` Zachary Amsden
2007-03-02 0:49 ` Jeremy Fitzhardinge
2007-03-02 0:52 ` Zachary Amsden
2007-03-02 0:58 ` Jeremy Fitzhardinge
2007-03-02 1:18 ` Zachary Amsden
2007-03-16 9:26 ` Ingo Molnar
2007-03-16 17:37 ` Jeremy Fitzhardinge
2007-03-01 23:24 ` [patch 13/26] Xen-paravirt_ops: Consistently wrap paravirt ops callsites to make them patchable Jeremy Fitzhardinge
2007-03-16 9:24 ` Ingo Molnar
2007-03-16 9:33 ` David Miller
2007-03-16 9:57 ` Ingo Molnar
2007-03-16 19:16 ` Jeremy Fitzhardinge
2007-03-16 20:38 ` Jeremy Fitzhardinge
2007-03-17 10:33 ` Rusty Russell
2007-03-18 7:33 ` David Miller
2007-03-18 7:59 ` Jeremy Fitzhardinge
2007-03-18 12:08 ` Andi Kleen
2007-03-18 15:58 ` Jeremy Fitzhardinge
2007-03-18 17:04 ` Andi Kleen
2007-03-18 17:29 ` Jeremy Fitzhardinge
2007-03-18 19:30 ` Andi Kleen
2007-03-18 23:46 ` Jeremy Fitzhardinge
2007-03-19 10:57 ` Andi Kleen
2007-03-19 17:58 ` Jeremy Fitzhardinge
2007-03-19 19:08 ` David Miller
2007-03-19 20:59 ` Andi Kleen
2007-03-20 3:18 ` Linus Torvalds
2007-03-20 3:47 ` David Miller
2007-03-20 4:19 ` Eric W. Biederman
2007-03-20 13:28 ` Andi Kleen
2007-03-20 16:25 ` Eric W. Biederman
2007-03-20 17:42 ` Andi Kleen
2007-03-20 16:52 ` Linus Torvalds
2007-03-20 18:03 ` Andi Kleen
2007-03-20 17:27 ` Linus Torvalds
2007-03-20 19:21 ` Andi Kleen
2007-03-20 18:49 ` Linus Torvalds
2007-03-20 20:23 ` Andi Kleen
2007-03-20 21:39 ` Alan Cox
2007-03-20 21:49 ` [Xen-devel] " Andi Kleen
2007-03-20 23:51 ` Linus Torvalds
2007-03-20 23:43 ` Linus Torvalds
2007-03-21 6:08 ` Andrew Morton
2007-03-20 16:12 ` Chuck Ebbert
2007-03-20 1:23 ` Zachary Amsden
2007-03-20 1:45 ` Jeremy Fitzhardinge
2007-03-19 2:47 ` Rusty Russell
2007-03-19 18:25 ` Eric W. Biederman
2007-03-19 18:38 ` Linus Torvalds
2007-03-19 18:44 ` Linus Torvalds
2007-03-19 19:33 ` Jeremy Fitzhardinge
2007-03-20 0:01 ` Rusty Russell
2007-03-20 2:00 ` Zachary Amsden
2007-03-20 4:20 ` Rusty Russell
2007-03-20 5:54 ` Jeremy Fitzhardinge
2007-03-20 11:33 ` Andreas Kleen
2007-03-20 15:09 ` Linus Torvalds
2007-03-20 15:58 ` Eric W. Biederman
2007-03-20 16:06 ` Linus Torvalds
2007-03-20 16:31 ` Jeremy Fitzhardinge
2007-03-20 22:09 ` Zachary Amsden
2007-03-21 0:24 ` Linus Torvalds
2007-03-21 2:53 ` Zachary Amsden
2007-03-21 2:15 ` Linus Torvalds
2007-03-21 3:43 ` Zachary Amsden
2007-03-20 22:43 ` Matt Mackall
2007-03-20 23:08 ` Zachary Amsden
2007-03-20 23:33 ` Jeremy Fitzhardinge
2007-03-21 1:14 ` Zachary Amsden
2007-03-20 23:41 ` Matt Mackall
2007-03-21 0:20 ` Jeremy Fitzhardinge
2007-03-20 19:28 ` Andi Kleen
2007-03-20 19:54 ` Zachary Amsden
2007-03-20 20:02 ` Andi Kleen
2007-03-20 16:26 ` Jeremy Fitzhardinge
2007-03-20 22:41 ` Rusty Russell
2007-03-20 17:00 ` Ingo Molnar
2007-03-21 0:03 ` Paul Mackerras
2007-04-12 23:16 ` David Miller
2007-03-19 18:41 ` Chris Wright
2007-03-19 19:10 ` Jeremy Fitzhardinge
2007-03-19 19:46 ` David Miller
2007-03-19 20:06 ` Jeremy Fitzhardinge
2007-03-19 23:42 ` Andi Kleen
2007-03-16 17:36 ` Jeremy Fitzhardinge
2007-03-16 23:29 ` Zachary Amsden
2007-03-17 0:40 ` Jeremy Fitzhardinge
2007-03-17 9:10 ` Zachary Amsden
2007-03-17 9:26 ` Rusty Russell
2007-03-01 23:24 ` [patch 14/26] Xen-paravirt_ops: add common patching machinery Jeremy Fitzhardinge
2007-03-16 9:20 ` Ingo Molnar
2007-03-17 9:15 ` Rusty Russell
2007-03-01 23:24 ` [patch 15/26] Xen-paravirt_ops: Add apply_to_page_range() which applies a function to a pte range Jeremy Fitzhardinge
2007-03-16 9:19 ` Ingo Molnar
2007-03-16 16:47 ` Chris Wright
2007-03-16 17:08 ` Jeremy Fitzhardinge
2007-03-01 23:24 ` [patch 16/26] Xen-paravirt_ops: Allocate and free vmalloc areas Jeremy Fitzhardinge
2007-03-16 9:16 ` Ingo Molnar
2007-03-16 17:05 ` Jeremy Fitzhardinge
2007-03-01 23:25 ` [patch 17/26] Xen-paravirt_ops: Add nosegneg capability to the vsyscall page notes Jeremy Fitzhardinge
2007-03-16 9:15 ` Ingo Molnar
2007-03-16 21:26 ` Roland McGrath
2007-03-16 21:56 ` Jeremy Fitzhardinge
2007-03-16 22:20 ` Roland McGrath
2007-03-01 23:25 ` [patch 18/26] Xen-paravirt_ops: Add XEN config options Jeremy Fitzhardinge
2007-03-16 9:14 ` Ingo Molnar
2007-03-16 17:04 ` Jeremy Fitzhardinge
2007-03-01 23:25 ` [patch 19/26] Xen-paravirt_ops: Add Xen interface header files Jeremy Fitzhardinge
2007-03-01 23:25 ` [patch 20/26] Xen-paravirt_ops: Core Xen implementation Jeremy Fitzhardinge
2007-03-16 9:14 ` Ingo Molnar [this message]
2007-03-16 12:00 ` Christoph Hellwig
2007-03-16 16:33 ` Chris Wright
2007-03-16 16:44 ` Jeremy Fitzhardinge
2007-03-16 16:57 ` Chris Wright
2007-03-16 17:12 ` Chris Wright
2007-03-19 18:05 ` Eric W. Biederman
2007-03-19 18:13 ` Jeremy Fitzhardinge
2007-03-19 18:15 ` Chris Wright
2007-03-17 9:13 ` Rusty Russell
2007-03-18 7:03 ` [Xen-devel] " Jeremy Fitzhardinge
2007-03-01 23:25 ` [patch 21/26] Xen-paravirt_ops: Use the hvc console infrastructure for Xen console Jeremy Fitzhardinge
2007-03-16 8:54 ` Ingo Molnar
2007-03-16 9:28 ` [Xen-devel] " Keir Fraser
[not found] ` <C22013C9.B9E6%keir@xensource.com>
2007-03-16 9:58 ` Ingo Molnar
2007-03-16 10:31 ` [Xen-devel] " Keir Fraser
2007-03-16 10:31 ` Keir Fraser
[not found] ` <C2202295.BA49%keir@xensource.com>
2007-03-16 11:41 ` Andrew Morton
2007-03-16 11:58 ` Keir Fraser
2007-03-16 11:58 ` Keir Fraser
2007-03-16 17:02 ` Jeremy Fitzhardinge
2007-03-01 23:25 ` [patch 22/26] Xen-paravirt_ops: Add early printk support via hvc console Jeremy Fitzhardinge
2007-03-16 8:52 ` Ingo Molnar
2007-03-01 23:25 ` [patch 23/26] Xen-paravirt_ops: Add Xen grant table support Jeremy Fitzhardinge
2007-03-16 8:51 ` Ingo Molnar
2007-03-16 17:00 ` Jeremy Fitzhardinge
2007-03-01 23:25 ` [patch 24/26] Xen-paravirt_ops: Add the Xenbus sysfs and virtual device hotplug driver Jeremy Fitzhardinge
2007-03-16 8:47 ` Ingo Molnar
2007-03-16 16:18 ` Chris Wright
2007-03-16 16:19 ` Ingo Molnar
2007-03-16 16:40 ` Chris Wright
2007-03-16 17:53 ` Greg KH
2007-03-16 16:57 ` Jeremy Fitzhardinge
2007-03-01 23:25 ` [patch 25/26] Xen-paravirt_ops: Add Xen virtual block device driver Jeremy Fitzhardinge
2007-03-01 23:25 ` [patch 26/26] Xen-paravirt_ops: Add the Xen virtual network " Jeremy Fitzhardinge
2007-03-02 0:42 ` Stephen Hemminger
2007-03-02 0:56 ` Jeremy Fitzhardinge
2007-03-02 1:30 ` [RFC] Arp announce (for Xen) Stephen Hemminger
2007-03-02 8:46 ` Keir Fraser
2007-03-02 12:54 ` Andi Kleen
2007-03-02 14:08 ` jamal
2007-03-02 18:08 ` Chris Wright
2007-03-06 4:35 ` David Miller
2007-03-06 18:51 ` [RFC] ARP notify option Stephen Hemminger
2007-03-06 19:04 ` Jeremy Fitzhardinge
2007-03-06 19:07 ` Chris Wright
2007-03-06 21:18 ` Chris Friesen
2007-03-06 22:52 ` Stephen Hemminger
2007-03-07 6:42 ` Pekka Savola
2007-03-07 17:00 ` Stephen Hemminger
2007-03-02 1:21 ` [patch 26/26] Xen-paravirt_ops: Add the Xen virtual network device driver Christoph Hellwig
2007-03-02 1:26 ` Chris Wright
2007-03-16 8:42 ` [patch 00/26] Xen-paravirt_ops: Xen guest implementation for paravirt_ops interface Ingo Molnar
2007-03-16 16:55 ` Jeremy Fitzhardinge
2007-03-16 9:21 ` Ingo Molnar
2007-03-16 17:26 ` Jeremy Fitzhardinge
2007-03-16 18:59 ` Christoph Hellwig
2007-03-16 19:26 ` Jeremy Fitzhardinge
-- strict thread matches above, loose matches on Subject: below --
2007-02-27 8:13 Jeremy Fitzhardinge
2007-02-27 8:13 ` [patch 20/26] Xen-paravirt_ops: Core Xen implementation Jeremy Fitzhardinge
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070316091411.GF23174@elte.hu \
--to=mingo@elte.hu \
--cc=Christian.Limpach@cl.cam.ac.uk \
--cc=ak@muc.de \
--cc=akpm@linux-foundation.org \
--cc=bunk@stusta.de \
--cc=chrisw@sous-sol.org \
--cc=ian.pratt@xensource.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=tglx@linutronix.de \
--cc=virtualization@lists.osdl.org \
--cc=xen-devel@lists.xensource.com \
--cc=zach@vmware.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).