When I boot two virtio-rng devices, guest will hang

2014-07-28 Thread Amos Kong
QEMU commandline: ./x86_64-softmmu/qemu-system-x86_64 --enable-kvm -m 2000 -drive file=/images/nolvm.qcow2 --kernel /home/devel/linux/arch/x86/boot/bzImage -append "ro root=/dev/sda1 console=ttyS0,115200" -monitor unix:/tmp/m,nowait,server -device virtio-net-pci,netdev=h0,vectors=17,mq=on,i

Re: When I boot two virtio-rng devices, guest will hang

2014-07-28 Thread Amit Shah
On (Mon) 28 Jul 2014 [15:32:42], Amos Kong wrote: > QEMU commandline: > > ./x86_64-softmmu/qemu-system-x86_64 --enable-kvm -m 2000 -drive > file=/images/nolvm.qcow2 --kernel /home/devel/linux/arch/x86/boot/bzImage > -append "ro root=/dev/sda1 console=ttyS0,115200" -monitor > unix:/tmp/m,nowa

RE: [PATCH 1/6 v2] KVM: PPC: Book3E: Use common defines for SPE/FP/AltiVec int numbers

2014-07-28 Thread mihai.cara...@freescale.com
> -Original Message- > From: Wood Scott-B07421 > Sent: Saturday, July 26, 2014 3:11 AM > To: Caraman Mihai Claudiu-B02008 > Cc: Alexander Graf; kvm-...@vger.kernel.org; kvm@vger.kernel.org; > linuxppc-...@lists.ozlabs.org > Subject: Re: [PATCH 1/6 v2] KVM: PPC: Book3E: Use common defines fo

Re: When I boot two virtio-rng devices, guest will hang

2014-07-28 Thread Amit Shah
On (Mon) 28 Jul 2014 [16:49:20], Amos Kong wrote: > On Mon, Jul 28, 2014 at 01:25:14PM +0530, Amit Shah wrote: > > On (Mon) 28 Jul 2014 [15:32:42], Amos Kong wrote: > > > QEMU commandline: > > > > > > ./x86_64-softmmu/qemu-system-x86_64 --enable-kvm -m 2000 -drive > > > file=/images/nolvm.qcow2

Re: When I boot two virtio-rng devices, guest will hang

2014-07-28 Thread Amos Kong
On Mon, Jul 28, 2014 at 01:25:14PM +0530, Amit Shah wrote: > On (Mon) 28 Jul 2014 [15:32:42], Amos Kong wrote: > > QEMU commandline: > > > > ./x86_64-softmmu/qemu-system-x86_64 --enable-kvm -m 2000 -drive > > file=/images/nolvm.qcow2 --kernel /home/devel/linux/arch/x86/boot/bzImage > > -append

Re: deadline of CFP for kvm forum

2014-07-28 Thread Paolo Bonzini
Il 28/07/2014 04:08, Zhang, Yang Z ha scritto: > Hi all, > > I see the deadline of CFP for KVM forum is July 27, 2014. But I found > there is no kvm forum selection list when I tried to submit a > presentation yesterday. Is the CFP closed early than expected? > > BTW, it is in July 27 in US when

[PATCH] target-mips: Ignore unassigned accesses with KVM

2014-07-28 Thread James Hogan
MIPS registers an unassigned access handler which raises a guest bus error exception. However this causes QEMU to crash when KVM is enabled as it isn't called from the main execution loop so longjmp() gets called without a corresponding setjmp(). Until the KVM API can be updated to trigger a guest

Re: [RFC PATCH 0/5] Improve PPC instruction emulation

2014-07-28 Thread Alexander Graf
On 19.07.14 12:14, Paul Mackerras wrote: This series aims to increase the range of instructions that KVM on PPC can emulate and reduce code duplication by using the existing instruction emulation code from arch/powerpc/lib/sstep.c for KVM. The ultimate goal is to make PR KVM run faster on the k

Re: [RFC PATCH 1/5] powerpc: Split out instruction analysis part of emulate_step()

2014-07-28 Thread Alexander Graf
On 19.07.14 12:14, Paul Mackerras wrote: This splits out the instruction analysis part of emulate_step() into a separate analyse_instr() function, which decodes the instruction, but doesn't execute any load or store instructions. It does execute integer instructions and branches which can be ex

Re: When I boot two virtio-rng devices, guest will hang

2014-07-28 Thread Amos Kong
On Mon, Jul 28, 2014 at 02:42:13PM +0530, Amit Shah wrote: > On (Mon) 28 Jul 2014 [16:49:20], Amos Kong wrote: > > On Mon, Jul 28, 2014 at 01:25:14PM +0530, Amit Shah wrote: > > > On (Mon) 28 Jul 2014 [15:32:42], Amos Kong wrote: > > > > QEMU commandline: > > > > > > > > ./x86_64-softmmu/qemu-syst

Re: [RFC PATCH 4/5] KVM: PPC: Use analyse_instr() in kvmppc_emulate_instruction()

2014-07-28 Thread Alexander Graf
On 19.07.14 12:14, Paul Mackerras wrote: This changes kvmppc_emulate_instruction() to use the common instruction decoding code from arch/powerpc/lib/sstep.c. This expands the set of instructions that we recognize to include all of the integer load and store instructions except for the string (l

Re: [RFC PATCH 5/5] KVM: PPC: Book3S: Make kvmppc_handle_load/store handle any load or store

2014-07-28 Thread Alexander Graf
On 19.07.14 12:14, Paul Mackerras wrote: At present, kvmppc_handle_load and kvmppc_handle_store only handle emulated MMIO loads and stores. This extends them to be able to handle loads and stores to guest memory as well. This is so that kvmppc_emulate_instruction can be used to emulate loads a

Re: [PATCH 3/3] KVM: PPC: Book3S: Make kvmppc_ld return a more accurate error indication

2014-07-28 Thread Alexander Graf
On 19.07.14 09:59, Paul Mackerras wrote: At present, kvmppc_ld calls kvmppc_xlate, and if kvmppc_xlate returns any error indication, it returns -ENOENT, which is taken to mean an HPTE not found error. However, the error could have been a segment found (no SLB entry) or a permission error. Simi

Re: [PATCH 0/3] Fixes for PPC Book3S KVM

2014-07-28 Thread Alexander Graf
On 19.07.14 09:59, Paul Mackerras wrote: Here are three small fixes for the PPC Book 3S code. The first should go into 3.16 if possible, I think, or if not, certainly 3.17. The remaining two are less urgent and should go into 3.17. The patch series is against Alex Graf's kvm-ppc-queue branch.

Re: [PATCH 1/4] KVM: PPC: BOOK3S: PR: Emulate virtual timebase register

2014-07-28 Thread Alexander Graf
On 06.06.14 18:27, Aneesh Kumar K.V wrote: Alexander Graf writes: On 05.06.14 14:08, Aneesh Kumar K.V wrote: virtual time base register is a per VM, per cpu register that needs to be saved and restored on vm exit and entry. Writing to VTB is not allowed in the privileged mode. Signed-off-by

Re: [PATCH/RFC 0/5] s390x/kvm: track the logical cpu state in QEMU and propagate it to kvm

2014-07-28 Thread Alexander Graf
On 10.07.14 15:27, David Hildenbrand wrote: This is the qemu part of kernel series "Let user space control the cpu states" Christian Borntraeger (1): update linux headers with with cpustate changes David Hildenbrand (4): s390x/kvm: introduce proper states for s390 cpus s390x/kvm: prop

Re: [Qemu-devel] [PATCH/RFC 0/5] s390x/kvm: track the logical cpu state in QEMU and propagate it to kvm

2014-07-28 Thread Alexander Graf
On 28.07.2014, at 15:43, Alexander Graf wrote: > > On 10.07.14 15:27, David Hildenbrand wrote: This is the qemu part of kernel series "Let user space control the cpu states" Christian Borntraeger (1): update linux headers with with cpustate changes David H

Re: [PATCH/RFC 4/5] s390x/kvm: test whether a cpu is STOPPED when checking "has_work"

2014-07-28 Thread Alexander Graf
On 10.07.14 15:10, Christian Borntraeger wrote: From: David Hildenbrand If a cpu is stopped, it must never be allowed to run and no interrupt may wake it up. A cpu also has to be unhalted if it is halted and has work to do - this scenario wasn't hit in kvm case yet, as only "disabled wait" is

Re: [PATCH 6/6] KVM: PPC: BOOKE: Emulate debug registers and exception

2014-07-28 Thread Alexander Graf
On 11.07.14 10:39, Bharat Bhushan wrote: This patch emulates debug registers and debug exception to support guest using debug resource. This enables running gdb/kgdb etc in guest. On BOOKE architecture we cannot share debug resources between QEMU and guest because: When QEMU is using debug

Re: [PATCH] KVM: PPC: BOOK3S: HV: Update compute_tlbie_rb to handle 16MB base page

2014-07-28 Thread Alexander Graf
On 27.06.14 15:35, Aneesh Kumar K.V wrote: When calculating the lower bits of AVA field, use the shift count based on the base page size. Also add the missing segment size and remove stale comment. Signed-off-by: Aneesh Kumar K.V Thanks, applied to kvm-ppc-queue. Alex -- To unsubscribe fr

Re: [PATCH 2/6] KVM: PPC: BOOKE: Force MSR_DE in rfci if guest is under debug

2014-07-28 Thread Alexander Graf
On 11.07.14 10:38, Bharat Bhushan wrote: When userspace (QEMU) is using the debug resource to debug guest then we want MSR_DE to be always set. This patch adds missing MSR_DE setting in "rfci" instruction. Signed-off-by: Bharat Bhushan Shouldn't this be in kvmppc_set_msr() instead then to ca

Re: [Qemu-devel] [PATCH/RFC 4/5] s390x/kvm: test whether a cpu is STOPPED when checking "has_work"

2014-07-28 Thread David Hildenbrand
> > On 10.07.14 15:10, Christian Borntraeger wrote: > > From: David Hildenbrand > > > > If a cpu is stopped, it must never be allowed to run and no interrupt may > > wake it > > up. A cpu also has to be unhalted if it is halted and has work to do - this > > scenario wasn't hit in kvm case yet, a

Re: [PATCH 00/33] KVM: PPC: Fix IRQ race in magic page code

2014-07-28 Thread Alexander Graf
On 25.06.14 02:21, Scott Wood wrote: On Wed, 2014-06-25 at 01:40 +0200, Alexander Graf wrote: On 25.06.14 01:15, Scott Wood wrote: On Wed, 2014-06-25 at 00:41 +0200, Alexander Graf wrote: On 24.06.14 20:53, Scott Wood wrote: The timer interrupt works, but I'm not fully convinced that it's a

Re: [Qemu-devel] [PATCH/RFC 4/5] s390x/kvm: test whether a cpu is STOPPED when checking "has_work"

2014-07-28 Thread Paolo Bonzini
Il 28/07/2014 16:16, David Hildenbrand ha scritto: > Later, another vcpu might decide to turn that vcpu back on (by e.g. sending a > SIGP START to that vcpu). > > I am not sure if such a mechanism/scenario is applicable to any other arch. > They > all seem to reset the cs->halted flag if they kno

Re: [Qemu-devel] [PATCH/RFC 4/5] s390x/kvm: test whether a cpu is STOPPED when checking "has_work"

2014-07-28 Thread Alexander Graf
On 28.07.2014, at 16:16, David Hildenbrand wrote: >> >> On 10.07.14 15:10, Christian Borntraeger wrote: >>> From: David Hildenbrand >>> >>> If a cpu is stopped, it must never be allowed to run and no interrupt may >>> wake it >>> up. A cpu also has to be unhalted if it is halted and has work

[PATCH 6/7] KVM: PPC: Separate loadstore emulation from priv emulation

2014-07-28 Thread Alexander Graf
Today the instruction emulator can get called via 2 separate code paths. It can either be called by MMIO emulation detection code or by privileged instruction traps. This is bad, as both code paths prepare the environment differently. For MMIO emulation we already know the virtual address we fault

[PATCH 3/7] KVM: PPC: Remove kvmppc_bad_hva()

2014-07-28 Thread Alexander Graf
We have a proper define for invalid HVA numbers. Use those instead of the ppc specific kvmppc_bad_hva(). Signed-off-by: Alexander Graf --- arch/powerpc/kvm/powerpc.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c

[PATCH 5/7] KVM: PPC: Handle magic page in kvmppc_ld/st

2014-07-28 Thread Alexander Graf
We use kvmppc_ld and kvmppc_st to emulate load/store instructions that may as well access the magic page. Special case it out so that we can properly access it. Signed-off-by: Alexander Graf --- arch/powerpc/include/asm/kvm_book3s.h | 7 +++ arch/powerpc/include/asm/kvm_booke.h | 10 ++

[PATCH 4/7] KVM: PPC: Use kvm_read_guest in kvmppc_ld

2014-07-28 Thread Alexander Graf
We have a nice and handy helper to read from guest physical address space, so we should make use of it in kvmppc_ld as we already do for its counterpart in kvmppc_st. Signed-off-by: Alexander Graf --- arch/powerpc/kvm/powerpc.c | 27 ++- 1 file changed, 2 insertions(+), 2

[PATCH 2/7] KVM: PPC: Move kvmppc_ld/st to common code

2014-07-28 Thread Alexander Graf
We have enough common infrastructure now to resolve GVA->GPA mappings at runtime. With this we can move our book3s specific helpers to load / store in guest virtual address space to common code as well. Signed-off-by: Alexander Graf --- arch/powerpc/include/asm/kvm_book3s.h | 2 +- arch/powerpc

[PATCH 7/7] KVM: PPC: Expose helper functions for data/inst faults

2014-07-28 Thread Alexander Graf
We're going to implement guest code interpretation in KVM for some rare corner cases. This code needs to be able to inject data and instruction faults into the guest when it encounters them. Expose generic APIs to do this in a reasonably subarch agnostic fashion. Signed-off-by: Alexander Graf --

[PATCH 1/7] KVM: PPC: Implement kvmppc_xlate for all targets

2014-07-28 Thread Alexander Graf
We have a nice API to find the translated GPAs of a GVA including protection flags. So far we only use it on Book3S, but there's no reason the same shouldn't be used on BookE as well. Implement a kvmppc_xlate() version for BookE and clean it up to make it more readable in general. Signed-off-by:

[PATCH 0/7] KVM: PPC: Prepare for shared kernel / kvm emulation code

2014-07-28 Thread Alexander Graf
Paul recently posted a nice patch set that started to make kvm code use the already existing in-kernel instruction emulator. Some bits from my previous attempt to implement yet another instruction emulator can and should be reused for that approach as well. So this patch set gathers all the bits t

Re: [Qemu-devel] [PATCH/RFC 4/5] s390x/kvm: test whether a cpu is STOPPED when checking "has_work"

2014-07-28 Thread David Hildenbrand
> > On 28.07.2014, at 16:16, David Hildenbrand wrote: > > >> > >> On 10.07.14 15:10, Christian Borntraeger wrote: > >>> From: David Hildenbrand > >>> > >>> If a cpu is stopped, it must never be allowed to run and no interrupt may > >>> wake it > >>> up. A cpu also has to be unhalted if it is

Re: [Qemu-devel] [PATCH/RFC 4/5] s390x/kvm: test whether a cpu is STOPPED when checking "has_work"

2014-07-28 Thread David Hildenbrand
> > > > On 28.07.2014, at 16:16, David Hildenbrand wrote: > > > > >> > > >> On 10.07.14 15:10, Christian Borntraeger wrote: > > >>> From: David Hildenbrand > > >>> > > >>> If a cpu is stopped, it must never be allowed to run and no interrupt > > >>> may wake it > > >>> up. A cpu also has to

Re: [Qemu-devel] [PATCH/RFC 4/5] s390x/kvm: test whether a cpu is STOPPED when checking "has_work"

2014-07-28 Thread Alexander Graf
On 28.07.14 17:03, David Hildenbrand wrote: On 28.07.2014, at 16:16, David Hildenbrand wrote: On 10.07.14 15:10, Christian Borntraeger wrote: From: David Hildenbrand If a cpu is stopped, it must never be allowed to run and no interrupt may wake it up. A cpu also has to be unhalted if it i

Re: Verifying Execution Integrity in Untrusted hypervisors

2014-07-28 Thread Joel Schopp
On 07/25/2014 03:11 PM, Shiva V wrote: > Hello, > I am exploring on finding a way to ensure runtime integrity of > > a executable in untrusted hypervisors. > > In particular, this is my requirements: > > 1. I have a 2 virtual machines. (A, B). > > 2. VM-A is running some service (exe) inside it.

[PATCH] KVM: PPC: Remove 440 support

2014-07-28 Thread Alexander Graf
The 440 target hasn't been properly functioning for a few releases and before I was the only one who fixes a very serious bug that indicates to me that nobody used it before either. Furthermore KVM on 440 is slow to the extent of unusable. We don't have to carry along completely unused code. Remo

[PATCH] KVM: PPC: Remove DCR handling

2014-07-28 Thread Alexander Graf
DCR handling was only needed for 440 KVM. Since we removed it, we can also remove handling of DCR accesses. Signed-off-by: Alexander Graf --- Documentation/virtual/kvm/api.txt | 6 +++--- arch/powerpc/include/asm/kvm_host.h | 4 arch/powerpc/include/asm/kvm_ppc.h | 1 - arch/powerpc/k

Re: Verifying Execution Integrity in Untrusted hypervisors

2014-07-28 Thread Jan Kiszka
On 2014-07-28 19:17, Joel Schopp wrote: > > On 07/25/2014 03:11 PM, Shiva V wrote: >> Hello, >> I am exploring on finding a way to ensure runtime integrity of >> >> a executable in untrusted hypervisors. >> >> In particular, this is my requirements: >> >> 1. I have a 2 virtual machines. (A, B).

Re: Verifying Execution Integrity in Untrusted hypervisors

2014-07-28 Thread Paolo Bonzini
Il 28/07/2014 20:31, Jan Kiszka ha scritto: > The hypervisor has full control of and insight into the guest vCPU > state. Only protecting some portions of guest memory seems insufficient. > > We rather need encryption of every data that leaves the CPU or moves > from guest to host mode (and decryp

Re: [PATCH 1/4] PCI: introduce helper functions for device flag operation

2014-07-28 Thread Alex Williamson
On Wed, 2014-07-23 at 00:19 +0800, Ethan Zhao wrote: > This patch introduced three helper functions to hide direct > device flag operation. > > void pci_set_dev_assigned(struct pci_dev *pdev); > void pci_set_dev_deassigned(struct pci_dev *pdev); > bool pci_is_dev_assigned(struct pci_dev *pdev); >

Re: Verifying Execution Integrity in Untrusted hypervisors

2014-07-28 Thread Nakajima, Jun
On Mon, Jul 28, 2014 at 1:27 PM, Paolo Bonzini wrote: > Il 28/07/2014 20:31, Jan Kiszka ha scritto: >> The hypervisor has full control of and insight into the guest vCPU >> state. Only protecting some portions of guest memory seems insufficient. >> >> We rather need encryption of every data that l

Re: [PATCH] target-mips: Ignore unassigned accesses with KVM

2014-07-28 Thread Aurelien Jarno
On Mon, Jul 28, 2014 at 12:37:50PM +0100, James Hogan wrote: > MIPS registers an unassigned access handler which raises a guest bus > error exception. However this causes QEMU to crash when KVM is enabled > as it isn't called from the main execution loop so longjmp() gets called > without a corresp

Re: [PATCH 1/6] KVM: PPC: BOOKE: No need to set DBCR0_EDM in guest visible register

2014-07-28 Thread Scott Wood
On Fri, 2014-07-11 at 14:08 +0530, Bharat Bhushan wrote: > This is not used and even I do not remember why this was added > in first place. > > Signed-off-by: Bharat Bhushan > --- > arch/powerpc/kvm/booke.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/arch/powerpc/kvm/booke.c b/ar

Re: [PATCH 2/6] KVM: PPC: BOOKE: Force MSR_DE in rfci if guest is under debug

2014-07-28 Thread Scott Wood
On Fri, 2014-07-11 at 14:08 +0530, Bharat Bhushan wrote: > When userspace (QEMU) is using the debug resource to debug guest > then we want MSR_DE to be always set. This patch adds missing > MSR_DE setting in "rfci" instruction. > > Signed-off-by: Bharat Bhushan > --- > arch/powerpc/kvm/booke_emu

Re: [PATCH 5/6] KVM: PPC: BOOKE: Allow guest to change MSR_DE

2014-07-28 Thread Scott Wood
On Fri, 2014-07-11 at 14:09 +0530, Bharat Bhushan wrote: > When userspace is debugging guest then MSR_DE is always set and > MSRP_DEP is set so that guest cannot change MSR_DE. > Guest debug resources are not yet emulated, So there seems no reason > we should stop guest controlling MSR_DE. > Also a

Re: [PATCH 6/6] KVM: PPC: BOOKE: Emulate debug registers and exception

2014-07-28 Thread Scott Wood
On Fri, 2014-07-11 at 14:09 +0530, Bharat Bhushan wrote: > This patch emulates debug registers and debug exception > to support guest using debug resource. This enables running > gdb/kgdb etc in guest. > > On BOOKE architecture we cannot share debug resources between QEMU and > guest because: >

Re: [PATCH 6/6] KVM: PPC: BOOKE: Emulate debug registers and exception

2014-07-28 Thread Scott Wood
On Mon, 2014-07-28 at 16:04 +0200, Alexander Graf wrote: > On 11.07.14 10:39, Bharat Bhushan wrote: > > This patch emulates debug registers and debug exception > > to support guest using debug resource. This enables running > > gdb/kgdb etc in guest. > > > > On BOOKE architecture we cannot share de

Re: [PATCH 1/6 v2] KVM: PPC: Book3E: Use common defines for SPE/FP/AltiVec int numbers

2014-07-28 Thread Scott Wood
On Mon, 2014-07-28 at 03:54 -0500, Caraman Mihai Claudiu-B02008 wrote: > > -Original Message- > > From: Wood Scott-B07421 > > Sent: Saturday, July 26, 2014 3:11 AM > > To: Caraman Mihai Claudiu-B02008 > > Cc: Alexander Graf; kvm-...@vger.kernel.org; kvm@vger.kernel.org; > > linuxppc-...@lis

Re: [PATCH 1/4] KVM: PPC: BOOK3S: PR: Emulate virtual timebase register

2014-07-28 Thread Stewart Smith
Alexander Graf writes: > --- a/arch/powerpc/include/asm/reg.h > +++ b/arch/powerpc/include/asm/reg.h > @@ -25,7 +25,6 @@ > #ifdef CONFIG_8xx > #include > #endif /* CONFIG_8xx */ > -#include > > #define MSR_SF_LG 63 /* Enable 64 bit mode */ > #define MSR_ISF_LG 61

Re: [PATCH] vhost: Add polling mode

2014-07-28 Thread Zhang Haoyu
Maybe tie a knot between "vhost-net scalability tuning: threading for many VMs" and "vhost: Add polling mode" is a good marriage, because it's more possibility to get work to do with less polling time, so less cpu cycles waste. Thanks, Zhang Haoyu >> > >>> Hello All, >> > >>> >> > >

Re: [PATCH 1/4] PCI: introduce helper functions for device flag operation

2014-07-28 Thread ethan zhao
On 2014/7/29 5:00, Alex Williamson wrote: On Wed, 2014-07-23 at 00:19 +0800, Ethan Zhao wrote: This patch introduced three helper functions to hide direct device flag operation. void pci_set_dev_assigned(struct pci_dev *pdev); void pci_set_dev_deassigned(struct pci_dev *pdev); bool pci_is_dev_

[PATCH 1/4 v2] PCI: introduce helper functions for device flag operation

2014-07-28 Thread Ethan Zhao
This patch introduced three helper functions to hide direct device flag operation. void pci_set_dev_assigned(struct pci_dev *pdev); void pci_set_dev_deassigned(struct pci_dev *pdev); bool pci_is_dev_assigned(struct pci_dev *pdev); Signed-off-by: Ethan Zhao --- v2: simplify unnecessory ternary o

Re: [PATCH 1/4] PCI: introduce helper functions for device flag operation

2014-07-28 Thread Alex Williamson
On Tue, 2014-07-29 at 09:53 +0800, ethan zhao wrote: > On 2014/7/29 5:00, Alex Williamson wrote: > > On Wed, 2014-07-23 at 00:19 +0800, Ethan Zhao wrote: > >> This patch introduced three helper functions to hide direct > >> device flag operation. > >> > >> void pci_set_dev_assigned(struct pci_dev *

Re: [PATCH 1/4] PCI: introduce helper functions for device flag operation

2014-07-28 Thread ethan zhao
On 2014/7/29 10:31, Alex Williamson wrote: On Tue, 2014-07-29 at 09:53 +0800, ethan zhao wrote: On 2014/7/29 5:00, Alex Williamson wrote: On Wed, 2014-07-23 at 00:19 +0800, Ethan Zhao wrote: This patch introduced three helper functions to hide direct device flag operation. void pci_set_dev_a

Re: [PATCH 1/4] PCI: introduce helper functions for device flag operation

2014-07-28 Thread Alexander Duyck
On 07/28/2014 07:43 PM, ethan zhao wrote: > > On 2014/7/29 10:31, Alex Williamson wrote: >> On Tue, 2014-07-29 at 09:53 +0800, ethan zhao wrote: >>> On 2014/7/29 5:00, Alex Williamson wrote: On Wed, 2014-07-23 at 00:19 +0800, Ethan Zhao wrote: > This patch introduced three helper function

Re: [PATCH 1/4] PCI: introduce helper functions for device flag operation

2014-07-28 Thread Ethan Zhao
Both of you and Alex W prefer the 'Verb' , Ok, I accept the suggestion. Thanks, Ethan On Tue, Jul 29, 2014 at 11:37 AM, Alexander Duyck wrote: > On 07/28/2014 07:43 PM, ethan zhao wrote: >> >> On 2014/7/29 10:31, Alex Williamson wrote: >>> On Tue, 2014-07-29 at 09:53 +0800, ethan zhao wrote: >

[PATCH 3/4 v3] xen-pciback: use pci device flag operation helper function

2014-07-28 Thread Ethan Zhao
Use pci device flag operation helper functions when set device to assigned or deassigned state. Signed-off-by: Ethan Zhao --- v3: amend helper functions naming. drivers/xen/xen-pciback/pci_stub.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/xen/xen-pciback

[PATCH 4/4 v3] PCI: use device flag operation helper function in iov.c

2014-07-28 Thread Ethan Zhao
Use device flag operation helper functions when check device assignment status. Signed-off-by: Ethan Zhao --- v3: amend helper functions naming. drivers/pci/iov.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c index de7a747..61fad

[PATCH 1/4 v3] PCI: introduce helper functions for device flag operation

2014-07-28 Thread Ethan Zhao
This patch introduced three helper functions to hide direct device flag operation. void pci_set_dev_assigned(struct pci_dev *pdev); void pci_clear_dev_assigned(struct pci_dev *pdev); bool pci_is_dev_assigned(struct pci_dev *pdev); Signed-off-by: Ethan Zhao --- v2: simplify unnecessory ternary o

[PATCH 0/4 v3] Introduce device assignment flag operation helper function

2014-07-28 Thread Ethan Zhao
This patch set introduces three PCI device flag operation helper functions when set pci device PF/VF to assigned or deassigned status also check it. and patch 2,3,4 apply these helper functions to KVM,XEN and PCI. v2: simplify unnecessory ternary operation in function pci_is_dev_assigned(). v3: am

[PATCH 2/4 v3] KVM: use pci device flag operation helper functions

2014-07-28 Thread Ethan Zhao
Use helper function instead of direct operation to pci device flag when set device to assigned or deassigned. Signed-off-by: Ethan Zhao --- v3: amend helper functions naming. virt/kvm/assigned-dev.c |2 +- virt/kvm/iommu.c|4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)

Re: Verifying Execution Integrity in Untrusted hypervisors

2014-07-28 Thread Jan Kiszka
On 2014-07-28 23:17, Nakajima, Jun wrote: > On Mon, Jul 28, 2014 at 1:27 PM, Paolo Bonzini wrote: >> Il 28/07/2014 20:31, Jan Kiszka ha scritto: >>> The hypervisor has full control of and insight into the guest vCPU >>> state. Only protecting some portions of guest memory seems insufficient. >>> >