Re: [PATCH 2/3] KVM: Emulate MSI-X table in kernel

2011-02-18 Thread Sheng Yang
On Thursday 03 February 2011 09:05:55 Marcelo Tosatti wrote: On Sun, Jan 30, 2011 at 01:11:15PM +0800, Sheng Yang wrote: Then we can support mask bit operation of assigned devices now. Signed-off-by: Sheng Yang sh...@linux.intel.com +int kvm_vm_ioctl_register_msix_mmio(struct kvm

[PATCH 0/4 v9] MSI-X MMIO support for KVM

2011-02-18 Thread Sheng Yang
Sorry for the long delay, just come back from vacation... Change from v8: 1. Update struct kvm_run to contain MSI-X routing update exit specific information. 2. Fix a mmio_nr counting bug. Notice this patchset still based on 2.6.37 due to a block bug on assigned device in the upstream now.

[PATCH 1/4] KVM: Move struct kvm_io_device to kvm_host.h

2011-02-18 Thread Sheng Yang
Then it can be used by other struct in kvm_host.h Signed-off-by: Sheng Yang sh...@linux.intel.com --- include/linux/kvm_host.h | 23 +++ virt/kvm/iodev.h | 25 + 2 files changed, 24 insertions(+), 24 deletions(-) diff --git

[PATCH 2/4] KVM: Add kvm_io_ext_data to IO handler

2011-02-18 Thread Sheng Yang
Add a new parameter to IO writing handler, so that we can transfer information from IO handler to caller. Signed-off-by: Sheng Yang sh...@linux.intel.com --- arch/x86/kvm/i8254.c |6 -- arch/x86/kvm/i8259.c |3 ++- arch/x86/kvm/lapic.c |3 ++- arch/x86/kvm/x86.c

[PATCH 4/4] KVM: Add documents for MSI-X MMIO API

2011-02-18 Thread Sheng Yang
Signed-off-by: Sheng Yang sh...@linux.intel.com --- Documentation/kvm/api.txt | 58 + 1 files changed, 58 insertions(+), 0 deletions(-) diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt index e1a9297..dd10c3b 100644 ---

[PATCH 0/4 v9] qemu-kvm: MSI-X MMIO support for assigned device

2011-02-18 Thread Sheng Yang
Update with kernel patches v9. Sheng Yang (4): qemu-kvm: device assignment: Enabling MSI-X according to the entries' mask bit qemu-kvm: Ioctl for MSIX MMIO support qemu-kvm: Header file update for MSI-X MMIO support qemu-kvm: MSI-X MMIO support for assigned device

[PATCH 4/4] qemu-kvm: MSI-X MMIO support for assigned device

2011-02-18 Thread Sheng Yang
Signed-off-by: Sheng Yang sh...@linux.intel.com --- hw/device-assignment.c | 106 +-- hw/device-assignment.h |3 + qemu-kvm.c | 46 + qemu-kvm.h | 19 + 4 files changed, 160 insertions(+), 14

[PATCH 2/4] qemu-kvm: Ioctl for MSIX MMIO support

2011-02-18 Thread Sheng Yang
Signed-off-by: Sheng Yang sh...@linux.intel.com --- qemu-kvm.c | 14 ++ qemu-kvm.h |7 +++ 2 files changed, 21 insertions(+), 0 deletions(-) diff --git a/qemu-kvm.c b/qemu-kvm.c index 49cd683..d282c95 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -1050,6 +1050,20 @@ int

[PATCH 3/4] qemu-kvm: Header file update for MSI-X MMIO support

2011-02-18 Thread Sheng Yang
Signed-off-by: Sheng Yang sh...@linux.intel.com --- kvm/include/linux/kvm.h | 28 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/kvm/include/linux/kvm.h b/kvm/include/linux/kvm.h index e46729e..dcb8f54 100644 --- a/kvm/include/linux/kvm.h +++

[PATCH 1/4] qemu-kvm: device assignment: Enabling MSI-X according to the entries' mask bit

2011-02-18 Thread Sheng Yang
The old MSI-X enabling method assume the entries are written before MSI-X enabled, but some OS didn't obey this, e.g. FreeBSD. This patch would fix this. Also, according to the PCI spec, mask bit of MSI-X table should be set after reset. Signed-off-by: Sheng Yang sh...@linux.intel.com ---

[PATCH v2 06/15] Synchronize VCPU states before reset

2011-02-18 Thread Jan Kiszka
This is required to support keeping VCPU states across a system reset. If we do not read the current state before the reset, cpu_synchronize_all_post_reset may write back incorrect state information. The first user of this will be MCE MSR synchronization which currently works around the missing

[PATCH v2 08/15] kvm: Rename kvm_arch_process_irqchip_events to async_events

2011-02-18 Thread Jan Kiszka
We will broaden the scope of this function on x86 beyond irqchip events. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- kvm-all.c |2 +- kvm.h |2 +- target-i386/kvm.c |2 +- target-ppc/kvm.c |2 +- target-s390x/kvm.c |2 +- 5 files changed, 5

[PATCH v2 14/15] Add qemu_ram_remap

2011-02-18 Thread Jan Kiszka
From: Huang Ying ying.hu...@intel.com qemu_ram_remap() unmaps the specified RAM pages, then re-maps these pages again. This is used by KVM HWPoison support to clear HWPoisoned page tables across guest rebooting, so that a new page may be allocated later to recover the memory error. [ Jan: style

[PATCH v2 15/15] KVM, MCE, unpoison memory address across reboot

2011-02-18 Thread Jan Kiszka
From: Huang Ying ying.hu...@intel.com In Linux kernel HWPoison processing implementation, the virtual address in processes mapping the error physical memory page is marked as HWPoison. So that, the further accessing to the virtual address will kill corresponding processes with SIGBUS. If the

[PATCH v2 13/15] kvm: x86: Fail kvm_arch_init_vcpu if MCE initialization fails

2011-02-18 Thread Jan Kiszka
There is no reason to continue if the kernel claims to support MCE but then fails to process our request. Signed-off-by: Jan Kiszka jan.kis...@siemens.com CC: Huang Ying ying.hu...@intel.com CC: Hidetoshi Seto seto.hideto...@jp.fujitsu.com CC: Jin Dongming jin.dongm...@np.css.fujitsu.com ---

[PATCH v2 10/15] x86: Run qemu_inject_x86_mce on target VCPU

2011-02-18 Thread Jan Kiszka
We will use the current TCG-only MCE injection path for KVM as well, and then this read-modify-write of the target VCPU state has to be performed synchronously in the corresponding thread. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- target-i386/helper.c | 87

[PATCH v2 09/15] kvm: x86: Inject pending MCE events on state writeback

2011-02-18 Thread Jan Kiszka
The current way of injecting MCE events without updating of and synchronizing with the CPUState is broken and causes spurious corruptions of the MCE-related parts of the CPUState. As a first step towards a fix, enhance the state writeback code with support for injecting events that are pending in

[PATCH v2 12/15] kvm: x86: Clean up kvm_setup_mce

2011-02-18 Thread Jan Kiszka
There is nothing to abstract here. Fold kvm_setup_mce into its caller and fix up the error reporting (return code of kvm_vcpu_ioctl holds the error value). Signed-off-by: Jan Kiszka jan.kis...@siemens.com CC: Huang Ying ying.hu...@intel.com CC: Hidetoshi Seto seto.hideto...@jp.fujitsu.com CC: Jin

[PATCH v2 05/15] x86: Optionally avoid injecting AO MCEs while others are pending

2011-02-18 Thread Jan Kiszka
Allow to tell cpu_x86_inject_mce that it should ignore Action Optional MCE events when the target VCPU is still processing another one. This will be used by KVM soon. Signed-off-by: Jan Kiszka jan.kis...@siemens.com CC: Huang Ying ying.hu...@intel.com CC: Hidetoshi Seto

[PATCH v2 01/15] x86: Account for MCE in cpu_has_work

2011-02-18 Thread Jan Kiszka
MCEs can be injected asynchronously, so they can also terminate the halt state. Signed-off-by: Jan Kiszka jan.kis...@siemens.com CC: Huang Ying ying.hu...@intel.com CC: Hidetoshi Seto seto.hideto...@jp.fujitsu.com CC: Jin Dongming jin.dongm...@np.css.fujitsu.com --- target-i386/exec.h | 15

[PATCH v2 00/15] [uq/master] Patch queue, part IV (MCE edition)

2011-02-18 Thread Jan Kiszka
Round 2 of this part, primarily addressing review comments: - Reworked CPU_INTERRUPT_MCE - exection translation (now done in kvm_arch_process_async_events, indeed much cleaner) - Add missing cpu_synchronize_state on pending MCE events for !kvm_irqchip_in_kernel - Split up KVM MCE code

[PATCH v2 04/15] x86: Refine error reporting of MCE injection services

2011-02-18 Thread Jan Kiszka
As this service is used by the human monitor, make sure that errors get reported to the right channel, and also raise the verbosity. This requires to move Monitor typedef in qemu-common.h to resolve the include dependency. Signed-off-by: Jan Kiszka jan.kis...@siemens.com CC: Huang Ying

[PATCH v2 02/15] x86: Perform implicit mcg_status reset

2011-02-18 Thread Jan Kiszka
Reorder mcg_status in CPUState to achieve automatic clearing on reset. Signed-off-by: Jan Kiszka jan.kis...@siemens.com CC: Huang Ying ying.hu...@intel.com CC: Hidetoshi Seto seto.hideto...@jp.fujitsu.com CC: Jin Dongming jin.dongm...@np.css.fujitsu.com --- target-i386/cpu.h|3 ++-

[PATCH v2 03/15] x86: Small cleanups of MCE helpers

2011-02-18 Thread Jan Kiszka
Fix some code style issues, use proper headers, and align to cpu_x86 naming scheme. No functional changes. Signed-off-by: Jan Kiszka jan.kis...@siemens.com CC: Huang Ying ying.hu...@intel.com CC: Hidetoshi Seto seto.hideto...@jp.fujitsu.com CC: Jin Dongming jin.dongm...@np.css.fujitsu.com ---

[PATCH v2 07/15] kvm: x86: Move MCE functions together

2011-02-18 Thread Jan Kiszka
Pure function suffling to avoid multiple #ifdef KVM_CAP_MCE sections, no functional changes. While at it, annotate some #ifdef sections. Signed-off-by: Jan Kiszka jan.kis...@siemens.com CC: Huang Ying ying.hu...@intel.com CC: Hidetoshi Seto seto.hideto...@jp.fujitsu.com CC: Jin Dongming

[PATCH v2 11/15] kvm: x86: Consolidate TCG and KVM MCE injection code

2011-02-18 Thread Jan Kiszka
This switches KVM's MCE injection path to cpu_x86_inject_mce, both for SIGBUS and monitor initiated events. This means we prepare the MCA MSRs in the VCPUState also for KVM. We have to drop the MSRs writeback restrictions for this purpose which is now safe as every uncoordinated MSR injection is

[Bug 29382] New: Panic: Unable to handle kernel paging request

2011-02-18 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=29382 Summary: Panic: Unable to handle kernel paging request Product: Virtualization Version: unspecified Platform: All OS/Version: Linux Tree: Mainline Status: NEW

[Bug 29382] Panic: Unable to handle kernel paging request

2011-02-18 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=29382 --- Comment #1 from Seb Lu se...@seblu.net 2011-02-18 14:59:41 --- Created an attachment (id=48312) -- (https://bugzilla.kernel.org/attachment.cgi?id=48312) screeb dump -- Configure bugmail:

[Bug 29382] Panic: Unable to handle kernel paging request

2011-02-18 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=29382 --- Comment #2 from Seb Lu se...@seblu.net 2011-02-18 15:00:10 --- Created an attachment (id=48322) -- (https://bugzilla.kernel.org/attachment.cgi?id=48322) screen dump -- Configure bugmail:

[Bug 29382] Panic: Unable to handle kernel paging request

2011-02-18 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=29382 --- Comment #3 from Seb Lu se...@seblu.net 2011-02-18 15:00:46 --- Created an attachment (id=48332) -- (https://bugzilla.kernel.org/attachment.cgi?id=48332) screen dump -- Configure bugmail:

Re: Possible netfilter-related memory corruption in 2.6.37

2011-02-18 Thread Patrick McHardy
Am 14.02.2011 17:52, schrieb Patrick McHardy: Am 14.02.2011 17:48, schrieb Eric Dumazet: I am not sure, but I guess nf_reinject() needs a fix too ;) I agree. That one looks uglier though, I guess we'll have to iterate through all hooks to note the previous one. How about this? Unfortunately

[PATCH] KVM test: Do not load acpiphp on RHEL 6.0

2011-02-18 Thread Lucas Meneghel Rodrigues
Turns out hotplug for PCI devices is built in on RHEL 6.0 kernel. Signed-off-by: Lucas Meneghel Rodrigues l...@redhat.com --- client/tests/kvm/tests_base.cfg.sample |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/tests_base.cfg.sample

[PATCH] KVM test: nic_hotplug: Fix typo

2011-02-18 Thread Lucas Meneghel Rodrigues
Signed-off-by: Lucas Meneghel Rodrigues l...@redhat.com --- client/tests/kvm/tests/nic_hotplug.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/tests/nic_hotplug.py b/client/tests/kvm/tests/nic_hotplug.py index 50a3ce9..5a757e7 100644 ---

[PATCH] Remove ethtool from rtl8139 variant

2011-02-18 Thread Lucas Meneghel Rodrigues
As the original patch set don't define supported_features for it. Signed-off-by: Lucas Meneghel Rodrigues l...@redhat.com --- client/tests/kvm/tests/ethtool.py |6 +- client/tests/kvm/tests_base.cfg.sample |1 + 2 files changed, 6 insertions(+), 1 deletions(-) diff --git

Re: Possible netfilter-related memory corruption in 2.6.37

2011-02-18 Thread Eric Dumazet
Le vendredi 18 février 2011 à 19:37 +0100, Patrick McHardy a écrit : Am 14.02.2011 17:52, schrieb Patrick McHardy: Am 14.02.2011 17:48, schrieb Eric Dumazet: I am not sure, but I guess nf_reinject() needs a fix too ;) I agree. That one looks uglier though, I guess we'll have to iterate

[PATCH] KVM test: Include start_vm = yes on nic_bonding

2011-02-18 Thread Lucas Meneghel Rodrigues
So the VM can be restarted to include the new NICs required for the test. Signed-off-by: Lucas Meneghel Rodrigues l...@redhat.com --- client/tests/kvm/tests_base.cfg.sample |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/tests_base.cfg.sample

[KVM-AUTOTEST PATCH 1/2] KVM test: make_qemu_command(): properly deal with get_mac_address() failure

2011-02-18 Thread Michael Goldish
If VM params define a new NIC that didn't previously exist, then when make_qemu_command() is called in order to see if the VM should be restarted, it attempts to get the MAC address of the new (nonexistent) NIC, and an exception is raised. This exception is expected and should be caught.

[KVM-AUTOTEST PATCH 2/2] KVM test: kvm_vm.py: make 'nic_mac' trigger a VM restart when changed

2011-02-18 Thread Michael Goldish
get_mac_address() should first check if 'nic_mac' is defined and then check the address pool. This way, if 'nic_mac' is changed between tests, make_qemu_command(), which calls get_mac_address(), will reveal the change and trigger a VM restart. Signed-off-by: Michael Goldish mgold...@redhat.com

RE: [PATCH] kvm: fix detection of BIOS disabling VMX

2011-02-18 Thread Cihula, Joseph
From: Avi Kivity [mailto:a...@redhat.com] Sent: Thursday, February 10, 2011 2:02 AM On 02/08/2011 09:45 PM, Joseph Cihula wrote: This patch fixes the logic used to detect whether BIOS has disabled VMX. Applied, thanks. Will you request this be taken by the -stable kernel? Joe -- To

Re: [PATCH] KVM test: Include start_vm = yes on nic_bonding

2011-02-18 Thread Lucas Meneghel Rodrigues
On Fri, 2011-02-18 at 17:34 -0200, Lucas Meneghel Rodrigues wrote: So the VM can be restarted to include the new NICs required for the test. Ignore this patch, please :) Signed-off-by: Lucas Meneghel Rodrigues l...@redhat.com --- client/tests/kvm/tests_base.cfg.sample |1 + 1 files

Re: [PATCH] Remove ethtool from rtl8139 variant

2011-02-18 Thread Amos Kong
On Fri, Feb 18, 2011 at 05:14:09PM -0200, Lucas Meneghel Rodrigues wrote: As the original patch set don't define supported_features for it. Signed-off-by: Lucas Meneghel Rodrigues l...@redhat.com Acked-by: Amos Kong ak...@redhat.com --- client/tests/kvm/tests/ethtool.py |6