[patch 11/17] Fix patch site clobbers to include return register

2007-04-02 Thread Jeremy Fitzhardinge
Fix a few clobbers to include the return register. The clobbers set is the set of all registers modified (or may be modified) by the code snippet, regardless of whether it was deliberate or accidental. Signed-off-by: Jeremy Fitzhardinge [EMAIL PROTECTED] Cc: Rusty Russell [EMAIL PROTECTED] Cc:

[patch 04/17] Add pagetable accessors to pack and unpack pagetable entries

2007-04-02 Thread Jeremy Fitzhardinge
Add a set of accessors to pack, unpack and modify page table entries (at all levels). This allows a paravirt implementation to control the contents of pgd/pmd/pte entries. For example, Xen uses this to convert the (pseudo-)physical address into a machine address when populating a pagetable

[patch 14/17] add flush_tlb_others paravirt_op

2007-04-02 Thread Jeremy Fitzhardinge
This patch adds a pv_op for flush_tlb_others. Linux running on native hardware uses cross-CPU IPIs to flush the TLB on any CPU which may have a particular mm's pagetable entries cached in its TLB. This is inefficient in a paravirtualized environment, since the hypervisor knows which real CPUs

Re: [patch 17/17] Add a sched_clock paravirt_op

2007-04-02 Thread Andi Kleen
On Monday 02 April 2007 08:47, Jeremy Fitzhardinge wrote: Andi Kleen wrote: I think it would be much cleaner if you didn't implement your own sched_clock, but you adjust ns_base/last_tsc to account for your lost cycles. This could be done cleanly by adding a new function to sched-clock.c

Re: [patch 17/17] Add a sched_clock paravirt_op

2007-04-02 Thread Jeremy Fitzhardinge
Andi Kleen wrote: Do you also get a clock for stolen nanoseconds? What you actually get is how many ns the CPU spent in each state. Stolen is runnable+offline. No need for cycles, you could just subtract the stolen ns if you can get those. It just seems like a simpler interface to just

Re: [patch 12/17] Consistently wrap paravirt ops callsites to make them patchable

2007-04-02 Thread Jeremy Fitzhardinge
Andi Kleen wrote: Can you please add some comments to the code explaining this a little? Best would be perhaps a overview document in Documentation too. Yes, OK. +#define PVOP_CALL0(__rettype, __op) \ The __s shouldn't be needed for the macro

Re: A set of standard virtual devices?

2007-04-02 Thread Andi Kleen
On Monday 02 April 2007 23:33:01 Jeff Garzik wrote: Andi Kleen wrote: How would that work in the case where virtualized guests don't have a visible PCI bus, and the virtual environment doesn't pretend to emulate a PCI bus? If they emulated one with the appropiate device then

Re: A set of standard virtual devices?

2007-04-02 Thread Anthony Liguori
Jeremy Fitzhardinge wrote: Andi Kleen wrote: The implementation wouldn't need to use PCI at all. There wouldn't even need to be PCI like registers internally. Just a pci device with an ID somewhere in sysfs. PCI with unique IDs is just a convenient and well established key into the driver

Re: A set of standard virtual devices?

2007-04-02 Thread Jeff Garzik
H. Peter Anvin wrote: However, one probably wants to think about what the heck one actually means with virtualization in the absence of a lot of this stuff. PCI is probably the closest thing we have to a lowest common denominator for device detection. Sure, but let's look beyond device