selftests
Fedora L1 L2
Signed-off-by: Cathy Avery
---
arch/x86/kvm/svm/nested.c | 9 ++---
arch/x86/kvm/svm/svm.c| 2 +-
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kvm/svm/nested.c b/arch/x86/kvm/svm/nested.c
index 8523f60adb92..6f9a40e002bc 100644
--- a/arch/x86
On 3/1/21 7:59 PM, Sean Christopherson wrote:
On Mon, Mar 01, 2021, Cathy Avery wrote:
kvm_set_rflags(&svm->vcpu, vmcb12->save.rflags | X86_EFLAGS_FIXED);
svm_set_efer(&svm->vcpu, vmcb12->save.efer);
svm_set_cr0(&svm->vcpu, vmcb12->save.
VMRUN. In the case where we have a different
vmcb12 from the last L2 VMRUN all vmcb12.save registers must be
copied over to L2.save.
Tested:
kvm-unit-tests
kvm selftests
Fedora L1 L2
Suggested-by: Paolo Bonzini
Signed-off-by: Cathy Avery
---
arch/x86/kvm/svm/nested.c
edora VMs, kvm self tests, and
kvm-unit-tests.
They have not been tested on SEV.
Changes v1 -> v2:
- Remove outdated comment from svm_switch_vmcb().
Cathy Avery (2):
KVM: nSVM: Track the physical cpu of the vmcb vmrun through the vmcb
KVM: nSVM: Track the ASID generation of the vmcb vmrun
s
the processor from using old cached data for a vmcb that may
have been updated on a prior run on a different processor.
It also moves the physical cpu check from svm_vcpu_load
to pre_svm_run as the check only needs to be done at run.
Suggested-by: Paolo Bonzini
Signed-off-by: Cathy Avery
---
This patch moves the asid_generation from the vcpu to the vmcb
in order to track the ASID generation that was active the last
time the vmcb was run. If sd->asid_generation changes between
two runs, the old ASID is invalid and must be changed.
Suggested-by: Paolo Bonzini
Signed-off-by: Ca
s
the processor from using old cached data for a vmcb that may
have been updated on a prior run on a different processor.
It also moves the physical cpu check from svm_vcpu_load
to pre_svm_run as the check only needs to be done at run.
Suggested-by: Paolo Bonzini
Signed-off-by: Cathy Avery
---
This patch moves the asid_generation from the vcpu to the vmcb
in order to track the ASID generation that was active the last
time the vmcb was run. If sd->asid_generation changes between
two runs, the old ASID is invalid and must be changed.
Suggested-by: Paolo Bonzini
Signed-off-by: Ca
edora VMs, kvm self tests, and
kvm-unit-tests.
They have not been tested on SEV.
Cathy Avery (2):
KVM: nSVM: Track the physical cpu of the vmcb vmrun through the vmcb
KVM: nSVM: Track the ASID generation of the vmcb vmrun through the
vmcb
arch/x86/kvm/svm/s
Message-
From: Cathy Avery
Sent: Monday, October 26, 2020 12:42 PM
To: linux-kernel@vger.kernel.org; k...@vger.kernel.org; pbonz...@redhat.com
Cc: vkuzn...@redhat.com; Huang2, Wei ;
mlevi...@redhat.com; sean.j.christopher...@intel.com
Subject: [PATCH v3 0/2] KVM: SVM: Create separate vmcbs for
te during L2
enter and exit which fixed the L2 load issue.
- Moved asid workaround to a new patch which adds asid to svm.
- Init previously uninitialized L2 vmcb save.gpat and save.cr4
Tested:
kvm-unit-tests
kvm self tests
Loaded fedora nested guest on fedora
Cathy Avery (2):
KVM: SVM: Tra
-by: Cathy Avery
---
arch/x86/kvm/svm/nested.c | 125 ++
arch/x86/kvm/svm/svm.c| 42 +++--
arch/x86/kvm/svm/svm.h| 49 ---
3 files changed, 94 insertions(+), 122 deletions(-)
diff --git a/arch/x86/kvm/svm/nested.c b/arch/x86/kvm/
Track asid from svm->asid to allow for vmcb assignment
without regard to which level guest is running.
Suggested-by: Paolo Bonzini
Signed-off-by: Cathy Avery
---
arch/x86/kvm/svm/svm.c | 16 ++--
arch/x86/kvm/svm/svm.h | 2 ++
2 files changed, 16 insertions(+), 2 deleti
-by: Cathy Avery
---
arch/x86/kvm/svm/nested.c | 117 +-
arch/x86/kvm/svm/svm.c| 42 +++---
arch/x86/kvm/svm/svm.h| 49 +---
3 files changed, 89 insertions(+), 119 deletions(-)
diff --git a/arch/x86/kvm/svm/nested.c b/arch/x86/kvm/
g vmcb state during L2
enter and exit which fixed the L2 load issue.
- Moved asid workaround to a new patch which adds asid to svm.
- Init previously uninitialized L2 vmcb save.gpat and save.cr4
Tested:
kvm-unit-tests
kvm self tests
Loaded fedora nested guest on fedora
Cathy Avery (2):
KV
Move asid to svm->asid to allow for vmcb assignment
during svm_vcpu_run without regard to which level
guest is running.
Signed-off-by: Cathy Avery
---
arch/x86/kvm/svm/svm.c | 4 +++-
arch/x86/kvm/svm/svm.h | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kvm/
On 10/8/20 6:23 AM, Maxim Levitsky wrote:
diff --git a/arch/x86/kvm/svm/nested.c b/arch/x86/kvm/svm/nested.c
index 0a06e62010d8c..7293ba23b3cbc 100644
--- a/arch/x86/kvm/svm/nested.c
+++ b/arch/x86/kvm/svm/nested.c
@@ -436,6 +436,9 @@ int enter_svm_guest_mode(struct vcpu_svm *svm, u64 vmcb_gpa,
On 10/8/20 9:11 AM, Maxim Levitsky wrote:
On Thu, 2020-10-08 at 08:46 -0400, Cathy Avery wrote:
On 10/8/20 6:54 AM, Maxim Levitsky wrote:
On Thu, 2020-10-08 at 13:39 +0300, Maxim Levitsky wrote:
On Thu, 2020-10-08 at 13:23 +0300, Maxim Levitsky wrote:
On Thu, 2020-10-08 at 07:52 +0200, Paolo
On 10/8/20 6:54 AM, Maxim Levitsky wrote:
On Thu, 2020-10-08 at 13:39 +0300, Maxim Levitsky wrote:
On Thu, 2020-10-08 at 13:23 +0300, Maxim Levitsky wrote:
On Thu, 2020-10-08 at 07:52 +0200, Paolo Bonzini wrote:
On 08/10/20 00:14, Maxim Levitsky wrote:
+ if (svm->vmcb01->control.asid ==
On 9/18/20 5:11 PM, Wei Huang wrote:
On 09/17 03:23, Cathy Avery wrote:
svm->vmcb will now point to either a separate vmcb L1 ( not nested ) or L2 vmcb
( nested ).
Issues:
1) There is some wholesale copying of vmcb.save and vmcb.contol
areas which will need to be refined.
2) There i
vmcb. Few comments below.
-Original Message-
From: Cathy Avery
Sent: Thursday, September 17, 2020 2:23 PM
To: linux-kernel@vger.kernel.org; k...@vger.kernel.org; pbonz...@redhat.com
Cc: vkuzn...@redhat.com; Huang2, Wei
Subject: [PATCH] KVM: SVM: Use a separate vmcb for the nested L2 guest
r the current
vmcb which is now vmcb02 as we are in nested mode subsequently
vmcb01.control.asid is never set as it should be.
Tested:
kvm-unit-tests
kvm self tests
Signed-off-by: Cathy Avery
---
arch/x86/kvm/svm/nested.c | 116 ++
arch/x86/kvm/svm/svm.c
registers used to populate the
vmcb is carried forward to the other vcpus.
Signed-off-by: Cathy Avery
---
lib/x86/vm.c | 18 ++
lib/x86/vm.h | 7 +++
x86/svm.c| 24 +++-
x86/svm.h| 2 ++
4 files changed, 50 insertions(+), 1 deletion(-)
diff --git a/lib
Init the vcpu and issue the STARTUP ipi to indicate the vcpu
should execute its startup routine.
Signed-off-by: Cathy Avery
---
x86/cstart64.S | 1 +
x86/svm_tests.c | 57 +
2 files changed, 58 insertions(+)
diff --git a/x86/cstart64.S b/x86
- The on_cpu to set cr0/cr3/cr4 should be in setup_vm.
2) Execute tests on selected vcpu using on_cpu_async so the tests
may use the on_cpu functions without causing an ipi_lock deadlock.
3) Added additional test svm_init_startup_test which inits the vcpu and
restarts with sipi.
Cathy Avery (3
INIT vcpu 2 and intercept the INIT. This test
will leave the vcpu in an unusable state.
Signed-off-by: Cathy Avery
---
x86/svm_tests.c | 40
1 file changed, 40 insertions(+)
diff --git a/x86/svm_tests.c b/x86/svm_tests.c
index 698eb20..b43c19f 100644
INIT intercept test and the ability to execute test_run
on a selected vcpu.
Cathy Avery (2):
svm: Add ability to execute test via test_run on a vcpu other than
vcpu 0
svm: INIT intercept test
x86/svm.c | 49 -
x86/svm.h | 13
registers used to populate the
vmcb is carried forward to the other vcpus.
Signed-off-by: Cathy Avery
---
x86/svm.c | 49 -
x86/svm.h | 13 +
2 files changed, 61 insertions(+), 1 deletion(-)
diff --git a/x86/svm.c b/x86/svm.c
index 41685bf
INIT vcpu 2 and intercept the INIT. This test
will leave the vcpu in an unusable state.
Signed-off-by: Cathy Avery
---
x86/svm_tests.c | 40
1 file changed, 40 insertions(+)
diff --git a/x86/svm_tests.c b/x86/svm_tests.c
index c1abd55..a4dbe91 100644
Test V_IRQ injection from L1 to L2 with V_TPR less
than or greater than V_INTR_PRIO. Also test VINTR
intercept with differing V_TPR and V_INTR_PRIO.
Signed-off-by: Cathy Avery
---
x86/svm_tests.c | 150
1 file changed, 150 insertions(+)
diff
The last test does not return vmmcall on fail resulting
in passing the entire test.
Signed-off-by: Cathy Avery
---
x86/svm_tests.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/x86/svm_tests.c b/x86/svm_tests.c
index 2b84e4d..65008ba 100644
--- a/x86/svm_tests.c
+++ b/x86/svm_tests.c
/O to complete while holding scsi_sd_probe_domain.
Also returning the default error of DID_TARGET_FAILURE causes
multipath to not retry the I/O resulting in applications receiving I/O
errors before a failover can occur.
Signed-off-by: Cathy Avery
Signed-off-by: Long Li
---
drivers/scsi
while running fio
and taking hyperV snap shots while luns are being hot added and removed.
Tested-by: Cathy Avery
eue to serialize work in
storvsc_handle_error [Christoph Hellwig]
Changes since v2:
Replaced create_singlethread_workqueue with
alloc_ordered_workqueue [Christoph Hellwig]
Added reviewed by's.
Signed-off-by: Cathy Avery
Reviewed-by: Christoph Hellwig
Reviewed-by: Long Li
---
drivers/scsi/storvsc
On 10/31/2017 08:24 AM, Martin K. Petersen wrote:
If you use alloc_ordered_workqueue directly instead of
create_singlethread_workqueue you can pass a format string and don't
need the separate allocation.
But I'm not sure if Tejun is fine with using __WQ_LEGACY directly..
The only thing that fla
eue to serialize work in
storvsc_handle_error [Christoph Hellwig]
Signed-off-by: Cathy Avery
---
drivers/scsi/storvsc_drv.c | 27 ++-
1 file changed, 22 insertions(+), 5 deletions(-)
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 5e7200f..6febcdb
eue to serialize work in
storvsc_handle_error [Christoph Hellwig]
Signed-off-by: Cathy Avery
---
drivers/scsi/storvsc_drv.c | 27 ++-
1 file changed, 22 insertions(+), 5 deletions(-)
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 5e7200f..6febcdb
On 04/15/2017 10:06 AM, Christoph Hellwig wrote:
Just add a singlethreaded workqueue for storvsc_handle_error and you'll
get serialization for all error handling for free.
The problem I am seeing is that many work items can be queued up for the
same lun before it goes away. The single threaded
scan the scsi stack via
echo "- - -" > /sys/class/scsi_host/hostX/scan.
Signed-off-by: Cathy Avery
---
drivers/scsi/storvsc_drv.c | 23 ++-
1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
.
Changes since v2:
- Additional patch adding FC_PORT_ROLE_FCP_DUMMY_INITIATOR role
to fc_transport
- Changed storvsc rport role to FC_PORT_ROLE_FCP_DUMMY_INITIATOR
Changes since v1:
- Fix fc_rport_identifiers init [Stephen Hemminger]
- Better error checking
Cathy Avery (2):
scsi
ort's role in
fc_rport_identifiers. This insures that a valid scsi_target_id
is assigned to the newly created rport and it can meet the
requirements of fc_user_scan_tgt calling scsi_scan_target.
Signed-off-by: Cathy Avery
---
drivers/scsi/scsi_transport_fc.c | 10 ++
include/scsi/s
as scsi_remove_device also tries to take host->scan_mutex.
This results in dragging the VM down and sometimes completely.
This patch only allows one remove lun to be issued to a particular
lun while it is an instantiated member of the scsi stack.
Signed-off-by: Cathy Avery
---
driver
ort's role in
fc_rport_identifiers. This insures that a valid scsi_target_id
is assigned to the newly created rport and it can meet the
requirements of fc_user_scan_tgt calling scsi_scan_target.
Signed-off-by: Cathy Avery
---
drivers/scsi/scsi_transport_fc.c | 10 ++
include/scsi/s
scan the scsi stack via
echo "- - -" > /sys/class/scsi_host/hostX/scan.
Signed-off-by: Cathy Avery
---
drivers/scsi/storvsc_drv.c | 23 ++-
1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
.
Changes since v2:
- Additional patch adding FC_PORT_ROLE_FCP_DUMMY_INITIATOR role
to fc_transport
- Changed storvsc rport role to FC_PORT_ROLE_FCP_DUMMY_INITIATOR
Changes since v1:
- Fix fc_rport_identifiers init [Stephen Hemminger]
- Better error checking
Cathy Avery (2):
scsi
On 04/03/2017 08:17 AM, Christoph Hellwig wrote:
if (host->transportt == fc_transport_template) {
+ struct fc_rport_identifiers ids = {
+ .roles = FC_PORT_ROLE_FCP_TARGET,
+ };
I don't think storvsc ever acts as FCP target.
In order to
"- - -" > /sys/class/scsi_host/hostX/scan now works.
Signed-off-by: Cathy Avery
---
Changes since v1:
- Fix fc_rport_identifiers init [Stephen Hemminger]
- Better error checking
---
drivers/scsi/storvsc_drv.c | 23 ++-
1 file changed, 18 insertions(+), 5 deletions(-)
"- - -" > /sys/class/scsi_host/hostX/scan now works.
Signed-off-by: Cathy Avery
---
Changes since v1:
- Fix fc_rport_identifiers init [Stephen Hemminger]
- Better error checking
---
drivers/scsi/storvsc_drv.c | 23 ++-
1 file changed, 18 insertions(+), 5 deletions(-)
Good catch. Thanks!
On 03/14/2017 12:42 PM, Stephen Hemminger wrote:
On Tue, 14 Mar 2017 12:01:03 -0400
Cathy Avery wrote:
#if IS_ENABLED(CONFIG_SCSI_FC_ATTRS)
if (host->transportt == fc_transport_template) {
+ struct fc_rport_identifiers
"- - -" > /sys/class/scsi_host/hostX/scan now works.
Signed-off-by: Cathy Avery
---
drivers/scsi/storvsc_drv.c | 15 ++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 638e5f4..c6c0316 100644
--- a
Hi,
I haven't received any feedback yet.
Should I resend?
Thanks,
Cathy
On 02/28/2017 01:45 PM, Cathy Avery wrote:
Included in the current storvsc driver for Hyper-V is the ability
to access luns on an FC fabric via a virtualized fiber channel
adapter exposed by the Hyper-V host. The d
"- - -" > /sys/class/scsi_host/hostX/scan now works.
Signed-off-by: Cathy Avery
---
drivers/scsi/storvsc_drv.c | 15 ++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 585e54f..6d7b932 100644
--- a
scsi_times_out() scsi_error.c. So the workaround is no longer
necessary.
Signed-off-by: Cathy Avery
---
drivers/scsi/storvsc_drv.c | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 888e16e..d487e00 100644
--- a
ed that the word lightweight may not be
the best choice of terms when describing the new FC transport
option. I can offer a few new ones but I am not particularly
imaginative.
Virtual FC
Mini FC
Host only FC
Changes from V1:
Added more comments and documentation in the code regarding
the lightweight
created when the transport driver loads.
They are just not populated when running in lightweight mode. Conceptually
both lightweight and heavyweight clients could coexist.
4) fc_transport_template->user_scan is now null and the bus can be scanned.
Signed-off-by: Cathy Avery
---
drivers/s
;
/sys/class/scsi_host/hostX/scan.
Cathy
On 01/22/2017 10:13 PM, Fam Zheng wrote:
On Wed, 01/18 15:28, Cathy Avery wrote:
Enable FC lightweight host option so that the luns exposed by
the driver may be manually scanned.
Hi Cathy, out of curiosity: how does this relate to issue_lip operatio
eanup necessitating its own patch.
I will break it out in the next go round.
Thanks,
Cathy
On 01/20/2017 04:31 AM, Dan Carpenter wrote:
On Thu, Jan 19, 2017 at 12:55:27PM -0500, Cathy Avery wrote:
On 01/18/2017 06:15 PM, Dan Carpenter wrote:
On Wed, Jan 18, 2017 at 03:28:58PM -0500, Cathy Avery
On 01/18/2017 06:15 PM, Dan Carpenter wrote:
On Wed, Jan 18, 2017 at 03:28:58PM -0500, Cathy Avery wrote:
Enable FC lightweight host option so that the luns exposed by
the driver may be manually scanned.
Signed-off-by: Cathy Avery
---
drivers/scsi/storvsc_drv.c | 6 +-
1 file changed
On 01/19/2017 10:11 AM, Christoph Hellwig wrote:
On Wed, Jan 18, 2017 at 03:28:57PM -0500, Cathy Avery wrote:
The patch provides a means to offer a lightweight option to the
current FC transport class. The new option is selected by a
driver when it indicates it wants the lightweight
transport
Enable FC lightweight host option so that the luns exposed by
the driver may be manually scanned.
Signed-off-by: Cathy Avery
---
drivers/scsi/storvsc_drv.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index
The patch provides a means to offer a lightweight option to the
current FC transport class. The new option is selected by a
driver when it indicates it wants the lightweight
transport via fc_function_template.
Signed-off-by: Cathy Avery
---
drivers/scsi/scsi_transport_fc.c | 125
.
Patch 1: The patch provides a lightweight option to the current FC
transport class. The new option is selected by a driver when it
indicates it wants the lightweight transport in fc_function_template.
Patch 2: storvsc elects using the new lightweight FC host option.
Cathy Avery (2):
scsi
lightweight
transport in fc_function_template. I have included the changes for
storvsc_drv.c in this patch as an example of a driver making use of the
lightweight transport option.
Signed-off-by: Cathy Avery
---
drivers/scsi/scsi_transport_fc.c | 125 +--
drivers
On a 32 bit kernel sizeof(void *) is not 64 bits as hv_mpb_array
requires. Also the buffer needs to be cleared or the upper bytes
will contain junk.
Suggested-by: Vitaly Kuznetsov
Signed-off-by: Cathy Avery
ChangeLog:
v1) Initial submission
v2) Remove memset and replace kmalloc with kzalloc
On a 32 bit kernel sizeof(void *) is not 64 bits as hv_mpb_array
requires. Also the buffer needs to be cleared or the upper bytes
could contain junk.
Suggested-by: Vitaly Kuznets
Signed-off-by: Cathy Avery
---
drivers/scsi/storvsc_drv.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion
without freeing int_desc as part of
hv_int_desc_free().
Signed-off-by: Cathy Avery
---
drivers/pci/host/pci-hyperv.c | 14 --
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/pci/host/pci-hyperv.c b/drivers/pci/host/pci-hyperv.c
index 7e9b2de..449d053 100644
--- a
ceive tests ( host to vm and vm to host ) using apps
provided by Dexuan.
Reviewed-by: Cathy Avery
Tested-by: Cathy Avery
On 07/08/2016 03:47 AM, Dexuan Cui wrote:
Hyper-V Sockets (hv_sock) supplies a byte-stream based communication
mechanism between the host and the guest. It's somewhat lik
When a virtual scsi DVD device is present with no image file
attached the storvsc driver logs all resulting unnecessary sense errors
whenever IO is issued to the device.
[storvsc] Sense Key : Not Ready [current]
[storvsc] Add. Sense: Medium not present - tray closed
Signed-off-by: Cathy Avery
Hi,
I will be working with Dexuan to possibly port this functionality into RHEL.
Here are my initial comments. Mostly stylistic. They are prefaced by CAA.
Thanks,
Cathy Avery
On 04/07/2016 09:36 PM, Dexuan Cui wrote:
Hyper-V Sockets (hv_sock) supplies a byte-stream based communication
Sorry acking wrong email.
Thanks,
Cathy
On 03/30/2016 08:21 AM, Cathy Avery wrote:
On 03/29/2016 08:30 AM, Vitaly Kuznetsov wrote:
Hyper-V VMs can be replicated to another hosts and there is a feature to
set different IP for replicas, it is called 'Failover TCP/IP'. When
such gu
s.h
@@ -36,6 +36,11 @@
#define HV_UTIL_TIMEOUT 30
/*
+ * Timeout for guest-host handshake for services.
+ */
+#define HV_UTIL_NEGO_TIMEOUT 60
+
+/*
* The below CPUID leaves are present if VersionAndFeatures.HypervisorPresent
* is set by CPUID(HVCPUID_VERSION_FEATURES).
*/
Acked-by: Cathy Avery
71 matches
Mail list logo