[COMMIT master] qemu-kvm: remove unused setupcpuid

2010-12-06 Thread Avi Kivity
From: Michael S. Tsirkin m...@redhat.com kvm_setup_cpuid seems unused, so remove it. Signed-off-by: Michael S. Tsirkin m...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/kvm/libkvm/libkvm-x86.c b/kvm/libkvm/libkvm-x86.c index f1aef76..2b12408 100644 ---

[COMMIT master] pci: pci_default_cap_write_config ignores wmask

2010-12-06 Thread Avi Kivity
From: Alex Williamson alex.william...@redhat.com Make use of wmask, just like the rest of config space. This duplicates code in pci_default_write_config, but we plan to get rid of this function anyway, so avoid the code churn. Signed-off-by: Alex Williamson alex.william...@redhat.com

[COMMIT master] pci: Replace used bitmap with config byte map

2010-12-06 Thread Avi Kivity
From: Alex Williamson alex.william...@redhat.com Capabilities are allocated in bytes, so we can track both whether a byte is used and by what capability in the same structure. Remove pci_reserve_capability() as there are no users, remove pci_access_cap_config() since it's now a trivial lookup.

[COMMIT master] device-assignment: Use PCI capabilities support

2010-12-06 Thread Avi Kivity
From: Alex Williamson alex.william...@redhat.com Convert to use common pci_add_capabilities() rather than creating our own mess. Signed-off-by: Alex Williamson alex.william...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/hw/device-assignment.c

[COMMIT master] pci: Remove cap.length, cap.start, cap.supported

2010-12-06 Thread Avi Kivity
From: Alex Williamson alex.william...@redhat.com Capabilities aren't required to be contiguous, so cap.length never really made much sense. Likewise, cap.start is mostly meaningless too. Both of these are better served by the capability map. We can also get rid of cap.supported, since it's

[COMMIT master] pci: Remove pci_enable_capability_support()

2010-12-06 Thread Avi Kivity
From: Alex Williamson alex.william...@redhat.com This interface doesn't make much sense, adding a capability can take care of everything, just provide a means to register capability read/write handlers. Device assignment does it's own thing, so requires a couple ugly hacks that will be cleaned

[COMMIT master] KVM: MMU: abstract invalid guest pte mapping

2010-12-06 Thread Avi Kivity
From: Xiao Guangrong xiaoguangr...@cn.fujitsu.com Introduce a common function to map invalid gpte Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index d878dd1..e3d2ee0 100644 ---

[COMMIT master] KVM: x86 emulator: drop dead pf injection in emulate_popf()

2010-12-06 Thread Avi Kivity
From: Avi Kivity a...@redhat.com If rc == X86EMUL_PROPAGATE_FAULT, we would have returned earlier. Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 68d72db..b39df7b 100644 ---

[COMMIT master] KVM: x86 emulator: tighen up -read_std() and -write_std() error checks

2010-12-06 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Instead of checking for X86EMUL_PROPAGATE_FAULT, check for any error, making the callers more reliable. Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c

[COMMIT master] KVM: Pull extra page fault information into struct x86_exception

2010-12-06 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Currently page fault cr2 and nesting infomation are carried outside the fault data structure. Instead they are placed in the vcpu struct, which results in confusion as global variables are manipulated instead of passing parameters. Fix this issue by adding

[COMMIT master] KVM: X86: Don't report L2 emulation failures to user-space

2010-12-06 Thread Avi Kivity
From: Joerg Roedel joerg.roe...@amd.com This patch prevents that emulation failures which result from emulating an instruction for an L2-Guest results in being reported to userspace. Without this patch a malicious L2-Guest would be able to kill the L1 by triggering a race-condition between an

[COMMIT master] KVM: Push struct x86_exception info the various gva_to_gpa variants

2010-12-06 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index 0e64a39..e91c692 100644 --- a/arch/x86/include/asm/kvm_host.h +++

[COMMIT master] KVM: SVM: Add function to recalculate intercept masks

2010-12-06 Thread Avi Kivity
From: Joerg Roedel joerg.roe...@amd.com This patch adds a function to recalculate the effective intercepts masks when the vcpu is in guest-mode and either the host or the guest intercept masks change. Signed-off-by: Joerg Roedel joerg.roe...@amd.com Signed-off-by: Marcelo Tosatti

[COMMIT master] KVM: SVM: Make Use of the generic guest-mode functions

2010-12-06 Thread Avi Kivity
From: Joerg Roedel joerg.roe...@amd.com This patch replaces the is_nested logic in the SVM module with the generic notion of guest-mode. Signed-off-by: Joerg Roedel joerg.roe...@amd.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index

[COMMIT master] KVM: SVM: Add manipulation functions for DRx intercepts

2010-12-06 Thread Avi Kivity
From: Joerg Roedel joerg.roe...@amd.com This patch wraps changes to the DRx intercepts of SVM into seperate functions to abstract nested-svm better and prepare the implementation of the vmcb-clean-bits feature. Signed-off-by: Joerg Roedel joerg.roe...@amd.com Signed-off-by: Marcelo Tosatti

[COMMIT master] KVM: SVM: Add manipulation functions for CRx intercepts

2010-12-06 Thread Avi Kivity
From: Roedel, Joerg joerg.roe...@amd.com This patch wraps changes to the CRx intercepts of SVM into seperate functions to abstract nested-svm better and prepare the implementation of the vmcb-clean-bits feature. Signed-off-by: Joerg Roedel joerg.roe...@amd.com Signed-off-by: Marcelo Tosatti

[COMMIT master] KVM: SVM: Add manipulation functions for exception intercepts

2010-12-06 Thread Avi Kivity
From: Joerg Roedel joerg.roe...@amd.com This patch wraps changes to the exception intercepts of SVM into seperate functions to abstract nested-svm better and prepare the implementation of the vmcb-clean-bits feature. Signed-off-by: Joerg Roedel joerg.roe...@amd.com Signed-off-by: Marcelo Tosatti

[COMMIT master] KVM: SVM: Add manipulation functions for misc intercepts

2010-12-06 Thread Avi Kivity
From: Joerg Roedel joerg.roe...@amd.com This patch wraps changes to the misc intercepts of SVM into seperate functions to abstract nested-svm better and prepare the implementation of the vmcb-clean-bits feature. Signed-off-by: Joerg Roedel joerg.roe...@amd.com Signed-off-by: Marcelo Tosatti

[COMMIT master] KVM: MMU: fix forgot flush tlbs on sync_page path

2010-12-06 Thread Avi Kivity
From: Xiao Guangrong xiaoguangr...@cn.fujitsu.com We should flush all tlbs after drop spte on sync_page path since Quote from Avi: | sync_page | drop_spte | kvm_mmu_notifier_invalidate_page | kvm_unmap_rmapp | spte doesn't exist - no flush | page is freed | guest can write into freed page?

[COMMIT master] KVM: MMU: Avoid dropping accessed bit while removing write access

2010-12-06 Thread Avi Kivity
From: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp One more KVM: MMU: Don't drop accessed bit while updating an spte. Sptes are accessed by both kvm and hardware. This patch uses update_spte() to fix the way of removing write access. Signed-off-by: Takuya Yoshikawa

[COMMIT master] KVM: x86 emulator: introduce struct x86_exception to communicate faults

2010-12-06 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Introduce a structure that can contain an exception to be passed back to main kvm code. Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/include/asm/kvm_emulate.h

[COMMIT master] KVM: MMU: delay flush all tlbs on sync_page path

2010-12-06 Thread Avi Kivity
From: Xiao Guangrong xiaoguangr...@cn.fujitsu.com Quote from Avi: | I don't think we need to flush immediately; set a tlb dirty bit somewhere | that is cleareded when we flush the tlb. kvm_mmu_notifier_invalidate_page() | can consult the bit and force a flush if set. Signed-off-by: Xiao

[COMMIT master] KVM: VMX: Return 0 from a failed VMREAD

2010-12-06 Thread Avi Kivity
From: Avi Kivity a...@redhat.com If we execute VMREAD during reboot we'll just skip over it. Instead of returning garbage, return 0, which has a much smaller chance of confusing the code. Otherwise we risk a flood of debug printk()s which block the reboot process if a serial console or

[COMMIT master] KVM: x86 emulator: simplify exception generation

2010-12-06 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Immediately after we generate an exception, we want a X86EMUL_PROPAGATE_FAULT constant, so return it from the generation functions. Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/emulate.c

[COMMIT master] Merge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into next

2010-12-06 Thread Avi Kivity
From: Avi Kivity a...@redhat.com * 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6: (614 commits) MN10300: Implement asm/syscall.h UBI: fix corrupted PEB detection for NOR flash sh: se/7724: Remove FSI/B of GPIO init code sh: se/7724: Update clock

[COMMIT master] KVM: Don't spin on virt instruction faults during reboot

2010-12-06 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Since vmx blocks INIT signals, we disable virtualization extensions during reboot. This leads to virtualization instructions faulting; we trap these faults and spin while the reboot continues. Unfortunately spinning on a non-preemptible kernel may block a task

[COMMIT master] Convert .flat files to 32-bit elf format

2010-12-06 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Recent qemus no longer load 64-bit elf kernels. Fix by converting to 32-bit elf. Signed-off-by: Avi Kivity a...@redhat.com diff --git a/config-x86-common.mak b/config-x86-common.mak index b541c1c..c5508b3 100644 --- a/config-x86-common.mak +++

Re: [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v2)

2010-12-06 Thread Avi Kivity
On 12/04/2010 03:30 PM, Anthony Liguori wrote: On 12/04/2010 02:13 AM, Avi Kivity wrote: On 12/04/2010 12:45 AM, Anthony Liguori wrote: hlt exiting doesn't leave vcpu in the halted state (since hlt has not been executed). So currently we never see a vcpu in halted state. Right, you mean

Re: [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v2)

2010-12-06 Thread Avi Kivity
On 12/04/2010 03:48 PM, Anthony Liguori wrote: No, an interrupt causes the HLT to be executed, and rip advanced past it. You need to preserve this (both for interrupts and for the apf completion exception). Yeah, I see in the architecture manual it specifically calls out the rip advancing

Re: [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v2)

2010-12-06 Thread Avi Kivity
On 12/06/2010 10:28 AM, Avi Kivity wrote: I wasn't sure about this. Don't you want EIP to point to the beginning of the instruction such that the exception will cause the instruction to restart? An interrupt causes the HLT to complete execution. APF completion counts as an interrupt in

[PATCH] KVM: Add reading critical region for kvm_io_bus_read/write

2010-12-06 Thread Sheng Yang
Seems we missed it. Signed-off-by: Sheng Yang sh...@linux.intel.com --- Do we need this, or slot_lock covered this? virt/kvm/kvm_main.c | 24 1 files changed, 16 insertions(+), 8 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index

Re: [PATCH 2/2 rebased] KVM: MMU: Introduce a helper to access lpage_info

2010-12-06 Thread Takuya Yoshikawa
(2010/12/06 16:55), Takuya Yoshikawa wrote: (2010/12/06 15:37), Xiao Guangrong wrote: On 12/06/2010 12:13 AM, Takuya Yoshikawa wrote: From: Takuya Yoshikawayoshikawa.tak...@oss.ntt.co.jp Index calculation to access lpage_info appears three times. A helper is worthwhile. Why not get

Re: [PATCH v4 1/3] KVM: MMU: rename 'no_apf' to 'prefault'

2010-12-06 Thread Gleb Natapov
On Fri, Dec 03, 2010 at 06:30:55PM -0200, Marcelo Tosatti wrote: On Thu, Dec 02, 2010 at 05:44:43PM +0800, Xiao Guangrong wrote: It's the speculative path if 'no_apf = 1' and we will specially handle this speculative path in the later patch, so 'prefault' is better to fit the sense

Re: [PATCH v4 3/3] KVM: MMU: retry #PF for softmmu

2010-12-06 Thread Avi Kivity
On 12/02/2010 11:46 AM, Xiao Guangrong wrote: Retry #PF for softmmu only when the current vcpu has the same cr3 as the time when #PF occurs Changelog: Just compare cr3 value since It's harmless to instantiate an spte for an unused translation from Marcelo's comment It's not harmless.

Re: [PATCH v4 3/3] KVM: MMU: retry #PF for softmmu

2010-12-06 Thread Xiao Guangrong
Hi Avi, On 12/06/2010 05:48 PM, Avi Kivity wrote: On 12/02/2010 11:46 AM, Xiao Guangrong wrote: Retry #PF for softmmu only when the current vcpu has the same cr3 as the time when #PF occurs Changelog: Just compare cr3 value since It's harmless to instantiate an spte for an unused

Re: [PATCH 0/2] Emulator intercept frameworks

2010-12-06 Thread Roedel, Joerg
Hi Avi, On Sun, Dec 05, 2010 at 05:18:23AM -0500, Avi Kivity wrote: This patchset defines a framework for intercepting emulated instructions. It takes a middle ground to the two previous proposals: putting everything in an arch callback, or putting everything in the emulator. Instead, it

Block device resize detection

2010-12-06 Thread Vandeir Eduardo
Hi guys, I have a KVM guest machine, lets name it VMTEST, using an iSCSI LUN as a virtio device. Something like this: disk type='block' device='disk' driver name='qemu' type='raw' cache='none'/ source dev='/dev/disk/by-path/ip-w.x.y.z:3260-iscsi-iqn.2010-10.br.furb.inf:disk0-lun-4'/

Re: Block device resize detection

2010-12-06 Thread Alexander Graf
Hi Vandeir, On 06.12.2010, at 11:49, Vandeir Eduardo wrote: Hi guys, I have a KVM guest machine, lets name it VMTEST, using an iSCSI LUN as a virtio device. Something like this: disk type='block' device='disk' driver name='qemu' type='raw' cache='none'/ source

[KVM-Autotest][PATCH][virtio-console] Adding SIGIO test to virtio_console.

2010-12-06 Thread Jiří Župka
Sigio was added in kernel 2.6.37. It was necessary to slightly change structure of virtio_guest, because the signals coming into the main thread of process. Signals which arrived in the main thread cancel system call (os.read and others) and it caused problems New sructure: main thread

[KVM-autotest][PATCH] virtio_console: add lseek test

2010-12-06 Thread Lukas Doktor
Hello, The first patch adds an lseek test. The second one is just a mirror corrections of critical flags for some of the smoke_test subtests. The lseek test do what is expected. The result of lseek on virtconsole/virtserialport should be -ESPIPE or err 29 in python. Regards, Lukáš -- To

[PATCH 1/2] * Add lseek test

2010-12-06 Thread Lukas Doktor
Signed-off-by: Lukas Doktor ldok...@redhat.com --- client/tests/kvm/scripts/virtio_guest.py | 23 +++ client/tests/kvm/tests/virtio_console.py | 11 +++ 2 files changed, 34 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/scripts/virtio_guest.py

[PATCH 2/2] FIX tbasic_loopback execution FIX critical tests; multioupen is not critical; basic_loopback is critical test

2010-12-06 Thread Lukas Doktor
Signed-off-by: Lukas Doktor ldok...@redhat.com --- client/tests/kvm/tests/virtio_console.py |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/tests/kvm/tests/virtio_console.py b/client/tests/kvm/tests/virtio_console.py index 30bdcbf..144aca3 100644 ---

Re: Block device resize detection

2010-12-06 Thread Vandeir Eduardo
Humm, unfortunately I'm not a developer, only a sys admin, but this would be a nice feature to avoid restarting vm guests. I didn't want, but I think I will have to add another software layer (LVM) inside the guest vm. This way, when I need more space, I hot-add another device and add it to the

Re: [Qemu-devel] [PATCH] ceph/rbd block driver for qemu-kvm (v8)

2010-12-06 Thread Kevin Wolf
Am 17.11.2010 22:42, schrieb Christian Brunner: Here is another update for the ceph storage driver. It includes changes for the annotations Stefan made last week and a bit more things Sage discovered while looking over the driver again. I really hope that this time we are not only close, but

Re: [PATCH] KVM: Add reading critical region for kvm_io_bus_read/write

2010-12-06 Thread Avi Kivity
On 12/06/2010 10:44 AM, Sheng Yang wrote: Seems we missed it. Signed-off-by: Sheng Yangsh...@linux.intel.com --- Do we need this, or slot_lock covered this? virt/kvm/kvm_main.c | 24 1 files changed, 16 insertions(+), 8 deletions(-) diff --git

Re: [PATCH 2/2 rebased] KVM: MMU: Introduce a helper to access lpage_info

2010-12-06 Thread Avi Kivity
On 12/06/2010 10:57 AM, Takuya Yoshikawa wrote: (2010/12/06 16:55), Takuya Yoshikawa wrote: (2010/12/06 15:37), Xiao Guangrong wrote: On 12/06/2010 12:13 AM, Takuya Yoshikawa wrote: From: Takuya Yoshikawayoshikawa.tak...@oss.ntt.co.jp Index calculation to access lpage_info appears three

Re: Block device resize detection

2010-12-06 Thread Kevin Wolf
Am 06.12.2010 12:29, schrieb Alexander Graf: On 06.12.2010, at 11:49, Vandeir Eduardo wrote: I have a KVM guest machine, lets name it VMTEST, using an iSCSI LUN as a virtio device. Something like this: disk type='block' device='disk' driver name='qemu' type='raw' cache='none'/ source

Re: [PATCH v4 3/3] KVM: MMU: retry #PF for softmmu

2010-12-06 Thread Avi Kivity
On 12/06/2010 12:22 PM, Xiao Guangrong wrote: Hi Avi, On 12/06/2010 05:48 PM, Avi Kivity wrote: On 12/02/2010 11:46 AM, Xiao Guangrong wrote: Retry #PF for softmmu only when the current vcpu has the same cr3 as the time when #PF occurs Changelog: Just compare cr3 value since

Re: [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v4)

2010-12-06 Thread Avi Kivity
On 12/05/2010 06:55 PM, Srivatsa Vaddagiri wrote: On Sat, Dec 04, 2010 at 08:43:21AM -0600, Anthony Liguori wrote: In certain use-cases, we want to allocate guests fixed time slices where idle guest cycles leave the machine idling. There are many approaches to achieve this but the most

Re: [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v4)

2010-12-06 Thread Srivatsa Vaddagiri
On Mon, Dec 06, 2010 at 03:27:18PM +0200, Avi Kivity wrote: A vcpu could be idle not just because of lack of work, but also because its waiting on IO completion. Normally idle vcpus that yield would allow their companion threads to run and possibly finish pending IO work faster. Now that idle

[PATCHv7 06/16] Add get_fw_dev_path callback to IDE bus.

2010-12-06 Thread Gleb Natapov
Signed-off-by: Gleb Natapov g...@redhat.com --- hw/ide/qdev.c | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c index 88ff657..01a181b 100644 --- a/hw/ide/qdev.c +++ b/hw/ide/qdev.c @@ -24,9 +24,12 @@ /*

[PATCHv7 04/16] Add get_fw_dev_path callback to ISA bus in qdev.

2010-12-06 Thread Gleb Natapov
Use device ioports to create unique device path. Signed-off-by: Gleb Natapov g...@redhat.com --- hw/isa-bus.c | 16 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/hw/isa-bus.c b/hw/isa-bus.c index c0ac7e9..c423c1b 100644 --- a/hw/isa-bus.c +++ b/hw/isa-bus.c

[PATCHv7 02/16] Introduce new BusInfo callback get_fw_dev_path.

2010-12-06 Thread Gleb Natapov
New get_fw_dev_path callback will be used for build device path usable by firmware in contrast to qdev qemu internal device path. Signed-off-by: Gleb Natapov g...@redhat.com --- hw/qdev.h |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/hw/qdev.h b/hw/qdev.h index

[PATCHv7 11/16] Add get_fw_dev_path callback to scsi bus.

2010-12-06 Thread Gleb Natapov
Signed-off-by: Gleb Natapov g...@redhat.com --- hw/scsi-bus.c | 23 +++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c index 93f0e9a..7febb86 100644 --- a/hw/scsi-bus.c +++ b/hw/scsi-bus.c @@ -5,9 +5,12 @@ #include qdev.h

[PATCHv7 09/16] Record which USBDevice USBPort belongs too.

2010-12-06 Thread Gleb Natapov
Ports on root hub will have NULL here. This is needed to reconstruct path from device to its root hub to build device path. Signed-off-by: Gleb Natapov g...@redhat.com --- hw/usb-bus.c |3 ++- hw/usb-hub.c |2 +- hw/usb-musb.c |2 +- hw/usb-ohci.c |2 +- hw/usb-uhci.c |2 +-

[PATCHv7 12/16] Add bootindex parameter to net/block/fd device

2010-12-06 Thread Gleb Natapov
If bootindex is specified on command line a string that describes device in firmware readable way is added into sorted list. Later this list will be passed into firmware to control boot order. Signed-off-by: Gleb Natapov g...@redhat.com --- block_int.h |4 +++- hw/e1000.c |4

[PATCHv7 07/16] Add get_fw_dev_path callback for system bus.

2010-12-06 Thread Gleb Natapov
Prints out mmio or pio used to access child device. Signed-off-by: Gleb Natapov g...@redhat.com --- hw/pci_host.c |2 ++ hw/sysbus.c | 30 ++ hw/sysbus.h |4 3 files changed, 36 insertions(+), 0 deletions(-) diff --git a/hw/pci_host.c

[PATCHv7 16/16] Pass boot device list to firmware.

2010-12-06 Thread Gleb Natapov
Signed-off-by: Gleb Natapov g...@redhat.com --- hw/fw_cfg.c | 14 ++ sysemu.h|1 + vl.c| 48 3 files changed, 63 insertions(+), 0 deletions(-) diff --git a/hw/fw_cfg.c b/hw/fw_cfg.c index 7b9434f..20a816f 100644

[PATCHv7 14/16] Add bootindex for option roms.

2010-12-06 Thread Gleb Natapov
Extend -option-rom command to have additional parameter ,bootindex=. Signed-off-by: Gleb Natapov g...@redhat.com --- hw/loader.c| 16 +++- hw/loader.h|8 hw/multiboot.c |3 ++- hw/ne2000.c|2 +- hw/nseries.c |4 ++-- hw/palm.c |6

[PATCHv7 08/16] Add get_fw_dev_path callback for pci bus.

2010-12-06 Thread Gleb Natapov
Signed-off-by: Gleb Natapov g...@redhat.com --- hw/pci.c | 108 - 1 files changed, 85 insertions(+), 23 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 0c15b13..e7ea907 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -43,6 +43,7 @@

[PATCHv7 13/16] Change fw_cfg_add_file() to get full file path as a parameter.

2010-12-06 Thread Gleb Natapov
Change fw_cfg_add_file() to get full file path as a parameter instead of building one internally. Two reasons for that. First caller may need to know how file is named. Second this moves policy of file naming out from fw_cfg. Platform may want to use more then two levels of directories for

[PATCHv7 15/16] Add notifier that will be called when machine is fully created.

2010-12-06 Thread Gleb Natapov
Action that depends on fully initialized device model should register with this notifier chain. Signed-off-by: Gleb Natapov g...@redhat.com --- sysemu.h |2 ++ vl.c | 15 +++ 2 files changed, 17 insertions(+), 0 deletions(-) diff --git a/sysemu.h b/sysemu.h index

[PATCHv7 10/16] Add get_fw_dev_path callback for usb bus.

2010-12-06 Thread Gleb Natapov
Signed-off-by: Gleb Natapov g...@redhat.com --- hw/usb-bus.c | 42 ++ 1 files changed, 42 insertions(+), 0 deletions(-) diff --git a/hw/usb-bus.c b/hw/usb-bus.c index 256b881..8b4583c 100644 --- a/hw/usb-bus.c +++ b/hw/usb-bus.c @@ -5,11 +5,13 @@

[PATCHv7 00/16] boot order specification

2010-12-06 Thread Gleb Natapov
I am using open firmware naming scheme to specify device path names. Changes from last version: rebase to master, added pointers to OF specs, added bootindex parameter documentation. Gleb Natapov (16): Introduce fw_name field to DeviceInfo structure. Introduce new

[PATCHv7 05/16] Store IDE bus id in IDEBus structure for easy access.

2010-12-06 Thread Gleb Natapov
Signed-off-by: Gleb Natapov g...@redhat.com --- hw/ide/cmd646.c |4 ++-- hw/ide/internal.h |3 ++- hw/ide/isa.c |2 +- hw/ide/piix.c |4 ++-- hw/ide/qdev.c |3 ++- hw/ide/via.c |4 ++-- 6 files changed, 11 insertions(+), 9 deletions(-) diff --git

[PATCHv7 01/16] Introduce fw_name field to DeviceInfo structure.

2010-12-06 Thread Gleb Natapov
Add fw_name to DeviceInfo to use in device path building. In contrast to name fw_name should refer to functionality device provides instead of particular device model like name does. Signed-off-by: Gleb Natapov g...@redhat.com --- hw/fdc.c|1 + hw/ide/isa.c|1 + hw/ide/qdev.c

[PATCHv7 03/16] Keep track of ISA ports ISA device is using in qdev.

2010-12-06 Thread Gleb Natapov
Store all io ports used by device in ISADevice structure. Signed-off-by: Gleb Natapov g...@redhat.com --- hw/cs4231a.c |1 + hw/fdc.c |3 +++ hw/gus.c |4 hw/ide/isa.c |2 ++ hw/isa-bus.c | 25 + hw/isa.h |4

Re: [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v2)

2010-12-06 Thread Anthony Liguori
On 12/06/2010 02:35 AM, Avi Kivity wrote: On 12/06/2010 10:28 AM, Avi Kivity wrote: I wasn't sure about this. Don't you want EIP to point to the beginning of the instruction such that the exception will cause the instruction to restart? An interrupt causes the HLT to complete execution.

Re: [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v2)

2010-12-06 Thread Anthony Liguori
On 12/06/2010 08:01 AM, Avi Kivity wrote: On 12/06/2010 03:58 PM, Anthony Liguori wrote: On 12/06/2010 02:35 AM, Avi Kivity wrote: On 12/06/2010 10:28 AM, Avi Kivity wrote: I wasn't sure about this. Don't you want EIP to point to the beginning of the instruction such that the exception will

[PATCH v2 0/2] savevm odness related to kvmclock

2010-12-06 Thread Glauber Costa
Some users told me that savevm path is behaving oddly wrt kvmclock. The first oddness is that a guarantee we never made (AFAIK) is being broken: two consecutive savevm operations, with the machine stopped in between produces different results, due to the call to KVM_GET_CLOCK ioctl. I believe the

[PATCH v2 2/2] make kvmclock value idempotent for stopped machine

2010-12-06 Thread Glauber Costa
Although we never made such commitment clear (well, to the best of my knowledge), some people expect that two savevm issued in sequence in a stopped machine will yield the same results. This is not a crazy requirement, since we don't expect a stopped machine to be updating its state, for any

[PATCH v2 1/2] Do not register kvmclock savevm section if kvmclock is disabled.

2010-12-06 Thread Glauber Costa
Usually nobody usually thinks about that scenario (me included and specially), but kvmclock can be actually disabled in the host. It happens in two scenarios: 1. host too old. 2. we passed -kvmclock to our -cpu parameter. In both cases, we should not register kvmclock savevm section. This

Re: [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v2)

2010-12-06 Thread Anthony Liguori
On 12/06/2010 08:02 AM, Avi Kivity wrote: On 12/06/2010 04:01 PM, Avi Kivity wrote: It's not just possible, it appears to be exactly what happens. I guess it makes sense that RIP gets advanced before HLT begins to wait. It does. Good, it simplifies the patch. btw, this is how kvm

Re: [PATCH v2 0/2] savevm odness related to kvmclock

2010-12-06 Thread Paolo Bonzini
On 12/06/2010 03:03 PM, Glauber Costa wrote: Some users told me that savevm path is behaving oddly wrt kvmclock. The first oddness is that a guarantee we never made (AFAIK) is being broken: two consecutive savevm operations, with the machine stopped in between produces different results, due to

Re: [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v2)

2010-12-06 Thread Gleb Natapov
On Mon, Dec 06, 2010 at 08:08:08AM -0600, Anthony Liguori wrote: On 12/06/2010 08:02 AM, Avi Kivity wrote: On 12/06/2010 04:01 PM, Avi Kivity wrote: It's not just possible, it appears to be exactly what happens. I guess it makes sense that RIP gets advanced before HLT begins to wait.

Re: [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v2)

2010-12-06 Thread Avi Kivity
On 12/06/2010 04:03 PM, Anthony Liguori wrote: It does. Good, it simplifies the patch. Any ideas if the unit test framework can be used to validate this? The behavior makes perfect sense but I wanted an excuse to play around with it :-) Not the user space one. The exit we're

Re: [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v2)

2010-12-06 Thread Anthony Liguori
On 12/06/2010 08:33 AM, Avi Kivity wrote: On 12/06/2010 04:03 PM, Anthony Liguori wrote: It does. Good, it simplifies the patch. Any ideas if the unit test framework can be used to validate this? The behavior makes perfect sense but I wanted an excuse to play around with it :-) Not

Re: [Qemu-devel] Re: [PATCH 2/3] virtio-pci: Use ioeventfd for virtqueue notify

2010-12-06 Thread Avi Kivity
On 12/01/2010 11:34 PM, Stefan Hajnoczi wrote: The guest CPU utilization numbers include an efficiency metric: %vcpu per MB/sec. Here we see significant improvements too. Guests that previously couldn't get more CPU work done now have regained some breathing space. Thanks for those

Re: [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v2)

2010-12-06 Thread Avi Kivity
On 12/06/2010 05:07 PM, Anthony Liguori wrote: Not the user space one. The exit we're interested in is external interrupt, and that one isn't delivered to userspace. I guess you could have a loop 1: hlt jmp 1b and enter it programming a timer to something close, and examine the

Re: [PATCH] KVM: SVM: Add xsetbv intercept

2010-12-06 Thread Avi Kivity
On 12/03/2010 06:42 PM, Joerg Roedel wrote: This patch implements the xsetbv intercept to the AMD part of KVM. This makes AVX usable in a save way for the guest on AVX capable AMD hardware. The patch is tested by using AVX in the guest and host in parallel and checking for data corruption. I

Re: [stable] [PATCH 3/3][STABLE] KVM: add schedule check to napi_enable call

2010-12-06 Thread Avi Kivity
On 12/03/2010 05:44 PM, Peter Lieven wrote: Is there any reason why this patch is not yet in the stable kernel? virtio_net is still crashing under heavy load in current vanilla kernel. This patch *might be* the solution. Perhaps some confusion. I've asked Greg to take kvm patches from

Re: Roadmap for KVM support on Tile?

2010-12-06 Thread Jan Kiszka
Am 06.12.2010 16:59, Chris Metcalf wrote: On 12/6/2010 7:13 AM, Jan Kiszka wrote: Hi Chris, as I'm already running around, telling people that Tile might be the next arch to gain KVM support, I wanted to back this derived [1] information with some more details. Can you share some of your

Re: [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v2)

2010-12-06 Thread Anthony Liguori
On 12/06/2010 09:16 AM, Avi Kivity wrote: On 12/06/2010 05:07 PM, Anthony Liguori wrote: Not the user space one. The exit we're interested in is external interrupt, and that one isn't delivered to userspace. I guess you could have a loop 1: hlt jmp 1b and enter it programming a

Re: [PATCH 5/5] KVM: Allow host IRQ sharing for passed-through PCI 2.3 devices

2010-12-06 Thread Avi Kivity
On 12/04/2010 01:37 AM, Jan Kiszka wrote: From: Jan Kiszkajan.kis...@siemens.com PCI 2.3 allows to generically disable IRQ sources at device level. This enables us to share IRQs of such devices on the host side when passing them to a guest. However, IRQ disabling via the PCI config space is

[PATCH v2 0/5] Extra capabilities for device assignment

2010-12-06 Thread Alex Williamson
v2: - Reimplement 2/5 to remove more cruft v1: Now that we've got PCI capabilities cleaned up and device assignment using them, we can add more capabilities to be guest visible. This adds minimal PCI Express, PCI-X, and Power Management, along with direct passthrough Vital Product Data and

[PATCH v2 1/5] device-assignment: Fix off-by-one in header check

2010-12-06 Thread Alex Williamson
Include the first byte at 40h or else access might go to the hardware instead of the emulated config space, resulting in capability loops, since the ordering is different. Signed-off-by: Alex Williamson alex.william...@redhat.com --- hw/device-assignment.c |4 ++-- 1 files changed, 2

[PATCH v2 3/5] pci: Error on PCI capability collisions

2010-12-06 Thread Alex Williamson
Nothing good can happen when we overlap capabilities Signed-off-by: Alex Williamson alex.william...@redhat.com --- hw/pci.c | 14 ++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index b08113d..288d6fd 100644 --- a/hw/pci.c +++ b/hw/pci.c @@

[PATCH v2 2/5] pci: Remove PCI_CAPABILITY_CONFIG_*

2010-12-06 Thread Alex Williamson
Half of these aren't used anywhere, the other half are wrong. Now that device assignment is trying to match physical hardware offsets for PCI capabilities, we can't round up the MSI and MSI-X length. MSI-X is always 12 bytes. MSI is variable length depending on features, but for the current

[PATCH v2 4/5] device-assignment: Error checking when adding capabilities

2010-12-06 Thread Alex Williamson
Signed-off-by: Alex Williamson alex.william...@redhat.com --- hw/device-assignment.c | 10 +++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/hw/device-assignment.c b/hw/device-assignment.c index 1a90a89..0ae04de 100644 --- a/hw/device-assignment.c +++

[PATCH v2 5/5] device-assignment: pass through and stub more PCI caps

2010-12-06 Thread Alex Williamson
Some drivers depend on finding capabilities like power management, PCI express/X, vital product data, or vendor specific fields. Now that we have better capability support, we can pass more of these tables through to the guest. Note that VPD and VNDR are direct pass through capabilies, the rest

Re: [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v2)

2010-12-06 Thread Avi Kivity
On 12/06/2010 06:21 PM, Anthony Liguori wrote: No, right now we intercept SHUTDOWN (and turn it back, in qemu, into a RESET), and we emulate all the SIPI stuff. We also intercepted HLT so we couldn't get that activity state either. Ok, looks like I need to make this per-VM and use a CAP

Re: [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v2)

2010-12-06 Thread Anthony Liguori
On 12/06/2010 10:30 AM, Avi Kivity wrote: On 12/06/2010 06:21 PM, Anthony Liguori wrote: No, right now we intercept SHUTDOWN (and turn it back, in qemu, into a RESET), and we emulate all the SIPI stuff. We also intercepted HLT so we couldn't get that activity state either. Ok, looks like I

Re: [PATCH v2 0/5] Extra capabilities for device assignment

2010-12-06 Thread Avi Kivity
On 12/06/2010 06:21 PM, Alex Williamson wrote: v2: - Reimplement 2/5 to remove more cruft v1: Now that we've got PCI capabilities cleaned up and device assignment using them, we can add more capabilities to be guest visible. This adds minimal PCI Express, PCI-X, and Power Management, along

Re: [PATCH 5/5] KVM: Allow host IRQ sharing for passed-through PCI 2.3 devices

2010-12-06 Thread Jan Kiszka
Am 06.12.2010 17:21, Avi Kivity wrote: On 12/04/2010 01:37 AM, Jan Kiszka wrote: From: Jan Kiszkajan.kis...@siemens.com PCI 2.3 allows to generically disable IRQ sources at device level. This enables us to share IRQs of such devices on the host side when passing them to a guest. However,

Re: [PATCH 2/2] tools/virtio: virtio_test tool

2010-12-06 Thread Thiago Farina
On Mon, Nov 29, 2010 at 3:16 PM, Michael S. Tsirkin m...@redhat.com wrote: +#define container_of(ptr, type, member) ({                     \ +       const typeof( ((type *)0)-member ) *__mptr = (ptr);    \ +       (type *)( (char *)__mptr - offsetof(type,member) );}) + +#define

Re: [PATCH 5/5] KVM: Allow host IRQ sharing for passed-through PCI 2.3 devices

2010-12-06 Thread Avi Kivity
On 12/06/2010 06:34 PM, Jan Kiszka wrote: What's the protocol for doing this? I suppose userspace has to disable interrupts, ioctl(SET_INTX_MASK, masked), ..., ioctl(SET_INTX_MASK, unmasked), enable interrupts? Userspace just has to synchronize against itself - what it already does:

Re: [PATCH 2/2] KVM: Fetch guest cr3 from hardware on demand

2010-12-06 Thread Avi Kivity
On 12/05/2010 07:01 PM, Avi Kivity wrote: Instead of syncing the guest cr3 every exit, which is expensince on vmx with ept enabled, sync it only on demand. Somewhat buggy (identity pagetable address leaking into guest), will rework. -- error compiling committee.c: too many arguments to

Re: [PATCH v2 0/5] Extra capabilities for device assignment

2010-12-06 Thread Alex Williamson
On Mon, 2010-12-06 at 18:34 +0200, Avi Kivity wrote: On 12/06/2010 06:21 PM, Alex Williamson wrote: v2: - Reimplement 2/5 to remove more cruft v1: Now that we've got PCI capabilities cleaned up and device assignment using them, we can add more capabilities to be guest visible.

Re: [PATCH 5/5] KVM: Allow host IRQ sharing for passed-through PCI 2.3 devices

2010-12-06 Thread Jan Kiszka
Am 06.12.2010 17:40, Avi Kivity wrote: On 12/06/2010 06:34 PM, Jan Kiszka wrote: What's the protocol for doing this? I suppose userspace has to disable interrupts, ioctl(SET_INTX_MASK, masked), ..., ioctl(SET_INTX_MASK, unmasked), enable interrupts? Userspace just has to synchronize

[PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v5)

2010-12-06 Thread Anthony Liguori
In certain use-cases, we want to allocate guests fixed time slices where idle guest cycles leave the machine idling. There are many approaches to achieve this but the most direct is to simply avoid trapping the HLT instruction which lets the guest directly execute the instruction putting the

  1   2   >